You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 103e34f
Browse filesBrowse the repository at this point in the historyBrowse files
Feat: headless paste login for bigmodel OAuth (--paste, TUI L key)
CLI: `auth login bigmodel --paste` or ZCODE_OAUTH_PASTE=1 — paste the redirected 127.0.0.1 callback URL back instead of waiting on a callback the browser can never reach inside a container (gcloud/gh-style). The normal flow prints a headless hint pointing at --paste.
TUI: single OAuth Login entry as before; while a login waits, a yellow highlight row offers `L` to switch it to paste mode (Promise.race with the callback waiter, losing branch's timeout swallowed, client closed exactly once). Idle `L` starts a paste login directly.
parsePastedCallbackUrl (auth/oauth.ts): query-only parsing, copy-artifact tolerant (quotes/brackets, & entities), accepts both authCode and code params, strict CSRF state check.
runtime/paste-login.ts (new): banner instructions with a bracketed URL example using the real callback port (ANSI-free when piped) + readline with timeout. open-browser.ts: fix ENOENT crash on headless boxes (async spawn error had no listener).
Tests: 14 new cases (parser incl. authorize↔exchange redirect_uri round-trip, IO helpers). bun test 732 pass; bun x tsc --noEmit clean. README: headless/Docker login section, TUI key table, env var table.
Co-Authored-By: Claude Code <noreply@anthropic.com>
|`ZCODE_PROXY_CREDENTIAL_SECRET`| Encryption seed for the credential store (must match the seed used at `auth login`) |
361
391
|`ZCODE_PROXY_PORT`| Listen port (default `8080`) |
392
+
|`ZCODE_OAUTH_PASTE`| Set `1` for bigmodel paste-mode login inside the container (see [Headless / Docker Login](#headless--docker-login-paste-mode-bigmodel)) |
0 commit comments