@tangle-network/agent-runtime 0.353.3 → 2.0.1

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 (96) hide show
  1. package/dist/{activation-CFS31SWI.d.ts → activation-BuK2H7qx.d.ts} +2 -2
  2. package/dist/{activation-DTgC0RvI.js → activation-ZQWz04u8.js} +4 -4
  3. package/dist/{activation-DTgC0RvI.js.map → activation-ZQWz04u8.js.map} +1 -1
  4. package/dist/agent.d.ts +1 -1
  5. package/dist/agent.js +4 -3
  6. package/dist/agent.js.map +1 -1
  7. package/dist/{bundle-DeDkJbsr.js → bundle-PDYNXIEf.js} +2 -2
  8. package/dist/{bundle-DeDkJbsr.js.map → bundle-PDYNXIEf.js.map} +1 -1
  9. package/dist/candidate-execution/index.js +4 -4
  10. package/dist/{coordination-manager-D-J0Osf4.js → coordination-manager-BZLp9qpE.js} +8 -363
  11. package/dist/coordination-manager-BZLp9qpE.js.map +1 -0
  12. package/dist/coordination-map-routing-CUvwHAtv.js +362 -0
  13. package/dist/coordination-map-routing-CUvwHAtv.js.map +1 -0
  14. package/dist/{delegate-DfRQSGVk.js → delegate-C-MUU6ML.js} +2 -2
  15. package/dist/{delegate-DfRQSGVk.js.map → delegate-C-MUU6ML.js.map} +1 -1
  16. package/dist/durable-file-CksURHlH.js +1 -0
  17. package/dist/durable-file-DstVeHcj.js +228 -0
  18. package/dist/durable-file-DstVeHcj.js.map +1 -0
  19. package/dist/durable.d.ts +1 -1
  20. package/dist/durable.js +10 -8
  21. package/dist/durable.js.map +1 -1
  22. package/dist/{graph-BtGsqcOF.js → graph-CM-6CV_K.js} +6 -5
  23. package/dist/{graph-BtGsqcOF.js.map → graph-CM-6CV_K.js.map} +1 -1
  24. package/dist/graph-registry-72DlMnUl.js +585 -0
  25. package/dist/graph-registry-72DlMnUl.js.map +1 -0
  26. package/dist/graph-registry-CAX15LO6.js +1 -0
  27. package/dist/{improve-CL-Dsf63.js → improve-BuZ-I8DP.js} +9 -8
  28. package/dist/{improve-CL-Dsf63.js.map → improve-BuZ-I8DP.js.map} +1 -1
  29. package/dist/index.d.ts +3 -3
  30. package/dist/index.js +12 -11
  31. package/dist/index.js.map +1 -1
  32. package/dist/intelligence.d.ts +2 -2
  33. package/dist/intelligence.js +7 -7
  34. package/dist/{journal-store-BJPMUydp.js → journal-store-BpCOCDoO.js} +208 -635
  35. package/dist/journal-store-BpCOCDoO.js.map +1 -0
  36. package/dist/jsonl-file-BBP9Dz9w.js +429 -0
  37. package/dist/jsonl-file-BBP9Dz9w.js.map +1 -0
  38. package/dist/kernel.d.ts +1 -1
  39. package/dist/kernel.js +13 -12
  40. package/dist/{loop-runner-B1Xpgp2w.js → loop-runner-BWD6v1rd.js} +2 -2
  41. package/dist/{loop-runner-B1Xpgp2w.js.map → loop-runner-BWD6v1rd.js.map} +1 -1
  42. package/dist/{loop-runner-D9rcTNf2.d.ts → loop-runner-BpLTU_J4.d.ts} +2 -2
  43. package/dist/loop-runner-bin.d.ts +1 -1
  44. package/dist/loop-runner-bin.js +1 -1
  45. package/dist/mcp/bin.js +3 -3
  46. package/dist/mcp/index.d.ts +1 -1
  47. package/dist/mcp/index.js +5 -5
  48. package/dist/{prepare-XWwsOh8O.js → prepare-Bv6X2Wnx.js} +4 -4
  49. package/dist/{prepare-XWwsOh8O.js.map → prepare-Bv6X2Wnx.js.map} +1 -1
  50. package/dist/{profile-C01SQZKa.js → profile-Dir2A1_2.js} +2 -2
  51. package/dist/{profile-C01SQZKa.js.map → profile-Dir2A1_2.js.map} +1 -1
  52. package/dist/profiles.d.ts +1 -1
  53. package/dist/{provision-supervisor-CzCFHTxe.js → provision-supervisor-BWEeWag1.js} +8 -6
  54. package/dist/{provision-supervisor-CzCFHTxe.js.map → provision-supervisor-BWEeWag1.js.map} +1 -1
  55. package/dist/{run-cancellation-CoJRKvih.js → run-cancellation-Cpm-BIUu.js} +3 -2
  56. package/dist/{run-cancellation-CoJRKvih.js.map → run-cancellation-Cpm-BIUu.js.map} +1 -1
  57. package/dist/{runtime-DmdhgaTH.js → runtime-Cnr3213E.js} +18 -15
  58. package/dist/{runtime-DmdhgaTH.js.map → runtime-Cnr3213E.js.map} +1 -1
  59. package/dist/{sandbox-profile-compat-CXjozdWL.js → sandbox-profile-compat-DRiz9kME.js} +2 -2
  60. package/dist/{sandbox-profile-compat-CXjozdWL.js.map → sandbox-profile-compat-DRiz9kME.js.map} +1 -1
  61. package/dist/{search-executor-Djo4ssci.js → search-executor-__X1VKnU.js} +5 -5
  62. package/dist/{search-executor-Djo4ssci.js.map → search-executor-__X1VKnU.js.map} +1 -1
  63. package/dist/{server-DAanPY7z.js → server-CntFSTpW.js} +4 -4
  64. package/dist/{server-DAanPY7z.js.map → server-CntFSTpW.js.map} +1 -1
  65. package/dist/{structural-rollout-qqsbQW8M.js → structural-rollout-s8W19Mws.js} +5 -5
  66. package/dist/{structural-rollout-qqsbQW8M.js.map → structural-rollout-s8W19Mws.js.map} +1 -1
  67. package/dist/{supervise-DKwnVruI.js → supervise-Cl0F57m9.js} +13 -601
  68. package/dist/supervise-Cl0F57m9.js.map +1 -0
  69. package/dist/{supervision-discovery-CewADdEs.js → supervision-discovery-C3t0Xw-T.js} +5 -158
  70. package/dist/supervision-discovery-C3t0Xw-T.js.map +1 -0
  71. package/dist/{supervisor-C3JhrVVU.js → supervisor-L7u3pQ1j.js} +84 -140
  72. package/dist/supervisor-L7u3pQ1j.js.map +1 -0
  73. package/dist/task-queue-DbpZAp6C.js +49 -0
  74. package/dist/task-queue-DbpZAp6C.js.map +1 -0
  75. package/dist/task-queue.js +1 -49
  76. package/dist/testing.d.ts +1 -1
  77. package/dist/testing.js +13 -13
  78. package/dist/top-web-CkXPPXjI.js +1114 -0
  79. package/dist/top-web-CkXPPXjI.js.map +1 -0
  80. package/dist/tui/bin.js +4 -3
  81. package/dist/tui/bin.js.map +1 -1
  82. package/dist/tui/index.d.ts +22 -2
  83. package/dist/tui/index.js +3 -3
  84. package/dist/{types-DTHxh4X9.d.ts → types-BfnQq-_k.d.ts} +17 -21
  85. package/dist/{util-ebWMWzY0.js → util-BX20UJ9X.js} +2 -2
  86. package/dist/{util-ebWMWzY0.js.map → util-BX20UJ9X.js.map} +1 -1
  87. package/package.json +11 -11
  88. package/skills/agent-graphs/references/authoring.md +1 -0
  89. package/dist/coordination-manager-D-J0Osf4.js.map +0 -1
  90. package/dist/journal-store-BJPMUydp.js.map +0 -1
  91. package/dist/supervise-DKwnVruI.js.map +0 -1
  92. package/dist/supervision-discovery-CewADdEs.js.map +0 -1
  93. package/dist/supervisor-C3JhrVVU.js.map +0 -1
  94. package/dist/task-queue.js.map +0 -1
  95. package/dist/top-snapshot-DcV7VG4m.js +0 -520
  96. package/dist/top-snapshot-DcV7VG4m.js.map +0 -1
