Skip to content

feat(config): securely configure local Cartesia and OpenAI keys - #773

Draft
axelpey wants to merge 3 commits into
mainfrom
codex/provider-key-configuration
Draft

feat(config): securely configure local Cartesia and OpenAI keys#773
axelpey wants to merge 3 commits into
mainfrom
codex/provider-key-configuration

Conversation

@axelpey

@axelpey axelpey commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Owners can now enter Cartesia and OpenAI keys through innate keys set cartesia / innate keys set openai, inspect configuration presence with innate keys status, and remove keys without putting credentials into browser settings, ROS parameters, command arguments, or output. Entry uses a hidden terminal prompt or a secret-manager pipe via --stdin; changes take effect after a node/local-simulator restart.

The CLI reuses the simulator setup's .env persistence path. Updates are atomic, locked across processes, and mode 0600; replacing a key removes stale commented copies. Removal writes an empty override so old shell/system credentials do not silently return on restart. Generated simulator env files are also private and retain empty overrides. Local .env values now consistently take precedence over inherited shell keys, matching the robot launch loader. INNATE_PUBLIC_DEMO=1 rejects key commands and credential-bearing generated environments.

Runtime dependencies and boundaries

Verification

50 focused tests passed: actual CLI subprocess save/rotate/status/remove, real PTY hidden input and cancellation, actual hardware .env loader and simulator generated environment, service-key preservation, shell override removal, public-demo rejection, concurrent process writes, atomic failure cleanup, permissions, symlink refusal, and launcher imports. Ruff and diff checks pass. Latest head 941d678f4 passes GitHub format and host pytest; ROS integration/image builds are still pending.

Combined verification against #755 plus #774 (8e2d0d76a) and #772 (1cc44b47c) also passed: actual CLI pipe → private .env → hardware launch loader → OpenAIContext two-turn native tool replay and Cartesia TTSHandler → local HTTP provider doubles, plus 54 provider/TTS tests. The integration needed two merge resolutions with #755: retain all four SECRET_ENV_KEYS in sim/launcher/config.py, and retain David's generic setup UX while importing the extracted env-store helpers in setup_wizard.py. No foundation conflict occurred.

The OpenAI transport's additional 8 real local HTTP tests passed before handoff to #772 (direct/proxy routing, no account failover, malformed/incomplete/error stream sanitization, missing key, public-demo guard). Live OpenAI account/model authorization and Cartesia synthesis with a non-owning key are not verified in this PR. Those require an owner-provided key through the local secret path; never paste credentials into a PR or chat.

Keep this PR draft until Axel explicitly approves it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant