@dadado/agent-kit-cli 6.21.0 → 6.22.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 (37) hide show
  1. package/dashboard/dashboard.html +2 -2
  2. package/dist/{add-XDGERL6L.js → add-YVDIFP4N.js} +3 -3
  3. package/dist/{chunk-TUEREBTR.js → chunk-2FKAKFMH.js} +1 -1
  4. package/dist/{chunk-7MKWNRAC.js → chunk-4SEQ76BQ.js} +3 -3
  5. package/dist/{chunk-IWCJ6RM6.js → chunk-5HH3HSUR.js} +2 -2
  6. package/dist/{chunk-NJ3JGF2O.js → chunk-BCU54M2P.js} +1 -1
  7. package/dist/{chunk-UATQQDVR.js → chunk-DZCLMIAS.js} +95 -1
  8. package/dist/{chunk-4FCK4QNB.js → chunk-EYNSSL6B.js} +92 -6
  9. package/dist/{chunk-DJKZLY3E.js → chunk-GT5R7W66.js} +1 -1
  10. package/dist/{chunk-5KF4IHXO.js → chunk-GV4VKIPO.js} +2 -2
  11. package/dist/{chunk-U23SLQGX.js → chunk-IESSMKOV.js} +3 -1
  12. package/dist/{chunk-44AVHJRV.js → chunk-LDZAK5DU.js} +1 -1
  13. package/dist/{chunk-5U6AGH7T.js → chunk-MGIPA6SD.js} +1 -1
  14. package/dist/{chunk-BTQ3D6N7.js → chunk-SDJIMC5S.js} +2 -2
  15. package/dist/{chunk-HMJNIIWG.js → chunk-WHBGJ7IJ.js} +3 -3
  16. package/dist/{chunk-FOGD3MWJ.js → chunk-XZQM55BK.js} +2 -2
  17. package/dist/{chunk-YXGD3FST.js → chunk-YRBRYTM5.js} +8 -8
  18. package/dist/{chunk-27NYWS3N.js → chunk-ZJDJCMQO.js} +4 -1
  19. package/dist/{chunk-DYIIOALZ.js → chunk-ZNY32NK2.js} +1 -1
  20. package/dist/{commands-UIV535OI.js → commands-LEBG6DMD.js} +2 -2
  21. package/dist/{conflicts-7T7KKQOY.js → conflicts-FJD3IVPQ.js} +1 -1
  22. package/dist/{contribute-2ATM22YG.js → contribute-XPAR2JER.js} +4 -4
  23. package/dist/{countdown-7ONIVAG6.js → countdown-25E5C7AR.js} +24 -6
  24. package/dist/{diff-JJH42JFA.js → diff-KFID4SX3.js} +5 -5
  25. package/dist/{doctor-EE3BSJC3.js → doctor-J2GJFTSE.js} +9 -9
  26. package/dist/{hook-KPE2EOM6.js → hook-HV6U3ANI.js} +6 -6
  27. package/dist/index.js +17 -17
  28. package/dist/{init-RTGM5G6T.js → init-47WA2SCG.js} +12 -12
  29. package/dist/{install-SD3H67Y2.js → install-Y63HEM4G.js} +12 -12
  30. package/dist/{run-S27AZ6ZE.js → run-Z2GHNVBO.js} +24 -9
  31. package/dist/{run-plan-OC3IF4PH.js → run-plan-XA7MYOQ3.js} +7 -3
  32. package/dist/{session-start-5PVH7L5K.js → session-start-PEVTDMOZ.js} +6 -6
  33. package/dist/{sessions-HUWIIEGD.js → sessions-6IGVH467.js} +1 -1
  34. package/dist/{setup-global-GGFLE6QQ.js → setup-global-KBJL7QRD.js} +6 -6
  35. package/dist/{status-77NJN2G4.js → status-3UGVDIO6.js} +7 -7
  36. package/dist/{update-26HHB5JD.js → update-4UQHGENC.js} +10 -10
  37. package/package.json +1 -1
@@ -6335,7 +6335,7 @@ function renderRolesFieldset(cfg) {
6335
6335
  <select id="config-role-reviewer-enabled" name="roleReviewerEnabled" data-focus-key="config-role-reviewer-enabled">
6336
6336
  ${roleSelectHtml(['on', 'off'], enabled, 'Not set (Audits section)')}
6337
6337
  </select>
6338
- <span class="config-hint">Saved for the reviewer role. Review runs still follow the Audits section until the reviewer role ships.</span>
6338
+ <span class="config-hint">On or off here wins over the Audits switch; not set follows it. The identical model as the worker is refused; another model of the same family runs with a warning.</span>
6339
6339
  </div>
6340
6340
  <div class="config-row">
6341
6341
  <label for="config-role-reviewer-scope">Reviewer scope</label>
@@ -6501,7 +6501,7 @@ function renderConfigSection(d) {
6501
6501
  <div class="config-row">
6502
6502
  <label for="config-epr-reviewerModel">Reviewer model</label>
6503
6503
  <input type="text" id="config-epr-reviewerModel" name="eprReviewerModel" value="${escapeAttr(epr.reviewerModel || 'sonnet')}" maxlength="64" data-focus-key="config-epr-reviewerModel" />
6504
- <span class="config-hint">Claude default sonnet (auto permission mode). Must differ from the implementer stamp (Auto/Auto refused).</span>
6504
+ <span class="config-hint">Claude default sonnet (auto permission mode). Must not be the identical model of the implementer stamp (Auto/Auto refused); the Model roles reviewer model is read first.</span>
6505
6505
  </div>
6506
6506
  <div class="config-row">
6507
6507
  <label for="config-epr-advisorModel">Advisor model</label>
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  REGISTRY_CLI_ARGS,
7
7
  resolveRegistryFromCli
8
- } from "./chunk-NJ3JGF2O.js";
8
+ } from "./chunk-BCU54M2P.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-44AVHJRV.js";
26
- import "./chunk-27NYWS3N.js";
25
+ } from "./chunk-LDZAK5DU.js";
26
+ import "./chunk-ZJDJCMQO.js";
27
27
  import {
28
28
  KIT_VERSION
29
29
  } from "./chunk-7HDQEK6T.js";
@@ -5,7 +5,7 @@ import {
5
5
  resolveContained,
6
6
  saveManagedHashLedger,
7
7
  shouldPreserveCustomizedOverlay
8
- } from "./chunk-27NYWS3N.js";
8
+ } from "./chunk-ZJDJCMQO.js";
9
9
  import {
10
10
  ensureDir,
11
11
  fileExists
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  managedPairs
3
- } from "./chunk-DYIIOALZ.js";
3
+ } from "./chunk-ZNY32NK2.js";
4
4
  import {
5
5
  isProtectedPath,
6
6
  resolveProtectedGlobs
7
- } from "./chunk-44AVHJRV.js";
7
+ } from "./chunk-LDZAK5DU.js";
8
8
  import {
9
9
  resolveContained
10
- } from "./chunk-27NYWS3N.js";
10
+ } from "./chunk-ZJDJCMQO.js";
11
11
 
12
12
  // src/lifecycle/diff.ts
13
13
  import { readFile } from "fs/promises";
@@ -6,13 +6,13 @@ import {
6
6
  import {
7
7
  diffAgainstRegistry,
8
8
  summarizeDiff
9
- } from "./chunk-7MKWNRAC.js";
9
+ } from "./chunk-4SEQ76BQ.js";
10
10
  import {
11
11
  DEFAULT_REGISTRY_URL,
12
12
  assertSafeRegistrySource,
13
13
  loadAgentKitManifest,
14
14
  resolveRegistryRoot
15
- } from "./chunk-44AVHJRV.js";
15
+ } from "./chunk-LDZAK5DU.js";
16
16
  import {
17
17
  KIT_PACKAGE_SPEC,
18
18
  KIT_VERSION
@@ -5,7 +5,7 @@ import {
5
5
  DEFAULT_REGISTRY_REF,
6
6
  DEFAULT_REGISTRY_URL,
7
7
  resolveRegistryRoot
8
- } from "./chunk-44AVHJRV.js";
8
+ } from "./chunk-LDZAK5DU.js";
9
9
 
