@dadado/agent-kit-cli 5.18.0 → 6.1.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 (55) hide show
  1. package/LICENSE +201 -74
  2. package/NOTICE +2 -0
  3. package/README.md +3 -3
  4. package/dashboard/dashboard-data.mjs +11 -11
  5. package/dashboard/lib/processes.mjs +1 -1
  6. package/dashboard/lib/run-logs.mjs +1 -1
  7. package/dashboard/lib/semantic-model.mjs +4 -3
  8. package/dashboard/serve.mjs +4 -4
  9. package/dashboard/start-broadcast.mjs +1 -1
  10. package/dashboard/start.mjs +1 -1
  11. package/dist/{add-KQJE3ZTG.js → add-YTCDLPUS.js} +3 -3
  12. package/dist/{chunk-YMYLO5LG.js → chunk-2FQX2O4I.js} +4 -4
  13. package/dist/{chunk-ZDCEAGD4.js → chunk-3DGTPONS.js} +1 -1
  14. package/dist/{chunk-RZ5TNBHU.js → chunk-3XKVQS2K.js} +2 -2
  15. package/dist/{chunk-VY7MTPJ2.js → chunk-426GITN7.js} +1 -1
  16. package/dist/{chunk-2IPXQFJE.js → chunk-4CRBUEJ6.js} +2 -2
  17. package/dist/{chunk-77V75A7O.js → chunk-5B4DVO6C.js} +1 -1
  18. package/dist/{chunk-4IWG5CVE.js → chunk-B3VR5YBQ.js} +10 -5
  19. package/dist/{chunk-6FXQINND.js → chunk-BBVBYQJO.js} +2 -2
  20. package/dist/{chunk-WSJ77EHO.js → chunk-DBPNGZNH.js} +5 -4
  21. package/dist/{chunk-UEKWZ7BN.js → chunk-DBXDV5O7.js} +3 -3
  22. package/dist/{chunk-P6PMKYWU.js → chunk-DRND2KYV.js} +2 -2
  23. package/dist/{chunk-B5CH47OS.js → chunk-ESNAFDYT.js} +1 -0
  24. package/dist/{chunk-YJMZ6UM2.js → chunk-GN4SAZF2.js} +4 -4
  25. package/dist/{chunk-ZXKZBTXE.js → chunk-HAFRAXGV.js} +1 -1
  26. package/dist/{chunk-CBCW5R5J.js → chunk-MCH3E46V.js} +2 -2
  27. package/dist/{chunk-NQ7IQ5XT.js → chunk-PFEUZXVT.js} +1 -1
  28. package/dist/{chunk-TZYKLR5J.js → chunk-PPKX55GI.js} +3 -3
  29. package/dist/{chunk-KIXK7KOW.js → chunk-TMFOLRU2.js} +11 -11
  30. package/dist/{chunk-TOWH3XCJ.js → chunk-TPCCSWK6.js} +521 -26
  31. package/dist/{chunk-ZCTSUQRR.js → chunk-U5F6RJN4.js} +5 -4
  32. package/dist/{chunk-GSCXFJB7.js → chunk-VTOUQAVR.js} +1 -1
  33. package/dist/{chunk-3J3I2W22.js → chunk-WUWRGOUV.js} +1 -1
  34. package/dist/{chunk-HRILMD5N.js → chunk-YP4OOK4T.js} +5 -5
  35. package/dist/{contribute-LFT762Y4.js → contribute-A7NCWTUM.js} +4 -4
  36. package/dist/{cursor-awareness-KTL2RGKD.js → cursor-awareness-TN5JXD2C.js} +3 -3
  37. package/dist/{diff-56KMRCER.js → diff-4MDU5SLE.js} +5 -5
  38. package/dist/{doctor-AA64XVEY.js → doctor-SS6Y2T6H.js} +14 -13
  39. package/dist/{dogfood-KKFVRWT6.js → dogfood-2JAHSYQA.js} +4 -4
  40. package/dist/{handoff-34SDU4FF.js → handoff-MK5JG3J5.js} +3 -3
  41. package/dist/{hook-KRIXBLNW.js → hook-D2WHBKRN.js} +10 -10
  42. package/dist/index.js +24 -24
  43. package/dist/{init-XP5EAUSJ.js → init-GVVBA2BM.js} +15 -15
  44. package/dist/{install-SHDEX54F.js → install-R4HPI7VK.js} +15 -15
  45. package/dist/{monitors-QV2IS3MP.js → monitors-PDXBLB3U.js} +1 -1
  46. package/dist/{plan-index-O3545OA7.js → plan-index-V7T5MKL6.js} +2 -2
  47. package/dist/{public-inbound-radar-WP3XF7GS.js → public-inbound-radar-5U4JMBRU.js} +3 -3
  48. package/dist/{remote-issues-SZ4HDQL5.js → remote-issues-APYOMIJC.js} +4 -4
  49. package/dist/{run-FADX6QCP.js → run-YV6XTFZY.js} +48 -8
  50. package/dist/{run-plan-MO4IFAKV.js → run-plan-KT443FO6.js} +11 -4
  51. package/dist/{scan-NI2SWJ2E.js → scan-K6TQGV4S.js} +2 -2
  52. package/dist/{setup-global-CBWLXOQG.js → setup-global-AT4DD3MG.js} +8 -8
  53. package/dist/{status-BSIXWZMY.js → status-MPJHI5RP.js} +10 -10
  54. package/dist/{update-FJX3DA6X.js → update-P62637ZI.js} +11 -11
  55. package/package.json +10 -6
