@dadado/agent-kit-cli 6.23.0 → 6.26.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 (86) hide show
  1. package/README.md +1 -0
  2. package/dashboard/dashboard-data.mjs +126 -5
  3. package/dashboard/dashboard.html +48 -7
  4. package/dashboard/lib/guards.mjs +1 -0
  5. package/dashboard/lib/live-refresh.mjs +1 -0
  6. package/dist/{add-RKZQX6ZK.js → add-G7KEZLWP.js} +17 -8
  7. package/dist/{chunk-7HDQEK6T.js → chunk-2G4K4ZI5.js} +7 -3
  8. package/dist/{chunk-5PSV76CQ.js → chunk-2GXN7HVG.js} +26 -7
  9. package/dist/chunk-2QYWMSI5.js +193 -0
  10. package/dist/{chunk-B3VR5YBQ.js → chunk-2TW7ENWC.js} +12 -11
  11. package/dist/{chunk-IESSMKOV.js → chunk-5A72LTR3.js} +7 -7
  12. package/dist/{chunk-R4DUO5DA.js → chunk-AXQMVQ6O.js} +61 -237
  13. package/dist/{chunk-6WUKLS4D.js → chunk-BIFTTL2O.js} +1 -1
  14. package/dist/{chunk-AWQ6KRFV.js → chunk-BVZDPVUL.js} +1 -1
  15. package/dist/{chunk-QNISTPPZ.js → chunk-ENRXS5O6.js} +19 -12
  16. package/dist/chunk-FB6G6OD6.js +519 -0
  17. package/dist/{chunk-MFKHIWEL.js → chunk-FOVHFMSH.js} +1 -1
  18. package/dist/{chunk-6BEFGKCU.js → chunk-FUSNEYGU.js} +29 -3
  19. package/dist/chunk-H7KAXI5R.js +357 -0
  20. package/dist/chunk-HGB4DHXV.js +138 -0
  21. package/dist/{chunk-W3ZJVBNY.js → chunk-HXV6VQD4.js} +2374 -983
  22. package/dist/{chunk-BGL5DRK2.js → chunk-I3FGWNU5.js} +4 -4
  23. package/dist/chunk-IHVJTGYR.js +144 -0
  24. package/dist/{chunk-5LNHRL5E.js → chunk-IUY24WPE.js} +93 -263
  25. package/dist/chunk-JG5MKMOM.js +248 -0
  26. package/dist/{chunk-SGTTC2JP.js → chunk-JWIJHO67.js} +17 -2
  27. package/dist/chunk-KMK4T4ZM.js +34 -0
  28. package/dist/{chunk-ZMYV6PRE.js → chunk-LEVNLHH3.js} +2 -1
  29. package/dist/{chunk-2IP4OO6R.js → chunk-MGVV6YC4.js} +1 -1
  30. package/dist/{chunk-7TYA3GMI.js → chunk-MWRYQLEG.js} +7 -4
  31. package/dist/chunk-NHJ4IAVN.js +435 -0
  32. package/dist/{chunk-C4Q77GGJ.js → chunk-O7VMHCNN.js} +6 -0
  33. package/dist/{chunk-5EBT3V7G.js → chunk-OVRGTHZD.js} +1 -1
  34. package/dist/{chunk-F7YAAKYP.js → chunk-PCIYXGB3.js} +7 -5
  35. package/dist/{chunk-UJCATSYO.js → chunk-PLLXFSN2.js} +46 -17
  36. package/dist/{chunk-OYFCBYMP.js → chunk-RJP47EGS.js} +18 -1
  37. package/dist/{chunk-KDJ4ML7I.js → chunk-RRJVC35Y.js} +4 -4
  38. package/dist/{chunk-DRZFWIBN.js → chunk-SWJJW624.js} +1 -1
  39. package/dist/{chunk-MJJBIOSY.js → chunk-SYRJ5TTK.js} +34 -12
  40. package/dist/{chunk-L5V3W3DY.js → chunk-TTUFIE26.js} +60 -14
  41. package/dist/{chunk-JFS4GKP7.js → chunk-XXPI4H4D.js} +2 -2
  42. package/dist/{chunk-CVZNSRXV.js → chunk-Y5526WCN.js} +84 -19
  43. package/dist/{chunk-CQHD6UKB.js → chunk-Y575INEC.js} +2 -1
  44. package/dist/{chunk-V2H57TFD.js → chunk-ZNZHDPS3.js} +80 -170
  45. package/dist/{commands-SAQEEE6V.js → commands-K4HSDML5.js} +8 -6
  46. package/dist/{conflicts-5JOP4GX2.js → conflicts-4SUWIPWP.js} +9 -10
  47. package/dist/{contribute-BQKRT5GN.js → contribute-HE4WCBRY.js} +7 -5
  48. package/dist/{countdown-25E5C7AR.js → countdown-TYQHVAIX.js} +305 -32
  49. package/dist/{dashboard-P65XHYCU.js → dashboard-6V6PCNYF.js} +1 -1
  50. package/dist/{dashboard-broadcast-GYK34QYL.js → dashboard-broadcast-PMVQ7PXU.js} +1 -1
  51. package/dist/{diff-6JSXBVSX.js → diff-3XUZM7ZT.js} +15 -6
  52. package/dist/{doctor-I3MTHS7F.js → doctor-KGUWU5SN.js} +106 -19
  53. package/dist/{engine-info-BBI5QO5Y.js → engine-info-VM4VPGQM.js} +2 -2
  54. package/dist/{ground-control-IDCXN5FK.js → ground-control-ZIDHEOPW.js} +7 -4
  55. package/dist/{guard-RJZEEKSL.js → guard-ZO4Z3LLB.js} +47 -9
  56. package/dist/{handoff-5AGE2D3T.js → handoff-LLT4CI6H.js} +4 -3
  57. package/dist/{hook-WNA42CXE.js → hook-UPZ3CPYS.js} +22 -20
  58. package/dist/index.js +51 -33
  59. package/dist/{init-FZ2UFPO7.js → init-ZHLVXEVT.js} +25 -18
  60. package/dist/install-XWOG64W3.js +42 -0
  61. package/dist/installs-2ROXPO6M.js +223 -0
  62. package/dist/{mission-control-CRMCRZUU.js → mission-control-IGOI3WHS.js} +2 -2
  63. package/dist/models-5BDXREWM.js +45 -0
  64. package/dist/paths-JTPV6SXH.js +107 -0
  65. package/dist/pi-DCMDOY65.js +248 -0
  66. package/dist/{plan-index-BNLUU6T5.js → plan-index-5QZJK4AG.js} +2 -3
  67. package/dist/{queue-JW4VR33H.js → queue-Z5VNNHM6.js} +10 -12
  68. package/dist/{run-X2WOONTB.js → run-QURAXAR2.js} +27 -33
  69. package/dist/{run-plan-4MOLLIES.js → run-plan-4MMHVCTS.js} +35 -23
  70. package/dist/{scan-K3T5RQLC.js → scan-7D3RMO34.js} +2 -1
  71. package/dist/{session-start-MV7A4263.js → session-start-NC2HE5X5.js} +20 -14
  72. package/dist/{sessions-UPFDWDMB.js → sessions-WWWLYPW6.js} +4 -4
  73. package/dist/{setup-global-VNADNTQ2.js → setup-global-WDMARD4Z.js} +12 -10
  74. package/dist/{status-SXA3OK5E.js → status-2WNJL7PP.js} +17 -13
  75. package/dist/update-YSVOYYK5.js +32 -0
  76. package/dist/update-all-5XLTCHPX.js +697 -0
  77. package/package.json +14 -4
  78. package/pi/agent-kit.ts +224 -0
  79. package/dist/chunk-4MR4QXMF.js +0 -52
  80. package/dist/chunk-7ABY6DYH.js +0 -89
  81. package/dist/chunk-C4LCOOL4.js +0 -71
  82. package/dist/chunk-DZCLMIAS.js +0 -391
  83. package/dist/chunk-HAFRAXGV.js +0 -17
  84. package/dist/chunk-MUTTNRX4.js +0 -53
  85. package/dist/install-CTLT3TSI.js +0 -38
  86. package/dist/update-RMAWXMCV.js +0 -304
