@dadado/agent-kit-cli 6.13.1 → 6.14.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 (32) hide show
  1. package/dashboard/README.md +8 -8
  2. package/dist/{add-FTPXOOZD.js → add-LJAE4FRZ.js} +3 -3
  3. package/dist/{chunk-W6U3Z2RU.js → chunk-2DYKEP5V.js} +8 -8
  4. package/dist/{chunk-PXURVVVO.js → chunk-7DFEN3FF.js} +2 -2
  5. package/dist/{chunk-6QBU4DQF.js → chunk-AXQJX4DC.js} +3 -3
  6. package/dist/{chunk-4PL57BZ5.js → chunk-BMU74QWR.js} +4 -0
  7. package/dist/{chunk-2KATW2O4.js → chunk-GBHOP62P.js} +2 -2
  8. package/dist/{chunk-DONKV6MA.js → chunk-H5OSZ7HQ.js} +2 -2
  9. package/dist/{chunk-N7HMTWS5.js → chunk-IS35XTGX.js} +4 -4
  10. package/dist/{chunk-LQJNGECA.js → chunk-KTWDHHIO.js} +1 -1
  11. package/dist/{chunk-A4PHFHYO.js → chunk-NEMOV327.js} +8 -1
  12. package/dist/{chunk-JRCI2GNS.js → chunk-OLDRCWHE.js} +1 -1
  13. package/dist/{chunk-OVRWRZ5S.js → chunk-TR6AC5FW.js} +2 -2
  14. package/dist/{chunk-JGEGTOF6.js → chunk-UNDPOCWT.js} +1 -1
  15. package/dist/{chunk-PHH3H5EQ.js → chunk-WSJLLK3U.js} +1 -1
  16. package/dist/{chunk-DQLIEJFK.js → chunk-YZSPNXR2.js} +1 -1
  17. package/dist/{commands-MVUJZEJ6.js → commands-K7OOH3AR.js} +3 -3
  18. package/dist/{contribute-EKTMMEYU.js → contribute-QPBEPIKP.js} +5 -5
  19. package/dist/{diff-RFW6K4X5.js → diff-5IQGV5VL.js} +6 -6
  20. package/dist/{doctor-3KNZI3CK.js → doctor-TKYJ3VRI.js} +10 -10
  21. package/dist/{hook-VXHZ4ICK.js → hook-SHR3NXPV.js} +6 -6
  22. package/dist/index.js +17 -15
  23. package/dist/{init-BDWKZGMP.js → init-E2HI3TJY.js} +13 -13
  24. package/dist/{install-NXNO4RTU.js → install-3TGZ4TIY.js} +13 -13
  25. package/dist/promote-H5MIMVEB.js +367 -0
  26. package/dist/{setup-global-K53H3ZEH.js → setup-global-G27JZ2IN.js} +7 -7
  27. package/dist/{status-GFV3KCUR.js → status-3J26V7QS.js} +8 -8
  28. package/dist/{update-25WSBSWM.js → update-KWIHFGPI.js} +11 -11
  29. package/package.json +4 -4
  30. package/dist/{engine-info-CYDRD7SW.js → engine-info-R6GXZ2VO.js} +3 -3
  31. package/dist/{run-NKCDKMTC.js → run-O6IDZ6WI.js} +3 -3
  32. package/dist/{run-plan-3PCINKTY.js → run-plan-2HIJ4CD2.js} +3 -3
@@ -4,14 +4,14 @@ The dashboard the CLI serves. Plain ES modules, no build step: `serve.mjs` reads
4
4
  directly, and `packages/cli/dashboard/` is a generated copy (gitignored, produced by
5
5
  `scripts/sync-cli-dashboard.mjs` at build/prepack time so the npm tarball can ship it).
6
6
 
7
- | Path | Role |
8
- | --- | --- |
9
- | `serve.mjs` | HTTP server, auth gate, SSE |
10
- | `start.mjs` / `start-broadcast.mjs` | loopback and LAN entry points, per-workspace port allocation |
11
- | `dashboard-data.mjs` | snapshot builder for the panel |
12
- | `dashboard.html`, `open.html` | panel and share shell |
13
- | `lib/*.mjs` | guards, semantic model, live refresh, browser open, terminal snapshot, headless run feed (`run-logs.mjs`) |
14
- | `lib/guards.d.mts` | hand-written types consumed by the CLI package (parity is pinned by a test) |
7
+ | Path | Role |
8
+ | ----------------------------------- | --------------------------------------------------------------------------------------------------------- |
9
+ | `serve.mjs` | HTTP server, auth gate, SSE |
10
+ | `start.mjs` / `start-broadcast.mjs` | loopback and LAN entry points, per-workspace port allocation |
11
+ | `dashboard-data.mjs` | snapshot builder for the panel |
12
+ | `dashboard.html`, `open.html` | panel and share shell |
13
+ | `lib/*.mjs` | guards, semantic model, live refresh, browser open, terminal snapshot, headless run feed (`run-logs.mjs`) |
14
+ | `lib/guards.d.mts` | hand-written types consumed by the CLI package (parity is pinned by a test) |
15
15
 
16
16
  ## Where the tests live
17
17
 
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  REGISTRY_CLI_ARGS,
7
7
  resolveRegistryFromCli
8
- } from "./chunk-PHH3H5EQ.js";
8
+ } from "./chunk-WSJLLK3U.js";
9
9
  import {
10
10
  logger
11
11
  } from "./chunk-ZB43YMHW.js";
@@ -22,8 +22,8 @@ import {
22
22
  resolveProtectedGlobs,
23
23
  saveManifest,
24
24
  upsertIdList
25
- } from "./chunk-DQLIEJFK.js";
26
- import "./chunk-A4PHFHYO.js";
25
+ } from "./chunk-YZSPNXR2.js";
26
+ import "./chunk-NEMOV327.js";
27
27
  import {
28
28
  KIT_VERSION
29
29
  } from "./chunk-7HDQEK6T.js";
@@ -6,7 +6,7 @@ import {
6
6
  formatStaleCliRefusal,
7
7
  installL0,
8
8
  syncFromManifest
9
- } from "./chunk-N7HMTWS5.js";
9
+ } from "./chunk-IS35XTGX.js";
10
10
  import {
11
11
  SkippedSymlinkError,
12
12
  formatPersonalizationSkippedSymlinks,
@@ -15,21 +15,21 @@ import {
15
15
  import {
16
16
  REGISTRY_CLI_ARGS,
17
17
  resolveRegistryFromCli
18
- } from "./chunk-PHH3H5EQ.js";
18
+ } from "./chunk-WSJLLK3U.js";
19
19
  import {
20
20
  assessClaudeCommandAdapters,
21
21
  executeSafeReadinessFixes
22
- } from "./chunk-PXURVVVO.js";
22
+ } from "./chunk-7DFEN3FF.js";
23
23
  import {
24
24
  writeReadinessSnapshot
25
25
  } from "./chunk-HAFRAXGV.js";