10
10
  // src/lifecycle/resolve-cli.ts
11
11
  async function resolveRegistryFromCli(options) {
@@ -257,6 +257,91 @@ function describeResolvedRoles(input) {
257
257
  const sub = input.subworker?.model ? `, subworker ${input.subworker.model} (${input.subworker.source})` : "";
258
258
  return `roles: worker ${input.backendId} (${input.backendSource}), model ${model}${sub}`;
259
259
  }
260
+ function resolveReviewerRole(roles, externalPlanReview) {
261
+ const r = roles?.reviewer;
262
+ const legacyOn = isPlainObject(externalPlanReview) && externalPlanReview.enabled === true;
263
+ const fields = {
264
+ ...r?.backend ? { backend: r.backend } : {},
265
+ ...r?.model ? { model: r.model } : {},
266
+ ...r?.advisorModel ? { advisorModel: r.advisorModel } : {}
267
+ };
268
+ if (r?.enabled === false || r?.scope === "off") {
269
+ return { scope: "off", source: "roles", ...fields };
270
+ }
271
+ const on = r?.enabled === true || legacyOn;
272
+ const source = r?.enabled === true ? "roles" : legacyOn ? "externalPlanReview" : "default";
273
+ if (!on) return { scope: "off", source, ...fields };
274
+ return { scope: r?.scope ?? "plan", source, ...fields };
275
+ }
276
+ function normalizeReviewModelId(raw) {
277
+ const id = (raw ?? "").toLowerCase().replace(/\s+/g, "").replace(/\[.*$/, "");
278
+ if (id === "" || id === "auto" || id === "cursor-auto" || id === "cursorauto" || id === "default")
279
+ return "auto";
280
+ return id;
281
+ }
282
+ var FAMILY_PATTERNS = [
283
+ [
284
+ "haiku",
285
+ /^(haiku|claude-haiku|claude-3-haiku.*|claude-3\.5-haiku.*|claude-3-5-haiku.*|claude-haiku-.*|claude-4-haiku.*|claude-4\.5-haiku.*)$/
286
+ ],
287
+ [
288
+ "opus",
289
+ /^(opus|claude-opus|claude-3-opus.*|claude-opus-.*|claude-4-opus.*|claude-4\.5-opus.*)$/
290
+ ],
291
+ [
292
+ "sonnet",
293
+ /^(sonnet|claude-sonnet|claude-3-sonnet.*|claude-3\.5-sonnet.*|claude-3-5-sonnet.*|claude-3-7-sonnet.*|claude-sonnet-.*|claude-4-sonnet.*|claude-4\.5-sonnet.*)$/
294
+ ],
295
+ ["fable", /^(fable|claude-fable|claude-fable-.*)$/],
296
+ ["composer", /^(composer|composer-.*|cursor-composer.*)$/],
297
+ ["grok", /^(grok|grok-.*)$/]
298
+ ];
299
+ function reviewModelFamily(raw) {
300
+ const id = normalizeReviewModelId(raw);
301
+ for (const [family, pattern] of FAMILY_PATTERNS) if (pattern.test(id)) return family;
302
+ return id;
303
+ }
304
+ function isFamilyAlias(id, family) {
305
+ return id === family || id === `claude-${family}` || id === `cursor-${family}`;
306
+ }
307
+ function reviewModelRelation(implementer, reviewer) {
308
+ const a = normalizeReviewModelId(implementer);
309
+ const b = normalizeReviewModelId(reviewer);
310
+ if (a === b) return "identical";
311
+ const fa = reviewModelFamily(a);
312
+ const fb = reviewModelFamily(b);
313
+ if (fa !== fb) return "different";
314
+ if (isFamilyAlias(a, fa) || isFamilyAlias(b, fb)) return "identical";
315
+ return "same-family";
316
+ }
317
+ function describeIdenticalReviewModel(implementer, reviewer) {
318
+ return `reviewer model ${reviewer} is the implementer model (${implementer}): identical-model review is refused, Auto/Auto and a family alias against an id of that family included. This is not a silent self-review; set roles.reviewer.model to a different model`;
319
+ }
320
+ function describeSameFamilyReviewModel(implementer, reviewer) {
321
+ return `reviewer model ${reviewer} and implementer model ${implementer} are the same family (${reviewModelFamily(reviewer)}): the review runs, as a second read by a different model of one family`;
322
+ }
323
+ function resolveReviewJobRole(input) {
324
+ const flagBackend = input.flagBackend?.trim() ?? "";
325
+ const flagModel = input.flagModel?.trim() ?? "";
326
+ const reviewer = input.roles?.reviewer;
327
+ const backend = flagBackend || reviewer?.backend || "auto";
328
+ const backendSource = flagBackend ? "flag" : reviewer?.backend ? "config" : "default";
329
+ const model = flagModel || (flagBackend ? "" : reviewer?.model ?? "");
330
+ const out = {
331
+ backend,
332
+ backendSource,
333
+ ...model ? { model, modelSource: flagModel ? "flag" : "config" } : {}
334
+ };
335
+ const implementer = input.roles?.worker?.model;
336
+ if (model && implementer) {
337
+ const relation = reviewModelRelation(implementer, model);
338
+ if (relation === "identical") out.refusal = describeIdenticalReviewModel(implementer, model);
339
+ else if (relation === "same-family") {
340
+ out.warning = describeSameFamilyReviewModel(implementer, model);
341
+ }
342
+ }
343
+ return out;
344
+ }
260
345
  function checkPlanRoleOverrides(plan) {
261
346
  if (plan.workerBackend && !isRequestedBackend(plan.workerBackend.toLowerCase())) {
262
347
  return `plan frontmatter worker_backend must be auto or a kit backend id (got ${JSON.stringify(plan.workerBackend)})`;
@@ -284,7 +369,12 @@ async function loadRolesContext(root, usePlan) {
284
369
  if (problem) return { ok: false, error: `${planPath}: ${problem}` };
285
370
  }
286
371
  }
287
- return { ok: true, roles: parsed.roles, plan };
372
+ return {
373
+ ok: true,
374
+ roles: parsed.roles,
375
+ plan,
376
+ reviewer: resolveReviewerRole(parsed.roles, config?.externalPlanReview)
377
+ };
288
378
  }
289
379
 
290
380
  export {
@@ -293,5 +383,9 @@ export {
293
383
  resolveWorkerRole,
294
384
  resolveSubworkerModel,
295
385
  describeResolvedRoles,
386
+ reviewModelRelation,
387
+ describeIdenticalReviewModel,
388
+ describeSameFamilyReviewModel,
389
+ resolveReviewJobRole,
296
390
  loadRolesContext
297
391
  };
@@ -24,10 +24,17 @@ import {
24
24
  } from "./chunk-DTSL2RH7.js";
25
25
  import {
26
26
  CLAUDE_SUBAGENT_MODEL_ENV,
27
+ describeIdenticalReviewModel,
27
28
  describeResolvedRoles,
29
+ describeSameFamilyReviewModel,
28
30
  readPlanRoleOverrides,
29
- resolveSubworkerModel
30
- } from "./chunk-UATQQDVR.js";
31
+ resolveSubworkerModel,
32
+ reviewModelRelation
33
+ } from "./chunk-DZCLMIAS.js";
34
+ import {
35
+ REVIEW_BACKENDS,
36
+ runReviewJob
37
+ } from "./chunk-IESSMKOV.js";
31
38
  import {
32
39
  countPendingTodos,
33
40
  findActivePlanFile,
@@ -36,6 +43,9 @@ import {
36
43
  resolveActivePlanFromHandoff,
37
44
  resolveActivePlanPath
38
45
  } from "./chunk-7ABY6DYH.js";
46
+ import {
47
+ detectAgentBackend
48
+ } from "./chunk-C4LCOOL4.js";
39
49
  import {
40
50
  classifyGateExit,
41
51
  landGateExit
@@ -503,6 +513,8 @@ async function armExternalPlanReview(root, options = {}) {
503
513
  }
504
514
  log("Plan exhausted: arming optional external plan review (opt-in handled by script)...");
505
515
  const args = force ? [scriptPath, "--force", "--print"] : [scriptPath, "--print"];
516
+ const implementerModel = options.implementerModel?.trim();
517
+ if (implementerModel) args.push("--implementer-model", implementerModel);
506
518
  return new Promise((resolve) => {
507
519
  const child = spawnFn("bash", args, {
508
520
  cwd: root,
@@ -1109,6 +1121,68 @@ async function runPlanLoop(opts) {
1109
1121
  let backend = opts.backend;
1110
1122
  let limitSwitched = false;
1111
1123
  const rolesWarned = /* @__PURE__ */ new Set();
1124
+ let implementerModel = opts.model;
1125
+ const reviewAfterTick = async (tickBackend, tickModel) => {
1126
+ const reviewer = opts.roles?.reviewer;
1127
+ const proceed = { stop: false, exitCode: 0 };
1128
+ if (reviewer?.scope !== "tick") return proceed;
1129
+ const warnOnce = (line) => {
1130
+ if (rolesWarned.has(line)) return;
1131
+ rolesWarned.add(line);
1132
+ say(`roles: ${line}`, "warn");
1133
+ };
1134
+ const relation = reviewModelRelation(tickModel, reviewer.model);
1135
+ if (relation === "identical") {
1136
+ warnOnce(
1137
+ `post-tick review skipped: ${describeIdenticalReviewModel(tickModel ?? "auto", reviewer.model ?? "auto")}`
1138
+ );
1139
+ return proceed;
1140
+ }
1141
+ if (relation === "same-family") {
1142
+ warnOnce(describeSameFamilyReviewModel(tickModel ?? "auto", reviewer.model ?? "auto"));
1143
+ }
1144
+ const requested = reviewer.backend && reviewer.backend !== "auto" ? reviewer.backend : reviewer.backend !== "auto" && REVIEW_BACKENDS.includes(tickBackend) ? tickBackend : "auto";
1145
+ const detected = await (opts.tickReview?.detect ?? detectAgentBackend)(requested);
1146
+ if (!detected.ok) {
1147
+ say(`roles: post-tick review not run: ${detected.message}`, "warn");
1148
+ return proceed;
1149
+ }
1150
+ say(
1151
+ `roles: reviewer ${detected.id}, model ${reviewer.model ?? "(backend default)"} (scope tick) after tick ${tick}`
1152
+ );
1153
+ let result;
1154
+ try {
1155
+ result = await (opts.tickReview?.run ?? runReviewJob)({
1156
+ root: opts.root,
1157
+ backendId: detected.id,
1158
+ bin: detected.bin,
1159
+ ...reviewer.model ? { model: reviewer.model } : {},
1160
+ noHitl: true,
1161
+ dryRun: false,
1162
+ log: (line) => say(line),
1163
+ ...driver ? { render: { feed: () => {
1164
+ }, end: () => {
1165
+ } } } : {},
1166
+ // The review session is this run's live agent while it runs: the
1167
+ // lease names it and a host signal (driver mode) is forwarded to it.
1168
+ onSpawn: (info) => {
1169
+ lease?.setAgent(info.pid);
1170
+ tickAgent = info.pid === void 0 ? null : { pid: info.pid, start: procStart(info.pid) };
1171
+ }
1172
+ });
1173
+ } catch (err) {
1174
+ tickAgent = null;
1175
+ say(`roles: post-tick review failed to run: ${String(err)}`, "warn");
1176
+ return proceed;
1177
+ }
1178
+ tickAgent = null;
1179
+ if (result.error) {
1180
+ say(`roles: post-tick review not run: ${result.error}`, "warn");
1181
+ return proceed;
1182
+ }
1183
+ if (result.outcome !== "landed") return proceed;
1184
+ return { stop: true, exitCode: result.exitCode };
1185
+ };
1112
1186
  const stopRequested = () => {
1113
1187
  if (!driver?.reader.stopRequested()) return false;
1114
1188
  const msg = `Stop requested by the driver (stop_after_tick) - stopping after tick ${ticksRun}. The plan is as the tick left it.`;
@@ -1187,6 +1261,7 @@ async function runPlanLoop(opts) {
1187
1261
  try {
1188
1262
  const switched = backend !== opts.backend;
1189
1263
  const tickModel = switched && opts.roles && opts.roles.modelSource !== "flag" ? void 0 : opts.model;
1264
+ implementerModel = tickModel;
1190
1265
  let tickEnv;
1191
1266
  if (opts.roles) {
1192
1267
  const planOverrides = readPlanRoleOverrides(await readPlan(planPath).catch(() => ""));
@@ -1343,6 +1418,17 @@ async function runPlanLoop(opts) {
1343
1418
  banners.tickEnd(`pending: ${after}`);
1344
1419
  }
1345
1420
  endTick(after, sentinel);
1421
+ const review = await reviewAfterTick(backend.id, implementerModel);
1422
+ if (review.stop) {
1423
+ const msg = `Post-tick review landed a gate exit after tick ${tick} - stopping. Read the ticket before the next tick.`;
1424
+ if (banners) banners.stop(msg);
1425
+ else say(msg);
1426
+ if (sentinel.kind === "stop") stopReason = sentinel.reason;
1427
+ if (after === 0) planExhausted = true;
1428
+ exitCode = review.exitCode;
1429
+ endReason = "review findings landed; gate exit pending";
1430
+ break;
1431
+ }
1346
1432
  if (sentinel.kind === "continue") {
1347
1433
  } else if (sentinel.kind === "stop") {
1348
1434
  say(`Agent requested stop: ${formatSentinelLine(sentinel)}`);
@@ -1390,10 +1476,10 @@ async function runPlanLoop(opts) {
1390
1476
  `Loop finished after ${tick} tick(s). Pending now: ${pendingNow}. Logs in ${path4.relative(opts.root, logDir)}/`
1391
1477
  );
1392
1478
  if (planExhausted || shouldArmExternalPlanReview({ pending: pendingNow, stopReason })) {
1393
- await armExternalPlanReview(
1394
- opts.root,
1395
- driver ? { log: (line) => say(line), writeOut: driver.writeErr } : {}
1396
- );
1479
+ await armExternalPlanReview(opts.root, {
1480
+ ...driver ? { log: (line) => say(line), writeOut: driver.writeErr } : {},
1481
+ ...implementerModel ? { implementerModel } : {}
1482
+ });
1397
1483
  }
1398
1484
  await landIfNeeded(exitCode, endReason || "stopped", pendingNow);
1399
1485
  return finishRun(exitCode, endReason || "stopped", pendingNow, planExhausted);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MANIFEST_RELATIVE_PATH
3
- } from "./chunk-44AVHJRV.js";
3
+ } from "./chunk-LDZAK5DU.js";
4
4
  import {
5
5
  fileExists
6
6
  } from "./chunk-5B4DVO6C.js";
@@ -24,13 +24,13 @@ import {
24
24
  } from "./chunk-HAFRAXGV.js";
25
25
  import {
26
26
  stampLastCheckedAt
27
- } from "./chunk-IWCJ6RM6.js";
27
+ } from "./chunk-5HH3HSUR.js";
28
28
  import {
29
29
  loadContextConfig
30
30
  } from "./chunk-PFEUZXVT.js";
31
31
  import {
32
32
  MANIFEST_RELATIVE_PATH
33
- } from "./chunk-44AVHJRV.js";
33
+ } from "./chunk-LDZAK5DU.js";
34
34
  import {
35
35
  HANDOFF_REL
36
36
  } from "./chunk-C4Q77GGJ.js";
@@ -419,7 +419,9 @@ async function runReviewJob(input) {
419
419
  logPath,
420
420
  readOnly: true,
421
421
  hitl: { policy: input.noHitl ? "off" : "prompt" },
422
- log: (line) => say(line)
422
+ log: (line) => say(line),
423
+ ...input.render ? { render: input.render } : {},
424
+ ...input.onSpawn ? { onSpawn: input.onSpawn } : {}
423
425
  });
424
426
  for (const line of formatHitlSummary(result.hitl)) say(line);
425
427
  exitCode = hitlExitCode(result.exitCode, result.hitl);
@@ -8,7 +8,7 @@ import {
8
8
  saveManagedHashLedger,
9
9
  shouldPreserveCustomizedOverlay,
10
10
  toPosixRel
11
- } from "./chunk-27NYWS3N.js";
11
+ } from "./chunk-ZJDJCMQO.js";
12
12
  import {
13
13
  HANDOFF_REL
14
14
  } from "./chunk-C4Q77GGJ.js";
@@ -9,7 +9,7 @@ import {
9
9
  assertRealParentContained,
10
10
  isRealWriteTargetContained,
11
11
  resolveContained
12
- } from "./chunk-27NYWS3N.js";
12
+ } from "./chunk-ZJDJCMQO.js";
13
13
  import {
14
14
  ensureDir
15
15
  } from "./chunk-5B4DVO6C.js";
@@ -4,10 +4,10 @@ import {
4
4
  import {
5
5
  compareSemver,
6
6
  normalizeSemver
7
- } from "./chunk-IWCJ6RM6.js";
7
+ } from "./chunk-5HH3HSUR.js";
8
8
  import {
9
9
  MANIFEST_RELATIVE_PATH
10
- } from "./chunk-44AVHJRV.js";
10
+ } from "./chunk-LDZAK5DU.js";
11
11
  import {
12
12
  KIT_VERSION,
13
13
  pinnedCliSpec
@@ -2,7 +2,7 @@ import {
2
2
  compareSemver,
3
3
  normalizeSemver,
4
4
  readLocalKitVersion
5
- } from "./chunk-IWCJ6RM6.js";
5
+ } from "./chunk-5HH3HSUR.js";
6
6
  import {
7
7
  L0_ARTIFACTS
8
8
  } from "./chunk-WS6OX2IG.js";
@@ -15,11 +15,11 @@ import {
15
15
  mergeStats,
16
16
  recordOutcome,
17
17
  resolveProtectedGlobs
18
- } from "./chunk-44AVHJRV.js";
18
+ } from "./chunk-LDZAK5DU.js";
19
19
  import {
20
20
  loadManagedHashLedger,
21
21
  saveManagedHashLedger
22
- } from "./chunk-27NYWS3N.js";
22
+ } from "./chunk-ZJDJCMQO.js";
23
23
  import {
24
24
  KIT_PACKAGE_SPEC,
25
25
  KIT_VERSION
@@ -4,11 +4,11 @@ import {
4
4
  RESOLVE_AGENT_KIT_REL,
5
5
  SESSION_START_HOOK_MARKER,
6
6
  mergeAllowRowsWithoutGuard
7
- } from "./chunk-5U6AGH7T.js";
7
+ } from "./chunk-MGIPA6SD.js";
8
8
  import {
9
9
  CLAUDE_COMMANDS_DIR_REL,
10
10
  discoverInstalledCommands
11
- } from "./chunk-TUEREBTR.js";
11
+ } from "./chunk-2FKAKFMH.js";
12
12
  import {
13
13
  findOnPath
14
14
  } from "./chunk-WGLPZXNU.js";
@@ -6,7 +6,7 @@ import {
6
6
  formatStaleCliRefusal,
7
7
  installL0,
8
8
  syncFromManifest
9
- } from "./chunk-HMJNIIWG.js";
9
+ } from "./chunk-WHBGJ7IJ.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-NJ3JGF2O.js";
18
+ } from "./chunk-BCU54M2P.js";
19
19
  import {
20
20
  assessClaudeCommandAdapters,
21
21
  executeSafeReadinessFixes
22
- } from "./chunk-FOGD3MWJ.js";
22
+ } from "./chunk-XZQM55BK.js";
23
23
  import {
24
24
  writeReadinessSnapshot
25
25
  } from "./chunk-HAFRAXGV.js";