@@ -0,0 +1,248 @@
1
+ import {
2
+ KIT_PACKAGE_NAME,
3
+ KIT_VERSION
4
+ } from "./chunk-2G4K4ZI5.js";
5
+
6
+ // src/commands/pi.ts
7
+ import { execFile } from "child_process";
8
+ import { existsSync } from "fs";
9
+ import { homedir } from "os";
10
+ import path from "path";
11
+ import { defineCommand } from "citty";
12
+ var defaultPiRunner = (args) => new Promise((resolve) => {
13
+ execFile(
14
+ "pi",
15
+ args,
16
+ { encoding: "utf8", maxBuffer: 4 * 1024 * 1024 },
17
+ (error, stdout, stderr) => {
18
+ const err = error;
19
+ resolve({
20
+ code: err ? typeof err.code === "number" ? err.code : null : 0,
21
+ stdout: String(stdout ?? ""),
22
+ stderr: String(stderr ?? ""),
23
+ missing: err?.code === "ENOENT"
24
+ });
25
+ }
26
+ );
27
+ });
28
+ var PI_MISSING = "pi is not on PATH. Install pi (https://pi.dev) first; the Agent Kit bridge is a pi package.";
29
+ function piPackageSpec(name, version) {
30
+ return `npm:${name}@${version}`;
31
+ }
32
+ function parsePiList(stdout) {
33
+ const out = { user: [], project: [] };
34
+ let section = null;
35
+ for (const line of stdout.split("\n")) {
36
+ if (/^User packages:/.test(line)) section = "user";
37
+ else if (/^Project packages:/.test(line)) section = "project";
38
+ else if (/^\S/.test(line)) section = null;
39
+ else if (section && /^ {2}\S/.test(line)) out[section].push(line.trim());
40
+ }
41
+ return out;
42
+ }
43
+ function sourcesForPackage(sources, name) {
44
+ const prefix = `npm:${name}`;
45
+ return sources.filter((s) => s === prefix || s.startsWith(`${prefix}@`));
46
+ }
47
+ function scopeFlags(local, approve) {
48
+ if (!local) return [];
49
+ return approve ? ["--local", "--approve"] : ["--local"];
50
+ }
51
+ var NOT_TRUSTED = /project is not trusted/i;
52
+ var APPROVE_HINT = "Re-run with --approve to let pi change this project's package config for this one command (pi's saved trust stays untouched).";
53
+ function piOutput(run) {
54
+ return `${run.stdout}
55
+ ${run.stderr}`.split("\n").map((l) => l.trimEnd()).filter((l) => l.trim() !== "");
56
+ }
57
+ function settingsTarget(options) {
58
+ if (options.local) return path.join(options.cwd, ".pi", "settings.json");
59
+ const agentDir = options.env?.PI_CODING_AGENT_DIR || path.join(homedir(), ".pi", "agent");
60
+ return path.join(agentDir, "settings.json");
61
+ }
62
+ function removeLine(name, local) {
63
+ const line = ["pi", "remove", ...scopeFlags(local, false), `npm:${name}`].join(" ");
64
+ return local ? `${line} (add --approve while pi does not trust this project)` : line;
65
+ }
66
+ async function configuredSources(run, local, approve) {
67
+ if (local && !approve) return { skipped: true };
68
+ const listed = await run(["list", ...local ? ["--approve"] : []]);
69
+ if (listed.missing) return { error: { exitCode: 1, lines: [PI_MISSING] } };
70
+ if (listed.code !== 0) {
71
+ const detail = listed.stderr.trim() || listed.stdout.trim();
72
+ return {
73
+ error: { exitCode: 1, lines: [`\`pi list\` failed (exit ${listed.code}): ${detail}`] }
74
+ };
75
+ }
76
+ const parsed = parsePiList(listed.stdout);
77
+ return { sources: local ? parsed.project : parsed.user };
78
+ }
79
+ function resolved(options) {
80
+ return {
81
+ name: options.packageName ?? KIT_PACKAGE_NAME,
82
+ version: options.version ?? KIT_VERSION,
83
+ run: options.run ?? defaultPiRunner,
84
+ scope: options.local ? "project" : "user",
85
+ approve: options.approve === true
86
+ };
87
+ }
88
+ var SKIPPED_CHECK = "Skipped the already-configured check: pi lists project packages only with --approve.";
89
+ function refused(run, args) {
90
+ const lines = piOutput(run);
91
+ if (lines.some((l) => NOT_TRUSTED.test(l)))
92
+ return { exitCode: 1, lines: [...lines, APPROVE_HINT] };
93
+ return { exitCode: 1, lines: [...lines, `\`pi ${args.join(" ")}\` failed (exit ${run.code}).`] };
94
+ }
95
+ async function runPiInstall(options) {
96
+ const { name, version, run, scope, approve } = resolved(options);
97
+ if (!name) return { exitCode: 1, lines: ["Cannot read this CLI's package name."] };
98
+ const spec = piPackageSpec(name, version);
99
+ const installArgs = ["install", ...scopeFlags(options.local, approve), spec];
100
+ const target = settingsTarget(options);
101
+ const found = await configuredSources(run, options.local, approve);
102
+ if ("error" in found) return found.error;
103
+ const lines = [];
104
+ if ("skipped" in found) lines.push(SKIPPED_CHECK);
105
+ const current = "sources" in found ? sourcesForPackage(found.sources, name) : [];
106
+ if (current.includes(spec)) {
107
+ return {
108
+ exitCode: 0,
109
+ lines: [
110
+ `Already installed: ${spec} (${scope} scope, ${target}). Nothing to do.`,
111
+ `Remove with: ${removeLine(name, options.local)}`
112
+ ]
113
+ };
114
+ }
115
+ if (current.length > 0) lines.push(`Replacing ${current.join(", ")} with ${spec}.`);
116
+ if (options.dryRun) {
117
+ lines.push(`Dry run. Would run: pi ${installArgs.join(" ")}`);
118
+ lines.push(`It would write ${target}.`);
119
+ return { exitCode: 0, lines };
120
+ }
121
+ const installed = await run(installArgs);
122
+ if (installed.missing) return { exitCode: 1, lines: [PI_MISSING] };
123
+ if (installed.code !== 0) {
124
+ const failure = refused(installed, installArgs);
125
+ return { exitCode: 1, lines: [...lines, ...failure.lines] };
126
+ }
127
+ lines.push(...piOutput(installed));
128
+ lines.push(`Installed the Agent Kit bridge for pi: ${spec} (${scope} scope, ${target}).`);
129
+ lines.push(
130
+ "pi now loads the kit's commands, skills and session context in any folder with a kit; run /reload in open pi sessions."
131
+ );
132
+ const agentDir = options.env?.PI_CODING_AGENT_DIR || path.join(homedir(), ".pi", "agent");
133
+ const standalone = path.join(agentDir, "extensions", "agent-kit.ts");
134
+ if (existsSync(standalone)) {
135
+ lines.push(
136
+ `Note: ${standalone} also exists; pi would load two bridges. Remove that file to keep only the package.`
137
+ );
138
+ }
139
+ lines.push(`Remove with: ${removeLine(name, options.local)}`);
140
+ return { exitCode: 0, lines };
141
+ }
142
+ async function runPiRemove(options) {
143
+ const { name, run, scope, approve } = resolved(options);
144
+ if (!name) return { exitCode: 1, lines: ["Cannot read this CLI's package name."] };
145
+ const found = await configuredSources(run, options.local, approve);
146
+ if ("error" in found) return found.error;
147
+ const nothing = `Not installed in ${scope} scope: npm:${name}. Nothing to do.`;
148
+ const lines = [];
149
+ if ("skipped" in found) lines.push(SKIPPED_CHECK);
150
+ else if (sourcesForPackage(found.sources, name).length === 0) {
151
+ return { exitCode: 0, lines: [nothing] };
152
+ }
153
+ const args = ["remove", ...scopeFlags(options.local, approve), `npm:${name}`];
154
+ if (options.dryRun) {
155
+ return { exitCode: 0, lines: [...lines, `Dry run. Would run: pi ${args.join(" ")}`] };
156
+ }
157
+ const removed = await run(args);
158
+ if (removed.missing) return { exitCode: 1, lines: [PI_MISSING] };
159
+ const output = piOutput(removed);
160
+ if (removed.code !== 0) {
161
+ if (output.some((l) => /no matching package found/i.test(l))) {
162
+ return { exitCode: 0, lines: [...lines, nothing] };
163
+ }
164
+ const failure = refused(removed, args);
165
+ return { exitCode: 1, lines: [...lines, ...failure.lines] };
166
+ }
167
+ return {
168
+ exitCode: 0,
169
+ lines: [
170
+ ...lines,
171
+ ...output,
172
+ `Removed npm:${name} (${scope} scope, ${settingsTarget(options)}).`
173
+ ]
174
+ };
175
+ }
176
+ var sharedArgs = {
177
+ local: {
178
+ type: "boolean",
179
+ default: false,
180
+ description: "Use this project's .pi/settings.json instead of the user settings"
181
+ },
182
+ approve: {
183
+ type: "boolean",
184
+ default: false,
185
+ description: "With --local: pass pi's --approve (trust this project's files for this one pi command)"
186
+ },
187
+ "dry-run": {
188
+ type: "boolean",
189
+ default: false,
190
+ description: "Print the pi command without running it"
191
+ }
192
+ };
193
+ function report(result) {
194
+ const stream = result.exitCode === 0 ? process.stdout : process.stderr;
195
+ for (const line of result.lines) stream.write(`${line}
196
+ `);
197
+ process.exitCode = result.exitCode;
198
+ }
199
+ var piCommand = defineCommand({
200
+ meta: {
201
+ name: "pi",
202
+ description: "Opt-in: install or remove the Agent Kit bridge for pi (a pi package from this CLI's npm package)"
203
+ },
204
+ subCommands: {
205
+ install: defineCommand({
206
+ meta: {
207
+ name: "install",
208
+ description: "Run `pi install npm:<this CLI>@<this version>` (user scope; --local for project)"
209
+ },
210
+ args: sharedArgs,
211
+ async run({ args }) {
212
+ report(
213
+ await runPiInstall({
214
+ local: args.local === true,
215
+ approve: args.approve === true,
216
+ dryRun: args["dry-run"] === true,
217
+ cwd: process.cwd(),
218
+ env: process.env
219
+ })
220
+ );
221
+ }
222
+ }),
223
+ remove: defineCommand({
224
+ meta: { name: "remove", description: "Run `pi remove npm:<this CLI>` for the chosen scope" },
225
+ args: sharedArgs,
226
+ async run({ args }) {
227
+ report(
228
+ await runPiRemove({
229
+ local: args.local === true,
230
+ approve: args.approve === true,
231
+ dryRun: args["dry-run"] === true,
232
+ cwd: process.cwd(),
233
+ env: process.env
234
+ })
235
+ );
236
+ }
237
+ })
238
+ }
239
+ });
240
+ export {
241
+ defaultPiRunner,
242
+ parsePiList,
243
+ piCommand,
244
+ piPackageSpec,
245
+ runPiInstall,
246
+ runPiRemove,
247
+ sourcesForPackage
248
+ };
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  formatPlanIndexLines,
3
3
  writePlanIndex