26
26
  import {
27
27
  writeClaudeSessionStartHook
28
- } from "./chunk-JGEGTOF6.js";
28
+ } from "./chunk-UNDPOCWT.js";
29
29
  import {
30
30
  CLAUDE_HITL_FALLBACK,
31
31
  generateClaudeCommandAdapters
32
- } from "./chunk-LQJNGECA.js";
32
+ } from "./chunk-KTWDHHIO.js";
33
33
  import {
34
34
  shouldUseWelcomeColor,
35
35
  withCliProgress
@@ -56,13 +56,13 @@ import {
56
56
  npxPinned,
57
57
  pathCliStatus,
58
58
  syncPathCliToRuntime
59
- } from "./chunk-2KATW2O4.js";
59
+ } from "./chunk-GBHOP62P.js";
60
60
  import {
61
61
  assessEnvironment
62
62
  } from "./chunk-B3VR5YBQ.js";
63
63
  import {
64
64
  warnIfRunningCliBehindNpm
65
- } from "./chunk-DONKV6MA.js";
65
+ } from "./chunk-H5OSZ7HQ.js";
66
66
  import {
67
67
  DOMAIN_PACK_IDS,
68
68
  allPacks,
@@ -79,7 +79,7 @@ import {
79
79
  resolveProtectedGlobs,
80
80
  saveManifest,
81
81
  skillTargetDir
82
- } from "./chunk-DQLIEJFK.js";
82
+ } from "./chunk-YZSPNXR2.js";
83
83
  import {
84
84
  KIT_VERSION,
85
85
  pinnedCliSpec
@@ -3,11 +3,11 @@ import {
3
3
  GUARD_SHELL_HOOK_MARKER,
4
4
  RESOLVE_AGENT_KIT_REL,
5
5
  SESSION_START_HOOK_MARKER
6
- } from "./chunk-JGEGTOF6.js";
6
+ } from "./chunk-UNDPOCWT.js";
7
7
  import {
8
8
  CLAUDE_COMMANDS_DIR_REL,
9
9
  discoverInstalledCommands
10
- } from "./chunk-LQJNGECA.js";
10
+ } from "./chunk-KTWDHHIO.js";
11
11
  import {
12
12
  findOnPath
13
13
  } from "./chunk-WGLPZXNU.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  managedPairs
3
- } from "./chunk-OVRWRZ5S.js";
3
+ } from "./chunk-TR6AC5FW.js";
4
4
  import {
5
5
  isProtectedPath,
6
6
  resolveProtectedGlobs
7
- } from "./chunk-DQLIEJFK.js";
7
+ } from "./chunk-YZSPNXR2.js";
8
8
  import {
9
9
  resolveContained
10
- } from "./chunk-A4PHFHYO.js";
10
+ } from "./chunk-NEMOV327.js";
11
11
 
12
12
  // src/lifecycle/diff.ts
13
13
  import { readFile } from "fs/promises";
@@ -55,6 +55,10 @@ var L0_ARTIFACTS = [
55
55
  source: ".cursor/skills/core/hitl-gates/pending-ticket.md",
56
56
  target: ".cursor/skills/core/hitl-gates/pending-ticket.md"
57
57
  },
58
+ {
59
+ source: ".cursor/skills/core/hitl-gates/promote-merge-wait.md",
60
+ target: ".cursor/skills/core/hitl-gates/promote-merge-wait.md"
61
+ },
58
62
  {
59
63
  source: ".cursor/skills/core/qa/SKILL.md",
60
64
  target: ".cursor/skills/core/qa/SKILL.md"
@@ -4,10 +4,10 @@ import {
4
4
  import {
5
5
  compareSemver,
6
6
  normalizeSemver
7
- } from "./chunk-DONKV6MA.js";
7
+ } from "./chunk-H5OSZ7HQ.js";
8
8
  import {
9
9
  MANIFEST_RELATIVE_PATH
10
- } from "./chunk-DQLIEJFK.js";
10
+ } from "./chunk-YZSPNXR2.js";
11
11
  import {
12
12
  KIT_VERSION,
13
13
  pinnedCliSpec
@@ -6,13 +6,13 @@ import {
6
6
  import {
7
7
  diffAgainstRegistry,
8
8
  summarizeDiff
9
- } from "./chunk-6QBU4DQF.js";
9
+ } from "./chunk-AXQJX4DC.js";
10
10
  import {
11
11
  DEFAULT_REGISTRY_URL,
12
12
  assertSafeRegistrySource,
13
13
  loadAgentKitManifest,
14
14
  resolveRegistryRoot
15
- } from "./chunk-DQLIEJFK.js";
15
+ } from "./chunk-YZSPNXR2.js";
16
16
  import {
17
17
  KIT_PACKAGE_SPEC,
18
18
  KIT_VERSION
@@ -2,10 +2,10 @@ import {
2
2
  compareSemver,
3
3
  normalizeSemver,
4
4
  readLocalKitVersion
5
- } from "./chunk-DONKV6MA.js";
5
+ } from "./chunk-H5OSZ7HQ.js";
6
6
  import {
7
7
  L0_ARTIFACTS
8
- } from "./chunk-4PL57BZ5.js";
8
+ } from "./chunk-BMU74QWR.js";
9
9
  import {
10
10
  copyRegistryFile,
11
11
  emptyStats,
@@ -15,11 +15,11 @@ import {
15
15
  mergeStats,
16
16
  recordOutcome,
17
17
  resolveProtectedGlobs
18
- } from "./chunk-DQLIEJFK.js";
18
+ } from "./chunk-YZSPNXR2.js";
19
19
  import {
20
20
  loadManagedHashLedger,
21
21
  saveManagedHashLedger
22
- } from "./chunk-A4PHFHYO.js";
22
+ } from "./chunk-NEMOV327.js";
23
23
  import {
24
24
  KIT_PACKAGE_SPEC,
25
25
  KIT_VERSION
@@ -5,7 +5,7 @@ import {
5
5
  resolveContained,
6
6
  saveManagedHashLedger,
7
7
  shouldPreserveCustomizedOverlay
8
- } from "./chunk-A4PHFHYO.js";
8
+ } from "./chunk-NEMOV327.js";
9
9
  import {
10
10
  ensureDir,
11
11
  fileExists
@@ -377,7 +377,14 @@ var KNOWN_SHIPPED_OVERLAY_HASHES = /* @__PURE__ */ new Set([
377
377
  "9f0e1cf2e28f6949a98b7ffa0eb9c3237d8868460014f35edd9122a30fb4367c",
378
378
  "22683e3bb4e85c1224b9a2fab7c3322b5dd5a2c91657a80616e29da2d5b21a19",
379
379
  "99f0825be20a8f05a1e31490f0bf92b329a4bdf5e5a0dfc283ddbe8e87067dfa",
380
- "d67f8fadb27f0cb65a8bf1672d760a0296baad60ac82cf280e91436bf95b1f71"
380
+ "d67f8fadb27f0cb65a8bf1672d760a0296baad60ac82cf280e91436bf95b1f71",
381
+ "59e08def22bb0c6e27043cb76105ba67bbc81a8bf2c72e5b1e850290f70692ae",
382
+ "bb27fd7f988910ff599aeba41c2f726a342dc2ce9836246b6814810bbd3940be",
383
+ "c9f54d1a144292efe4aa96bd046fa74b676fd6a61504ed977b9a753d9a52415c",
384
+ "d4a260a22ca4ac5330ebc0002e82aef623112a00eaea4b9518189b2eed9002b7",
385
+ "26525753f5db7574c04c1ffd220258570d3b8c8b801933ea7781d8b4b56b687f",
386
+ "aad0506e016641e19e7dd7274d0b5c9adf93f21a0a0dbbb60cce646f632bd1ef",
387
+ "d50d76c52214e2c20fe4e4632b4a98d92576437ab4315c1df39cc21324c971a6"
381
388
  ]);
382
389
 
383
390
  // src/lifecycle/paths.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MANIFEST_RELATIVE_PATH
3
- } from "./chunk-DQLIEJFK.js";
3
+ } from "./chunk-YZSPNXR2.js";
4
4
  import {
5
5
  fileExists
6
6
  } from "./chunk-5B4DVO6C.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  L0_ARTIFACTS
