@tangle-network/agent-app 0.62.3 → 0.63.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 (136) hide show
  1. package/README.md +1 -1
  2. package/dist/agent-profiles/d1.js +1 -1
  3. package/dist/agent-profiles/index.d.ts +4 -1
  4. package/dist/agent-profiles/index.js +1 -1
  5. package/dist/app-auth/index.js +2 -2
  6. package/dist/assistant/index.js +7 -7
  7. package/dist/chat-react/index.js +3 -3
  8. package/dist/chat-routes/cancellation.d.ts +61 -0
  9. package/dist/chat-routes/dispatch-first.d.ts +14 -25
  10. package/dist/chat-routes/early-turn-work.d.ts +10 -0
  11. package/dist/chat-routes/hybrid-producer.d.ts +4 -3
  12. package/dist/chat-routes/index.d.ts +2 -1
  13. package/dist/chat-routes/index.js +86 -1874
  14. package/dist/chat-routes/index.js.map +1 -1
  15. package/dist/chat-routes/native-turn-timing.d.ts +15 -0
  16. package/dist/chat-routes/producer-stream.d.ts +5 -0
  17. package/dist/chat-routes/route-producer.d.ts +3 -0
  18. package/dist/chat-routes/route-storage.d.ts +7 -0
  19. package/dist/chat-routes/router-producer.d.ts +31 -5
  20. package/dist/chat-routes/turn-admission.d.ts +2 -1
  21. package/dist/chat-routes/turn-execution.d.ts +6 -11
  22. package/dist/chat-routes/turn-ownership.d.ts +22 -0
  23. package/dist/chat-routes/turn-route-contracts.d.ts +112 -105
  24. package/dist/chat-routes/turn-routes.d.ts +4 -4
  25. package/dist/chat-routes/wire.d.ts +0 -7
  26. package/dist/chat-store/index.d.ts +1 -1
  27. package/dist/chat-store/index.js +21 -3
  28. package/dist/chat-store/index.js.map +1 -1
  29. package/dist/chat-store/schema.d.ts +3 -2
  30. package/dist/chat-store/store.d.ts +8 -0
  31. package/dist/{chunk-GIEUZBQQ.js → chunk-4CALWPN5.js} +3 -7
  32. package/dist/chunk-4CALWPN5.js.map +1 -0
  33. package/dist/chunk-4DBHC63F.js +54 -0
  34. package/dist/chunk-4DBHC63F.js.map +1 -0
  35. package/dist/{chunk-G7M2C72Q.js → chunk-5TSRFF5W.js} +1 -1
  36. package/dist/chunk-5TSRFF5W.js.map +1 -0
  37. package/dist/chunk-A2NQMVMF.js +485 -0
  38. package/dist/chunk-A2NQMVMF.js.map +1 -0
  39. package/dist/{chunk-PCAY23GS.js → chunk-AVBNS64P.js} +172 -2
  40. package/dist/chunk-AVBNS64P.js.map +1 -0
  41. package/dist/{chunk-4P5NFBWX.js → chunk-BI5AZAOO.js} +4 -4
  42. package/dist/chunk-BV3VZEKB.js +483 -0
  43. package/dist/chunk-BV3VZEKB.js.map +1 -0
  44. package/dist/{chunk-UW2DKTEM.js → chunk-IDG2XR5O.js} +20 -10
  45. package/dist/chunk-IDG2XR5O.js.map +1 -0
  46. package/dist/{chunk-KS4I7KVC.js → chunk-JRTWTADT.js} +184 -123
  47. package/dist/chunk-JRTWTADT.js.map +1 -0
  48. package/dist/chunk-KG2Y44XT.js +1 -0
  49. package/dist/chunk-KG2Y44XT.js.map +1 -0
  50. package/dist/chunk-MM3GOLHO.js +3365 -0
  51. package/dist/chunk-MM3GOLHO.js.map +1 -0
  52. package/dist/chunk-N6URQ6DM.js +225 -0
  53. package/dist/chunk-N6URQ6DM.js.map +1 -0
  54. package/dist/{chunk-ISRPOPMM.js → chunk-ND5XWLRU.js} +21 -18
  55. package/dist/chunk-ND5XWLRU.js.map +1 -0
  56. package/dist/{chunk-IUVDR3KJ.js → chunk-NHVSO47Q.js} +2 -2
  57. package/dist/{chunk-FAXSYC2C.js → chunk-RZLCBWGG.js} +2 -2
  58. package/dist/{chunk-MRZP65DZ.js → chunk-SRWQCWLR.js} +14 -3
  59. package/dist/chunk-SRWQCWLR.js.map +1 -0
  60. package/dist/{chunk-JRW6LCIA.js → chunk-V6YGLAQC.js} +2 -2
  61. package/dist/{chunk-54YIL7WM.js → chunk-WPPDNS63.js} +4 -4
  62. package/dist/{chunk-CQZVJVME.js → chunk-YCMVNXAX.js} +2 -2
  63. package/dist/design-canvas/index.js +3 -3
  64. package/dist/openui/index.js +3 -3
  65. package/dist/operator/index.js +2 -2
  66. package/dist/platform/billable-turn-admission.d.ts +13 -9
  67. package/dist/platform/delegated-keys.d.ts +4 -3
  68. package/dist/platform/delegated-turn-keys.d.ts +17 -6
  69. package/dist/platform/index.js +80 -23
  70. package/dist/platform/index.js.map +1 -1
  71. package/dist/preset-cloudflare/index.d.ts +2 -0
  72. package/dist/preset-cloudflare/index.js +344 -0
  73. package/dist/preset-cloudflare/index.js.map +1 -1
  74. package/dist/preset-cloudflare/native-completion-owner.d.ts +90 -0
  75. package/dist/preset-cloudflare/native-completion-store.d.ts +56 -0
  76. package/dist/preset-cloudflare/native-completion-workflow.d.ts +10 -0
  77. package/dist/public-consultation/index.js +28 -7
  78. package/dist/public-consultation/index.js.map +1 -1
  79. package/dist/rollout/d1.d.ts +103 -3
  80. package/dist/rollout/d1.js +152 -5
  81. package/dist/rollout/d1.js.map +1 -1
  82. package/dist/runtime/index.js +3 -4
  83. package/dist/runtime/index.js.map +1 -1
  84. package/dist/runtime/router-turn.d.ts +4 -0
  85. package/dist/runtime/router-turn.js +2 -3
  86. package/dist/sandbox/index.js +3 -4
  87. package/dist/sandbox/sandbox-run-tool.d.ts +5 -0
  88. package/dist/sequences/index.js +5 -5
  89. package/dist/signoff/cli.js +15 -3
  90. package/dist/signoff/cli.js.map +1 -1
  91. package/dist/signoff/config.d.ts +3 -1
  92. package/dist/signoff/index.d.ts +2 -1
  93. package/dist/signoff/index.js +3 -1
  94. package/dist/signoff/phases.d.ts +3 -0
  95. package/dist/signoff/proof.js +3 -0
  96. package/dist/signoff/proof.js.map +1 -1
  97. package/dist/signoff/run.d.ts +3 -1
  98. package/dist/signoff/types.d.ts +13 -0
  99. package/dist/skills-placement/box.js +5 -5
  100. package/dist/skills-placement/index.js +2 -2
  101. package/dist/tools/index.js +1 -1
  102. package/dist/turn-stream/adapters.d.ts +10 -4
  103. package/dist/turn-stream/index.js +33 -356
  104. package/dist/turn-stream/index.js.map +1 -1
  105. package/dist/turn-trace/index.d.ts +1 -0
  106. package/dist/turn-trace/index.js +4 -5
  107. package/dist/turn-trace/phase-timing.d.ts +20 -0
  108. package/dist/turn-trace/recorder.d.ts +3 -0
  109. package/dist/turn-trace/turn-facts.d.ts +17 -0
  110. package/dist/web-react/agent-profile-editor.js +1 -1
  111. package/dist/web-react/chat-stream.d.ts +0 -7
  112. package/dist/web-react/index.js +7 -9
  113. package/dist/work-product/index.js +7 -7
  114. package/package.json +1 -1
  115. package/dist/chat-routes/minted-thread.d.ts +0 -63
  116. package/dist/chunk-6R73V3Y5.js +0 -17
  117. package/dist/chunk-6R73V3Y5.js.map +0 -1
  118. package/dist/chunk-CCVWR33L.js +0 -99
  119. package/dist/chunk-CCVWR33L.js.map +0 -1
  120. package/dist/chunk-EFQUAWWF.js +0 -1749
  121. package/dist/chunk-EFQUAWWF.js.map +0 -1
  122. package/dist/chunk-G7M2C72Q.js.map +0 -1
  123. package/dist/chunk-GIEUZBQQ.js.map +0 -1
  124. package/dist/chunk-ISRPOPMM.js.map +0 -1
  125. package/dist/chunk-KS4I7KVC.js.map +0 -1
  126. package/dist/chunk-MRZP65DZ.js.map +0 -1
  127. package/dist/chunk-PCAY23GS.js.map +0 -1
  128. package/dist/chunk-UW2DKTEM.js.map +0 -1
  129. package/dist/chunk-VK3F4N4U.js +0 -133
  130. package/dist/chunk-VK3F4N4U.js.map +0 -1
  131. /package/dist/{chunk-4P5NFBWX.js.map → chunk-BI5AZAOO.js.map} +0 -0
  132. /package/dist/{chunk-IUVDR3KJ.js.map → chunk-NHVSO47Q.js.map} +0 -0
  133. /package/dist/{chunk-FAXSYC2C.js.map → chunk-RZLCBWGG.js.map} +0 -0
  134. /package/dist/{chunk-JRW6LCIA.js.map → chunk-V6YGLAQC.js.map} +0 -0
  135. /package/dist/{chunk-54YIL7WM.js.map → chunk-WPPDNS63.js.map} +0 -0
  136. /package/dist/{chunk-CQZVJVME.js.map → chunk-YCMVNXAX.js.map} +0 -0