4
- } from "./chunk-L5V3W3DY.js";
5
- import "./chunk-MUTTNRX4.js";
6
- import "./chunk-C4Q77GGJ.js";
4
+ } from "./chunk-TTUFIE26.js";
5
+ import "./chunk-O7VMHCNN.js";
7
6
  import "./chunk-5B4DVO6C.js";
8
7
 
9
8
  // src/commands/plan-index.ts
@@ -1,26 +1,24 @@
1
1
  import {
2
2
  readHandoffText
3
- } from "./chunk-QNISTPPZ.js";
4
- import "./chunk-6WUKLS4D.js";
5
- import "./chunk-7ABY6DYH.js";
6
- import "./chunk-C4LCOOL4.js";
7
- import "./chunk-BGL5DRK2.js";
3
+ } from "./chunk-ENRXS5O6.js";
4
+ import "./chunk-BIFTTL2O.js";
5
+ import "./chunk-I3FGWNU5.js";
8
6
  import {
9
7
  QUEUE_LEASE_RELPATH,
10
8
  formatQueueLeaseRefusal,
11
9
  inspectQueueLease
12
- } from "./chunk-MFKHIWEL.js";
10
+ } from "./chunk-FOVHFMSH.js";
11
+ import "./chunk-JWIJHO67.js";
12
+ import "./chunk-HXV6VQD4.js";
13
+ import "./chunk-P7732A25.js";
13
14
  import {
14
15
  extractFieldBlock
15
- } from "./chunk-L5V3W3DY.js";
16
- import "./chunk-MUTTNRX4.js";
17
- import "./chunk-SGTTC2JP.js";
18
- import "./chunk-W3ZJVBNY.js";
19
- import "./chunk-P7732A25.js";
16
+ } from "./chunk-TTUFIE26.js";
20
17
  import "./chunk-WGLPZXNU.js";