3
- } from "./chunk-4PL57BZ5.js";
3
+ } from "./chunk-BMU74QWR.js";
4
4
  import {
5
5
  allSkills,
6
6
  loadPackManifest,
7
7
  loadRegistry,
8
8
  packMemberFileTargets,
9
9
  skillFileTargets
10
- } from "./chunk-DQLIEJFK.js";
10
+ } from "./chunk-YZSPNXR2.js";
11
11
 
12
12
  // src/lifecycle/targets.ts
13
13
  import path from "path";
@@ -7,7 +7,7 @@ import {
7
7
  assertRealParentContained,
8
8
  isRealWriteTargetContained,
9
9
  resolveContained
10
- } from "./chunk-A4PHFHYO.js";
10
+ } from "./chunk-NEMOV327.js";
11
11
  import {
12
12
  ensureDir
13
13
  } from "./chunk-5B4DVO6C.js";
@@ -5,7 +5,7 @@ import {
5
5
  DEFAULT_REGISTRY_REF,
6
6
  DEFAULT_REGISTRY_URL,
7
7
  resolveRegistryRoot
8
- } from "./chunk-DQLIEJFK.js";
8
+ } from "./chunk-YZSPNXR2.js";
9
9
 
10
10
  // src/lifecycle/resolve-cli.ts
11
11
  async function resolveRegistryFromCli(options) {
@@ -8,7 +8,7 @@ import {
8
8
  saveManagedHashLedger,
9
9
  shouldPreserveCustomizedOverlay,
10
10
  toPosixRel
11
- } from "./chunk-A4PHFHYO.js";
11
+ } from "./chunk-NEMOV327.js";
12
12
  import {
13
13
  HANDOFF_REL
14
14
  } from "./chunk-C4Q77GGJ.js";
@@ -5,14 +5,14 @@ import "./chunk-GDKTTV2A.js";
5
5
  import "./chunk-WRCXRV2U.js";
6
6
  import {
7
7
  discoverInstalledCommands
8
- } from "./chunk-LQJNGECA.js";
8
+ } from "./chunk-KTWDHHIO.js";
9
9
  import "./chunk-WGLPZXNU.js";
10
10
  import "./chunk-6RRG3WOE.js";
11
11
  import "./chunk-QTON2GQX.js";
12
12
  import {
13
13
  L0_ARTIFACTS
14
- } from "./chunk-4PL57BZ5.js";
15
- import "./chunk-A4PHFHYO.js";
14
+ } from "./chunk-BMU74QWR.js";
15
+ import "./chunk-NEMOV327.js";
16
16
  import {
17
17
  KIT_VERSION
18
18
  } from "./chunk-7HDQEK6T.js";
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  REGISTRY_CLI_ARGS,
3
3
  resolveRegistryFromCli
4
- } from "./chunk-PHH3H5EQ.js";
4
+ } from "./chunk-WSJLLK3U.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-ZB43YMHW.js";
8
8
  import {
9
9
  managedPairs
10
- } from "./chunk-OVRWRZ5S.js";
11
- import "./chunk-4PL57BZ5.js";
10
+ } from "./chunk-TR6AC5FW.js";
11
+ import "./chunk-BMU74QWR.js";
12
12
  import {
13
13
  loadAgentKitManifest,
14
14
  normalizeRelPath
15
- } from "./chunk-DQLIEJFK.js";
15
+ } from "./chunk-YZSPNXR2.js";
16
16
  import {
17
17
  resolveContained
18
- } from "./chunk-A4PHFHYO.js";
18
+ } from "./chunk-NEMOV327.js";
19
19
  import "./chunk-C4Q77GGJ.js";
20
20
  import "./chunk-5B4DVO6C.js";
21
21
 
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  REGISTRY_CLI_ARGS,
3
3
  resolveRegistryFromCli
4
- } from "./chunk-PHH3H5EQ.js";
4
+ } from "./chunk-WSJLLK3U.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-6QBU4DQF.js";
12
- import "./chunk-OVRWRZ5S.js";
13
- import "./chunk-4PL57BZ5.js";
11
+ } from "./chunk-AXQJX4DC.js";
12
+ import "./chunk-TR6AC5FW.js";
13
+ import "./chunk-BMU74QWR.js";
14
14
  import {
15
15
  loadAgentKitManifest
16
- } from "./chunk-DQLIEJFK.js";
17
- import "./chunk-A4PHFHYO.js";
16
+ } from "./chunk-YZSPNXR2.js";
17
+ import "./chunk-NEMOV327.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-PXURVVVO.js";
5
+ } from "./chunk-7DFEN3FF.js";
6
6
  import {
7
7
  writeReadinessSnapshot
8
8
  } from "./chunk-HAFRAXGV.js";
9
- import "./chunk-JGEGTOF6.js";
10
- import "./chunk-LQJNGECA.js";
9
+ import "./chunk-UNDPOCWT.js";
10
+ import "./chunk-KTWDHHIO.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-JRCI2GNS.js";
19
+ } from "./chunk-OLDRCWHE.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-DONKV6MA.js";
36
+ } from "./chunk-H5OSZ7HQ.js";
37
37
  import "./chunk-PFEUZXVT.js";
38
- import "./chunk-6QBU4DQF.js";
39
- import "./chunk-OVRWRZ5S.js";
40
- import "./chunk-4PL57BZ5.js";
41
- import "./chunk-DQLIEJFK.js";
42
- import "./chunk-A4PHFHYO.js";
38
+ import "./chunk-AXQJX4DC.js";
39
+ import "./chunk-TR6AC5FW.js";
40
+ import "./chunk-BMU74QWR.js";
41
+ import "./chunk-YZSPNXR2.js";
42
+ import "./chunk-NEMOV327.js";
43
43
  import {
44
44
  KIT_VERSION
45
45
  } from "./chunk-7HDQEK6T.js";
@@ -23,17 +23,17 @@ import {
23
23
  } from "./chunk-HAFRAXGV.js";
24
24
  import {
25
25
  stampLastCheckedAt
26
- } from "./chunk-DONKV6MA.js";
26
+ } from "./chunk-H5OSZ7HQ.js";
27
27
  import {
28
28
  loadContextConfig
29
29
  } from "./chunk-PFEUZXVT.js";
30
- import "./chunk-6QBU4DQF.js";
31
- import "./chunk-OVRWRZ5S.js";
32
- import "./chunk-4PL57BZ5.js";
30
+ import "./chunk-AXQJX4DC.js";
31
+ import "./chunk-TR6AC5FW.js";
32
+ import "./chunk-BMU74QWR.js";
33
33
  import {
34
34
  MANIFEST_RELATIVE_PATH
35
- } from "./chunk-DQLIEJFK.js";
36
- import "./chunk-A4PHFHYO.js";
35
+ } from "./chunk-YZSPNXR2.js";
36
+ import "./chunk-NEMOV327.js";
37
37
  import "./chunk-7HDQEK6T.js";