@@ -504,6 +504,152 @@ async function collectLastExports(repoRoot, apiKey) {
504
504
  return exports;
505
505
  }
506
506
 
507
+ // src/signoff/schedule.ts
508
+ function validateGraph(nodes) {
509
+ const seen = /* @__PURE__ */ new Set();
510
+ for (const node of nodes) {
511
+ if (seen.has(node.name)) throw new Error(`signoff: two steps are both named "${node.name}"; names must be unique`);
512
+ seen.add(node.name);
513
+ }
514
+ for (const node of nodes) {
515
+ for (const need of node.needs ?? []) {
516
+ if (!seen.has(need)) {
517
+ throw new Error(`signoff: step "${node.name}" needs "${need}", which is not a step in this config`);
518
+ }
519
+ }
520
+ }
521
+ const byName = new Map(nodes.map((node) => [node.name, node]));
522
+ const state = /* @__PURE__ */ new Map();
523
+ const walk = (name, path) => {
524
+ const status = state.get(name);
525
+ if (status === "done") return;
526
+ if (status === "visiting") {
527
+ const cycle = [...path.slice(path.indexOf(name)), name].join(" -> ");
528
+ throw new Error(`signoff: dependency cycle among steps: ${cycle}`);
529
+ }
530
+ state.set(name, "visiting");
531
+ for (const need of byName.get(name)?.needs ?? []) walk(need, [...path, name]);
532
+ state.set(name, "done");
533
+ };
534
+ for (const node of nodes) walk(node.name, []);
535
+ }
536
+ async function runGraph(options) {
537
+ const { nodes, maxParallel, keepGoing, run, now = () => Date.now() } = options;
538
+ validateGraph(nodes);
539
+ const origin = now();
540
+ const outcomes = /* @__PURE__ */ new Map();
541
+ const pending = new Map(nodes.map((node) => [node.name, node]));
542
+ const running = /* @__PURE__ */ new Map();
543
+ let aborted = false;
544
+ const failedNames = /* @__PURE__ */ new Set();
545
+ const passedNames = /* @__PURE__ */ new Set();
546
+ const blockedBy = (node) => (node.needs ?? []).some((need) => failedNames.has(need));
547
+ const ready = (node) => (node.needs ?? []).every((need) => passedNames.has(need));
548
+ const settle = (name, outcome) => {
549
+ outcomes.set(name, outcome);
550
+ if (outcome.status === "passed") passedNames.add(name);
551
+ else failedNames.add(name);
552
+ };
553
+ const start = (node) => {
554
+ pending.delete(node.name);
555
+ const controller = new AbortController();
556
+ const startedAtMs = now() - origin;
557
+ const promise = run(node, controller.signal).then((result) => {
558
+ const finishedAtMs = now() - origin;
559
+ const cancelled = controller.signal.aborted && !result.ok;
560
+ settle(node.name, {
561
+ name: node.name,
562
+ status: cancelled ? "cancelled" : result.ok ? "passed" : "failed",
563
+ value: result.value,
564
+ startedAtMs,
565
+ finishedAtMs
566
+ });
567
+ running.delete(node.name);
568
+ });
569
+ running.set(node.name, { promise, controller });
570
+ };
571
+ for (; ; ) {
572
+ if (!aborted) {
573
+ for (const node of [...pending.values()]) {
574
+ if (running.size >= maxParallel) break;
575
+ if (blockedBy(node)) {
576
+ pending.delete(node.name);
577
+ settle(node.name, { name: node.name, status: "blocked", value: null, startedAtMs: null, finishedAtMs: null });
578
+ continue;
579
+ }
580
+ if (ready(node)) start(node);
581
+ }
582
+ }
583
+ if (running.size === 0) {
584
+ if (pending.size === 0) break;
585
+ if (aborted) break;
586
+ const progressed = [...pending.values()].some((node) => ready(node) || blockedBy(node));
587
+ if (!progressed) break;
588
+ continue;
589
+ }
590
+ await Promise.race([...running.values()].map((entry) => entry.promise));
591
+ if (!keepGoing && failedNames.size > 0 && !aborted) {
592
+ aborted = true;
593
+ for (const entry of running.values()) entry.controller.abort();
594
+ }
595
+ }
596
+ for (const node of pending.values()) {
597
+ settle(node.name, {
598
+ name: node.name,
599
+ status: blockedBy(node) ? "blocked" : "skipped",
600
+ value: null,
601
+ startedAtMs: null,
602
+ finishedAtMs: null
603
+ });
604
+ }
605
+ return nodes.map((node) => {
606
+ const outcome = outcomes.get(node.name);
607
+ if (!outcome) throw new Error(`signoff: step "${node.name}" produced no outcome \u2014 scheduler bug`);
608
+ return outcome;
609
+ });
610
+ }
611
+
612
+ // src/signoff/phases.ts
613
+ function selectSignoffPhase(loaded, phase = "all") {
614
+ if (phase !== "all" && phase !== "release" && phase !== "suites") {
615
+ throw new Error(`signoff: phase must be all, release or suites, got "${phase}"`);
616
+ }
617
+ if (phase === "all") return loaded;
618
+ const { steps } = loaded.config;
619
+ validateGraph(steps);
620
+ const unclassified = steps.filter((step) => step.phase === void 0);
621
+ if (unclassified.length) {
622
+ throw new Error(`signoff: partial phase ${phase} requires every step to be classified; missing phase: ${unclassified.map((step) => step.name).join(", ")}`);
623
+ }
624
+ const byName = new Map(steps.map((step) => [step.name, step]));
625
+ for (const step of steps) {
626
+ for (const need of step.needs ?? []) {
627
+ if (step.phase === "release" && byName.get(need)?.phase === "suites") {
628
+ throw new Error(`signoff: release step "${step.name}" depends on suites step "${need}"`);
629
+ }
630
+ }
631
+ }
632
+ const requested = steps.filter((step) => step.phase === phase).map((step) => step.name);
633
+ if (!requested.length) throw new Error(`signoff: no steps declared for ${phase} phase`);
634
+ const selected = /* @__PURE__ */ new Set();
635
+ const include = (name) => {
636
+ if (selected.has(name)) return;
637
+ selected.add(name);
638
+ for (const need of byName.get(name)?.needs ?? []) include(need);
639
+ };
640
+ requested.forEach(include);
641
+ const requestedNames = new Set(requested);
642
+ return {
643
+ ...loaded,
644
+ config: { ...loaded.config, steps: steps.filter((step) => selected.has(step.name)) },
645
+ selection: {
646
+ requested,
647
+ prerequisites: steps.filter((step) => selected.has(step.name) && !requestedNames.has(step.name)).map((step) => step.name),
648
+ excluded: steps.filter((step) => !selected.has(step.name)).map((step) => step.name)
649
+ }
650
+ };
651
+ }
652
+
507
653
  // src/signoff/config.ts