@@ -1,13 +1,16 @@
1
1
  import {
2
+ LAND_ON_GATE_DESCRIPTION,
3
+ classifyGateExit,
2
4
  detectAgentBackend,
5
+ landGateExit,
3
6
  listDetectBackendIds,
4
7
  runPlanLoop,
5
8
  shouldUseLiveTui,
6
9
  withLiveTui
7
- } from "./chunk-TOWH3XCJ.js";
10
+ } from "./chunk-TPCCSWK6.js";
8
11
  import "./chunk-PCCQUWE5.js";
9
12
  import "./chunk-HFUH3HVS.js";
10
- import "./chunk-3J3I2W22.js";
13
+ import "./chunk-WUWRGOUV.js";
11
14
  import {
12
15
  buildDispatchPrompt,
13
16
  classifySlash,
@@ -17,13 +20,13 @@ import {
17
20
  readCommandFile,
18
21
  runHeadlessDispatch,
19
22
  unknownSlashMessage
20
- } from "./chunk-RZ5TNBHU.js";
23
+ } from "./chunk-3XKVQS2K.js";
21
24
  import {
22
25
  HITL_UNANSWERED_EXIT_CODE,
23
26
  formatHitlSummary,
24
27
  getBackend,
25
28
  hitlExitCode
26
- } from "./chunk-B5CH47OS.js";
29
+ } from "./chunk-ESNAFDYT.js";
27
30
  import "./chunk-WGLPZXNU.js";
28
31
  import "./chunk-MAPOQEA2.js";
29
32
  import "./chunk-QTON2GQX.js";
@@ -31,7 +34,7 @@ import {
31
34
  logger
32
35
  } from "./chunk-ZB43YMHW.js";
33
36
  import "./chunk-C26I6HTO.js";
34
- import "./chunk-77V75A7O.js";
37
+ import "./chunk-5B4DVO6C.js";
35
38
 
36
39
  // src/commands/run.ts
37
40
  import { homedir } from "os";
@@ -82,7 +85,8 @@ async function executeRun(input) {
82
85
  dryRun: false,
83
86
  backend,
84
87
  noHitl: input.noHitl === true,
85
- plain: input.plain === true
88
+ plain: input.plain === true,
89
+ landOnGate: input.landOnGate === true
86
90
  });
87
91
  return { exitCode: code };
88
92
  }
@@ -129,7 +133,37 @@ async function executeRun(input) {
129
133
  hitl: { policy: input.noHitl ? "off" : "prompt" }
130
134
  });
131
135
  for (const line of formatHitlSummary(result.hitl)) console.log(line);