38
38
  import {
39
39
  HANDOFF_REL
package/dist/index.js CHANGED
@@ -126,6 +126,7 @@ var CLI_HELP_GROUPS = [
126
126
  "run-plan",
127
127
  "run-plan-all",
128
128
  "queue",
129
+ "promote",
129
130
  "countdown",
130
131
  "ground-control"
131
132
  ]
@@ -232,39 +233,40 @@ var main = defineCommand({
232
233
  version: KIT_VERSION
233
234
  },
234
235
  subCommands: {
235
- init: () => import("./init-BDWKZGMP.js").then((m) => m.initCommand),
236
- install: () => import("./install-NXNO4RTU.js").then((m) => m.installCommand),
236
+ init: () => import("./init-E2HI3TJY.js").then((m) => m.initCommand),
237
+ install: () => import("./install-3TGZ4TIY.js").then((m) => m.installCommand),
237
238
  scan: () => import("./scan-BWA64R7I.js").then((m) => m.scanCommand),
238
- add: () => import("./add-FTPXOOZD.js").then((m) => m.addCommand),
239
- doctor: () => import("./doctor-3KNZI3CK.js").then((m) => m.doctorCommand),
240
- "setup-global": () => import("./setup-global-K53H3ZEH.js").then((m) => m.setupGlobalCommand),
241
- status: () => import("./status-GFV3KCUR.js").then((m) => m.statusCommand),
242
- update: () => import("./update-25WSBSWM.js").then((m) => m.updateCommand),
239
+ add: () => import("./add-LJAE4FRZ.js").then((m) => m.addCommand),
240
+ doctor: () => import("./doctor-TKYJ3VRI.js").then((m) => m.doctorCommand),
241
+ "setup-global": () => import("./setup-global-G27JZ2IN.js").then((m) => m.setupGlobalCommand),
242
+ status: () => import("./status-3J26V7QS.js").then((m) => m.statusCommand),
243
+ update: () => import("./update-KWIHFGPI.js").then((m) => m.updateCommand),
243
244
  "cursor-awareness": () => import("./cursor-awareness-TN5JXD2C.js").then((m) => m.cursorAwarenessCommand),
244
245
  "public-inbound-radar": () => import("./public-inbound-radar-5U4JMBRU.js").then((m) => m.publicInboundRadarCommand),
245
246
  "remote-issues": () => import("./remote-issues-APYOMIJC.js").then((m) => m.remoteIssuesCommand),
246
247
  dogfood: () => import("./dogfood-2JAHSYQA.js").then((m) => m.dogfoodCommand),
247
- diff: () => import("./diff-RFW6K4X5.js").then((m) => m.diffCommand),
248
- contribute: () => import("./contribute-EKTMMEYU.js").then((m) => m.contributeCommand),
248
+ diff: () => import("./diff-5IQGV5VL.js").then((m) => m.diffCommand),
249
+ contribute: () => import("./contribute-QPBEPIKP.js").then((m) => m.contributeCommand),
249
250
  handoff: () => import("./handoff-5AGE2D3T.js").then((m) => m.handoffCommand),
250
251
  "plan-index": () => import("./plan-index-BNLUU6T5.js").then((m) => m.planIndexCommand),
251
- run: () => import("./run-NKCDKMTC.js").then((m) => m.runCommand),
252
- "run-plan": () => import("./run-plan-3PCINKTY.js").then((m) => m.runPlanCommand),
253
- "run-plan-all": () => import("./run-NKCDKMTC.js").then((m) => m.runPlanAllCommand),
252
+ run: () => import("./run-O6IDZ6WI.js").then((m) => m.runCommand),
253
+ "run-plan": () => import("./run-plan-2HIJ4CD2.js").then((m) => m.runPlanCommand),
254
+ "run-plan-all": () => import("./run-O6IDZ6WI.js").then((m) => m.runPlanAllCommand),
254
255
  queue: () => import("./queue-VLIWWVKM.js").then((m) => m.queueCommand),
256
+ promote: () => import("./promote-H5MIMVEB.js").then((m) => m.promoteCommand),
255
257
  countdown: () => import("./countdown-TFKPAYIQ.js").then((m) => m.countdownCommand),
256
258
  "ground-control": () => import("./ground-control-DB5RSYAT.js").then((m) => m.groundControlCommand),
257
259
  dashboard: () => import("./dashboard-YNCFISNO.js").then((m) => m.dashboardCommand),
258
260
  "dashboard-broadcast": () => import("./dashboard-broadcast-NK7PU72L.js").then((m) => m.dashboardBroadcastCommand),
259
261
  "mission-control": () => import("./mission-control-JIF6GFSV.js").then((m) => m.missionControlCommand),
260
- hook: () => import("./hook-VXHZ4ICK.js").then((m) => m.hookCommand),
262
+ hook: () => import("./hook-SHR3NXPV.js").then((m) => m.hookCommand),
261
263
  guard: () => import("./guard-RJZEEKSL.js").then((m) => m.guardCommand),
262
264
  monitors: () => import("./monitors-PDXBLB3U.js").then((m) => m.monitorsCommand),
263
265
  sessions: () => import("./sessions-O7MYEMCT.js").then((m) => m.sessionsCommand),
264
266
  "outcome-ledger": () => import("./outcome-ledger-XLWHWPVQ.js").then((m) => m.outcomeLedgerCommand),
265
267
  validate: () => import("./validate-V2CW7J4B.js").then((m) => m.validateCommand),
266
- "engine-info": () => import("./engine-info-CYDRD7SW.js").then((m) => m.engineInfoCommand),
267
- commands: () => import("./commands-MVUJZEJ6.js").then((m) => m.commandsCommand)
268
+ "engine-info": () => import("./engine-info-R6GXZ2VO.js").then((m) => m.engineInfoCommand),
269
+ commands: () => import("./commands-K7OOH3AR.js").then((m) => m.commandsCommand)
268
270
  },
269
271
  async run({ rawArgs }) {
270
272
  if (hasCliSubcommand(rawArgs)) return;
@@ -2,19 +2,19 @@ import {
2
2
  nextStepAfterInstall,
3
3
  performInstall,
4
4
  printInstallEpilogue
5
- } from "./chunk-W6U3Z2RU.js";
5
+ } from "./chunk-2DYKEP5V.js";
6
6
  import {
7
7
  NON_INTERACTIVE_ROOT_ARGS
8
- } from "./chunk-N7HMTWS5.js";
8
+ } from "./chunk-IS35XTGX.js";
9
9
  import {
10
10
  SkippedSymlinkError,
11
11
  logApplyStats
12
12
  } from "./chunk-HS7LVVLO.js";
13
- import "./chunk-PHH3H5EQ.js";
14
- import "./chunk-PXURVVVO.js";
13
+ import "./chunk-WSJLLK3U.js";
14
+ import "./chunk-7DFEN3FF.js";
15
15
  import "./chunk-HAFRAXGV.js";
16
- import "./chunk-JGEGTOF6.js";
17
- import "./chunk-LQJNGECA.js";
16
+ import "./chunk-UNDPOCWT.js";
17
+ import "./chunk-KTWDHHIO.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-2KATW2O4.js";
35
+ } from "./chunk-GBHOP62P.js";
36
36
  import {
37
37
  assessEnvironment
38
38
  } from "./chunk-B3VR5YBQ.js";