26
26
  import {
27
27
  writeClaudeSessionStartHook
28
- } from "./chunk-5U6AGH7T.js";
28
+ } from "./chunk-MGIPA6SD.js";
29
29
  import {
30
30
  CLAUDE_HITL_FALLBACK,
31
31
  generateClaudeCommandAdapters
32
- } from "./chunk-TUEREBTR.js";
32
+ } from "./chunk-2FKAKFMH.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-BTQ3D6N7.js";
59
+ } from "./chunk-SDJIMC5S.js";
60
60
  import {
61
61
  assessEnvironment
62
62
  } from "./chunk-B3VR5YBQ.js";
63
63
  import {
64
64
  warnIfRunningCliBehindNpm
65
- } from "./chunk-IWCJ6RM6.js";
65
+ } from "./chunk-5HH3HSUR.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-44AVHJRV.js";
82
+ } from "./chunk-LDZAK5DU.js";
83
83
  import {
84
84
  KIT_VERSION,
85
85
  pinnedCliSpec
@@ -472,7 +472,10 @@ var KNOWN_SHIPPED_OVERLAY_HASHES = /* @__PURE__ */ new Set([
472
472
  "afde6839f7d35fbfdddee85068252e1f5187b0caf3e29728b31e1ce81dea1f83",
473
473
  "d0f95082a50d53b5b8fd33c55c538ce8104a1be5439e4bc596cbe35e22a4e5c5",
474
474
  "27dc66786d9071f30fc5068a7b3a1ed5c2c904a26f928f311e33432ac5b6571b",
475
- "b2fb21604ca3cdc4f42a48a6f29873a41ca7decad7133419c982a4a340f733b3"
475
+ "b2fb21604ca3cdc4f42a48a6f29873a41ca7decad7133419c982a4a340f733b3",
476
+ "48b3aae36a8baf10d5dcc5a9de441c93782835ce8b87c7e09e0971101c6f1614",
477
+ "82e65afe6d183e9dcad0fbc6c60d381eee4e854e7ddffff56d1996b0f86886bd",
478
+ "9b3e6543d8b3cda4a9a5fe39f3d205b9d466fa7f9a466fd51c0cccf354065a7e"
476
479
  ]);
477
480
 
478
481
  // src/lifecycle/paths.ts
@@ -7,7 +7,7 @@ import {
7
7
  loadRegistry,
8
8
  packMemberFileTargets,
9
9
  skillFileTargets
10
- } from "./chunk-44AVHJRV.js";
10
+ } from "./chunk-LDZAK5DU.js";
11
11
 