132
- return { exitCode: hitlExitCode(result.exitCode, result.hitl) };
136
+ const exitCode = hitlExitCode(result.exitCode, result.hitl);
137
+ const trigger = input.landOnGate ? classifyGateExit({ stop: result.hitl?.stop, failed: exitCode !== 0 }) : null;
138
+ if (trigger) {
139
+ const stop = result.hitl?.stop;
140
+ const summary = result.lastResult?.resultText.trim() || result.lastResult?.assistantTexts.at(-1)?.trim() || void 0;
141
+ try {
142
+ await landGateExit({
143
+ root,
144
+ outcome: {
145
+ trigger,
146
+ exitCode,
147
+ reason: stop?.message ?? `${detected.id} exited with code ${exitCode}`,
148
+ command: `run ${slash}`,
149
+ backend: detected.id,
150
+ logPath,
151
+ ...stop ? { askId: stop.askId } : {},
152
+ ...summary ? { summary } : {},
153
+ ...result.lastResult ? {
154
+ gateText: [
155
+ result.lastResult.resultText,
156
+ ...result.lastResult.assistantTexts
157
+ ].join("\n")
158
+ } : {}
159
+ },
160
+ log: (line) => console.log(line)
161
+ });
162
+ } catch (err) {
163
+ console.log(`gate-exit: landing failed: ${String(err)}`);
164
+ }
165
+ }
166
+ return { exitCode };
133
167
  } catch (err) {
134
168
  return { exitCode: 1, error: String(err) };
135
169
  }
@@ -174,6 +208,11 @@ var runDispatchArgs = {
174
208
  type: "boolean",
175
209
  description: "Status lines instead of the Mission Control live view (the default on a TTY; non-TTY, NO_COLOR and CI are always plain)",
176
210
  default: false
211
+ },
212
+ "land-on-gate": {
213
+ type: "boolean",
214
+ description: LAND_ON_GATE_DESCRIPTION,
215
+ default: false
177
216
  }
178
217
  };
179
218
  async function runSlashCli(slash, args) {
@@ -198,7 +237,8 @@ async function runSlashCli(slash, args) {
198
237
  maxTicks,
199
238
  sleepSeconds,
200
239
  noHitl: Boolean(args["no-hitl"]),
201
- plain: Boolean(args.plain)
240
+ plain: Boolean(args.plain),
241
+ landOnGate: Boolean(args["land-on-gate"])
202
242
  });
203
243
  if (result.stdout) {
204
244
  console.log(result.stdout);
@@ -1,16 +1,17 @@
1
1
  import {
2
2
  DRIVER_EVENTS_FORMATS,
3
+ LAND_ON_GATE_DESCRIPTION,
3
4
  detectAgentBackend,
4
5
  listDetectBackendIds,
5
6
  runPlanLoop
6
- } from "./chunk-TOWH3XCJ.js";
7
+ } from "./chunk-TPCCSWK6.js";
7
8
  import "./chunk-PCCQUWE5.js";
8
9
  import "./chunk-HFUH3HVS.js";
9
- import "./chunk-3J3I2W22.js";
10
+ import "./chunk-WUWRGOUV.js";
10
11
  import {
11
12
  HITL_UNANSWERED_EXIT_CODE,
12
13
  getBackend
13
- } from "./chunk-B5CH47OS.js";
14
+ } from "./chunk-ESNAFDYT.js";
14
15
  import "./chunk-WGLPZXNU.js";
15
16
  import "./chunk-MAPOQEA2.js";
16
17
  import "./chunk-QTON2GQX.js";
@@ -18,7 +19,7 @@ import {
18
19
  logger
19
20
  } from "./chunk-ZB43YMHW.js";
20
21
  import "./chunk-C26I6HTO.js";
21
- import "./chunk-77V75A7O.js";
22
+ import "./chunk-5B4DVO6C.js";
22
23
 
23
24
  // src/commands/run-plan.ts
24
25
  import path from "path";
@@ -74,6 +75,11 @@ var runPlanCommand = defineCommand({
74
75
  description: "Driver mode for apps: `ndjson` writes only NDJSON events to stdout and reads HITL answers as JSON lines on stdin (no TTY needed; see docs/driver-events-protocol.md)",
75
76
  default: ""
76
77
  },
78
+ "land-on-gate": {
79
+ type: "boolean",
80
+ description: LAND_ON_GATE_DESCRIPTION,
81
+ default: false
82
+ },
77
83
  plain: {
78
84
  type: "boolean",
79
85
  description: "Status lines instead of the Mission Control live view (the default on a TTY; non-TTY, NO_COLOR and CI are always plain)",
@@ -138,6 +144,7 @@ var runPlanCommand = defineCommand({
138
144
  backend,
139
145
  noHitl: Boolean(args["no-hitl"]),
140
146
  plain: Boolean(args.plain),
147
+ landOnGate: Boolean(args["land-on-gate"]),
141
148
  ...events ? { events: {} } : {},
142
149
  ...onLimit ? { onLimit } : {}
143
150
  });
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  runScanner
3
- } from "./chunk-ZCTSUQRR.js";
3
+ } from "./chunk-U5F6RJN4.js";
4
4
  import "./chunk-F6C3GFKV.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-ZB43YMHW.js";
