@tangle-network/agent-runtime 0.189.0 → 0.191.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 (104) hide show
  1. package/dist/{activation-DuYIFVQm.js → activation-BpTEBhQR.js} +3 -3
  2. package/dist/{activation-DuYIFVQm.js.map → activation-BpTEBhQR.js.map} +1 -1
  3. package/dist/agent.d.ts +1 -1
  4. package/dist/agent.js +3 -3
  5. package/dist/{authoring-CIE6rF8N.js → authoring-DV0fkyxx.js} +7 -3
  6. package/dist/{authoring-CIE6rF8N.js.map → authoring-DV0fkyxx.js.map} +1 -1
  7. package/dist/candidate-execution/index.d.ts +3 -3
  8. package/dist/candidate-execution/index.js +5 -5
  9. package/dist/{candidate-execution-CQYU8E5a.js → candidate-execution-BSkZErxD.js} +255 -9
  10. package/dist/candidate-execution-BSkZErxD.js.map +1 -0
  11. package/dist/conversation.d.ts +1 -1
  12. package/dist/{coordination-driver-CtbyZv5d.js → coordination-driver-Bw0Prnim.js} +672 -39
  13. package/dist/coordination-driver-Bw0Prnim.js.map +1 -0
  14. package/dist/{durable-file-g3YdfEh4.js → durable-file-D24y9zg7.js} +2 -2
  15. package/dist/{durable-file-g3YdfEh4.js.map → durable-file-D24y9zg7.js.map} +1 -1
  16. package/dist/durable.d.ts +2 -2
  17. package/dist/durable.js +3 -3
  18. package/dist/{environment-provider-C4AQiUxj.d.ts → environment-provider-CJ43FJfJ.d.ts} +2 -2
  19. package/dist/{environment-provider-DZxuH3E4.js → environment-provider-DEwsolvi.js} +44 -7
  20. package/dist/environment-provider-DEwsolvi.js.map +1 -0
  21. package/dist/environment-provider.d.ts +1 -1
  22. package/dist/environment-provider.js +1 -1
  23. package/dist/{graph-DzkWh1BI.js → graph-BzsMtBYp.js} +6 -3
  24. package/dist/graph-BzsMtBYp.js.map +1 -0
  25. package/dist/graph.d.ts +3 -3
  26. package/dist/graph.js +5 -5
  27. package/dist/{redact-C9EWk1FT.d.ts → improve-Cbbt3jE6.d.ts} +4 -36
  28. package/dist/{improvement-cycle-DP9zf-IL.js → improvement-cycle-jC89uaRW.js} +7 -7
  29. package/dist/{improvement-cycle-DP9zf-IL.js.map → improvement-cycle-jC89uaRW.js.map} +1 -1
  30. package/dist/{index-k5bcID4t.d.ts → index-B2rVjcPT.d.ts} +417 -56
  31. package/dist/{index-DCqHTdmp.d.ts → index-CUosKU4N.d.ts} +144 -4
  32. package/dist/{index-DA9jKuJc.d.ts → index-OSRVFARy.d.ts} +2 -2
  33. package/dist/{index-tf6g2B27.d.ts → index-Y14IrBuB.d.ts} +4 -4
  34. package/dist/index.d.ts +11 -10
  35. package/dist/index.js +12 -13
  36. package/dist/index.js.map +1 -1
  37. package/dist/intelligence.d.ts +6 -5
  38. package/dist/intelligence.js +6 -7
  39. package/dist/intelligence.js.map +1 -1
  40. package/dist/kernel.d.ts +6 -6
  41. package/dist/kernel.js +12 -12
  42. package/dist/{knowledge-C5lODZQC.js → knowledge-BuXP5ynd.js} +5 -5
  43. package/dist/{knowledge-C5lODZQC.js.map → knowledge-BuXP5ynd.js.map} +1 -1
  44. package/dist/knowledge.d.ts +1 -1
  45. package/dist/knowledge.js +1 -1
  46. package/dist/{loop-runner-bin-BKsjoaVu.js → loop-runner-bin-B_Xh4jLi.js} +3 -3
  47. package/dist/{loop-runner-bin-BKsjoaVu.js.map → loop-runner-bin-B_Xh4jLi.js.map} +1 -1
  48. package/dist/{loop-runner-bin-ncN_8Msd.d.ts → loop-runner-bin-C2Yw-RBc.d.ts} +3 -3
  49. package/dist/loop-runner-bin.d.ts +1 -1
  50. package/dist/loop-runner-bin.js +1 -1
  51. package/dist/mcp/bin.js +3 -3
  52. package/dist/mcp/index.d.ts +4 -4
  53. package/dist/mcp/index.js +8 -8
  54. package/dist/mcp/memory-bin.js +1 -1
  55. package/dist/{memory-server-DsKOhzGf.js → memory-server-Crkevawz.js} +2 -2
  56. package/dist/{memory-server-DsKOhzGf.js.map → memory-server-Crkevawz.js.map} +1 -1
  57. package/dist/{openai-tools-x83CTnJM.js → openai-tools-Dqg8IhKd.js} +2 -2
  58. package/dist/{openai-tools-x83CTnJM.js.map → openai-tools-Dqg8IhKd.js.map} +1 -1
  59. package/dist/{prepare-BtXhV0qj.js → prepare-B5fJ7mLS.js} +239 -227
  60. package/dist/prepare-B5fJ7mLS.js.map +1 -0
  61. package/dist/primeintellect/index.d.ts +1 -1
  62. package/dist/primeintellect/index.js +1 -1
  63. package/dist/profiles.js +1 -1
  64. package/dist/{protected-model-port-DHrayPt4.js → protected-model-port-B0xFSAjt.js} +2 -2
  65. package/dist/{protected-model-port-DHrayPt4.js.map → protected-model-port-B0xFSAjt.js.map} +1 -1
  66. package/dist/{provision-supervisor-B-_4I1In.js → provision-supervisor-DAcTZDQG.js} +8 -8
  67. package/dist/{provision-supervisor-B-_4I1In.js.map → provision-supervisor-DAcTZDQG.js.map} +1 -1
  68. package/dist/{supervisor-BSNkaM2a.js → redact-BP8Xn2A3.js} +569 -12
  69. package/dist/redact-BP8Xn2A3.js.map +1 -0
  70. package/dist/{run-layout-Cd_l2XWV.js → run-layout-B8I_LXN-.js} +3 -3
  71. package/dist/{run-layout-Cd_l2XWV.js.map → run-layout-B8I_LXN-.js.map} +1 -1
  72. package/dist/{runtime-EQgE3942.d.ts → runtime-DI4mJNXI.d.ts} +202 -4
  73. package/dist/{runtime-C98JsP83.js → runtime-Dm63BrGY.js} +69 -25
  74. package/dist/{runtime-C98JsP83.js.map → runtime-Dm63BrGY.js.map} +1 -1
  75. package/dist/{spawn-journal-CxRa-NJ2.js → spawn-journal-B9eTmVAn.js} +2 -2
  76. package/dist/{spawn-journal-CxRa-NJ2.js.map → spawn-journal-B9eTmVAn.js.map} +1 -1
  77. package/dist/{stream-agent-turn-BomJ21AK.d.ts → stream-agent-turn-_GgUW49y.d.ts} +35 -3
  78. package/dist/{structural-rollout-C8sB6B4q.js → structural-rollout-ChpGSR0q.js} +3 -3
  79. package/dist/{structural-rollout-C8sB6B4q.js.map → structural-rollout-ChpGSR0q.js.map} +1 -1
  80. package/dist/{supervise-DSu4d0b6.js → supervise-B89x7rgF.js} +287 -23
  81. package/dist/supervise-B89x7rgF.js.map +1 -0
  82. package/dist/testing.d.ts +2 -2
  83. package/dist/testing.js +13 -13
  84. package/dist/{top-app-DIBApkt1.js → top-app-KgIFpD9H.js} +3 -3
  85. package/dist/{top-app-DIBApkt1.js.map → top-app-KgIFpD9H.js.map} +1 -1
  86. package/dist/tui/bin.js +1 -1
  87. package/dist/tui/index.d.ts +1 -1
  88. package/dist/tui/index.js +2 -2
  89. package/dist/{types-BbkiJR1D.d.ts → types-DKA_PDv0.d.ts} +62 -2
  90. package/dist/{util-BfoW6RU7.js → util-mCNUeboW.js} +21 -2
  91. package/dist/util-mCNUeboW.js.map +1 -0
  92. package/dist/{workspace-archive-SVeiWLNE.js → workspace-archive-yAPDklLV.js} +4 -4
  93. package/dist/{workspace-archive-SVeiWLNE.js.map → workspace-archive-yAPDklLV.js.map} +1 -1
  94. package/package.json +8 -8
  95. package/dist/candidate-execution-CQYU8E5a.js.map +0 -1
  96. package/dist/coordination-driver-CtbyZv5d.js.map +0 -1
  97. package/dist/environment-provider-DZxuH3E4.js.map +0 -1
  98. package/dist/graph-DzkWh1BI.js.map +0 -1
  99. package/dist/prepare-BtXhV0qj.js.map +0 -1
  100. package/dist/redact-D-u-rrcn.js +0 -82
  101. package/dist/redact-D-u-rrcn.js.map +0 -1
  102. package/dist/supervise-DSu4d0b6.js.map +0 -1
  103. package/dist/supervisor-BSNkaM2a.js.map +0 -1
  104. package/dist/util-BfoW6RU7.js.map +0 -1
