@kodycodes/cli 3.28.0 → 3.28.2

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 (46) hide show
  1. package/dist/{auth-W7H6R6G5.js → auth-4MJQCPHH.js} +3 -3
  2. package/dist/bin.js +4 -4
  3. package/dist/{chunk-QFDBRFG5.js → chunk-6UYRLITC.js} +2 -2
  4. package/dist/{chunk-QXP526E7.js → chunk-6YL6C3LL.js} +844 -44
  5. package/dist/chunk-6YL6C3LL.js.map +6 -0
  6. package/dist/{chunk-V35GMVDB.js → chunk-AAPTGBH2.js} +2 -2
  7. package/dist/{chunk-HJMRMBFW.js → chunk-AK7QC5Q6.js} +1 -7
  8. package/dist/chunk-AK7QC5Q6.js.map +6 -0
  9. package/dist/{chunk-NHX6KT7Q.js → chunk-AUY7E5W4.js} +2 -2
  10. package/dist/{chunk-MO2QBCJE.js → chunk-C56EW2UR.js} +130 -36
  11. package/dist/chunk-C56EW2UR.js.map +6 -0
  12. package/dist/{chunk-STHICAUI.js → chunk-ZVKF65ZW.js} +2 -2
  13. package/dist/cli.d.ts +1 -0
  14. package/dist/cli.js +6 -4
  15. package/dist/command-help.d.ts +10 -0
  16. package/dist/{commands-XRZICB4E.js → commands-KJ2LKZPN.js} +2 -57
  17. package/dist/{commands-XRZICB4E.js.map → commands-KJ2LKZPN.js.map} +1 -1
  18. package/dist/{dev-command-7UJGTUZL.js → dev-command-AD3RRODH.js} +4 -4
  19. package/dist/{git-credential-JJBJSSFJ.js → git-credential-AYJBXNYA.js} +4 -4
  20. package/dist/{local-package-run-G7LQHXMJ.js → local-package-run-PUB3K7FH.js} +3 -3
  21. package/dist/mock/mock-server.d.ts +2 -1
  22. package/dist/mock/mock-storage.d.ts +21 -1
  23. package/dist/{mock-dep-resolve-WD4PG7JB.js → mock-dep-resolve-YLYKZ64B.js} +2 -2
  24. package/dist/{mock-server-AVHUTXAL.js → mock-server-TDKUEG5W.js} +2 -2
  25. package/dist/{open-api-client-TAWXGPDD.js → open-api-client-5BVEGHDF.js} +2 -2
  26. package/dist/{remote-execute-HQRDC57G.js → remote-execute-NXD5ASKQ.js} +2 -2
  27. package/dist/{setup-git-L6KMU43V.js → setup-git-DHJHWR2L.js} +3 -3
  28. package/dist/{whoami-J5V52HIV.js → whoami-JXSVR7Y5.js} +3 -3
  29. package/package.json +1 -1
  30. package/dist/chunk-HJMRMBFW.js.map +0 -6
  31. package/dist/chunk-MO2QBCJE.js.map +0 -6
  32. package/dist/chunk-QXP526E7.js.map +0 -6
  33. /package/dist/{auth-W7H6R6G5.js.map → auth-4MJQCPHH.js.map} +0 -0
  34. /package/dist/{chunk-QFDBRFG5.js.map → chunk-6UYRLITC.js.map} +0 -0
  35. /package/dist/{chunk-V35GMVDB.js.map → chunk-AAPTGBH2.js.map} +0 -0
  36. /package/dist/{chunk-NHX6KT7Q.js.map → chunk-AUY7E5W4.js.map} +0 -0
  37. /package/dist/{chunk-STHICAUI.js.map → chunk-ZVKF65ZW.js.map} +0 -0
  38. /package/dist/{dev-command-7UJGTUZL.js.map → dev-command-AD3RRODH.js.map} +0 -0
  39. /package/dist/{git-credential-JJBJSSFJ.js.map → git-credential-AYJBXNYA.js.map} +0 -0
  40. /package/dist/{local-package-run-G7LQHXMJ.js.map → local-package-run-PUB3K7FH.js.map} +0 -0
  41. /package/dist/{mock-dep-resolve-WD4PG7JB.js.map → mock-dep-resolve-YLYKZ64B.js.map} +0 -0
  42. /package/dist/{mock-server-AVHUTXAL.js.map → mock-server-TDKUEG5W.js.map} +0 -0
  43. /package/dist/{open-api-client-TAWXGPDD.js.map → open-api-client-5BVEGHDF.js.map} +0 -0
  44. /package/dist/{remote-execute-HQRDC57G.js.map → remote-execute-NXD5ASKQ.js.map} +0 -0
  45. /package/dist/{setup-git-L6KMU43V.js.map → setup-git-DHJHWR2L.js.map} +0 -0
  46. /package/dist/{whoami-J5V52HIV.js.map → whoami-JXSVR7Y5.js.map} +0 -0
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-E4R3Y6MM.js";
6
6
  import {
7
7
  resolveLocalExecuteBearer
8
- } from "./chunk-V35GMVDB.js";
8
+ } from "./chunk-AAPTGBH2.js";
9
9
  import {
10
10
  formatToolResult
11
11
  } from "./chunk-46IJPEID.js";