39
- import "./chunk-DONKV6MA.js";
39
+ import "./chunk-H5OSZ7HQ.js";
40
40
  import "./chunk-PFEUZXVT.js";
41
- import "./chunk-6QBU4DQF.js";
42
- import "./chunk-OVRWRZ5S.js";
43
- import "./chunk-4PL57BZ5.js";
44
- import "./chunk-DQLIEJFK.js";
45
- import "./chunk-A4PHFHYO.js";
41
+ import "./chunk-AXQJX4DC.js";
42
+ import "./chunk-TR6AC5FW.js";
43
+ import "./chunk-BMU74QWR.js";
44
+ import "./chunk-YZSPNXR2.js";
45
+ import "./chunk-NEMOV327.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-W6U3Z2RU.js";
7
- import "./chunk-N7HMTWS5.js";
6
+ } from "./chunk-2DYKEP5V.js";
7
+ import "./chunk-IS35XTGX.js";
8
8
  import "./chunk-HS7LVVLO.js";
9
- import "./chunk-PHH3H5EQ.js";
10
- import "./chunk-PXURVVVO.js";
9
+ import "./chunk-WSJLLK3U.js";
10
+ import "./chunk-7DFEN3FF.js";
11
11
  import "./chunk-HAFRAXGV.js";
12
- import "./chunk-JGEGTOF6.js";
13
- import "./chunk-LQJNGECA.js";
12
+ import "./chunk-UNDPOCWT.js";
13
+ import "./chunk-KTWDHHIO.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-2KATW2O4.js";
21
+ import "./chunk-GBHOP62P.js";
22
22
  import "./chunk-B3VR5YBQ.js";
23
- import "./chunk-DONKV6MA.js";
23
+ import "./chunk-H5OSZ7HQ.js";
24
24
  import "./chunk-PFEUZXVT.js";
25
- import "./chunk-6QBU4DQF.js";
26
- import "./chunk-OVRWRZ5S.js";
27
- import "./chunk-4PL57BZ5.js";
28
- import "./chunk-DQLIEJFK.js";
29
- import "./chunk-A4PHFHYO.js";
25
+ import "./chunk-AXQJX4DC.js";
26
+ import "./chunk-TR6AC5FW.js";
27
+ import "./chunk-BMU74QWR.js";
28
+ import "./chunk-YZSPNXR2.js";
29
+ import "./chunk-NEMOV327.js";
30
30
  import "./chunk-7HDQEK6T.js";
31
31
  import "./chunk-C4Q77GGJ.js";
32
32
  import "./chunk-5B4DVO6C.js";
