@tangle-network/agent-runtime 0.307.2 → 0.308.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 (54) hide show
  1. package/dist/{activation-Bdugb7li.d.ts → activation-5Usfsfzr.d.ts} +3 -3
  2. package/dist/{activation-DNZrAzZM.js → activation-DbnacUhI.js} +2 -2
  3. package/dist/{activation-DNZrAzZM.js.map → activation-DbnacUhI.js.map} +1 -1
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-DCQUXZ54.js → coordination-driver-BYIjecHz.js} +2 -2
  7. package/dist/{coordination-driver-DCQUXZ54.js.map → coordination-driver-BYIjecHz.js.map} +1 -1
  8. package/dist/{delegate-BcMmgX_Y.js → delegate-KCK7WdZv.js} +2 -2
  9. package/dist/{delegate-BcMmgX_Y.js.map → delegate-KCK7WdZv.js.map} +1 -1
  10. package/dist/durable.d.ts +2 -2
  11. package/dist/durable.js +2 -2
  12. package/dist/{graph-D2yO7Epi.js → graph-BUu0KQVW.js} +4 -4
  13. package/dist/{graph-D2yO7Epi.js.map → graph-BUu0KQVW.js.map} +1 -1
  14. package/dist/{improvement-cycle-C6PDngmf.js → improvement-cycle-BylwWCcl.js} +3 -3
  15. package/dist/{improvement-cycle-C6PDngmf.js.map → improvement-cycle-BylwWCcl.js.map} +1 -1
  16. package/dist/{index-1T1fjIUs.d.ts → index-EibbsKsH.d.ts} +4 -4
  17. package/dist/index.d.ts +6 -6
  18. package/dist/index.js +7 -7
  19. package/dist/intelligence.d.ts +3 -3
  20. package/dist/intelligence.js +3 -3
  21. package/dist/kernel.d.ts +3 -3
  22. package/dist/kernel.js +8 -8
  23. package/dist/{loop-runner-bin-Bwxtx1go.js → loop-runner-bin-DcF6ZEWi.js} +3 -3
  24. package/dist/{loop-runner-bin-Bwxtx1go.js.map → loop-runner-bin-DcF6ZEWi.js.map} +1 -1
  25. package/dist/{loop-runner-bin-Be2jWumB.d.ts → loop-runner-bin-jST1hm-z.d.ts} +3 -3
  26. package/dist/loop-runner-bin.d.ts +1 -1
  27. package/dist/loop-runner-bin.js +1 -1
  28. package/dist/mcp/bin.js +3 -3
  29. package/dist/mcp/index.d.ts +5 -5
  30. package/dist/mcp/index.js +4 -4
  31. package/dist/{openai-tools-C-lvIN3-.d.ts → openai-tools-BuFqhp5i.d.ts} +2 -2
  32. package/dist/profiles.d.ts +1 -1
  33. package/dist/{provision-supervisor-De_3kjM3.js → provision-supervisor-Cvp4Nm-y.js} +3 -3
  34. package/dist/{provision-supervisor-De_3kjM3.js.map → provision-supervisor-Cvp4Nm-y.js.map} +1 -1
  35. package/dist/{runtime-B3dR7tdY.js → runtime-Y46Lwt_d.js} +8 -8
  36. package/dist/{runtime-B3dR7tdY.js.map → runtime-Y46Lwt_d.js.map} +1 -1
  37. package/dist/{search-executor-H1IRkoRg.js → search-executor-BPpfxu9c.js} +2 -2
  38. package/dist/{search-executor-H1IRkoRg.js.map → search-executor-BPpfxu9c.js.map} +1 -1
  39. package/dist/{server-DATtZ0Q9.js → server-DIrQYUnn.js} +3 -3
  40. package/dist/{server-DATtZ0Q9.js.map → server-DIrQYUnn.js.map} +1 -1
  41. package/dist/{stream-agent-turn-Ch1g6gYE.d.ts → stream-agent-turn-op3m9IEY.d.ts} +2 -2
  42. package/dist/{substrate-Buuxd_OX.d.ts → substrate-B1VzcyoB.d.ts} +2 -2
  43. package/dist/{supervise-D1qqMFAu.js → supervise-CmeN8ipv.js} +4 -3
  44. package/dist/supervise-CmeN8ipv.js.map +1 -0
  45. package/dist/{supervisor-Dz4XXtK1.js → supervisor-CSMb8HBU.js} +236 -98
  46. package/dist/supervisor-CSMb8HBU.js.map +1 -0
  47. package/dist/testing.d.ts +2 -2
  48. package/dist/testing.js +12 -12
  49. package/dist/tui/index.d.ts +1 -1
  50. package/dist/tui/index.js +1 -1
  51. package/dist/{types-CBcc0_5y.d.ts → types-B2IOlN8R.d.ts} +105 -67
  52. package/package.json +1 -1
  53. package/dist/supervise-D1qqMFAu.js.map +0 -1
  54. package/dist/supervisor-Dz4XXtK1.js.map +0 -1
