@kodycodes/cli 1.26.3 → 1.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +175 -167
- package/dist/add-mcp-install.d.ts +1 -1
- package/dist/api-token.d.ts +1 -1
- package/dist/{auth-4FW6GCLG.js → auth-6ZE6QQXA.js} +13 -8
- package/dist/auth-bootstrap.d.ts +1 -1
- package/dist/auth.d.ts +27 -3
- package/dist/bin.js +18 -18
- package/dist/capability-proxy.d.ts +1 -1
- package/dist/{chunk-64XN367G.js → chunk-2EQJQJA3.js} +66 -44
- package/dist/chunk-2EQJQJA3.js.map +6 -0
- package/dist/{chunk-D55XPY3T.js → chunk-2IHISXHN.js} +58 -27
- package/dist/chunk-2IHISXHN.js.map +6 -0
- package/dist/{chunk-SMURF26I.js → chunk-2XPH7L2P.js} +1 -1
- package/dist/chunk-2XPH7L2P.js.map +6 -0
- package/dist/{chunk-RM34N3KI.js → chunk-3H72XY5R.js} +16 -6
- package/dist/chunk-3H72XY5R.js.map +6 -0
- package/dist/{chunk-G4YN6XP5.js → chunk-4GIFJVGT.js} +1 -1
- package/dist/chunk-4GIFJVGT.js.map +6 -0
- package/dist/{chunk-R4IUV5P5.js → chunk-5JIRHJQP.js} +397 -45
- package/dist/chunk-5JIRHJQP.js.map +6 -0
- package/dist/{chunk-TIL35OWA.js → chunk-5YQBD7PN.js} +238 -146
- package/dist/chunk-5YQBD7PN.js.map +6 -0
- package/dist/chunk-5ZBJAP6G.js +2005 -0
- package/dist/chunk-5ZBJAP6G.js.map +6 -0
- package/dist/{chunk-6XQP5SWX.js → chunk-6ZYUGXVW.js} +1 -1
- package/dist/chunk-6ZYUGXVW.js.map +6 -0
- package/dist/{chunk-OVGXPRSY.js → chunk-7PRJ36I5.js} +4 -1
- package/dist/{chunk-OVGXPRSY.js.map → chunk-7PRJ36I5.js.map} +1 -1
- package/dist/{chunk-IHP6PV6X.js → chunk-BTL3PJ2H.js} +1 -12
- package/dist/chunk-BTL3PJ2H.js.map +6 -0
- package/dist/{chunk-VQS5YSCI.js → chunk-CPS7HW4T.js} +8 -6
- package/dist/{chunk-VQS5YSCI.js.map → chunk-CPS7HW4T.js.map} +1 -1
- package/dist/{chunk-BISUL7CE.js → chunk-DW5UTJ6T.js} +14 -5
- package/dist/chunk-DW5UTJ6T.js.map +6 -0
- package/dist/{target-3QHY7JT4.js → chunk-EJXEVGWF.js} +8 -6
- package/dist/chunk-EJXEVGWF.js.map +6 -0
- package/dist/{chunk-SXHULGL4.js → chunk-JOMBXQOS.js} +18 -9
- package/dist/chunk-JOMBXQOS.js.map +6 -0
- package/dist/{chunk-EOCV74B2.js → chunk-OZDWOZLV.js} +41 -25
- package/dist/chunk-OZDWOZLV.js.map +6 -0
- package/dist/{chunk-75RZUXQL.js → chunk-SLNAWWQK.js} +4 -2
- package/dist/{chunk-75RZUXQL.js.map → chunk-SLNAWWQK.js.map} +1 -1
- package/dist/{chunk-XDCOWU5R.js → chunk-SPEP3DUT.js} +64 -14
- package/dist/chunk-SPEP3DUT.js.map +6 -0
- package/dist/{chunk-64IM6G4Z.js → chunk-TUUFQYWP.js} +13 -6
- package/dist/chunk-TUUFQYWP.js.map +6 -0
- package/dist/{chunk-QHBCP4OB.js → chunk-UW6AWLXX.js} +6 -7
- package/dist/chunk-W2SAFAT4.js +1563 -0
- package/dist/chunk-W2SAFAT4.js.map +6 -0
- package/dist/{chunk-XOPPGRUP.js → chunk-WMROAVLX.js} +14 -6
- package/dist/chunk-WMROAVLX.js.map +6 -0
- package/dist/{chunk-BPGY4IE7.js → chunk-XV6D6HSG.js} +1 -1
- package/dist/chunk-XV6D6HSG.js.map +6 -0
- package/dist/{chunk-PDWCKWQF.js → chunk-YDWTXEKQ.js} +26 -10
- package/dist/chunk-YDWTXEKQ.js.map +6 -0
- package/dist/{chunk-JWEFKKAD.js → chunk-ZILB2HWE.js} +1 -1
- package/dist/chunk-ZILB2HWE.js.map +6 -0
- package/dist/cli.js +19 -19
- package/dist/defaults.d.ts +1 -1
- package/dist/detect-running-hosts.d.ts +1 -1
- package/dist/dev/dev-assets.d.ts +1 -1
- package/dist/dev/dev-registry.d.ts +1 -1
- package/dist/dev/error-page.d.ts +1 -1
- package/dist/dev/live-reload.d.ts +2 -2
- package/dist/{dev-command-3LX234N6.js → dev-command-TZ2EB4J3.js} +236 -111
- package/dist/dev-command-TZ2EB4J3.js.map +6 -0
- package/dist/dev-command.d.ts +1 -1
- package/dist/discover-login-identity.d.ts +6 -7
- package/dist/discover-org.d.ts +2 -3
- package/dist/generated/openapi-routes.d.ts +6 -0
- package/dist/{git-credential-FUE3JE3T.js → git-credential-INB2UV4C.js} +32 -25
- package/dist/git-credential-INB2UV4C.js.map +6 -0
- package/dist/{install-ZML2TCDG.js → install-ONEJRYZ3.js} +147 -113
- package/dist/install-ONEJRYZ3.js.map +6 -0
- package/dist/install.d.ts +1 -1
- package/dist/{local-execute-SZV6XN4T.js → local-execute-YCXHVAVM.js} +81 -54
- package/dist/local-execute-YCXHVAVM.js.map +6 -0
- package/dist/local-execute-auth.d.ts +2 -2
- package/dist/local-execute.d.ts +1 -1
- package/dist/local-gateway-fetch-forward.d.ts +2 -2
- package/dist/local-package-run-WZVZAHK3.js +23 -0
- package/dist/local-package-run.d.ts +2 -2
- package/dist/mock/ensure-msw.d.ts +9 -1
- package/dist/mock/load-package-mocks.d.ts +1 -2
- package/dist/mock/mock-fetch-gateway.d.ts +4 -5
- package/dist/mock/mock-supported.d.ts +1 -1
- package/dist/{mock-dep-resolve-TVABDNR7.js → mock-dep-resolve-B5ZH4U3H.js} +14 -6
- package/dist/mock-dep-resolve-B5ZH4U3H.js.map +6 -0
- package/dist/{mock-fetch-gateway-B5TFGGQS.js → mock-fetch-gateway-FWVNTLP2.js} +7 -6
- package/dist/{mock-local-deps-5SZT3PWT.js → mock-local-deps-2VVNJLFF.js} +20 -17
- package/dist/mock-local-deps-2VVNJLFF.js.map +6 -0
- package/dist/mock-local-deps.d.ts +1 -1
- package/dist/{mock-server-SV2IKC4I.js → mock-server-6BWDQQBE.js} +8 -7
- package/dist/oauth-browser.d.ts +42 -0
- package/dist/oauth-provider.d.ts +14 -19
- package/dist/{open-api-client-DVVMLY7P.js → open-api-client-SR4B7265.js} +11 -10
- package/dist/open-api-client.d.ts +2 -1
- package/dist/{org-X7B5BI4R.js → org-535LB4PD.js} +8 -6
- package/dist/org-535LB4PD.js.map +6 -0
- package/dist/org-resolve.d.ts +2 -0
- package/dist/package-app-dev.d.ts +2 -2
- package/dist/{package-manifest-QH2RU64C.js → package-manifest-DFF6XCPV.js} +5 -4
- package/dist/{remote-execute-QMQDVHOY.js → remote-execute-JN6DRFEU.js} +49 -30
- package/dist/remote-execute-JN6DRFEU.js.map +6 -0
- package/dist/remote-execute.d.ts +3 -3
- package/dist/{setup-git-5KCUBYPB.js → setup-git-MHK563LB.js} +11 -12
- package/dist/setup-git.d.ts +1 -1
- package/dist/{skill-ENPATRIW.js → skill-D74XVI6T.js} +26 -8
- package/dist/skill-D74XVI6T.js.map +6 -0
- package/dist/{store-WTMRH527.js → store-27J4CQZ2.js} +4 -4
- package/dist/{structured-error-C65GQ53Z.js → structured-error-5MLWXYR3.js} +4 -3
- package/dist/structured-error.d.ts +1 -1
- package/dist/target-33ATHDUF.js +17 -0
- package/package.json +6 -5
- package/skills/kody/SKILL.md +53 -50
- package/dist/chunk-4D6ORNXY.js +0 -24404
- package/dist/chunk-4D6ORNXY.js.map +0 -6
- package/dist/chunk-64IM6G4Z.js.map +0 -6
- package/dist/chunk-64XN367G.js.map +0 -6
- package/dist/chunk-6XQP5SWX.js.map +0 -6
- package/dist/chunk-BISUL7CE.js.map +0 -6
- package/dist/chunk-BPGY4IE7.js.map +0 -6
- package/dist/chunk-D55XPY3T.js.map +0 -6
- package/dist/chunk-EOCV74B2.js.map +0 -6
- package/dist/chunk-FBVNFWR6.js +0 -437
- package/dist/chunk-FBVNFWR6.js.map +0 -6
- package/dist/chunk-G4YN6XP5.js.map +0 -6
- package/dist/chunk-G6LJWROP.js +0 -18
- package/dist/chunk-G6LJWROP.js.map +0 -6
- package/dist/chunk-IHP6PV6X.js.map +0 -6
- package/dist/chunk-JWEFKKAD.js.map +0 -6
- package/dist/chunk-LWNB26KO.js +0 -147
- package/dist/chunk-LWNB26KO.js.map +0 -6
- package/dist/chunk-PDWCKWQF.js.map +0 -6
- package/dist/chunk-R4IUV5P5.js.map +0 -6
- package/dist/chunk-RM34N3KI.js.map +0 -6
- package/dist/chunk-RTWUNV76.js +0 -309
- package/dist/chunk-RTWUNV76.js.map +0 -6
- package/dist/chunk-SMURF26I.js.map +0 -6
- package/dist/chunk-SXHULGL4.js.map +0 -6
- package/dist/chunk-TIL35OWA.js.map +0 -6
- package/dist/chunk-XDCOWU5R.js.map +0 -6
- package/dist/chunk-XOPPGRUP.js.map +0 -6
- package/dist/dev-command-3LX234N6.js.map +0 -6
- package/dist/git-credential-FUE3JE3T.js.map +0 -6
- package/dist/install-ZML2TCDG.js.map +0 -6
- package/dist/local-execute-SZV6XN4T.js.map +0 -6
- package/dist/local-package-run-2TMCAZZ2.js +0 -23
- package/dist/mcp-G2AWTIXR.js +0 -21
- package/dist/mcp.d.ts +0 -34
- package/dist/mock-dep-resolve-TVABDNR7.js.map +0 -6
- package/dist/mock-local-deps-5SZT3PWT.js.map +0 -6
- package/dist/org-X7B5BI4R.js.map +0 -6
- package/dist/remote-execute-QMQDVHOY.js.map +0 -6
- package/dist/skill-ENPATRIW.js.map +0 -6
- package/dist/target-3QHY7JT4.js.map +0 -6
- package/dist/webapi-NTVP4BO3.js +0 -2482
- package/dist/webapi-NTVP4BO3.js.map +0 -6
- /package/dist/{auth-4FW6GCLG.js.map → auth-6ZE6QQXA.js.map} +0 -0
- /package/dist/{chunk-QHBCP4OB.js.map → chunk-UW6AWLXX.js.map} +0 -0
- /package/dist/{local-package-run-2TMCAZZ2.js.map → local-package-run-WZVZAHK3.js.map} +0 -0
- /package/dist/{mcp-G2AWTIXR.js.map → mock-fetch-gateway-FWVNTLP2.js.map} +0 -0
- /package/dist/{mock-fetch-gateway-B5TFGGQS.js.map → mock-server-6BWDQQBE.js.map} +0 -0
- /package/dist/{mock-server-SV2IKC4I.js.map → open-api-client-SR4B7265.js.map} +0 -0
- /package/dist/{open-api-client-DVVMLY7P.js.map → package-manifest-DFF6XCPV.js.map} +0 -0
- /package/dist/{package-manifest-QH2RU64C.js.map → setup-git-MHK563LB.js.map} +0 -0
- /package/dist/{setup-git-5KCUBYPB.js.map → store-27J4CQZ2.js.map} +0 -0
- /package/dist/{store-WTMRH527.js.map → structured-error-5MLWXYR3.js.map} +0 -0
- /package/dist/{structured-error-C65GQ53Z.js.map → target-33ATHDUF.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# @kodycodes/cli
|
|
2
2
|
|
|
3
|
-
Install [Kody](https://kody.codes) as a remote MCP server in local agents
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Install [Kody](https://kody.codes) as a remote MCP server in local agents, and
|
|
4
|
+
call Kody's Open API from the terminal. `kody login` uses Client ID Metadata
|
|
5
|
+
Documents (SEP-991) once, then stores a `kody_at_…` device token.
|
|
6
6
|
|
|
7
|
-
**Long term, use Kody through the host MCP connection** — `search` and
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
**Long term, use Kody through the host MCP connection** — `search` and `execute`
|
|
8
|
+
in Cursor, Claude Code, or another client. This CLI writes that config. Keep
|
|
9
|
+
`kody login` / `kody search` / `kody execute` for bootstrap, scripts, or hosts
|
|
10
|
+
that cannot run MCP.
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
13
|
npx @kodycodes/cli install
|
|
@@ -25,8 +25,9 @@ npx @kodycodes/cli install
|
|
|
25
25
|
`kody install` lists **running local** agents (Cursor, Claude Desktop, VS Code,
|
|
26
26
|
Goose, Claude Code, Codex, Windsurf, Zed, and similar) and writes each host's
|
|
27
27
|
remote MCP entry for `https://kody.codes/mcp`. Common host formats go through
|
|
28
|
-
[`add-mcp`](https://www.npmjs.com/package/add-mcp). It does not list web
|
|
29
|
-
For ChatGPT, Claude.ai, and Grok, use
|
|
28
|
+
[`add-mcp`](https://www.npmjs.com/package/add-mcp). It does not list web
|
|
29
|
+
clients. For ChatGPT, Claude.ai, and Grok, use
|
|
30
|
+
[kody.codes/onboarding](https://kody.codes/onboarding).
|
|
30
31
|
|
|
31
32
|
After install, the CLI prints a prompt you can paste into the configured agent
|
|
32
33
|
to continue onboarding. Host OAuth stays in that client — `kody login` is only
|
|
@@ -43,8 +44,8 @@ also tells the agent to prefer the MCP server over the CLI.
|
|
|
43
44
|
|
|
44
45
|
## CLI as a local client
|
|
45
46
|
|
|
46
|
-
Optional. Use when you need a scripted or headless client instead of a host
|
|
47
|
-
|
|
47
|
+
Optional. Use when you need a scripted or headless client instead of a host MCP
|
|
48
|
+
connection.
|
|
48
49
|
|
|
49
50
|
```bash
|
|
50
51
|
npm install -g @kodycodes/cli
|
|
@@ -57,38 +58,38 @@ kody execute --org acme … # one-shot org override (also: KODY_ORG=acme)
|
|
|
57
58
|
|
|
58
59
|
Or run via `npx @kodycodes/cli` without a global install.
|
|
59
60
|
|
|
60
|
-
Each `kody login` adds an org (chosen in the browser, or via `--org`).
|
|
61
|
-
into an org that is already stored replaces only that org's
|
|
62
|
-
commands (`execute`, `search`, `whoami`, `api`, …) take
|
|
63
|
-
`KODY_ORG` (flag wins, then env, then the active org).
|
|
64
|
-
active org; `kody logout --org <slug>` removes one
|
|
65
|
-
(`kody auth setup-git` once covers every repo
|
|
66
|
-
keychain credentials migrate silently into the
|
|
67
|
-
(no re-login).
|
|
61
|
+
Each `kody login` adds an org (chosen in the browser, or via `--org`).
|
|
62
|
+
Re-logging into an org that is already stored replaces only that org's
|
|
63
|
+
credential. Org-scoped commands (`execute`, `search`, `whoami`, `api`, …) take
|
|
64
|
+
`--org <slug>` or `KODY_ORG` (flag wins, then env, then the active org).
|
|
65
|
+
`kody logout` removes the active org; `kody logout --org <slug>` removes one
|
|
66
|
+
org. Git auth stays user-wide (`kody auth setup-git` once covers every repo
|
|
67
|
+
across orgs). Existing single-org keychain credentials migrate silently into the
|
|
68
|
+
multi-org store as the active org (no re-login).
|
|
68
69
|
|
|
69
70
|
## Commands
|
|
70
71
|
|
|
71
|
-
| Command
|
|
72
|
-
|
|
|
73
|
-
| `kody install`
|
|
74
|
-
| `kody skill install`
|
|
75
|
-
| `kody login`
|
|
76
|
-
| `kody org list`
|
|
77
|
-
| `kody org use [<slug>]`
|
|
78
|
-
| `kody logout`
|
|
79
|
-
| `kody status`
|
|
80
|
-
| `kody auth bootstrap --code`
|
|
81
|
-
| `kody auth bootstrap --scopes`
|
|
82
|
-
| `kody auth setup-git`
|
|
83
|
-
| `kody auth remove-git`
|
|
84
|
-
| `kody git-credential`
|
|
85
|
-
| `kody whoami`
|
|
86
|
-
| `kody search [query]`
|
|
87
|
-
| `kody api <operationId>`
|
|
88
|
-
| `kody package publish`
|
|
89
|
-
| `kody package collaborators` / `grant` / `revoke` | Who can use one package, and add or remove teams and members of the org (`--org`). `<package>` is `@owner/leaf`, the kody id, or the package id. `grant <package> --team <slug>\|--user <username> [--preset use\|contribute\|manage]` (default `use`) adds or changes a collaborator via `packageCollaboratorSet`; people outside the org are refused. `revoke <package> --team\|--user\|--grant <grant_id>` removes one via `packageCollaboratorRemove`. Needs Manage on the package and a token with `package:manage_access` (`auth bootstrap --scopes …,package:manage_access`). Prints a summary, or JSON with `--json`.
|
|
90
|
-
| `kody execute`
|
|
91
|
-
| `kody dev`
|
|
72
|
+
| Command | Purpose |
|
|
73
|
+
| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
74
|
+
| `kody install` | Detect running local MCP clients, write their config, and start host OAuth. **Recommended long-term path.** |
|
|
75
|
+
| `kody skill install` | Copies the getting-started skill into Claude Code / Cursor / Agents. |
|
|
76
|
+
| `kody login` | Browser OAuth (CIMD + PKCE) for the CLI itself. Adds/replaces one org login (browser picker, or `kody login --org acme`) and keeps other org logins. |
|
|
77
|
+
| `kody org list` | Lists logged-in orgs and marks the active one. `--json` for agents. |
|
|
78
|
+
| `kody org use [<slug>]` | Switches the active org. With a slug (agents) switches directly; with no slug on a TTY opens a chooser; without a TTY pass a slug. |
|
|
79
|
+
| `kody logout` | Removes the active org login (or `--org <slug>` for one org) and clears a stored bootstrap/API token when appropriate. |
|
|
80
|
+
| `kody status` | Shows CLI login / stored API token state without printing secrets. |
|
|
81
|
+
| `kody auth bootstrap --code` | Redeems a one-shot `kody_bc_…` from MCP `cliCredentialBootstrap` and stores the resulting `kody_at_…` for `execute --local` (never prints the token). |
|
|
82
|
+
| `kody auth bootstrap --scopes` | Opt-in extra scopes: mints the code itself by passing `scopes` to `cliCredentialBootstrap` (with `--token`, else the `kody login` session, else a stored token), then redeems and stores it. See [Opt-in scopes](#opt-in-scopes). |
|
|
83
|
+
| `kody auth setup-git` | Installs a Git credential helper for `https://kody.codes/@owner/name.git` (persistent `kody_at_…`, user-owned token with `package:read`/`package:write`). See [Git HTTPS](#git-https-setup-git). |
|
|
84
|
+
| `kody auth remove-git` | Inverse of `setup-git`: clears Kody HTTPS git helpers, revokes the stored API token, deletes it from the keychain. Leaves `kody login` alone. |
|
|
85
|
+
| `kody git-credential` | Credential helper invoked by Git after `setup-git` (`get` / `store` / `erase`). |
|
|
86
|
+
| `kody whoami` | Confirms the CLI MCP connection and lists tools. With a scoped API token (and no login), shows token identity via the Open API. |
|
|
87
|
+
| `kody search [query]` | Calls Kody `search` from the CLI (prefer the host MCP tool). Token-only auth uses Open API `GET /v1/search`. |
|
|
88
|
+
| `kody api <operationId>` | Thin Open API wrapper matching the MCP `api` tool: `operationId` + flat `--params` JSON. Auth: `--token` / `KODY_API_TOKEN` / stored `auth bootstrap` token. The parsed `/openapi.json` route map is cached under the Kody cache dir keyed by the document's `ETag` and revalidated with `If-None-Match` on each run. |
|
|
89
|
+
| `kody package publish` | Thin wrapper for `packagePublishExternalPush`. Optional positional `@owner/leaf`, bare leaf name, or package UUID (names are resolved to the package UUID via `packageList`); extra fields via `--params`. Same auth as `kody api`. |
|
|
90
|
+
| `kody package collaborators` / `grant` / `revoke` | Who can use one package, and add or remove teams and members of the org (`--org`). `<package>` is `@owner/leaf`, the kody id, or the package id. `grant <package> --team <slug>\|--user <username> [--preset use\|contribute\|manage]` (default `use`) adds or changes a collaborator via `packageCollaboratorSet`; people outside the org are refused. `revoke <package> --team\|--user\|--grant <grant_id>` removes one via `packageCollaboratorRemove`. Needs Manage on the package and a token with `package:manage_access` (`auth bootstrap --scopes …,package:manage_access`). Prints a summary, or JSON with `--json`. |
|
|
91
|
+
| `kody execute` | Calls Kody `execute` from the CLI (`--invoke`, `--code`, `--file`, or stdin via `--file -`). With a scoped API token and no login (or with `--token`), cloud execute goes through CapabilityProxy → `kody.execute` — no `kody login`. Add `--local` to run the module (and static `kody:@…` package modules) on this machine instead. `--credential key=name` (repeatable; `org:name` / `personal:name` / empty `=` for none) picks ADR 0068 credentials for `--local` or a `kody login` MCP session. `--allow-private-network` opts local execution into private and local network access. `--target prod\|mock` (default `prod`) sends CapabilityProxy / search hops to prod or the built-in CLI mock; `--target mock` implies local workerd. |
|
|
92
|
+
| `kody dev` | Local testing for unpublished packages. Serves `kody.app.entry` on localhost via workerd with hot reload. Subcommands: `fetch`, `job`, `webhook`, `emit`, `check`. Default `--target mock` (scratch storage, fake credentials). Covers exports, webhooks, schedules (run-once), and subscriptions. See [Local package testing](#local-package-testing-kody-dev). |
|
|
92
93
|
|
|
93
94
|
`--json` prints structured MCP results.
|
|
94
95
|
|
|
@@ -99,9 +100,9 @@ Agents already on Kody MCP should prefer `cliCredentialBootstrap` →
|
|
|
99
100
|
CLI store without pasting `kody_at_…` into chat. Interactive humans can use
|
|
100
101
|
`kody login`. Scoped API tokens (`kody_at_…`, from bootstrap redeem,
|
|
101
102
|
`tokenCreate`, or `POST /v1/tokens`) authenticate the Open API and
|
|
102
|
-
CapabilityProxy. They never replace MCP OAuth on `/mcp`. The CLI uses that
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
CapabilityProxy. They never replace MCP OAuth on `/mcp`. The CLI uses that token
|
|
104
|
+
path when you pass `--token` / `KODY_API_TOKEN` and are not logged in (or when
|
|
105
|
+
you pass `--token` explicitly):
|
|
105
106
|
|
|
106
107
|
```bash
|
|
107
108
|
# Preferred for agents on MCP (no tokenCreate, no second OAuth):
|
|
@@ -123,22 +124,22 @@ npx @kodycodes/cli api usageGet --params '{}'
|
|
|
123
124
|
`cliCredentialBootstrap` → `auth bootstrap`, then `kody login`, then
|
|
124
125
|
`tokenCreate` for CI/headless (`--token` / `KODY_API_TOKEN`).
|
|
125
126
|
- For `execute --local` specifically: `--token` / `KODY_API_TOKEN` wins when
|
|
126
|
-
set; else a stored bootstrap/API token from `auth bootstrap`; else the
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
set; else a stored bootstrap/API token from `auth bootstrap`; else the stored
|
|
128
|
+
`kody login` OAuth access token as Bearer only when the API and MCP URLs are
|
|
129
|
+
paired (no under-the-hood `tokenCreate`). The default pair is
|
|
129
130
|
`https://api.kody.codes` and `https://kody.codes/mcp`; preview workers pair
|
|
130
|
-
when the API worker name adds `-api`, and loopback hosts pair at any port.
|
|
131
|
-
|
|
131
|
+
when the API worker name adds `-api`, and loopback hosts pair at any port. For
|
|
132
|
+
a different API origin, use `auth bootstrap --api-url <origin>` or set
|
|
132
133
|
`KODY_API_TOKEN`. The Open API must accept that OAuth bearer on
|
|
133
134
|
CapabilityProxy / package-graph
|
|
134
135
|
([kentcdodds/kody#2812](https://github.com/kentcdodds/kody/issues/2812));
|
|
135
136
|
until then use bootstrap or a scoped `kody_at_…` token.
|
|
136
137
|
- Wrong/expired token → 401 with a mint-fresh-token message (or the OAuth
|
|
137
138
|
platform-gap message when the bearer is login OAuth).
|
|
138
|
-
- Wrong scopes → the error names the missing scope and the exact command to
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
- Wrong scopes → the error names the missing scope and the exact command to mint
|
|
140
|
+
a token that adds it (see [Opt-in scopes](#opt-in-scopes)). When your org role
|
|
141
|
+
lacks the permission, it says so instead: a new token cannot add it, and an
|
|
142
|
+
org Owner has to grant it.
|
|
142
143
|
- Account flag off → the error includes `feature_disabled` and the
|
|
143
144
|
`local-execute` feature flag. Another token does not bypass that flag.
|
|
144
145
|
- Prefer the env var so the token stays out of shell history and `ps`.
|
|
@@ -164,10 +165,9 @@ npx @kodycodes/cli auth bootstrap --code 'kody_bc_…' --lifetime short
|
|
|
164
165
|
`--token` when given, else the `kody login` session, else `KODY_API_TOKEN` /
|
|
165
166
|
the stored token. A token can only mint scopes it already holds.
|
|
166
167
|
- A bootstrap code's scopes are fixed when it is minted, so `--code` with
|
|
167
|
-
`--scopes` is an error that prints the matching `cliCredentialBootstrap`
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
(your current scopes plus the missing one), so you can copy one and retry.
|
|
168
|
+
`--scopes` is an error that prints the matching `cliCredentialBootstrap` call.
|
|
169
|
+
- `insufficient_scope` errors print both commands with the full scope list (your
|
|
170
|
+
current scopes plus the missing one), so you can copy one and retry.
|
|
171
171
|
|
|
172
172
|
## Git HTTPS (`setup-git`)
|
|
173
173
|
|
|
@@ -185,15 +185,15 @@ git clone https://kody.codes/@owner/name.git
|
|
|
185
185
|
user-owned `kody_at_…` with `package:read` and `package:write` (default
|
|
186
186
|
`--lifetime long`; reuses a suitable stored token). That one credential
|
|
187
187
|
authorizes every `@owner/name.git` you can access across all orgs — login
|
|
188
|
-
`--org` only scopes the MCP mint session, not git. When an API token is
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
188
|
+
`--org` only scopes the MCP mint session, not git. When an API token is already
|
|
189
|
+
stored it probes `org_binding` on `GET /v1/tokens/current`; after a fresh login
|
|
190
|
+
with no API token yet, it mints via the login session and checks `org_binding`
|
|
191
|
+
on the minted token. Configures a **stable** credential helper (global `kody`
|
|
192
|
+
only when that install's version supports `git-credential`, otherwise
|
|
193
|
+
`npx -y @kodycodes/cli@<exact-version> …` — never a major-only `@1` range that
|
|
194
|
+
can reuse a stale npx cache, and never an ephemeral `~/.npm/_npx/…` path).
|
|
195
|
+
Re-running `setup-git` rewrites stale helper entries; every CLI command also
|
|
196
|
+
refreshes an outdated pin silently.
|
|
197
197
|
|
|
198
198
|
```bash
|
|
199
199
|
git config --global credential.https://kody.codes.helper '!… git-credential'
|
|
@@ -209,14 +209,14 @@ Push moves live HEAD only (packages do not auto-publish). Existing `kody login`
|
|
|
209
209
|
|
|
210
210
|
## Local package testing (`kody dev`)
|
|
211
211
|
|
|
212
|
-
Test an unpublished package (app, exports, jobs, webhooks, subscriptions)
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
Test an unpublished package (app, exports, jobs, webhooks, subscriptions) before
|
|
213
|
+
publish. Bundling reuses the same esbuild path as `execute --file` / publish
|
|
214
|
+
(`local-bundle.ts`). One shared flag:
|
|
215
215
|
|
|
216
|
-
| Command
|
|
217
|
-
|
|
|
218
|
-
| `kody dev`
|
|
219
|
-
| `execute` / `search` | Real capabilities, storage, secrets
|
|
216
|
+
| Command | `--target prod` (default for execute/search) | `--target mock` (default for `kody dev`) |
|
|
217
|
+
| -------------------- | -------------------------------------------- | ------------------------------------------------- |
|
|
218
|
+
| `kody dev` | Local app against real Kody | Local app against the CLI mock |
|
|
219
|
+
| `execute` / `search` | Real capabilities, storage, secrets | Mock catalog / scratch storage / fake credentials |
|
|
220
220
|
|
|
221
221
|
The mock is built into the CLI (no kody-celld). It refuses unimplemented routes
|
|
222
222
|
with `not_implemented_in_mock` rather than faking success. `--reset-storage`
|
|
@@ -256,55 +256,62 @@ kody search --target mock local
|
|
|
256
256
|
The last good build does not keep answering `200`.
|
|
257
257
|
- **Runtime errors**: an uncaught throw from the fetch handler returns a
|
|
258
258
|
dev-only `500` page with the stack mapped back to your `.ts` sources
|
|
259
|
-
(`x-kody-dev-error: runtime`). Runtime wrapper and native frames are
|
|
260
|
-
|
|
259
|
+
(`x-kody-dev-error: runtime`). Runtime wrapper and native frames are dropped.
|
|
260
|
+
The terminal prints the same stack.
|
|
261
261
|
- **Logs**: app `console.*` output streams to the terminal tagged with the
|
|
262
262
|
request, e.g. `[GET /scores #12] saved 3 rows`. `warn` and `error` go to
|
|
263
263
|
stderr.
|
|
264
264
|
- **Live reload** (on by default; `--no-live-reload` turns it off): HTML
|
|
265
|
-
responses get a small `<script>` that listens on
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
`kody.app.client` is bundled for the browser and served at
|
|
265
|
+
responses get a small `<script>` that listens on `/__kody/dev/events`
|
|
266
|
+
(server-sent events). The page reloads after each swap to a new build. Build
|
|
267
|
+
errors, and runtime errors from the page's own `fetch` calls, show an overlay;
|
|
268
|
+
the page reloads on the next good build. There is no HMR. Only requests that
|
|
269
|
+
accept `text/html` (browser page loads) get the script; compressed HTML, agent
|
|
270
|
+
requests, and `kody dev fetch` responses are left untouched.
|
|
271
|
+
- **Fast rebuilds.** File events are debounced for 30ms, and esbuild reuses an
|
|
272
|
+
incremental context, so a save usually serves the new code in about 60ms on a
|
|
273
|
+
small app.
|
|
274
|
+
- **Ports.** Each package gets a stable default port in 4100–4999 (derived from
|
|
275
|
+
`kody.id`), so URLs survive restarts. If it is taken, `kody dev` moves to the
|
|
276
|
+
next free port. An explicit `--port <n>` is used exactly and fails with a fix
|
|
277
|
+
when the port is busy (`--port 0` picks any free port). Starting a second
|
|
278
|
+
`kody dev` for the same package and target without `--port` fails and names
|
|
279
|
+
the running server's URL and pid.
|
|
280
|
+
- **Client bundle and assets**, same URLs as a published app: `kody.app.client`
|
|
281
|
+
is bundled for the browser and served at
|
|
283
282
|
`<appBasePath>/_assets/client.<hash>.js` (inline source map;
|
|
284
|
-
`client.externals` stay bare imports). `packageContext.clientModuleUrl`
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
- **Prebuild**: `kody.dev.prebuild` runs a shell command from the package
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
283
|
+
`client.externals` stay bare imports). `packageContext.clientModuleUrl` points
|
|
284
|
+
at it, and `/_assets/__version.json` reports it. Files in `kody.app.assets`
|
|
285
|
+
are served under `/_assets/`. Both are `no-store` and rebuild on save; editing
|
|
286
|
+
an asset reloads open pages.
|
|
287
|
+
- **Prebuild**: `kody.dev.prebuild` runs a shell command from the package root
|
|
288
|
+
before every build (with `KODY_DEV=1`), for generated CSS, icons, or data
|
|
289
|
+
files. Its output is tagged `[prebuild]`. A non-zero exit is shown as a build
|
|
290
|
+
error. File changes made while it runs do not trigger another build.
|
|
292
291
|
`kody.dev.ignore` lists root-relative path prefixes the watcher skips:
|
|
293
292
|
|
|
294
293
|
```json
|
|
295
294
|
{
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
295
|
+
"kody": {
|
|
296
|
+
"app": {
|
|
297
|
+
"entry": "./app/router.ts",
|
|
298
|
+
"client": "./app/client.ts",
|
|
299
|
+
"assets": "./public"
|
|
300
|
+
},
|
|
301
|
+
"dev": {
|
|
302
|
+
"prebuild": "node scripts/build-css.mjs",
|
|
303
|
+
"ignore": ["public/generated"]
|
|
304
|
+
}
|
|
305
|
+
}
|
|
300
306
|
}
|
|
301
307
|
```
|
|
302
308
|
|
|
303
309
|
`kody.dev` only affects `kody dev`; publish ignores it.
|
|
310
|
+
|
|
304
311
|
- **Cleanup**: Ctrl-C, `SIGTERM`, and `SIGHUP` stop workerd and remove the
|
|
305
312
|
`kody-dev-*` temp dir. If the CLI is killed outright, a small reaper process
|
|
306
|
-
does the same. Each start also sweeps dirs and orphaned workerd processes
|
|
307
|
-
|
|
313
|
+
does the same. Each start also sweeps dirs and orphaned workerd processes left
|
|
314
|
+
behind by dead CLI runs, including older CLI versions.
|
|
308
315
|
|
|
309
316
|
### Driving `kody dev` from an agent
|
|
310
317
|
|
|
@@ -314,8 +321,8 @@ curl -s http://127.0.0.1:<port>/__kody/dev/status
|
|
|
314
321
|
kody dev fetch /scores # reuses the running server
|
|
315
322
|
```
|
|
316
323
|
|
|
317
|
-
- `--json` prints one JSON object per line on stdout, each with a `type` and
|
|
318
|
-
|
|
324
|
+
- `--json` prints one JSON object per line on stdout, each with a `type` and an
|
|
325
|
+
ISO `ts`:
|
|
319
326
|
- `ready`: `url`, `port`, `basePath`, `pid`, `statusUrl`, `buildId`
|
|
320
327
|
- `rebuild_start`: `files`
|
|
321
328
|
- `rebuild_ok`: `ms`, `buildId`, `restarted`
|
|
@@ -324,10 +331,11 @@ kody dev fetch /scores # reuses the running server
|
|
|
324
331
|
- `log`: `source`, `level`, `message`, `request`
|
|
325
332
|
|
|
326
333
|
Status lines stay on stderr.
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
`
|
|
330
|
-
|
|
334
|
+
|
|
335
|
+
- `GET /__kody/dev/status` returns
|
|
336
|
+
`{ ok, state, buildId, url, port, basePath, target, package, pid, lastRebuild, lastError }`.
|
|
337
|
+
`state` is one of `starting`, `building`, `ready`, or `build_error`.
|
|
338
|
+
`lastError` holds the current build error or the most recent runtime error.
|
|
331
339
|
- `--ready-file <path>` writes `{ url, port, basePath, pid, statusUrl }` once
|
|
332
340
|
the first build settles, and deletes the file on exit.
|
|
333
341
|
- `kody dev fetch` attaches to a running `kody dev` for the same package and
|
|
@@ -338,10 +346,10 @@ kody dev fetch /scores # reuses the running server
|
|
|
338
346
|
|
|
339
347
|
## Local execute
|
|
340
348
|
|
|
341
|
-
`kody execute --local` runs the same execute module (default export called
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
349
|
+
`kody execute --local` runs the same execute module (default export called with
|
|
350
|
+
`--params`) on this machine instead of in Kody's cloud sandbox. Local CPU is
|
|
351
|
+
free; every `kody:runtime` call (`kody.*`, `kody.mcp.*`, `workflows.create`) is
|
|
352
|
+
proxied to Kody's CapabilityProxy and metered like a cloud hop. Static
|
|
345
353
|
`kody:@scope/package/export` imports are **resolved into the local workerd
|
|
346
354
|
bundle** via `POST /v1/local-execute/package-graph` (same Bearer as
|
|
347
355
|
CapabilityProxy — never hosted MCP `execute`, and never a whole-module
|
|
@@ -371,67 +379,65 @@ npx @kodycodes/cli execute --local --invoke kody:@scope/pkg/export --params '{"n
|
|
|
371
379
|
|
|
372
380
|
- **Auth:** `--token` / `KODY_API_TOKEN` when set; else stored `auth bootstrap`
|
|
373
381
|
API token; else a valid `kody login` session (OAuth access token as Bearer —
|
|
374
|
-
never printed, never exchanged via `tokenCreate`). Prefer the env var for
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
[kentcdodds/kody#2812](https://github.com/kentcdodds/kody/issues/2812)
|
|
379
|
-
|
|
380
|
-
|
|
382
|
+
never printed, never exchanged via `tokenCreate`). Prefer the env var for API
|
|
383
|
+
tokens so they stay out of shell history and `ps`. The bearer stays in the CLI
|
|
384
|
+
process; the sandbox only talks to a loopback bridge. Host MCP OAuth from
|
|
385
|
+
other clients is never read. Until
|
|
386
|
+
[kentcdodds/kody#2812](https://github.com/kentcdodds/kody/issues/2812) ships,
|
|
387
|
+
login-only Bearer is rejected by the Open API — use bootstrap or a `kody_at_…`
|
|
388
|
+
token in that case.
|
|
381
389
|
- **Node.js:** 22 or newer (`package.json` `engines` is `>=22`). Older Node
|
|
382
390
|
fails immediately with that requirement, before workerd is downloaded or
|
|
383
391
|
started.
|
|
384
|
-
- **Bundling:** `--file` entries are bundled with esbuild before workerd
|
|
385
|
-
|
|
386
|
-
`
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
392
|
+
- **Bundling:** `--file` entries are bundled with esbuild before workerd loads
|
|
393
|
+
`main.js` (relative local imports and bare npm packages from `node_modules`;
|
|
394
|
+
`kody:*` stays external for package-graph / runtime). That matches hosted
|
|
395
|
+
execute and publish. Unresolvable imports fail with a clear bundle error
|
|
396
|
+
before any network call. `--code` and stdin (`--file -`) are left as written
|
|
397
|
+
(no filesystem graph to follow).
|
|
390
398
|
- **Runtime:** a pinned [workerd](https://github.com/cloudflare/workerd)
|
|
391
399
|
release, downloaded once from GitHub, sha256-verified, and cached under
|
|
392
|
-
`~/.cache/kody` (Linux, or `$XDG_CACHE_HOME/kody`) or
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
to override). The CLI calls `POST /v1/local-execute/package-graph` before
|
|
400
|
+
`~/.cache/kody` (Linux, or `$XDG_CACHE_HOME/kody`) or `~/Library/Caches/kody`
|
|
401
|
+
(macOS). Override with `KODY_CACHE_DIR`, or point `KODY_WORKERD_PATH` at your
|
|
402
|
+
own binary. No Docker required. Linux and macOS (x64/arm64) only for now.
|
|
403
|
+
- **API:** `https://api.kody.codes` by default (`--api-url` or `KODY_API_URL` to
|
|
404
|
+
override). The CLI calls `POST /v1/local-execute/package-graph` before
|
|
398
405
|
starting workerd (it authenticates the bearer and, when the module imports
|
|
399
406
|
`kody:@…`, downloads stamped package modules for local embedding,
|
|
400
407
|
[platform issue](https://github.com/kentcdodds/kody/issues/2808)) and
|
|
401
408
|
`POST /v1/capability-proxy/call` with `{ path, args, conversationId? }` for
|
|
402
|
-
each runtime call.
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
- **Errors:** an expired/revoked token or an account without the
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
409
|
+
each runtime call. CapabilityProxy requests go through Node's own
|
|
410
|
+
`node:http(s)` client with one keep-alive connection and a 7-minute idle limit
|
|
411
|
+
for headers and body chunks. Origin's 5-minute deadline for a `fetch` with
|
|
412
|
+
`{{secret:…}}` placeholders ends that call first, with its own error. Node's
|
|
413
|
+
default 300-second fetch limit no longer cuts it short. With
|
|
414
|
+
`NODE_USE_ENV_PROXY=1` or `--use-env-proxy`, these requests honor `HTTP_PROXY`
|
|
415
|
+
/ `HTTPS_PROXY` / `NO_PROXY` like Node's own fetch (Node 22.21 / 24.5 or
|
|
416
|
+
later; older Node fails with a clear error instead of silently bypassing the
|
|
417
|
+
proxy). A PR preview's API host is
|
|
418
|
+
`https://kody-pr-<n>-api.<subdomain>.workers.dev`; the app origin
|
|
419
|
+
(`kody-pr-<n>`) answers `/v1/*` with an HTML 404.
|
|
420
|
+
- **Errors:** an expired/revoked token or an account without the `local-execute`
|
|
421
|
+
flag fails fast with a clear message before any code runs. The token is only
|
|
422
|
+
sent over https (plain http is allowed for localhost). A non-JSON error body,
|
|
423
|
+
such as an HTML page from the wrong `--api-url`, is shortened to its title or
|
|
424
|
+
a 200-character excerpt plus its size. Missing package-graph API, unresolved
|
|
425
|
+
imports, or missing artifacts fail clearly — there is **no silent fallback**
|
|
426
|
+
to cloud `kody.execute`.
|
|
420
427
|
- **Lifetime:** no execution time limit locally; Ctrl-C (or SIGTERM) stops
|
|
421
428
|
workerd and removes the temporary module.
|
|
422
429
|
- **Saved packages:** `import { … } from 'kody:@owner/name/export'` under
|
|
423
430
|
`--local` keeps the user module + package graph in local workerd. Local
|
|
424
|
-
package CPU is not billed as a full cloud execute of the user module;
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
`
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
available either way.
|
|
431
|
+
package CPU is not billed as a full cloud execute of the user module; per-call
|
|
432
|
+
CapabilityProxy hops (and whatever the package-graph prep call meters once
|
|
433
|
+
shipped) may still meter. Prefer keeping `--local` in agent workflows — do not
|
|
434
|
+
switch to hosted MCP `execute`. `--invoke` without `--local` is the thin
|
|
435
|
+
passthrough for a single export (still cloud). `packageStorage()`,
|
|
436
|
+
`packageSecrets`, `email`, and `events` stay unbound on the ad hoc entry like
|
|
437
|
+
cloud execute unless the downloaded package modules carry stamps. Outbound
|
|
438
|
+
`fetch` is public-network-only by default. Pass `--allow-private-network` with
|
|
439
|
+
`execute --local` to also allow private and local addresses; the loopback
|
|
440
|
+
bridge used for CapabilityProxy calls remains available either way.
|
|
435
441
|
|
|
436
442
|
## Token storage
|
|
437
443
|
|
|
@@ -462,10 +468,12 @@ same run).
|
|
|
462
468
|
|
|
463
469
|
## Releases
|
|
464
470
|
|
|
465
|
-
This repo uses
|
|
466
|
-
|
|
471
|
+
This repo uses
|
|
472
|
+
[semantic-release](https://github.com/semantic-release/semantic-release) the
|
|
473
|
+
same way [match-sorter](https://github.com/kentcdodds/match-sorter) does:
|
|
467
474
|
conventional commits on `main` publish `@kodycodes/cli` with npm provenance
|
|
468
|
-
(`id-token: write`). Version in `package.json` stays
|
|
475
|
+
(`id-token: write`). Version in `package.json` stays
|
|
476
|
+
`0.0.0-semantically-released`.
|
|
469
477
|
|
|
470
478
|
Trusted publishing for `@kodycodes/cli` is attached to this GitHub repository.
|
|
471
479
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AgentType, type InstallResult, type McpServerConfig } from 'add-mcp';
|
|
2
|
-
import type
|
|
2
|
+
import { type HostId } from './host-catalog.js';
|
|
3
3
|
/**
|
|
4
4
|
* Hosts whose on-disk MCP config `add-mcp` already knows how to merge.
|
|
5
5
|
* Claude Desktop is intentionally omitted: remote MCP lives in Connectors, not
|
package/dist/api-token.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { loadStoredApiToken, type StoredApiToken } from './api-token-store.js';
|
|
2
|
-
import type
|
|
2
|
+
import { type SecretBackend, type StoreResolution } from './store.js';
|
|
3
3
|
/** Mirrors `cliTokenLifetimeAliases` in auth-bootstrap (keep in sync; avoid import cycle). */
|
|
4
4
|
export type CliTokenLifetimeAlias = 'short' | 'long';
|
|
5
5
|
/** Platform tracking for login OAuth as CapabilityProxy / package-graph Bearer. */
|
|
@@ -2,25 +2,30 @@ import { createRequire as __createRequire } from 'node:module'; const require =
|
|
|
2
2
|
import {
|
|
3
3
|
credentialsFromTokens,
|
|
4
4
|
ensureFreshCredentials,
|
|
5
|
+
ensureOpenApiCredentials,
|
|
5
6
|
isAccessTokenExpired,
|
|
6
7
|
login,
|
|
7
8
|
refreshStoredCredentials,
|
|
8
9
|
resolvePendingOrgSlug
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-5ZBJAP6G.js";
|
|
11
|
+
import "./chunk-ZILB2HWE.js";
|
|
11
12
|
import "./chunk-CASGRYOF.js";
|
|
13
|
+
import "./chunk-W2SAFAT4.js";
|
|
14
|
+
import "./chunk-46IJPEID.js";
|
|
15
|
+
import "./chunk-DW5UTJ6T.js";
|
|
16
|
+
import "./chunk-5JIRHJQP.js";
|
|
17
|
+
import "./chunk-4GIFJVGT.js";
|
|
12
18
|
import "./chunk-CWWHR4FH.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-IHP6PV6X.js";
|
|
17
|
-
import "./chunk-QHBCP4OB.js";
|
|
19
|
+
import "./chunk-3H72XY5R.js";
|
|
20
|
+
import "./chunk-BTL3PJ2H.js";
|
|
21
|
+
import "./chunk-UW6AWLXX.js";
|
|
18
22
|
export {
|
|
19
23
|
credentialsFromTokens,
|
|
20
24
|
ensureFreshCredentials,
|
|
25
|
+
ensureOpenApiCredentials,
|
|
21
26
|
isAccessTokenExpired,
|
|
22
27
|
login,
|
|
23
28
|
refreshStoredCredentials,
|
|
24
29
|
resolvePendingOrgSlug
|
|
25
30
|
};
|
|
26
|
-
//# sourceMappingURL=auth-
|
|
31
|
+
//# sourceMappingURL=auth-6ZE6QQXA.js.map
|
package/dist/auth-bootstrap.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type StoredApiToken } from './api-token-store.js';
|
|
2
|
-
import type
|
|
2
|
+
import { type SecretBackend, type StoreResolution } from './store.js';
|
|
3
3
|
/** ADR 0056 one-shot bootstrap code prefix (`kody_bc_…`). */
|
|
4
4
|
export declare const cliBootstrapCodePrefix = "kody_bc_";
|
|
5
5
|
export declare const bootstrapRedeemPath = "v1/tokens/bootstrap/redeem";
|