12
12
  // src/lifecycle/targets.ts
13
13
  import path from "path";
@@ -7,14 +7,14 @@ import "./chunk-P7732A25.js";
7
7
  import {
8
8
  CURSOR_COMMANDS_DIR_REL,
9
9
  discoverInstalledCommands
10
- } from "./chunk-TUEREBTR.js";
10
+ } from "./chunk-2FKAKFMH.js";
11
11
  import "./chunk-WGLPZXNU.js";
12
12
  import "./chunk-Q35TWISF.js";
13
13
  import "./chunk-QTON2GQX.js";
14
14
  import {
15
15
  L0_ARTIFACTS
16
16
  } from "./chunk-WS6OX2IG.js";
17
- import "./chunk-27NYWS3N.js";
17
+ import "./chunk-ZJDJCMQO.js";
18
18
  import {
19
19
  KIT_VERSION
20
20
  } from "./chunk-7HDQEK6T.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  REVIEW_PACK_DEFAULT_MAX_BYTES
3
- } from "./chunk-U23SLQGX.js";
3
+ } from "./chunk-IESSMKOV.js";
4
4
  import {
5
5
  detectAgentBackend
6
6
  } from "./chunk-C4LCOOL4.js";
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  REGISTRY_CLI_ARGS,
3
3
  resolveRegistryFromCli