@@ -1,9 +1,11 @@
1
- import { $ as traceRootWriter, A as runtimeProviderCode, At as sandboxLeafOutputFromEvents, B as retainedExecutorContext, Bt as createSandboxUsageLedger, D as runtimeFailureCause, Dt as createSandboxToolPartState, E as reportedFailureCause, Et as assertValidSpend, F as executorEvidenceWriter, Ft as extractTransportEventIdentity, Gt as sandboxTerminalUsageField, H as workspaceCaptureWriter, Ht as isSandboxTerminalEvent, I as isProvisioningRefusal, It as parseCanonicalTransportEvent, Jt as parseCodexUsageRecord, L as leafContinuationExecutionId, Lt as assertSandboxServedModel, M as BUDGET_CONTINUATION_TASK, Mt as sandboxProgressEvents, N as DISPATCH_NOT_ADMITTED_CODE, P as RetainedExecutionPendingError, R as prepareRetainedExecutor, Rt as canonicalSandboxUsageMode, St as newUsageTotals, T as sha256, U as UNAVAILABLE_CODES, Ut as notifySandboxEventObserver, V as retainedExecutorSeamKey, W as UNAVAILABLE_STATUSES, Wt as sandboxEventServedBackend, X as unavailableSignalOfFailure, Y as unavailableSignalInText, Yt as recordValue, _ as publishExclusiveDurableFile, a as isNoEntError, at as executorFailure, b as captureRunWriteContext, bt as createBudgetPool, ct as hashJson, d as SpawnEventIndex, dt as causeChain, f as closesCursorSlot, ft as errMessage, g as assertNoSymlinkDescendant, gt as defaultRedactor, ht as errorText, it as contentRef, j as settlementFailureCause, jt as sandboxOutputMarker, k as runtimeFailureRemediationSchema, lt as credentialCommandExit, m as outsideCursorNamespace, mt as errorProperty, n as appendSpawnEvents, nt as shareParsedStrings, ot as executorFailureInfra, p as insideCursorNamespace, pt as errorHttpStatus, q as unavailablePauseMs, r as spawnJournalRecordEvents, rt as contentAddress, st as executorFailureReason, t as FileSpawnJournal, tt as detachedSnapshot, ut as isCredentialRefusal, vt as resolveRedactor, wt as spendFromUsageTotals, x as fenceRunWrite, xt as meterUsageEvent, y as writeAtomicDurableFile, yt as BudgetReconcileFault, zt as createSandboxTurnEventCollector } from "./journal-store-BJPMUydp.js";
2
1
  import { c as RetainedInteractiveAdmissionError, d as RetainedRunDispatchBindingError, f as RuntimeRunStateError, i as ConfigError, l as RetainedInteractiveBindingError, m as ValidationError$1, r as BackendTransportError, t as AgentEvalError$1, u as RetainedRunAdmissionError } from "./errors-AzSuGI23.js";
3
- import { A as ACCEPTED_RESULT_GRACE_MS, B as teardownExecutor, C as withTimeout, E as addResourceSpend, F as armDeadlineTimer, I as boundedChildDeadlineAt, L as checkInIdleMs, O as resourceTelemetry, P as ROOT_DEADLINE_REASON, R as isDeadlineAbortReason, S as unmeteredSpend, T as zeroTokenUsage, V as teardownSurfaces, _ as roundBoxMinutes, a as cloneSpend, b as throwAbort, c as errorMessage, d as isAbortError$1, f as isAsyncIterable, g as randomUuid, h as randomSuffix, i as chargedTokens, j as CHILD_DEADLINE_REASON, k as withBudgetResources, m as promptCacheTokenClasses, n as addSpend, o as cloneTokenUsage, p as mapWithConcurrency, r as addTokenUsage, s as deleteBoxSafe, t as abortError, v as sleep, w as zeroSpend, x as throwIfAborted, y as stringifySafe, z as singleFlightTeardown } from "./util-ebWMWzY0.js";
4
- import { runTaskQueue } from "./task-queue.js";
2
+ import { A as ACCEPTED_RESULT_GRACE_MS, B as teardownExecutor, C as withTimeout, E as addResourceSpend, F as armDeadlineTimer, I as boundedChildDeadlineAt, L as checkInIdleMs, O as resourceTelemetry, P as ROOT_DEADLINE_REASON, R as isDeadlineAbortReason, S as unmeteredSpend, T as zeroTokenUsage, V as teardownSurfaces, _ as roundBoxMinutes, a as cloneSpend, b as throwAbort, c as errorMessage, d as isAbortError$1, f as isAsyncIterable, g as randomUuid, h as randomSuffix, i as chargedTokens, j as CHILD_DEADLINE_REASON, k as withBudgetResources, m as promptCacheTokenClasses, n as addSpend, o as cloneTokenUsage, p as mapWithConcurrency, r as addTokenUsage, s as deleteBoxSafe, t as abortError, v as sleep, w as zeroSpend, x as throwIfAborted, y as stringifySafe, z as singleFlightTeardown } from "./util-BX20UJ9X.js";
3
+ import { t as runTaskQueue } from "./task-queue-DbpZAp6C.js";
4
+ import { $ as newUsageTotals, A as workspaceCaptureWriter, C as executorEvidenceWriter, E as prepareRetainedExecutor, Et as recordValue, F as unavailablePauseMs, G as executorFailureInfra, H as contentAddress, J as credentialCommandExit, K as executorFailureReason, L as unavailableSignalInText, M as UNAVAILABLE_STATUSES, O as retainedExecutorContext, Q as meterUsageEvent, R as unavailableSignalOfFailure, S as RetainedExecutionPendingError, St as sandboxTerminalUsageField, T as leafContinuationExecutionId, Tt as parseCodexUsageRecord, U as contentRef, V as traceRootWriter, W as executorFailure, X as BudgetReconcileFault, Y as isCredentialRefusal, Z as createBudgetPool, _ as runtimeFailureRemediationSchema, _t as createSandboxUsageLedger, a as encodeResultBlob, b as BUDGET_CONTINUATION_TASK, bt as notifySandboxEventObserver, c as insideCursorNamespace, ct as sandboxOutputMarker, ft as extractTransportEventIdentity, gt as createSandboxTurnEventCollector, h as runtimeFailureCause, ht as canonicalSandboxUsageMode, it as createSandboxToolPartState, j as UNAVAILABLE_CODES, k as retainedExecutorSeamKey, l as outsideCursorNamespace, lt as sandboxProgressEvents, m as reportedFailureCause, mt as assertSandboxServedModel, n as appendSpawnEvents, o as SpawnEventIndex, pt as parseCanonicalTransportEvent, q as hashJson, r as spawnJournalRecordEvents, rt as assertValidSpend, s as closesCursorSlot, st as sandboxLeafOutputFromEvents, t as FileSpawnJournal, tt as spendFromUsageTotals, u as FileObserverJournal, v as runtimeProviderCode, w as isProvisioningRefusal, x as DISPATCH_NOT_ADMITTED_CODE, xt as sandboxEventServedBackend, y as settlementFailureCause, yt as isSandboxTerminalEvent } from "./journal-store-BpCOCDoO.js";
5
+ import { _ as errorText, b as resolveRedactor, d as detachedSnapshot, f as shareParsedStrings, g as errorProperty, h as errorHttpStatus, l as sha256, m as errMessage, p as causeChain, v as defaultRedactor } from "./jsonl-file-BBP9Dz9w.js";
5
6
  import { _ as agentHarness, a as concreteProfileModel, c as profileModelExecutionSettings, d as assertRouterAutoDeclaration, f as assertRouterAutoResponse, g as observedModelMatchesDeclared, h as observedModelHasSnapshot, l as profileProviderModel, m as mergeObservedModelIdentity, o as enforceTokenLimits, s as profileBridgeWireModel, t as assertExecutableAgentProfile, u as resolveRouterRetryPolicy } from "./model-policy-C-RGAUW4.js";
