@dadado/agent-kit-cli 6.1.1 → 6.3.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 (48) hide show
  1. package/dashboard/README.md +3 -1
  2. package/dashboard/dashboard-data.mjs +13 -2
  3. package/dashboard/dashboard.html +95 -2
  4. package/dashboard/lib/gate-exit-tickets.d.mts +45 -0
  5. package/dashboard/lib/gate-exit-tickets.mjs +233 -0
  6. package/dashboard/lib/semantic-model.d.mts +21 -0
  7. package/dashboard/lib/semantic-model.mjs +47 -0
  8. package/dist/{add-YTCDLPUS.js → add-VA2W7I6P.js} +3 -3
  9. package/dist/{chunk-VTOUQAVR.js → chunk-25J2SMJQ.js} +9 -1
  10. package/dist/{chunk-2FQX2O4I.js → chunk-6GYKOHIL.js} +2 -2
  11. package/dist/{chunk-DBPNGZNH.js → chunk-6KUSG7BJ.js} +15 -2
  12. package/dist/{chunk-C26I6HTO.js → chunk-C4Q77GGJ.js} +0 -1
  13. package/dist/{chunk-U5F6RJN4.js → chunk-GO3K752H.js} +4 -1
  14. package/dist/chunk-GUQYNUV4.js +61 -0
  15. package/dist/{chunk-ESNAFDYT.js → chunk-JEI6HACW.js} +44 -1
  16. package/dist/chunk-KVY425NM.js +519 -0
  17. package/dist/{chunk-WUWRGOUV.js → chunk-L5V3W3DY.js} +13 -1
  18. package/dist/chunk-MO63KZBP.js +516 -0
  19. package/dist/chunk-MUTTNRX4.js +53 -0
  20. package/dist/{chunk-PPKX55GI.js → chunk-NNKOWUWM.js} +1 -1
  21. package/dist/{chunk-DRND2KYV.js → chunk-OVOXRH5W.js} +1 -1
  22. package/dist/{chunk-GN4SAZF2.js → chunk-OWWFKGKS.js} +2 -2
  23. package/dist/chunk-QTBTKEXK.js +77 -0
  24. package/dist/{chunk-TMFOLRU2.js → chunk-SV2BR2LZ.js} +44 -9
  25. package/dist/{chunk-3DGTPONS.js → chunk-U26MRIWN.js} +1 -1
  26. package/dist/{chunk-BBVBYQJO.js → chunk-VQBI3JVS.js} +2 -2
  27. package/dist/{chunk-YP4OOK4T.js → chunk-WMVMBPCR.js} +2 -2
  28. package/dist/{chunk-OZYJUNAQ.js → chunk-YRFSTHR5.js} +29 -525
  29. package/dist/{chunk-3XKVQS2K.js → chunk-Z7ABX5QI.js} +13 -9
  30. package/dist/{chunk-DBXDV5O7.js → chunk-Z7RYIHHX.js} +90 -5
  31. package/dist/{contribute-A7NCWTUM.js → contribute-NLM2BN6Z.js} +4 -4
  32. package/dist/countdown-QXJD6TDB.js +479 -0
  33. package/dist/{diff-4MDU5SLE.js → diff-HHG4JEDE.js} +5 -5
  34. package/dist/{doctor-SS6Y2T6H.js → doctor-TWF2M3S3.js} +9 -9
  35. package/dist/ground-control-NMYYIVCV.js +434 -0
  36. package/dist/{handoff-MK5JG3J5.js → handoff-5AGE2D3T.js} +3 -2
  37. package/dist/{hook-D2WHBKRN.js → hook-VP7FHRSZ.js} +7 -6
  38. package/dist/index.js +30 -20
  39. package/dist/{init-GVVBA2BM.js → init-UOTV4ASJ.js} +12 -12
  40. package/dist/{install-R4HPI7VK.js → install-VCHPXQV3.js} +12 -12
  41. package/dist/{plan-index-V7T5MKL6.js → plan-index-BNLUU6T5.js} +3 -2
  42. package/dist/{run-3B26CVIL.js → run-R66G276Q.js} +58 -12
  43. package/dist/{run-plan-APTBO2OT.js → run-plan-24Z5K4P3.js} +12 -7
  44. package/dist/{scan-K6TQGV4S.js → scan-UX4HARMJ.js} +1 -1
  45. package/dist/{setup-global-AT4DD3MG.js → setup-global-M6LKGJHQ.js} +6 -6
  46. package/dist/{status-MPJHI5RP.js → status-5UKVIKOI.js} +8 -8
  47. package/dist/{update-P62637ZI.js → update-VQBGEUWS.js} +33 -43
  48. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HANDOFF_REL
