Skip to content

feat: auth bootstrap --code for MCP→CLI local-execute handoff - #17

Merged
kody-bot merged 1 commit into
mainfrom
cursor/auth-bootstrap-code-8303
Oct 1, 2026
Merged

kody-bot merged 1 commit into
mainfrom
cursor/auth-bootstrap-code-8303

Conversation

@kentcdodds

Copy link
Copy Markdown
Owner

Intent

Implement kody-bot/cli#16: npx @kodycodes/cli auth bootstrap --code <kody_bc_…> so agents already on Kody MCP can seed CLI --local auth without a second OAuth or pasting kody_at_… into chat.

Platform contract: kentcdodds/kody#2818 / ADR 0056.

Summary

  • Add auth bootstrap --code → POST /v1/tokens/bootstrap/redeem with JSON { "code" } and no Authorization header
  • Persist the one-shot minted kody_at_… in a separate API-token store (keyring / 0600 file fallback), alongside kody login OAuth
  • Success output confirms storage (token id, scopes, backend) and never prints the full kody_at_
  • resolveLocalExecuteBearer priority: --token / KODY_API_TOKEN → stored bootstrap token → kody login OAuth → clear error (bootstrap → login → tokenCreate for CI)
  • logout / status cover the stored API token; docs + skill updated
  • No host MCP token scavenging (ADR 0053); kody login path unchanged

Testing

  • npm run validate
  • Unit tests: redeem (no Authorization), store, bearer priority, CLI success output redaction

How to exercise

# After MCP cliCredentialBootstrap → { bootstrap_code, cli_command }:
npx @kodycodes/cli auth bootstrap --code 'kody_bc_…'
npx @kodycodes/cli execute --local --code 'export default async () => ({ ok: true })'
npx @kodycodes/cli status   # shows stored API token id/scopes, not the secret
Open in Web Open in Cursor 

Redeem one-shot kody_bc_… codes via POST /v1/tokens/bootstrap/redeem
(no Authorization), store the minted kody_at_… for execute --local, and
prefer env/token → bootstrap store → kody login in bearer resolution.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kody-bot
kody-bot marked this pull request as ready for review October 1, 2026 23:02
@kentcdodds

Copy link
Copy Markdown
Owner Author

bugbot run

@cursor

cursor Bot commented Oct 1, 2026

Copy link
Copy Markdown

Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings.

@kody-bot
kody-bot merged commit 515db35 into main Oct 1, 2026
5 checks passed
@kody-bot
kody-bot deleted the cursor/auth-bootstrap-code-8303 branch October 1, 2026 23:03
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants