@dadado/agent-kit-cli 6.10.1 → 6.11.0

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 (43) hide show
  1. package/dist/{add-7GH3K44T.js → add-P4DIZKC2.js} +3 -3
  2. package/dist/{chunk-O5FKTKOW.js → chunk-2B3HHQ3L.js} +3 -3
  3. package/dist/{chunk-6LRY2CYU.js → chunk-47ZJ3S7M.js} +4 -1
  4. package/dist/{chunk-TUZVOPKY.js → chunk-5D5BJZW5.js} +75 -122
  5. package/dist/{chunk-BB22FGQ4.js → chunk-5KDMATUR.js} +1 -1
  6. package/dist/{chunk-6UKI4CAN.js → chunk-5TEXYAGP.js} +10 -1
  7. package/dist/{chunk-LPZ2KXVE.js → chunk-6GM5YUWR.js} +1 -1
  8. package/dist/chunk-7ABY6DYH.js +89 -0
  9. package/dist/{chunk-HVH24VRL.js → chunk-7T4MDNV3.js} +1 -1
  10. package/dist/{chunk-BSYQJ5WF.js → chunk-AOSXKF3M.js} +1 -1
  11. package/dist/{chunk-26KXYR5T.js → chunk-BOZUBCQA.js} +2 -2
  12. package/dist/{chunk-GQ6Q3P7C.js → chunk-CAOQBBP5.js} +2 -2
  13. package/dist/{chunk-LGSNC4OI.js → chunk-FQNAEFTW.js} +1 -1
  14. package/dist/{chunk-BIFWN6BJ.js → chunk-FTLMWPQY.js} +1 -1
  15. package/dist/{chunk-52WYZFP5.js → chunk-H3PQYVFT.js} +2 -2
  16. package/dist/{chunk-MTLQN57O.js → chunk-JPAQOESJ.js} +85 -1
  17. package/dist/{chunk-BZI5G3OZ.js → chunk-KHFPPQJ5.js} +35 -5
  18. package/dist/{chunk-75ELVLBY.js → chunk-MAXEVJCP.js} +1 -1
  19. package/dist/{chunk-ZF4YBL7F.js → chunk-Q4J5UXVQ.js} +1 -1
  20. package/dist/{chunk-CXDAT76O.js → chunk-S4T6KYYA.js} +2 -2
  21. package/dist/{chunk-TZA7MT4I.js → chunk-SZ5REXPD.js} +2 -2
  22. package/dist/chunk-UGJ3YAT2.js +273 -0
  23. package/dist/{chunk-HIJTNHJE.js → chunk-UQSFGLY5.js} +3 -3
  24. package/dist/{chunk-S7XAV6JK.js → chunk-VWDFMXFK.js} +5 -5
  25. package/dist/{chunk-K5OCGZWA.js → chunk-YN5NBMQT.js} +8 -8
  26. package/dist/{commands-EQHK3ZEP.js → commands-F437QCGQ.js} +5 -5
  27. package/dist/{contribute-VSVPRHQ7.js → contribute-G5DFZCH6.js} +4 -4
  28. package/dist/{countdown-XYRE4GZU.js → countdown-6SP7IEJ3.js} +7 -7
  29. package/dist/{diff-4P7LMQK5.js → diff-VCVSR4OV.js} +5 -5
  30. package/dist/{doctor-E6LOBJYK.js → doctor-5LPPWRPI.js} +9 -9
  31. package/dist/{engine-info-3MQML5I2.js → engine-info-LEE37RRK.js} +2 -2
  32. package/dist/{ground-control-726LRB6Q.js → ground-control-IJ5NQVLP.js} +4 -4
  33. package/dist/{hook-HJW5SXQG.js → hook-A22PNYY2.js} +5 -5
  34. package/dist/index.js +22 -20
  35. package/dist/{init-KKVT2RW4.js → init-VCOMQ32C.js} +12 -12
  36. package/dist/{install-BPZTP5KT.js → install-YXOE2U6T.js} +12 -12
  37. package/dist/queue-Q2LEPXSY.js +172 -0
  38. package/dist/{run-326EEQYY.js → run-BOWCPU56.js} +50 -271
  39. package/dist/{run-plan-2IFO4G4Y.js → run-plan-P65QMVCS.js} +8 -7
  40. package/dist/{setup-global-BFBSR2RZ.js → setup-global-QEEW7ASU.js} +6 -6
  41. package/dist/{status-LNXVLDMP.js → status-WGO2O7TR.js} +7 -7
  42. package/dist/{update-PX5XFCSG.js → update-LV335HJU.js} +10 -10
  43. package/package.json +20 -13