@@ -9763,7 +9763,7 @@ var SpawnEventIndex = class {
9763
9763
  /** Called only after validation and, for the file writer, a successful durable append. */
9764
9764
  add(event) {
9765
9765
  if (!outsideCursorNamespace(event)) this.cursors.add(event.seq);
9766
- if (event.kind !== "spawned" && event.kind !== "materialized" && event.kind !== "seat-materialized" && event.kind !== "execution-bound" && event.kind !== "execution-input" && event.kind !== "execution-admitted" && event.kind !== "execution-result" && event.kind !== "environment-teardown" && event.kind !== "environment-terminal" && !closesCursorSlot(event)) return;
9766
+ if (event.kind !== "spawned" && event.kind !== "materialized" && event.kind !== "seat-materialized" && event.kind !== "execution-bound" && event.kind !== "execution-input" && event.kind !== "execution-admitted" && event.kind !== "execution-result" && event.kind !== "execution-abandoned" && event.kind !== "environment-teardown" && event.kind !== "environment-terminal" && !closesCursorSlot(event)) return;
9767
9767
  let node = this.nodes.get(event.id);
9768
9768
  if (!node) {
9769
9769
  node = {
@@ -9775,6 +9775,7 @@ var SpawnEventIndex = class {
9775
9775
  inputs: /* @__PURE__ */ new Set(),
9776
9776
  input: false,
9777
9777
  result: false,
9778
+ abandoned: false,
9778
9779
  admissions: /* @__PURE__ */ new Map(),
9779
9780
  unusableEnvironments: /* @__PURE__ */ new Set()
9780
9781
  };
@@ -9798,14 +9799,17 @@ var SpawnEventIndex = class {
9798
9799
  else if (event.kind === "execution-input") {
9799
9800
  node.inputs.add(event.seq);
9800
9801
  node.input = true;
9802
+ node.latestInput = event.seq;
9801
9803
  node.result = false;
9804
+ node.abandoned = false;
9802
9805
  node.admissions.clear();
9803
9806
  } else if (event.kind === "execution-admitted") node.admissions.set(event.admission.phase, event.admission);
9804
9807
  else if (event.kind === "execution-result") node.result = true;
9808
+ else if (event.kind === "execution-abandoned") node.abandoned = true;
9805
9809
  if (closesCursorSlot(event)) node.closed = true;
9806
9810
  }
9807
9811
  assertRetained(node, event) {
9808
- if (event.kind !== "execution-input" && event.kind !== "execution-admitted" && event.kind !== "execution-result") return;
9812
+ if (event.kind !== "execution-input" && event.kind !== "execution-admitted" && event.kind !== "execution-result" && event.kind !== "execution-abandoned") return;
9809
9813
  function fail(reason) {
9810
9814
  throw new Error(`spawn journal corrupted: retained execution '${event.id}' ${reason}`);
9811
9815
  }
@@ -9816,10 +9820,18 @@ var SpawnEventIndex = class {
9816
9820
  if (node.inputs.has(event.seq)) fail("has duplicate input sequence");
9817
9821
  const environment = node.admissions.get("environment");
9818
9822
  const ranIn = environment?.phase === "environment" ? environment.environmentId : node.lastEnvironmentId;
9819
- const abandoned = ranIn !== void 0 && node.unusableEnvironments.has(ranIn);
9820
- if (node.input && !node.result && !abandoned) fail("input replaces an unfinished invocation");
9823
+ const closed = node.abandoned || ranIn !== void 0 && node.unusableEnvironments.has(ranIn);
9824
+ if (node.input && !node.result && !closed) fail("input replaces an unfinished invocation");
9821
9825
  return;
9822
9826
  }
9827
+ if (event.kind === "execution-abandoned") {
9828
+ if (!node.input || node.latestInput !== event.inputSeq) fail("abandons an invocation that is not its latest");
9829
+ if (node.result) fail("abandons an invocation that has a result");
9830
+ if (node.abandoned) fail("abandons an invocation twice");
9831
+ if (!Number.isSafeInteger(event.failures) || event.failures < 1) fail("abandons without a failure count");
9832
+ return;
9833
+ }
9834
+ if (node.abandoned) fail(`${event.kind} follows its abandonment`);
9823
9835
  if (event.kind === "execution-result") {
9824
9836
  if (node.result) fail("has duplicate result");
9825
9837
  if (!node.admissions.has("dispatched")) fail("result precedes dispatch");
@@ -9870,6 +9882,7 @@ const outsideKinds = /* @__PURE__ */ new Set([
9870
9882
  "execution-input",
9871
9883
  "execution-admitted",
9872
9884
  "execution-result",
9885
+ "execution-abandoned",
9873
9886
  "execution-evidence",
9874
9887
  "progress",
9875
9888
  "reconciled",
@@ -9956,7 +9969,7 @@ async function replaySpawnTree(journal, blobs, root) {
9956
9969
  if (ev.kind === "reconciled") continue;
9957
9970
  if (ev.kind === "materialized") continue;
9958
9971
  if (ev.kind === "execution-bound") continue;
9959
- if (ev.kind === "execution-input" || ev.kind === "execution-admitted" || ev.kind === "execution-result" || ev.kind === "execution-evidence") continue;
9972
+ if (ev.kind === "execution-input" || ev.kind === "execution-admitted" || ev.kind === "execution-result" || ev.kind === "execution-abandoned" || ev.kind === "execution-evidence") continue;
9960
9973
  if (ev.kind === "edge") continue;
9961
9974
  if (ev.kind === "teardown-unconfirmed") continue;
9962
9975
  if (ev.kind === "teardown-pending" || ev.kind === "teardown-confirmed") continue;
@@ -10215,6 +10228,87 @@ function traceEvidenceFor(event) {
10215
10228
  };
10216
10229
  }
10217
10230
  //#endregion
10231
+ //#region src/runtime/supervise/upstream-unavailable.ts
10232
+ /**
10233
+ * An upstream that cannot serve NOW: how Runtime recognizes one, and how long an agent waits for it.
10234
+ *
10235
+ * A model provider's exhausted quota, a rate limit, an overload, or the router's own refused
10236
+ * credential is not a fault in the agent: the same request succeeds when capacity returns. A
10237
+ * driver that meets one re-enters after a pause (`runDriverWithRetry`), and a leaf continues in
10238
+ * its environment after the same pause (`providerAsExecutor`). Both read the refusal and the pause
10239
+ * from here, so an outage costs a director and its workers the same number of turns.
10240
+ *
10241
+ * This module imports nothing, so the provider executor can read it without the error classes of
10242
+ * `../../errors`.
10243
+ */
10244
+ /**
10245
+ * Machine codes that say the upstream cannot serve now rather than that the request is wrong.
10246
+ * Each is a code an upstream publishes, not prose: the router's
10247
+ * (`lib/model-substitution.ts`, `lib/upstream-error-triage.ts`) and the OpenAI- and Anthropic-shaped
10248
+ * error types a relayed body carries.
10249
+ */
10250
+ const UNAVAILABLE_CODES = /* @__PURE__ */ new Set([
10251
+ "provider_quota_exhausted",
10252
+ "provider_quota_exceeded",
10253
+ "provider_rate_limit",
10254
+ "upstream_unavailable",
10255
+ "provider_key_invalid",
10256
+ "rate_limit_exceeded",
10257
+ "rate_limit_error",
10258
+ "overloaded_error"
10259
+ ]);
10260
+ /** 429 Too Many Requests, 503 Service Unavailable, and 529, which Anthropic uses for overload. */
10261
+ const UNAVAILABLE_STATUSES = /* @__PURE__ */ new Set([
10262
+ 429,
10263
+ 503,
10264
+ 529
10265
+ ]);
10266
+ /**
10267
+ * A harness that flattens the router's JSON body into its own failure text leaves the router's
10268
+ * code in that text: `opencode execution failed: No provider served model "..."
10269
+ * (provider_quota_exhausted)`. The code is matched as a whole token, and a status only in the
10270
+ * `status code <n>` framing a harness prints, so prose that merely mentions a quota does not match.
10271
+ */
10272
+ function unavailableSignalInText(text) {
10273
+ for (const token of text.toLowerCase().matchAll(/[a-z_]+/gu)) if (UNAVAILABLE_CODES.has(token[0])) return token[0];
10274
+ const status = text.match(/\bstatus code (\d{3})\b/u)?.[1];
10275
+ return status !== void 0 && UNAVAILABLE_STATUSES.has(Number(status)) ? `http-${status}` : void 0;
10276
+ }
10277
+ /**
10278
+ * The code or status that marks a failed turn outcome as an upstream capacity refusal, or
10279
+ * `undefined`. The outcome's own `errorCode` decides first; the failure text is read only when no
10280
+ * code or numeric status decided, because a harness CLI can report the router's refusal as text.
10281
+ */
10282
+ function unavailableSignalOfFailure(failure) {
10283
+ const code = failure.errorCode?.toLowerCase();
10284
+ if (code !== void 0 && UNAVAILABLE_CODES.has(code)) return code;
10285
+ if (failure.statusCode !== void 0) return UNAVAILABLE_STATUSES.has(failure.statusCode) ? `http-${failure.statusCode}` : void 0;
10286
+ return unavailableSignalInText(failure.error);
10287
+ }
10288
+ const DEFAULT_UNAVAILABLE_PAUSE_MS = 15e3;
10289
+ const DEFAULT_MAX_UNAVAILABLE_PAUSE_MS = 3e5;
10290
+ /**
10291
+ * The pause after the `consecutive`-th refusal in a row (1-based): the first pause, doubled per
10292
+ * earlier refusal, up to the ceiling. The one rule for a driver that re-enters and a leaf that
10293
+ * continues in its environment, so an outage costs both the same number of turns.
10294
+ */
10295
+ function unavailablePauseMs(consecutive, policy = {}) {
10296
+ return cappedDoublingMs(consecutive, policy.unavailablePauseMs ?? DEFAULT_UNAVAILABLE_PAUSE_MS, policy.maxUnavailablePauseMs ?? DEFAULT_MAX_UNAVAILABLE_PAUSE_MS);
10297
+ }
10298
+ /** `first` doubled per earlier consecutive wait (`consecutive` is 1-based), up to `ceiling`. */
10299
+ function cappedDoublingMs(consecutive, first, ceiling) {
10300
+ const start = Math.max(0, first);
10301
+ return Math.min(Math.max(start, ceiling), start * 2 ** Math.max(0, consecutive - 1));
10302
+ }
10303
+ /**
10304
+ * Spread a wait over `[ms / 2, ms]`. Every driver a Platform restart cut off fails within the same
10305
+ * seconds; without jitter their doubling schedules stay aligned and they all re-enter together
10306
+ * when the service returns. `random` returns a value in `[0, 1)`; 0 keeps the full wait.
10307
+ */
10308
+ function jitteredMs(ms, random) {
10309
+ return ms - Math.floor(ms / 2 * Math.min(1, Math.max(0, random())));
10310
+ }
10311
+ //#endregion
10218
10312
  //#region src/runtime/supervise/retained-executor.ts
10219
10313
  /** Scope owns the durable writer; provider executors only publish sanitized admissions. */
10220
10314
  const retainedExecutorSeamKey = "runtime.retainedExecutor";
@@ -10313,6 +10407,7 @@ function classifyRetainedPendingCause(cause, phase = "execution") {
10313
10407
  if (name === "ZodError" || Array.isArray(Reflect.get(value, "issues")) || code === "JSON_BOUND_VIOLATION") return at === "admission" ? "request-rejected" : "provider-contract";
10314
10408
  if (code !== void 0 && transportCodes.has(code)) return "transport";
10315
10409
  if (name === "NetworkError" || name === "ServerError") return "transport";
10410
+ if (status === void 0 && at === "admission" && code !== void 0 && UNAVAILABLE_CODES.has(code.toLowerCase())) return "request-rejected";
10316
10411
  if (status !== void 0) {
10317
10412
  if (status >= 500) return "transport";
10318
10413
  if (at === "admission" && status !== 408) return "request-rejected";
@@ -10591,87 +10686,6 @@ function sandboxSessionTraceSource(box, sessionId, opts = {}) {
10591
10686
  });
10592
10687
  }
10593
10688
  //#endregion
10594
- //#region src/runtime/supervise/upstream-unavailable.ts
10595
- /**
10596
- * An upstream that cannot serve NOW: how Runtime recognizes one, and how long an agent waits for it.
10597
- *
10598
- * A model provider's exhausted quota, a rate limit, an overload, or the router's own refused
10599
- * credential is not a fault in the agent: the same request succeeds when capacity returns. A
10600
- * driver that meets one re-enters after a pause (`runDriverWithRetry`), and a leaf continues in
10601
- * its environment after the same pause (`providerAsExecutor`). Both read the refusal and the pause
10602
- * from here, so an outage costs a director and its workers the same number of turns.
10603
- *
10604
- * This module imports nothing, so the provider executor can read it without the error classes of
10605
- * `../../errors`.
10606
- */
10607
- /**
10608
- * Machine codes that say the upstream cannot serve now rather than that the request is wrong.
10609
- * Each is a code an upstream publishes, not prose: the router's
10610
- * (`lib/model-substitution.ts`, `lib/upstream-error-triage.ts`) and the OpenAI- and Anthropic-shaped
10611
- * error types a relayed body carries.
10612
- */
10613
- const UNAVAILABLE_CODES = /* @__PURE__ */ new Set([
10614
- "provider_quota_exhausted",
10615
- "provider_quota_exceeded",
10616
- "provider_rate_limit",
10617
- "upstream_unavailable",
10618
- "provider_key_invalid",
10619
- "rate_limit_exceeded",
10620
- "rate_limit_error",
10621
- "overloaded_error"
10622
- ]);
10623
- /** 429 Too Many Requests, 503 Service Unavailable, and 529, which Anthropic uses for overload. */
10624
- const UNAVAILABLE_STATUSES = /* @__PURE__ */ new Set([
10625
- 429,
10626
- 503,
10627
- 529
10628
- ]);
10629
- /**
10630
- * A harness that flattens the router's JSON body into its own failure text leaves the router's
10631
- * code in that text: `opencode execution failed: No provider served model "..."
10632
- * (provider_quota_exhausted)`. The code is matched as a whole token, and a status only in the
10633
- * `status code <n>` framing a harness prints, so prose that merely mentions a quota does not match.
10634
- */
10635
- function unavailableSignalInText(text) {
10636
- for (const token of text.toLowerCase().matchAll(/[a-z_]+/gu)) if (UNAVAILABLE_CODES.has(token[0])) return token[0];
10637
- const status = text.match(/\bstatus code (\d{3})\b/u)?.[1];
10638
- return status !== void 0 && UNAVAILABLE_STATUSES.has(Number(status)) ? `http-${status}` : void 0;
10639
- }
10640
- /**
10641
- * The code or status that marks a failed turn outcome as an upstream capacity refusal, or
10642
- * `undefined`. The outcome's own `errorCode` decides first; the failure text is read only when no
10643
- * code or numeric status decided, because a harness CLI can report the router's refusal as text.
10644
- */
10645
- function unavailableSignalOfFailure(failure) {
10646
- const code = failure.errorCode?.toLowerCase();
10647
- if (code !== void 0 && UNAVAILABLE_CODES.has(code)) return code;
10648
- if (failure.statusCode !== void 0) return UNAVAILABLE_STATUSES.has(failure.statusCode) ? `http-${failure.statusCode}` : void 0;
10649
- return unavailableSignalInText(failure.error);
10650
- }
10651
- const DEFAULT_UNAVAILABLE_PAUSE_MS = 15e3;
10652
- const DEFAULT_MAX_UNAVAILABLE_PAUSE_MS = 3e5;
10653
- /**
10654
- * The pause after the `consecutive`-th refusal in a row (1-based): the first pause, doubled per
10655
- * earlier refusal, up to the ceiling. The one rule for a driver that re-enters and a leaf that
10656
- * continues in its environment, so an outage costs both the same number of turns.
10657
- */
10658
- function unavailablePauseMs(consecutive, policy = {}) {
10659
- return cappedDoublingMs(consecutive, policy.unavailablePauseMs ?? DEFAULT_UNAVAILABLE_PAUSE_MS, policy.maxUnavailablePauseMs ?? DEFAULT_MAX_UNAVAILABLE_PAUSE_MS);
10660
- }
10661
- /** `first` doubled per earlier consecutive wait (`consecutive` is 1-based), up to `ceiling`. */
10662
- function cappedDoublingMs(consecutive, first, ceiling) {
10663
- const start = Math.max(0, first);
10664
- return Math.min(Math.max(start, ceiling), start * 2 ** Math.max(0, consecutive - 1));
10665
- }
10666
- /**
10667
- * Spread a wait over `[ms / 2, ms]`. Every driver a Platform restart cut off fails within the same
10668
- * seconds; without jitter their doubling schedules stay aligned and they all re-enter together
10669
- * when the service returns. `random` returns a value in `[0, 1)`; 0 keeps the full wait.
10670
- */
10671
- function jitteredMs(ms, random) {
10672
- return ms - Math.floor(ms / 2 * Math.min(1, Math.max(0, random())));
10673
- }
10674
- //#endregion
10675
10689
  //#region src/runtime/supervise/workspace-checkpoint.ts
10676
10690
  /** Workspace-relative path of the marker Runtime writes before every checkpoint. */
10677
10691
  const WORKSPACE_CHECKPOINT_MARKER_PATH = ".agent-runtime-checkpoint";
@@ -23345,13 +23359,9 @@ function registerScopeRetainedOwner(scope, args) {
23345
23359
  const taskEvent = [...events].reverse().find((event) => event.kind === "execution-input");
23346
23360
  const start = taskEvent === void 0 ? 0 : events.indexOf(taskEvent);
23347
23361
  const attempt = events.slice(start);
23348
- const beforeInput = taskEvent === void 0 ? [] : events.slice(0, start);
23349
- const priorInput = [...beforeInput].reverse().find((event) => event.kind === "execution-input");
23350
- const priorAttempt = priorInput === void 0 ? [] : beforeInput.slice(beforeInput.indexOf(priorInput));
23351
23362
  const admissions = attempt.flatMap((event) => event.kind === "execution-admitted" ? [event.admission] : []);
23352
23363
  const acceptedRef = [...attempt].reverse().find((event) => event.kind === "execution-result");
23353
- const priorResult = [...priorAttempt].reverse().find((event) => event.kind === "execution-result");
23354
- const priorSession = priorResult?.kind === "execution-result" ? priorAttempt.slice(0, priorAttempt.indexOf(priorResult)).reverse().flatMap((event) => event.kind === "execution-admitted" && event.admission.phase === "environment" ? [event.admission] : [])[0] : void 0;
23364
+ const priorSession = taskEvent === void 0 ? void 0 : committedSession(events, start);
23355
23365
  let sequence = Math.max(0, ...events.map((event) => "seq" in event ? event.seq : 0));
23356
23366
  const state = {
23357
23367
  args,
@@ -23454,6 +23464,74 @@ function registerScopeRetainedOwner(scope, args) {
23454
23464
  };
23455
23465
  owners.set(scope, state);
23456
23466
  }
23467
+ /**
23468
+ * The environment admission an invocation that starts at `before` continues in: that of the
23469
+ * latest earlier invocation with a committed result, looking past invocations Runtime abandoned,
23470
+ * which never committed one. A live process keeps the same session across an abandonment, so a
23471
+ * resumed one must derive it the same way or its replay of the next invocation would not match
23472
+ * the material that invocation admitted.
23473
+ */
23474
+ function committedSession(events, before) {
23475
+ let end = before;
23476
+ for (;;) {
23477
+ const head = events.slice(0, end);
23478
+ const input = [...head].reverse().find((event) => event.kind === "execution-input");
23479
+ if (input === void 0) return void 0;
23480
+ const start = head.indexOf(input);
23481
+ const attempt = head.slice(start);
23482
+ const result = [...attempt].reverse().find((event) => event.kind === "execution-result");
23483
+ if (result !== void 0) return attempt.slice(0, attempt.indexOf(result)).reverse().flatMap((event) => event.kind === "execution-admitted" && event.admission.phase === "environment" ? [event.admission] : [])[0];
23484
+ if (!attempt.some((event) => event.kind === "execution-abandoned")) return void 0;
23485
+ end = start;
23486
+ }
23487
+ }
23488
+ /** Bounds the stop Runtime asks for before abandoning a dispatched invocation. */
23489
+ const ABANDON_STOP_TIMEOUT_MS = 3e4;
23490
+ /**
23491
+ * Abandon the owner's in-flight invocation, which the driver retry loop asks for when the same
23492
+ * reconciliation keeps failing the same way (`DriverRetryRun.resolvePending`).
23493
+ *
23494
+ * Runtime stops the invocation at the provider when it had dispatched, then journals what the
23495
+ * provider confirmed. The journal refuses every later admission or result of the invocation, so
23496
+ * only the replacement the next {@link prepareScopeRetainedOwnerTask} starts can commit a result.
23497
+ * Answers `false`, journaling nothing, when this owner has no unfinished invocation to abandon.
23498
+ */
23499
+ async function abandonScopeRetainedOwnerInvocation(scope, failure, failures) {
23500
+ const state = owners.get(scope);
23501
+ if (state === void 0 || state.inputSequence === void 0) return false;
23502
+ const { args } = state;
23503
+ const owned = (await args.journal.loadTree(args.rootId) ?? []).filter((event) => event.id === args.nodeId);
23504
+ const latestInput = [...owned].reverse().find((event) => event.kind === "execution-input");
23505
+ if (latestInput?.kind !== "execution-input" || latestInput.seq !== state.inputSequence) return false;
23506
+ const attempt = owned.slice(owned.indexOf(latestInput));
23507
+ if (attempt.some((event) => event.kind === "execution-result" || event.kind === "execution-abandoned")) return false;
23508
+ const dispatched = [...attempt].reverse().flatMap((event) => event.kind === "execution-admitted" && event.admission.phase === "dispatched" ? [event.admission] : [])[0];
23509
+ const stop = dispatched === void 0 || state.provider === void 0 ? void 0 : await stopRetainedNativeExecution({
23510
+ provider: state.provider,
23511
+ controlRef: dispatched.controlRef,
23512
+ signal: AbortSignal.any([scope.signal, AbortSignal.timeout(ABANDON_STOP_TIMEOUT_MS)]),
23513
+ now: args.now
23514
+ });
23515
+ scope.signal.throwIfAborted();
23516
+ const stopped = stop?.effect === "cancelled" || stop?.effect === "not_live";
23517
+ await args.journal.appendEvent(args.rootId, {
23518
+ kind: "execution-abandoned",
23519
+ id: args.nodeId,
23520
+ inputSeq: latestInput.seq,
23521
+ pendingCause: failure.pendingCause,
23522
+ failures,
23523
+ detail: errorText(errMessage(failure)).slice(0, 2048),
23524
+ outcome: stopped ? "stopped" : "uncertain",
23525
+ ...stop === void 0 ? {} : { stop: {
23526
+ executionId: stop.executionId,
23527
+ effect: stop.effect,
23528
+ ...stop.error === void 0 ? {} : { error: stop.error }
23529
+ } },
23530
+ seq: state.nextSequence(),
23531
+ at: new Date(args.now()).toISOString()
23532
+ });
23533
+ return true;
23534
+ }
23457
23535
  function scopeRetainedOwnerContext(scope) {
23458
23536
  return owners.get(scope)?.context;
23459
23537
  }
@@ -24496,6 +24574,11 @@ async function prepareScopeRetainedOwnerTask(scope, task) {
24496
24574
  state.admissions.length = 0;
24497
24575
  delete state.priorSession;
24498
24576
  }
24577
+ if (latestInput?.kind === "execution-input" && state.inputSequence === latestInput.seq && owned.slice(owned.indexOf(latestInput)).some((event) => event.kind === "execution-abandoned")) {
24578
+ delete state.inputSequence;
24579
+ delete state.taskRef;
24580
+ state.admissions.length = 0;
24581
+ }
24499
24582
  if (state.prepared && state.acceptedRef && state.acceptedConsumed) {
24500
24583
  const currentEnvironment = [...state.admissions].reverse().find((admission) => admission.phase === "environment");
24501
24584
  if (currentEnvironment?.phase === "environment") state.priorSession = currentEnvironment;
@@ -27780,6 +27863,19 @@ const DEFAULT_MAX_ATTEMPTS = Number.POSITIVE_INFINITY;
27780
27863
  const DEFAULT_INITIAL_BACKOFF_MS = 2e3;
27781
27864
  const DEFAULT_MAX_BACKOFF_MS = 3e4;
27782
27865
  const DEFAULT_TRANSIENT_OUTAGE_MS = 9e5;
27866
+ /** Consecutive identical reconciliation failures of one pending invocation that resolve it. */
27867
+ const SAME_PENDING_LIMIT = 2;
27868
+ /**
27869
+ * The pending invocation a failure left, when abandoning it is the resolution: the provider
27870
+ * answered and could not resolve the execution (`unobservable`), or a nested manager's recovery
27871
+ * could not be rebuilt (`nested-recovery`). A lost transport waits for the provider instead, in
27872
+ * the outage window: abandoning during a provider outage would start a second execution beside
27873
+ * one that may still run. A request refused before it ran has nothing to abandon: a capacity
27874
+ * refusal pauses and any other refusal is terminal. A contract violation stays terminal (#1204).
27875
+ */
27876
+ function abandonablePending(error) {
27877
+ return error instanceof RetainedExecutionPendingError && (error.pendingCause === "unobservable" || error.pendingCause === "nested-recovery") ? error : void 0;
27878
+ }
27783
27879
  /**
27784
27880
  * Bridge error classes the bridge itself never retries: a request that fails identically on
27785
27881
  * every attempt, mapped below 5xx on its HTTP path (`parse_error` 400, the other two 501). On the
@@ -27861,10 +27957,29 @@ function upstreamUnavailableSignal(error) {
27861
27957
  return unavailableSignalInText(errorProperty(error, "message") ?? "");
27862
27958
  }
27863
27959
  if (error instanceof AgentEvalError$1) return void 0;
27960
+ const code = capacityCode(error);
27961
+ if (code !== void 0) return code;
27864
27962
  const status = errorHttpStatus(error);
27865
27963
  if (status !== void 0) return UNAVAILABLE_STATUSES.has(status) ? `http-${status}` : void 0;
27866
27964
  return unavailableSignalInText(errorProperty(error, "message") ?? "");
27867
27965
  }
27966
+ /**
27967
+ * The upstream capacity code an error carries as its own `code` field, or `undefined`. A provider
27968
+ * SDK names a capacity refusal with the router's code when no HTTP response exists to carry a
27969
+ * status: agent-provider-tangle's `TangleCredentialCapacityError` (`provider_quota_exhausted`,
27970
+ * `upstream_unavailable`) when the subscription account owner has no account with room.
27971
+ */
27972
+ function capacityCode(error) {
27973
+ let code;
27974
+ try {
27975
+ code = Reflect.get(error, "code");
27976
+ } catch {
27977
+ return;
27978
+ }
27979
+ if (typeof code !== "string") return void 0;
27980
+ const normalized = code.toLowerCase();
27981
+ return UNAVAILABLE_CODES.has(normalized) ? normalized : void 0;
27982
+ }
27868
27983
  /** True when the upstream refused for capacity and the same request will succeed later. */
27869
27984
  function isUpstreamUnavailable(error) {
27870
27985
  return upstreamUnavailableSignal(error) !== void 0;
@@ -27925,7 +28040,7 @@ function retainedAdmissionCause(error) {
27925
28040
  if (errorProperty(value, "name") === "RetainedRunProviderContractError") return void 0;
27926
28041
  const status = errorHttpStatus(value);
27927
28042
  if (status !== void 0 && status >= 400) return error.pendingCause === "request-rejected" || UNAVAILABLE_STATUSES.has(status) ? value : void 0;
27928
- if (error.pendingCause === "request-rejected" && (value instanceof AgentEvalError$1 || isProviderSchemaRejection(value))) return value;
28043
+ if (error.pendingCause === "request-rejected" && (value instanceof AgentEvalError$1 || isProviderSchemaRejection(value) || capacityCode(value) !== void 0)) return value;
27929
28044
  const members = Reflect.get(value, "errors");
27930
28045
  if (Array.isArray(members)) queue.push(...members.slice(0, 12 - steps));
27931
28046
  queue.push(value.cause);
@@ -28055,6 +28170,8 @@ async function runDriverWithRetry(run) {
28055
28170
  let chargedFailures = 0;
28056
28171
  let outageSince;
28057
28172
  let consecutivePauses = 0;
28173
+ let samePending;
28174
+ let abandonments = 0;
28058
28175
  let pauses = 0;
28059
28176
  let continuations = 0;
28060
28177
  let wakes = 0;
@@ -28113,6 +28230,12 @@ async function runDriverWithRetry(run) {
28113
28230
  const classification = classifyDriverFailure(error, run.signal);
28114
28231
  const after = run.progress();
28115
28232
  const progressed = madeProgress(before, after);
28233
+ if (progressed) abandonments = 0;
28234
+ const pending = abandonablePending(error);
28235
+ samePending = pending === void 0 || classification !== "transient" ? void 0 : {
28236
+ cause: pending.pendingCause,
28237
+ count: samePending?.cause === pending.pendingCause ? samePending.count + 1 : 1
28238
+ };
28116
28239
  if (classification === "unavailable") {
28117
28240
  if (progressed) barrenReentries = 0;
28118
28241
  const stop = (() => {
@@ -28151,6 +28274,7 @@ async function runDriverWithRetry(run) {
28151
28274
  pause: pauses
28152
28275
  };
28153
28276
  await sleep(pause, run.signal);
28277
+ if (outageSince !== void 0) outageSince += now() - startedAt;
28154
28278
  if (run.signal.aborted) throw new DriverAttemptsExhaustedError(error, attempts, "aborted");
28155
28279
  const afterPause = budgetStop(run.budget(), now());
28156
28280
  if (afterPause) throw new DriverAttemptsExhaustedError(error, attempts, afterPause);
@@ -28175,19 +28299,30 @@ async function runDriverWithRetry(run) {
28175
28299
  if (progressed) return void 0;
28176
28300
  return consecutiveBarren + 1 >= maxConsecutive ? "no-progress" : void 0;
28177
28301
  })();
28302
+ let abandoned = false;
28303
+ if (pending !== void 0 && samePending !== void 0 && run.resolvePending !== void 0 && retryEnabled && !run.signal.aborted && abandonments < maxConsecutive && (stop === "no-progress" || stop === void 0 && samePending.count >= SAME_PENDING_LIMIT)) {
28304
+ abandoned = await run.resolvePending(pending, samePending.count);
28305
+ if (abandoned) {
28306
+ abandonments += 1;
28307
+ samePending = void 0;
28308
+ consecutiveBarren = 0;
28309
+ outageSince = void 0;
28310
+ }
28311
+ }
28312
+ const retryStop = abandoned ? void 0 : stop;
28178
28313
  if (progressed) barrenReentries = 0;
28179
- if (stop !== void 0) {
28314
+ if (retryStop !== void 0) {
28180
28315
  await emit({
28181
28316
  attempt,
28182
28317
  durationMs,
28183
28318
  error: errMessage(error),
28184
28319
  classification,
28185
28320
  madeProgress: progressed,
28186
- stop
28321
+ stop: retryStop
28187
28322
  });
28188
- throw new DriverAttemptsExhaustedError(error, attempts, stop);
28323
+ throw new DriverAttemptsExhaustedError(error, attempts, retryStop);
28189
28324
  }
28190
- consecutiveBarren = progressed ? 0 : consecutiveBarren + 1;
28325
+ if (!abandoned) consecutiveBarren = progressed ? 0 : consecutiveBarren + 1;
28191
28326
  const backoff = jitteredMs(cappedDoublingMs(consecutiveBarren, initialBackoff, maxBackoff), random);
28192
28327
  await emit({
28193
28328
  attempt,
@@ -28195,6 +28330,7 @@ async function runDriverWithRetry(run) {
28195
28330
  error: errMessage(error),
28196
28331
  classification,
28197
28332
  madeProgress: progressed,
28333
+ ...abandoned ? { abandoned: true } : {},
28198
28334
  retryInMs: backoff
28199
28335
  });
28200
28336
  reentry = {
@@ -28211,6 +28347,8 @@ async function runDriverWithRetry(run) {
28211
28347
  consecutiveBarren = 0;
28212
28348
  consecutivePauses = 0;
28213
28349
  outageSince = void 0;
28350
+ samePending = void 0;
28351
+ abandonments = 0;
28214
28352
  const durationMs = now() - startedAt;
28215
28353
  const after = run.progress();
28216
28354
  const progressed = madeProgress(before, after);
@@ -29398,6 +29536,6 @@ function isNonEmptySpend(s) {
29398
29536
  return s.iterations > 0 || s.tokens.input > 0 || s.tokens.output > 0 || s.usd > 0 || s.ms > 0 || s.tokensKnown === false || s.usdKnown === false || Object.values(s.resources ?? {}).some((resource) => resource.amount > 0 || !resource.known);
29399
29537
  }
29400
29538
  //#endregion
29401
- export { hostDirectoryReader as $, readSandboxOutcome as $i, workerTraceAnalysisStore as $n, sanitizeKnowledgeReadinessReport as $r, claimsAuthority as $t, scopeOwnerExecutorNodeContext as A, attestRuntimeOwnedPendingExecutor as Ai, unavailablePauseMs as An, retainHarnessTranscript as Ar, cliInPlaceExecutor as At, noteScopeRetainedOwnerCoordination as B, runtimeOwnedDriveHarnessProviderEvidence as Bi, InMemorySpawnJournal as Bn, buildLoopSpanNodes as Br, WORKER_TRACE_PROPAGATION as Bt, deriveNodeExecutionIdentity as C, promptResourceProfileMaterialization as Ci, routerBrain as Cn, linkAbort as Cr, distillFindings as Ct, recordScopeOwnerMaterialization as D, unsupportedProfileDimensions as Di, providerAsExecutor as Dn, persistHarnessTranscript as Dr, verdictFromJudgeScore as Dt, recordScopeOwnerDriverAttempt as E, sandboxActProfileMaterialization as Ei, createAgentEnvironmentProviderRegistry as En, harnessTranscriptArtifact as Er, passedItems as Et, seatExecutionProfile as F, knownExecutionBindingReceipt as Fi, registerRetainedExecutorPreparation as Fn, traceContextToEnv as Fr, createWorktreeCliExecutor as Ft, scopeRetainedOwnerJournalRoot as G, runtimeOwnedScopeOwnerRuntime as Gi, isNoEntError as Gn, generateSpanId as Gr, taskToPrompt as Gt, prepareScopeRetainedOwnerTask as H, runtimeOwnedExecutorMaterialization as Hi, loadSpawnForest as Hn, createOpenInferenceFileExporter as Hr, workerTraceEnv as Ht, beginScopeRetainedOwnerDrive as I, knownMaterializationReceipt as Ii, retainedExecutorSeamKey as In, defaultRedactor as Ir, DEFAULT_SANDBOX_STEERING_MAX_TURNS as It, scopeRetainedOwnerRestorePoint as J, executableAgentProfileSnapshot as Ji, writeAllBytes as Jn, padTraceId as Jr, readWorkerProgress as Jt, scopeRetainedOwnerPriorSpend as K, unknownExecutionBindingReceipt as Ki, prepareJsonlAppend as Kn, loopEventToOtelSpan as Kr, DEFAULT_STALL_AFTER_MS as Kt, bindScopeRetainedOwnerEnvironmentId as L, newExecutionAttemptId as Li, FileResultBlobStore as Ln, defaultRedactorIdentityMaterial as Lr, createSteerableSandboxSession as Lt, SeatChain as M, authoredProfileDigest as Mi, createPushTraceSource as Mn, createPropagatingTraceEmitter as Mr, createExecutor as Mt, SeatChainExhaustedError as N, finalizeRuntimeOwnedPendingExecutor as Ni, decodeToolPart as Nn, mergeTraceEnv as Nr, createExecutorRegistry as Nt, recordScopeOwnerPause as O, validateProfileMaterialization as Oi, providerAsSandboxClient as On, readHarnessTranscript as Or, bindReusableExecutorExecutionId as Ot, authoredSeatStages as P, inheritRuntimeOwnedExecutorAttestation as Pi, sandboxSessionTraceSource as Pn, readTraceContextFromEnv as Pr, snapshotExecutorConfig as Pt, environmentReader as Q, projectSandboxOutcome as Qi, parseWorkerToolTraceArtifact as Qn, sanitizeAgentRuntimeEvent as Qr, PEER_MAIL_WIRE_KEY as Qt, bindScopeRetainedOwnerProvider as R, providerAttemptEvidence as Ri, FileSpawnJournal as Rn, resolveRedactor as Rr, createRouterTranscript as Rt, createScope as S, promptOnlyProfileMaterialization as Si, readPromptOptions as Sn, abortError as Sr, createContinuationKeeper as St, meterRuntimeOwnedProviderAttempt as T, renderUnsupported as Ti, LEAF_CONTINUATION_TASK as Tn, captureHarnessTranscript as Tr, failedItems as Tt, reconcileScopeRetainedOwnerEnvironment as U, runtimeOwnedExecutorProviderEvidence as Ui, materializeTreeView as Un, createOtelExporter as Ur, workerTraceHeaders as Ut, prepareScopeRetainedOwnerSeatSwitch as V, runtimeOwnedExecutorExecutionBinding as Vi, insideCursorNamespace as Vn, buildRuntimeEventOtelSpans as Vr, readWorkerTraceContext as Vt, scopeRetainedOwnerContext as W, runtimeOwnedPendingExecutorMaterialization as Wi, replaySpawnTree as Wn, flatOtelSpan as Wr, workerTraceSeamKey as Wt, scopeRetainedOwnerTurnEnded as X, detachedFrozen as Xi, captureWorkerTraceEvidence as Xn, createRuntimeEventCollector as Xr, AUTHORITY_MARKERS as Xt, scopeRetainedOwnerResult as Y, executableAgentSpecSnapshot as Yi, WORKER_TOOL_TRACE_SCHEMA_VERSION as Yn, toOtelAttributes as Yr, createInbox as Yt, SPAWN_RESOURCE_PATH_MAX_BYTES as Z, detachedSnapshot as Zi, isTraceAnalysisStore as Zn, createRuntimeStreamEventCollector as Zr, DEFAULT_PEER_MAIL_LIMITS as Zt, isDriverSpec as _, providerMessageText as _a, defineProfileMaterializationContract as _i, createSandboxLineage as _n, destroyInteractiveEnvironment as _r, CheckUnavailableError as _t, collectDelivered as a, isSandboxTerminalEvent as aa, removeWorktree as ai, isTerminalNodeStatus as an, meterUsageEvent as ar, attachWorker as at, assertRecursiveReservationPolicy as b, promptControlProfileMaterialization as bi, captureBeforeDestroy as bn, openSlotGroup as br, bestComposite as bt, runTree as c, notifySandboxEventObserver as ca, harnessInvocation as ci, addHarnessUsage as cn, spendFromUsageTotals as cr, recoverRetainedInteractiveRun as ct, classifyDriverFailure as d, sumSandboxUsage as da, parseCodexTokenUsage as di, readCodexRolloutSession as dn, errMessage as dr, queueOf as dt, assertSandboxServedModel as ea, sanitizeRuntimeStreamEvent as ei, createPeerMailbox as en, executorFailure as er, resolveSpawnResourcePaths as et, runDriverWithRetry as f, decodeHarnessUsage as fa, CodexExecutionDiagnosticError as fi, TERMINAL_DECISIONS as fn, reconnectRetainedRun as fr, rollingDispatch as ft, driverExecutorFactory as g, promptOptionsFromAgentTurnInput as ga, controlProfileMaterialization as gi, runAgentRounds as gn, retainedCreateMaterial as gr, CONTINUATION_FACTS as gt, driverChild as h, promptFromAgentTurnInput as ha, assertProfileMaterialization as hi, isTerminalDecision as hn, startRetainedRunInEnvironment as hr, CONTINUATIONS_DIR as ht, bestDelivered as i, extractLlmCallEvent as ia, createWorktree as ii, isLiveNodeStatus as in, createBudgetPool as ir, interactiveAdmissionSeamKey as it, settledToIteration as j, attestRuntimeOwnedScopeOwner as ji, unavailableSignalOfFailure as jn, contentAddress as jr, cliWorktreeExecutor as jt, restoreScopeOwnerAcceptedExecution as k, worktreeCliProfileMaterialization as ki, resolveAgentEnvironmentProvider as kn, resolveHarnessTranscriptCapture as kr, captureReusableExecutorConfig as kt, DriverAttemptsExhaustedError as l, sandboxEventServedBackend as la, harnessSupportsReasoningEffort as li, createCodexRolloutStoreReader as ln, bridgeRuntimeAttachmentsKey as lr, startRetainedInteractiveRun as lt, upstreamUnavailableSignal as m, awaitAbortable$1 as ma, AGENT_PROFILE_MATERIALIZATION_AXES as mi, defaultSelectWinner as mn, startRetainedRun as mr, mapExecutorResult as mt, createRootHandle as n, createSandboxToolPartState as na, runWorktreeHarness as ni, peerMailTools as nn, ReservationWaitRefused as nr, coordinationProfileToolPrefix as nt, pickBestDelivered as o, mapSandboxEvent as oa, DEFAULT_LOCAL_HARNESS as oi, bridgeAdmissionRefusal as on, newUsageTotals as or, readWorkerInteractiveBinding as ot, summarizeDriverAttempts as p, abortError$1 as pa, terminateProcessTreeAndConfirm as pi, createSandboxForSpec as pn, recoverRetainedRun as pr, gateOnDeliverable as pt, scopeRetainedOwnerResourceReader as q, unknownMaterializationReceipt as qi, readCommittedJsonLines as qn, padSpanId as qr, createActivityLog as qt, createSupervisor as r, createSandboxUsageLedger as ra, captureWorktreeDiff as ri, peerMailVerbNames as rn, assertValidBudget as rr, providerVisibleProfile as rt, runFinalizer as s, mapSandboxToolEvent as sa, LOCAL_HARNESSES as si, bridgeModelRouteRefusal as sn, spendFromUsageEvents as sr, reconnectRetainedInteractiveRun as st, DEFAULT_MAX_DEPTH as t, canonicalStreamEventFromSandboxEvent as ta, runSettledCommand as ti, isPeerMailEnvelope as tn, BudgetReconcileFault as tr, coordinationMcpAlias as tt, HarnessTurnFailedError as u, sandboxProgressEvents as ua, localHarnessExecutable as ui, harnessUsageIsEmpty as un, bridgeStopSignalKey as ur, freeSlots as ut, withDriverExecutor as v, fullProfileMaterialization as vi, acquireSandbox as vn, environmentGone as vr, admitContinuationPolicy as vt, meterRuntimeOwnedAccounting as w, renderProfileMaterializationIssues as wi, runBrainLoop as wn, runAbortable as wr, expandQuestions as wt, beginScopeOwnerAttempt as x, promptModelProfileMaterialization as xi, assertBoxlessPromptOptions as xn, RunCancellationReason as xr, checkVerdictOf as xt, SUBTREE_RESULT_LIMIT as y, profileMaterializationAxes$1 as yi, SandboxEvidenceRetentionError as yn, createWorkerSlots as yr, admitFinding as yt, consumeScopeRetainedOwnerResult as z, recordRuntimeOwnedDriveHarnessProviderEvidence as zi, InMemoryResultBlobStore as zn, buildLoopOtelSpans as zr, createInPlaceCliExecutor as zt };
29539
+ export { environmentReader as $, projectSandboxOutcome as $i, parseWorkerToolTraceArtifact as $n, sanitizeAgentRuntimeEvent as $r, PEER_MAIL_WIRE_KEY as $t, scopeOwnerExecutorNodeContext as A, worktreeCliProfileMaterialization as Ai, resolveAgentEnvironmentProvider as An, resolveHarnessTranscriptCapture as Ar, captureReusableExecutorConfig as At, consumeScopeRetainedOwnerResult as B, recordRuntimeOwnedDriveHarnessProviderEvidence as Bi, InMemoryResultBlobStore as Bn, buildLoopOtelSpans as Br, createInPlaceCliExecutor as Bt, deriveNodeExecutionIdentity as C, promptOnlyProfileMaterialization as Ci, readPromptOptions as Cn, abortError as Cr, createContinuationKeeper as Ct, recordScopeOwnerMaterialization as D, sandboxActProfileMaterialization as Di, createAgentEnvironmentProviderRegistry as Dn, harnessTranscriptArtifact as Dr, passedItems as Dt, recordScopeOwnerDriverAttempt as E, renderUnsupported as Ei, LEAF_CONTINUATION_TASK as En, captureHarnessTranscript as Er, failedItems as Et, seatExecutionProfile as F, inheritRuntimeOwnedExecutorAttestation as Fi, retainedExecutorSeamKey as Fn, readTraceContextFromEnv as Fr, snapshotExecutorConfig as Ft, scopeRetainedOwnerContext as G, runtimeOwnedPendingExecutorMaterialization as Gi, replaySpawnTree as Gn, flatOtelSpan as Gr, workerTraceSeamKey as Gt, prepareScopeRetainedOwnerSeatSwitch as H, runtimeOwnedExecutorExecutionBinding as Hi, insideCursorNamespace as Hn, buildRuntimeEventOtelSpans as Hr, readWorkerTraceContext as Ht, abandonScopeRetainedOwnerInvocation as I, knownExecutionBindingReceipt as Ii, unavailablePauseMs as In, traceContextToEnv as Ir, createWorktreeCliExecutor as It, scopeRetainedOwnerResourceReader as J, unknownMaterializationReceipt as Ji, readCommittedJsonLines as Jn, padSpanId as Jr, createActivityLog as Jt, scopeRetainedOwnerJournalRoot as K, runtimeOwnedScopeOwnerRuntime as Ki, isNoEntError as Kn, generateSpanId as Kr, taskToPrompt as Kt, beginScopeRetainedOwnerDrive as L, knownMaterializationReceipt as Li, unavailableSignalOfFailure as Ln, defaultRedactor as Lr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as Lt, SeatChain as M, attestRuntimeOwnedScopeOwner as Mi, decodeToolPart as Mn, contentAddress as Mr, cliWorktreeExecutor as Mt, SeatChainExhaustedError as N, authoredProfileDigest as Ni, sandboxSessionTraceSource as Nn, createPropagatingTraceEmitter as Nr, createExecutor as Nt, recordScopeOwnerPause as O, unsupportedProfileDimensions as Oi, providerAsExecutor as On, persistHarnessTranscript as Or, verdictFromJudgeScore as Ot, authoredSeatStages as P, finalizeRuntimeOwnedPendingExecutor as Pi, registerRetainedExecutorPreparation as Pn, mergeTraceEnv as Pr, createExecutorRegistry as Pt, SPAWN_RESOURCE_PATH_MAX_BYTES as Q, detachedSnapshot as Qi, isTraceAnalysisStore as Qn, createRuntimeStreamEventCollector as Qr, DEFAULT_PEER_MAIL_LIMITS as Qt, bindScopeRetainedOwnerEnvironmentId as R, newExecutionAttemptId as Ri, FileResultBlobStore as Rn, defaultRedactorIdentityMaterial as Rr, createSteerableSandboxSession as Rt, createScope as S, promptModelProfileMaterialization as Si, assertBoxlessPromptOptions as Sn, RunCancellationReason as Sr, checkVerdictOf as St, meterRuntimeOwnedProviderAttempt as T, renderProfileMaterializationIssues as Ti, runBrainLoop as Tn, runAbortable as Tr, expandQuestions as Tt, prepareScopeRetainedOwnerTask as U, runtimeOwnedExecutorMaterialization as Ui, loadSpawnForest as Un, createOpenInferenceFileExporter as Ur, workerTraceEnv as Ut, noteScopeRetainedOwnerCoordination as V, runtimeOwnedDriveHarnessProviderEvidence as Vi, InMemorySpawnJournal as Vn, buildLoopSpanNodes as Vr, WORKER_TRACE_PROPAGATION as Vt, reconcileScopeRetainedOwnerEnvironment as W, runtimeOwnedExecutorProviderEvidence as Wi, materializeTreeView as Wn, createOtelExporter as Wr, workerTraceHeaders as Wt, scopeRetainedOwnerResult as X, executableAgentSpecSnapshot as Xi, WORKER_TOOL_TRACE_SCHEMA_VERSION as Xn, toOtelAttributes as Xr, createInbox as Xt, scopeRetainedOwnerRestorePoint as Y, executableAgentProfileSnapshot as Yi, writeAllBytes as Yn, padTraceId as Yr, readWorkerProgress as Yt, scopeRetainedOwnerTurnEnded as Z, detachedFrozen as Zi, captureWorkerTraceEvidence as Zn, createRuntimeEventCollector as Zr, AUTHORITY_MARKERS as Zt, isDriverSpec as _, promptOptionsFromAgentTurnInput as _a, controlProfileMaterialization as _i, runAgentRounds as _n, retainedCreateMaterial as _r, CONTINUATION_FACTS as _t, collectDelivered as a, extractLlmCallEvent as aa, createWorktree as ai, isLiveNodeStatus as an, createBudgetPool as ar, interactiveAdmissionSeamKey as at, assertRecursiveReservationPolicy as b, profileMaterializationAxes$1 as bi, SandboxEvidenceRetentionError as bn, createWorkerSlots as br, admitFinding as bt, runTree as c, mapSandboxToolEvent as ca, LOCAL_HARNESSES as ci, bridgeModelRouteRefusal as cn, spendFromUsageEvents as cr, reconnectRetainedInteractiveRun as ct, classifyDriverFailure as d, sandboxProgressEvents as da, localHarnessExecutable as di, harnessUsageIsEmpty as dn, bridgeStopSignalKey as dr, freeSlots as dt, readSandboxOutcome as ea, sanitizeKnowledgeReadinessReport as ei, claimsAuthority as en, workerTraceAnalysisStore as er, hostDirectoryReader as et, runDriverWithRetry as f, sumSandboxUsage as fa, parseCodexTokenUsage as fi, readCodexRolloutSession as fn, errMessage as fr, queueOf as ft, driverExecutorFactory as g, promptFromAgentTurnInput as ga, assertProfileMaterialization as gi, isTerminalDecision as gn, startRetainedRunInEnvironment as gr, CONTINUATIONS_DIR as gt, driverChild as h, awaitAbortable$1 as ha, AGENT_PROFILE_MATERIALIZATION_AXES as hi, defaultSelectWinner as hn, startRetainedRun as hr, mapExecutorResult as ht, bestDelivered as i, createSandboxUsageLedger as ia, captureWorktreeDiff as ii, peerMailVerbNames as in, assertValidBudget as ir, providerVisibleProfile as it, settledToIteration as j, attestRuntimeOwnedPendingExecutor as ji, createPushTraceSource as jn, retainHarnessTranscript as jr, cliInPlaceExecutor as jt, restoreScopeOwnerAcceptedExecution as k, validateProfileMaterialization as ki, providerAsSandboxClient as kn, readHarnessTranscript as kr, bindReusableExecutorExecutionId as kt, DriverAttemptsExhaustedError as l, notifySandboxEventObserver as la, harnessInvocation as li, addHarnessUsage as ln, spendFromUsageTotals as lr, recoverRetainedInteractiveRun as lt, upstreamUnavailableSignal as m, abortError$1 as ma, terminateProcessTreeAndConfirm as mi, createSandboxForSpec as mn, recoverRetainedRun as mr, gateOnDeliverable as mt, createRootHandle as n, canonicalStreamEventFromSandboxEvent as na, runSettledCommand as ni, isPeerMailEnvelope as nn, BudgetReconcileFault as nr, coordinationMcpAlias as nt, pickBestDelivered as o, isSandboxTerminalEvent as oa, removeWorktree as oi, isTerminalNodeStatus as on, meterUsageEvent as or, attachWorker as ot, summarizeDriverAttempts as p, decodeHarnessUsage as pa, CodexExecutionDiagnosticError as pi, TERMINAL_DECISIONS as pn, reconnectRetainedRun as pr, rollingDispatch as pt, scopeRetainedOwnerPriorSpend as q, unknownExecutionBindingReceipt as qi, prepareJsonlAppend as qn, loopEventToOtelSpan as qr, DEFAULT_STALL_AFTER_MS as qt, createSupervisor as r, createSandboxToolPartState as ra, runWorktreeHarness as ri, peerMailTools as rn, ReservationWaitRefused as rr, coordinationProfileToolPrefix as rt, runFinalizer as s, mapSandboxEvent as sa, DEFAULT_LOCAL_HARNESS as si, bridgeAdmissionRefusal as sn, newUsageTotals as sr, readWorkerInteractiveBinding as st, DEFAULT_MAX_DEPTH as t, assertSandboxServedModel as ta, sanitizeRuntimeStreamEvent as ti, createPeerMailbox as tn, executorFailure as tr, resolveSpawnResourcePaths as tt, HarnessTurnFailedError as u, sandboxEventServedBackend as ua, harnessSupportsReasoningEffort as ui, createCodexRolloutStoreReader as un, bridgeRuntimeAttachmentsKey as ur, startRetainedInteractiveRun as ut, withDriverExecutor as v, providerMessageText as va, defineProfileMaterializationContract as vi, createSandboxLineage as vn, destroyInteractiveEnvironment as vr, CheckUnavailableError as vt, meterRuntimeOwnedAccounting as w, promptResourceProfileMaterialization as wi, routerBrain as wn, linkAbort as wr, distillFindings as wt, beginScopeOwnerAttempt as x, promptControlProfileMaterialization as xi, captureBeforeDestroy as xn, openSlotGroup as xr, bestComposite as xt, SUBTREE_RESULT_LIMIT as y, fullProfileMaterialization as yi, acquireSandbox as yn, environmentGone as yr, admitContinuationPolicy as yt, bindScopeRetainedOwnerProvider as z, providerAttemptEvidence as zi, FileSpawnJournal as zn, resolveRedactor as zr, createRouterTranscript as zt };
29402
29540
 
29403
- //# sourceMappingURL=supervisor-Dz4XXtK1.js.map
29541
+ //# sourceMappingURL=supervisor-CSMb8HBU.js.map