21
18
  import "./chunk-Q35TWISF.js";
22
19
  import "./chunk-QTON2GQX.js";
23
- import "./chunk-C4Q77GGJ.js";
20
+ import "./chunk-PFEUZXVT.js";
21
+ import "./chunk-O7VMHCNN.js";
24
22
  import "./chunk-5B4DVO6C.js";
25
23
 
26
24
  // src/commands/queue.ts
@@ -2,41 +2,27 @@ import {
2
2
  runPlanLoop,
3
3
  shouldUseLiveTui,
4
4
  withLiveTui
5
- } from "./chunk-5LNHRL5E.js";
6
- import "./chunk-CQHD6UKB.js";
5
+ } from "./chunk-IUY24WPE.js";
6
+ import "./chunk-JG5MKMOM.js";
7
+ import {
8
+ REVIEW_PACK_SLASH,
9
+ runReviewJob
10
+ } from "./chunk-5A72LTR3.js";
11
+ import "./chunk-OVRGTHZD.js";
12
+ import "./chunk-Y575INEC.js";
7
13
  import {
8
14
  negatedFlag
9
- } from "./chunk-ZMYV6PRE.js";
15
+ } from "./chunk-LEVNLHH3.js";
10
16
  import {
11
17
  landDispatchOutcome,
12
18
  runDispatchDriver
13
- } from "./chunk-QNISTPPZ.js";
19
+ } from "./chunk-ENRXS5O6.js";
14
20
  import {
15
21
  DRIVER_EVENTS_FORMATS
16
- } from "./chunk-6WUKLS4D.js";
17
- import {
18
- CLAUDE_SUBAGENT_MODEL_ENV,
19
- describeResolvedRoles,
20
- loadRolesContext,
21
- resolveReviewJobRole,
22
- resolveSubworkerModel,
23
- resolveWorkerRole
24
- } from "./chunk-DZCLMIAS.js";
25
- import {
26
- REVIEW_PACK_SLASH,
27
- runReviewJob
28
- } from "./chunk-IESSMKOV.js";
29
- import {
30
- resolveActivePlanPath
31
- } from "./chunk-7ABY6DYH.js";
32
- import {
33
- detectAgentBackend,
34
- listDetectBackendIds
35
- } from "./chunk-C4LCOOL4.js";
36
- import "./chunk-5EBT3V7G.js";
22
+ } from "./chunk-BIFTTL2O.js";
37
23
  import {
38
24
  LAND_ON_GATE_DESCRIPTION
39
- } from "./chunk-BGL5DRK2.js";
25
+ } from "./chunk-I3FGWNU5.js";
40
26
  import {
41
27
  LEASE_FREE_SLASHES,
42
28
  QUEUE_LEASE_INTERRUPT_WAIT_MS,
@@ -46,9 +32,7 @@ import {
46
32
  forwardTermination,
47
33
  gateCheckIn,
48
34
  holdQueueStatus
49
- } from "./chunk-MFKHIWEL.js";
50
- import "./chunk-L5V3W3DY.js";
51
- import "./chunk-MUTTNRX4.js";
35
+ } from "./chunk-FOVHFMSH.js";
52
36
  import {
53
37
  buildDispatchPrompt,
54
38
  classifySlash,
@@ -59,15 +43,25 @@ import {
59
43
  resolveOperatorNote,
60
44
  runHeadlessDispatch,
61
45
  unknownSlashMessage
62
- } from "./chunk-SGTTC2JP.js";
46
+ } from "./chunk-JWIJHO67.js";
63
47
  import {
64
- getBackend
65
- } from "./chunk-W3ZJVBNY.js";
48
+ CLAUDE_SUBAGENT_MODEL_ENV,
49
+ describeResolvedRoles,
50
+ detectAgentBackend,
51
+ getBackend,
52
+ listDetectBackendIds,
53
+ loadRolesContext,
54
+ resolveActivePlanPath,
55
+ resolveReviewJobRole,
56
+ resolveSubworkerModel,
57
+ resolveWorkerRole
58
+ } from "./chunk-HXV6VQD4.js";
66
59
  import {
67
60
  HITL_UNANSWERED_EXIT_CODE,
68
61
  formatHitlSummary,
69
62
  hitlExitCode
70
63
  } from "./chunk-P7732A25.js";