8
- import "./chunk-77V75A7O.js";
8
+ import "./chunk-5B4DVO6C.js";
9
9
 
10
10
  // src/commands/scan.ts
11
11
  import { defineCommand } from "citty";
@@ -2,21 +2,21 @@ import {
2
2
  classifyInstallError,
3
3
  isNonInteractive,
4
4
  pathCliStatus
5
- } from "./chunk-YJMZ6UM2.js";
5
+ } from "./chunk-GN4SAZF2.js";
6
6
  import {
7
7
  assessEnvironment
8
- } from "./chunk-4IWG5CVE.js";
9
- import "./chunk-YMYLO5LG.js";
10
- import "./chunk-NQ7IQ5XT.js";
11
- import "./chunk-6FXQINND.js";
12
- import "./chunk-GSCXFJB7.js";
13
- import "./chunk-WSJ77EHO.js";
8
+ } from "./chunk-B3VR5YBQ.js";
9
+ import "./chunk-2FQX2O4I.js";
10
+ import "./chunk-PFEUZXVT.js";
11
+ import "./chunk-BBVBYQJO.js";
12
+ import "./chunk-VTOUQAVR.js";
13
+ import "./chunk-DBPNGZNH.js";
14
14
  import {
15
15
  KIT_VERSION,
16
16
  pinnedCliSpec
17
17
  } from "./chunk-7HDQEK6T.js";
18
18
  import "./chunk-C26I6HTO.js";
19
- import "./chunk-77V75A7O.js";
19
+ import "./chunk-5B4DVO6C.js";
20
20
 
21
21
  // src/commands/setup-global.ts
22
22
  import { spawn } from "child_process";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  detectWorkspaceParent,
3
3
  workspaceParentAdvisoryLines
4
- } from "./chunk-P6PMKYWU.js";
4
+ } from "./chunk-DRND2KYV.js";
5
5
  import {
6
6
  createReadinessReport
7
7
  } from "./chunk-PNFF6OU3.js";
8
8
  import {
9
9
  runScanner
10
- } from "./chunk-ZCTSUQRR.js";
10
+ } from "./chunk-U5F6RJN4.js";
11
11
  import "./chunk-F6C3GFKV.js";
12
12
  import {
13
13
  logger
@@ -15,26 +15,26 @@ import {
15
15
  import {
16
16
  npxPinned,
17
17
  pathCliStatus
18
- } from "./chunk-YJMZ6UM2.js";
18
+ } from "./chunk-GN4SAZF2.js";
19
19
  import {
20
20
  assessEnvironment
21
- } from "./chunk-4IWG5CVE.js";
22
- import "./chunk-YMYLO5LG.js";
23
- import "./chunk-NQ7IQ5XT.js";
24
- import "./chunk-6FXQINND.js";
25
- import "./chunk-GSCXFJB7.js";
21
+ } from "./chunk-B3VR5YBQ.js";
22
+ import "./chunk-2FQX2O4I.js";
23
+ import "./chunk-PFEUZXVT.js";
24
+ import "./chunk-BBVBYQJO.js";
25
+ import "./chunk-VTOUQAVR.js";
26
26
  import {
27
27
  MANIFEST_RELATIVE_PATH,
28
28
  loadAgentKitManifest,
29
29
  resolveProtectedGlobs
30
- } from "./chunk-WSJ77EHO.js";
30
+ } from "./chunk-DBPNGZNH.js";
31
31
  import {
32
32
  KIT_VERSION
33
33
  } from "./chunk-7HDQEK6T.js";
34
34
  import "./chunk-C26I6HTO.js";
35
35
  import {
36
36
  readJson
37
- } from "./chunk-77V75A7O.js";
37
+ } from "./chunk-5B4DVO6C.js";
38
38
 
39
39
  // src/commands/status.ts
40
40
  import path from "path";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  NON_INTERACTIVE_ROOT_ARGS,
3
3
  syncFromManifest