@@ -1,20 +1,20 @@
1
1
  import { C as runtimeOwnedScopeOwnerRuntime, S as runtimeOwnedPendingExecutorMaterialization, b as runtimeOwnedExecutorMaterialization, d as providerAttemptEvidence, f as recordRuntimeOwnedDriveHarnessProviderEvidence, i as attestRuntimeOwnedScopeOwner, s as inheritRuntimeOwnedExecutorAttestation, v as runtimeOwnedDriveHarnessProviderEvidence, x as runtimeOwnedExecutorProviderEvidence, y as runtimeOwnedExecutorExecutionBinding } from "./materialization-CekWK6OO.js";
2
2
  import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError, o as NotFoundError, r as BackendTransportError, t as AgentEvalError } from "./errors-CDZ8XsVj.js";
3
3
  import { n as detachedSnapshot } from "./snapshot-CTAf4uuA.js";
4
- import { x as contentAddress } from "./spawn-journal-CxRa-NJ2.js";
5
- import { v as unmeteredSpend } from "./util-BfoW6RU7.js";
4
+ import { x as contentAddress } from "./spawn-journal-B9eTmVAn.js";
5
+ import { v as unmeteredSpend } from "./util-mCNUeboW.js";
6
6
  import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, f as harnessRunsAgent, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile } from "./model-policy-Wf2MxXJ9.js";
7
- import { $ as bridgeModelRouteRefusal, An as controlProfileMaterialization, Fn as promptModelProfileMaterialization, Gt as routerBrain, J as assertValidBudget, K as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Mn as fullProfileMaterialization, Nn as profileMaterializationAxes$1, Pn as promptControlProfileMaterialization, Q as bridgeAdmissionRead, St as createInbox, Un as worktreeCliProfileMaterialization, Vn as unsupportedProfileDimensions, X as spendFromUsageEvents, Z as bindReusableExecutorExecutionId, _ as recordScopeOwnerMaterialization, at as createExecutor, d as driverChild, dn as toOtelAttributes, et as bridgeRuntimeAttachmentsKey, g as meterRuntimeOwnedProviderAttempt, h as meterRuntimeOwnedAccounting, in as createOtelExporter, jn as defineProfileMaterializationContract, kn as assertProfileMaterialization, l as runFinalizer, lt as WORKER_TRACE_PROPAGATION, m as deriveNodeExecutionIdentity, n as createSupervisor, nt as captureReusableExecutorConfig, o as bestDelivered, q as teardownExecutor, sn as generateSpanId, st as snapshotExecutorConfig, t as createRootHandle, tn as buildLoopSpanNodes, tt as bridgeStopSignalKey, u as runTree, v as scopeOwnerExecutorNodeContext, zn as renderUnsupported } from "./supervisor-BSNkaM2a.js";
7
+ import { $ as spendFromUsageEvents, Bn as profileMaterializationAxes$1, Hn as promptModelProfileMaterialization, In as assertProfileMaterialization, Jn as unsupportedProfileDimensions, Jt as routerBrain, Kn as renderUnsupported, Ln as controlProfileMaterialization, Rn as defineProfileMaterializationContract, Tt as createInbox, Vn as promptControlProfileMaterialization, X as teardownExecutor, Xn as worktreeCliProfileMaterialization, Y as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Z as assertValidBudget, _ as deriveNodeExecutionIdentity, a as createSupervisor, at as captureReusableExecutorConfig, b as recordScopeOwnerMaterialization, cn as buildLoopSpanNodes, ct as createExecutor, dn as createOtelExporter, et as bindReusableExecutorExecutionId, f as runFinalizer, ft as WORKER_TRACE_PROPAGATION, i as createRootHandle, it as bridgeStopSignalKey, l as bestDelivered, m as driverChild, mn as generateSpanId, nt as bridgeModelRouteRefusal, p as runTree, rt as bridgeRuntimeAttachmentsKey, tt as bridgeAdmissionRead, ut as snapshotExecutorConfig, v as meterRuntimeOwnedAccounting, vn as toOtelAttributes, x as scopeOwnerExecutorNodeContext, y as meterRuntimeOwnedProviderAttempt, zn as fullProfileMaterialization } from "./redact-BP8Xn2A3.js";
8
8
  import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