64
+ import "./chunk-TTUFIE26.js";
71
65
  import "./chunk-WGLPZXNU.js";
72
66
  import "./chunk-Q35TWISF.js";
73
67
  import "./chunk-QTON2GQX.js";
@@ -75,7 +69,7 @@ import {
75
69
  logger
76
70
  } from "./chunk-ZB43YMHW.js";
77
71
  import "./chunk-PFEUZXVT.js";
78
- import "./chunk-C4Q77GGJ.js";
72
+ import "./chunk-O7VMHCNN.js";
79
73
  import "./chunk-5B4DVO6C.js";
80
74
 
81
75
  // src/commands/run.ts
@@ -1,37 +1,33 @@
1
1
  import {
2
2
  runPlanLoop
3
- } from "./chunk-5LNHRL5E.js";
4
- import "./chunk-CQHD6UKB.js";
3
+ } from "./chunk-IUY24WPE.js";
4
+ import "./chunk-JG5MKMOM.js";
5
+ import "./chunk-5A72LTR3.js";
6
+ import "./chunk-OVRGTHZD.js";
7
+ import "./chunk-Y575INEC.js";
5
8
  import {
6
9
  negatedFlag
7
- } from "./chunk-ZMYV6PRE.js";
10
+ } from "./chunk-LEVNLHH3.js";
8
11
  import {
9
12
  DRIVER_EVENTS_FORMATS
10
- } from "./chunk-6WUKLS4D.js";
11
- import {
12
- loadRolesContext,
13
- resolveWorkerRole
14
- } from "./chunk-DZCLMIAS.js";
15
- import "./chunk-IESSMKOV.js";
16
- import "./chunk-7ABY6DYH.js";
17
- import {
18
- detectAgentBackend,
19
- listDetectBackendIds
20
- } from "./chunk-C4LCOOL4.js";
21
- import "./chunk-5EBT3V7G.js";
13
+ } from "./chunk-BIFTTL2O.js";
22
14
  import {
23
15
  LAND_ON_GATE_DESCRIPTION
24
- } from "./chunk-BGL5DRK2.js";
25
- import "./chunk-MFKHIWEL.js";
26
- import "./chunk-L5V3W3DY.js";
27
- import "./chunk-MUTTNRX4.js";
28
- import "./chunk-SGTTC2JP.js";
16
+ } from "./chunk-I3FGWNU5.js";
17
+ import "./chunk-FOVHFMSH.js";
18
+ import "./chunk-JWIJHO67.js";
29
19
  import {
30
- getBackend
31
- } from "./chunk-W3ZJVBNY.js";
20
+ detectAgentBackend,
21
+ getBackend,
22
+ listDetectBackendIds,
23
+ loadRolesContext,
24
+ parseLocalModelId,
25
+ resolveWorkerRole
26
+ } from "./chunk-HXV6VQD4.js";
32
27
  import {
33
28
  HITL_UNANSWERED_EXIT_CODE
34
29
  } from "./chunk-P7732A25.js";
