@kodycodes/cli 1.27.4 → 1.27.5

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.
Files changed (53) hide show
  1. package/README.md +4 -4
  2. package/dist/api-token.d.ts +1 -1
  3. package/dist/{auth-6ZE6QQXA.js → auth-3I535BJW.js} +4 -4
  4. package/dist/bin.js +6 -6
  5. package/dist/{chunk-5ZBJAP6G.js → chunk-2MMGAHMO.js} +3 -3
  6. package/dist/{chunk-W2SAFAT4.js → chunk-4ODB2RCR.js} +2 -2
  7. package/dist/{chunk-CPS7HW4T.js → chunk-6RIBENRT.js} +3 -3
  8. package/dist/{chunk-OZDWOZLV.js → chunk-DGMRHZCT.js} +3 -3
  9. package/dist/{chunk-5JIRHJQP.js → chunk-FGD6ZQWV.js} +2 -2
  10. package/dist/{chunk-2EQJQJA3.js → chunk-IPQONA4Y.js} +4 -4
  11. package/dist/{chunk-CGEQSGOA.js → chunk-SH4B6ZSM.js} +30 -30
  12. package/dist/{chunk-JOMBXQOS.js → chunk-X7WUTUMG.js} +3 -3
  13. package/dist/{chunk-2IHISXHN.js → chunk-ZL5FBDVT.js} +38 -8
  14. package/dist/chunk-ZL5FBDVT.js.map +6 -0
  15. package/dist/cli.js +6 -6
  16. package/dist/credential-client-runtime-source.d.ts +1 -1
  17. package/dist/defaults.d.ts +1 -1
  18. package/dist/{dev-command-PCQDX5EH.js → dev-command-E5ZGSIWI.js} +5 -5
  19. package/dist/{git-credential-INB2UV4C.js → git-credential-DOQJ7MWO.js} +5 -5
  20. package/dist/{local-execute-YCXHVAVM.js → local-execute-ZEAZGDRC.js} +4 -4
  21. package/dist/local-host-runtime-surface.d.ts +1 -1
  22. package/dist/local-package-graph.d.ts +21 -4
  23. package/dist/{local-package-run-WZVZAHK3.js → local-package-run-MXKX5VST.js} +5 -5
  24. package/dist/local-runtime-source.d.ts +5 -3
  25. package/dist/login-callback-assets.d.ts +1 -1
  26. package/dist/mock/install-mock-fetch-shim.d.ts +2 -2
  27. package/dist/{mock-dep-resolve-B5ZH4U3H.js → mock-dep-resolve-FX5EY5A4.js} +5 -5
  28. package/dist/{mock-local-deps-2VVNJLFF.js → mock-local-deps-VSBC6Q2Y.js} +10 -6
  29. package/dist/mock-local-deps-VSBC6Q2Y.js.map +6 -0
  30. package/dist/{open-api-client-SR4B7265.js → open-api-client-W7RGS425.js} +3 -3
  31. package/dist/{remote-execute-VPBDPAYA.js → remote-execute-ZSB7YPLU.js} +3 -3
  32. package/dist/{setup-git-MHK563LB.js → setup-git-W6G6A57V.js} +4 -4
  33. package/package.json +3 -3
  34. package/skills/kody/SKILL.md +1 -1
  35. package/dist/chunk-2IHISXHN.js.map +0 -6
  36. package/dist/mock-local-deps-2VVNJLFF.js.map +0 -6
  37. /package/dist/{auth-6ZE6QQXA.js.map → auth-3I535BJW.js.map} +0 -0
  38. /package/dist/{chunk-5ZBJAP6G.js.map → chunk-2MMGAHMO.js.map} +0 -0
  39. /package/dist/{chunk-W2SAFAT4.js.map → chunk-4ODB2RCR.js.map} +0 -0
  40. /package/dist/{chunk-CPS7HW4T.js.map → chunk-6RIBENRT.js.map} +0 -0
  41. /package/dist/{chunk-OZDWOZLV.js.map → chunk-DGMRHZCT.js.map} +0 -0
  42. /package/dist/{chunk-5JIRHJQP.js.map → chunk-FGD6ZQWV.js.map} +0 -0
  43. /package/dist/{chunk-2EQJQJA3.js.map → chunk-IPQONA4Y.js.map} +0 -0
  44. /package/dist/{chunk-CGEQSGOA.js.map → chunk-SH4B6ZSM.js.map} +0 -0
  45. /package/dist/{chunk-JOMBXQOS.js.map → chunk-X7WUTUMG.js.map} +0 -0
  46. /package/dist/{dev-command-PCQDX5EH.js.map → dev-command-E5ZGSIWI.js.map} +0 -0
  47. /package/dist/{git-credential-INB2UV4C.js.map → git-credential-DOQJ7MWO.js.map} +0 -0
  48. /package/dist/{local-execute-YCXHVAVM.js.map → local-execute-ZEAZGDRC.js.map} +0 -0
  49. /package/dist/{local-package-run-WZVZAHK3.js.map → local-package-run-MXKX5VST.js.map} +0 -0
  50. /package/dist/{mock-dep-resolve-B5ZH4U3H.js.map → mock-dep-resolve-FX5EY5A4.js.map} +0 -0
  51. /package/dist/{open-api-client-SR4B7265.js.map → open-api-client-W7RGS425.js.map} +0 -0
  52. /package/dist/{remote-execute-VPBDPAYA.js.map → remote-execute-ZSB7YPLU.js.map} +0 -0
  53. /package/dist/{setup-git-MHK563LB.js.map → setup-git-W6G6A57V.js.map} +0 -0