@@ -0,0 +1,367 @@
1
+ import {
2
+ loadContextConfig
3
+ } from "./chunk-PFEUZXVT.js";
4
+ import "./chunk-5B4DVO6C.js";
5
+
6
+ // src/commands/promote.ts
7
+ import { execFile } from "child_process";
8
+ import path from "path";
9
+ import { promisify } from "util";
10
+ import { defineCommand } from "citty";
11
+
12
+ // src/plan-loop/promote-merge-wait.ts
13
+ var PROMOTE_MERGE_WAIT_ASK_ID = "promote-merge-wait";
14
+ var PROMOTE_MERGE_WAIT_LABELS = [
15
+ "Keep waiting",
16
+ "Show the merge box reason",
17
+ "Stop and hand off"
18
+ ];
19
+ var PROMOTE_MERGE_WAIT_CONFIG_KEY = "promoteMergeWaitMs";
20
+ var DEFAULT_PROMOTE_MERGE_WAIT_MS = 60 * 60 * 1e3;
21
+ var MIN_PROMOTE_MERGE_WAIT_MS = 60 * 1e3;
22
+ var MAX_PROMOTE_MERGE_WAIT_MS = 24 * 60 * 60 * 1e3;
23
+ var PROMOTE_MERGE_POLL_INITIAL_MS = 3e4;
24
+ var PROMOTE_MERGE_POLL_MAX_MS = 5 * 60 * 1e3;
25
+ function resolvePromoteMergeWaitMs(config) {
26
+ const raw = config?.[PROMOTE_MERGE_WAIT_CONFIG_KEY];
27
+ if (typeof raw !== "number" || !Number.isFinite(raw)) return DEFAULT_PROMOTE_MERGE_WAIT_MS;
28
+ return Math.min(MAX_PROMOTE_MERGE_WAIT_MS, Math.max(MIN_PROMOTE_MERGE_WAIT_MS, Math.trunc(raw)));
29
+ }
30
+ function promoteMergePollDelays(capMs, initialMs = PROMOTE_MERGE_POLL_INITIAL_MS, maxMs = PROMOTE_MERGE_POLL_MAX_MS) {
31
+ const cap = Math.max(1, Math.trunc(Number(capMs) || 0));
32
+ const max = Math.max(1, Math.trunc(maxMs));
33
+ let next = Math.min(max, Math.max(1, Math.trunc(initialMs)));
34
+ const delays = [];
35
+ let total = 0;
36
+ while (total < cap) {
37
+ const d = Math.min(next, cap - total);
38
+ delays.push(d);
39
+ total += d;
40
+ next = Math.min(max, next * 2);
41
+ }
42
+ return delays;
43
+ }
44
+ var PROMOTE_PR_VIEW_FIELDS = "state,mergedAt,mergeCommit,mergeStateStatus,url";
45
+ function parsePromotePrView(json) {
46
+ let data;
47
+ try {
48
+ data = JSON.parse(json);
49
+ } catch {
50
+ return null;
51
+ }
52
+ if (!data || typeof data !== "object" || Array.isArray(data)) return null;
53
+ const o = data;
54
+ if (o.state !== "OPEN" && o.state !== "MERGED" && o.state !== "CLOSED") return null;
55
+ const commit = o.mergeCommit;
56
+ const str = (v) => typeof v === "string" && v ? v : null;
57
+ return {
58
+ state: o.state,
59
+ mergedAt: str(o.mergedAt),
60
+ mergeCommit: str(commit?.oid),
61
+ mergeStateStatus: str(o.mergeStateStatus),
62
+ url: str(o.url)
63
+ };
64
+ }
65
+ async function waitForPromoteMerge(opts) {
66
+ const sleep = opts.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
67
+ const delays = promoteMergePollDelays(opts.capMs, opts.initialDelayMs, opts.maxDelayMs);
68
+ let last = null;
69
+ let lastError = null;
70
+ let polls = 0;
71
+ let waitedMs = 0;
72
+ for (let i = 0; i <= delays.length; i++) {
73
+ polls += 1;
74
+ try {
75
+ const pr = await opts.readPr();
76
+ if (pr) {
77
+ last = pr;
78
+ if (pr.state === "MERGED") return { outcome: "merged", pr, polls };
79
+ if (pr.state === "CLOSED") return { outcome: "closed", pr, polls };
80
+ } else {
81
+ lastError = "unreadable PR state";
82
+ }
83
+ } catch (err) {
84
+ lastError = err instanceof Error ? err.message : String(err);
85
+ }
86
+ const delay = delays[i];
87
+ if (delay === void 0) break;
88
+ await sleep(delay);
89
+ waitedMs += delay;
90
+ }
91
+ return {
92
+ outcome: "timeout",
93
+ last,
94
+ lastError,
95
+ polls,
96
+ waitedMs,
97
+ ask: { id: PROMOTE_MERGE_WAIT_ASK_ID, labels: [...PROMOTE_MERGE_WAIT_LABELS] }
98
+ };
99
+ }
100
+ function minutes(ms) {
101
+ const m = ms / 6e4;
102
+ return Number.isInteger(m) ? `${m} min` : `${m.toFixed(1)} min`;
103
+ }
104
+ function formatPromoteMergeWaitResult(pr, result) {
105
+ if (result.outcome === "merged") {
106
+ const sha = result.pr.mergeCommit ? ` as ${result.pr.mergeCommit}` : "";
107
+ const at = result.pr.mergedAt ? ` at ${result.pr.mergedAt}` : "";
108
+ return `PR #${pr} merged${sha}${at}. Continue the promote routine.
109
+ `;
110
+ }
111
+ if (result.outcome === "closed") {
112
+ return `PR #${pr} was closed without a merge. Stop: do not tag, do not reopen it, report to the operator.
113
+ `;
114
+ }
115
+ const lines = [
116
+ `PR #${pr} is still not merged after ${minutes(result.waitedMs)} (${result.polls} reads; cap: ${PROMOTE_MERGE_WAIT_CONFIG_KEY}).`
117
+ ];
118
+ if (result.last) {
119
+ lines.push(
120
+ `Last read: state ${result.last.state}, mergeStateStatus ${result.last.mergeStateStatus ?? "unknown"}${result.last.url ? `, ${result.last.url}` : ""}.`
121
+ );
122
+ }
123
+ if (result.lastError) lines.push(`Last read error: ${result.lastError}.`);
124
+ if (result.last?.mergeStateStatus === "CLEAN") {
125
+ lines.push(
126
+ "CLEAN plus green checks is not proof that GitHub will accept the merge: a ruleset can still refuse it. The PR page merge box names the reason."
127
+ );
128
+ }
129
+ lines.push(
130
+ `Ask ${result.ask.id}: ${result.ask.labels.join(" / ")}. Never merge the PR yourself and never run /git-prod.`
131
+ );
132
+ return `${lines.join("\n")}
133
+ `;
134
+ }
135
+
136
+ // src/plan-loop/promote-ruleset-preflight.ts
137
+ var MODELED_RULE_TYPES = /* @__PURE__ */ new Set([
138
+ "deletion",
139
+ "non_fast_forward",
140
+ "pull_request",
141
+ "required_status_checks"
142
+ ]);
143
+ var MODELED_RULE_PARAMETERS = {
144
+ "pull_request.required_approving_review_count": (v) => v === 0,
145
+ "pull_request.allowed_merge_methods": () => true,
146
+ "pull_request.dismiss_stale_reviews_on_push": () => true,
147
+ "required_status_checks.required_status_checks": () => true,
148
+ "required_status_checks.strict_required_status_checks_policy": () => true,
149
+ "required_status_checks.do_not_enforce_on_create": () => true
150
+ };
151
+ function parseBranchRules(json) {
152
+ let data;
153
+ try {
154
+ data = JSON.parse(json);
155
+ } catch {
156
+ return null;
157
+ }
158
+ if (!Array.isArray(data)) return null;
159
+ const rules = [];
160
+ for (const item of data) {
161
+ if (!item || typeof item !== "object") return null;
162
+ const o = item;
163
+ if (typeof o.type !== "string" || !o.type) return null;
164
+ const rule = { type: o.type };
165
+ if (o.parameters && typeof o.parameters === "object" && !Array.isArray(o.parameters)) {
166
+ rule.parameters = o.parameters;
167
+ }
168
+ if (typeof o.ruleset_id === "number") rule.rulesetId = o.ruleset_id;
169
+ rules.push(rule);
170
+ }
171
+ return rules;
172
+ }
173
+ function restricts(value) {
174
+ if (value === true) return true;
175
+ if (typeof value === "number") return value !== 0;
176
+ if (typeof value === "string") return value.length > 0;
177
+ if (Array.isArray(value)) return value.length > 0;
178
+ if (value && typeof value === "object") return Object.keys(value).length > 0;
179
+ return false;
180
+ }
181
+ function findUnmodeledRuleParameters(rules) {
182
+ const out = [];
183
+ const seen = /* @__PURE__ */ new Set();
184
+ const push = (u) => {
185
+ const key = `${u.name}@${u.rulesetId ?? ""}`;
186
+ if (seen.has(key)) return;
187
+ seen.add(key);
188
+ out.push(u);
189
+ };
190
+ for (const rule of rules) {
191
+ if (!MODELED_RULE_TYPES.has(rule.type)) {
192
+ push({ name: rule.type, rulesetId: rule.rulesetId });
193
+ continue;
194
+ }
195
+ for (const [param, value] of Object.entries(rule.parameters ?? {})) {
196
+ const name = `${rule.type}.${param}`;
197
+ const handled = MODELED_RULE_PARAMETERS[name];
198
+ const unmodeled = handled ? !handled(value) : restricts(value);
199
+ if (unmodeled) push({ name, value, rulesetId: rule.rulesetId });
200
+ }
201
+ }
202
+ return out;
203
+ }
204
+ function formatRulesetPreflight(base, result) {
205
+ if (!result.ok) {
206
+ return `ruleset preflight (${base}): skipped (${result.note}); advisory only, not a blocker.
207
+ `;
208
+ }
209
+ const unmodeled = findUnmodeledRuleParameters(result.rules);
210
+ if (unmodeled.length === 0) {
211
+ return `ruleset preflight (${base}): every rule parameter is modeled by the kit.
212
+ `;
213
+ }
214
+ return `${unmodeled.map((u) => {
215
+ const value = u.value === void 0 ? "" : ` = ${JSON.stringify(u.value)}`;
216
+ const ruleset = u.rulesetId === void 0 ? "" : ` (ruleset ${u.rulesetId})`;
217
+ return `ruleset advisory (${base}): ${u.name}${value}${ruleset} has no model in the kit; GitHub may refuse the merge while it reports CLEAN.`;
218
+ }).join("\n")}
219
+ `;
220
+ }
221
+ function failureNote(err) {
222
+ const code = err?.code;
223
+ if (code === "ENOENT") return "gh not found";
224
+ const msg = err instanceof Error ? err.message : String(err);
225
+ const first = msg.split(/\r?\n/).find((l) => l.trim()) ?? "gh api failed";
226
+ return first.trim().slice(0, 200);
227
+ }
228
+ async function rulesetPreflightFromGh(opts) {
229
+ const repo = opts.repo ?? "{owner}/{repo}";
230
+ let stdout;
231
+ try {
232
+ stdout = await opts.runGh([
233
+ "api",
234
+ `repos/${repo}/rules/branches/${encodeURIComponent(opts.base)}`
235
+ ]);
236
+ } catch (err) {
237
+ return { ok: false, note: failureNote(err) };
238
+ }
239
+ const rules = parseBranchRules(stdout);
240
+ if (!rules) return { ok: false, note: "unreadable rules response" };
241
+ return { ok: true, rules };
242
+ }
243
+
244
+ // src/commands/promote.ts
245
+ var execFileAsync = promisify(execFile);
246
+ var defaultRunGh = async (args, opts) => {
247
+ const { stdout } = await execFileAsync("gh", args, {
248
+ cwd: opts.cwd,
249
+ encoding: "utf8",
250
+ maxBuffer: 4 * 1024 * 1024,
251
+ timeout: 3e4
252
+ });
253
+ return stdout;
254
+ };
255
+ function promoteWaitExitCode(result) {
256
+ if (result.outcome === "merged") return 0;
257
+ if (result.outcome === "timeout") return 3;
258
+ return 1;
259
+ }
260
+ function promotePrViewArgs(pr, repo) {
261
+ const args = ["pr", "view", String(pr), "--json", PROMOTE_PR_VIEW_FIELDS];
262
+ if (repo) args.push("--repo", repo);
263
+ return args;
264
+ }
265
+ async function runPromoteWait(opts) {
266
+ const runGh = opts.runGh ?? defaultRunGh;
267
+ const capMs = opts.capMs ?? resolvePromoteMergeWaitMs(await loadContextConfig(opts.cwd));
268
+ const result = await waitForPromoteMerge({
269
+ capMs,
270
+ sleep: opts.sleep,
271
+ readPr: async () => parsePromotePrView(await runGh(promotePrViewArgs(opts.pr, opts.repo), { cwd: opts.cwd }))
272
+ });
273
+ return { result, capMs };
274
+ }
275
+ var waitCommand = defineCommand({
276
+ meta: {
277
+ name: "wait",
278
+ description: "Wait, read-only and bounded, for the operator merge of a staging\u2192main promote PR; at the cap (config promoteMergeWaitMs, default 60 min) print the promote-merge-wait Ask and exit 3"
279
+ },
280
+ args: {
281
+ pr: { type: "string", description: "Promote PR number", required: true },
282
+ repo: { type: "string", description: "owner/name (default: the checkout's gh repo)" },
283
+ "cap-minutes": {
284
+ type: "string",
285
+ description: "Override the cap for this run (minutes; clamped like the config key)"
286
+ },
287
+ json: { type: "boolean", description: "Print the result as JSON", default: false },
288
+ cwd: { type: "string", description: "Workspace folder (default: current directory)" }
289
+ },
290
+ async run({ args }) {
291
+ const pr = Number.parseInt(String(args.pr), 10);
292
+ if (!Number.isInteger(pr) || pr <= 0) {
293
+ process.stderr.write("--pr must be a positive PR number.\n");
294
+ process.exitCode = 1;
295
+ return;
296
+ }
297
+ const root = path.resolve(typeof args.cwd === "string" && args.cwd ? args.cwd : ".");
298
+ const capArg = args["cap-minutes"];
299
+ const capMs = typeof capArg === "string" && capArg ? resolvePromoteMergeWaitMs({ promoteMergeWaitMs: Number(capArg) * 6e4 }) : void 0;
300
+ const { result } = await runPromoteWait({
301
+ pr,
302
+ cwd: root,
303
+ repo: typeof args.repo === "string" && args.repo ? args.repo : void 0,
304
+ capMs
305
+ });
306
+ process.stdout.write(
307
+ args.json ? `${JSON.stringify(result, null, 2)}
308
+ ` : formatPromoteMergeWaitResult(pr, result)
309
+ );
310
+ process.exitCode = promoteWaitExitCode(result);
311
+ }
312
+ });
313
+ async function runPromoteRules(opts) {
314
+ const runGh = opts.runGh ?? defaultRunGh;
315
+ return rulesetPreflightFromGh({
316
+ base: opts.base,
317
+ repo: opts.repo,
318
+ runGh: (args) => runGh(args, { cwd: opts.cwd })
319
+ });
320
+ }
321
+ var rulesCommand = defineCommand({
322
+ meta: {
323
+ name: "rules",
324
+ description: "Promote preflight: read the base branch rules (gh api .../rules/branches/<base>) and print each rule parameter the kit does not model; advisory, always exit 0"
325
+ },
326
+ args: {
327
+ base: { type: "string", description: "Promote base branch (default: main)", default: "main" },
328
+ repo: { type: "string", description: "owner/name (default: the checkout's gh repo)" },
329
+ json: {
330
+ type: "boolean",
331
+ description: "Print the unmodeled parameters as JSON",
332
+ default: false
333
+ },
334
+ cwd: { type: "string", description: "Workspace folder (default: current directory)" }
335
+ },
336
+ async run({ args }) {
337
+ const base = typeof args.base === "string" && args.base ? args.base : "main";
338
+ const root = path.resolve(typeof args.cwd === "string" && args.cwd ? args.cwd : ".");
339
+ const result = await runPromoteRules({
340
+ base,
341
+ cwd: root,
342
+ repo: typeof args.repo === "string" && args.repo ? args.repo : void 0
343
+ });
344
+ if (args.json) {
345
+ const payload = result.ok ? { ok: true, base, unmodeled: findUnmodeledRuleParameters(result.rules) } : { ok: false, base, note: result.note };
346
+ process.stdout.write(`${JSON.stringify(payload, null, 2)}
347
+ `);
348
+ } else {
349
+ process.stdout.write(formatRulesetPreflight(base, result));
350
+ }
351
+ process.exitCode = 0;
352
+ }
353
+ });
354
+ var promoteCommand = defineCommand({
355
+ meta: {
356
+ name: "promote",
357
+ description: "Read-only helpers for the staging\u2192main promote PR (`wait`: bounded wait for the operator merge; `rules`: ruleset preflight)"
358
+ },
359
+ subCommands: { wait: waitCommand, rules: rulesCommand }
360
+ });
361
+ export {
362
+ promoteCommand,
363
+ promotePrViewArgs,
364
+ promoteWaitExitCode,
365
+ runPromoteRules,
366
+ runPromoteWait
367
+ };
@@ -2,17 +2,17 @@ import {
2
2
  classifyInstallError,
3
3
  isNonInteractive,
4
4
  pathCliStatus
5
- } from "./chunk-2KATW2O4.js";
5
+ } from "./chunk-GBHOP62P.js";
6
6
  import {
7
7
  assessEnvironment
8
8
  } from "./chunk-B3VR5YBQ.js";