4
- } from "./chunk-NJ3JGF2O.js";
4
+ } from "./chunk-BCU54M2P.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-ZB43YMHW.js";
8
8
  import {
9
9
  managedPairs
10
- } from "./chunk-DYIIOALZ.js";
10
+ } from "./chunk-ZNY32NK2.js";
11
11
  import "./chunk-WS6OX2IG.js";
12
12
  import {
13
13
  loadAgentKitManifest,
14
14
  normalizeRelPath
15
- } from "./chunk-44AVHJRV.js";
15
+ } from "./chunk-LDZAK5DU.js";
16
16
  import {
17
17
  resolveContained
18
- } from "./chunk-27NYWS3N.js";
18
+ } from "./chunk-ZJDJCMQO.js";
19
19
  import "./chunk-C4Q77GGJ.js";
20
20
  import "./chunk-5B4DVO6C.js";
21
21
 
@@ -1,14 +1,15 @@
1
+ import {
2
+ loadRolesContext,
3
+ resolveReviewJobRole,
4
+ resolveWorkerRole
5
+ } from "./chunk-DZCLMIAS.js";
1
6
  import {
2
7
  REVIEW_BACKENDS,
3
8
  REVIEW_PACK_DEFAULT_MAX_BYTES,
4
9
  REVIEW_PACK_SLASH,
5
10
  parseReviewPackMaxBytes,
6
11
  reviewBackendMessage
7
- } from "./chunk-U23SLQGX.js";
8
- import {
9
- loadRolesContext,
10
- resolveWorkerRole
11
- } from "./chunk-UATQQDVR.js";
12
+ } from "./chunk-IESSMKOV.js";
12
13
  import "./chunk-7ABY6DYH.js";
13
14
  import {
14
15
  detectAgentBackend,
@@ -291,6 +292,23 @@ async function executeCountdown(input) {
291
292
  rolesNotes.push(
292
293
  `roles: worker ${worker.backend} (${worker.backendSource}), model ${worker.model ? `${worker.model} (${worker.modelSource})` : "backend default"}`
293
294
  );
295
+ } else if (job === "review") {
296
+ const ctx = await loadRolesContext(root, false);
297
+ if (!ctx.ok) return usage(ctx.error);
298
+ const review = resolveReviewJobRole({
299
+ flagBackend: input.backend,
300
+ flagModel: input.model,
301
+ roles: ctx.roles
302
+ });
303
+ if (review.refusal) return usage(review.refusal);
304
+ backendRequest = review.backend;
305
+ model = review.model;
306
+ if (review.warning) rolesNotes.push(`roles: ${review.warning}`);
307
+ if (review.backendSource === "config" || review.modelSource === "config") {
308
+ rolesNotes.push(
309
+ `roles: reviewer ${review.backend} (${review.backendSource}), model ${review.model ? `${review.model} (${review.modelSource})` : "backend default"}`
310
+ );
311
+ }
294
312
  }
295
313
  const detected = await detectAgentBackend(backendRequest, input.whichFn);
296
314
  if (!detected.ok) return usage(detected.message);
@@ -440,7 +458,7 @@ var countdownCommand = defineCommand({
440
458
  },
441
459
  backend: {
442
460
  type: "string",
443
- description: `Agent backend (${listDetectBackendIds().join(" | ")}; default: auto; the tick job reads plan worker_backend and config roles.worker first)`,
461
+ description: `Agent backend (${listDetectBackendIds().join(" | ")}; default: auto; the tick job reads plan worker_backend and config roles.worker first, the review job config roles.reviewer)`,
444
462
  default: ""
445
463
  },
446
464
  model: {
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  REGISTRY_CLI_ARGS,
3
3
  resolveRegistryFromCli
4
- } from "./chunk-NJ3JGF2O.js";
4
+ } from "./chunk-BCU54M2P.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-7MKWNRAC.js";
12
- import "./chunk-DYIIOALZ.js";
11
+ } from "./chunk-4SEQ76BQ.js";
12
+ import "./chunk-ZNY32NK2.js";
13
13
  import "./chunk-WS6OX2IG.js";
14
14
  import {
15
15
  loadAgentKitManifest
16
- } from "./chunk-44AVHJRV.js";
17
- import "./chunk-27NYWS3N.js";
16
+ } from "./chunk-LDZAK5DU.js";
17
+ import "./chunk-ZJDJCMQO.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-FOGD3MWJ.js";
5
+ } from "./chunk-XZQM55BK.js";
6
6
  import {
7
7
  writeReadinessSnapshot
8
8
  } from "./chunk-HAFRAXGV.js";
9
- import "./chunk-5U6AGH7T.js";
10
- import "./chunk-TUEREBTR.js";
9
+ import "./chunk-MGIPA6SD.js";
10
+ import "./chunk-2FKAKFMH.js";
11
11
  import "./chunk-WGLPZXNU.js";
12
12
  import "./chunk-Q35TWISF.js";
13
13
  import {
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  detectWorkspaceParent,
18
18
  workspaceParentAdvisoryLines
19
- } from "./chunk-DJKZLY3E.js";
19
+ } from "./chunk-GT5R7W66.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-IWCJ6RM6.js";
36
+ } from "./chunk-5HH3HSUR.js";
37
37
  import "./chunk-PFEUZXVT.js";
38
- import "./chunk-7MKWNRAC.js";
39
- import "./chunk-DYIIOALZ.js";
38
+ import "./chunk-4SEQ76BQ.js";
39
+ import "./chunk-ZNY32NK2.js";
40
40
  import "./chunk-WS6OX2IG.js";
41
- import "./chunk-44AVHJRV.js";
42
- import "./chunk-27NYWS3N.js";
41
+ import "./chunk-LDZAK5DU.js";
42
+ import "./chunk-ZJDJCMQO.js";
43
43
  import {
44
44
  KIT_VERSION
45
45
  } from "./chunk-7HDQEK6T.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildSessionStartAdditionalContext,
3
3
  resolveSessionRoot
4
- } from "./chunk-5KF4IHXO.js";
4
+ } from "./chunk-GV4VKIPO.js";
5
5
  import "./chunk-2YU2H7I6.js";