@@ -4,12 +4,12 @@ import {
4
4
  REVIEW_PACK_SLASH,
5
5
  parseReviewPackMaxBytes,
6
6
  reviewBackendMessage
7
- } from "./chunk-S7XAV6JK.js";
7
+ } from "./chunk-VWDFMXFK.js";
8
8
  import {
9
9
  detectAgentBackend,
10
10
  listDetectBackendIds
11
- } from "./chunk-BB22FGQ4.js";
12
- import "./chunk-BSYQJ5WF.js";
11
+ } from "./chunk-5KDMATUR.js";
12
+ import "./chunk-AOSXKF3M.js";
13
13
  import {
14
14
  GATE_EXIT_MARKER_RELPATH,
15
15
  defaultExec,
@@ -20,23 +20,23 @@ import {
20
20
  readGateExitMarker,
21
21
  resolveGateExitRefs,
22
22
  writeGateExitMarker
23
- } from "./chunk-26KXYR5T.js";
23
+ } from "./chunk-BOZUBCQA.js";
24
24
  import "./chunk-MUTTNRX4.js";
25
25
  import {
26
26
  classifySlash,
27
27
  normalizeSlashName,
28
28
  promoteBlockedMessage,
29
29
  unknownSlashMessage
30
- } from "./chunk-BZI5G3OZ.js";
30
+ } from "./chunk-KHFPPQJ5.js";
31
31
  import {
32
32
  CLAUDE_MAX_BUDGET_USD_ENV,
33
33
  CLAUDE_MAX_TURNS_ENV,
34
34
  RedactingStreamBuffer,
35
35
  redactSecrets
36
- } from "./chunk-6UKI4CAN.js";
36
+ } from "./chunk-5TEXYAGP.js";
37
37
  import {
38
38
  HITL_UNANSWERED_EXIT_CODE
39
- } from "./chunk-MTLQN57O.js";
39
+ } from "./chunk-JPAQOESJ.js";
40
40
  import "./chunk-WGLPZXNU.js";
41
41
  import "./chunk-6RRG3WOE.js";
42
42
  import "./chunk-QTON2GQX.js";
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  REGISTRY_CLI_ARGS,
3
3
  resolveRegistryFromCli
4
- } from "./chunk-75ELVLBY.js";
4
+ } from "./chunk-MAXEVJCP.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-ZB43YMHW.js";
8
8
  import {
9
9
  diffAgainstRegistry,
10
10
  summarizeDiff
11
- } from "./chunk-O5FKTKOW.js";
12
- import "./chunk-LPZ2KXVE.js";
11
+ } from "./chunk-2B3HHQ3L.js";
12
+ import "./chunk-6GM5YUWR.js";
13
13
  import "./chunk-2KIOZMTV.js";
14
14
  import {
15
15
  loadAgentKitManifest
16
- } from "./chunk-HVH24VRL.js";
17
- import "./chunk-6LRY2CYU.js";
16
+ } from "./chunk-7T4MDNV3.js";
17
+ import "./chunk-47ZJ3S7M.js";
18
18
  import "./chunk-C4Q77GGJ.js";
19
19
  import "./chunk-5B4DVO6C.js";
20
20
 
@@ -2,12 +2,12 @@ import {
2
2
  assessHooksHealth,
3
3
  executeSafeReadinessFixes,
4
4
  refreshRepositoryProfile
5
- } from "./chunk-GQ6Q3P7C.js";
5
+ } from "./chunk-CAOQBBP5.js";
6
6
  import {
7
7
  writeReadinessSnapshot
8
8
  } from "./chunk-HAFRAXGV.js";