30
+ import "./chunk-TTUFIE26.js";
35
31
  import "./chunk-WGLPZXNU.js";
36
32
  import "./chunk-Q35TWISF.js";
37
33
  import "./chunk-QTON2GQX.js";
@@ -39,7 +35,7 @@ import {
39
35
  logger
40
36
  } from "./chunk-ZB43YMHW.js";
41
37
  import "./chunk-PFEUZXVT.js";
42
- import "./chunk-C4Q77GGJ.js";
38
+ import "./chunk-O7VMHCNN.js";
43
39
  import "./chunk-5B4DVO6C.js";
44
40
 
45
41
  // src/commands/run-plan.ts
@@ -166,6 +162,14 @@ var runPlanCommand = defineCommand({
166
162
  }
167
163
  let onLimit;
168
164
  const onLimitId = String(args["on-limit"] ?? "").trim();
165
+ if (backend.id === "local") {
166
+ const problem = localRunProblem(worker.model, onLimitId);
167
+ if (problem) {
168
+ logger.error(problem);
169
+ process.exitCode = 1;
170
+ return;
171
+ }
172
+ }
169
173
  if (onLimitId) {
170
174
  try {
171
175
  onLimit = getBackend(onLimitId);
@@ -197,6 +201,14 @@ var runPlanCommand = defineCommand({
197
201
  process.exitCode = code;
198
202
  }
199
203
  });
204
+ function localRunProblem(model, onLimitId) {
205
+ if (onLimitId) {
206
+ return "--on-limit is not available with --backend local: a local run never moves to another engine (it would spend an account and send the repository to a vendor).";
207
+ }
208
+ const parsed = parseLocalModelId(model);
209
+ return parsed.ok ? null : parsed.message;
210
+ }
200
211
  export {
212
+ localRunProblem,
201
213
  runPlanCommand
202
214
  };
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  runScanner
3
- } from "./chunk-R4DUO5DA.js";
3
+ } from "./chunk-AXQMVQ6O.js";
4
4
  import "./chunk-F6C3GFKV.js";