@@ -30,7 +30,7 @@ import {
30
30
  parseCliScopesFlag,
31
31
  refreshGitCredentialHelperPinIfNeeded,
32
32
  resolveCliTokenLifetime
33
- } from "./chunk-STHICAUI.js";
33
+ } from "./chunk-ZVKF65ZW.js";
34
34
  import {
35
35
  orgEnvVar,
36
36
  orgSlugFromFlag
@@ -75,6 +75,800 @@ import { parseArgs } from "node:util";
75
75
  import { statSync } from "node:fs";
76
76
  import { readFile } from "node:fs/promises";
77
77
 
78
+ // src/command-help.ts
79
+ var jsonFlag = ["--json", "Print JSON for agents"];
80
+ var orgFlag = [
81
+ "--org <slug>",
82
+ "Run as this org for one call (else KODY_ORG, then the active org)"
83
+ ];
84
+ var mcpUrlFlag = [
85
+ "--mcp-url <url>",
86
+ "Kody MCP URL (default from KODY_MCP_URL)"
87
+ ];
88
+ var apiUrlFlag = [
89
+ "--api-url <url>",
90
+ "Kody API URL (default from KODY_API_URL)"
91
+ ];
92
+ var tokenFlag = [
93
+ "--token <token>",
94
+ "Scoped API token (prefer the KODY_API_TOKEN env var)"
95
+ ];
96
+ var targetFlag = [
97
+ "--target prod|mock",
98
+ "Where API hops go: real Kody or the built-in local mock"
99
+ ];
100
+ var ecContextFlag = [
101
+ "--context <ec id>",
102
+ "Execution context on this machine (default: the only one registered)"
103
+ ];
104
+ var devTargetFlag = [
105
+ "--target prod|mock",
106
+ "Where API hops go (default mock for kody dev)"
107
+ ];
108
+ var dryRunFlag = [
109
+ "--dry-run",
110
+ "Print the module path and params without invoking"
111
+ ];
112
+ var commandHelpTree = [
113
+ {
114
+ name: "login",
115
+ summary: "Sign in to Kody in the browser (or with a device code)",
116
+ usage: [
117
+ "kody login [--mcp-url <url>] [--org <slug>] [--no-browser | --device]"
118
+ ],
119
+ flags: [
120
+ [
121
+ "--org <slug>",
122
+ "Bind the login to this org (adds or replaces that org login)"
123
+ ],
124
+ ["--no-browser", "Print the sign-in URL instead of opening a browser"],
125
+ ["--device", "Sign in with a device code (headless machines)"],
126
+ mcpUrlFlag
127
+ ]
128
+ },
129
+ {
130
+ name: "logout",
131
+ summary: "Remove the active org login (or one org with --org)",
132
+ usage: ["kody logout [--org <slug>] [--mcp-url <url>] [--api-url <url>]"],
133
+ flags: [
134
+ ["--org <slug>", "Remove only this org login"],
135
+ mcpUrlFlag,
136
+ apiUrlFlag
137
+ ]
138
+ },
139
+ {
140
+ name: "org",
141
+ summary: "List logged-in orgs or switch the active org",
142
+ usage: ["kody org <command> [flags]"],
143
+ subcommands: [
144
+ {
145
+ name: "list",
146
+ summary: "Show logged-in orgs and mark the active one",
147
+ usage: ["kody org list [--json] [--mcp-url <url>]"],
148
+ flags: [jsonFlag, mcpUrlFlag]
149
+ },
150
+ {
151
+ name: "use",
152
+ summary: "Switch the active org (interactive chooser without a slug on a TTY)",
153
+ usage: ["kody org use [<slug>] [--mcp-url <url>]"],
154
+ flags: [mcpUrlFlag]
155
+ }
156
+ ]
157
+ },
158
+ {
159
+ name: "status",
160
+ summary: "Show login, token, and server status",
161
+ usage: ["kody status [--mcp-url <url>] [--api-url <url>]"],
162
+ flags: [mcpUrlFlag, apiUrlFlag]
163
+ },
164
+ {
165
+ name: "auth",
166
+ summary: "Store scoped API tokens and set up Git credentials",
167
+ usage: ["kody auth <command> [flags]"],
168
+ subcommands: [
169
+ {
170
+ name: "bootstrap",
171
+ summary: "Redeem a kody_bc_\u2026 code (or mint one with --scopes) and store the token",
172
+ usage: [
173
+ "kody auth bootstrap (--code <kody_bc_\u2026> | --scopes <list>) (--lifetime short|long | --idle-ttl-seconds <n> --max-lifetime-seconds <n>)",
174
+ " [--token <token>] [--mcp-url <url>] [--api-url <url>]"
175
+ ],
176
+ flags: [
177
+ [
178
+ "--code <kody_bc_\u2026>",
179
+ "One-shot bootstrap code from cliCredentialBootstrap"
180
+ ],
181
+ [
182
+ "--scopes <list>",
183
+ "Mint a code with exactly these scopes (replaces the defaults)"
184
+ ],
185
+ [
186
+ "--lifetime short|long",
187
+ "short = 1h idle / 24h max; long = 14d idle / 3mo max"
188
+ ],
189
+ [
190
+ "--idle-ttl-seconds <n>",
191
+ "Custom idle lifetime (with --max-lifetime-seconds)"
192
+ ],
193
+ [
194
+ "--max-lifetime-seconds <n>",
195
+ "Custom max lifetime (with --idle-ttl-seconds)"
196
+ ],
197
+ tokenFlag,
198
+ mcpUrlFlag,
199
+ apiUrlFlag
200
+ ]
201
+ },
202
+ {
203
+ name: "setup-git",
204
+ summary: "Install a Git credential helper for https://kody.codes/@owner/name.git",
205
+ usage: [
206
+ "kody auth setup-git [--lifetime long|short] [--scopes <list>] [--token <token>] [--mcp-url <url>] [--api-url <url>]"
207
+ ],
208
+ flags: [
209
+ [
210
+ "--lifetime long|short",
211
+ "Lifetime of the minted token (default long)"
212
+ ],
213
+ [
214
+ "--scopes <list>",
215
+ "Extra scopes beyond package:read and package:write"
216
+ ],
217
+ tokenFlag,
218
+ mcpUrlFlag,
219
+ apiUrlFlag
220
+ ]
221
+ },
222
+ {
223
+ name: "remove-git",
224
+ summary: "Remove the Git credential helper and revoke its stored token",
225
+ usage: ["kody auth remove-git [--mcp-url <url>] [--api-url <url>]"],
226
+ flags: [mcpUrlFlag, apiUrlFlag]
227
+ }
228
+ ]
229
+ },
230
+ {
231
+ name: "git-credential",
232
+ summary: "Git credential helper invoked by git after `kody auth setup-git`",
233
+ usage: ["kody git-credential <get|store|erase>"],
234
+ notes: [
235
+ "Not meant for interactive use; git calls it with get, store, or erase."
236
+ ]
237
+ },
238
+ {
239
+ name: "whoami",
240
+ summary: "Show who the CLI acts as and which credential it picked",
241
+ usage: [
242
+ "kody whoami [--org <slug>] [--target prod|mock] [--mcp-url <url>] [--token <token>] [--api-url <url>] [--json]"
243
+ ],
244
+ flags: [orgFlag, targetFlag, mcpUrlFlag, tokenFlag, apiUrlFlag, jsonFlag]
245
+ },
246
+ {
247
+ name: "search",
248
+ summary: "Search capabilities, packages, and docs",
249
+ usage: [
250
+ "kody search [query] [--org <slug>] [--entity <ref>] [--domain <id>] [--limit <n>] [--target prod|mock] [--token <token>] [--api-url <url>] [--json]"
251
+ ],
252
+ flags: [
253
+ orgFlag,
254
+ ["--entity <ref>", "Look up one entity by ref"],
255
+ ["--domain <id>", "Limit results to one capability domain"],
256
+ ["--limit <n>", "Maximum results"],
257
+ targetFlag,
258
+ tokenFlag,
259
+ apiUrlFlag,
260
+ jsonFlag
261
+ ]
262
+ },
263
+ {
264
+ name: "api",
265
+ summary: "Call one Open API operation by operationId",
266
+ usage: [
267
+ "kody api <operationId> [--org <slug>] [--params <json>] [--token <token>] [--api-url <url>] [--json]"
268
+ ],
269
+ flags: [
270
+ orgFlag,
271
+ ["--params <json>", "Flat JSON params (same shape as the MCP api tool)"],
272
+ tokenFlag,
273
+ apiUrlFlag,
274
+ jsonFlag
275
+ ],
276
+ notes: ["Example: kody api usageGet --params '{}'"]
277
+ },
278
+ {
279
+ name: "package",
280
+ summary: "Publish packages and manage who can use them",
281
+ usage: ["kody package <command> [flags]"],
282
+ subcommands: [
283
+ {
284
+ name: "publish",
285
+ summary: "Publish the package in this git repo (packagePublishExternalPush)",
286
+ usage: [
287
+ "kody package publish [<@owner/leaf|package_id>] [--build local|context] [--context <name|cloud>] [--org <slug>] [--params <json>] [--token <token>] [--api-url <url>] [--json]"
288
+ ],
289
+ flags: [
290
+ [
291
+ "--build local|context",
292
+ "Build on this machine or on an execution context"
293
+ ],
294
+ [
295
+ "--context <name|cloud>",
296
+ "Execution context that builds it (with --build context)"
297
+ ],
298
+ orgFlag,
299
+ ["--params <json>", "Extra publish fields, e.g. allow_force"],
300
+ tokenFlag,
301
+ apiUrlFlag,
302
+ jsonFlag
303
+ ]
304
+ },
305
+ {
306
+ name: "collaborators",
307
+ summary: "List the teams and people who can use a package",
308
+ usage: [
309
+ "kody package collaborators <package> [--org <slug>] [--json] [--token <token>] [--api-url <url>]"
310
+ ],
311
+ flags: [orgFlag, jsonFlag, tokenFlag, apiUrlFlag]
312
+ },
313
+ {
314
+ name: "grant",
315
+ summary: "Share a package with a team or user, or change their preset",
316
+ usage: [
317
+ "kody package grant <package> (--team <slug> | --user <username>) [--preset read|use|contribute|manage] [--allow-changes-despite-unmappable-credentials | --disallow-changes-despite-unmappable-credentials] [--org <slug>] [--json]"
318
+ ],
319
+ flags: [
320
+ ["--team <slug>", "Team to share with"],
321
+ [
322
+ "--user <username>",
323
+ "Person to share with (outside the org adds an outside collaborator)"
324
+ ],
325
+ [
326
+ "--preset read|use|contribute|manage",
327
+ "What they can do (default use)"
328
+ ],
329
+ [
330
+ "--allow-changes-despite-unmappable-credentials",
331
+ "Let them change it even if credentials cannot be mapped"
332
+ ],
333
+ [
334
+ "--disallow-changes-despite-unmappable-credentials",
335
+ "Turn that back off"
336
+ ],
337
+ orgFlag,
338
+ jsonFlag
339
+ ]
340
+ },
341
+ {
342
+ name: "revoke",
343
+ summary: "Remove a team, user, or grant from a package",
344
+ usage: [
345
+ "kody package revoke <package> (--team <slug> | --user <username> | --grant <grant_id>) [--org <slug>] [--json]"
346
+ ],
347
+ flags: [
348
+ ["--team <slug>", "Team to remove"],
349
+ ["--user <username>", "Person to remove"],
350
+ ["--grant <grant_id>", "Grant to remove"],
351
+ orgFlag,
352
+ jsonFlag
353
+ ]
354
+ }
355
+ ]
356
+ },
357
+ {
358
+ name: "execute",
359
+ summary: "Run a module on Kody cloud, an execution context, or this machine",
360
+ usage: [
361
+ "kody execute [--org <slug>] [--invoke <ref> | --code <esm> | --file <path>] [--params <json>] [--conversation-id <id>] [--json]",
362
+ " [--credential <key=name>]\u2026 [--context <id|name>] [--fallback chain] [--requires fs,lan] [--chain <a,b,cloud>] [--target prod|mock] [--token <token>] [--api-url <url>] [--local] [--allow-private-network]"
363
+ ],
364
+ flags: [
365
+ orgFlag,
366
+ [
367
+ "--invoke <ref>",
368
+ "Run a package export (kody:@scope/pkg/export, or ./export in a package dir)"
369
+ ],
370
+ ["--code <esm>", "Run this module source"],
371
+ ["--file <path>", "Bundle and run this file"],
372
+ ["--params <json>", "Params passed to the module"],
373
+ ["--conversation-id <id>", "Conversation to attach the run to"],
374
+ [
375
+ "--credential <key=name>",
376
+ "Pick the credential for credential(key) calls (repeatable)"
377
+ ],
378
+ ["--context <id|name>", "Run on one execution context"],
379
+ [
380
+ "--fallback chain",
381
+ "With --context, fall back to the chain when it cannot run"
382
+ ],
383
+ [
384
+ "--requires fs,lan",
385
+ "Skip targets without local files or the local network"
386
+ ],
387
+ ["--chain <a,b,cloud>", "This run's own ordered chain"],
388
+ targetFlag,
389
+ tokenFlag,
390
+ apiUrlFlag,
391
+ ["--local", "Run in local workerd on this machine (Node.js 22+)"],
392
+ [
393
+ "--allow-private-network",
394
+ "Let --local code fetch private and local addresses"
395
+ ],
396
+ [
397
+ "--reset-storage",
398
+ "With --target mock, wipe mock scratch storage first"
399
+ ],
400
+ jsonFlag
401
+ ]
402
+ },
403
+ {
404
+ name: "dev",
405
+ summary: "Serve and test an unpublished package locally",
406
+ usage: ["kody dev [serve] [flags]", "kody dev <command> [flags]"],
407
+ notes: ["With no command, `kody dev` runs `kody dev serve`."],
408
+ subcommands: [
409
+ {
410
+ name: "serve",
411
+ summary: "Serve kody.app.entry on localhost with hot reload (the default)",
412
+ usage: [
413
+ "kody dev serve [--org <slug>] [--target prod|mock] [--reset-storage] [--passthrough <host,\u2026>] [--port <n>] [--app-base-path <path>] [--allow-private-network] [--no-live-reload] [--json] [--ready-file <path>]"
414
+ ],
415
+ flags: [
416
+ orgFlag,
417
+ devTargetFlag,
418
+ [
419
+ "--reset-storage",
420
+ "With --target mock, wipe mock scratch storage first"
421
+ ],
422
+ ["--port <n>", "Exact port (0 = any; default is stable per package)"],
423
+ [
424
+ "--app-base-path <path>",
425
+ "Public mount path stripped before workerd"
426
+ ],
427
+ [
428
+ "--allow-private-network",
429
+ "Let app code fetch private and local addresses"
430
+ ],
431
+ [
432
+ "--no-live-reload",
433
+ "Turn off HTML live reload and the error overlay"
434
+ ],
435
+ [
436
+ "--passthrough <host,\u2026>",
437
+ "With .kody/mocks.ts on mock, let these hosts use the real network"
438
+ ],
439
+ [
440
+ "--json",
441
+ "Stream NDJSON events (ready, rebuild_ok, build_error, \u2026)"
442
+ ],
443
+ [
444
+ "--ready-file <path>",
445
+ "Write { url, port, basePath, pid } once ready"
446
+ ]
447
+ ]
448
+ },
449
+ {
450
+ name: "fetch",
451
+ summary: "Request a path from the running dev server (or a one-shot server)",
452
+ usage: [
453
+ "kody dev fetch <path> [--method <verb>] [--body <file>] [--target prod|mock] [--json] [--no-attach]"
454
+ ],
455
+ flags: [
456
+ ["--method <verb>", "HTTP method (default GET)"],
457
+ ["--body <file>", "Request body file"],
458
+ devTargetFlag,
459
+ jsonFlag,
460
+ [
461
+ "--no-attach",
462
+ "Boot a one-shot server instead of using a running kody dev"
463
+ ]
464
+ ]
465
+ },
466
+ {
467
+ name: "job",
468
+ summary: "Run a job once (never schedules locally)",
469
+ usage: [
470
+ "kody dev job <name> [--target prod|mock] [--dry-run] [--json]"
471
+ ],
472
+ flags: [devTargetFlag, dryRunFlag, jsonFlag]
473
+ },
474
+ {
475
+ name: "webhook",
476
+ summary: "Deliver a webhook payload to the package",
477
+ usage: [
478
+ "kody dev webhook <name> --body <file.json> [--target prod|mock] [--dry-run] [--json]"
479
+ ],
480
+ flags: [
481
+ ["--body <file.json>", "Webhook payload"],
482
+ devTargetFlag,
483
+ dryRunFlag,
484
+ jsonFlag
485
+ ]
486
+ },
487
+ {
488
+ name: "emit",
489
+ summary: "Emit an event to the package's subscriptions",
490
+ usage: [
491
+ "kody dev emit <event> --body <event.json> [--target prod|mock] [--dry-run] [--json]"
492
+ ],
493
+ flags: [
494
+ ["--body <event.json>", "Event payload"],
495
+ devTargetFlag,
496
+ dryRunFlag,
497
+ jsonFlag
498
+ ]
499
+ },
500
+ {
501
+ name: "check",
502
+ summary: "Bundle and run the publish checks without running the package",
503
+ usage: [
504
+ "kody dev check [--target prod|mock] [--offline] [--debug] [--json]"
505
+ ],
506
+ flags: [
507
+ devTargetFlag,
508
+ ["--offline", "Skip the server publish checks"],
509
+ ["--debug", "Print the publish checks call to stderr"],
510
+ jsonFlag
511
+ ]
512
+ }
513
+ ]
514
+ },
515
+ {
516
+ name: "install",
517
+ summary: "Add Kody as an MCP server to local agent clients",
518
+ usage: [
519
+ "kody install [--mcp-url <url>] [--clients <ids>] [--yes] [--project] [--json]"
520
+ ],
521
+ flags: [
522
+ mcpUrlFlag,
523
+ ["--clients <ids>", "Comma-separated client ids"],
524
+ ["--yes", "Skip the confirmation prompt"],
525
+ ["--project", "Write project-level config instead of user-level"],
526
+ jsonFlag
527
+ ]
528
+ },
529
+ {
530
+ name: "skill",
531
+ summary: "Install the Kody agent skill",
532
+ usage: ["kody skill <command> [flags]"],
533
+ subcommands: [
534
+ {
535
+ name: "install",
536
+ summary: "Install the Kody skill for local agents",
537
+ usage: ["kody skill install [--project]"],
538
+ flags: [
539
+ ["--project", "Install into this project instead of your user dir"]
540
+ ]
541
+ }
542
+ ]
543
+ },
544
+ {
545
+ name: "version",
546
+ summary: "Print the CLI version",
547
+ usage: ["kody version"]
548
+ },
549
+ {
550
+ name: "context",
551
+ summary: "Register and manage execution contexts (machines that run your code)",
552
+ usage: ["kody context <command> [flags]"],
553
+ notes: [
554
+ "Execution contexts are an experiment. Turn it on at https://kody.codes/account/experiments."
555
+ ],
556
+ subcommands: [
557
+ {
558
+ name: "register",
559
+ summary: "Register this machine as an execution context",
560
+ usage: ["kody context register --name <name> [--org <slug>] [--json]"],
561
+ flags: [["--name <name>", "Name for this machine"], orgFlag, jsonFlag]
562
+ },
563
+ {
564
+ name: "list",
565
+ summary: "List your execution contexts",
566
+ usage: ["kody context list [--org <slug>] [--json]"],
567
+ flags: [orgFlag, jsonFlag]
568
+ },
569
+ {
570
+ name: "revoke",
571
+ summary: "Revoke a context: kill its key, disconnect it, cancel its runs",
572
+ usage: ["kody context revoke <name|ec id> [--org <slug>] [--json]"],
573
+ flags: [orgFlag, jsonFlag]
574
+ },
575
+ {
576
+ name: "delete",
577
+ summary: "Permanently delete a revoked context",
578
+ usage: ["kody context delete <name|ec id> [--org <slug>] [--json]"],
579
+ flags: [orgFlag, jsonFlag]
580
+ },
581
+ {
582
+ name: "cancel-run",
583
+ summary: "Cancel one run on a context",
584
+ usage: [
585
+ "kody context cancel-run <name|ec id> <run id> [--org <slug>] [--json]"
586
+ ],
587
+ flags: [orgFlag, jsonFlag]
588
+ },
589
+ {
590
+ name: "policy",
591
+ summary: "Show or change which host folders runs on this machine can use",
592
+ usage: ["kody context policy [<command>] [flags]"],
593
+ notes: ["With no command, shows the policy."],
594
+ subcommands: [
595
+ {
596
+ name: "show",
597
+ summary: "Show the host folder policy",
598
+ usage: ["kody context policy show [--json]"],
599
+ flags: [jsonFlag]
600
+ },
601
+ {
602
+ name: "allow",
603
+ summary: "Allow runs to use a host folder",
604
+ usage: ["kody context policy allow <path> [--mode ro|rw] [--json]"],
605
+ flags: [
606
+ ["--mode ro|rw", "Read-only or read-write (default ro)"],
607
+ jsonFlag
608
+ ]
609
+ },
610
+ {
611
+ name: "remove",
612
+ summary: "Remove a host folder from the policy",
613
+ usage: ["kody context policy remove <path> [--json]"],
614
+ flags: [jsonFlag]
615
+ }
616
+ ]
617
+ },
618
+ {
619
+ name: "commands",
620
+ summary: "Turn host commands (your own runs on this machine) on or off",
621
+ usage: [
622
+ "kody context commands [<command>] [--context <name>] [--json]"
623
+ ],
624
+ flags: [["--context <name>", "Context to check or turn off"], jsonFlag],
625
+ notes: ["With no command, shows the status."],
626
+ subcommands: [
627
+ {
628
+ name: "status",
629
+ summary: "Show whether host commands are on",
630
+ usage: ["kody context commands status [--context <name>] [--json]"],
631
+ flags: [["--context <name>", "Context to check"], jsonFlag]
632
+ },
633
+ {
634
+ name: "on",
635
+ summary: "Turn host commands on (only on this machine)",
636
+ usage: ["kody context commands on [--json]"],
637
+ flags: [jsonFlag]
638
+ },
639
+ {
640
+ name: "off",
641
+ summary: "Turn host commands off",
642
+ usage: ["kody context commands off [--context <name>] [--json]"],
643
+ flags: [
644
+ [
645
+ "--context <name>",
646
+ "Context to turn off (works from any machine)"
647
+ ],
648
+ jsonFlag
649
+ ]
650
+ }
651
+ ]
652
+ }
653
+ ]
654
+ },
655
+ {
656
+ name: "chain",
657
+ summary: "Show or change your default execution chain",
658
+ usage: ["kody chain [<command>] [--org <slug>] [--json]"],
659
+ flags: [orgFlag, jsonFlag],
660
+ notes: ["With no command, shows the chain. Offline contexts are skipped."],
661
+ subcommands: [
662
+ {
663
+ name: "show",
664
+ summary: "Show your default chain",
665
+ usage: ["kody chain show [--org <slug>] [--json]"],
666
+ flags: [orgFlag, jsonFlag]
667
+ },
668
+ {
669
+ name: "add",
670
+ summary: "Add a context to your chain (before cloud)",
671
+ usage: ["kody chain add <name> [--org <slug>] [--json]"],
672
+ flags: [orgFlag, jsonFlag]
673
+ },
674
+ {
675
+ name: "remove",
676
+ summary: "Remove a context from your chain",
677
+ usage: ["kody chain remove <name> [--org <slug>] [--json]"],
678
+ flags: [orgFlag, jsonFlag]
679
+ }
680
+ ]
681
+ },
682
+ {
683
+ name: "connect",
684
+ summary: "Register this machine and install the daemon as a background service",
685
+ usage: [
686
+ "kody connect --name <name> [--org <slug>] [--no-install] [--key-storage keyring|file] [--yes]"
687
+ ],
688
+ flags: [
689
+ ["--name <name>", "Name for this machine"],
690
+ orgFlag,
691
+ ["--no-install", "Register only; do not install the background service"],
692
+ ["--key-storage keyring|file", "Where the service reads the machine key"],
693
+ ["--yes", "Skip confirmation prompts"]
694
+ ]
695
+ },
696
+ {
697
+ name: "daemon",
698
+ summary: "Run the execution-context daemon, or manage its background service",
699
+ usage: [
700
+ "kody daemon [--context <ec id>] [--max-concurrent <n>]",
701
+ "kody daemon <command> [flags]"
702
+ ],
703
+ flags: [
704
+ ecContextFlag,
705
+ ["--max-concurrent <n>", "Runs at once (foreground daemon)"]
706
+ ],
707
+ notes: [
708
+ "With no command, runs the daemon in the foreground until Ctrl-C.",
709
+ "The service is systemd --user on Linux (and WSL with systemd), a LaunchAgent on macOS, and a Task Scheduler logon task on Windows."
710
+ ],
711
+ subcommands: [
712
+ {
713
+ name: "install",
714
+ summary: "Install the daemon as a per-user background service",
715
+ usage: [
716
+ "kody daemon install [--context <ec id>] [--max-concurrent <n>] [--key-storage keyring|file] [--yes]"
717
+ ],
718
+ flags: [
719
+ ecContextFlag,
720
+ ["--max-concurrent <n>", "Runs at once"],
721
+ [
722
+ "--key-storage keyring|file",
723
+ "Where the service reads the machine key"
724
+ ],
725
+ ["--yes", "Skip confirmation prompts"]
726
+ ]
727
+ },
728
+ {
729
+ name: "status",
730
+ summary: "Show the service state and each problem with its fix",
731
+ usage: ["kody daemon status [--context <ec id>] [--json]"],
732
+ flags: [ecContextFlag, jsonFlag]
733
+ },
734
+ {
735
+ name: "logs",
736
+ summary: "Print the daemon log",
737
+ usage: [
738
+ "kody daemon logs [--context <ec id>] [--lines <n>] [--follow]"
739
+ ],
740
+ flags: [
741
+ ecContextFlag,
742
+ ["--lines <n>", "Lines from the end (default 100)"],
743
+ ["--follow", "Keep printing new lines"]
744
+ ]
745
+ },
746
+ {
747
+ name: "restart",
748
+ summary: "Restart the service after runs in flight finish",
749
+ usage: ["kody daemon restart [--context <ec id>]"],
750
+ flags: [ecContextFlag]
751
+ },
752
+ {
753
+ name: "start",
754
+ summary: "Start the stopped service",
755
+ usage: ["kody daemon start [--context <ec id>]"],
756
+ flags: [ecContextFlag]
757
+ },
758
+ {
759
+ name: "stop",
760
+ summary: "Stop the service after runs in flight finish, without unregistering",
761
+ usage: ["kody daemon stop [--context <ec id>]"],
762
+ flags: [ecContextFlag],
763
+ notes: [
764
+ "The context shows offline, so chains skip it. It stays stopped until `kody daemon start` or the next login or boot."
765
+ ]
766
+ },
767
+ {
768
+ name: "uninstall",
769
+ summary: "Remove the background service",
770
+ usage: [
771
+ "kody daemon uninstall [--context <ec id>] [--unregister | --no-unregister]"
772
+ ],
773
+ flags: [
774
+ ecContextFlag,
775
+ ["--unregister", "Also revoke the execution context"],
776
+ ["--no-unregister", "Keep the execution context registered"]
777
+ ]
778
+ },
779
+ {
780
+ name: "auto-update",
781
+ summary: "Show or change daemon auto-update on this machine",
782
+ usage: ["kody daemon auto-update [<command>] [--json]"],
783
+ flags: [jsonFlag],
784
+ notes: ["With no command, shows the status."],
785
+ subcommands: [
786
+ {
787
+ name: "status",
788
+ summary: "Show whether auto-update is on",
789
+ usage: ["kody daemon auto-update status [--json]"],
790
+ flags: [jsonFlag]
791
+ },
792
+ {
793
+ name: "on",
794
+ summary: "Turn auto-update on",
795
+ usage: ["kody daemon auto-update on [--json]"],
796
+ flags: [jsonFlag]
797
+ },
798
+ {
799
+ name: "off",
800
+ summary: "Turn auto-update off",
801
+ usage: ["kody daemon auto-update off [--json]"],
802
+ flags: [jsonFlag]
803
+ }
804
+ ]
805
+ }
806
+ ]
807
+ },
808
+ {
809
+ name: "update",
810
+ summary: "Install the latest CLI and restart daemon services after runs finish",
811
+ usage: ["kody update"]
812
+ },
813
+ {
814
+ name: "help",
815
+ summary: "Show help for kody or one command",
816
+ usage: ["kody help [<command> \u2026]"]
817
+ }
818
+ ];
819
+ function findCommandHelp(path) {
820
+ let nodes = commandHelpTree;
821
+ let deepest = null;
822
+ const matched = [];
823
+ for (const segment of path) {
824
+ const node = nodes.find((candidate) => candidate.name === segment);
825
+ if (!node) break;
826
+ deepest = node;
827
+ matched.push(segment);
828
+ nodes = node.subcommands ?? [];
829
+ }
830
+ return deepest ? { node: deepest, path: matched } : null;
831
+ }
832
+ function formatRows(rows) {
833
+ const width = Math.min(Math.max(...rows.map(([left]) => left.length)) + 2, 34);
834
+ return rows.map(
835
+ ([left, right]) => left.length + 2 > width ? ` ${left}
836
+ ${" ".repeat(width)}${right}` : ` ${left.padEnd(width)}${right}`
837
+ ).join("\n");
838
+ }
839
+ function buildCommandHelp(path) {
840
+ const found = findCommandHelp(path);
841
+ if (!found) return null;
842
+ const { node } = found;
843
+ const full = `kody ${found.path.join(" ")}`;
844
+ const sections = [
845
+ `${full}: ${node.summary} (Kody CLI ${readPackageVersion()})`,
846
+ `Usage:
847
+ ${node.usage.map((line) => ` ${line}`).join("\n")}`
848
+ ];
849
+ if (node.subcommands?.length) {
850
+ sections.push(
851
+ `Commands:
852
+ ${formatRows(
853
+ node.subcommands.map((sub) => [sub.name, sub.summary])
854
+ )}`
855
+ );
856
+ }
857
+ sections.push(
858
+ `Flags:
859
+ ${formatRows([
860
+ ...node.flags ?? [],
861
+ ["-h, --help", "Show help for this command"]
862
+ ])}`
863
+ );
864
+ if (node.notes?.length) sections.push(node.notes.join("\n"));
865
+ if (node.subcommands?.length) {
866
+ sections.push(`Run \`${full} <command> --help\` for a command's flags.`);
867
+ }
868
+ return `${sections.join("\n\n")}
869
+ `;
870
+ }
871
+
78
872
  // src/help.ts
79
873
  function formatOrgsHelpBlock(orgs, indent = " ") {
80
874
  if (orgs.length === 0) {
@@ -129,13 +923,12 @@ Usage:
129
923
  kody context register --name <name> [--org <slug>] | kody context list [--json]
130
924
  kody context revoke <name|ec id> | kody context delete <name|ec id> [--org <slug>] [--json]
131
925
  kody context cancel-run <name|ec id> <run id> [--org <slug>] [--json]
132
- kody context acknowledge <name|ec id> [--org <slug>]
133
926
  kody context policy [show] | allow <path> [--mode ro|rw] | remove <path> [--json]
134
927
  kody chain show | add <name> | remove <name> [--org <slug>] [--json]
135
928
  kody connect --name <name> [--org <slug>] [--no-install] [--key-storage keyring|file] [--yes]
136
929
  kody daemon [--context <ec id>] [--max-concurrent <n>]
137
930
  kody daemon install [--context <ec id>] [--max-concurrent <n>] [--key-storage keyring|file] [--yes]
138
- kody daemon status [--context <ec id>] [--json] | logs [--lines <n>] [--follow] | restart
931
+ kody daemon status [--context <ec id>] [--json] | logs [--lines <n>] [--follow] | restart | start | stop
139
932
  kody daemon uninstall [--context <ec id>] [--unregister | --no-unregister]
140
933
  kody daemon auto-update [on | off | status] [--json]
141
934
  kody update
@@ -149,6 +942,9 @@ Usage:
149
942
  kody install [--mcp-url <url>] [--clients <ids>] [--yes] [--project] [--json]
150
943
  kody skill install [--project]
151
944
 
945
+ Run \`kody <command> --help\` (or \`kody help <command>\`) for one command's
946
+ usage, flags, and subcommands.
947
+
152
948
  kody connect registers this machine as an execution context and installs
153
949
  \`kody daemon\` as a per-user background service (systemd --user on Linux,
154
950
  a LaunchAgent on macOS, a Task Scheduler logon task on Windows, no admin
@@ -989,21 +1785,22 @@ async function runCli(argv = process.argv.slice(2), io = {}) {
989
1785
  }).catch(() => {
990
1786
  });
991
1787
  }
992
- const jsonFlag = argvIncludesJsonFlag(argv);
1788
+ const jsonFlag2 = argvIncludesJsonFlag(argv);
993
1789
  resetActiveCliCredential();
994
1790
  try {
995
1791
  const parsed = resolveCommand(argv);
996
1792
  const helpMcpUrl = mcpUrlFrom({
997
1793
  mcpUrl: typeof parsed.values["mcp-url"] === "string" ? parsed.values["mcp-url"] : void 0
998
1794
  });
999
- if (parsed.values.help && parsed.command !== "help") {
1000
- write(buildUsage({ mcpUrl: helpMcpUrl }));
1795
+ if (parsed.values.help && (parsed.command !== "help" || argv[0] === "help")) {
1796
+ const helpPath = parsed.command === "help" ? parsed.positionals.length > 0 ? parsed.positionals : ["help"] : [parsed.command, ...parsed.positionals];
1797
+ write(buildCommandHelp(helpPath) ?? buildUsage({ mcpUrl: helpMcpUrl }));
1001
1798
  return 0;
1002
1799
  }
1003
1800
  return await dispatch(parsed, write, writeErr);
1004
1801
  } catch (error) {
1005
1802
  const redacted = redactError(error);
1006
- if (jsonFlag) {
1803
+ if (jsonFlag2) {
1007
1804
  write(`${JSON.stringify(formatCliErrorJson(redacted))}
1008
1805
  `);
1009
1806
  }
@@ -1073,8 +1870,8 @@ async function dispatch(parsed, write, writeErr) {
1073
1870
  "`--passthrough` is only used with `execute --target mock` or `kody dev` when `.kody/mocks.ts` is active."
1074
1871
  );
1075
1872
  }
1076
- const orgFlag = typeof parsed.values.org === "string" ? parsed.values.org : void 0;
1077
- if (orgFlag !== void 0 && !orgScopedCommands.has(parsed.command)) {
1873
+ const orgFlag2 = typeof parsed.values.org === "string" ? parsed.values.org : void 0;
1874
+ if (orgFlag2 !== void 0 && !orgScopedCommands.has(parsed.command)) {
1078
1875
  throw new Error(
1079
1876
  `\`--org\` is not used with \`kody ${parsed.command}\`. Use it with login, logout, whoami, search, api, package, execute, or auth.`
1080
1877
  );
@@ -1084,14 +1881,16 @@ async function dispatch(parsed, write, writeErr) {
1084
1881
  `);
1085
1882
  return 0;
1086
1883
  }
1087
- const orgFlagOnly = orgFlag !== void 0 ? orgSlugFromFlag(orgFlag) : void 0;
1884
+ const orgFlagOnly = orgFlag2 !== void 0 ? orgSlugFromFlag(orgFlag2) : void 0;
1088
1885
  const org = resolveOrgSlug({
1089
- flag: orgFlag,
1886
+ flag: orgFlag2,
1090
1887
  activeOrg: loadCredentialStore(mcpUrl)?.activeOrg
1091
1888
  });
1092
1889
  switch (parsed.command) {
1093
1890
  case "help":
1094
- write(buildUsage({ mcpUrl }));
1891
+ write(
1892
+ (parsed.positionals.length > 0 ? buildCommandHelp(parsed.positionals) : null) ?? buildUsage({ mcpUrl })
1893
+ );
1095
1894
  return 0;
1096
1895
  case "context":
1097
1896
  case "chain":
@@ -1101,7 +1900,7 @@ async function dispatch(parsed, write, writeErr) {
1101
1900
  const apiUrl = apiUrlFrom({
1102
1901
  apiUrl: typeof parsed.values["api-url"] === "string" ? parsed.values["api-url"] : void 0
1103
1902
  });
1104
- const { runExecutionContextCommand } = await import("./commands-XRZICB4E.js");
1903
+ const { runExecutionContextCommand } = await import("./commands-KJ2LKZPN.js");
1105
1904
  return await runExecutionContextCommand({
1106
1905
  command: parsed.command,
1107
1906
  positionals: parsed.positionals,
@@ -1131,7 +1930,7 @@ async function dispatch(parsed, write, writeErr) {
1131
1930
  });
1132
1931
  }
1133
1932
  case "login": {
1134
- const { login, loginWithDevice } = await import("./auth-W7H6R6G5.js");
1933
+ const { login, loginWithDevice } = await import("./auth-4MJQCPHH.js");
1135
1934
  const openBrowser = parsed.values["no-browser"] !== true;
1136
1935
  const lifetimeOption = typeof parsed.values.lifetime === "string" ? {
1137
1936
  lifetime: parsed.values.lifetime === "short" ? "short" : "long"
@@ -1381,7 +2180,7 @@ async function dispatch(parsed, write, writeErr) {
1381
2180
  parseGitCredentialAction,
1382
2181
  parseGitCredentialInput,
1383
2182
  readGitCredentialStdin
1384
- } = await import("./git-credential-JJBJSSFJ.js");
2183
+ } = await import("./git-credential-AYJBXNYA.js");
1385
2184
  const action = parseGitCredentialAction(parsed.positionals);
1386
2185
  const raw = await readGitCredentialStdin(process.stdin);
1387
2186
  const output = await handleGitCredential({
@@ -1406,7 +2205,7 @@ async function dispatch(parsed, write, writeErr) {
1406
2205
  apiUrl: typeof parsed.values["api-url"] === "string" ? parsed.values["api-url"] : void 0
1407
2206
  });
1408
2207
  if (target === "mock") {
1409
- const { ensureMockTarget } = await import("./mock-server-AVHUTXAL.js");
2208
+ const { ensureMockTarget } = await import("./mock-server-TDKUEG5W.js");
1410
2209
  const mock = await ensureMockTarget({
1411
2210
  resetStorage: parsed.values["reset-storage"] === true,
1412
2211
  ...org ? { orgSlug: org } : {}
@@ -1441,7 +2240,7 @@ async function dispatch(parsed, write, writeErr) {
1441
2240
  if (mock.started) await mock.server.close();
1442
2241
  }
1443
2242
  }
1444
- const { runWhoami } = await import("./whoami-J5V52HIV.js");
2243
+ const { runWhoami } = await import("./whoami-JXSVR7Y5.js");
1445
2244
  return await runWhoami({
1446
2245
  tokenValues,
1447
2246
  mcpUrl,
@@ -1465,13 +2264,13 @@ async function dispatch(parsed, write, writeErr) {
1465
2264
  let closeMock;
1466
2265
  try {
1467
2266
  if (target === "mock") {
1468
- const { ensureMockTarget } = await import("./mock-server-AVHUTXAL.js");
2267
+ const { ensureMockTarget } = await import("./mock-server-TDKUEG5W.js");
1469
2268
  const mock = await ensureMockTarget({
1470
2269
  resetStorage: parsed.values["reset-storage"] === true
1471
2270
  });
1472
2271
  apiUrl = mock.apiUrl;
1473
2272
  closeMock = mock.started ? () => mock.server.close() : void 0;
1474
- const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-TAWXGPDD.js");
2273
+ const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-5BVEGHDF.js");
1475
2274
  const result2 = await searchWithApiToken2({
1476
2275
  token: mock.token,
1477
2276
  apiUrl,
@@ -1491,7 +2290,7 @@ async function dispatch(parsed, write, writeErr) {
1491
2290
  ...org ? { org } : {}
1492
2291
  });
1493
2292
  if (searchCredential?.token) {
1494
- const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-TAWXGPDD.js");
2293
+ const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-5BVEGHDF.js");
1495
2294
  const result2 = await searchWithApiToken2({
1496
2295
  token: searchCredential.token,
1497
2296
  apiUrl,
@@ -1504,14 +2303,14 @@ async function dispatch(parsed, write, writeErr) {
1504
2303
  write(formatToolResult(result2, json));
1505
2304
  return result2.isError ? 1 : 0;
1506
2305
  }
1507
- const { ensureOpenApiCredentials } = await import("./auth-W7H6R6G5.js");
2306
+ const { ensureOpenApiCredentials } = await import("./auth-4MJQCPHH.js");
1508
2307
  const credentials = await ensureOpenApiCredentials({
1509
2308
  mcpUrl,
1510
2309
  org,
1511
2310
  apiUrl
1512
2311
  });
1513
2312
  noteActiveLoginCredential({ login: credentials, purpose: "session" });
1514
- const { searchWithApiToken } = await import("./open-api-client-TAWXGPDD.js");
2313
+ const { searchWithApiToken } = await import("./open-api-client-5BVEGHDF.js");
1515
2314
  const result = await searchWithApiToken({
1516
2315
  token: credentials.accessToken,
1517
2316
  apiUrl,
@@ -1570,7 +2369,7 @@ async function dispatch(parsed, write, writeErr) {
1570
2369
  (value) => typeof value === "string"
1571
2370
  ) : typeof parsed.values.credential === "string" ? [parsed.values.credential] : void 0
1572
2371
  );
1573
- const executeRouting = (await import("./remote-execute-HQRDC57G.js")).executeRoutingFromFlags(parsed.values);
2372
+ const executeRouting = (await import("./remote-execute-NXD5ASKQ.js")).executeRoutingFromFlags(parsed.values);
1574
2373
  if (executeRouting && local) {
1575
2374
  writeErr(
1576
2375
  "--context, --fallback, --requires, and --chain route cloud execute; drop --local.\n"
@@ -1617,7 +2416,7 @@ async function dispatch(parsed, write, writeErr) {
1617
2416
  }
1618
2417
  try {
1619
2418
  if (target === "mock") {
1620
- const { ensureMockTarget } = await import("./mock-server-AVHUTXAL.js");
2419
+ const { ensureMockTarget } = await import("./mock-server-TDKUEG5W.js");
1621
2420
  const mock = await ensureMockTarget({
1622
2421
  resetStorage: parsed.values["reset-storage"] === true,
1623
2422
  packageId: localPackageRun ? `local:${localPackageRun.kodyId}` : void 0,
@@ -1626,7 +2425,7 @@ async function dispatch(parsed, write, writeErr) {
1626
2425
  apiUrl = mock.apiUrl;
1627
2426
  mockToken = mock.token;
1628
2427
  closeMock = mock.started ? () => mock.server.close() : void 0;
1629
- const { tryResolveMockDepResolve } = await import("./mock-dep-resolve-WD4PG7JB.js");
2428
+ const { tryResolveMockDepResolve } = await import("./mock-dep-resolve-YLYKZ64B.js");
1630
2429
  mockDepResolve = await tryResolveMockDepResolve({
1631
2430
  tokenValues,
1632
2431
  apiUrl: prodApiUrl,
@@ -1635,7 +2434,7 @@ async function dispatch(parsed, write, writeErr) {
1635
2434
  });
1636
2435
  }
1637
2436
  if (localPackageRun) {
1638
- const { buildLocalPackageContext, runLocalPackageModule } = await import("./local-package-run-G7LQHXMJ.js");
2437
+ const { buildLocalPackageContext, runLocalPackageModule } = await import("./local-package-run-PUB3K7FH.js");
1639
2438
  const result2 = await runLocalPackageModule({
1640
2439
  modulePath: localPackageRun.modulePath,
1641
2440
  params: args.params,
@@ -1702,7 +2501,7 @@ async function dispatch(parsed, write, writeErr) {
1702
2501
  allowPrivateNetwork: parsed.values["allow-private-network"] === true,
1703
2502
  onStatus: (message) => writeErr(`${message}
1704
2503
  `)
1705
- }) : cloudToken ? await (await import("./remote-execute-HQRDC57G.js")).runRemoteExecuteWithToken({
2504
+ }) : cloudToken ? await (await import("./remote-execute-NXD5ASKQ.js")).runRemoteExecuteWithToken({
1706
2505
  code: typeof args.code === "string" ? args.code : void 0,
1707
2506
  params: args.params,
1708
2507
  conversationId: args.conversationId,
@@ -1712,7 +2511,7 @@ async function dispatch(parsed, write, writeErr) {
1712
2511
  apiUrl,
1713
2512
  ...org ? { org } : {}
1714
2513
  }) : await (async () => {
1715
- const { ensureOpenApiCredentials } = await import("./auth-W7H6R6G5.js");
2514
+ const { ensureOpenApiCredentials } = await import("./auth-4MJQCPHH.js");
1716
2515
  const session = await ensureOpenApiCredentials({
1717
2516
  mcpUrl,
1718
2517
  org,
@@ -1722,7 +2521,7 @@ async function dispatch(parsed, write, writeErr) {
1722
2521
  login: session,
1723
2522
  purpose: "session"
1724
2523
  });
1725
- return (await import("./remote-execute-HQRDC57G.js")).runRemoteExecuteWithToken({
2524
+ return (await import("./remote-execute-NXD5ASKQ.js")).runRemoteExecuteWithToken({
1726
2525
  code: typeof args.code === "string" ? args.code : void 0,
1727
2526
  params: args.params,
1728
2527
  conversationId: args.conversationId,
@@ -1767,7 +2566,7 @@ async function dispatch(parsed, write, writeErr) {
1767
2566
  runDevServe,
1768
2567
  runDevWebhook,
1769
2568
  tryAttachedDevFetch
1770
- } = await import("./dev-command-7UJGTUZL.js");
2569
+ } = await import("./dev-command-AD3RRODH.js");
1771
2570
  const target = resolveTarget({
1772
2571
  command: "dev",
1773
2572
  flag: typeof parsed.values.target === "string" ? parsed.values.target : void 0
@@ -1794,8 +2593,8 @@ async function dispatch(parsed, write, writeErr) {
1794
2593
  { callOpenApiOperation, formatOpenApiHttpDebugLine },
1795
2594
  { parsePackageCheckResult, PublishChecksAuthError }
1796
2595
  ] = await Promise.all([
1797
- import("./open-api-client-TAWXGPDD.js"),
1798
- import("./dev-command-7UJGTUZL.js")
2596
+ import("./open-api-client-5BVEGHDF.js"),
2597
+ import("./dev-command-AD3RRODH.js")
1799
2598
  ]);
1800
2599
  let token2;
1801
2600
  try {
@@ -1912,7 +2711,7 @@ async function dispatch(parsed, write, writeErr) {
1912
2711
  purpose: "kody dev",
1913
2712
  ...org ? { org } : {}
1914
2713
  }) : "mock";
1915
- const mockDepResolve = target === "mock" ? await (await import("./mock-dep-resolve-WD4PG7JB.js")).tryResolveMockDepResolve({
2714
+ const mockDepResolve = target === "mock" ? await (await import("./mock-dep-resolve-YLYKZ64B.js")).tryResolveMockDepResolve({
1916
2715
  tokenValues,
1917
2716
  apiUrl: prodApiUrl,
1918
2717
  mcpUrl,
@@ -2053,7 +2852,7 @@ async function dispatch(parsed, write, writeErr) {
2053
2852
  const params = parseApiParamsJson(
2054
2853
  typeof parsed.values.params === "string" ? parsed.values.params : void 0
2055
2854
  );
2056
- const { callOpenApiOperation } = await import("./open-api-client-TAWXGPDD.js");
2855
+ const { callOpenApiOperation } = await import("./open-api-client-5BVEGHDF.js");
2057
2856
  const result = await callOpenApiOperation({
2058
2857
  operationId,
2059
2858
  params,
@@ -2088,7 +2887,7 @@ async function dispatch(parsed, write, writeErr) {
2088
2887
  mcpUrl,
2089
2888
  org
2090
2889
  });
2091
- const { callOpenApiOperation: callOpenApiOperation2 } = await import("./open-api-client-TAWXGPDD.js");
2890
+ const { callOpenApiOperation: callOpenApiOperation2 } = await import("./open-api-client-5BVEGHDF.js");
2092
2891
  write(
2093
2892
  await runPackageCollaboratorPlan({
2094
2893
  plan,
@@ -2114,7 +2913,7 @@ ${packageCollaboratorUsage}`
2114
2913
  positional: parsed.positionals[1],
2115
2914
  paramsJson: typeof parsed.values.params === "string" ? parsed.values.params : void 0
2116
2915
  });
2117
- const { callOpenApiOperation } = await import("./open-api-client-TAWXGPDD.js");
2916
+ const { callOpenApiOperation } = await import("./open-api-client-5BVEGHDF.js");
2118
2917
  const publishToken = await accessTokenForOpenApi({
2119
2918
  tokenValues,
2120
2919
  apiUrl,
@@ -2286,7 +3085,7 @@ function attachExecuteCommonArgs(args, input) {
2286
3085
  return args;
2287
3086
  }
2288
3087
  async function runAuthSetupGit(input) {
2289
- const { authSetupGit, setupGitDefaultScopes } = await import("./setup-git-L6KMU43V.js");
3088
+ const { authSetupGit, setupGitDefaultScopes } = await import("./setup-git-DHJHWR2L.js");
2290
3089
  const apiUrl = apiUrlFrom({
2291
3090
  apiUrl: typeof input.values["api-url"] === "string" ? input.values["api-url"] : void 0
2292
3091
  });
@@ -2343,7 +3142,7 @@ async function runAuthSetupGit(input) {
2343
3142
  return 0;
2344
3143
  }
2345
3144
  async function runAuthRemoveGit(input) {
2346
- const { authRemoveGit, formatAuthRemoveGitReport } = await import("./setup-git-L6KMU43V.js");
3145
+ const { authRemoveGit, formatAuthRemoveGitReport } = await import("./setup-git-DHJHWR2L.js");
2347
3146
  const apiUrl = apiUrlFrom({
2348
3147
  apiUrl: typeof input.values["api-url"] === "string" ? input.values["api-url"] : void 0
2349
3148
  });
@@ -2365,7 +3164,7 @@ function bootstrapMinter(input) {
2365
3164
  });
2366
3165
  if (minter?.token) {
2367
3166
  const token = minter.token;
2368
- const { callOpenApiOperation } = await import("./open-api-client-TAWXGPDD.js");
3167
+ const { callOpenApiOperation } = await import("./open-api-client-5BVEGHDF.js");
2369
3168
  try {
2370
3169
  return await callOpenApiOperation({
2371
3170
  token,
@@ -2384,13 +3183,13 @@ function bootstrapMinter(input) {
2384
3183
  }
2385
3184
  }
2386
3185
  if (minter) {
2387
- const { ensureOpenApiCredentials } = await import("./auth-W7H6R6G5.js");
3186
+ const { ensureOpenApiCredentials } = await import("./auth-4MJQCPHH.js");
2388
3187
  const session = await ensureOpenApiCredentials({
2389
3188
  mcpUrl: input.mcpUrl,
2390
3189
  apiUrl: input.apiUrl,
2391
3190
  ...input.org ? { org: input.org } : {}
2392
3191
  });
2393
- const { callOpenApiOperation } = await import("./open-api-client-TAWXGPDD.js");
3192
+ const { callOpenApiOperation } = await import("./open-api-client-5BVEGHDF.js");
2394
3193
  return callOpenApiOperation({
2395
3194
  operationId: cliCredentialBootstrapOperationId,
2396
3195
  params,
@@ -2417,7 +3216,7 @@ async function accessTokenForOpenApi(input) {
2417
3216
  ...input.org ? { org: input.org } : {}
2418
3217
  });
2419
3218
  if (credential?.token) return credential.token;
2420
- const { ensureOpenApiCredentials } = await import("./auth-W7H6R6G5.js");
3219
+ const { ensureOpenApiCredentials } = await import("./auth-4MJQCPHH.js");
2421
3220
  const session = await ensureOpenApiCredentials({
2422
3221
  mcpUrl: input.mcpUrl,
2423
3222
  apiUrl: input.apiUrl,
@@ -2492,6 +3291,7 @@ export {
2492
3291
  publishCliExitCode,
2493
3292
  publishRefusalMessage,
2494
3293
  apiUrlFrom,
3294
+ cliFlagNames,
2495
3295
  resolveCommand,
2496
3296
  runCli,
2497
3297
  argvIncludesJsonFlag,
@@ -2504,4 +3304,4 @@ export {
2504
3304
  resolvePackagePublishTarget,
2505
3305
  storedApiTokenAfterLoginNotice
2506
3306
  };
2507
- //# sourceMappingURL=chunk-QXP526E7.js.map
3307
+ //# sourceMappingURL=chunk-6YL6C3LL.js.map