9
- import "./chunk-ZF4YBL7F.js";
10
- import "./chunk-LGSNC4OI.js";
9
+ import "./chunk-Q4J5UXVQ.js";
10
+ import "./chunk-FQNAEFTW.js";
11
11
  import "./chunk-WGLPZXNU.js";
12
12
  import "./chunk-6RRG3WOE.js";
13
13
  import {
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  detectWorkspaceParent,
18
18
  workspaceParentAdvisoryLines
19
- } from "./chunk-BIFWN6BJ.js";
19
+ } from "./chunk-FTLMWPQY.js";
20
20
  import {
21
21
  createReadinessReport
22
22
  } from "./chunk-PNFF6OU3.js";
@@ -33,13 +33,13 @@ import {
33
33
  } from "./chunk-B3VR5YBQ.js";
34
34
  import {
35
35
  warnIfRunningCliBehindNpm
36
- } from "./chunk-52WYZFP5.js";
36
+ } from "./chunk-H3PQYVFT.js";
37
37
  import "./chunk-PFEUZXVT.js";
38
- import "./chunk-O5FKTKOW.js";
39
- import "./chunk-LPZ2KXVE.js";
38
+ import "./chunk-2B3HHQ3L.js";
39
+ import "./chunk-6GM5YUWR.js";
40
40
  import "./chunk-2KIOZMTV.js";
41
- import "./chunk-HVH24VRL.js";
42
- import "./chunk-6LRY2CYU.js";
41
+ import "./chunk-7T4MDNV3.js";
42
+ import "./chunk-47ZJ3S7M.js";
43
43
  import {
44
44
  KIT_VERSION
45
45
  } from "./chunk-7HDQEK6T.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  DRIVER_PROTOCOL_VERSION
3
- } from "./chunk-CXDAT76O.js";
3
+ } from "./chunk-S4T6KYYA.js";
4
4
  import {
5
5
  bundledDashboardCandidates
6
6
  } from "./chunk-XDCCYBCJ.js";
7
- import "./chunk-MTLQN57O.js";
7
+ import "./chunk-JPAQOESJ.js";
8
8
  import "./chunk-ZB43YMHW.js";
9
9
 
10
10
  // src/commands/engine-info.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  blobId,
3
3
  isTicketMerged
4
- } from "./chunk-BSYQJ5WF.js";
4
+ } from "./chunk-AOSXKF3M.js";
5
5
  import {
6
6
  GATE_EXIT_BRANCH_PREFIX,
7
7
  GATE_EXIT_MARKER_RELPATH,
@@ -16,12 +16,12 @@ import {
16
16
  readGateExitMarker,
17
17
  resolveGateExitRefs,
18
18
  writeGateExitMarker
19
- } from "./chunk-26KXYR5T.js";
19
+ } from "./chunk-BOZUBCQA.js";
20
20
  import "./chunk-MUTTNRX4.js";
21
21
  import {
22
22
  redactSecrets
23
- } from "./chunk-6UKI4CAN.js";
24
- import "./chunk-MTLQN57O.js";
23
+ } from "./chunk-5TEXYAGP.js";
24
+ import "./chunk-JPAQOESJ.js";
25
25
  import {
26
26
  findOnPath
27
27
  } from "./chunk-WGLPZXNU.js";
@@ -23,17 +23,17 @@ import {
23
23
  } from "./chunk-HAFRAXGV.js";
24
24
  import {
25
25
  stampLastCheckedAt
26
- } from "./chunk-52WYZFP5.js";
26
+ } from "./chunk-H3PQYVFT.js";
27
27
  import {
28
28
  loadContextConfig
29
29
  } from "./chunk-PFEUZXVT.js";
30
- import "./chunk-O5FKTKOW.js";
31
- import "./chunk-LPZ2KXVE.js";
30
+ import "./chunk-2B3HHQ3L.js";
31
+ import "./chunk-6GM5YUWR.js";
32
32
  import "./chunk-2KIOZMTV.js";