5
+ import "./chunk-2QYWMSI5.js";
5
6
  import {
6
7
  logger
7
8
  } from "./chunk-ZB43YMHW.js";
@@ -7,6 +7,7 @@ import {
7
7
  LIVE_AGENTS_SECTION_MAX_WORKTREES,
8
8
  PUBLIC_INBOUND_SPAWN_TIMEOUT_MS,
9
9
  SESSION_START_SECTION_DEADLINE_MS,
10
+ UPDATE_NOTICE_SECTION_DEADLINE_MS,
10
11
  buildSessionStartAdditionalContext,
11
12
  colonyHostSection,
12
13
  cursorAwarenessSection,
@@ -24,25 +25,28 @@ import {
24
25
  sectionAttemptNeedsStamp,
25
26
  shouldEmitCursorAwarenessNudge,
26
27
  updateCheckSection,
28
+ updateNoticeSection,
27
29
  withDeadline
28
- } from "./chunk-MJJBIOSY.js";
30
+ } from "./chunk-SYRJ5TTK.js";
31
+ import "./chunk-XXPI4H4D.js";
29
32
  import "./chunk-2YU2H7I6.js";
30
- import "./chunk-JFS4GKP7.js";
31
- import "./chunk-MFKHIWEL.js";
33
+ import "./chunk-FOVHFMSH.js";
32
34
  import "./chunk-MCH3E46V.js";
33
35
  import "./chunk-4CRBUEJ6.js";
34
- import "./chunk-L5V3W3DY.js";
35
- import "./chunk-MUTTNRX4.js";
36
- import "./chunk-HAFRAXGV.js";
37
- import "./chunk-CVZNSRXV.js";
38
- import "./chunk-PFEUZXVT.js";
39
- import "./chunk-7TYA3GMI.js";
40
- import "./chunk-4MR4QXMF.js";
36
+ import "./chunk-TTUFIE26.js";
37
+ import "./chunk-FB6G6OD6.js";
38
+ import "./chunk-NHJ4IAVN.js";
39
+ import "./chunk-Y5526WCN.js";
40
+ import "./chunk-MWRYQLEG.js";
41
+ import "./chunk-HGB4DHXV.js";
41
42
  import "./chunk-CGXLR77R.js";
42
- import "./chunk-V2H57TFD.js";
43
- import "./chunk-OYFCBYMP.js";
44
- import "./chunk-7HDQEK6T.js";
45
- import "./chunk-C4Q77GGJ.js";
43
+ import "./chunk-PFEUZXVT.js";
44
+ import "./chunk-ZNZHDPS3.js";
45
+ import "./chunk-RJP47EGS.js";
46
+ import "./chunk-IHVJTGYR.js";
47
+ import "./chunk-KMK4T4ZM.js";
48
+ import "./chunk-2G4K4ZI5.js";
49
+ import "./chunk-O7VMHCNN.js";
46
50
  import "./chunk-5B4DVO6C.js";