6
- import { B as sha256Bytes$1, H as hasControlCharacter, I as deepFreezeCandidate, M as verifyWorkspaceSnapshotArtifacts, U as nativeSystemPrompt, c as verifyAgentCandidateWorkspaceTree, g as verifiedArtifactChunks, o as readAgentCandidateWorkspaceArtifactFiles, s as verifyAgentCandidateWorkspaceArtifacts, t as assertSandboxProfileCompatibility, v as verifyAgentCandidateWorkspaceArchive } from "./sandbox-profile-compat-CXjozdWL.js";
7
+ import { B as sha256Bytes$1, H as hasControlCharacter, I as deepFreezeCandidate, M as verifyWorkspaceSnapshotArtifacts, U as nativeSystemPrompt, c as verifyAgentCandidateWorkspaceTree, g as verifiedArtifactChunks, o as readAgentCandidateWorkspaceArtifactFiles, s as verifyAgentCandidateWorkspaceArtifacts, t as assertSandboxProfileCompatibility, v as verifyAgentCandidateWorkspaceArchive } from "./sandbox-profile-compat-DRiz9kME.js";
8
+ import { a as writeAtomicDurableFile, n as assertNoSymlinkDescendant, r as publishExclusiveDurableFile, s as fenceRunWrite } from "./durable-file-DstVeHcj.js";
7
9
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-CsW2pfFk.js";
8
10
  import * as traceContract from "@tangle-network/agent-trace-contract";
9
11
  import { ATTR, OPERATION_NAME_ATTR, toW3CSpanId, toW3CTraceId } from "@tangle-network/agent-trace-contract";