33
33
  import {
34
34
  MANIFEST_RELATIVE_PATH
35
- } from "./chunk-HVH24VRL.js";
36
- import "./chunk-6LRY2CYU.js";
35
+ } from "./chunk-7T4MDNV3.js";
36
+ import "./chunk-47ZJ3S7M.js";
37
37
  import "./chunk-7HDQEK6T.js";
38
38
  import {
39
39
  HANDOFF_REL
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  rewriteRootArgvToRun
4
- } from "./chunk-BZI5G3OZ.js";
5
- import "./chunk-6UKI4CAN.js";
6
- import "./chunk-MTLQN57O.js";
4
+ } from "./chunk-KHFPPQJ5.js";
5
+ import "./chunk-5TEXYAGP.js";
6
+ import "./chunk-JPAQOESJ.js";
7
7
  import "./chunk-WGLPZXNU.js";
8
8
  import "./chunk-6RRG3WOE.js";
9
9
  import {
@@ -125,6 +125,7 @@ var CLI_HELP_GROUPS = [
125
125
  "run",
126
126
  "run-plan",
127
127
  "run-plan-all",
128
+ "queue",
128
129
  "countdown",
129
130
  "ground-control"
130
131
  ]
@@ -231,38 +232,39 @@ var main = defineCommand({
231
232
  version: KIT_VERSION
232
233
  },
233
234
  subCommands: {
234
- init: () => import("./init-KKVT2RW4.js").then((m) => m.initCommand),
235
- install: () => import("./install-BPZTP5KT.js").then((m) => m.installCommand),
235
+ init: () => import("./init-VCOMQ32C.js").then((m) => m.initCommand),
236
+ install: () => import("./install-YXOE2U6T.js").then((m) => m.installCommand),
236
237
  scan: () => import("./scan-BWA64R7I.js").then((m) => m.scanCommand),
237
- add: () => import("./add-7GH3K44T.js").then((m) => m.addCommand),
238
- doctor: () => import("./doctor-E6LOBJYK.js").then((m) => m.doctorCommand),
239
- "setup-global": () => import("./setup-global-BFBSR2RZ.js").then((m) => m.setupGlobalCommand),
240
- status: () => import("./status-LNXVLDMP.js").then((m) => m.statusCommand),
241
- update: () => import("./update-PX5XFCSG.js").then((m) => m.updateCommand),
238
+ add: () => import("./add-P4DIZKC2.js").then((m) => m.addCommand),
239
+ doctor: () => import("./doctor-5LPPWRPI.js").then((m) => m.doctorCommand),
240
+ "setup-global": () => import("./setup-global-QEEW7ASU.js").then((m) => m.setupGlobalCommand),
241
+ status: () => import("./status-WGO2O7TR.js").then((m) => m.statusCommand),
242
+ update: () => import("./update-LV335HJU.js").then((m) => m.updateCommand),
242
243
  "cursor-awareness": () => import("./cursor-awareness-TN5JXD2C.js").then((m) => m.cursorAwarenessCommand),
243
244
  "public-inbound-radar": () => import("./public-inbound-radar-5U4JMBRU.js").then((m) => m.publicInboundRadarCommand),
244
245
  "remote-issues": () => import("./remote-issues-APYOMIJC.js").then((m) => m.remoteIssuesCommand),
245
246
  dogfood: () => import("./dogfood-2JAHSYQA.js").then((m) => m.dogfoodCommand),
246
- diff: () => import("./diff-4P7LMQK5.js").then((m) => m.diffCommand),
247
- contribute: () => import("./contribute-VSVPRHQ7.js").then((m) => m.contributeCommand),
247
+ diff: () => import("./diff-VCVSR4OV.js").then((m) => m.diffCommand),
248
+ contribute: () => import("./contribute-G5DFZCH6.js").then((m) => m.contributeCommand),
248
249
  handoff: () => import("./handoff-5AGE2D3T.js").then((m) => m.handoffCommand),
249
250
  "plan-index": () => import("./plan-index-BNLUU6T5.js").then((m) => m.planIndexCommand),
250
- run: () => import("./run-326EEQYY.js").then((m) => m.runCommand),
251
- "run-plan": () => import("./run-plan-2IFO4G4Y.js").then((m) => m.runPlanCommand),
252
- "run-plan-all": () => import("./run-326EEQYY.js").then((m) => m.runPlanAllCommand),
253
- countdown: () => import("./countdown-XYRE4GZU.js").then((m) => m.countdownCommand),
254
- "ground-control": () => import("./ground-control-726LRB6Q.js").then((m) => m.groundControlCommand),
251
+ run: () => import("./run-BOWCPU56.js").then((m) => m.runCommand),
252
+ "run-plan": () => import("./run-plan-P65QMVCS.js").then((m) => m.runPlanCommand),
253
+ "run-plan-all": () => import("./run-BOWCPU56.js").then((m) => m.runPlanAllCommand),
254
+ queue: () => import("./queue-Q2LEPXSY.js").then((m) => m.queueCommand),
255
+ countdown: () => import("./countdown-6SP7IEJ3.js").then((m) => m.countdownCommand),
256
+ "ground-control": () => import("./ground-control-IJ5NQVLP.js").then((m) => m.groundControlCommand),
255
257
  dashboard: () => import("./dashboard-YNCFISNO.js").then((m) => m.dashboardCommand),
256
258
  "dashboard-broadcast": () => import("./dashboard-broadcast-NK7PU72L.js").then((m) => m.dashboardBroadcastCommand),
257
259
  "mission-control": () => import("./mission-control-C2QV5D25.js").then((m) => m.missionControlCommand),
258
- hook: () => import("./hook-HJW5SXQG.js").then((m) => m.hookCommand),
260
+ hook: () => import("./hook-A22PNYY2.js").then((m) => m.hookCommand),
259
261
  guard: () => import("./guard-X6FNFZ27.js").then((m) => m.guardCommand),
260
262
  monitors: () => import("./monitors-PDXBLB3U.js").then((m) => m.monitorsCommand),
261
263
  sessions: () => import("./sessions-O7MYEMCT.js").then((m) => m.sessionsCommand),
262
264
  "outcome-ledger": () => import("./outcome-ledger-XLWHWPVQ.js").then((m) => m.outcomeLedgerCommand),
263
265
  validate: () => import("./validate-V2CW7J4B.js").then((m) => m.validateCommand),
264
- "engine-info": () => import("./engine-info-3MQML5I2.js").then((m) => m.engineInfoCommand),
265
- commands: () => import("./commands-EQHK3ZEP.js").then((m) => m.commandsCommand)
266
+ "engine-info": () => import("./engine-info-LEE37RRK.js").then((m) => m.engineInfoCommand),
267
+ commands: () => import("./commands-F437QCGQ.js").then((m) => m.commandsCommand)
266
268
  },
267
269
  async run({ rawArgs }) {
268
270
  if (hasCliSubcommand(rawArgs)) return;
@@ -2,19 +2,19 @@ import {
2
2
  nextStepAfterInstall,
3
3
  performInstall,
4
4
  printInstallEpilogue
5
- } from "./chunk-K5OCGZWA.js";
5
+ } from "./chunk-YN5NBMQT.js";
6
6
  import {
7
7
  NON_INTERACTIVE_ROOT_ARGS
8
- } from "./chunk-HIJTNHJE.js";
8
+ } from "./chunk-UQSFGLY5.js";
9
9
  import {
10
10
  SkippedSymlinkError,
11
11
  logApplyStats
12
12
  } from "./chunk-HS7LVVLO.js";
13
- import "./chunk-75ELVLBY.js";
14
- import "./chunk-GQ6Q3P7C.js";
13
+ import "./chunk-MAXEVJCP.js";
14
+ import "./chunk-CAOQBBP5.js";
15
15
  import "./chunk-HAFRAXGV.js";
16
- import "./chunk-ZF4YBL7F.js";
17
- import "./chunk-LGSNC4OI.js";
16
+ import "./chunk-Q4J5UXVQ.js";
17
+ import "./chunk-FQNAEFTW.js";
18
18
  import "./chunk-WGLPZXNU.js";
19
19
  import "./chunk-6RRG3WOE.js";
20
20
  import {
@@ -32,17 +32,17 @@ import {
32
32
  confirmProjectRoot,
33
33
  isNonInteractive,
34
34
  syncPathCliToRuntime
35
- } from "./chunk-TZA7MT4I.js";
35
+ } from "./chunk-SZ5REXPD.js";
36
36
  import {
37
37
  assessEnvironment
38
38
  } from "./chunk-B3VR5YBQ.js";
39
- import "./chunk-52WYZFP5.js";
39
+ import "./chunk-H3PQYVFT.js";
40
40
  import "./chunk-PFEUZXVT.js";
41
- import "./chunk-O5FKTKOW.js";
42
- import "./chunk-LPZ2KXVE.js";
41
+ import "./chunk-2B3HHQ3L.js";
42
+ import "./chunk-6GM5YUWR.js";
43
43
  import "./chunk-2KIOZMTV.js";
44
- import "./chunk-HVH24VRL.js";
45
- import "./chunk-6LRY2CYU.js";
44
+ import "./chunk-7T4MDNV3.js";
45
+ import "./chunk-47ZJ3S7M.js";
46
46
  import {
47
47
  KIT_VERSION
48
48
  } from "./chunk-7HDQEK6T.js";
@@ -3,14 +3,14 @@ import {
3
3
  nextStepAfterInstall,
4
4
  performInstall,
5
5
  printInstallEpilogue
6
- } from "./chunk-K5OCGZWA.js";
7
- import "./chunk-HIJTNHJE.js";
6
+ } from "./chunk-YN5NBMQT.js";
7
+ import "./chunk-UQSFGLY5.js";
8
8
  import "./chunk-HS7LVVLO.js";
