Commit 646f66a
committed
feat(cloud): inject the ChatGPT subscription credential into serve container
Verified end-to-end in the live container BEFORE wiring (temp /__diag probe):
vendored codex read a dropped ~/.codex/auth.json, `codex login status` =
'Logged in using ChatGPT', container egressed, real turn completed (gpt-5.5,
HELLO_FROM_CLOUD). Subscription path works headless — no API key.
- index.ts: pass CODEX_AUTH_JSON through startProcess env to the container.
- start-serve.sh: write it to $CODEX_HOME/auth.json (0600) before serve starts,
so Helmor's sidecar-spawned codex authenticates as the user's subscription.
Phase-1 will swap the whole-credential passthrough for a control-plane token
broker (mint per-turn access_token via auth.openai.com/oauth/token public
client; inject a ChatgptAuthTokens auth.json), keeping the rotating refresh
token in the durable control plane, never the ephemeral container.1 parent 0eb34f0 commit 646f66a
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
43 | 56 | | |
44 | 57 | | |
45 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
| 86 | + | |
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
| |||
0 commit comments