47
51
  export {
48
52
  AUDIT_SESSION_LIST_TIMEOUT_MS,
@@ -53,6 +57,7 @@ export {
53
57
  LIVE_AGENTS_SECTION_MAX_WORKTREES,
54
58
  PUBLIC_INBOUND_SPAWN_TIMEOUT_MS,
55
59
  SESSION_START_SECTION_DEADLINE_MS,
60
+ UPDATE_NOTICE_SECTION_DEADLINE_MS,
56
61
  buildSessionStartAdditionalContext,
57
62
  colonyHostSection,
58
63
  cursorAwarenessSection,
@@ -70,5 +75,6 @@ export {
70
75
  sectionAttemptNeedsStamp,
71
76
  shouldEmitCursorAwarenessNudge,
72
77
  updateCheckSection,
78
+ updateNoticeSection,
73
79
  withDeadline
74
80
  };
@@ -5,9 +5,9 @@ import {
5
5
  formatChatAge,
6
6
  renderLiveRoster,
7
7
  shellQuote
8
- } from "./chunk-JFS4GKP7.js";
9
- import "./chunk-MFKHIWEL.js";
10
- import "./chunk-C4Q77GGJ.js";
8
+ } from "./chunk-XXPI4H4D.js";
9
+ import "./chunk-FOVHFMSH.js";
10
+ import "./chunk-O7VMHCNN.js";
11
11
 
12
12
  // src/commands/sessions.ts
13
13
  import path from "path";
@@ -79,7 +79,7 @@ var sessionsCommand = defineCommand({
79
79
  const cwd = process.cwd();
80
80
  const workspace = path.resolve(cwd, typeof args.cwd === "string" && args.cwd ? args.cwd : ".");
81
81
  if (args.live) {
82
- const { listDetachedAuditSessions } = await import("./session-start-MV7A4263.js");
82
+ const { listDetachedAuditSessions } = await import("./session-start-NC2HE5X5.js");
83
83
  const roster = await collectLiveRoster(workspace, { listAudit: listDetachedAuditSessions });
84
84
  process.stdout.write(
85
85
  args.json ? `${JSON.stringify(roster, null, 2)}
@@ -2,22 +2,24 @@ import {
2
2
  classifyInstallError,
3
3
  isNonInteractive,
4
4
  pathCliStatus
5
- } from "./chunk-KDJ4ML7I.js";
5
+ } from "./chunk-RRJVC35Y.js";
6
6
  import {
7
7
  assessEnvironment
8
- } from "./chunk-B3VR5YBQ.js";
9
- import "./chunk-CVZNSRXV.js";
10
- import "./chunk-PFEUZXVT.js";
11
- import "./chunk-7TYA3GMI.js";
12
- import "./chunk-4MR4QXMF.js";
8
+ } from "./chunk-2TW7ENWC.js";
9
+ import "./chunk-Y5526WCN.js";
10
+ import "./chunk-MWRYQLEG.js";
11
+ import "./chunk-HGB4DHXV.js";
13
12
  import "./chunk-CGXLR77R.js";
14
- import "./chunk-V2H57TFD.js";
15
- import "./chunk-OYFCBYMP.js";
13
+ import "./chunk-PFEUZXVT.js";
14
+ import "./chunk-ZNZHDPS3.js";
15
+ import "./chunk-RJP47EGS.js";
16
+ import "./chunk-IHVJTGYR.js";
17
+ import "./chunk-KMK4T4ZM.js";
16
18
  import {
17
19
  KIT_VERSION,
18
20
  pinnedCliSpec
19
- } from "./chunk-7HDQEK6T.js";
20
- import "./chunk-C4Q77GGJ.js";
21
+ } from "./chunk-2G4K4ZI5.js";
22
+ import "./chunk-O7VMHCNN.js";
21
23
  import "./chunk-5B4DVO6C.js";
22
24
 
23
25
  // src/commands/setup-global.ts
@@ -1,39 +1,43 @@
1
1
  import {
2
2
  detectWorkspaceParent,
3
3
  workspaceParentAdvisoryLines
4
- } from "./chunk-2IP4OO6R.js";
4
+ } from "./chunk-MGVV6YC4.js";
5
5
  import {
6
6
  createReadinessReport
7
7
  } from "./chunk-PNFF6OU3.js";
8
8
  import {
9
9
  runScanner
10
- } from "./chunk-R4DUO5DA.js";
10
+ } from "./chunk-AXQMVQ6O.js";
11
11
  import "./chunk-F6C3GFKV.js";
12
+ import "./chunk-2QYWMSI5.js";
12
13
  import {
13
14
  logger
14
15
  } from "./chunk-ZB43YMHW.js";
15
16
  import {
16
17
  npxPinned,
17
18
  pathCliStatus
18
- } from "./chunk-KDJ4ML7I.js";
19
+ } from "./chunk-RRJVC35Y.js";
19
20
  import {
20
21
  assessEnvironment
21
- } from "./chunk-B3VR5YBQ.js";
22
- import "./chunk-CVZNSRXV.js";
23
- import "./chunk-PFEUZXVT.js";
24
- import "./chunk-7TYA3GMI.js";
25
- import "./chunk-4MR4QXMF.js";
22
+ } from "./chunk-2TW7ENWC.js";
23
+ import "./chunk-Y5526WCN.js";
24
+ import "./chunk-MWRYQLEG.js";
25
+ import "./chunk-HGB4DHXV.js";
26
26
  import "./chunk-CGXLR77R.js";
27
+ import "./chunk-PFEUZXVT.js";
27
28
  import {
28
- MANIFEST_RELATIVE_PATH,
29
29
  loadAgentKitManifest,
30
30
  resolveProtectedGlobs
31
- } from "./chunk-V2H57TFD.js";
32
- import "./chunk-OYFCBYMP.js";
31
+ } from "./chunk-ZNZHDPS3.js";
32
+ import "./chunk-RJP47EGS.js";
33
+ import "./chunk-IHVJTGYR.js";
34
+ import {
35
+ MANIFEST_RELATIVE_PATH
36
+ } from "./chunk-KMK4T4ZM.js";
33
37
  import {
34
38
  KIT_VERSION
35
- } from "./chunk-7HDQEK6T.js";
36
- import "./chunk-C4Q77GGJ.js";
39
+ } from "./chunk-2G4K4ZI5.js";
40
+ import "./chunk-O7VMHCNN.js";
37
41
  import {
38
42
  readJson
39
43
  } from "./chunk-5B4DVO6C.js";