9
- import "./chunk-75ELVLBY.js";
10
- import "./chunk-GQ6Q3P7C.js";
9
+ import "./chunk-MAXEVJCP.js";
10
+ import "./chunk-CAOQBBP5.js";
11
11
  import "./chunk-HAFRAXGV.js";
12
- import "./chunk-ZF4YBL7F.js";
13
- import "./chunk-LGSNC4OI.js";
12
+ import "./chunk-Q4J5UXVQ.js";
13
+ import "./chunk-FQNAEFTW.js";
14
14
  import "./chunk-WGLPZXNU.js";
15
15
  import "./chunk-6RRG3WOE.js";
16
16
  import "./chunk-QTON2GQX.js";
@@ -18,15 +18,15 @@ import "./chunk-PNFF6OU3.js";
18
18
  import "./chunk-SC2DBY2R.js";
19
19
  import "./chunk-F6C3GFKV.js";
20
20
  import "./chunk-ZB43YMHW.js";
21
- import "./chunk-TZA7MT4I.js";
21
+ import "./chunk-SZ5REXPD.js";
22
22
  import "./chunk-B3VR5YBQ.js";
23
- import "./chunk-52WYZFP5.js";
23
+ import "./chunk-H3PQYVFT.js";
24
24
  import "./chunk-PFEUZXVT.js";