9
- import "./chunk-DONKV6MA.js";
9
+ import "./chunk-H5OSZ7HQ.js";
10
10
  import "./chunk-PFEUZXVT.js";
11
- import "./chunk-6QBU4DQF.js";
12
- import "./chunk-OVRWRZ5S.js";
13
- import "./chunk-4PL57BZ5.js";
14
- import "./chunk-DQLIEJFK.js";
15
- import "./chunk-A4PHFHYO.js";
11
+ import "./chunk-AXQJX4DC.js";
12
+ import "./chunk-TR6AC5FW.js";
13
+ import "./chunk-BMU74QWR.js";
14
+ import "./chunk-YZSPNXR2.js";
15
+ import "./chunk-NEMOV327.js";
16
16
  import {
17
17
  KIT_VERSION,
18
18
  pinnedCliSpec
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  detectWorkspaceParent,
3
3
  workspaceParentAdvisoryLines
4
- } from "./chunk-JRCI2GNS.js";
4
+ } from "./chunk-OLDRCWHE.js";
5
5
  import {
6
6
  createReadinessReport
7
7
  } from "./chunk-PNFF6OU3.js";
@@ -15,21 +15,21 @@ import {
15
15
  import {
16
16
  npxPinned,
17
17
  pathCliStatus
18
- } from "./chunk-2KATW2O4.js";
18
+ } from "./chunk-GBHOP62P.js";
19
19
  import {
20
20
  assessEnvironment
21
21
  } from "./chunk-B3VR5YBQ.js";