508
654
  var SIGNOFF_CONFIG_FILES = ["signoff.config.mjs", "signoff.config.js"];
509
655
  var shuffleSchema = z.object({
@@ -512,6 +658,7 @@ var shuffleSchema = z.object({
512
658
  args: z.array(z.string()).optional()
513
659
  });
514
660
  var stepSchema = z.object({
661
+ phase: z.enum(["release", "suites"]).optional(),
515
662
  name: z.string().min(1),
516
663
  run: z.string().min(1),
517
664
  cwd: z.string().optional(),
@@ -587,6 +734,9 @@ function deriveSignoffConfig(scripts) {
587
734
  return { config: { steps }, used: kept.map((candidate) => candidate.script) };
588
735
  }
589
736
  async function loadSignoffConfig(options) {
737
+ return selectSignoffPhase(await loadDeclaredConfig(options), options.phase);
738
+ }
739
+ async function loadDeclaredConfig(options) {
590
740
  const { repoRoot, configPath } = options;
591
741
  if (configPath !== void 0) {
592
742
  const abs = resolve(repoRoot, configPath);
@@ -615,13 +765,6 @@ async function importConfig(abs) {
615
765
  return parseSignoffConfig(value, abs);
616
766
  }
617
767
 
618
- // src/signoff/run.ts
619
- import { spawnSync as spawnSync5 } from "child_process";
620
- import { randomUUID as randomUUID2 } from "crypto";
621
- import { existsSync as existsSync9 } from "fs";
622
- import { availableParallelism, homedir } from "os";
623
- import { basename as basename4, join as join9, resolve as resolve4 } from "path";
624
-
625
768
  // src/signoff/cache.ts
626
769
  import { randomUUID } from "crypto";
627
770
  import { spawnSync as spawnSync3 } from "child_process";
@@ -905,6 +1048,13 @@ async function pruneSignoffCache(cacheDir, options = {}) {
905
1048
  });
906
1049
  }
907
1050
 
1051
+ // src/signoff/run.ts
1052
+ import { spawnSync as spawnSync5 } from "child_process";
1053
+ import { randomUUID as randomUUID2 } from "crypto";
1054
+ import { existsSync as existsSync9 } from "fs";
1055
+ import { availableParallelism, homedir } from "os";
1056
+ import { basename as basename4, join as join9, resolve as resolve4 } from "path";
1057
+
908
1058
  // src/signoff/node-version.ts
909
1059
  import { existsSync as existsSync6, readFileSync as readFileSync5 } from "fs";
910
1060
  import { join as join6 } from "path";
@@ -1203,111 +1353,6 @@ function runCommand(options) {
1203
1353
  });
1204
1354
  }
1205
1355
 
1206
- // src/signoff/schedule.ts
1207
- function validateGraph(nodes) {
1208
- const seen = /* @__PURE__ */ new Set();
1209
- for (const node of nodes) {
1210
- if (seen.has(node.name)) throw new Error(`signoff: two steps are both named "${node.name}"; names must be unique`);
1211
- seen.add(node.name);
1212
- }
1213
- for (const node of nodes) {
1214
- for (const need of node.needs ?? []) {
1215
- if (!seen.has(need)) {
1216
- throw new Error(`signoff: step "${node.name}" needs "${need}", which is not a step in this config`);
1217
- }
1218
- }
1219
- }
1220
- const byName = new Map(nodes.map((node) => [node.name, node]));
1221
- const state = /* @__PURE__ */ new Map();
1222
- const walk = (name, path) => {
1223
- const status = state.get(name);
1224
- if (status === "done") return;
1225
- if (status === "visiting") {
1226
- const cycle = [...path.slice(path.indexOf(name)), name].join(" -> ");
1227
- throw new Error(`signoff: dependency cycle among steps: ${cycle}`);
1228
- }
1229
- state.set(name, "visiting");
1230
- for (const need of byName.get(name)?.needs ?? []) walk(need, [...path, name]);
1231
- state.set(name, "done");
1232
- };
1233
- for (const node of nodes) walk(node.name, []);
1234
- }
1235
- async function runGraph(options) {
1236
- const { nodes, maxParallel, keepGoing, run, now = () => Date.now() } = options;
1237
- validateGraph(nodes);
1238
- const origin = now();
1239
- const outcomes = /* @__PURE__ */ new Map();
1240
- const pending = new Map(nodes.map((node) => [node.name, node]));
1241
- const running = /* @__PURE__ */ new Map();
1242
- let aborted = false;
1243
- const failedNames = /* @__PURE__ */ new Set();
1244
- const passedNames = /* @__PURE__ */ new Set();
1245
- const blockedBy = (node) => (node.needs ?? []).some((need) => failedNames.has(need));
1246
- const ready = (node) => (node.needs ?? []).every((need) => passedNames.has(need));
1247
- const settle = (name, outcome) => {
1248
- outcomes.set(name, outcome);
1249
- if (outcome.status === "passed") passedNames.add(name);
1250
- else failedNames.add(name);
1251
- };
1252
- const start = (node) => {
1253
- pending.delete(node.name);
1254
- const controller = new AbortController();
1255
- const startedAtMs = now() - origin;
1256
- const promise = run(node, controller.signal).then((result) => {
1257
- const finishedAtMs = now() - origin;
1258
- const cancelled = controller.signal.aborted && !result.ok;
1259
- settle(node.name, {
1260
- name: node.name,
1261
- status: cancelled ? "cancelled" : result.ok ? "passed" : "failed",
1262
- value: result.value,
1263
- startedAtMs,
1264
- finishedAtMs
1265
- });
1266
- running.delete(node.name);
1267
- });
1268
- running.set(node.name, { promise, controller });
1269
- };
1270
- for (; ; ) {
1271
- if (!aborted) {
1272
- for (const node of [...pending.values()]) {
1273
- if (running.size >= maxParallel) break;
1274
- if (blockedBy(node)) {
1275
- pending.delete(node.name);
1276
- settle(node.name, { name: node.name, status: "blocked", value: null, startedAtMs: null, finishedAtMs: null });
1277
- continue;
1278
- }
1279
- if (ready(node)) start(node);
1280
- }
1281
- }
1282
- if (running.size === 0) {
1283
- if (pending.size === 0) break;
1284
- if (aborted) break;
1285
- const progressed = [...pending.values()].some((node) => ready(node) || blockedBy(node));
1286
- if (!progressed) break;
1287
- continue;
1288
- }
1289
- await Promise.race([...running.values()].map((entry) => entry.promise));
1290
- if (!keepGoing && failedNames.size > 0 && !aborted) {
1291
- aborted = true;
1292
- for (const entry of running.values()) entry.controller.abort();
1293
- }
1294
- }
1295
- for (const node of pending.values()) {
1296
- settle(node.name, {
1297
- name: node.name,
1298
- status: blockedBy(node) ? "blocked" : "skipped",
1299
- value: null,
1300
- startedAtMs: null,
1301
- finishedAtMs: null
1302
- });
1303
- }
1304
- return nodes.map((node) => {
1305
- const outcome = outcomes.get(node.name);
1306
- if (!outcome) throw new Error(`signoff: step "${node.name}" produced no outcome \u2014 scheduler bug`);
1307
- return outcome;
1308
- });
1309
- }
1310
-
1311
1356
  // src/signoff/seeds.ts
1312
1357
  import { createHash, randomInt } from "crypto";
1313
1358
  var DEFAULT_SHUFFLE_ARGS = [
@@ -1565,7 +1610,7 @@ async function runSignoff(options = {}) {
1565
1610
  try {
1566
1611
  await prune(cacheDir);
1567
1612
  tree = materializeCleanTree({ repoDir: repoRoot, dest: treePath(), source });
1568
- let loaded = await loadSignoffConfig({ repoRoot: tree.path, configPath: options.configPath });
1613
+ let loaded = await loadSignoffConfig({ repoRoot: tree.path, configPath: options.configPath, phase: options.phase });
1569
1614
  cacheDir = resolve4(options.cacheDir ?? loaded.config.cacheDir ?? DEFAULT_CACHE_DIR);
1570
1615
  if (tree.path !== treePath() || (loaded.config.carryFiles?.length ?? 0) > 0) {
1571
1616
  if (session.cacheDir !== cacheDir) {
@@ -1576,9 +1621,10 @@ async function runSignoff(options = {}) {
1576
1621
  }
1577
1622
  removeCleanTree(tree);
1578
1623
  tree = materializeCleanTree({ repoDir: repoRoot, dest: treePath(), source, carryFiles: loaded.config.carryFiles });
1579
- loaded = await loadSignoffConfig({ repoRoot: tree.path, configPath: options.configPath });
1624
+ loaded = await loadSignoffConfig({ repoRoot: tree.path, configPath: options.configPath, phase: options.phase });
1580
1625
  }
1581
- const { config, origin } = loaded;
1626
+ const { config, origin, selection } = loaded;
1627
+ const checkDefaults = options.phase !== "suites";
1582
1628
  validateGraph(config.steps.map((step) => ({ name: step.name, needs: step.needs })));
1583
1629
  assertShuffleArgsReachTheRunner(config.steps);
1584
1630
  const nodeRequirement = resolveNodeRequirement(tree.path, config.nodeVersion);
@@ -1605,7 +1651,7 @@ async function runSignoff(options = {}) {
1605
1651
  // reporter, wrangler's prompts) must behave that way here too.
1606
1652
  { CI: "true" },
1607
1653
  // A step that reads history (agent-app-rollout-check's base) finds the
1608
- // source checkout here; the clean tree has no .git.
1654
+ // original source checkout here; the detached worktree shares its history.
1609
1655
  { SIGNOFF_SOURCE_REPO: repoRoot, SIGNOFF_TREE: tree.path },
1610
1656
  config.env,
1611
1657
  storeEnvName === null ? void 0 : { [storeEnvName]: store.storeDir }
@@ -1638,9 +1684,10 @@ async function runSignoff(options = {}) {
1638
1684
  wallStart,
1639
1685
  tree,
1640
1686
  origin,
1687
+ selection,
1641
1688
  host,
1642
1689
  install,
1643
- steps: [...config.steps.map((step) => step.name), WORKER_DEFAULTS_STEP, APP_DEFAULTS_STEP].map(
1690
+ steps: [...config.steps.map((step) => step.name), ...checkDefaults ? [WORKER_DEFAULTS_STEP, APP_DEFAULTS_STEP] : []].map(
1644
1691
  (name) => ({
1645
1692
  name,
1646
1693
  status: "skipped",
@@ -1658,7 +1705,7 @@ async function runSignoff(options = {}) {
1658
1705
  });
1659
1706
  }
1660
1707
  assertNodeTypesVersion(tree.path, nodeRequirement);
1661
- const workerDefaults = runWorkerDefaults(tree.path, config.workerConfigs, options);
1708
+ const workerDefaults = checkDefaults ? [runWorkerDefaults(tree.path, config.workerConfigs, options)] : [];
1662
1709
  const treeRoot = tree.path;
1663
1710
  const outcomes = await runGraph({
1664
1711
  nodes: config.steps,
@@ -1686,14 +1733,15 @@ async function runSignoff(options = {}) {
1686
1733
  return { ok: true, value: attempts };
1687
1734
  }
1688
1735
  });
1689
- const appDefaults = runAppDefaults(tree.path, config, options);
1690
- const steps = [...outcomes.map(toStepResult), workerDefaults, appDefaults];
1736
+ const appDefaults = checkDefaults ? [runAppDefaults(tree.path, config, options)] : [];
1737
+ const steps = [...outcomes.map(toStepResult), ...workerDefaults, ...appDefaults];
1691
1738
  return finish({
1692
1739
  ok: steps.every((step) => step.status === "passed"),
1693
1740
  startedAt,
1694
1741
  wallStart,
1695
1742
  tree,
1696
1743
  origin,
1744
+ selection,
1697
1745
  host,
1698
1746
  install,
1699
1747
  steps,
@@ -1782,10 +1830,14 @@ function finish(input) {
1782
1830
  const serialMs = input.install.durationMs + input.steps.reduce((total, step) => total + step.durationMs, 0);
1783
1831
  const flags = [
1784
1832
  `--source ${input.source}`,
1833
+ ...input.options.phase && input.options.phase !== "all" ? [`--phase ${input.options.phase}`] : [],
1834
+ ...input.options.configPath ? [`--config '${input.options.configPath.replace(/'/g, "'\\''")}'`] : [],
1785
1835
  `--seed ${input.seedBase}`,
1786
1836
  ...input.keepGoing ? ["--keep-going"] : []
1787
1837
  ];
1788
1838
  return {
1839
+ phase: input.options.phase ?? "all",
1840
+ ...input.selection ? { selection: input.selection } : {},
1789
1841
  ok: input.ok,
1790
1842
  startedAt: input.startedAt.toISOString(),
1791
1843
  repo: {
@@ -1852,11 +1904,18 @@ function peakConcurrency(steps) {
1852
1904
  }
1853
1905
  function formatSignoffReport(report) {
1854
1906
  const lines = [];
1855
- const verdict = report.ok ? "SIGN-OFF PASSED" : "SIGN-OFF FAILED";
1907
+ const scope = report.phase && report.phase !== "all" ? `${report.phase.toUpperCase()} ` : "";
1908
+ const verdict = `${scope}SIGN-OFF ${report.ok ? "PASSED" : "FAILED"}`;
1856
1909
  lines.push(BAR, `${verdict} \u2014 ${report.repo.branch} @ ${report.repo.head.slice(0, 12)}`, BAR, "");
1857
1910
  lines.push("subject");
1858
1911
  lines.push(` repo ${report.repo.root}`);
1859
1912
  lines.push(` source ${report.repo.source}${report.repo.dirty ? " (working tree carries uncommitted work)" : ""}`);
1913
+ if (scope) {
1914
+ lines.push(` phase ${report.phase} (partial; not full sign-off)`);
1915
+ lines.push(` requested ${report.selection?.requested.join(", ")}`);
1916
+ lines.push(` prerequisites ${report.selection?.prerequisites.join(", ") || "(none)"}`);
1917
+ lines.push(` excluded ${report.selection?.excluded.join(", ") || "(none)"}`);
1918
+ }
1860
1919
  if (report.repo.diffSha256) lines.push(` patch sha256:${report.repo.diffSha256.slice(0, 16)}`);
1861
1920
  if (report.repo.untrackedFiles.length > 0) {
1862
1921
  lines.push(` untracked ${report.repo.untrackedFiles.length} file(s) copied in`);
@@ -1924,7 +1983,8 @@ function formatSignoffReport(report) {
1924
1983
  }
1925
1984
  function formatSignoffLine(report) {
1926
1985
  const passed = report.steps.filter((step) => step.status === "passed").length;
1927
- return `${report.ok ? "signoff PASS" : "signoff FAIL"} ${report.repo.head.slice(0, 12)} \u2014 ${passed}/${report.steps.length} steps, ${ms(report.wallClockMs)} wall (${ms(report.serialMs)} serial), seed ${report.seedBase}, ${report.install.cacheHit ? "warm" : "cold"} store, clean install`;
1986
+ const scope = report.phase && report.phase !== "all" ? `${report.phase.toUpperCase()} ` : "";
1987
+ return `signoff ${scope}${report.ok ? "PASS" : "FAIL"} ${report.repo.head.slice(0, 12)} \u2014 ${passed}/${report.steps.length} steps, ${ms(report.wallClockMs)} wall (${ms(report.serialMs)} serial), seed ${report.seedBase}, ${report.install.cacheHit ? "warm" : "cold"} store, clean install`;
1928
1988
  }
1929
1989
 
1930
1990
  // src/signoff/browser-budget.ts
@@ -2794,6 +2854,7 @@ export {
2794
2854
  formatAppDefaults,
2795
2855
  collectLastExports,
2796
2856
  loadSignoffConfig,
2857
+ pruneSignoffCache,
2797
2858
  runSignoff,
2798
2859
  formatSignoffReport,
2799
2860
  formatSignoffLine,
@@ -2834,4 +2895,4 @@ export {
2834
2895
  formatWorkspaceSurfaceReport,
2835
2896
  runWorkspaceSurfaceCli
2836
2897
  };
2837
- //# sourceMappingURL=chunk-KS4I7KVC.js.map
2898
+ //# sourceMappingURL=chunk-JRTWTADT.js.map