6
6
  import {
7
7
  readStdinJson
@@ -13,13 +13,13 @@ import "./chunk-4CRBUEJ6.js";
13
13
  import "./chunk-L5V3W3DY.js";
14
14
  import "./chunk-MUTTNRX4.js";
15
15
  import "./chunk-HAFRAXGV.js";
16
- import "./chunk-IWCJ6RM6.js";
16
+ import "./chunk-5HH3HSUR.js";
17
17
  import "./chunk-PFEUZXVT.js";
18
- import "./chunk-7MKWNRAC.js";
19
- import "./chunk-DYIIOALZ.js";
18
+ import "./chunk-4SEQ76BQ.js";
19
+ import "./chunk-ZNY32NK2.js";
20
20
  import "./chunk-WS6OX2IG.js";
21
- import "./chunk-44AVHJRV.js";
22
- import "./chunk-27NYWS3N.js";
21
+ import "./chunk-LDZAK5DU.js";
22
+ import "./chunk-ZJDJCMQO.js";
23
23
  import "./chunk-7HDQEK6T.js";
24
24
  import "./chunk-C4Q77GGJ.js";
25
25
  import "./chunk-5B4DVO6C.js";
package/dist/index.js CHANGED
@@ -234,41 +234,41 @@ var main = defineCommand({
234
234
  version: KIT_VERSION
235
235
  },
236
236
  subCommands: {
237
- init: () => import("./init-RTGM5G6T.js").then((m) => m.initCommand),
238
- install: () => import("./install-SD3H67Y2.js").then((m) => m.installCommand),
237
+ init: () => import("./init-47WA2SCG.js").then((m) => m.initCommand),
238
+ install: () => import("./install-Y63HEM4G.js").then((m) => m.installCommand),
239
239
  scan: () => import("./scan-K3T5RQLC.js").then((m) => m.scanCommand),
240
- add: () => import("./add-XDGERL6L.js").then((m) => m.addCommand),
241
- doctor: () => import("./doctor-EE3BSJC3.js").then((m) => m.doctorCommand),
242
- "setup-global": () => import("./setup-global-GGFLE6QQ.js").then((m) => m.setupGlobalCommand),
243
- status: () => import("./status-77NJN2G4.js").then((m) => m.statusCommand),
244
- update: () => import("./update-26HHB5JD.js").then((m) => m.updateCommand),
240
+ add: () => import("./add-YVDIFP4N.js").then((m) => m.addCommand),
241
+ doctor: () => import("./doctor-J2GJFTSE.js").then((m) => m.doctorCommand),
242
+ "setup-global": () => import("./setup-global-KBJL7QRD.js").then((m) => m.setupGlobalCommand),
243
+ status: () => import("./status-3UGVDIO6.js").then((m) => m.statusCommand),
244
+ update: () => import("./update-4UQHGENC.js").then((m) => m.updateCommand),
245
245
  "cursor-awareness": () => import("./cursor-awareness-TN5JXD2C.js").then((m) => m.cursorAwarenessCommand),
246
246
  "public-inbound-radar": () => import("./public-inbound-radar-5U4JMBRU.js").then((m) => m.publicInboundRadarCommand),
247
247
  "remote-issues": () => import("./remote-issues-APYOMIJC.js").then((m) => m.remoteIssuesCommand),
248
248
  dogfood: () => import("./dogfood-2JAHSYQA.js").then((m) => m.dogfoodCommand),
249
- diff: () => import("./diff-JJH42JFA.js").then((m) => m.diffCommand),
250
- contribute: () => import("./contribute-2ATM22YG.js").then((m) => m.contributeCommand),
249
+ diff: () => import("./diff-KFID4SX3.js").then((m) => m.diffCommand),
250
+ contribute: () => import("./contribute-XPAR2JER.js").then((m) => m.contributeCommand),
251
251
  handoff: () => import("./handoff-5AGE2D3T.js").then((m) => m.handoffCommand),
252
252
  "plan-index": () => import("./plan-index-BNLUU6T5.js").then((m) => m.planIndexCommand),
253
- run: () => import("./run-S27AZ6ZE.js").then((m) => m.runCommand),
254
- "run-plan": () => import("./run-plan-OC3IF4PH.js").then((m) => m.runPlanCommand),
255
- "run-plan-all": () => import("./run-S27AZ6ZE.js").then((m) => m.runPlanAllCommand),
253
+ run: () => import("./run-Z2GHNVBO.js").then((m) => m.runCommand),
254
+ "run-plan": () => import("./run-plan-XA7MYOQ3.js").then((m) => m.runPlanCommand),
255
+ "run-plan-all": () => import("./run-Z2GHNVBO.js").then((m) => m.runPlanAllCommand),
256
256
  queue: () => import("./queue-OJHKFKK3.js").then((m) => m.queueCommand),
257
257
  promote: () => import("./promote-H5MIMVEB.js").then((m) => m.promoteCommand),
258
- countdown: () => import("./countdown-7ONIVAG6.js").then((m) => m.countdownCommand),
258
+ countdown: () => import("./countdown-25E5C7AR.js").then((m) => m.countdownCommand),
259
259
  "ground-control": () => import("./ground-control-IDCXN5FK.js").then((m) => m.groundControlCommand),
260
- conflicts: () => import("./conflicts-7T7KKQOY.js").then((m) => m.conflictsCommand),
260
+ conflicts: () => import("./conflicts-FJD3IVPQ.js").then((m) => m.conflictsCommand),
261
261
  dashboard: () => import("./dashboard-P65XHYCU.js").then((m) => m.dashboardCommand),
262
262
  "dashboard-broadcast": () => import("./dashboard-broadcast-GYK34QYL.js").then((m) => m.dashboardBroadcastCommand),
263
263
  "mission-control": () => import("./mission-control-CRMCRZUU.js").then((m) => m.missionControlCommand),
264
- hook: () => import("./hook-KPE2EOM6.js").then((m) => m.hookCommand),
264
+ hook: () => import("./hook-HV6U3ANI.js").then((m) => m.hookCommand),
265
265
  guard: () => import("./guard-RJZEEKSL.js").then((m) => m.guardCommand),
266
266
  monitors: () => import("./monitors-PDXBLB3U.js").then((m) => m.monitorsCommand),
267
- sessions: () => import("./sessions-HUWIIEGD.js").then((m) => m.sessionsCommand),
267
+ sessions: () => import("./sessions-6IGVH467.js").then((m) => m.sessionsCommand),
268
268
  "outcome-ledger": () => import("./outcome-ledger-XLWHWPVQ.js").then((m) => m.outcomeLedgerCommand),
269
269
  validate: () => import("./validate-V2CW7J4B.js").then((m) => m.validateCommand),
270
270
  "engine-info": () => import("./engine-info-BBI5QO5Y.js").then((m) => m.engineInfoCommand),
271
- commands: () => import("./commands-UIV535OI.js").then((m) => m.commandsCommand)
271
+ commands: () => import("./commands-LEBG6DMD.js").then((m) => m.commandsCommand)
272
272
  },
273
273
  async run({ rawArgs }) {
274
274
  if (hasCliSubcommand(rawArgs)) return;
@@ -2,19 +2,19 @@ import {
2
2
  nextStepAfterInstall,
3
3
  performInstall,
4
4
  printInstallEpilogue
5
- } from "./chunk-YXGD3FST.js";
5
+ } from "./chunk-YRBRYTM5.js";
6
6
  import {
7
7
  NON_INTERACTIVE_ROOT_ARGS
8
- } from "./chunk-HMJNIIWG.js";
8
+ } from "./chunk-WHBGJ7IJ.js";
9
9
  import {
10
10
  SkippedSymlinkError,
11
11
  logApplyStats
12
12
  } from "./chunk-HS7LVVLO.js";
13
- import "./chunk-NJ3JGF2O.js";
14
- import "./chunk-FOGD3MWJ.js";
13
+ import "./chunk-BCU54M2P.js";
14
+ import "./chunk-XZQM55BK.js";
15
15
  import "./chunk-HAFRAXGV.js";
16
- import "./chunk-5U6AGH7T.js";
17
- import "./chunk-TUEREBTR.js";
16
+ import "./chunk-MGIPA6SD.js";
17
+ import "./chunk-2FKAKFMH.js";
18
18
  import "./chunk-WGLPZXNU.js";
19
19
  import "./chunk-Q35TWISF.js";
20
20
  import {
@@ -32,17 +32,17 @@ import {
32
32
  confirmProjectRoot,
33
33
  isNonInteractive,
34
34
  syncPathCliToRuntime
35
- } from "./chunk-BTQ3D6N7.js";
35
+ } from "./chunk-SDJIMC5S.js";
36
36
  import {
37
37
  assessEnvironment
38
38
  } from "./chunk-B3VR5YBQ.js";
39
- import "./chunk-IWCJ6RM6.js";
39
+ import "./chunk-5HH3HSUR.js";
40
40
  import "./chunk-PFEUZXVT.js";
41
- import "./chunk-7MKWNRAC.js";
42
- import "./chunk-DYIIOALZ.js";
41
+ import "./chunk-4SEQ76BQ.js";
42
+ import "./chunk-ZNY32NK2.js";
43
43
  import "./chunk-WS6OX2IG.js";
44
- import "./chunk-44AVHJRV.js";
45
- import "./chunk-27NYWS3N.js";
44
+ import "./chunk-LDZAK5DU.js";
45
+ import "./chunk-ZJDJCMQO.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-YXGD3FST.js";
7
- import "./chunk-HMJNIIWG.js";
6
+ } from "./chunk-YRBRYTM5.js";
7
+ import "./chunk-WHBGJ7IJ.js";
8
8
  import "./chunk-HS7LVVLO.js";