3
- } from "./chunk-C26I6HTO.js";
3
+ } from "./chunk-C4Q77GGJ.js";
4
4
  import {
5
5
  fileExists,
6
6
  readJson,
@@ -682,7 +682,20 @@ var KNOWN_SHIPPED_OVERLAY_HASHES = /* @__PURE__ */ new Set([
682
682
  "f1c7beac6a619520d744fd984bc16b322f3d545b9d8490801aee628dabd94aff",
683
683
  "14d919d01637aa6b5acc92804dbb4ab56cecc88281aedd5cb7b5dcf8f7da958e",
684
684
  "a8decf7b78e2b2c833b0808c3e108322cfb895fadaec159467973a681028d92a",
685
- "afb3d9e620f7697cbb44eb27be8be53e8cf542e33b815e3dc51107183487f739"
685
+ "afb3d9e620f7697cbb44eb27be8be53e8cf542e33b815e3dc51107183487f739",
686
+ "22951f21b164bb816aa4be1868f465b47d79726c982cb39ec3da8ebbe48654d0",
687
+ "2f83a31ce6f1a220479c4b19c419834d847d7d4c5c404910e6fe1650e1374965",
688
+ "50c510e1cd6a1ed8dc07d5d52ac9edde8ceb77b419a038c1a7d3a5bcc58b8e6a",
689
+ "5f542e73afa9435362fde51f55211c2f0524b1a7f4ffa290026b0311441f07cf",
690
+ "62ad807a0703b3fd41378a8bdac6ffe7a782442f0807c694f934ddc430cb280b",
691
+ "73e3ba05ddb11f3e8676baa2e647da609637bb85cb6368eee4ebd2b631e33574",
692
+ "7fcdac7c60f9e75687481cea5befce9cd63c8487c6a23853e7eee7060578c6a7",
693
+ "aef5e06c10d1166e1a3efc3cc1f1deda28430334aa7d3fc1e3fe04de478d4bc3",
694
+ "2b7978c318169d00c7274e27e5082bd6bfe47168c36407c66c828a4e56dab4c1",
695
+ "d92297c4675bf9b91d7aaa39fdfafcf2568c9b8b867c80e8121e6225bcf9d5a3",
696
+ "5656ec26963f4d43f9c440f4cae65ad7aa3a33a603de13d81400d3cb5acd1b40",
697
+ "64cfb0dba5d6bcdcd919eaa73fe32e9e34689323d65c70c9ee8aa107bf228677",
698
+ "267537b445490788f4c146e0f5e9276b77a6cc4be77abca8f5696d758bbddaf9"
686
699
  ]);
687
700
 
688
701
  // src/lifecycle/paths.ts
@@ -23,7 +23,6 @@ function runnerStatePaths(root, env = process.env) {
23
23
  }
24
24
  async function ensureLoopLogsDir(paths) {
25
25
  await mkdir(paths.loopLogsDir, { recursive: true });
26
- if (paths.stateDir === ".cursor") return;
27
26
  const ignore = path.join(paths.loopLogsDir, ".gitignore");
28
27
  try {
29
28
  await writeFile(ignore, "*\n", { flag: "wx" });
@@ -437,7 +437,10 @@ var KIT_OWNED_IGNORE_PATTERNS = [
437
437
  ".cursor/context/readiness.json",
438
438
  ".cursor/context/flight-log.json",
439
439
  ".cursor/context/mission-timing.json",
440
- ".cursor/context/gate-exit.json"
440
+ ".cursor/context/gate-exit.json",
441
+ ".cursor/context/review-ledger.json",
442
+ ".cursor/context/plan-index.json",
443
+ ".cursor/loop-logs/"
441
444
  ];
442
445
  function globToRegExp(glob) {
443
446
  const body = glob.split("*").map((part) => part.replace(/[.+?^${}()|[\]\\]/g, "\\$&")).join("[^/]*");
@@ -0,0 +1,61 @@
1
+ import {
2
+ whichBinary
3
+ } from "./chunk-JEI6HACW.js";
4
+
5
+ // src/plan-loop/detect.ts
6
+ var DETECT_ORDER = ["cursor-agent", "claude"];
7
+ var EXPLICIT_ONLY_BACKENDS = ["codex", "cursor-acp"];
8
+ var INSTALL_HINTS = {
9
+ "cursor-agent": "Install the Cursor Agent CLI and ensure `cursor-agent` is on PATH (https://cursor.com/docs/cli).",
10
+ claude: "Install Claude Code and ensure `claude` is on PATH (https://code.claude.com/docs/en/quickstart).",
11
+ "cursor-acp": "Install the Cursor Agent CLI and ensure `cursor-agent` is on PATH (https://cursor.com/docs/cli/acp); sign in with `cursor-agent login`.",
12
+ codex: "Install the Codex CLI and ensure `codex` is on PATH (https://developers.openai.com/codex/cli)."
13
+ };
14
+ function isBackendId(id) {
15
+ return id === "cursor-agent" || id === "claude" || id === "codex" || id === "cursor-acp";
16
+ }
17
+ function isRequestedBackend(id) {
18
+ return id === "auto" || isBackendId(id);
19
+ }
20
+ function listDetectBackendIds() {
21
+ return ["auto", ...DETECT_ORDER, ...EXPLICIT_ONLY_BACKENDS];
22
+ }
23
+ async function detectAgentBackend(requested, whichFn = whichBinary) {
24
+ const id = requested.trim().toLowerCase();
25
+ if (id === "glm" || id.startsWith("glm-") || id === "glm4") {
26
+ return {
27
+ ok: false,
28
+ message: "No documented GLM CLI binary is registered. Refusing a stub that would claim to work. Use --backend auto, cursor-agent, or claude."
29
+ };
30
+ }
31
+ if (!isRequestedBackend(id)) {
32
+ return {
33
+ ok: false,
34
+ message: `Unknown backend '${requested}'. Supported: ${listDetectBackendIds().join(", ")}.`
35
+ };
36
+ }
37
+ if (id === "auto") {
38
+ for (const candidate of DETECT_ORDER) {
39
+ const bin2 = await whichFn(candidate);
40
+ if (bin2) return { ok: true, id: candidate, bin: bin2 };
41
+ }
42
+ return {
43
+ ok: false,
44
+ message: [
45
+ "No agent CLI found on PATH (tried: cursor-agent, claude).",
46
+ INSTALL_HINTS["cursor-agent"],
47
+ INSTALL_HINTS.claude
48
+ ].join(" ")
49
+ };
50
+ }
51
+ const bin = await whichFn(id);
52
+ if (!bin) {
53
+ return { ok: false, message: `${id} not found on PATH. ${INSTALL_HINTS[id]}` };
54
+ }
55
+ return { ok: true, id, bin };
56
+ }
57
+
58
+ export {
59
+ listDetectBackendIds,
60
+ detectAgentBackend
61
+ };
@@ -1585,6 +1585,7 @@ var VENDOR_SECRET_ENV = [
1585
1585
  "CODEX_API_KEY",
1586
1586
  "CODEX_ACCESS_TOKEN"
1587
1587
  ];
1588
+ var FORGE_SECRET_ENV = ["GH_TOKEN", "GITHUB_TOKEN", "GITLAB_TOKEN", "GLAB_TOKEN"];
1588
1589
  var REDACT_DERIVED_MIN_CHARS = 4;
1589
1590
  var REDACT_DERIVED_SKIP = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "0.0.0.0", "::1", "[::1]"]);
1590
1591
  function derivedSecretForms(value) {
@@ -1620,7 +1621,7 @@ function claudeRedactions(env) {
1620
1621
  seen.add(value);
1621
1622
  entries.push({ label, value });
1622
1623
  };
1623
- for (const key of [...CLAUDE_ENV_PASSTHROUGH, ...VENDOR_SECRET_ENV]) {
1624
+ for (const key of [...CLAUDE_ENV_PASSTHROUGH, ...VENDOR_SECRET_ENV, ...FORGE_SECRET_ENV]) {
1624
1625
  const value = env[key];
1625
1626
  if (!value) continue;
1626
1627
  add(key, value, false);
@@ -1888,6 +1889,23 @@ function cursorAgentHeadlessArgs(opts) {
1888
1889
  args.push(opts.prompt);
1889
1890
  return args;
1890
1891
  }
1892
+ function cursorAgentReviewArgs(opts) {
1893
+ const args = [
1894
+ "-p",
1895
+ "--mode",
1896
+ "ask",
1897
+ "--sandbox",
1898
+ "enabled",
1899
+ "--trust",
1900
+ "--output-format",
1901
+ "stream-json",
1902
+ "--workspace",
1903
+ opts.workspace
1904
+ ];
1905
+ if (opts.model) args.push("--model", opts.model);
1906
+ args.push(opts.prompt);
1907
+ return args;
1908
+ }
1891
1909
  var cursorAgentBackend = {
1892
1910
  id: "cursor-agent",
1893
1911
  async resolve() {
@@ -1985,6 +2003,27 @@ function claudeHeadlessArgs(opts = {}) {
1985
2003
  args.push("--disallowedTools", ...HEADLESS_DENY_RULES);
1986
2004
  return args;
1987
2005
  }
2006
+ function claudeReviewArgs(opts = {}) {
2007
+ const args = [
2008
+ "-p",
2009
+ "--output-format",
2010
+ "stream-json",
2011
+ "--verbose",
2012
+ "--permission-prompts",
2013
+ "none",
2014
+ "--input-format",
2015
+ "stream-json",
2016
+ "--replay-user-messages",
2017
+ "--tools",
2018
+ "",
2019
+ "--strict-mcp-config"
2020
+ ];
2021
+ if (opts.maxTurns !== void 0) args.push("--max-turns", String(opts.maxTurns));
2022
+ if (opts.maxBudgetUsd !== void 0) args.push("--max-budget-usd", String(opts.maxBudgetUsd));
2023
+ if (opts.model) args.push("--model", opts.model);
2024
+ args.push("--disallowedTools", ...HEADLESS_DENY_RULES);
2025
+ return args;
2026
+ }
1988
2027
  async function missingClaudeAdapter(workspace, prompt) {
1989
2028
  const m = /^\/([A-Za-z0-9][A-Za-z0-9_-]*)/.exec(prompt.trimStart());
1990
2029
  if (!m?.[1]) return null;
@@ -2083,12 +2122,16 @@ export {
2083
2122
  redactSecrets,
2084
2123
  RedactingStreamBuffer,
2085
2124
  claudeChildEnv,
2125
+ CLAUDE_MAX_TURNS_ENV,
2126
+ CLAUDE_MAX_BUDGET_USD_ENV,
2086
2127
  claudeRunCaps,
2087
2128
  claudeRedactions,
2088
2129
  whichBinary,
2089
2130
  spawnLogged,
2090
2131
  cursorAgentHeadlessArgs,
2132
+ cursorAgentReviewArgs,
2091
2133
  checkClaudeVersion,
2092
2134
  claudeHeadlessArgs,
2135
+ claudeReviewArgs,
2093
2136
  getBackend
2094
2137
  };