25
- import "./chunk-O5FKTKOW.js";
26
- import "./chunk-LPZ2KXVE.js";
25
+ import "./chunk-2B3HHQ3L.js";
26
+ import "./chunk-6GM5YUWR.js";
27
27
  import "./chunk-2KIOZMTV.js";
28
- import "./chunk-HVH24VRL.js";
29
- import "./chunk-6LRY2CYU.js";
28
+ import "./chunk-7T4MDNV3.js";
29
+ import "./chunk-47ZJ3S7M.js";
30
30
  import "./chunk-7HDQEK6T.js";
31
31
  import "./chunk-C4Q77GGJ.js";
32
32
  import "./chunk-5B4DVO6C.js";
@@ -0,0 +1,172 @@
1
+ import {
2
+ readHandoffText
3
+ } from "./chunk-UGJ3YAT2.js";
4
+ import "./chunk-7ABY6DYH.js";
5
+ import "./chunk-S4T6KYYA.js";
6
+ import "./chunk-5KDMATUR.js";
7
+ import "./chunk-BOZUBCQA.js";
8
+ import {
9
+ extractFieldBlock
10
+ } from "./chunk-L5V3W3DY.js";
11
+ import "./chunk-MUTTNRX4.js";
12
+ import "./chunk-KHFPPQJ5.js";
13
+ import "./chunk-5TEXYAGP.js";
14
+ import "./chunk-JPAQOESJ.js";
15
+ import "./chunk-WGLPZXNU.js";
16
+ import "./chunk-6RRG3WOE.js";
17
+ import "./chunk-QTON2GQX.js";
18
+ import "./chunk-C4Q77GGJ.js";
19
+ import "./chunk-5B4DVO6C.js";
20
+
21
+ // src/commands/queue.ts
22
+ import path from "path";
23
+ import { defineCommand } from "citty";
24
+
25
+ // src/plan-loop/run-plan-all-intake-runbook.ts
26
+ var DEFAULT_KNOWN_SHIP_RECOVERIES = [
27
+ "ci_fix_once",
28
+ "hold_path",
29
+ "no_product_diff",
30
+ "release_preflight",
31
+ "converging_poll"
32
+ ];
33
+ var RECOVERY_SET = new Set(DEFAULT_KNOWN_SHIP_RECOVERIES);
34
+
35
+ // src/plan-loop/run-plan-all-orchestrator.ts
36
+ var PLAN_WORKER_OUTCOMES = ["completed", "blocked", "partial"];
37
+ var QUEUE_END_GATES_ASK_LABELS = [
38
+ "Resolve gates now",
39
+ "Print resolution prompt",
40
+ "Later"
41
+ ];
42
+ var OUTCOME_SET = new Set(PLAN_WORKER_OUTCOMES);
43
+ var ASK_ID = "`?[a-z0-9]+(?:-[a-z0-9]+)+`?";
44
+ var NAMED_ASKS = new RegExp(
45
+ `\\bAsks?\\s+(${ASK_ID}(?:(?:\\s*[+,]\\s*|\\s+and\\s+)${ASK_ID})*)`,
46
+ "g"
47
+ );
48
+ function namedAsks(gate) {
49
+ const ids = [...gate.matchAll(NAMED_ASKS)].flatMap(
50
+ (m) => m[1].match(/[a-z0-9]+(?:-[a-z0-9]+)+/g) ?? []
51
+ );
52
+ return [...new Set(ids)];
53
+ }
54
+ function decideQueueEndGatesAsk(deferred) {
55
+ const labels = QUEUE_END_GATES_ASK_LABELS;
56
+ const gates = Object.entries(deferred).map(([plan, gate]) => ({
57
+ plan,
58
+ gate,
59
+ asks: namedAsks(gate)
60
+ }));
61
+ if (gates.length === 0) return { ask: false, reason: "no_deferred", labels, gates };
62
+ return { ask: true, reason: "deferred_gates", labels, gates };
63
+ }
64
+ function formatQueueEndResolutionPrompt(gates, backend = "claude") {
65
+ const lines = [
66
+ `agent-kit run-plan-all --backend ${backend}`,
67
+ "",
68
+ "Re-probe the deferred-operator rows first. Operator steps done since the last run:",
69
+ ...gates.map(
70
+ (g) => `- ${g.plan}: ${g.gate}${g.asks.length ? ` (open Asks: ${g.asks.join(", ")})` : ""}`
71
+ )
72
+ ];
73
+ return `${lines.join("\n")}
74
+ `;
75
+ }
76
+ var OUTCOME_ROW_RE = /^`?([^\s`:]+\.plan\.md)`?:\s*(.*)$/;
77
+ var DEFERRED_PREFIX = "deferred-operator";
78
+ function balancedParenBody(text, open) {
79
+ let depth = 0;
80
+ for (let i = open; i < text.length; i += 1) {
81
+ const ch = text[i];
82
+ if (ch === "(") depth += 1;
83
+ else if (ch === ")") {
84
+ depth -= 1;
85
+ if (depth === 0) return text.slice(open + 1, i);
86
+ }
87
+ }
88
+ return text.slice(open + 1);
89
+ }
90
+ function readDeferredGatesFromHandoff(handoff) {
91
+ const block = extractFieldBlock(handoff, "Queue outcomes");
92
+ const deferred = {};
93
+ if (!block) return deferred;
94
+ for (const line of block.split("\n")) {
95
+ const row = OUTCOME_ROW_RE.exec(line.trim());
96
+ if (!row) continue;
97
+ const plan = row[1];
98
+ const outcome = row[2].trim();
99
+ if (!outcome.startsWith(DEFERRED_PREFIX)) continue;
100
+ const rest = outcome.slice(DEFERRED_PREFIX.length);
101
+ const open = rest.search(/\(\s*gate:/);
102
+ const gate = open >= 0 ? balancedParenBody(rest, open).replace(/^\s*gate:\s*/, "") : rest.replace(/^[\s:(-]+/, "").replace(/\)\s*$/, "");
103
+ deferred[plan] = gate.trim() || "operator gate";
104
+ }
105
+ return deferred;
106
+ }
107
+
108
+ // src/commands/queue.ts
109
+ function renderQueueGates(handoff, format, backend = "claude") {
110
+ const decision = decideQueueEndGatesAsk(
111
+ readDeferredGatesFromHandoff(handoff)
112
+ );
113
+ if (format === "json") return `${JSON.stringify(decision, null, 2)}
114
+ `;
115
+ if (format === "prompt") {
116
+ return decision.ask ? formatQueueEndResolutionPrompt(decision.gates, backend) : "";
117
+ }
118
+ if (!decision.ask) return "No deferred operator gates in HANDOFF Queue outcomes.\n";
119
+ const lines = [`Deferred operator gates (${decision.gates.length}):`];
120
+ for (const g of decision.gates) {
121
+ lines.push(`- ${g.plan}: ${g.gate}`);
122
+ if (g.asks.length) lines.push(` open Asks: ${g.asks.join(", ")}`);
123
+ }
124
+ lines.push(
125
+ "",
126
+ "Relaunch with the resolution prompt: agent-kit queue gates --prompt > note.md && agent-kit run-plan-all --note @note.md"
127
+ );
128
+ return `${lines.join("\n")}
129
+ `;
130
+ }
131
+ var gatesCommand = defineCommand({
132
+ meta: {
133
+ name: "gates",
134
+ description: "Print the deferred operator gates from HANDOFF Queue outcomes (zero inference); --prompt prints the relaunch command and resolution prompt"
135
+ },
136
+ args: {
137
+ json: { type: "boolean", description: "Print the gates decision as JSON", default: false },
138
+ prompt: {
139
+ type: "boolean",
140
+ description: "Print the relaunch command and resolution prompt (input for `run-plan-all --note @file`); empty when no gate is deferred",
141
+ default: false
142
+ },
143
+ backend: {
144
+ type: "string",
145
+ description: "Backend named in the --prompt command line (default: claude)",
146
+ default: "claude"
147
+ },
148
+ cwd: { type: "string", description: "Workspace folder (default: current directory)" }
149
+ },
150
+ async run({ args }) {
151
+ if (args.json && args.prompt) {
152
+ process.stderr.write("Use either --json or --prompt, not both.\n");
153
+ process.exitCode = 1;
154
+ return;
155
+ }
156
+ const root = path.resolve(typeof args.cwd === "string" && args.cwd ? args.cwd : ".");
157
+ const handoff = await readHandoffText(root) ?? "";
158
+ const format = args.json ? "json" : args.prompt ? "prompt" : "text";
159
+ process.stdout.write(renderQueueGates(handoff, format, String(args.backend || "claude")));
160
+ }
161
+ });
162
+ var queueCommand = defineCommand({
163
+ meta: {
164
+ name: "queue",
165
+ description: "Read the /run-plan-all queue from HANDOFF (`gates`: deferred operator gates)"
166
+ },
167
+ subCommands: { gates: gatesCommand }
168
+ });
169
+ export {
170
+ queueCommand,
171
+ renderQueueGates
172
+ };