package/README.md CHANGED
@@ -132,8 +132,8 @@ npx @kodycodes/cli api usageGet --params '{}'
132
132
  a different API origin, use `auth bootstrap --api-url <origin>` or set
133
133
  `KODY_API_TOKEN`. The Open API must accept that OAuth bearer on
134
134
  CapabilityProxy / package-graph
135
- ([kentcdodds/kody#2812](https://github.com/kentcdodds/kody/issues/2812));
136
- until then use bootstrap or a scoped `kody_at_…` token.
135
+ ([kody-hq/kody#2812](https://github.com/kody-hq/kody/issues/2812)); until then
136
+ use bootstrap or a scoped `kody_at_…` token.
137
137
  - Wrong/expired token → 401 with a mint-fresh-token message (or the OAuth
138
138
  platform-gap message when the bearer is login OAuth).
139
139
  - Wrong scopes → the error names the missing scope and the exact command to mint
@@ -383,7 +383,7 @@ npx @kodycodes/cli execute --local --invoke kody:@scope/pkg/export --params '{"n
383
383
  tokens so they stay out of shell history and `ps`. The bearer stays in the CLI
384
384
  process; the sandbox only talks to a loopback bridge. Host MCP OAuth from
385
385
  other clients is never read. Until
386
- [kentcdodds/kody#2812](https://github.com/kentcdodds/kody/issues/2812) ships,
386
+ [kody-hq/kody#2812](https://github.com/kody-hq/kody/issues/2812) ships,
387
387
  login-only Bearer is rejected by the Open API — use bootstrap or a `kody_at_…`
388
388
  token in that case.
389
389
  - **Node.js:** 22 or newer (`package.json` `engines` is `>=22`). Older Node
@@ -404,7 +404,7 @@ npx @kodycodes/cli execute --local --invoke kody:@scope/pkg/export --params '{"n
404
404
  override). The CLI calls `POST /v1/local-execute/package-graph` before
405
405
  starting workerd (it authenticates the bearer and, when the module imports
406
406
  `kody:@…`, downloads stamped package modules for local embedding,
407
- [platform issue](https://github.com/kentcdodds/kody/issues/2808)) and
407
+ [platform issue](https://github.com/kody-hq/kody/issues/2808)) and
408
408
  `POST /v1/capability-proxy/call` with `{ path, args, conversationId? }` for
409
409
  each runtime call. CapabilityProxy requests go through Node's own
410
410
  `node:http(s)` client with one keep-alive connection and a 7-minute idle limit
@@ -3,7 +3,7 @@ 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. */
6
- export declare const localExecuteOauthPlatformIssueUrl = "https://github.com/kentcdodds/kody/issues/2812";
6
+ export declare const localExecuteOauthPlatformIssueUrl = "https://github.com/kody-hq/kody/issues/2812";
7
7
  export type ResolveScopedApiTokenInput = {
8
8
  tokenValues?: {
9
9
  token?: string;
@@ -7,13 +7,13 @@ import {
7
7
  login,
8
8
  refreshStoredCredentials,
9
9
  resolvePendingOrgSlug
10
- } from "./chunk-5ZBJAP6G.js";
10
+ } from "./chunk-2MMGAHMO.js";
11
11
  import "./chunk-ZILB2HWE.js";
12
12
  import "./chunk-CASGRYOF.js";
13
- import "./chunk-W2SAFAT4.js";
13
+ import "./chunk-4ODB2RCR.js";
14
14
  import "./chunk-46IJPEID.js";
15
15
  import "./chunk-DW5UTJ6T.js";
16
- import "./chunk-5JIRHJQP.js";
16
+ import "./chunk-FGD6ZQWV.js";
17
17
  import "./chunk-4GIFJVGT.js";
18
18
  import "./chunk-CWWHR4FH.js";
19
19
  import "./chunk-3H72XY5R.js";
@@ -28,4 +28,4 @@ export {
28
28
  refreshStoredCredentials,
29
29
  resolvePendingOrgSlug
30
30
  };
31
- //# sourceMappingURL=auth-6ZE6QQXA.js.map
31
+ //# sourceMappingURL=auth-3I535BJW.js.map
package/dist/bin.js CHANGED
@@ -2,20 +2,20 @@
2
2
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
3
3
  import {
4
4
  runCli
5
- } from "./chunk-CGEQSGOA.js";
5
+ } from "./chunk-SH4B6ZSM.js";
6
6
  import "./chunk-2XPH7L2P.js";
7
7
  import "./chunk-SLNAWWQK.js";
8
8
  import "./chunk-YDWTXEKQ.js";
9
- import "./chunk-CPS7HW4T.js";
10
- import "./chunk-OZDWOZLV.js";
9
+ import "./chunk-6RIBENRT.js";
10
+ import "./chunk-DGMRHZCT.js";
11
11
  import "./chunk-6ZYUGXVW.js";
12
- import "./chunk-5ZBJAP6G.js";
12
+ import "./chunk-2MMGAHMO.js";
13
13
  import "./chunk-ZILB2HWE.js";
14
14
  import "./chunk-CASGRYOF.js";
15
- import "./chunk-W2SAFAT4.js";
15
+ import "./chunk-4ODB2RCR.js";
16
16
  import "./chunk-46IJPEID.js";
17
17
  import "./chunk-DW5UTJ6T.js";
18
- import "./chunk-5JIRHJQP.js";
18
+ import "./chunk-FGD6ZQWV.js";
19
19
  import "./chunk-4GIFJVGT.js";
20
20
  import "./chunk-7PRJ36I5.js";
21
21
  import "./chunk-CWWHR4FH.js";
@@ -9,11 +9,11 @@ import {
9
9
  OpenApiError,
10
10
  openApiGet,
11
11
  openApiRequest
12
- } from "./chunk-W2SAFAT4.js";
12
+ } from "./chunk-4ODB2RCR.js";
13
13
  import {
14
14
  isScopedApiToken,
15
15
  missingCliAuthMessage
16
- } from "./chunk-5JIRHJQP.js";
16
+ } from "./chunk-FGD6ZQWV.js";
17
17
  import {
18
18
  orgSlugFromFlag
19
19
  } from "./chunk-CWWHR4FH.js";
@@ -2002,4 +2002,4 @@ export {
2002
2002
  ensureOpenApiCredentials,
2003
2003
  login
2004
2004
  };
2005
- //# sourceMappingURL=chunk-5ZBJAP6G.js.map
2005
+ //# sourceMappingURL=chunk-2MMGAHMO.js.map
@@ -9,7 +9,7 @@ import {
9
9
  insufficientScopeMessage,
10
10
  readInsufficientScopeDetails,
11
11
  readPackageVersion
12
- } from "./chunk-5JIRHJQP.js";
12
+ } from "./chunk-FGD6ZQWV.js";
13
13
  import {
14
14
  describeNetworkError
15
15
  } from "./chunk-4GIFJVGT.js";
@@ -1560,4 +1560,4 @@ export {
1560
1560
  toolResultFromHttpBody,
1561
1561
  whoamiWithApiToken
1562
1562
  };
1563
- //# sourceMappingURL=chunk-W2SAFAT4.js.map
1563
+ //# sourceMappingURL=chunk-4ODB2RCR.js.map
@@ -4,7 +4,7 @@ import {
4
4
  isPairedApiUrl,
5
5
  missingLocalExecuteAuthMessage,
6
6
  resolveScopedApiToken
7
- } from "./chunk-5JIRHJQP.js";
7
+ } from "./chunk-FGD6ZQWV.js";
8
8
  import {
9
9
  defaultApiUrl,
10
10
  defaultMcpUrl
@@ -30,7 +30,7 @@ async function resolveLocalExecuteBearer(input) {
30
30
  `kody login credentials for ${mcpOrigin} are only sent to ${expectedPairedApiOrigin(mcpUrl)}. For ${apiOrigin}, run \`kody auth bootstrap --code \u2026 --api-url ${apiOrigin}\` or set KODY_API_TOKEN.`
31
31
  );
32
32
  }
33
- const ensure = input.ensureCredentials ?? (await import("./auth-6ZE6QQXA.js")).ensureFreshCredentials;
33
+ const ensure = input.ensureCredentials ?? (await import("./auth-3I535BJW.js")).ensureFreshCredentials;
34
34
  try {
35
35
  const credentials = await ensure({
36
36
  mcpUrl: input.mcpUrl,
@@ -53,4 +53,4 @@ async function resolveLocalExecuteBearer(input) {
53
53
  export {
54
54
  resolveLocalExecuteBearer
55
55
  };
56
- //# sourceMappingURL=chunk-CPS7HW4T.js.map
56
+ //# sourceMappingURL=chunk-6RIBENRT.js.map
@@ -6,7 +6,7 @@ import {
6
6
  OpenApiError,
7
7
  openApiGet,
8
8
  openApiRequest
9
- } from "./chunk-W2SAFAT4.js";
9
+ } from "./chunk-4ODB2RCR.js";
10
10
  import {
11
11
  assertTokenSafeApiUrl,
12
12
  capabilityProxyUrl,
@@ -14,7 +14,7 @@ import {
14
14
  loadStoredApiToken,
15
15
  readPackageVersion,
16
16
  saveStoredApiToken
17
- } from "./chunk-5JIRHJQP.js";
17
+ } from "./chunk-FGD6ZQWV.js";
18
18
  import {
19
19
  describeNetworkError
20
20
  } from "./chunk-4GIFJVGT.js";
@@ -961,4 +961,4 @@ export {
961
961
  authRemoveGit,
962
962
  formatAuthRemoveGitReport
963
963
  };
964
- //# sourceMappingURL=chunk-OZDWOZLV.js.map
964
+ //# sourceMappingURL=chunk-DGMRHZCT.js.map
@@ -123,7 +123,7 @@ function deleteStoredApiToken(apiUrl = defaultApiUrl, backend, resolution) {
123
123
 
124
124
  // src/api-token.ts
125
125
  var shortAbsoluteLifetimeMs = 24 * 60 * 60 * 1e3;
126
- var localExecuteOauthPlatformIssueUrl = "https://github.com/kentcdodds/kody/issues/2812";
126
+ var localExecuteOauthPlatformIssueUrl = "https://github.com/kody-hq/kody/issues/2812";
127
127
  var loopbackHosts = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]", "::1"]);
128
128
  function tryParseUrl(value) {
129
129
  try {
@@ -1013,4 +1013,4 @@ export {
1013
1013
  callCapabilityProxyGatewayFetchStream,
1014
1014
  checkCredentialCallMap
1015
1015
  };
1016
- //# sourceMappingURL=chunk-5JIRHJQP.js.map
1016
+ //# sourceMappingURL=chunk-FGD6ZQWV.js.map
@@ -3,7 +3,7 @@ import {
3
3
  forwardLocalGatewayFetchStream,
4
4
  installMockFetchShimModules,
5
5
  startLocalRuntimeBridge
6
- } from "./chunk-JOMBXQOS.js";
6
+ } from "./chunk-X7WUTUMG.js";
7
7
  import {
8
8
  resolveMockFetchGateway,
9
9
  tryHandleMockGatewayFetchCall
@@ -21,7 +21,7 @@ import {
21
21
  runSecretEnvVar,
22
22
  runSecretHeader,
23
23
  writePackageModuleFiles
24
- } from "./chunk-2IHISXHN.js";
24
+ } from "./chunk-ZL5FBDVT.js";
25
25
  import {
26
26
  redact
27
27
  } from "./chunk-CASGRYOF.js";
@@ -31,7 +31,7 @@ import {
31
31
  import {
32
32
  assertTokenSafeApiUrl,
33
33
  callCapabilityProxy
34
- } from "./chunk-5JIRHJQP.js";
34
+ } from "./chunk-FGD6ZQWV.js";
35
35
  import {
36
36
  apiTokenEnvVar
37
37
  } from "./chunk-BTL3PJ2H.js";
@@ -811,4 +811,4 @@ export {
811
811
  runLocalPackageModule,
812
812
  buildLocalPackageContext
813
813
  };
814
- //# sourceMappingURL=chunk-2EQJQJA3.js.map
814
+ //# sourceMappingURL=chunk-IPQONA4Y.js.map
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-YDWTXEKQ.js";
12
12
  import {
13
13
  resolveLocalExecuteBearer
14
- } from "./chunk-CPS7HW4T.js";
14
+ } from "./chunk-6RIBENRT.js";
15
15
  import {
16
16
  authBootstrap,
17
17
  authBootstrapWithScopes,
@@ -21,7 +21,7 @@ import {
21
21
  parseCliScopesFlag,
22
22
  refreshGitCredentialHelperPinIfNeeded,
23
23
  resolveCliTokenLifetime
24
- } from "./chunk-OZDWOZLV.js";
24
+ } from "./chunk-DGMRHZCT.js";
25
25
  import {
26
26
  redactError
27
27
  } from "./chunk-CASGRYOF.js";
@@ -37,7 +37,7 @@ import {
37
37
  readPackageVersion,
38
38
  requireApiToken,
39
39
  resolveScopedApiToken
40
- } from "./chunk-5JIRHJQP.js";
40
+ } from "./chunk-FGD6ZQWV.js";
41
41
  import {
42
42
  resolveOrgSlug
43
43
  } from "./chunk-7PRJ36I5.js";
@@ -787,7 +787,7 @@ async function dispatch(parsed, write, writeErr) {
787
787
  `);
788
788
  return 0;
789
789
  case "login": {
790
- const { login } = await import("./auth-6ZE6QQXA.js");
790
+ const { login } = await import("./auth-3I535BJW.js");
791
791
  write("Opening the Kody login page in your browser\u2026\n");
792
792
  const result = await login({
793
793
  mcpUrl,
@@ -1012,7 +1012,7 @@ ${url.href}
1012
1012
  parseGitCredentialAction,
1013
1013
  parseGitCredentialInput,
1014
1014
  readGitCredentialStdin
1015
- } = await import("./git-credential-INB2UV4C.js");
1015
+ } = await import("./git-credential-DOQJ7MWO.js");
1016
1016
  const action = parseGitCredentialAction(parsed.positionals);
1017
1017
  const raw = await readGitCredentialStdin(process.stdin);
1018
1018
  const output = await handleGitCredential({
@@ -1079,7 +1079,7 @@ ${url.href}
1079
1079
  allowEnvWithoutLogin: true,
1080
1080
  ...org ? { org } : {}
1081
1081
  })) {
1082
- const { whoamiWithApiToken: whoamiWithApiToken2 } = await import("./open-api-client-SR4B7265.js");
1082
+ const { whoamiWithApiToken: whoamiWithApiToken2 } = await import("./open-api-client-W7RGS425.js");
1083
1083
  const identity2 = await whoamiWithApiToken2({
1084
1084
  token: requireApiToken(tokenValues, process.env, "whoami", {
1085
1085
  apiUrl
@@ -1106,13 +1106,13 @@ ${url.href}
1106
1106
  );
1107
1107
  return 0;
1108
1108
  }
1109
- const { ensureOpenApiCredentials } = await import("./auth-6ZE6QQXA.js");
1109
+ const { ensureOpenApiCredentials } = await import("./auth-3I535BJW.js");
1110
1110
  const credentials = await ensureOpenApiCredentials({
1111
1111
  mcpUrl,
1112
1112
  org,
1113
1113
  apiUrl
1114
1114
  });
1115
- const { whoamiWithApiToken } = await import("./open-api-client-SR4B7265.js");
1115
+ const { whoamiWithApiToken } = await import("./open-api-client-W7RGS425.js");
1116
1116
  const identity = await whoamiWithApiToken({
1117
1117
  token: credentials.accessToken,
1118
1118
  apiUrl,
@@ -1166,7 +1166,7 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1166
1166
  });
1167
1167
  apiUrl = mock.apiUrl;
1168
1168
  closeMock = mock.started ? () => mock.server.close() : void 0;
1169
- const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-SR4B7265.js");
1169
+ const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-W7RGS425.js");
1170
1170
  const result2 = await searchWithApiToken2({
1171
1171
  token: mock.token,
1172
1172
  apiUrl,
@@ -1185,7 +1185,7 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1185
1185
  allowEnvWithoutLogin: true,
1186
1186
  ...org ? { org } : {}
1187
1187
  })) {
1188
- const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-SR4B7265.js");
1188
+ const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-W7RGS425.js");
1189
1189
  const result2 = await searchWithApiToken2({
1190
1190
  token: requireApiToken(tokenValues, process.env, "search", {
1191
1191
  apiUrl
@@ -1200,13 +1200,13 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1200
1200
  write(formatToolResult(result2, json));
1201
1201
  return result2.isError ? 1 : 0;
1202
1202
  }
1203
- const { ensureOpenApiCredentials } = await import("./auth-6ZE6QQXA.js");
1203
+ const { ensureOpenApiCredentials } = await import("./auth-3I535BJW.js");
1204
1204
  const credentials = await ensureOpenApiCredentials({
1205
1205
  mcpUrl,
1206
1206
  org,
1207
1207
  apiUrl
1208
1208
  });
1209
- const { searchWithApiToken } = await import("./open-api-client-SR4B7265.js");
1209
+ const { searchWithApiToken } = await import("./open-api-client-W7RGS425.js");
1210
1210
  const result = await searchWithApiToken({
1211
1211
  token: credentials.accessToken,
1212
1212
  apiUrl,
@@ -1313,7 +1313,7 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1313
1313
  apiUrl = mock.apiUrl;
1314
1314
  mockToken = mock.token;
1315
1315
  closeMock = mock.started ? () => mock.server.close() : void 0;
1316
- const { tryResolveMockDepResolve } = await import("./mock-dep-resolve-B5ZH4U3H.js");
1316
+ const { tryResolveMockDepResolve } = await import("./mock-dep-resolve-FX5EY5A4.js");
1317
1317
  mockDepResolve = await tryResolveMockDepResolve({
1318
1318
  tokenValues,
1319
1319
  apiUrl: prodApiUrl,
@@ -1322,7 +1322,7 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1322
1322
  });
1323
1323
  }
1324
1324
  if (localPackageRun) {
1325
- const { buildLocalPackageContext, runLocalPackageModule } = await import("./local-package-run-WZVZAHK3.js");
1325
+ const { buildLocalPackageContext, runLocalPackageModule } = await import("./local-package-run-MXKX5VST.js");
1326
1326
  const result2 = await runLocalPackageModule({
1327
1327
  modulePath: localPackageRun.modulePath,
1328
1328
  params: args.params,
@@ -1366,7 +1366,7 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1366
1366
  packageRootForMocks = void 0;
1367
1367
  }
1368
1368
  }
1369
- const result = local ? await (await import("./local-execute-YCXHVAVM.js")).runLocalExecute({
1369
+ const result = local ? await (await import("./local-execute-ZEAZGDRC.js")).runLocalExecute({
1370
1370
  code: args.code,
1371
1371
  ...modulePath !== void 0 ? { modulePath } : {},
1372
1372
  params: args.params,
@@ -1388,7 +1388,7 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1388
1388
  allowPrivateNetwork: parsed.values["allow-private-network"] === true,
1389
1389
  onStatus: (message) => writeErr(`${message}
1390
1390
  `)
1391
- }) : useToken ? await (await import("./remote-execute-VPBDPAYA.js")).runRemoteExecuteWithToken({
1391
+ }) : useToken ? await (await import("./remote-execute-ZSB7YPLU.js")).runRemoteExecuteWithToken({
1392
1392
  code: typeof args.code === "string" ? args.code : void 0,
1393
1393
  invoke,
1394
1394
  params: args.params,
@@ -1403,13 +1403,13 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1403
1403
  apiUrl,
1404
1404
  ...org ? { org } : {}
1405
1405
  }) : await (async () => {
1406
- const { ensureOpenApiCredentials } = await import("./auth-6ZE6QQXA.js");
1406
+ const { ensureOpenApiCredentials } = await import("./auth-3I535BJW.js");
1407
1407
  const session = await ensureOpenApiCredentials({
1408
1408
  mcpUrl,
1409
1409
  org,
1410
1410
  apiUrl
1411
1411
  });
1412
- return (await import("./remote-execute-VPBDPAYA.js")).runRemoteExecuteWithToken({
1412
+ return (await import("./remote-execute-ZSB7YPLU.js")).runRemoteExecuteWithToken({
1413
1413
  code: typeof args.code === "string" ? args.code : void 0,
1414
1414
  invoke,
1415
1415
  params: args.params,
@@ -1439,7 +1439,7 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1439
1439
  runDevServe,
1440
1440
  runDevWebhook,
1441
1441
  tryAttachedDevFetch
1442
- } = await import("./dev-command-PCQDX5EH.js");
1442
+ } = await import("./dev-command-E5ZGSIWI.js");
1443
1443
  const target = resolveTarget({
1444
1444
  command: "dev",
1445
1445
  flag: typeof parsed.values.target === "string" ? parsed.values.target : void 0
@@ -1530,7 +1530,7 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1530
1530
  purpose: "kody dev",
1531
1531
  ...org ? { org } : {}
1532
1532
  }) : "mock";
1533
- const mockDepResolve = target === "mock" ? await (await import("./mock-dep-resolve-B5ZH4U3H.js")).tryResolveMockDepResolve({
1533
+ const mockDepResolve = target === "mock" ? await (await import("./mock-dep-resolve-FX5EY5A4.js")).tryResolveMockDepResolve({
1534
1534
  tokenValues,
1535
1535
  apiUrl: prodApiUrl,
1536
1536
  mcpUrl,
@@ -1671,7 +1671,7 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1671
1671
  const params = parseApiParamsJson(
1672
1672
  typeof parsed.values.params === "string" ? parsed.values.params : void 0
1673
1673
  );
1674
- const { callOpenApiOperation } = await import("./open-api-client-SR4B7265.js");
1674
+ const { callOpenApiOperation } = await import("./open-api-client-W7RGS425.js");
1675
1675
  const result = await callOpenApiOperation({
1676
1676
  operationId,
1677
1677
  params,
@@ -1706,7 +1706,7 @@ scopes: ${identity.token.scopes.join(", ") || "(none)"}
1706
1706
  mcpUrl,
1707
1707
  org
1708
1708
  });
1709
- const { callOpenApiOperation: callOpenApiOperation2 } = await import("./open-api-client-SR4B7265.js");
1709
+ const { callOpenApiOperation: callOpenApiOperation2 } = await import("./open-api-client-W7RGS425.js");
1710
1710
  write(
1711
1711
  await runPackageCollaboratorPlan({
1712
1712
  plan,
@@ -1732,7 +1732,7 @@ ${packageCollaboratorUsage}`
1732
1732
  positional: parsed.positionals[1],
1733
1733
  paramsJson: typeof parsed.values.params === "string" ? parsed.values.params : void 0
1734
1734
  });
1735
- const { callOpenApiOperation } = await import("./open-api-client-SR4B7265.js");
1735
+ const { callOpenApiOperation } = await import("./open-api-client-W7RGS425.js");
1736
1736
  const publishToken = await accessTokenForOpenApi({
1737
1737
  tokenValues,
1738
1738
  apiUrl,
@@ -1865,7 +1865,7 @@ function attachExecuteCommonArgs(args, input) {
1865
1865
  return args;
1866
1866
  }
1867
1867
  async function runAuthSetupGit(input) {
1868
- const { authSetupGit, setupGitDefaultScopes } = await import("./setup-git-MHK563LB.js");
1868
+ const { authSetupGit, setupGitDefaultScopes } = await import("./setup-git-W6G6A57V.js");
1869
1869
  const apiUrl = apiUrlFrom({
1870
1870
  apiUrl: typeof input.values["api-url"] === "string" ? input.values["api-url"] : void 0
1871
1871
  });
@@ -1922,7 +1922,7 @@ async function runAuthSetupGit(input) {
1922
1922
  return 0;
1923
1923
  }
1924
1924
  async function runAuthRemoveGit(input) {
1925
- const { authRemoveGit, formatAuthRemoveGitReport } = await import("./setup-git-MHK563LB.js");
1925
+ const { authRemoveGit, formatAuthRemoveGitReport } = await import("./setup-git-W6G6A57V.js");
1926
1926
  const apiUrl = apiUrlFrom({
1927
1927
  apiUrl: typeof input.values["api-url"] === "string" ? input.values["api-url"] : void 0
1928
1928
  });
@@ -1950,7 +1950,7 @@ function bootstrapMinter(input) {
1950
1950
  apiUrl: input.apiUrl
1951
1951
  }
1952
1952
  );
1953
- const { callOpenApiOperation } = await import("./open-api-client-SR4B7265.js");
1953
+ const { callOpenApiOperation } = await import("./open-api-client-W7RGS425.js");
1954
1954
  try {
1955
1955
  return await callOpenApiOperation({
1956
1956
  token,
@@ -1971,13 +1971,13 @@ function bootstrapMinter(input) {
1971
1971
  if (loadCredentials(input.mcpUrl, void 0, void 0, {
1972
1972
  org: input.org
1973
1973
  })) {
1974
- const { ensureOpenApiCredentials } = await import("./auth-6ZE6QQXA.js");
1974
+ const { ensureOpenApiCredentials } = await import("./auth-3I535BJW.js");
1975
1975
  const session = await ensureOpenApiCredentials({
1976
1976
  mcpUrl: input.mcpUrl,
1977
1977
  apiUrl: input.apiUrl,
1978
1978
  ...input.org ? { org: input.org } : {}
1979
1979
  });
1980
- const { callOpenApiOperation } = await import("./open-api-client-SR4B7265.js");
1980
+ const { callOpenApiOperation } = await import("./open-api-client-W7RGS425.js");
1981
1981
  return callOpenApiOperation({
1982
1982
  operationId: cliCredentialBootstrapOperationId,
1983
1983
  params,
@@ -2003,7 +2003,7 @@ async function accessTokenForOpenApi(input) {
2003
2003
  apiUrl: input.apiUrl
2004
2004
  });
2005
2005
  if (explicit) return explicit;
2006
- const { ensureOpenApiCredentials } = await import("./auth-6ZE6QQXA.js");
2006
+ const { ensureOpenApiCredentials } = await import("./auth-3I535BJW.js");
2007
2007
  const session = await ensureOpenApiCredentials({
2008
2008
  mcpUrl: input.mcpUrl,
2009
2009
  apiUrl: input.apiUrl,
@@ -2084,4 +2084,4 @@ export {
2084
2084
  resolvePackagePublishTarget,
2085
2085
  shouldUseApiToken
2086
2086
  };
2087
- //# sourceMappingURL=chunk-CGEQSGOA.js.map
2087
+ //# sourceMappingURL=chunk-SH4B6ZSM.js.map
@@ -3,7 +3,7 @@ import {
3
3
  localExecuteGatewayFetchShimModuleName,
4
4
  localWorkerModuleNames,
5
5
  runSecretHeader
6
- } from "./chunk-2IHISXHN.js";
6
+ } from "./chunk-ZL5FBDVT.js";
7
7
  import {
8
8
  redact
9
9
  } from "./chunk-CASGRYOF.js";
@@ -14,7 +14,7 @@ import {
14
14
  gatewayFetchPackageIdHeaderName,
15
15
  gatewayFetchUrlHeaderName,
16
16
  secretResolutionHeaderName
17
- } from "./chunk-5JIRHJQP.js";
17
+ } from "./chunk-FGD6ZQWV.js";
18
18
 
19
19
  // src/local-runtime-bridge.ts
20
20
  import {
@@ -432,4 +432,4 @@ export {
432
432
  forwardLocalGatewayFetchStream,
433
433
  installMockFetchShimModules
434
434
  };
435
- //# sourceMappingURL=chunk-JOMBXQOS.js.map
435
+ //# sourceMappingURL=chunk-X7WUTUMG.js.map
@@ -10,7 +10,7 @@ import {
10
10
  readInsufficientScopeDetails,
11
11
  readPackageVersion,
12
12
  rejectedOauthBearerMessage
13
- } from "./chunk-5JIRHJQP.js";
13
+ } from "./chunk-FGD6ZQWV.js";
14
14
  import {
15
15
  describeNetworkError
16
16
  } from "./chunk-4GIFJVGT.js";
@@ -375,8 +375,10 @@ var localWorkerModuleNames = {
375
375
  /**
376
376
  * Flat alias for `kody:runtime`. Path-like package module names
377
377
  * (`kody:@scope/pkg/export`) path-join bare `kody:runtime` into
378
- * `kody:@scope/pkg/kody:runtime`; local deps rewrite to this slash-free
379
- * name instead. workerd rejects leading-`/` absolute module names.
378
+ * `kody:@scope/pkg/kody:runtime`; local deps rewrite imports to this
379
+ * registered name, then prefix `/` on the import reference so workerd
380
+ * does not still join it onto the importer. Registered names must not
381
+ * start with `/` — workerd rejects those.
380
382
  */
381
383
  runtimeFlatAlias: ".__kody_runtime__.js"
382
384
  };
@@ -412,7 +414,7 @@ const __kodySecretResolutionHeader = 'x-kody-secret-resolution';
412
414
  /**
413
415
  * Streaming CapabilityProxy hop (POST /v1/capability-proxy/gateway-fetch via the
414
416
  * loopback bridge). Returns a real Response \u2014 not the JSON gatewayFetch envelope.
415
- * See kentcdodds/kody docs/contributing/contracts/cli-streaming-gateway-fetch.md.
417
+ * See kody-hq/kody docs/contributing/contracts/cli-streaming-gateway-fetch.md.
416
418
  */
417
419
  async function gatewayFetchStream(input) {
418
420
  if (__kodyBridge === null || typeof __kodyBridge.gatewayFetch !== 'function') {
@@ -562,7 +564,7 @@ export const workflows = {
562
564
  // kody:@scope/package/export import when the name is known, or import(specifier)
563
565
  // when the name is data. Under --local, static kody:@ imports are resolved into
564
566
  // the workerd module list via POST /v1/local-execute/package-graph (see
565
- // local-package-graph.ts / kentcdodds/kody#2808) \u2014 never a whole-module
567
+ // local-package-graph.ts / kody-hq/kody#2808) \u2014 never a whole-module
566
568
  // CapabilityProxy \u2192 kody.execute hop.
567
569
  export const packages = null;
568
570
 
@@ -1048,7 +1050,7 @@ var k = () => {
1048
1050
  // src/local-package-graph.ts
1049
1051
  var esModuleLexerReady = init();
1050
1052
  var localPackageGraphPath = "v1/local-execute/package-graph";
1051
- var localPackageGraphPlatformIssueUrl = "https://github.com/kentcdodds/kody/issues/2808";
1053
+ var localPackageGraphPlatformIssueUrl = "https://github.com/kody-hq/kody/issues/2808";
1052
1054
  var packageGraphInlineCodePreferImportsChars = 4e5;
1053
1055
  function synthesizePackageGraphEntry(imports) {
1054
1056
  const unique = [...new Set(imports)].sort(
@@ -1106,6 +1108,33 @@ function flatAliasForBareKodyBuiltin(specifier) {
1106
1108
  if (!name || /[/\\]/.test(name)) return null;
1107
1109
  return `.__kody_builtin__${name}.js`;
1108
1110
  }
1111
+ function needsWorkerdAbsoluteImportPrefix(specifier) {
1112
+ if (specifier.startsWith("/")) return false;
1113
+ if (specifier.startsWith("kody:@")) return true;
1114
+ if (specifier === localWorkerModuleNames.runtimeFlatAlias) return true;
1115
+ if (specifier.startsWith(".__kody_builtin__") && specifier.endsWith(".js")) {
1116
+ return true;
1117
+ }
1118
+ return false;
1119
+ }
1120
+ async function absolutizeWorkerdPackageImports(esModule) {
1121
+ await esModuleLexerReady;
1122
+ const edits = parseModuleImports(esModule).filter((im) => typeof im.specifier === "string").map((im) => {
1123
+ const specifier = im.specifier;
1124
+ if (!needsWorkerdAbsoluteImportPrefix(specifier)) return null;
1125
+ return { start: im.start, end: im.end, absolute: `/${specifier}` };
1126
+ }).filter(
1127
+ (edit) => edit !== null
1128
+ ).sort((a, b) => b.start - a.start);
1129
+ let out = esModule;
1130
+ for (const edit of edits) {
1131
+ const raw = esModule.slice(edit.start, edit.end);
1132
+ const quote = raw.startsWith("'") || raw.startsWith('"') ? raw[0] : null;
1133
+ const replacement = quote ? `${quote}${edit.absolute}${quote}` : edit.absolute;
1134
+ out = `${out.slice(0, edit.start)}${replacement}${out.slice(edit.end)}`;
1135
+ }
1136
+ return out;
1137
+ }
1109
1138
  async function rewriteBareKodyBuiltinImports(esModule) {
1110
1139
  await esModuleLexerReady;
1111
1140
  const edits = parseModuleImports(esModule).filter((im) => typeof im.specifier === "string").map((im) => {
@@ -1156,7 +1185,7 @@ async function resolveLocalPackageGraph(input) {
1156
1185
  mergePackageGraphs,
1157
1186
  resolveLocalPackageModules,
1158
1187
  tryLoadSelfManifest
1159
- } = await import("./mock-local-deps-2VVNJLFF.js");
1188
+ } = await import("./mock-local-deps-VSBC6Q2Y.js");
1160
1189
  if (imports.length > 0 && input.packageRoot) {
1161
1190
  const selfManifest = await tryLoadSelfManifest(input.packageRoot);
1162
1191
  const local = await resolveLocalPackageModules({
@@ -1404,10 +1433,11 @@ export {
1404
1433
  listSavedPackageImports,
1405
1434
  hasSavedPackageImports,
1406
1435
  hasLiteralDynamicSavedPackageImports,
1436
+ absolutizeWorkerdPackageImports,
1407
1437
  rewriteBareKodyBuiltinImports,
1408
1438
  LocalPackageGraphError,
1409
1439
  localExecuteGatewayFetchShimModuleName,
1410
1440
  writePackageModuleFiles,
1411
1441
  resolveLocalPackageGraph
1412
1442
  };
1413
- //# sourceMappingURL=chunk-2IHISXHN.js.map
1443
+ //# sourceMappingURL=chunk-ZL5FBDVT.js.map