9
- import { C as coordinationVerbNames, c as createProgressTracker, d as progressStop, r as driverAgent, v as createFileRunContext, w as createCoordinationTools, y as createInMemoryRunContext } from "./coordination-driver-CtbyZv5d.js";
10
- import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-Cd_l2XWV.js";
9
+ import { E as createCoordinationTools, T as coordinationVerbNames, c as createProgressTracker, d as progressStop, r as driverAgent, v as createFileRunContext, y as createInMemoryRunContext } from "./coordination-driver-Bw0Prnim.js";
10
+ import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-B8I_LXN-.js";
11
11
  import { t as createStdioToolServer } from "./tool-server-DEmLr9YY.js";
12
12
  import { n as UI_LENSES } from "./substrate-B0TYNrXn.js";
13
13
  import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
14
14
  import { randomUUID } from "node:crypto";
15
+ import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
15
16
  import path, { dirname, resolve } from "node:path";
16
17
  import { isMaterializerHarness } from "@tangle-network/agent-profile-materialize";
17
- import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
18
18
  import { createServer } from "node:http";
19
19
  import { Readable, Writable } from "node:stream";
20
20
  //#region src/runtime/supervise/completion-gate.ts
@@ -84,7 +84,7 @@ function gateOnDeliverable(inner, deliverable) {
84
84
  ...inner.metered ? { metered: () => inner.metered?.() } : {},
85
85
  execute(task, signal) {
86
86
  const r = inner.execute(task, signal);
87
- if (isAsyncIterable$1(r)) return (async function* () {
87
+ if (isAsyncIterable$2(r)) return (async function* () {
88
88
  try {
89
89
  for await (const ev of r) yield ev;
90
90
  } finally {
@@ -144,7 +144,7 @@ function mapExecutorResult(inner, map) {
144
144
  ...inner.metered ? { metered: () => inner.metered?.() } : {},
145
145
  execute(task, signal) {
146
146
  const execution = inner.execute(task, signal);
147
- if (isAsyncIterable$1(execution)) return (async function* () {
147
+ if (isAsyncIterable$2(execution)) return (async function* () {
148
148
  for await (const event of execution) yield event;
149
149
  await settle(inner.resultArtifact(), task);
150
150
  })();
@@ -157,7 +157,7 @@ function mapExecutorResult(inner, map) {
157
157
  }
158
158
  });
159
159
  }
160
- function isAsyncIterable$1(v) {
160
+ function isAsyncIterable$2(v) {
161
161
  return v != null && typeof v[Symbol.asyncIterator] === "function";
162
162
  }
163
163
  //#endregion
@@ -440,6 +440,7 @@ function assignSpend(attrs, value) {
440
440
  attrs["tangle.platform.box_minutes_provenance"] = spend.boxMinutesProvenance;
441
441
  attrs["tangle.platform.box_minutes_known"] = spend.boxMinutesKnown === true;
442
442
  }
443
+ if (spend.tokensProvenance !== void 0) attrs["tangle.supervise.tokens_provenance"] = spend.tokensProvenance;
443
444
  return spend;
444
445
  }
445
446
  function assignBudget(attrs, value) {
@@ -2228,7 +2229,11 @@ async function serveCoordinationMcp(opts) {
2228
2229
  ...opts.onEvent ? { onEvent: opts.onEvent } : {},
2229
2230
  ...opts.replaySettlements ? { replaySettlements: true } : {},
2230
2231
  ...opts.questionPolicy ? { questionPolicy: opts.questionPolicy } : {},
2232
+ ...opts.escalateQuestion ? { escalateQuestion: opts.escalateQuestion } : {},
2233
+ ...opts.priorEscalations?.length ? { priorEscalations: opts.priorEscalations } : {},
2231
2234
  ...opts.priorQuestions?.length ? { priorQuestions: opts.priorQuestions } : {},
2235
+ ...opts.priorJournal?.length ? { priorJournal: opts.priorJournal } : {},
2236
+ ...opts.priorAnalystDefinitions?.length ? { priorAnalystDefinitions: opts.priorAnalystDefinitions } : {},
2232
2237
  ...opts.preflightSpawn ? { preflightSpawn: opts.preflightSpawn } : {},
2233
2238
  ...opts.resolveSpawnProfile ? { resolveSpawnProfile: opts.resolveSpawnProfile } : {},
2234
2239
  ...opts.peerMail ? { peerMail: typeof opts.peerMail === "object" && opts.peerMail.limits ? { limits: opts.peerMail.limits } : {} } : {}
@@ -2440,8 +2445,8 @@ function defaultUnmetContractSteer(context) {
2440
2445
  }
2441
2446
  const DEFAULT_MAX_CONSECUTIVE_FAILURES = 3;
2442
2447
  const DEFAULT_MAX_ATTEMPTS = 8;
2443
- const DEFAULT_INITIAL_BACKOFF_MS = 2e3;
2444
- const DEFAULT_MAX_BACKOFF_MS = 3e4;
2448
+ const DEFAULT_INITIAL_BACKOFF_MS$1 = 2e3;
2449
+ const DEFAULT_MAX_BACKOFF_MS$1 = 3e4;
2445
2450
  /**
2446
2451
  * Classify one driver failure. Runtime's own typed refusals are decisions and stay terminal;
2447
2452
  * anything foreign is an accident and is retryable. A `BackendTransportError` is split by status
@@ -2506,7 +2511,7 @@ function describeUnknown(value) {
2506
2511
  return String(value);
2507
2512
  }
2508
2513
  }
2509
- async function defaultSleep(ms, signal) {
2514
+ async function defaultSleep$1(ms, signal) {
2510
2515
  if (ms <= 0 || signal.aborted) return;
2511
2516
  await new Promise((resolve) => {
2512
2517
  const done = () => {
@@ -2529,13 +2534,13 @@ async function defaultSleep(ms, signal) {
2529
2534
  */
2530
2535
  async function runDriverWithRetry(run) {
2531
2536
  const now = run.now ?? Date.now;
2532
- const sleep = run.sleep ?? defaultSleep;
2537
+ const sleep = run.sleep ?? defaultSleep$1;
2533
2538
  const policy = run.policy ?? {};
2534
2539
  const retryEnabled = policy.enabled !== false;
2535
2540
  const maxConsecutive = Math.max(0, policy.maxConsecutiveFailures ?? DEFAULT_MAX_CONSECUTIVE_FAILURES);
2536
2541
  const maxAttempts = Math.max(1, policy.maxAttempts ?? DEFAULT_MAX_ATTEMPTS);
2537
- const initialBackoff = Math.max(0, policy.initialBackoffMs ?? DEFAULT_INITIAL_BACKOFF_MS);
2538
- const maxBackoff = Math.max(initialBackoff, policy.maxBackoffMs ?? DEFAULT_MAX_BACKOFF_MS);
2542
+ const initialBackoff = Math.max(0, policy.initialBackoffMs ?? DEFAULT_INITIAL_BACKOFF_MS$1);
2543
+ const maxBackoff = Math.max(initialBackoff, policy.maxBackoffMs ?? DEFAULT_MAX_BACKOFF_MS$1);
2539
2544
  const maxReprompts = Math.max(0, run.reprompt?.maxReprompts ?? 0);
2540
2545
  const attempts = [];
2541
2546
  let consecutiveBarren = 0;
@@ -2948,7 +2953,9 @@ function createVerbSlot() {
2948
2953
  observeAgent: verb("observe_agent"),
2949
2954
  listQuestions: verb("list_questions"),
2950
2955
  answerQuestion: verb("answer_question"),
2951
- runAnalyst: verb("run_analyst")
2956
+ runAnalyst: verb("run_analyst"),
2957
+ readJournal: verb("read_journal"),
2958
+ defineAnalyst: verb("define_analyst")
2952
2959
  }),
2953
2960
  descriptors() {
2954
2961
  if (bound === void 0) throw new ValidationError("supervisorAgent: coordinationTools() was called before this manager's coordination tools were bound");
@@ -3037,6 +3044,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
3037
3044
  ...deps.executeExtraTool ? { executeExtraTool: deps.executeExtraTool } : {},
3038
3045
  ...deps.analysts ? { analysts: deps.analysts } : {},
3039
3046
  ...deps.analyzeOnSettle ? { analyzeOnSettle: deps.analyzeOnSettle } : {},
3047
+ ...deps.escalateQuestion ? { escalateQuestion: deps.escalateQuestion } : {},
3040
3048
  ...deps.watchWorkers ? { watchWorkers: deps.watchWorkers } : {},
3041
3049
  ...deps.stallAfterMs !== void 0 ? { stallAfterMs: deps.stallAfterMs } : {},
3042
3050
  ...deps.continuityByProfile ? { continuityByProfile: deps.continuityByProfile } : {},
@@ -3117,6 +3125,7 @@ function buildSupervisorAgent(profile, deps, testBrain) {
3117
3125
  ...deps.maxLiveWorkers !== void 0 ? { maxLiveWorkers: deps.maxLiveWorkers } : {},
3118
3126
  ...deps.analysts ? { analysts: deps.analysts } : {},
3119
3127
  ...deps.analyzeOnSettle ? { analyzeOnSettle: deps.analyzeOnSettle } : {},
3128
+ ...deps.escalateQuestion ? { escalateQuestion: deps.escalateQuestion } : {},
3120
3129
  ...deps.watchWorkers ? { watchWorkers: deps.watchWorkers } : {},
3121
3130
  ...deps.stallAfterMs !== void 0 ? { stallAfterMs: deps.stallAfterMs } : {},
3122
3131
  ...deps.continuityByProfile ? { continuityByProfile: deps.continuityByProfile } : {},
@@ -3126,6 +3135,9 @@ function buildSupervisorAgent(profile, deps, testBrain) {
3126
3135
  ...deps.resolveSpawnProfile ? { resolveSpawnProfile: deps.resolveSpawnProfile } : {},
3127
3136
  ...deps.peerMail ? { peerMail: deps.peerMail } : {},
3128
3137
  ...priorCoordination?.questions.length ? { priorQuestions: priorCoordination.questions } : {},
3138
+ ...priorCoordination?.escalations?.length ? { priorEscalations: priorCoordination.escalations } : {},
3139
+ ...priorCoordination?.records.length ? { priorJournal: priorCoordination.records } : {},
3140
+ ...priorCoordination?.analystDefinitions?.length ? { priorAnalystDefinitions: priorCoordination.analystDefinitions } : {},
3129
3141
  ...nodeTools?.length ? { nodeTools } : {},
3130
3142
  onCoordinationTools: (tools) => slot.bind(tools)
3131
3143
  });
@@ -3266,6 +3278,238 @@ function routerBrainFromProfile(profile, router) {
3266
3278
  });
3267
3279
  }
3268
3280
  //#endregion
3281
+ //#region src/runtime/supervise/worker-retry.ts
3282
+ /**
3283
+ * WORKER-SPAWN RETRY — the second chance `driverRetry` gives the root, given to a leaf.
3284
+ *
3285
+ * `driverRetry` guards the root and nothing else. A worker that dies is typed into a `down`
3286
+ * settlement, which is the right shape when the worker RAN. It is the wrong shape when the worker
3287
+ * never started, and one failure produces exactly that:
3288
+ *
3289
+ * bridgeExecutor: bridge stream error: host-executor: acquire timeout after 60000ms
3290
+ * (in_flight=4/4, queued=1)
3291
+ *
3292
+ * Measured 2026-08-22 on discovery-lab cells oscnp s2/s3: two live cells held 2 leads and up to 8
3293
+ * workers on one bridge whose host executor caps live harness children at 4. A worker spawn that
3294
+ * queued past the bridge's single 60 s acquire deadline died there, and the run lost that worker
3295
+ * permanently even though a slot freed seconds later. The bridge retries nothing.
3296
+ *
3297
+ * Retrying execution is dangerous by default, so this seam is FAIL-CLOSED on two independent
3298
+ * proofs that the attempt did no work:
3299
+ *
3300
+ * 1. The error carries a PRE-SPAWN signature — a refusal the backend emits before the harness
3301
+ * child or the box exists ({@link isPreSpawnExecutorFailure}). No provider call started.
3302
+ * 2. The attempt yielded NO execution event. An attempt that streamed anything may have metered
3303
+ * usage, and a blind re-run would double-spend, so it stays fatal whatever its message says.
3304
+ *
3305
+ * Either proof missing means no retry. This is deliberately NARROWER than "is this an
3306
+ * infrastructure hiccup": `ECONNRESET` is a transient transport failure and is NOT retried here,
3307
+ * because it can arrive mid-stream after a metered call.
3308
+ *
3309
+ * Re-entry re-invokes `execute` on the SAME executor object. Nothing is rebuilt, so the executor's
3310
+ * runtime-owned materialization attestation, its bound session id, and its inbox are all the ones
3311
+ * the kernel admitted. For the bridge backend a second `execute` is a fresh session stream over the
3312
+ * same durable execution id, and a saturation refusal happens before that session's child spawned.
3313
+ *
3314
+ * @experimental
3315
+ */
3316
+ /**
3317
+ * The backend refusals that are emitted BEFORE any child process, box, or provider request exists.
3318
+ *
3319
+ * Each is a queue admission deadline: the executor asked for a slot, waited, and was refused
3320
+ * without anything being started. The three names are the pools cli-bridge and the container host
3321
+ * admit through — the host executor, one scoped per-run host executor, and the container pool.
3322
+ *
3323
+ * The pattern is anchored to the whole phrase, including the `after <n>ms` deadline, so a message
3324
+ * that merely mentions a queue does not qualify.
3325
+ */
3326
+ const PRE_SPAWN_SIGNATURES = Object.freeze([/\b(?:host-executor|scoped-host-executor|container-pool): acquire timeout after \d+ms\b/u]);
3327
+ const DEFAULT_MAX_TOTAL_MS = 9e5;
3328
+ const DEFAULT_INITIAL_BACKOFF_MS = 5e3;
3329
+ const DEFAULT_MAX_BACKOFF_MS = 6e4;
3330
+ /**
3331
+ * True when `error` is a backend refusal issued before anything ran.
3332
+ *
3333
+ * This answers "did this fail BEFORE any provider call", which is a strictly narrower question
3334
+ * than "is this an infrastructure hiccup". The broader question admits `ECONNRESET` and a bare
3335
+ * `fetch failed`, both of which can arrive after a metered call, and answering the broad question
3336
+ * where the narrow one is required is what makes a retry double-spend.
3337
+ */
3338
+ function isPreSpawnExecutorFailure(error, additionalSignatures = []) {
3339
+ const message = error instanceof Error ? error.message : String(error);
3340
+ for (const signature of PRE_SPAWN_SIGNATURES) if (signature.test(message)) return true;
3341
+ for (const signature of additionalSignatures) if (signature.test(message)) return true;
3342
+ return false;
3343
+ }
3344
+ /** Read the policy, refusing a number a run cannot act on rather than silently clamping it. */
3345
+ function resolveWorkerSpawnRetry(policy) {
3346
+ if (policy === void 0 || policy.enabled === false) return void 0;
3347
+ const maxTotalMs = policy.maxTotalMs ?? DEFAULT_MAX_TOTAL_MS;
3348
+ const initialBackoffMs = policy.initialBackoffMs ?? DEFAULT_INITIAL_BACKOFF_MS;
3349
+ const maxBackoffMs = policy.maxBackoffMs ?? DEFAULT_MAX_BACKOFF_MS;
3350
+ for (const [name, value] of [
3351
+ ["maxTotalMs", maxTotalMs],
3352
+ ["initialBackoffMs", initialBackoffMs],
3353
+ ["maxBackoffMs", maxBackoffMs]
3354
+ ]) if (!Number.isFinite(value) || value < 0) throw new ValidationError(`workerRetry.${name} must be a nonnegative finite number of milliseconds`);
3355
+ const signatures = policy.additionalPreSpawnSignatures ?? [];
3356
+ for (const signature of signatures) if (!(signature instanceof RegExp)) throw new ValidationError("workerRetry.additionalPreSpawnSignatures must contain RegExp values");
3357
+ return Object.freeze({
3358
+ maxTotalMs,
3359
+ initialBackoffMs,
3360
+ maxBackoffMs: Math.max(initialBackoffMs, maxBackoffMs),
3361
+ signatures: Object.freeze([...signatures])
3362
+ });
3363
+ }
3364
+ /**
3365
+ * Wrap a worker seam so a leaf whose spawn is refused before it runs is re-entered instead of
3366
+ * settling dead.
3367
+ *
3368
+ * The wrapper composes the agent's `executorFactory`, which is where a leaf executor is built with
3369
+ * the real child signal and node context, and it never replaces the executor object the factory
3370
+ * returned: the retry lives in one `execute` wrapper that carries the inner executor's attestation
3371
+ * forward and delegates every other surface to it.
3372
+ */
3373
+ function withWorkerSpawnRetry(make, policy, hooks = {}) {
3374
+ const resolved = resolveWorkerSpawnRetry(policy);
3375
+ if (resolved === void 0) return make;
3376
+ return (profile, spawnContext) => {
3377
+ const agent = make(profile, spawnContext);
3378
+ const spec = agent.executorSpec;
3379
+ if (spec === void 0) return agent;
3380
+ const seamHooks = {
3381
+ ...hooks,
3382
+ ...typeof profile.name === "string" ? { worker: profile.name } : {}
3383
+ };
3384
+ if (spec.executorFactory !== void 0) {
3385
+ const innerFactory = spec.executorFactory;
3386
+ const executorFactory = (builtSpec, ctx) => retryPreSpawnRefusals(innerFactory(builtSpec, ctx), resolved, seamHooks);
3387
+ return {
3388
+ ...agent,
3389
+ executorSpec: {
3390
+ ...spec,
3391
+ executorFactory
3392
+ }
3393
+ };
3394
+ }
3395
+ if (spec.executor !== void 0) {
3396
+ const executor = retryPreSpawnRefusals(spec.executor, resolved, seamHooks);
3397
+ return {
3398
+ ...agent,
3399
+ executorSpec: {
3400
+ ...spec,
3401
+ executor
3402
+ }
3403
+ };
3404
+ }
3405
+ return agent;
3406
+ };
3407
+ }
3408
+ /**
3409
+ * Re-enter `execute` on one executor while a pre-spawn refusal keeps proving nothing ran.
3410
+ *
3411
+ * Exported so an owner of `makeLeafAgent` — which builds its own executors — gets the same seam
3412
+ * without reimplementing the two proofs.
3413
+ */
3414
+ function retryPreSpawnRefusals(inner, policy, hooks = {}) {
3415
+ const now = hooks.now ?? Date.now;
3416
+ const sleep = hooks.sleep ?? defaultSleep;
3417
+ /** The wait before the next attempt, or `null` when this failure stays fatal. */
3418
+ const nextWait = (error, attempt, yielded, startedAt, signal) => {
3419
+ if (yielded) return null;
3420
+ if (signal?.aborted) return null;
3421
+ if (!isPreSpawnExecutorFailure(error, policy.signatures)) return null;
3422
+ const backoff = Math.min(policy.maxBackoffMs, policy.initialBackoffMs * 2 ** (attempt - 1));
3423
+ if (now() - startedAt + backoff >= policy.maxTotalMs) return null;
3424
+ return backoff;
3425
+ };
3426
+ const report = (error, attempt, waitMs) => {
3427
+ hooks.onRetry?.({
3428
+ attempt,
3429
+ waitMs,
3430
+ ...hooks.worker === void 0 ? {} : { worker: hooks.worker },
3431
+ error: error instanceof Error ? error.message : String(error)
3432
+ });
3433
+ };
3434
+ const wrapped = {
3435
+ runtime: inner.runtime,
3436
+ ...inner.budgetExempt !== void 0 ? { budgetExempt: inner.budgetExempt } : {},
3437
+ ...inner.deliver ? { deliver: (message) => inner.deliver?.(message) } : {},
3438
+ ...inner.progress ? { progress: () => inner.progress?.() } : {},
3439
+ ...inner.traceSource ? { traceSource: () => inner.traceSource?.() } : {},
3440
+ ...inner.metered ? { metered: () => inner.metered?.() } : {},
3441
+ ...inner.interactive === void 0 ? {} : { interactive: () => interactiveOf(inner) },
3442
+ execute(task, signal) {
3443
+ const first = inner.execute(task, signal);
3444
+ const restart = () => inner.execute(task, signal);
3445
+ return isAsyncIterable$1(first) ? retryStream(first, restart, signal) : retryOneShot(first, restart, signal);
3446
+ },
3447
+ teardown: (grace) => inner.teardown(grace),
3448
+ resultArtifact: () => inner.resultArtifact()
3449
+ };
3450
+ async function* retryStream(first, restart, signal) {
3451
+ const startedAt = now();
3452
+ let execution = first;
3453
+ for (let attempt = 1;; attempt += 1) {
3454
+ let yielded = false;
3455
+ try {
3456
+ for await (const event of execution) {
3457
+ yielded = true;
3458
+ yield event;
3459
+ }
3460
+ return;
3461
+ } catch (error) {
3462
+ const waitMs = nextWait(error, attempt, yielded, startedAt, signal);
3463
+ if (waitMs === null) throw error;
3464
+ report(error, attempt, waitMs);
3465
+ await sleep(waitMs, signal);
3466
+ const next = restart();
3467
+ if (!isAsyncIterable$1(next)) throw new ValidationError("retryPreSpawnRefusals: executor changed execution shape between attempts");
3468
+ execution = next;
3469
+ }
3470
+ }
3471
+ }
3472
+ async function retryOneShot(first, restart, signal) {
3473
+ const startedAt = now();
3474
+ let execution = first;
3475
+ for (let attempt = 1;; attempt += 1) try {
3476
+ return await execution;
3477
+ } catch (error) {
3478
+ const waitMs = nextWait(error, attempt, false, startedAt, signal);
3479
+ if (waitMs === null) throw error;
3480
+ report(error, attempt, waitMs);
3481
+ await sleep(waitMs, signal);
3482
+ const next = restart();
3483
+ if (isAsyncIterable$1(next)) throw new ValidationError("retryPreSpawnRefusals: executor changed execution shape between attempts");
3484
+ execution = next;
3485
+ }
3486
+ }
3487
+ return inheritRuntimeOwnedExecutorAttestation(inner, wrapped);
3488
+ }
3489
+ /** Forward the inner executor's interactive contract exactly. The method is present only when the
3490
+ * inner executor implements it, so the reachable call always has one to delegate to. */
3491
+ function interactiveOf(inner) {
3492
+ if (inner.interactive === void 0) throw new ValidationError("retryPreSpawnRefusals: inner executor exposes no interactive session");
3493
+ return inner.interactive();
3494
+ }
3495
+ function isAsyncIterable$1(value) {
3496
+ return value !== null && typeof value === "object" && typeof value[Symbol.asyncIterator] === "function";
3497
+ }
3498
+ /** The wait stays REF'd: a worker waiting out a saturated executor is live work, and an unref'd
3499
+ * timer lets the process exit mid-backoff when nothing else is pending. */
3500
+ function defaultSleep(ms, signal) {
3501
+ if (ms <= 0 || signal?.aborted) return Promise.resolve();
3502
+ return new Promise((resolve) => {
3503
+ const done = () => {
3504
+ clearTimeout(timer);
3505
+ signal?.removeEventListener("abort", done);
3506
+ resolve();
3507
+ };
3508
+ const timer = setTimeout(done, ms);
3509
+ signal?.addEventListener("abort", done, { once: true });
3510
+ });
3511
+ }
3512
+ //#endregion
3269
3513
  //#region src/runtime/supervise/supervise.ts
3270
3514
  /**
3271
3515
  * `supervise` — the one-call "just invoke the supervisor". Builds + runs a supervisor from its
@@ -3890,6 +4134,7 @@ const superviseOptionKeySet = /* @__PURE__ */ new Set([
3890
4134
  "journal",
3891
4135
  "makeLeafAgent",
3892
4136
  "makeWorkerAgent",
4137
+ "escalateQuestion",
3893
4138
  "maxDepth",
3894
4139
  "maxLiveWorkers",
3895
4140
  "maxTurns",
@@ -3917,7 +4162,9 @@ const superviseOptionKeySet = /* @__PURE__ */ new Set([
3917
4162
  "stopRule",
3918
4163
  "watchWorkers",
3919
4164
  "repromptOnUnmet",
3920
- "onUnmetContract"
4165
+ "onUnmetContract",
4166
+ "workerRetry",
4167
+ "onWorkerRetry"
3921
4168
  ]);
3922
4169
  /**
3923
4170
  * Refuse a top-level option key `supervise()` reads nowhere, naming it.
@@ -3944,6 +4191,7 @@ Object.freeze([...[
3944
4191
  "authorizeMessage",
3945
4192
  "authorizeSpawn",
3946
4193
  "driveHarness",
4194
+ "escalateQuestion",
3947
4195
  "executeExtraTool",
3948
4196
  "finalizer",
3949
4197
  "isDriverProfile",
@@ -3954,6 +4202,7 @@ Object.freeze([...[
3954
4202
  "onDriverAttempt",
3955
4203
  "onProgressStop",
3956
4204
  "onUnmetContract",
4205
+ "onWorkerRetry",
3957
4206
  "resolveDeliverable",
3958
4207
  "resolveDriveHarness",
3959
4208
  "resolveSpawnProfile",
@@ -3978,7 +4227,7 @@ function assertNoUncapturedExecutableOption(decisionData) {
3978
4227
  * mutable options object can no longer change an in-flight run. */
3979
4228
  function captureSuperviseOptions(opts) {
3980
4229
  assertSuperviseOptionKeys(opts, "supervise");
3981
- const { backend, driverBackend, deliverable, resolveDeliverable, router, compaction, watchWorkers, analysts, makeWorkerAgent, makeLeafAgent, resolveSpawnProfile, blobs, journal, probes, registry, hooks, otel, authorizeSpawn, authorizeMessage, isDriverProfile, driveHarness, resolveDriveHarness, resolveSupervisorTools, onCoordinationEvent, executeExtraTool, stopRule, onProgressStop, onDriverAttempt, onUnmetContract, finalizer, now, signal, rootHandle, ...decisionData } = opts;
4230
+ const { backend, driverBackend, deliverable, resolveDeliverable, router, compaction, watchWorkers, analysts, makeWorkerAgent, makeLeafAgent, resolveSpawnProfile, blobs, journal, probes, registry, hooks, otel, authorizeSpawn, authorizeMessage, isDriverProfile, driveHarness, resolveDriveHarness, resolveSupervisorTools, escalateQuestion, onCoordinationEvent, executeExtraTool, stopRule, onProgressStop, onDriverAttempt, onUnmetContract, workerRetry, onWorkerRetry, finalizer, now, signal, rootHandle, ...decisionData } = opts;
3982
4231
  assertNoUncapturedExecutableOption(decisionData);
3983
4232
  const capturedData = detachedSnapshot(decisionData, "supervise options");
3984
4233
  const capturedBackend = backend === void 0 ? void 0 : snapshotExecutorConfig(backend);
@@ -4004,9 +4253,19 @@ function captureSuperviseOptions(opts) {
4004
4253
  ...detachedSnapshot({ maxFindingsPerWorker: watchWorkers.maxFindingsPerWorker }, "supervise worker-watch configuration"),
4005
4254
  ...watchWorkers.detectors === void 0 ? {} : { detectors: Object.freeze([...watchWorkers.detectors]) }
4006
4255
  });
4256
+ const capturedWorkerRetry = workerRetry === void 0 ? void 0 : Object.freeze({
4257
+ ...detachedSnapshot({
4258
+ ...workerRetry.enabled === void 0 ? {} : { enabled: workerRetry.enabled },
4259
+ ...workerRetry.maxTotalMs === void 0 ? {} : { maxTotalMs: workerRetry.maxTotalMs },
4260
+ ...workerRetry.initialBackoffMs === void 0 ? {} : { initialBackoffMs: workerRetry.initialBackoffMs },
4261
+ ...workerRetry.maxBackoffMs === void 0 ? {} : { maxBackoffMs: workerRetry.maxBackoffMs }
4262
+ }, "supervise worker-retry configuration"),
4263
+ ...workerRetry.additionalPreSpawnSignatures === void 0 ? {} : { additionalPreSpawnSignatures: Object.freeze([...workerRetry.additionalPreSpawnSignatures]) }
4264
+ });
4007
4265
  const capturedAnalysts = analysts === void 0 || typeof analysts === "string" ? analysts : Object.freeze({
4008
4266
  kinds: detachedSnapshot(analysts.kinds, "supervise analyst kinds"),
4009
- run: analysts.run
4267
+ run: analysts.run,
4268
+ ...typeof analysts.register === "function" ? { register: analysts.register } : {}
4010
4269
  });
4011
4270
  return Object.freeze({
4012
4271
  ...capturedData,
@@ -4030,12 +4289,15 @@ function captureSuperviseOptions(opts) {
4030
4289
  ...driveHarness === void 0 ? {} : { driveHarness },
4031
4290
  ...resolveDriveHarness === void 0 ? {} : { resolveDriveHarness },
4032
4291
  ...resolveSupervisorTools === void 0 ? {} : { resolveSupervisorTools },
4292
+ ...escalateQuestion === void 0 ? {} : { escalateQuestion },
4033
4293
  ...onCoordinationEvent === void 0 ? {} : { onCoordinationEvent },
4034
4294
  ...executeExtraTool === void 0 ? {} : { executeExtraTool },
4035
4295
  ...stopRule === void 0 ? {} : { stopRule },
4036
4296
  ...onProgressStop === void 0 ? {} : { onProgressStop },
4037
4297
  ...onDriverAttempt === void 0 ? {} : { onDriverAttempt },
4038
4298
  ...onUnmetContract === void 0 ? {} : { onUnmetContract },
4299
+ ...capturedWorkerRetry === void 0 ? {} : { workerRetry: capturedWorkerRetry },
4300
+ ...onWorkerRetry === void 0 ? {} : { onWorkerRetry },
4039
4301
  ...finalizer === void 0 ? {} : { finalizer },
4040
4302
  ...now === void 0 ? {} : { now },
4041
4303
  ...signal === void 0 ? {} : { signal },
@@ -4208,6 +4470,7 @@ function superviseInternal(profile, task, opts, testBrain) {
4208
4470
  const canonicalTask = freezeDetached(task);
4209
4471
  if (options.makeWorkerAgent && options.authorizeSpawn) throw new ValidationError("supervise: authorizeSpawn cannot be combined with caller-owned makeWorkerAgent; use makeLeafAgent to override leaf execution inside the authorized path, or use backend-derived workers");
4210
4472
  if (options.makeWorkerAgent && options.makeLeafAgent) throw new ValidationError("supervise: makeWorkerAgent replaces the worker path and makeLeafAgent overrides a leaf inside it; pass one");
4473
+ if (options.makeWorkerAgent && (options.workerRetry || options.onWorkerRetry)) throw new ValidationError("supervise: workerRetry applies only to backend-derived workers; compose withWorkerSpawnRetry onto a caller-owned makeWorkerAgent explicitly");
4211
4474
  if (options.makeWorkerAgent && options.resolveDeliverable) throw new ValidationError("supervise: resolveDeliverable applies only to backend-derived workers; wrap a caller-owned makeWorkerAgent with its completion checks explicitly");
4212
4475
  const authorizeDownFor = (parent, depth) => {
4213
4476
  if (!options.authorizeSpawn && !options.authorizeMessage) return void 0;
@@ -4294,7 +4557,8 @@ function superviseInternal(profile, task, opts, testBrain) {
4294
4557
  let makeWorkerAgent = options.makeWorkerAgent;
4295
4558
  if (!makeWorkerAgent) {
4296
4559
  if (!options.backend && !options.makeLeafAgent) throw new ValidationError("supervise: provide opts.backend (where workers run), opts.makeLeafAgent, or opts.makeWorkerAgent");
4297
- const makeLeaf = options.makeLeafAgent ?? workerFromBackend(options.backend, deliverable);
4560
+ const withRetry = (make) => withWorkerSpawnRetry(make, options.workerRetry, { ...options.onWorkerRetry ? { onRetry: options.onWorkerRetry } : {} });
4561
+ const makeLeaf = withRetry(options.makeLeafAgent ?? workerFromBackend(options.backend, deliverable));
4298
4562
  const securityPolicy = options.profileSecurity ?? DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY;
4299
4563
  const makeRecursiveWorkerFor = (parent, parentIdentity, depth, parentOwnerId) => {
4300
4564
  const makeRecursiveWorker = (authoredProfile, spawnContext) => {
@@ -4351,7 +4615,7 @@ function superviseInternal(profile, task, opts, testBrain) {
4351
4615
  const selectedDeliverable = options.resolveDeliverable?.(postAuthorizationContext);
4352
4616
  const leafDeliverable = selectedDeliverable === void 0 ? deliverable : captureDeliverable(selectedDeliverable, `supervise deliverable for ${JSON.stringify(spawnContext.label)}`);
4353
4617
  if (leafDeliverable !== deliverable && !options.backend) throw new ValidationError("supervise: resolveDeliverable selected a per-spawn deliverable but there is no backend to derive that leaf from; makeLeafAgent owns its own completion check");
4354
- return (leafDeliverable === deliverable ? makeLeaf : workerFromBackend(options.backend, leafDeliverable))(authorized, Object.freeze({
4618
+ return (leafDeliverable === deliverable ? makeLeaf : withRetry(workerFromBackend(options.backend, leafDeliverable)))(authorized, Object.freeze({
4355
4619
  ...authorizedContext,
4356
4620
  assignmentId: workerAssignmentNamespace(runNamespace, parentOwnerId, spawnContext.assignmentId)
4357
4621
  }));
@@ -4556,6 +4820,6 @@ function rootProviderModelEvidenceFromExecution(evidence) {
4556
4820
  return evidence ?? rootProviderModelEvidence([]);
4557
4821
  }
4558
4822
  //#endregion
4559
- export { DelegationTaskQueue as $, DELEGATION_HISTORY_DESCRIPTION as A, validateDelegateUiAuditArgs as B, createInProcessTransport as C, DELEGATION_STATUS_TOOL_NAME as D, DELEGATION_STATUS_INPUT_SCHEMA as E, delegationProfiles as F, validateDelegateFeedbackArgs as G, DELEGATE_FEEDBACK_INPUT_SCHEMA as H, DELEGATE_UI_AUDIT_DESCRIPTION as I, DELEGATE_TOOL_NAME as J, DELEGATE_DESCRIPTION as K, DELEGATE_UI_AUDIT_INPUT_SCHEMA as L, DELEGATION_HISTORY_TOOL_NAME as M, createDelegationHistoryHandler as N, createDelegationStatusHandler as O, validateDelegationHistoryArgs as P, delegate as Q, DELEGATE_UI_AUDIT_TOOL_NAME as R, serveCoordinationMcp as S, DELEGATION_STATUS_DESCRIPTION as T, DELEGATE_FEEDBACK_TOOL_NAME as U, DELEGATE_FEEDBACK_DESCRIPTION as V, createDelegateFeedbackHandler as W, validateDelegateArgs as X, createDelegateHandler as Y, defaultDelegateBudget as Z, promptHandle as _, assertCoordinationBinding as a, composeLoopTraceEmitters as at, classifyDriverFailure as b, supervisorAgentWithTestBrain as c, DelegationStateCorruptError as ct, delegatesWorkerBriefPrompt as d, InMemoryFeedbackStore as dt, hashIdempotencyInput as et, dumbContinuationFailPrompt as f, eventToSnapshot as ft, naiveContinuationPrompt as g, kernelPromptRegistry as h, mapExecutorResult as ht, workerFromBackend as i, capDelegationTrace as it, DELEGATION_HISTORY_INPUT_SCHEMA as j, validateDelegationStatusArgs as k, analyzesFindingsReportPrompt as l, FileDelegationStore as lt, formatPromptHandle as m, gateOnDeliverable as mt, supervise as n, DELEGATION_TRACE_MAX_SPANS as nt, resolveSupervisorProfile as o, createDelegationTraceCollector as ot, dumbContinuationPassPrompt as p, createSupervisorSpanRecorder as pt, DELEGATE_INPUT_SCHEMA as q, superviseWithTestBrain as r, buildDelegationTraceSpans as rt, supervisorAgent as s, DelegationPersistenceError as st, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, DELEGATION_TRACE_MAX_BYTES as tt, createPromptRegistry as u, InMemoryDelegationStore as ut, supervisorPolicyPrompt as v, createMcpServer as w, defaultUnmetContractSteer as x, DriverAttemptsExhaustedError as y, createDelegateUiAuditHandler as z };
4823
+ export { createDelegateHandler as $, DELEGATION_STATUS_INPUT_SCHEMA as A, DELEGATE_UI_AUDIT_DESCRIPTION as B, DriverAttemptsExhaustedError as C, createInProcessTransport as D, serveCoordinationMcp as E, DELEGATION_HISTORY_INPUT_SCHEMA as F, DELEGATE_FEEDBACK_DESCRIPTION as G, DELEGATE_UI_AUDIT_TOOL_NAME as H, DELEGATION_HISTORY_TOOL_NAME as I, createDelegateFeedbackHandler as J, DELEGATE_FEEDBACK_INPUT_SCHEMA as K, createDelegationHistoryHandler as L, createDelegationStatusHandler as M, validateDelegationStatusArgs as N, createMcpServer as O, DELEGATION_HISTORY_DESCRIPTION as P, DELEGATE_TOOL_NAME as Q, validateDelegationHistoryArgs as R, supervisorPolicyPrompt as S, defaultUnmetContractSteer as T, createDelegateUiAuditHandler as U, DELEGATE_UI_AUDIT_INPUT_SCHEMA as V, validateDelegateUiAuditArgs as W, DELEGATE_DESCRIPTION as X, validateDelegateFeedbackArgs as Y, DELEGATE_INPUT_SCHEMA as Z, dumbContinuationPassPrompt as _, createSupervisorSpanRecorder as _t, isPreSpawnExecutorFailure as a, DELEGATION_TRACE_MAX_BYTES as at, naiveContinuationPrompt as b, withWorkerSpawnRetry as c, capDelegationTrace as ct, supervisorAgent as d, DelegationPersistenceError as dt, validateDelegateArgs as et, supervisorAgentWithTestBrain as f, DelegationStateCorruptError as ft, dumbContinuationFailPrompt as g, eventToSnapshot as gt, delegatesWorkerBriefPrompt as h, InMemoryFeedbackStore as ht, workerFromBackend as i, hashIdempotencyInput as it, DELEGATION_STATUS_TOOL_NAME as j, DELEGATION_STATUS_DESCRIPTION as k, assertCoordinationBinding as l, composeLoopTraceEmitters as lt, createPromptRegistry as m, InMemoryDelegationStore as mt, supervise as n, delegate as nt, resolveWorkerSpawnRetry as o, DELEGATION_TRACE_MAX_SPANS as ot, analyzesFindingsReportPrompt as p, FileDelegationStore as pt, DELEGATE_FEEDBACK_TOOL_NAME as q, superviseWithTestBrain as r, DelegationTaskQueue as rt, retryPreSpawnRefusals as s, buildDelegationTraceSpans as st, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, defaultDelegateBudget as tt, resolveSupervisorProfile as u, createDelegationTraceCollector as ut, formatPromptHandle as v, gateOnDeliverable as vt, classifyDriverFailure as w, promptHandle as x, kernelPromptRegistry as y, mapExecutorResult as yt, delegationProfiles as z };
4560
4824
 
4561
- //# sourceMappingURL=supervise-DSu4d0b6.js.map
4825
+ //# sourceMappingURL=supervise-B89x7rgF.js.map