9
- import "./chunk-NJ3JGF2O.js";
10
- import "./chunk-FOGD3MWJ.js";
9
+ import "./chunk-BCU54M2P.js";
10
+ import "./chunk-XZQM55BK.js";
11
11
  import "./chunk-HAFRAXGV.js";
12
- import "./chunk-5U6AGH7T.js";
13
- import "./chunk-TUEREBTR.js";
12
+ import "./chunk-MGIPA6SD.js";
13
+ import "./chunk-2FKAKFMH.js";
14
14
  import "./chunk-WGLPZXNU.js";
15
15
  import "./chunk-Q35TWISF.js";
16
16
  import "./chunk-QTON2GQX.js";
@@ -18,15 +18,15 @@ import "./chunk-PNFF6OU3.js";
18
18
  import "./chunk-R4DUO5DA.js";
19
19
  import "./chunk-F6C3GFKV.js";
20
20
  import "./chunk-ZB43YMHW.js";
21
- import "./chunk-BTQ3D6N7.js";
21
+ import "./chunk-SDJIMC5S.js";
22
22
  import "./chunk-B3VR5YBQ.js";
23
- import "./chunk-IWCJ6RM6.js";
23
+ import "./chunk-5HH3HSUR.js";
24
24
  import "./chunk-PFEUZXVT.js";
25
- import "./chunk-7MKWNRAC.js";
26
- import "./chunk-DYIIOALZ.js";
25
+ import "./chunk-4SEQ76BQ.js";
26
+ import "./chunk-ZNY32NK2.js";
27
27
  import "./chunk-WS6OX2IG.js";
28
- import "./chunk-44AVHJRV.js";
29
- import "./chunk-27NYWS3N.js";
28
+ import "./chunk-LDZAK5DU.js";
29
+ import "./chunk-ZJDJCMQO.js";
30
30
  import "./chunk-7HDQEK6T.js";
31
31
  import "./chunk-C4Q77GGJ.js";
32
32
  import "./chunk-5B4DVO6C.js";
@@ -2,7 +2,7 @@ import {
2
2
  runPlanLoop,
3
3
  shouldUseLiveTui,
4
4
  withLiveTui
5
- } from "./chunk-4FCK4QNB.js";
5
+ } from "./chunk-EYNSSL6B.js";
6
6
  import "./chunk-CQHD6UKB.js";
7
7
  import {
8
8
  negatedFlag
@@ -24,17 +24,18 @@ import {
24
24
  gateCheckIn,
25
25
  holdQueueStatus
26
26
  } from "./chunk-DTSL2RH7.js";
27
- import {
28
- REVIEW_PACK_SLASH,
29
- runReviewJob
30
- } from "./chunk-U23SLQGX.js";
31
27
  import {
32
28
  CLAUDE_SUBAGENT_MODEL_ENV,
33
29
  describeResolvedRoles,
34
30
  loadRolesContext,
31
+ resolveReviewJobRole,
35
32
  resolveSubworkerModel,
36
33
  resolveWorkerRole
37
- } from "./chunk-UATQQDVR.js";
34
+ } from "./chunk-DZCLMIAS.js";
35
+ import {
36
+ REVIEW_PACK_SLASH,
37
+ runReviewJob
38
+ } from "./chunk-IESSMKOV.js";
38
39
  import {
39
40
  resolveActivePlanPath
40
41
  } from "./chunk-7ABY6DYH.js";
@@ -138,9 +139,23 @@ async function executeRun(input) {
138
139
  runRoles = {
139
140
  roles: ctx.roles,
140
141
  backendSource: worker.backendSource,
141
- ...worker.modelSource ? { modelSource: worker.modelSource } : {}
142
+ ...worker.modelSource ? { modelSource: worker.modelSource } : {},
143
+ reviewer: ctx.reviewer
142
144
  };
143
145
  }
146
+ if (slash === REVIEW_PACK_SLASH) {
147
+ const ctx = await loadRolesContext(root, false);
148
+ if (!ctx.ok) return { exitCode: 1, error: ctx.error };
149
+ const review = resolveReviewJobRole({
150
+ flagBackend: input.backend,
151
+ flagModel: input.model,
152
+ roles: ctx.roles
153
+ });
154
+ if (review.refusal) return { exitCode: 1, error: review.refusal };
155
+ if (review.warning) rolesWarnings.push(review.warning);
156
+ backendRequest = review.backend;
157
+ model = review.model;
158
+ }
144
159
  const rolesNote = (line) => input.events ? process.stderr.write(`${line}
145
160
  `) : console.log(line);
146
161
  for (const warning of rolesWarnings) rolesNote(`roles: ${warning}`);
@@ -221,7 +236,7 @@ async function executeRun(input) {
221
236
  root,
222
237
  backendId: detected.id,
223
238
  bin: detected.bin,
224
- model: input.model,
239
+ model,
225
240
  maxPackBytes: input.maxPackBytes,
226
241
  includeReviewed: input.includeReviewed === true,
227
242
  noHitl: input.noHitl === true,
@@ -374,7 +389,7 @@ var runDispatchArgs = {
374
389
  },
375
390
  backend: {
376
391
  type: "string",
377
- description: `Agent CLI (${listDetectBackendIds().join(" | ")}; default: auto; run-plan and run-plan-all read config roles.worker first)`,
392
+ description: `Agent CLI (${listDetectBackendIds().join(" | ")}; default: auto; run-plan and run-plan-all read config roles.worker first, review-pack config roles.reviewer)`,
378
393
  default: ""
379
394
  },
380
395
  model: {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runPlanLoop
3
- } from "./chunk-4FCK4QNB.js";
3
+ } from "./chunk-EYNSSL6B.js";
4
4
  import "./chunk-CQHD6UKB.js";
5
5
  import {
6
6
  negatedFlag
@@ -12,17 +12,20 @@ import "./chunk-DTSL2RH7.js";
12
12
  import {
13
13
  loadRolesContext,
14
14
  resolveWorkerRole
15
- } from "./chunk-UATQQDVR.js";
15
+ } from "./chunk-DZCLMIAS.js";
16
+ import "./chunk-IESSMKOV.js";
16
17
  import "./chunk-7ABY6DYH.js";
17
18
  import {
18
19
  detectAgentBackend,
19
20
  listDetectBackendIds
20
21
  } from "./chunk-C4LCOOL4.js";