4
- } from "./chunk-UEKWZ7BN.js";
4
+ } from "./chunk-DBXDV5O7.js";
5
5
  import {
6
6
  formatSkippedSymlinks,
7
7
  logApplyStats
@@ -9,14 +9,14 @@ import {
9
9
  import {
10
10
  REGISTRY_CLI_ARGS,
11
11
  resolveRegistryFromCli
12
- } from "./chunk-ZDCEAGD4.js";
12
+ } from "./chunk-3DGTPONS.js";
13
13
  import {
14
14
  CLAUDE_SETTINGS_REL,
15
15
  formatClaudeSettingsDrift,
16
16
  generateClaudeCommandAdapters,
17
17
  planClaudeSettingsDrift,
18
18
  writeClaudeSessionStartHook
19
- } from "./chunk-TZYKLR5J.js";
19
+ } from "./chunk-PPKX55GI.js";
20
20
  import "./chunk-MAPOQEA2.js";
21
21
  import {
22
22
  withCliProgress
@@ -29,17 +29,17 @@ import {
29
29
  confirmProjectRoot,
30
30
  isNonInteractive,
31
31
  syncPathCliToRuntime
32
- } from "./chunk-YJMZ6UM2.js";
33
- import "./chunk-4IWG5CVE.js";
32
+ } from "./chunk-GN4SAZF2.js";
33
+ import "./chunk-B3VR5YBQ.js";
34
34
  import {
35
35
  checkForUpdates,
36
36
  compareSemver,
37
37
  normalizeSemver,
38
38
  readLocalKitVersion
39
- } from "./chunk-YMYLO5LG.js";
40
- import "./chunk-NQ7IQ5XT.js";
41
- import "./chunk-6FXQINND.js";
42
- import "./chunk-GSCXFJB7.js";
39
+ } from "./chunk-2FQX2O4I.js";
40
+ import "./chunk-PFEUZXVT.js";
41
+ import "./chunk-BBVBYQJO.js";
42
+ import "./chunk-VTOUQAVR.js";
43
43
  import {
44
44
  buildManifest,
45
45
  isProtectedPath,
@@ -47,13 +47,13 @@ import {
47
47
  resolveProtectedGlobs,
48
48
  saveManifest,
49
49
  seedManagedHashLedger
50
- } from "./chunk-WSJ77EHO.js";
50
+ } from "./chunk-DBPNGZNH.js";
51
51
  import {
52
52
  KIT_PACKAGE_SPEC,
53
53
  KIT_VERSION
54
54
  } from "./chunk-7HDQEK6T.js";
55
55
  import "./chunk-C26I6HTO.js";
56
- import "./chunk-77V75A7O.js";
56
+ import "./chunk-5B4DVO6C.js";
57
57
 
58
58
  // src/commands/update.ts
59
59
  import { defineCommand } from "citty";
package/package.json CHANGED
@@ -1,18 +1,22 @@
1
1
  {
2
2
  "name": "@dadado/agent-kit-cli",
3
- "version": "5.18.0",
3
+ "version": "6.1.0",
4
4
  "description": "Agent Kit CLI: HITL framework install and tooling for AI-assisted IDEs (rules, skills, plan/handoff, context).",
5
- "license": "PolyForm-Noncommercial-1.0.0",
5
+ "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "bin": {
8
8
  "agent-kit": "./dist/index.js"
9
9
  },
10
10
  "main": "./dist/index.js",
11
11
  "types": "./dist/index.d.ts",
12
+ "engines": {
13
+ "node": ">=22.12"
14
+ },
12
15
  "files": [
13
16
  "dist",
14
17
  "dashboard",
15
- "LICENSE"
18
+ "LICENSE",
19
+ "NOTICE"
16
20
  ],
17
21
  "dependencies": {
18
22
  "@clack/prompts": "^1.8.1",
@@ -22,9 +26,9 @@
22
26
  "devDependencies": {
23
27
  "@types/node": "^22.14.1",
24
28
  "tsup": "^8.4.0",
25
- "tsx": "^4.19.3",
26
- "vite": "^7.3.5",
27
- "vitest": "^3.2.6"
29
+ "tsx": "^4.23.15",
30
+ "vite": "^8.3.3",
31
+ "vitest": "^5.0.3"
28
32
  },
29
33
  "scripts": {
30
34
  "sync-dashboard": "node ../../scripts/sync-cli-dashboard.mjs",