@@ -1195,13 +1197,8 @@ const CODEX_REPRODUCIBLE_ARGS = [
1195
1197
  const CODEX_PERMISSION_PROFILE = "agent_runtime_reproducible";
1196
1198
  // src/mcp/local-harness-invocation.ts
1197
1199
  /**
1198
- * Default per-harness command + arg shape. `buildArgs` takes ONLY the task prompt and
1199
- * emits the prompt-only invocation (no model, no system prompt) — the safe default shape
1200
- * the in-process executor's `streamPrompt` drives. `modelArgs` maps a resolved model to
1201
- * the harness's selector flag, which each harness spells for itself: codex, kimi-code and
1202
- * opencode take `-m <model>`, claude-code and pi take `--model <model>`. The §1.5
1203
- * profile-aware mapper `harnessInvocation` composes these to thread the full
1204
- * supervisor-authored profile (systemPrompt + model) into argv.
1200
+ * Per-harness prompt invocation and model, effort, permission and input capabilities.
1201
+ * `harnessInvocation` composes these with the authored profile before execution.
1205
1202
  *
1206
1203
  * Every per-harness difference is a FIELD on this row, never a test on the harness name at a
1207
1204
  * call site: adding harness N+1 is one entry here, and a caller asking for a capability the
@@ -1219,6 +1216,7 @@ const HARNESS_INVOCATIONS = {
1219
1216
  codex: {
1220
1217
  command: "codex",
1221
1218
  buildArgs: (taskPrompt) => ["exec", taskPrompt],
1219
+ stdinPromptArgIndex: 1,
1222
1220
  modelArgs: (model) => ["-m", model],
1223
1221
  reasoningArgs: (level) => ["-c", `model_reasoning_effort="${level}"`],
1224
1222
  permissionBypassArgs: () => [
@@ -2102,22 +2100,13 @@ var RollingByteCapture = class {
2102
2100
  }
2103
2101
  };
2104
2102
  /**
2105
- * Spawn a local coding harness CLI as a subprocess + collect its output.
2103
+ * Spawn a local harness, collect output and confirm process-tree cleanup.
2104
+ * The caller owns output parsing and workspace diffs.
2106
2105
  *
2107
- * NOT responsible for parsing the harness's output or extracting a diff —
2108
- * the in-process executor's `streamPrompt` orchestrates `git diff` against
2109
- * the worktree after this resolves. This function is intentionally narrow:
2110
- * spawn, wait, capture, return.
2106
+ * Spawn failures and signals already aborted before launch reject.
2111
2107
  *
2112
- * Fails loud — throws when:
2113
- * - `cwd` doesn't exist (subprocess emits ENOENT; surfaced as Error)
2114
- * - the harness binary is not on PATH (ENOENT)
2115
- * - the caller signal was already aborted before process launch
2116
- *
2117
- * Does NOT throw when:
2118
- * - the subprocess exits non-zero (`result.exitCode` carries the code)
2119
- * - a non-reproducible subprocess is aborted / timed out (`result.aborted` /
2120
- * `result.timedOut` carries the reason even when a TERM-aware child exits zero)
2108
+ * Ordinary nonzero exits and cancellation return the exit code and timeout/abort flags.
2109
+ * A failed prompt delivery rejects after the child is reaped.
2121
2110
  *
2122
2111
  * Reproducible Codex additionally requires a terminal usage event. If cancellation
2123
2112
  * prevents that event, this rejects with `CodexExecutionDiagnosticError` instead of
@@ -2189,11 +2178,16 @@ async function runLocalHarness(options) {
2189
2178
  deniedProbePaths: isolated.deniedProbePaths,
2190
2179
  ...options.signal ? { signal: options.signal } : {}
2191
2180
  }) : void 0;
2181
+ const inputIndex = options.codexReproducible ? void 0 : invocation.stdinPromptArgIndex;
2182
+ const canonicalPrompt = options.invocation ? options.invocation.prompt : taskPrompt;
2183
+ const input = inputIndex !== void 0 && args[0] === invocation.buildArgs("")[0] && args[inputIndex] === canonicalPrompt ? canonicalPrompt : void 0;
2184
+ const stdinPrompt = input?.trim() ? input : void 0;
2185
+ const spawnArgs = stdinPrompt === void 0 ? args : args.map((arg, index) => index === inputIndex ? "-" : arg);
2192
2186
  return await new Promise((resolve, reject) => {
2193
2187
  let child;
2194
2188
  try {
2195
2189
  options.signal?.throwIfAborted();
2196
- child = spawnImpl(command, args, {
2190
+ child = spawnImpl(command, spawnArgs, {
2197
2191
  cwd,
2198
2192
  env,
2199
2193
  stdio: "pipe",
@@ -2203,7 +2197,11 @@ async function runLocalHarness(options) {
2203
2197
  reject(err instanceof Error ? err : new Error(String(err)));
2204
2198
  return;
2205
2199
  }
2206
- child.stdin?.end();
2200
+ let deliveryError;
2201
+ child.stdin?.on("error", (error) => {
2202
+ deliveryError = error;
2203
+ });
2204
+ child.stdin?.end(stdinPrompt?.startsWith("") ? `\uFEFF${stdinPrompt}` : stdinPrompt);
2207
2205
  const stdoutCapture = new RollingByteCapture(maxOutputBytes);
2208
2206
  const stderrCapture = new RollingByteCapture(maxOutputBytes);
2209
2207
  let timedOut = false;
@@ -2275,6 +2273,7 @@ async function runLocalHarness(options) {
2275
2273
  try {
2276
2274
  if (!termination && process.platform !== "win32" && typeof child.pid === "number" && processGroupExists(child.pid)) await terminate();
2277
2275
  if (termination) await termination;
2276
+ if (deliveryError && code === 0 && !timedOut && !aborted) throw deliveryError;
2278
2277
  const durationMs = Date.now() - startedAt;
2279
2278
  const usage = options.codexReproducible ? parseCodexTokenUsage(stdout) : void 0;
2280
2279
  finalize({
@@ -2670,7 +2669,7 @@ function callerEnv(overrides) {
2670
2669
  */
2671
2670
  async function spawnProfiledHarness(args) {
2672
2671
  const invocationProfile = profileWithResourceInstructions(args.profile, args.resourceInstructions);
2673
- const { command, args: invocationArgs } = harnessInvocation(args.harness, invocationProfile, args.taskPrompt, {
2672
+ const invocation = harnessInvocation(args.harness, invocationProfile, args.taskPrompt, {
2674
2673
  dangerouslySkipPermissions: args.dangerouslySkipPermissions,
2675
2674
  ...args.fullAccess ? { fullAccess: true } : {},
2676
2675
  ...args.codexReproducible ? { codexReproducible: true } : {}
@@ -2680,8 +2679,8 @@ async function spawnProfiledHarness(args) {
2680
2679
  cwd: args.workspacePath,
2681
2680
  taskPrompt: args.taskPrompt,
2682
2681
  invocation: {
2683
- command,
2684
- args: [...invocationArgs, ...args.applied.flags.map(publicPlanString)]
2682
+ ...invocation,
2683
+ args: [...invocation.args, ...args.applied.flags.map(publicPlanString)]
2685
2684
  },
2686
2685
  env: {
2687
2686
  ...callerEnv(args.env),
@@ -9798,6 +9797,7 @@ function createInPlaceCliExecutor(options) {
9798
9797
  const attemptId = options.executionAttemptId ?? newExecutionAttemptId(executionId);
9799
9798
  const controller = new AbortController();
9800
9799
  let artifact;
9800
+ let running;
9801
9801
  const profilePlan = worktreeProfileExecutionPlan(profile, harness);
9802
9802
  const profileModel = concreteProfileModel(profile);
9803
9803
  if (!profileModel) throw new ValidationError$1("createInPlaceCliExecutor: exact profile model unexpectedly missing");
@@ -9805,19 +9805,19 @@ function createInPlaceCliExecutor(options) {
9805
9805
  runtime: "cli",
9806
9806
  budgetExempt: true,
9807
9807
  async execute(task, signal) {
9808
- const linked = linkAbort(signal, controller.signal).signal;
9809
9808
  const started = Date.now();
9810
9809
  const taskPrompt = executionTaskPrompt$1(task, options.taskPrompt);
9811
- const result = await runInPlaceHarness({
9810
+ running = runInPlaceHarness({
9812
9811
  workspacePath: options.workspacePath,
9813
9812
  profile,
9814
9813
  harness,
9815
9814
  taskPrompt,
9816
- ...options.harnessTimeoutMs !== void 0 ? { harnessTimeoutMs: options.harnessTimeoutMs } : {},
9817
- ...linked ? { signal: linked } : {},
9815
+ harnessTimeoutMs: options.harnessTimeoutMs !== void 0 ? options.harnessTimeoutMs : void 0,
9816
+ signal: linkAbort(signal, controller.signal).signal,
9818
9817
  ...options.env ? { env: options.env } : {},
9819
9818
  ...options.runHarness ? { runHarness: options.runHarness } : {}
9820
9819
  });
9820
+ const result = await running;
9821
9821
  const spent = {
9822
9822
  iterations: 1,
9823
9823
  tokens: {
@@ -9828,16 +9828,26 @@ function createInPlaceCliExecutor(options) {
9828
9828
  usd: 0,
9829
9829
  ms: Date.now() - started
9830
9830
  };
9831
+ const exit = result.harness;
9832
+ const failed = exit.exitCode !== 0 || exit.timedOut;
9831
9833
  artifact = {
9832
9834
  outRef: contentAddress(result),
9833
9835
  out: result,
9834
- spent
9836
+ spent,
9837
+ ...failed ? { outcome: {
9838
+ success: false,
9839
+ error: `${harness} exited ${exit.exitCode ?? exit.killedBySignal}${exit.timedOut ? " after its timeout" : ""}: ${exit.stderr.trim().slice(-300)}`
9840
+ } } : {}
9835
9841
  };
9836
9842
  return artifact;
9837
9843
  },
9838
- async teardown(_grace) {
9844
+ teardown(_grace) {
9839
9845
  controller.abort();
9840
- return { destroyed: true };
9846
+ return Promise.resolve(running).then(() => ({ destroyed: true })).catch((error) => ({
9847
+ destroyed: false,
9848
+ permanent: true,
9849
+ detail: errMessage(error)
9850
+ }));
9841
9851
  },
9842
9852
  resultArtifact() {
9843
9853
  if (!artifact) throw new ValidationError$1("createInPlaceCliExecutor: resultArtifact() read before execute() resolved");
@@ -12325,6 +12335,7 @@ async function startRetainedRun(options) {
12325
12335
  assertStableText(options.environment.idempotencyKey, "environment idempotency key");
12326
12336
  assertStableText(options.turn.turnId, "turn idempotency key");
12327
12337
  if (typeof options.onAdmission !== "function") throw new Error("startRetainedRun requires an awaited onAdmission durability hook");
12338
+ const onAdmission = journaledAdmissions(options.journalRoot, options.intent?.runId, options.onAdmission);
12328
12339
  const contextTransfer = retainedContextTransfer(options.turn.contextTransfer);
12329
12340
  const transferReceipt = retainedContextTransferReceipt(options, options.provider.name, contextTransfer);
12330
12341
  const { sessionId, executionId } = options.identity ?? options.intent ?? (transferReceipt === void 0 ? void 0 : {
@@ -12346,7 +12357,7 @@ async function startRetainedRun(options) {
12346
12357
  }));
12347
12358
  if (!options.provider.get) throw new Error(`provider "${options.provider.name}" cannot reconstruct an environment by id`);
12348
12359
  const intent = retainedRunIntent(options, identity, contextTransfer);
12349
- if (options.intent === void 0) await admitDurably(options.onAdmission, intent);
12360
+ if (options.intent === void 0) await admitDurably(onAdmission, intent);
12350
12361
  else assertExactRetainedRunIntent(options.intent, intent);
12351
12362
  const providerCapabilities = await assertRetainedCapabilities(options.provider);
12352
12363
  if (transferReceipt !== void 0) assertRetainedContextTransferCapability(providerCapabilities);
@@ -12406,10 +12417,10 @@ async function startRetainedRun(options) {
12406
12417
  contextTransfer,
12407
12418
  expectedRunId: transferReceipt?.runId,
12408
12419
  identity,
12409
- onAdmission: options.onAdmission,
12420
+ onAdmission,
12410
12421
  capabilities,
12411
12422
  now: options.now,
12412
- preserveEnvironment: transferReceipt !== void 0 || options.existingEnvironmentId !== void 0
12423
+ preserveEnvironment: options.preserveEnvironment === true || transferReceipt !== void 0 || options.existingEnvironmentId !== void 0
12413
12424
  });
12414
12425
  }
12415
12426
  /**
@@ -12566,6 +12577,32 @@ async function admitDurably(onAdmission, admission) {
12566
12577
  throw new RetainedRunAdmissionError(stableAdmission, { cause: error });
12567
12578
  }
12568
12579
  }
12580
+ /**
12581
+ * Mirror each admission into `<journalRoot>/<runId>/observer.jsonl`, the observer format
12582
+ * agent-runtime-top reads. The caller's hook stays authoritative; an observer append that
12583
+ * fails never fails the run, matching `FileObserverJournal`'s contract.
12584
+ */
12585
+ function journaledAdmissions(journalRoot, replayRunId, onAdmission) {
12586
+ if (journalRoot === void 0) return onAdmission;
12587
+ let runId = replayRunId;
12588
+ return async (admission) => {
12589
+ await onAdmission(admission);
12590
+ if ("runId" in admission) runId ??= admission.runId;
12591
+ if (runId === void 0) return;
12592
+ await new FileObserverJournal(join(journalRoot, runId, "observer.jsonl"), runId).appendEvent({
12593
+ id: `${runId}:${admission.phase}`,
12594
+ pursuitId: runId,
12595
+ runId,
12596
+ target: "agent.run",
12597
+ phase: "before",
12598
+ timestamp: Date.now(),
12599
+ payload: {
12600
+ status: "running",
12601
+ admission: admission.phase
12602
+ }
12603
+ }).catch(() => void 0);
12604
+ };
12605
+ }
12569
12606
  function isInteractiveAdmission(admission) {
12570
12607
  return admission.phase === "interactive_intent" || admission.phase === "interactive_environment" || admission.phase === "interactive_started";
12571
12608
  }
@@ -14046,6 +14083,7 @@ function retainedDispatchMaterial(args, retention, selectedTurn, signal) {
14046
14083
  ...selectedTurn,
14047
14084
  turnId
14048
14085
  },
14086
+ preserveEnvironment: retention.preserveEnvironment,
14049
14087
  ...priorSession === void 0 ? {} : {
14050
14088
  existingEnvironmentId: priorSession.environmentId,
14051
14089
  identity: {
@@ -14075,36 +14113,11 @@ function assertReplayMaterial(args, material, intent, turn, selectedTurn, turnId
14075
14113
  material.turn = original.turn;
14076
14114
  }
14077
14115
  }
14078
- /** Replay the committed intent, or find the session the environment admission names. */
14079
- async function recoverFromEnvironmentAdmission(args, material, intent, environmentAdmission, onAdmission) {
14080
- const replay = (admission) => recoverRetainedRun({
14081
- provider: args.provider,
14082
- admission,
14083
- replay: material,
14084
- onAdmission
14085
- });
14086
- let recovered = material.existingEnvironmentId !== void 0 && intent?.phase === "intent" ? await replay(intent) : await recoverRetainedRun({
14087
- provider: args.provider,
14088
- environmentId: environmentAdmission.environmentId,
14089
- sessionId: environmentAdmission.sessionId,
14090
- executionId: environmentAdmission.executionId
14091
- });
14092
- if (recovered.outcome === "unverifiable" && intent?.phase === "intent") recovered = await replay(intent);
14093
- if (recovered.outcome !== "recovered") throw new Error(`retained provider execution is ${recovered.outcome}`);
14094
- await onAdmission({
14095
- phase: "dispatched",
14096
- controlRef: recovered.handle.controlRef,
14097
- idempotencyKey: environmentAdmission.idempotencyKey,
14098
- turnId: environmentAdmission.turnId
14099
- });
14100
- return recovered.handle;
14101
- }
14102
14116
  /** Reconnect, recover or start the retained run, whichever the journal's admissions call for. */
14103
14117
  async function acquireRetainedHandle(args, retention, material, onAdmission, turnInputs) {
14104
14118
  const admissions = retention.admissions;
14105
14119
  const dispatched = [...admissions].reverse().find((admission) => admission.phase === "dispatched");
14106
14120
  const intent = admissions.find((admission) => admission.phase === "intent");
14107
- const environmentAdmission = admissions.find((admission) => admission.phase === "environment");
14108
14121
  if (args.recovering && admissions.length > 0) {
14109
14122
  if (!intent) throw new Error("retained provider execution has no original intent");
14110
14123
  assertReplayMaterial(args, material, intent, turnInputs.turn, turnInputs.selectedTurn, turnInputs.turnId);
@@ -14117,7 +14130,6 @@ async function acquireRetainedHandle(args, retention, material, onAdmission, tur
14117
14130
  if (!reconnected) throw new Error("retained provider environment is unavailable");
14118
14131
  return reconnected;
14119
14132
  }
14120
- if (args.recovering && environmentAdmission?.phase === "environment") return recoverFromEnvironmentAdmission(args, material, intent, environmentAdmission, onAdmission);
14121
14133
  if (args.recovering && intent?.phase === "intent") {
14122
14134
  const recovered = await recoverRetainedRun({
14123
14135
  provider: args.provider,
@@ -20376,75 +20388,6 @@ function createExecutorRegistry() {
20376
20388
  }
20377
20389
  };
20378
20390
  }
20379
- // src/durable/spawn-journal/result-blob-store.ts
20380
- /**
20381
- * FS `ResultBlobStore`. One JSON file per artifact under `dir`, named by a
20382
- * filesystem-safe encoding of the `outRef` (`sha256:<hex>` → `sha256-<hex>.json`).
20383
- * `put` fsyncs so a crash between writes never loses an acknowledged blob.
20384
- *
20385
- * @stable
20386
- */
20387
- var FileResultBlobStore = class {
20388
- dir;
20389
- writeContext = captureRunWriteContext();
20390
- constructor(dir) {
20391
- this.dir = dir;
20392
- }
20393
- async put(outRef, artifact) {
20394
- return this.writeContext(async () => {
20395
- const { text } = encodeResultBlob(outRef, artifact);
20396
- const filePath = this.blobPath(outRef);
20397
- assertNoSymlinkDescendant(this.dir, filePath, "result blob");
20398
- await (await import("node:fs/promises")).mkdir(this.dir, { recursive: true });
20399
- assertNoSymlinkDescendant(this.dir, filePath, "result blob");
20400
- if (!publishExclusiveDurableFile(filePath, text, { mode: 384 })) assertContentAddress(outRef, await this.get(outRef));
20401
- });
20402
- }
20403
- async get(outRef) {
20404
- const filePath = this.blobPath(outRef);
20405
- assertNoSymlinkDescendant(this.dir, filePath, "result blob");
20406
- const fs = await import("node:fs/promises");
20407
- const { constants } = await import("node:fs");
20408
- let text;
20409
- try {
20410
- const handle = await fs.open(filePath, constants.O_RDONLY | constants.O_NOFOLLOW);
20411
- try {
20412
- if (!(await handle.stat()).isFile()) throw new Error("result blob must be a regular file");
20413
- text = await handle.readFile("utf8");
20414
- } finally {
20415
- await handle.close();
20416
- }
20417
- } catch (err) {
20418
- if (isNoEntError(err)) return void 0;
20419
- throw err;
20420
- }
20421
- const artifact = JSON.parse(text);
20422
- assertContentAddress(outRef, artifact);
20423
- return artifact;
20424
- }
20425
- blobPath(outRef) {
20426
- if (!/^sha256:[0-9a-f]{64}$/.test(outRef)) throw new Error("invalid result blob content address");
20427
- return `${this.dir}/${outRef.replace(/:/g, "-")}.json`;
20428
- }
20429
- };
20430
- /** @internal shared with the SQL-backed store. */
20431
- function encodeResultBlob(outRef, artifact) {
20432
- const detached = detachedSnapshot(artifact, "result blob");
20433
- assertContentAddress(outRef, detached);
20434
- const text = JSON.stringify(detached);
20435
- if (text === void 0) throw new Error("result blob must contain JSON");
20436
- const snapshot = JSON.parse(text);
20437
- assertContentAddress(outRef, snapshot);
20438
- return {
20439
- snapshot,
20440
- text
20441
- };
20442
- }
20443
- /** @internal shared with the SQL-backed store. */
20444
- function assertContentAddress(outRef, artifact) {
20445
- const expected = contentAddress(artifact);
20446
- if (outRef !== expected) throw new Error(`blob outRef '${outRef}' does not match the artifact content hash '${expected}'; a content-addressed store refuses a mismatched ref (breaks the replay invariant)`);
20447
- }
20448
20391
  // src/durable/in-memory-spawn-stores.ts
20449
20392
  /** In-process decision and payload retention; no acknowledged state survives process exit. */
20450
20393
  /**
@@ -24628,6 +24571,7 @@ async function startRetainedInteractiveRun(options) {
24628
24571
  assertStableText(startOptions.environment.idempotencyKey, "environment idempotency key");
24629
24572
  assertStableText(startOptions.interactiveIdempotencyKey, "interactive idempotency key");
24630
24573
  if (typeof startOptions.onAdmission !== "function") throw new Error("startRetainedInteractiveRun requires an awaited onAdmission durability hook");
24574
+ const onAdmission = journaledAdmissions(startOptions.journalRoot, startOptions.intent?.runId, startOptions.onAdmission);
24631
24575
  if (!startOptions.provider.get) throw new Error(`provider "${startOptions.provider.name}" cannot reconstruct an environment by id`);
24632
24576
  const profile = agentProfileSchema.parse(startOptions.environment.profile);
24633
24577
  if (profile.harness === void 0) throw new Error("retained interactive runs require AgentProfile.harness");
@@ -24639,7 +24583,7 @@ async function startRetainedInteractiveRun(options) {
24639
24583
  assertStableText(identity.sessionId, "retained session id");
24640
24584
  assertStableText(identity.executionId, "retained execution id");
24641
24585
  const intent = interactiveIntent(startOptions, profile, identity);
24642
- if (startOptions.intent === void 0) await admitDurably(startOptions.onAdmission, intent);
24586
+ if (startOptions.intent === void 0) await admitDurably(onAdmission, intent);
24643
24587
  else assertExactInteractiveIntent(startOptions.intent, intent, () => interactiveIntent(startOptions, profile, identity, legacyRetainedCreateMaterial));
24644
24588
  const providerCapabilities = AgentEnvironmentCapabilitiesSchema.parse(await awaitAbortable$1(Promise.resolve().then(() => startOptions.provider.capabilities()), startOptions.signal));
24645
24589
  assertInteractiveCapabilities(startOptions.provider.name, providerCapabilities);
@@ -24660,7 +24604,7 @@ async function startRetainedInteractiveRun(options) {
24660
24604
  throw error;
24661
24605
  }
24662
24606
  const request = interactiveRequest(startOptions, environment, profile, requestedProfileDigest, identity);
24663
- await admitDurably(startOptions.onAdmission, {
24607
+ await admitDurably(onAdmission, {
24664
24608
  phase: "interactive_environment",
24665
24609
  provider: startOptions.provider.name,
24666
24610
  environmentId: environment.id,
@@ -24669,7 +24613,7 @@ async function startRetainedInteractiveRun(options) {
24669
24613
  request
24670
24614
  });
24671
24615
  const ref = exactStartedRef(request, await startInteractiveProcess(environment, () => environment.startInteractive(request, { signal: startOptions.signal }), startOptions.signal));
24672
- await admitDurably(startOptions.onAdmission, {
24616
+ await admitDurably(onAdmission, {
24673
24617
  phase: "interactive_started",
24674
24618
  idempotencyKey: startOptions.environment.idempotencyKey,
24675
24619
  interactiveIdempotencyKey: startOptions.interactiveIdempotencyKey,
@@ -29652,6 +29596,6 @@ async function noWinner(settled, rejection) {
29652
29596
  reason: "no-result-selected"
29653
29597
  };
29654
29598
  }
29655
- export { abandonScopeRetainedOwnerInvocation as $, CheckUnavailableError as $n, newExecutionAttemptId as $r, harnessTranscriptArtifact as $t, noteScopeOwnerPlannedExecution as A, createPeerMailbox as An, harnessInvocation as Ar, acquireSandbox as At, deriveNodeExecutionIdentity as B, DriverAttemptsExhaustedError as Bn, renderUnsupported as Br, createAgentEnvironmentProviderRegistry as Bt, interactiveAdmissionSeamKey as C, INBOX_RECEIPT_KEY as Cn, signalAbortError as Cr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as Ct, recoverRetainedInteractiveRun as D, DEFAULT_PEER_MAIL_LIMITS as Dn, runSettledCommand as Dr, readPromptOptions as Dt, reconnectRetainedInteractiveRun as E, AUTHORITY_MARKERS as En, defaultRunCommand as Er, assertBoxlessPromptOptions as Et, coordinationProfileToolPrefix as F, DEFAULT_STALL_AFTER_MS as Fn, defineProfileMaterializationContract as Fr, createCodeModeTools as Ft, meterRuntimeOwnedProviderAttempt as G, summarizeDriverAttempts as Gn, attestRuntimeOwnedPendingExecutor as Gr, reconnectRetainedRun as Gt, queueOf as H, abandonablePending as Hn, sandboxProfileMaterialization as Hr, providerAsExecutor as Ht, providerVisibleProfile as I, createActivityLog as In, fullProfileMaterialization as Ir, runCodeMode as It, recordScopeOwnerPause as J, SeatChain as Jn, authoredProfileDigest as Jr, startRetainedRunInEnvironment as Jt, recordScopeOwnerBarrenPause as K, undispatchedCredentialExit as Kn, attestRuntimeOwnedScopeOwner as Kr, recoverRetainedRun as Kt, runtimeGraphMetadataKey as L, readWorkerProgress as Ln, profileMaterializationAxes$1 as Lr, toolResultText as Lt, restoreScopeOwnerAcceptedExecution as M, peerMailTools as Mn, assertProfileMaterialization as Mr, defaultSelectWinner as Mt, scopeOwnerExecutorNodeContext as N, peerMailVerbNames as Nn, assertProfileMaterializes as Nr, codeModeArguments as Nt, startRetainedInteractiveRun as O, PEER_MAIL_WIRE_KEY as On, runWorktreeHarness as Or, createSandboxForSpec as Ot, coordinationMcpAlias as P, taskToPrompt$1 as Pn, controlProfileMaterialization as Pr, codeModeModelOutput as Pt, resolveSpawnResourcePaths as Q, subscriptionUsageLimitSignal as Qn, knownMaterializationReceipt as Qr, captureHarnessTranscript as Qt, settledToIteration as R, isLiveNodeStatus as Rn, promptControlProfileMaterialization as Rr, createRouterTranscript as Rt, workerTraceAnalysisStore as S, sanitizeRuntimeStreamEvent as Sn, runAbortable as Sr, snapshotExecutorConfig as St, readWorkerInteractiveBinding as T, failPendingAfter as Tn, bridgeStopSignalKey as Tr, runAgentRounds as Tt, rollingDispatch as U, causedByPartialFailure as Un, unsupportedProfileDimensions as Ur, LEAF_CONTINUATION_TASK as Ut, freeSlots as V, HarnessTurnFailedError as Vn, sandboxActProfileMaterialization as Vr, resolveAgentEnvironmentProvider as Vt, meterRuntimeOwnedAccounting as W, classifyDriverFailure as Wn, worktreeCliProfileMaterialization as Wr, providerAsSandboxClient as Wt, scopeRetainedOwnerResourceReader as X, authoredSeatStages as Xn, inheritRuntimeOwnedExecutorAttestation as Xr, destroyInteractiveEnvironment as Xt, prepareScopeRetainedOwnerSeatSwitch as Y, SeatChainExhaustedError as Yn, finalizeRuntimeOwnedPendingExecutor as Yr, retainedCreateMaterial as Yt, environmentReader as Z, seatExecutionProfile as Zn, knownExecutionBindingReceipt as Zr, environmentGone as Zt, withDriverExecutor as _, awaitAbortable$1 as _i, generateSpanId as _n, harnessUsageIsEmpty as _r, FileResultBlobStore as _t, assertRunParking as a, runtimeOwnedExecutorProviderEvidence as ai, openSlotGroup as an, admitContinuationPolicy as ar, scopeRetainedOwnerTurnEnded as at, isTraceAnalysisStore as b, providerMessageText as bi, createRuntimeStreamEventCollector as bn, RunCancellationReason as br, captureReusableExecutorConfig as bt, sleepScopeWait as c, unknownExecutionBindingReceipt as ci, WORKER_TRACE_PROPAGATION as cn, createContinuationKeeper as cr, noteScopeRetainedOwnerCoordination as ct, runFinalizer as d, executableAgentSpecSnapshot as di, buildLoopOtelSpans as dn, bridgeAdmissionRefusal as dr, scopeRetainedOwnerContext as dt, providerAttemptEvidence as ei, persistHarnessTranscript as en, gateFactoryOnDeliverable as er, consumeScopeRetainedOwnerResult as et, runTree as f, isRuntimeFlowBrain as fi, buildLoopSpanNodes as fn, bridgeModelRouteRefusal as fr, scopeRetainedOwnerJournalRoot as ft, isDriverSpec as g, readSandboxOutcome as gi, flatOtelSpan as gn, createCodexRolloutStoreReader as gr, InMemorySpawnJournal as gt, driverExecutorFactory as h, projectSandboxOutcome as hi, createOtelExporter as hn, addHarnessUsage as hr, InMemoryResultBlobStore as ht, RunParkedError as i, runtimeOwnedExecutorMaterialization as ii, createWorkerSlots as in, CONTINUATIONS_DIR as ir, beginScopeRetainedOwnerDrive as it, recordScopeOwnerMaterialization as j, isPeerMailEnvelope as jn, terminateProcessTreeAndConfirm as jr, TERMINAL_DECISIONS as jt, beginScopeOwnerAttempt as k, claimsAuthority as kn, LOCAL_HARNESSES as kr, createSandboxLineage as kt, withRunParking as l, unknownMaterializationReceipt as li, createPropagatingTraceEmitter as ln, failedItems as lr, bindScopeRetainedOwnerEnvironmentId as lt, driverChild as m, runtimeFlowBrain as mi, createOpenInferenceFileExporter as mn, ROUTER_PRICE_SOURCE as mr, materializeTreeView as mt, createSupervisor as n, runtimeOwnedDriveHarnessProviderEvidence as ni, resolveHarnessTranscriptCapture as nn, mapExecutorResult as nr, scopeRetainedOwnerPriorSpend as nt, bindScopeParkingDrain as o, runtimeOwnedPendingExecutorMaterialization as oi, createWorktreeCliExecutor as on, bestComposite as or, reconcileScopeRetainedOwnerEnvironment as ot, createRootHandle as p, runtimeFlowAgent as pi, buildRuntimeEventOtelSpans as pn, priceTokens as pr, loadSpawnForest as pt, recordScopeOwnerDriverAttempt as q, upstreamUnavailableSignal as qn, authoredAgentIdentity as qr, startRetainedRun as qt, assertResumeLimits as r, runtimeOwnedExecutorExecutionBinding as ri, retainHarnessTranscript as rn, verdictFromJudgeScore as rr, scopeRetainedOwnerResult as rt, readRunParking as s, runtimeOwnedScopeOwnerRuntime as si, createInPlaceCliExecutor as sn, checkVerdictOf as sr, scopeRetainedOwnerRestorePoint as st, DEFAULT_MAX_DEPTH as t, recordRuntimeOwnedDriveHarnessProviderEvidence as ti, readHarnessTranscript as tn, gateOnDeliverable as tr, prepareScopeRetainedOwnerTask as tt, bestDelivered as u, executableAgentProfileSnapshot as ui, readTraceContextFromEnv as un, isFiniteNumber as ur, bindScopeRetainedOwnerProvider as ut, createScope as v, promptFromAgentTurnInput as vi, loopEventToOtelSpan as vn, readCodexRolloutSession as vr, createExecutorRegistry as vt, attachWorker as w, createInbox as wn, bridgeRuntimeAttachmentsKey as wr, createSteerableSandboxSession as wt, parseWorkerToolTraceArtifact as x, sanitizeKnowledgeReadinessReport as xn, linkAbort as xr, createExecutor as xt, replaySpawnTree as y, promptOptionsFromAgentTurnInput as yi, createRuntimeEventCollector as yn, createPushTraceSource as yr, bindReusableExecutorExecutionId as yt, assertRecursiveReservationPolicy as z, isTerminalNodeStatus as zn, promptModelProfileMaterialization as zr, routerBrain as zt };
29599
+ export { abandonScopeRetainedOwnerInvocation as $, gateFactoryOnDeliverable as $n, providerAttemptEvidence as $r, persistHarnessTranscript as $t, noteScopeOwnerPlannedExecution as A, isPeerMailEnvelope as An, terminateProcessTreeAndConfirm as Ar, TERMINAL_DECISIONS as At, deriveNodeExecutionIdentity as B, HarnessTurnFailedError as Bn, sandboxActProfileMaterialization as Br, resolveAgentEnvironmentProvider as Bt, interactiveAdmissionSeamKey as C, createInbox as Cn, bridgeRuntimeAttachmentsKey as Cr, createSteerableSandboxSession as Ct, recoverRetainedInteractiveRun as D, PEER_MAIL_WIRE_KEY as Dn, runWorktreeHarness as Dr, createSandboxForSpec as Dt, reconnectRetainedInteractiveRun as E, DEFAULT_PEER_MAIL_LIMITS as En, runSettledCommand as Er, readPromptOptions as Et, coordinationProfileToolPrefix as F, createActivityLog as Fn, fullProfileMaterialization as Fr, runCodeMode as Ft, meterRuntimeOwnedProviderAttempt as G, undispatchedCredentialExit as Gn, attestRuntimeOwnedScopeOwner as Gr, recoverRetainedRun as Gt, queueOf as H, causedByPartialFailure as Hn, unsupportedProfileDimensions as Hr, LEAF_CONTINUATION_TASK as Ht, providerVisibleProfile as I, readWorkerProgress as In, profileMaterializationAxes$1 as Ir, toolResultText as It, recordScopeOwnerPause as J, SeatChainExhaustedError as Jn, finalizeRuntimeOwnedPendingExecutor as Jr, retainedCreateMaterial as Jt, recordScopeOwnerBarrenPause as K, upstreamUnavailableSignal as Kn, authoredAgentIdentity as Kr, startRetainedRun as Kt, runtimeGraphMetadataKey as L, isLiveNodeStatus as Ln, promptControlProfileMaterialization as Lr, createRouterTranscript as Lt, restoreScopeOwnerAcceptedExecution as M, peerMailVerbNames as Mn, assertProfileMaterializes as Mr, codeModeArguments as Mt, scopeOwnerExecutorNodeContext as N, taskToPrompt$1 as Nn, controlProfileMaterialization as Nr, codeModeModelOutput as Nt, startRetainedInteractiveRun as O, claimsAuthority as On, LOCAL_HARNESSES as Or, createSandboxLineage as Ot, coordinationMcpAlias as P, DEFAULT_STALL_AFTER_MS as Pn, defineProfileMaterializationContract as Pr, createCodeModeTools as Pt, resolveSpawnResourcePaths as Q, CheckUnavailableError as Qn, newExecutionAttemptId as Qr, harnessTranscriptArtifact as Qt, settledToIteration as R, isTerminalNodeStatus as Rn, promptModelProfileMaterialization as Rr, routerBrain as Rt, workerTraceAnalysisStore as S, INBOX_RECEIPT_KEY as Sn, signalAbortError as Sr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as St, readWorkerInteractiveBinding as T, AUTHORITY_MARKERS as Tn, defaultRunCommand as Tr, assertBoxlessPromptOptions as Tt, rollingDispatch as U, classifyDriverFailure as Un, worktreeCliProfileMaterialization as Ur, providerAsSandboxClient as Ut, freeSlots as V, abandonablePending as Vn, sandboxProfileMaterialization as Vr, providerAsExecutor as Vt, meterRuntimeOwnedAccounting as W, summarizeDriverAttempts as Wn, attestRuntimeOwnedPendingExecutor as Wr, reconnectRetainedRun as Wt, scopeRetainedOwnerResourceReader as X, seatExecutionProfile as Xn, knownExecutionBindingReceipt as Xr, environmentGone as Xt, prepareScopeRetainedOwnerSeatSwitch as Y, authoredSeatStages as Yn, inheritRuntimeOwnedExecutorAttestation as Yr, destroyInteractiveEnvironment as Yt, environmentReader as Z, subscriptionUsageLimitSignal as Zn, knownMaterializationReceipt as Zr, captureHarnessTranscript as Zt, withDriverExecutor as _, promptFromAgentTurnInput as _i, loopEventToOtelSpan as _n, readCodexRolloutSession as _r, createExecutorRegistry as _t, assertRunParking as a, runtimeOwnedPendingExecutorMaterialization as ai, createWorktreeCliExecutor as an, bestComposite as ar, scopeRetainedOwnerTurnEnded as at, isTraceAnalysisStore as b, sanitizeKnowledgeReadinessReport as bn, linkAbort as br, createExecutor as bt, sleepScopeWait as c, unknownMaterializationReceipt as ci, createPropagatingTraceEmitter as cn, failedItems as cr, noteScopeRetainedOwnerCoordination as ct, runFinalizer as d, isRuntimeFlowBrain as di, buildLoopSpanNodes as dn, bridgeModelRouteRefusal as dr, scopeRetainedOwnerContext as dt, recordRuntimeOwnedDriveHarnessProviderEvidence as ei, readHarnessTranscript as en, gateOnDeliverable as er, consumeScopeRetainedOwnerResult as et, runTree as f, runtimeFlowAgent as fi, buildRuntimeEventOtelSpans as fn, priceTokens as fr, scopeRetainedOwnerJournalRoot as ft, isDriverSpec as g, awaitAbortable$1 as gi, generateSpanId as gn, harnessUsageIsEmpty as gr, InMemorySpawnJournal as gt, driverExecutorFactory as h, readSandboxOutcome as hi, flatOtelSpan as hn, createCodexRolloutStoreReader as hr, InMemoryResultBlobStore as ht, RunParkedError as i, runtimeOwnedExecutorProviderEvidence as ii, openSlotGroup as in, admitContinuationPolicy as ir, beginScopeRetainedOwnerDrive as it, recordScopeOwnerMaterialization as j, peerMailTools as jn, assertProfileMaterialization as jr, defaultSelectWinner as jt, beginScopeOwnerAttempt as k, createPeerMailbox as kn, harnessInvocation as kr, acquireSandbox as kt, withRunParking as l, executableAgentProfileSnapshot as li, readTraceContextFromEnv as ln, isFiniteNumber as lr, bindScopeRetainedOwnerEnvironmentId as lt, driverChild as m, projectSandboxOutcome as mi, createOtelExporter as mn, addHarnessUsage as mr, materializeTreeView as mt, createSupervisor as n, runtimeOwnedExecutorExecutionBinding as ni, retainHarnessTranscript as nn, verdictFromJudgeScore as nr, scopeRetainedOwnerPriorSpend as nt, bindScopeParkingDrain as o, runtimeOwnedScopeOwnerRuntime as oi, createInPlaceCliExecutor as on, checkVerdictOf as or, reconcileScopeRetainedOwnerEnvironment as ot, createRootHandle as p, runtimeFlowBrain as pi, createOpenInferenceFileExporter as pn, ROUTER_PRICE_SOURCE as pr, loadSpawnForest as pt, recordScopeOwnerDriverAttempt as q, SeatChain as qn, authoredProfileDigest as qr, startRetainedRunInEnvironment as qt, assertResumeLimits as r, runtimeOwnedExecutorMaterialization as ri, createWorkerSlots as rn, CONTINUATIONS_DIR as rr, scopeRetainedOwnerResult as rt, readRunParking as s, unknownExecutionBindingReceipt as si, WORKER_TRACE_PROPAGATION as sn, createContinuationKeeper as sr, scopeRetainedOwnerRestorePoint as st, DEFAULT_MAX_DEPTH as t, runtimeOwnedDriveHarnessProviderEvidence as ti, resolveHarnessTranscriptCapture as tn, mapExecutorResult as tr, prepareScopeRetainedOwnerTask as tt, bestDelivered as u, executableAgentSpecSnapshot as ui, buildLoopOtelSpans as un, bridgeAdmissionRefusal as ur, bindScopeRetainedOwnerProvider as ut, createScope as v, promptOptionsFromAgentTurnInput as vi, createRuntimeEventCollector as vn, createPushTraceSource as vr, bindReusableExecutorExecutionId as vt, attachWorker as w, failPendingAfter as wn, bridgeStopSignalKey as wr, runAgentRounds as wt, parseWorkerToolTraceArtifact as x, sanitizeRuntimeStreamEvent as xn, runAbortable as xr, snapshotExecutorConfig as xt, replaySpawnTree as y, providerMessageText as yi, createRuntimeStreamEventCollector as yn, RunCancellationReason as yr, captureReusableExecutorConfig as yt, assertRecursiveReservationPolicy as z, DriverAttemptsExhaustedError as zn, renderUnsupported as zr, createAgentEnvironmentProviderRegistry as zt };
29656
29600
 
29657
- //# sourceMappingURL=supervisor-C3JhrVVU.js.map
29601
+ //# sourceMappingURL=supervisor-L7u3pQ1j.js.map