22
+ import "./chunk-5EBT3V7G.js";
21
23
  import {
22
24
  LAND_ON_GATE_DESCRIPTION
23
25
  } from "./chunk-BGL5DRK2.js";
24
26
  import "./chunk-L5V3W3DY.js";
25
27
  import "./chunk-MUTTNRX4.js";
28
+ import "./chunk-SGTTC2JP.js";
26
29
  import {
27
30
  getBackend
28
31
  } from "./chunk-W3ZJVBNY.js";
@@ -180,7 +183,8 @@ var runPlanCommand = defineCommand({
180
183
  roles: {
181
184
  roles: rolesCtx.roles,
182
185
  backendSource: worker.backendSource,
183
- ...worker.modelSource ? { modelSource: worker.modelSource } : {}
186
+ ...worker.modelSource ? { modelSource: worker.modelSource } : {},
187
+ reviewer: rolesCtx.reviewer
184
188
  },
185
189
  dryRun: Boolean(args["dry-run"]),
186
190
  backend,
@@ -25,7 +25,7 @@ import {
25
25
  shouldEmitCursorAwarenessNudge,
26
26
  updateCheckSection,
27
27
  withDeadline
28
- } from "./chunk-5KF4IHXO.js";
28
+ } from "./chunk-GV4VKIPO.js";
29
29
  import "./chunk-2YU2H7I6.js";
30
30
  import "./chunk-QWTBYXHN.js";
31
31
  import "./chunk-DTSL2RH7.js";
@@ -34,13 +34,13 @@ import "./chunk-4CRBUEJ6.js";
34
34
  import "./chunk-L5V3W3DY.js";
35
35
  import "./chunk-MUTTNRX4.js";
36
36
  import "./chunk-HAFRAXGV.js";
37
- import "./chunk-IWCJ6RM6.js";
37
+ import "./chunk-5HH3HSUR.js";
38
38
  import "./chunk-PFEUZXVT.js";
39
- import "./chunk-7MKWNRAC.js";
40
- import "./chunk-DYIIOALZ.js";
39
+ import "./chunk-4SEQ76BQ.js";
40
+ import "./chunk-ZNY32NK2.js";
41
41
  import "./chunk-WS6OX2IG.js";
42
- import "./chunk-44AVHJRV.js";
43
- import "./chunk-27NYWS3N.js";
42
+ import "./chunk-LDZAK5DU.js";
43
+ import "./chunk-ZJDJCMQO.js";
44
44
  import "./chunk-7HDQEK6T.js";
45
45
  import "./chunk-C4Q77GGJ.js";
46
46
  import "./chunk-5B4DVO6C.js";
@@ -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-5PVH7L5K.js");
82
+ const { listDetachedAuditSessions } = await import("./session-start-PEVTDMOZ.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,17 +2,17 @@ import {
2
2
  classifyInstallError,
3
3
  isNonInteractive,
4
4
  pathCliStatus
5
- } from "./chunk-BTQ3D6N7.js";
5
+ } from "./chunk-SDJIMC5S.js";
6
6
  import {
7
7
  assessEnvironment
8
8
  } from "./chunk-B3VR5YBQ.js";
9
- import "./chunk-IWCJ6RM6.js";
9
+ import "./chunk-5HH3HSUR.js";
10
10
  import "./chunk-PFEUZXVT.js";
11
- import "./chunk-7MKWNRAC.js";
12
- import "./chunk-DYIIOALZ.js";
11
+ import "./chunk-4SEQ76BQ.js";
12
+ import "./chunk-ZNY32NK2.js";
13
13
  import "./chunk-WS6OX2IG.js";
14
- import "./chunk-44AVHJRV.js";
15
- import "./chunk-27NYWS3N.js";
14
+ import "./chunk-LDZAK5DU.js";
15
+ import "./chunk-ZJDJCMQO.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-DJKZLY3E.js";
4
+ } from "./chunk-GT5R7W66.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-BTQ3D6N7.js";
18
+ } from "./chunk-SDJIMC5S.js";
19
19
  import {
20
20
  assessEnvironment
21
21
  } from "./chunk-B3VR5YBQ.js";
22
- import "./chunk-IWCJ6RM6.js";
22
+ import "./chunk-5HH3HSUR.js";
23
23
  import "./chunk-PFEUZXVT.js";
24
- import "./chunk-7MKWNRAC.js";
25
- import "./chunk-DYIIOALZ.js";
24
+ import "./chunk-4SEQ76BQ.js";
25
+ import "./chunk-ZNY32NK2.js";
26
26
  import "./chunk-WS6OX2IG.js";
27
27
  import {
28
28
  MANIFEST_RELATIVE_PATH,
29
29
  loadAgentKitManifest,
30
30
  resolveProtectedGlobs
31
- } from "./chunk-44AVHJRV.js";
32
- import "./chunk-27NYWS3N.js";
31
+ } from "./chunk-LDZAK5DU.js";
32
+ import "./chunk-ZJDJCMQO.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-HMJNIIWG.js";
7
+ } from "./chunk-WHBGJ7IJ.js";
8
8
  import {
9
9
  formatSkippedSymlinks,
10
10
  logApplyStats
@@ -12,17 +12,17 @@ import {
12
12
  import {
13
13
  REGISTRY_CLI_ARGS,
14
14
  resolveRegistryFromCli
15
- } from "./chunk-NJ3JGF2O.js";
15
+ } from "./chunk-BCU54M2P.js";
16
16
  import {
17
17
  CLAUDE_SETTINGS_REL,
18
18
  formatClaudeSettingsDrift,
19
19
  formatPermissionsChanged,
20
20
  planClaudeSettingsDrift,
21
21
  writeClaudeSessionStartHook
22
- } from "./chunk-5U6AGH7T.js";
22
+ } from "./chunk-MGIPA6SD.js";
23
23
  import {
24
24
  generateClaudeCommandAdapters
25
- } from "./chunk-TUEREBTR.js";
25
+ } from "./chunk-2FKAKFMH.js";
26
26
  import "./chunk-Q35TWISF.js";
27
27
  import {
28
28
  withCliProgress
@@ -35,14 +35,14 @@ import {
35
35
  confirmProjectRoot,
36
36
  isNonInteractive,
37
37
  syncPathCliToRuntime
38
- } from "./chunk-BTQ3D6N7.js";
38
+ } from "./chunk-SDJIMC5S.js";
39
39
  import "./chunk-B3VR5YBQ.js";
40
40
  import {
41
41
  checkForUpdates
42
- } from "./chunk-IWCJ6RM6.js";
42
+ } from "./chunk-5HH3HSUR.js";
43
43
  import "./chunk-PFEUZXVT.js";
44
- import "./chunk-7MKWNRAC.js";
45
- import "./chunk-DYIIOALZ.js";
44
+ import "./chunk-4SEQ76BQ.js";
45
+ import "./chunk-ZNY32NK2.js";
46
46
  import "./chunk-WS6OX2IG.js";
47
47
  import {
48
48
  buildManifest,
@@ -50,10 +50,10 @@ import {
50
50
  loadAgentKitManifest,
51
51
  resolveProtectedGlobs,
52
52
  saveManifest
53
- } from "./chunk-44AVHJRV.js";
53
+ } from "./chunk-LDZAK5DU.js";
54
54
  import {
55
55
  seedManagedHashLedger
56
- } from "./chunk-27NYWS3N.js";
56
+ } from "./chunk-ZJDJCMQO.js";
57
57
  import {
58
58
  KIT_VERSION
59
59
  } from "./chunk-7HDQEK6T.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dadado/agent-kit-cli",
3
- "version": "6.21.0",
3
+ "version": "6.22.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
  "homepage": "https://agent.missionkit.io/",