22
- import "./chunk-DONKV6MA.js";
22
+ import "./chunk-H5OSZ7HQ.js";
23
23
  import "./chunk-PFEUZXVT.js";
24
- import "./chunk-6QBU4DQF.js";
25
- import "./chunk-OVRWRZ5S.js";
26
- import "./chunk-4PL57BZ5.js";
24
+ import "./chunk-AXQJX4DC.js";
25
+ import "./chunk-TR6AC5FW.js";
26
+ import "./chunk-BMU74QWR.js";
27
27
  import {
28
28
  MANIFEST_RELATIVE_PATH,
29
29
  loadAgentKitManifest,
30
30
  resolveProtectedGlobs
31
- } from "./chunk-DQLIEJFK.js";
32
- import "./chunk-A4PHFHYO.js";
31
+ } from "./chunk-YZSPNXR2.js";
32
+ import "./chunk-NEMOV327.js";
33
33
  import {
34
34
  KIT_VERSION
35
35
  } from "./chunk-7HDQEK6T.js";
@@ -4,7 +4,7 @@ import {
4
4
  formatRerunFlags,
5
5
  formatStaleCliRefusal,
6
6
  syncFromManifest
7
- } from "./chunk-N7HMTWS5.js";
7
+ } from "./chunk-IS35XTGX.js";
8
8
  import {
9
9
  formatSkippedSymlinks,
10
10
  logApplyStats
@@ -12,16 +12,16 @@ import {
12
12
  import {
13
13
  REGISTRY_CLI_ARGS,
14
14
  resolveRegistryFromCli
15
- } from "./chunk-PHH3H5EQ.js";
15
+ } from "./chunk-WSJLLK3U.js";
16
16
  import {
17
17
  CLAUDE_SETTINGS_REL,
18
18
  formatClaudeSettingsDrift,
19
19
  planClaudeSettingsDrift,
20
20
  writeClaudeSessionStartHook
21
- } from "./chunk-JGEGTOF6.js";
21
+ } from "./chunk-UNDPOCWT.js";
22
22
  import {
23
23
  generateClaudeCommandAdapters
24
- } from "./chunk-LQJNGECA.js";
24
+ } from "./chunk-KTWDHHIO.js";
25
25
  import "./chunk-6RRG3WOE.js";
26
26
  import {
27
27
  withCliProgress
@@ -34,25 +34,25 @@ import {
34
34
  confirmProjectRoot,
35
35
  isNonInteractive,
36
36
  syncPathCliToRuntime
37
- } from "./chunk-2KATW2O4.js";
37
+ } from "./chunk-GBHOP62P.js";
38
38
  import "./chunk-B3VR5YBQ.js";
39
39
  import {
40
40
  checkForUpdates
41
- } from "./chunk-DONKV6MA.js";
41
+ } from "./chunk-H5OSZ7HQ.js";
42
42
  import "./chunk-PFEUZXVT.js";
43
- import "./chunk-6QBU4DQF.js";
44
- import "./chunk-OVRWRZ5S.js";
45
- import "./chunk-4PL57BZ5.js";
43
+ import "./chunk-AXQJX4DC.js";
44
+ import "./chunk-TR6AC5FW.js";
45
+ import "./chunk-BMU74QWR.js";
46
46
  import {
47
47
  buildManifest,
48
48
  isProtectedPath,
49
49
  loadAgentKitManifest,
50
50
  resolveProtectedGlobs,
51
51
  saveManifest
52
- } from "./chunk-DQLIEJFK.js";
52
+ } from "./chunk-YZSPNXR2.js";
53
53
  import {
54
54
  seedManagedHashLedger
55
- } from "./chunk-A4PHFHYO.js";
55
+ } from "./chunk-NEMOV327.js";
56
56
  import {
57
57
  KIT_VERSION
58
58
  } from "./chunk-7HDQEK6T.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dadado/agent-kit-cli",
3
- "version": "6.13.1",
3
+ "version": "6.14.0",
4
4
  "description": "Agent Kit CLI: HITL framework install and tooling for AI-assisted IDEs (rules, skills, plan/handoff, context).",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -42,10 +42,10 @@
42
42
  "kolorist": "^1.8.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@types/node": "^22.14.1",
45
+ "@types/node": "^22.20.5",
46
46
  "tsup": "^9.0.0",
47
47
  "tsx": "^4.23.15",
48
- "vite": "^8.3.3",
49
- "vitest": "^5.0.3"
48
+ "vite": "^8.3.5",
49
+ "vitest": "^5.0.5"
50
50
  }
51
51
  }
@@ -1,9 +1,9 @@
1
- import {
2
- DRIVER_PROTOCOL_VERSION
3
- } from "./chunk-SKC6QZW4.js";
4
1
  import {
5
2
  bundledDashboardCandidates
6
3
  } from "./chunk-XDCCYBCJ.js";
4
+ import {
5
+ DRIVER_PROTOCOL_VERSION
6
+ } from "./chunk-SKC6QZW4.js";
7
7
  import "./chunk-WRCXRV2U.js";
8
8
  import "./chunk-ZB43YMHW.js";
9
9
 
@@ -4,6 +4,9 @@ import {
4
4
  withLiveTui
5
5
  } from "./chunk-CFJRCJWD.js";
6
6
  import "./chunk-ZFJIJUZ4.js";
7
+ import {
8
+ negatedFlag
9
+ } from "./chunk-XDCCYBCJ.js";
7
10
  import {
8
11
  landDispatchOutcome,
9
12
  runDispatchDriver
@@ -24,9 +27,6 @@ import "./chunk-CRLMS2JX.js";
24
27
  import {
25
28
  LAND_ON_GATE_DESCRIPTION
26
29
  } from "./chunk-2TKPKRHO.js";
27
- import {
28
- negatedFlag
29
- } from "./chunk-XDCCYBCJ.js";
30
30
  import "./chunk-L5V3W3DY.js";
31
31
  import "./chunk-MUTTNRX4.js";
32
32
  import {
@@ -2,6 +2,9 @@ import {
2
2
  runPlanLoop
3
3
  } from "./chunk-CFJRCJWD.js";
4
4
  import "./chunk-ZFJIJUZ4.js";
5
+ import {
6
+ negatedFlag
7
+ } from "./chunk-XDCCYBCJ.js";
5
8
  import "./chunk-7ABY6DYH.js";
6
9
  import {
7
10
  DRIVER_EVENTS_FORMATS
@@ -13,9 +16,6 @@ import {
13
16
  import {
14
17
  LAND_ON_GATE_DESCRIPTION
15
18
  } from "./chunk-2TKPKRHO.js";
16
- import {
17
- negatedFlag
18
- } from "./chunk-XDCCYBCJ.js";
19
19
  import "./chunk-L5V3W3DY.js";
20
20
  import "./chunk-MUTTNRX4.js";
21
21
  import {