@tangle-network/agent-runtime 0.222.1 → 0.224.2

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 (52) hide show
  1. package/dist/{activation-C3FIZinc.js → activation-DQ_hkk7P.js} +2 -2
  2. package/dist/{activation-C3FIZinc.js.map → activation-DQ_hkk7P.js.map} +1 -1
  3. package/dist/{activation-CoaTi81Q.d.ts → activation-DVBlhoLp.d.ts} +3 -3
  4. package/dist/agent.d.ts +1 -1
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-BMFwV_aM.js → coordination-driver-nx4_rGR5.js} +12 -4
  7. package/dist/coordination-driver-nx4_rGR5.js.map +1 -0
  8. package/dist/{delegate-_MIPlySb.js → delegate-CUpNuPNi.js} +2 -2
  9. package/dist/{delegate-_MIPlySb.js.map → delegate-CUpNuPNi.js.map} +1 -1
  10. package/dist/durable.d.ts +5 -2
  11. package/dist/durable.js +24 -2
  12. package/dist/durable.js.map +1 -1
  13. package/dist/{graph-DAzvl-CD.js → graph-BC7dHj5x.js} +3 -3
  14. package/dist/{graph-DAzvl-CD.js.map → graph-BC7dHj5x.js.map} +1 -1
  15. package/dist/{improvement-cycle-DH28Q79j.js → improvement-cycle-BAIb1LPs.js} +4 -4
  16. package/dist/improvement-cycle-BAIb1LPs.js.map +1 -0
  17. package/dist/{index-ZJQ4RpP6.d.ts → index-DoYdcnIt.d.ts} +5 -2
  18. package/dist/index.d.ts +4 -4
  19. package/dist/index.js +7 -7
  20. package/dist/intelligence.d.ts +2 -2
  21. package/dist/intelligence.js +3 -3
  22. package/dist/kernel.d.ts +3 -3
  23. package/dist/kernel.js +9 -9
  24. package/dist/{loop-runner-bin-D5F5XAqC.js → loop-runner-bin-B-PXUbjh.js} +3 -3
  25. package/dist/{loop-runner-bin-D5F5XAqC.js.map → loop-runner-bin-B-PXUbjh.js.map} +1 -1
  26. package/dist/{loop-runner-bin-CscIVOv-.d.ts → loop-runner-bin-SVLOSCrt.d.ts} +3 -3
  27. package/dist/loop-runner-bin.d.ts +1 -1
  28. package/dist/loop-runner-bin.js +1 -1
  29. package/dist/mcp/bin.js +3 -3
  30. package/dist/mcp/index.d.ts +2 -2
  31. package/dist/mcp/index.js +4 -4
  32. package/dist/{provision-supervisor-ONy4pJ0l.js → provision-supervisor-Cq0Bh0ea.js} +3 -3
  33. package/dist/{provision-supervisor-ONy4pJ0l.js.map → provision-supervisor-Cq0Bh0ea.js.map} +1 -1
  34. package/dist/{runtime-CGZo3BpF.js → runtime-C55MMC3L.js} +8 -8
  35. package/dist/{runtime-CGZo3BpF.js.map → runtime-C55MMC3L.js.map} +1 -1
  36. package/dist/{server-Z-5x4YsU.js → server-COCDO8Ke.js} +3 -3
  37. package/dist/{server-Z-5x4YsU.js.map → server-COCDO8Ke.js.map} +1 -1
  38. package/dist/{stream-agent-turn-CQf-EMwX.d.ts → stream-agent-turn-V9uKc3a9.d.ts} +53 -4
  39. package/dist/{structural-rollout-ysIAMLwb.js → structural-rollout-CpSz-kPV.js} +2 -2
  40. package/dist/{structural-rollout-ysIAMLwb.js.map → structural-rollout-CpSz-kPV.js.map} +1 -1
  41. package/dist/{supervise-l9fd1ZaI.js → supervise-lch5HIgz.js} +3 -3
  42. package/dist/{supervise-l9fd1ZaI.js.map → supervise-lch5HIgz.js.map} +1 -1
  43. package/dist/{supervisor-af7-tQrQ.js → supervisor-2fsHN1Mf.js} +161 -42
  44. package/dist/supervisor-2fsHN1Mf.js.map +1 -0
  45. package/dist/testing.d.ts +2 -2
  46. package/dist/testing.js +12 -12
  47. package/dist/tui/index.d.ts +1 -1
  48. package/dist/tui/index.js +1 -1
  49. package/package.json +4 -4
  50. package/dist/coordination-driver-BMFwV_aM.js.map +0 -1
  51. package/dist/improvement-cycle-DH28Q79j.js.map +0 -1
  52. package/dist/supervisor-af7-tQrQ.js.map +0 -1
@@ -764,7 +764,8 @@ function cloneSpend(spend) {
764
764
  ...spend.usdKnown === false ? { usdKnown: false } : {},
765
765
  ...spend.usdEstimated !== void 0 ? { usdEstimated: spend.usdEstimated } : {},
766
766
  ms: spend.ms,
767
- ...boxMinutesOf(spend)
767
+ ...boxMinutesOf(spend),
768
+ ...spend.tokensProvenance === void 0 ? {} : { tokensProvenance: spend.tokensProvenance }
768
769
  };
769
770
  }
770
771
  /**
@@ -14190,6 +14191,9 @@ function mergeBridgeObservedModel(current, next) {
14190
14191
  * unknown reconcile) so a child can never refund twice. Reconciling an OPEN ticket always
14191
14192
  * closes it: a fail-loud condition settles the reservation first and throws afterwards, so no
14192
14193
  * error path can strand a reservation past the join barrier's `assertNoOpenTickets`.
14194
+ * Measured spend above a reservation is not a fail-loud condition. The pool commits it, returns
14195
+ * it as a `BudgetViolation`, and refuses later reservations from the reduced free balance; the
14196
+ * work it paid for is not discarded.
14193
14197
  * A child that declared no `maxUsd` reserved no dollar allocation, so its real dollars are
14194
14198
  * committed as observed spend and debited from the root's balance rather than treated as an
14195
14199
  * overspend of a $0 ceiling it never asked for. If dollar cost is unknowable under a
@@ -14207,6 +14211,20 @@ function mergeBridgeObservedModel(current, next) {
14207
14211
  *
14208
14212
  * @experimental
14209
14213
  */
14214
+ /**
14215
+ * A reconciliation whose spend the pool cannot verify. It is thrown after the reservation has
14216
+ * settled. `budgetViolation` carries any measured overspend on the same settlement, so a child
14217
+ * that fails closed on the fault still records how far its known channels exceeded the
14218
+ * reservation.
14219
+ */
14220
+ var BudgetReconcileFault = class extends Error {
14221
+ budgetViolation;
14222
+ constructor(message, budgetViolation) {
14223
+ super(message);
14224
+ this.name = "BudgetReconcileFault";
14225
+ if (budgetViolation !== void 0) this.budgetViolation = budgetViolation;
14226
+ }
14227
+ };
14210
14228
  /** Reject malformed ceilings before they can mint capacity through negative reservations. */
14211
14229
  function assertValidBudget(budget, label = "budget") {
14212
14230
  const safeInteger = (value, field) => {
@@ -14370,12 +14388,25 @@ function createBudgetPool(root, runStartedAtMs, restore = {}) {
14370
14388
  if (limit && limit.unit !== value.unit) throw new Error(`resource ${name}: unit mismatch`);
14371
14389
  }
14372
14390
  }
14373
- function commitResources(spend, reserved = {}, requireAll = true) {
14374
- let violation;
14391
+ /**
14392
+ * Commit named-resource spend and classify it. `allocations` is the settling reservation's own
14393
+ * resource allocations, or `undefined` for spend that holds no reservation (`observe`, restore).
14394
+ *
14395
+ * Unverifiable usage is a `fault`: the remaining balance is consumed so admission closes.
14396
+ * Measured usage above an allocation is `overspent`. Without allocations, measured usage that
14397
+ * leaves a root limit overdrawn is `rootExceeded`. A reservation that stays within its own
14398
+ * allocation is never charged with a root overdraw: `reserve` admits an allocation only from
14399
+ * the remaining balance, so a negative balance at its settlement was caused, and reported, by
14400
+ * earlier spend.
14401
+ */
14402
+ function commitResources(spend, allocations, requireAll = true) {
14403
+ let fault;
14404
+ let rootExceeded;
14405
+ const overspent = [];
14375
14406
  for (const [name, state] of resources) {
14376
14407
  const value = spend.resources?.[name];
14377
14408
  if (!requireAll && value === void 0) continue;
14378
- const allocation = reserved?.[name]?.limit ?? 0;
14409
+ const allocation = allocations?.[name]?.limit ?? 0;
14379
14410
  const amount = value?.amount ?? 0;
14380
14411
  state.reserved -= allocation;
14381
14412
  const committed = state.committed + amount;
@@ -14387,11 +14418,20 @@ function createBudgetPool(root, runStartedAtMs, restore = {}) {
14387
14418
  const retained = Math.max(0, state.remaining);
14388
14419
  state.committed += retained;
14389
14420
  state.remaining -= retained;
14390
- violation ??= overflow ? `resource ${name}: amount overflow under an enforced limit` : `resource ${name}: unknown usage under an enforced limit`;
14391
- } else if (reserved?.[name] && amount > allocation) violation ??= `resource ${name}: spent ${amount} > reserved ${allocation}`;
14392
- else if (state.remaining < 0) violation ??= `resource ${name}: exceeded root limit ${state.limit}`;
14421
+ fault ??= overflow ? `resource ${name}: amount overflow under an enforced limit` : `resource ${name}: unknown usage under an enforced limit`;
14422
+ } else if (allocations !== void 0) {
14423
+ if (amount > allocation) overspent.push({
14424
+ channel: `resource:${name}`,
14425
+ reserved: allocation,
14426
+ spent: amount
14427
+ });
14428
+ } else if (state.remaining < 0) rootExceeded ??= `resource ${name}: exceeded root limit ${state.limit}`;
14393
14429
  }
14394
- return violation;
14430
+ return {
14431
+ ...fault ? { fault } : {},
14432
+ overspent,
14433
+ ...rootExceeded ? { rootExceeded } : {}
14434
+ };
14395
14435
  }
14396
14436
  let nextTicketId = 0;
14397
14437
  const open = /* @__PURE__ */ new Map();
@@ -14475,11 +14515,23 @@ function createBudgetPool(root, runStartedAtMs, restore = {}) {
14475
14515
  const unknownUnderCap = usdCapped && spent.usdKnown === false;
14476
14516
  const spentTokens = chargedTokens(spent.tokens);
14477
14517
  const usdBudgeted = ticket.reserved.usdBudgeted !== false;
14478
- let violation;
14479
- if (spentTokens > rTokens) violation = `ticket ${ticket.id} spent ${spentTokens} tokens > reserved ${rTokens}`;
14480
- else if (spent.iterations > rIterations) violation = `ticket ${ticket.id} spent ${spent.iterations} iterations > reserved ${rIterations}`;
14481
- else if (unknownUnderCap) violation = `ticket ${ticket.id} reported unknown dollar cost under a dollar-capped budget`;
14482
- else if (usdCapped && usdBudgeted && spent.usd > rUsd) violation = `ticket ${ticket.id} spent $${spent.usd} > reserved $${rUsd}`;
14518
+ const overspent = [];
14519
+ if (spentTokens > rTokens) overspent.push({
14520
+ channel: "tokens",
14521
+ reserved: rTokens,
14522
+ spent: spentTokens
14523
+ });
14524
+ if (spent.iterations > rIterations) overspent.push({
14525
+ channel: "iterations",
14526
+ reserved: rIterations,
14527
+ spent: spent.iterations
14528
+ });
14529
+ let fault = unknownUnderCap ? `ticket ${ticket.id} reported unknown dollar cost under a dollar-capped budget` : void 0;
14530
+ if (!unknownUnderCap && usdCapped && usdBudgeted && spent.usd > rUsd) overspent.push({
14531
+ channel: "usd",
14532
+ reserved: rUsd,
14533
+ spent: spent.usd
14534
+ });
14483
14535
  open.delete(ticket.id);
14484
14536
  if (spent.tokensKnown === false) tokensTainted = true;
14485
14537
  if (!hasCompleteCacheBreakdown(spent.tokens)) cacheBreakdownTainted = true;
@@ -14498,9 +14550,12 @@ function createBudgetPool(root, runStartedAtMs, restore = {}) {
14498
14550
  freeUsd = 0;
14499
14551
  } else freeUsd += rUsd - spent.usd;
14500
14552
  } else committedUsd += spent.usd;
14501
- const resourceViolation = commitResources(spent, ticket.reserved.resources);
14502
- violation ??= resourceViolation;
14503
- if (violation !== void 0) throw new Error(`budget pool: ${violation}`);
14553
+ const resourceSettlement = commitResources(spent, ticket.reserved.resources ?? {});
14554
+ fault ??= resourceSettlement.fault;
14555
+ overspent.push(...resourceSettlement.overspent);
14556
+ const violation = overspent.length === 0 ? void 0 : Object.freeze({ overspent: Object.freeze(overspent.map((entry) => Object.freeze(entry))) });
14557
+ if (fault !== void 0) throw new BudgetReconcileFault(`budget pool: ${fault}`, violation);
14558
+ return violation;
14504
14559
  }
14505
14560
  function observe(spend, options = {}) {
14506
14561
  assertValidSpend(spend, "observed spend");
@@ -14516,7 +14571,8 @@ function createBudgetPool(root, runStartedAtMs, restore = {}) {
14516
14571
  committedIterations += spend.iterations;
14517
14572
  committedUsd += spend.usd;
14518
14573
  if (usdCapped) freeUsd -= spend.usd;
14519
- const violation = commitResources(spend, {}, !options.partial);
14574
+ const settlement = commitResources(spend, void 0, !options.partial);
14575
+ const violation = settlement.fault ?? settlement.rootExceeded;
14520
14576
  if (violation) throw new ValidationError$1(`budget pool: ${violation}`);
14521
14577
  }
14522
14578
  function readout() {
@@ -15450,8 +15506,10 @@ async function replaySpawnTree(journal, blobs, root) {
15450
15506
  kind: "down",
15451
15507
  handle: handleFor(ev.id, "cancelled"),
15452
15508
  reason: ev.reason,
15509
+ ...ev.outRef === void 0 ? {} : { outRef: ev.outRef },
15453
15510
  infra: ev.infra === true,
15454
15511
  ...ev.providerModel === void 0 ? {} : { providerModel: copyProviderModelEvidence(ev.providerModel) },
15512
+ ...budgetViolationOf(ev),
15455
15513
  trace: ev.trace ?? {
15456
15514
  status: "unavailable",
15457
15515
  reason: "execution-did-not-start"
@@ -15468,8 +15526,10 @@ async function replaySpawnTree(journal, blobs, root) {
15468
15526
  kind: "down",
15469
15527
  handle: handleFor(ev.id, "failed"),
15470
15528
  reason: ev.reason ?? ev.verdict?.notes ?? "child down",
15529
+ ...ev.outRef === void 0 ? {} : { outRef: ev.outRef },
15471
15530
  infra: ev.infra === true,
15472
15531
  ...ev.providerModel === void 0 ? {} : { providerModel: copyProviderModelEvidence(ev.providerModel) },
15532
+ ...budgetViolationOf(ev),
15473
15533
  trace,
15474
15534
  ...settlementTime(ev.at),
15475
15535
  seq: ev.seq
@@ -15489,6 +15549,7 @@ async function replaySpawnTree(journal, blobs, root) {
15489
15549
  verdict: ev.verdict,
15490
15550
  spent: cloneSpend(ev.spent),
15491
15551
  ...ev.providerModel === void 0 ? {} : { providerModel: copyProviderModelEvidence(ev.providerModel) },
15552
+ ...budgetViolationOf(ev),
15492
15553
  trace,
15493
15554
  ...settlementTime(ev.at),
15494
15555
  seq: ev.seq
@@ -15569,6 +15630,7 @@ function materializeTreeView(events) {
15569
15630
  node.providerModel = copyProviderModelEvidence(ev.providerModel);
15570
15631
  node.outRef = ev.outRef;
15571
15632
  node.trace = traceEvidenceFor(ev);
15633
+ node.budgetViolation = budgetViolationOf(ev).budgetViolation;
15572
15634
  const settledAt = Date.parse(ev.at);
15573
15635
  if (Number.isFinite(settledAt)) node.settledAt = settledAt;
15574
15636
  } else if (ev.kind === "woken") {
@@ -15591,6 +15653,7 @@ function materializeTreeView(events) {
15591
15653
  if (ev.spent !== void 0) node.spent = cloneSpend(ev.spent);
15592
15654
  node.providerModel = copyProviderModelEvidence(ev.providerModel);
15593
15655
  node.outRef = ev.outRef;
15656
+ node.budgetViolation = budgetViolationOf(ev).budgetViolation;
15594
15657
  const settledAt = Date.parse(ev.at);
15595
15658
  if (Number.isFinite(settledAt)) node.settledAt = settledAt;
15596
15659
  }
@@ -15644,6 +15707,15 @@ function pendingWaits(events) {
15644
15707
  }
15645
15708
  return pending.sort((a, b) => a.ordinal - b.ordinal);
15646
15709
  }
15710
+ /** Copy a terminal record's overspend at the journal boundary; absent stays absent. */
15711
+ function budgetViolationOf(event) {
15712
+ if (event.budgetViolation === void 0) return {};
15713
+ return { budgetViolation: Object.freeze({ overspent: Object.freeze(event.budgetViolation.overspent.map((entry) => Object.freeze({
15714
+ channel: entry.channel,
15715
+ reserved: entry.reserved,
15716
+ spent: entry.spent
15717
+ }))) }) };
15718
+ }
15647
15719
  /** Copy provider evidence at the journal boundary so replay never exposes mutable event state. */
15648
15720
  function copyProviderModelEvidence(evidence) {
15649
15721
  if (evidence === void 0) return void 0;
@@ -15686,6 +15758,7 @@ function freezeSnapshot(node) {
15686
15758
  providerModel: node.providerModel,
15687
15759
  outRef: node.outRef,
15688
15760
  trace: node.trace,
15761
+ ...node.budgetViolation === void 0 ? {} : { budgetViolation: node.budgetViolation },
15689
15762
  settledAt: node.settledAt,
15690
15763
  spawnedAt: node.spawnedAt
15691
15764
  };
@@ -19286,15 +19359,18 @@ async function prepareInterruptedExecutors(opts, events, signal, now, parentId =
19286
19359
  const validation = createBudgetPool(rootBudget, 0);
19287
19360
  const reservation = validation.reserve(node.budget);
19288
19361
  if (!reservation.ok) throw new RuntimeRunStateError(`retained child '${node.id}' exceeds its original root budget`);
19289
- let violation;
19362
+ let fault;
19363
+ let budgetViolation;
19290
19364
  try {
19291
- validation.reconcile(reservation.ticket, recorded.spent);
19365
+ budgetViolation = validation.reconcile(reservation.ticket, recorded.spent);
19292
19366
  } catch (error) {
19293
- violation = error instanceof Error ? error.message : String(error);
19367
+ fault = error instanceof Error ? error.message : String(error);
19368
+ if (error instanceof BudgetReconcileFault) budgetViolation = error.budgetViolation;
19294
19369
  }
19295
19370
  accepted.push({
19296
19371
  result: recorded,
19297
- ...violation === void 0 ? {} : { violation }
19372
+ ...fault === void 0 ? {} : { fault },
19373
+ ...budgetViolation === void 0 ? {} : { budgetViolation }
19298
19374
  });
19299
19375
  continue;
19300
19376
  }
@@ -19336,20 +19412,21 @@ async function prepareInterruptedExecutors(opts, events, signal, now, parentId =
19336
19412
  });
19337
19413
  }
19338
19414
  let seq = events.reduce((max, event) => closesCursorSlot(event) ? Math.max(max, event.seq) : max, -1) + 1;
19339
- for (const { result, violation } of accepted) {
19415
+ for (const { result, fault, budgetViolation } of accepted) {
19340
19416
  signal.throwIfAborted();
19341
19417
  const failureReason = executorFailureReason(result);
19342
- const reason = violation ?? failureReason;
19418
+ const reason = fault ?? failureReason;
19343
19419
  await opts.journal.appendEvent(opts.runId, {
19344
19420
  kind: "settled",
19345
19421
  id: result.id,
19346
19422
  status: reason === void 0 ? "done" : "down",
19347
19423
  outRef: result.outRef,
19348
19424
  ...reason === void 0 ? {} : {
19349
- infra: violation !== void 0,
19425
+ infra: fault !== void 0,
19350
19426
  reason
19351
19427
  },
19352
19428
  spent: result.spent,
19429
+ ...budgetViolation === void 0 ? {} : { budgetViolation },
19353
19430
  ...result.verdict ? { verdict: result.verdict } : {},
19354
19431
  seq: seq++,
19355
19432
  at: new Date(now()).toISOString()
@@ -20461,7 +20538,7 @@ function createScope(args) {
20461
20538
  try {
20462
20539
  await interactiveBindingCommitted;
20463
20540
  } catch {
20464
- resolution = downRecord("interactive worker binding persistence failed", true, s.trace, s.metered, s.providerModel);
20541
+ resolution = downRecord("interactive worker binding persistence failed", true, s.trace, s.metered, s.providerModel, s.outRef);
20465
20542
  }
20466
20543
  live.resolved = resolution;
20467
20544
  return resolution;
@@ -21194,6 +21271,7 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
21194
21271
  if (settlement.kind === "down") {
21195
21272
  const cancellation = child.cancellationReason;
21196
21273
  child.status = cancellation === void 0 ? "failed" : "cancelled";
21274
+ child.outRef = settlement.outRef;
21197
21275
  child.trace = settlement.trace;
21198
21276
  child.providerModel = settlement.providerModel;
21199
21277
  if (!child.recoveryPending) await args.journal.appendEvent(args.root, {
@@ -21210,6 +21288,7 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
21210
21288
  reason: settlement.reason,
21211
21289
  ...settlement.outRef ? { outRef: settlement.outRef } : {},
21212
21290
  ...settlement.providerModel ? { providerModel: settlement.providerModel } : {},
21291
+ ...child.budgetViolation ? { budgetViolation: child.budgetViolation } : {},
21213
21292
  trace: settlement.trace,
21214
21293
  seq,
21215
21294
  at
@@ -21226,6 +21305,7 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
21226
21305
  payload: {
21227
21306
  childId: child.id,
21228
21307
  status: "down",
21308
+ ...settlement.outRef === void 0 ? {} : { outRef: settlement.outRef },
21229
21309
  reason: settlement.reason,
21230
21310
  infra: settlement.infra,
21231
21311
  spent: child.spent,
@@ -21237,7 +21317,9 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
21237
21317
  handle,
21238
21318
  reason: settlement.reason,
21239
21319
  infra: settlement.infra,
21320
+ ...settlement.outRef === void 0 ? {} : { outRef: settlement.outRef },
21240
21321
  ...settlement.providerModel ? { providerModel: settlement.providerModel } : {},
21322
+ ...child.budgetViolation ? { budgetViolation: child.budgetViolation } : {},
21241
21323
  trace: settlement.trace,
21242
21324
  settledAt,
21243
21325
  seq
@@ -21256,6 +21338,7 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
21256
21338
  ...settlement.verdict ? { verdict: settlement.verdict } : {},
21257
21339
  spent: settlement.spent,
21258
21340
  ...settlement.providerModel ? { providerModel: settlement.providerModel } : {},
21341
+ ...child.budgetViolation ? { budgetViolation: child.budgetViolation } : {},
21259
21342
  trace: settlement.trace,
21260
21343
  seq,
21261
21344
  at
@@ -21286,6 +21369,7 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
21286
21369
  ...settlement.verdict ? { verdict: settlement.verdict } : {},
21287
21370
  spent: settlement.spent,
21288
21371
  ...settlement.providerModel ? { providerModel: settlement.providerModel } : {},
21372
+ ...child.budgetViolation ? { budgetViolation: child.budgetViolation } : {},
21289
21373
  trace: settlement.trace,
21290
21374
  settledAt,
21291
21375
  seq
@@ -21308,6 +21392,7 @@ function settledNodeEvidence(child, settlement, settledAt) {
21308
21392
  ...child.providerModel ? { providerModel: detachedSnapshot(child.providerModel, "provider model evidence") } : {},
21309
21393
  ...child.materialization ? { materialization: detachedSnapshot(child.materialization, "materialization receipt") } : {},
21310
21394
  ...child.executionBindings.length > 0 ? { executionBindings: detachedSnapshot([...child.executionBindings], "execution binding receipts") } : {},
21395
+ ...child.budgetViolation ? { budgetViolation: detachedSnapshot(child.budgetViolation, "budget violation") } : {},
21311
21396
  trace: detachedSnapshot(settlement.trace, "worker trace evidence")
21312
21397
  };
21313
21398
  }
@@ -21392,6 +21477,28 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
21392
21477
  let terminalTelemetryCaptured = false;
21393
21478
  let teardownStarted = false;
21394
21479
  let traceEvidence;
21480
+ let retainedOutputRef;
21481
+ const retainOutput = async (result, measured = result.spent) => {
21482
+ let usageError;
21483
+ try {
21484
+ assertReportedSpend(result.spent, `scope.spawn ${live.id}`);
21485
+ live.spent = executor.accounting?.()?.reported ?? measured;
21486
+ terminalTelemetryCaptured = true;
21487
+ live.executorDone = true;
21488
+ } catch (error) {
21489
+ usageError = error;
21490
+ }
21491
+ const out = detachedSnapshot(result.out, "scope child output");
21492
+ const outRef = contentAddress(out);
21493
+ await blobs.put(outRef, out);
21494
+ retainedOutputRef = outRef;
21495
+ if (usageError !== void 0) throw usageError;
21496
+ return {
21497
+ ...result,
21498
+ out,
21499
+ outRef
21500
+ };
21501
+ };
21395
21502
  const captureTraceOnce = async () => {
21396
21503
  traceEvidence ??= await captureWorkerTraceEvidence(live.readTraceSource, blobs, started);
21397
21504
  return traceEvidence;
@@ -21424,13 +21531,16 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
21424
21531
  resources: void 0
21425
21532
  }, opts.budget);
21426
21533
  try {
21427
- pool.reconcile(ticket, spend);
21428
- } catch {}
21534
+ live.budgetViolation = pool.reconcile(ticket, spend);
21535
+ } catch (fault) {
21536
+ if (fault instanceof BudgetReconcileFault) live.budgetViolation = fault.budgetViolation;
21537
+ }
21429
21538
  throw error;
21430
21539
  }
21431
- pool.reconcile(ticket, spend);
21540
+ live.budgetViolation = pool.reconcile(ticket, spend);
21432
21541
  return;
21433
21542
  } catch (error) {
21543
+ if (error instanceof BudgetReconcileFault) live.budgetViolation = error.budgetViolation;
21434
21544
  reconciliationError = error;
21435
21545
  return error;
21436
21546
  }
@@ -21455,9 +21565,9 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
21455
21565
  });
21456
21566
  }, childAbort.signal);
21457
21567
  live.spent = spend;
21568
+ const reported = executor.resultArtifact();
21569
+ artifact = await retainOutput(reported, preserveUnknownTelemetry(spend, reported.spent));
21458
21570
  await executionEvidence.complete();
21459
- artifact = executor.resultArtifact();
21460
- assertReportedSpend(artifact.spent, `scope.spawn ${live.id}`);
21461
21571
  const accounting = executor.accounting?.();
21462
21572
  const terminalSpend = preserveUnknownTelemetry(spend, artifact.spent);
21463
21573
  live.spent = accounting?.reported ?? terminalSpend;
@@ -21466,8 +21576,7 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
21466
21576
  const reconcileError = reconcileOnce(accounting?.reservation ?? terminalSpend);
21467
21577
  if (reconcileError !== void 0) throw reconcileError;
21468
21578
  } else {
21469
- const terminal = await awaitAbortable(Promise.resolve(ran), childAbort.signal);
21470
- assertReportedSpend(terminal.spent, `scope.spawn ${live.id}`);
21579
+ const terminal = await retainOutput(await awaitAbortable(Promise.resolve(ran), childAbort.signal));
21471
21580
  await executionEvidence.complete();
21472
21581
  const accounting = executor.accounting?.();
21473
21582
  live.spent = accounting?.reported ?? terminal.spent;
@@ -21482,10 +21591,9 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
21482
21591
  const trace = await captureTraceOnce();
21483
21592
  if (childAbort.signal.aborted && live.acceptedResult === void 0) {
21484
21593
  await teardownOnce(opts.shutdown ?? "brutalKill");
21485
- return downRecord("aborted before settle", true, trace, ownMetered, runtimeOwnedExecutorProviderEvidence(executor));
21594
+ return downRecord("aborted before settle", true, trace, ownMetered, runtimeOwnedExecutorProviderEvidence(executor), retainedOutputRef);
21486
21595
  }
21487
- const outRef = contentAddress(artifact.out);
21488
- await blobs.put(outRef, artifact.out);
21596
+ const outRef = artifact.outRef;
21489
21597
  const failureReason = executorFailureReason(artifact);
21490
21598
  if (failureReason !== void 0) {
21491
21599
  await teardownOnce(opts.shutdown ?? 5e3).catch(() => void 0);
@@ -21554,8 +21662,9 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
21554
21662
  ms
21555
21663
  });
21556
21664
  }
21665
+ live.budgetViolation = void 0;
21557
21666
  return {
21558
- ...downRecord(errMessage(err), true, trace, executor.metered?.()),
21667
+ ...downRecord(errMessage(err), true, trace, executor.metered?.(), void 0, retainedOutputRef),
21559
21668
  reconciled: live.spent
21560
21669
  };
21561
21670
  }
@@ -21579,7 +21688,7 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
21579
21688
  const aborted = childAbort.signal.aborted || isAbortError(err);
21580
21689
  if (started && !terminalTelemetryCaptured && accounting === void 0) live.spent = unknownFloor(live.spent);
21581
21690
  const reconcileError = reconcileOnce(accounting?.reservation ?? live.spent);
21582
- return downRecord(errMessage(err), evidenceError !== void 0 || teardownError !== void 0 || reconcileError !== void 0 || aborted || isInfraError(err), trace, executor.metered?.(), providerModel);
21691
+ return downRecord(errMessage(err), evidenceError !== void 0 || teardownError !== void 0 || reconcileError !== void 0 || aborted || isInfraError(err), trace, executor.metered?.(), providerModel, retainedOutputRef);
21583
21692
  } finally {
21584
21693
  await closeRetainedWrites();
21585
21694
  }
@@ -21646,7 +21755,8 @@ function makeTreeView(root, children) {
21646
21755
  ...c.settledAt === void 0 ? {} : { settledAt: c.settledAt },
21647
21756
  ...c.outRef ? { outRef: c.outRef } : {},
21648
21757
  ...c.trace ? { trace: c.trace } : {},
21649
- ...c.providerModel ? { providerModel: c.providerModel } : {}
21758
+ ...c.providerModel ? { providerModel: c.providerModel } : {},
21759
+ ...c.budgetViolation ? { budgetViolation: c.budgetViolation } : {}
21650
21760
  }));
21651
21761
  return {
21652
21762
  root,
@@ -21816,14 +21926,15 @@ function unknownFloor(spend) {
21816
21926
  }])) }
21817
21927
  };
21818
21928
  }
21819
- function downRecord(reason, infra, trace, metered, providerModel) {
21929
+ function downRecord(reason, infra, trace, metered, providerModel, outRef) {
21820
21930
  return {
21821
21931
  kind: "down",
21822
21932
  reason,
21823
21933
  infra,
21824
21934
  trace,
21825
21935
  ...providerModel ? { providerModel } : {},
21826
- ...metered ? { metered } : {}
21936
+ ...metered ? { metered } : {},
21937
+ ...outRef === void 0 ? {} : { outRef }
21827
21938
  };
21828
21939
  }
21829
21940
  /** The one place an absent interactive process is spelled, so every refusal reads the same. */
@@ -22441,6 +22552,9 @@ async function runDriverWithRetry(run) {
22441
22552
  };
22442
22553
  const decision = await run.reprompt?.onUnmetContract?.(context) ?? { steer: defaultUnmetContractSteer(context) };
22443
22554
  if (decision === "stop") return { refusedBy: "caller-stop" };
22555
+ if (run.signal.aborted) return { refusedBy: "aborted" };
22556
+ const afterHook = budgetStop(run.budget(), now());
22557
+ if (afterHook === "deadline" || afterHook === "budget-exhausted") return { refusedBy: afterHook };
22444
22558
  const steer = typeof decision.steer === "string" ? decision.steer.trim() : "";
22445
22559
  if (steer.length === 0) throw new ValidationError$1("runDriverWithRetry: onUnmetContract returned an empty steer — return a non-empty instruction or 'stop'");
22446
22560
  return { steer };
@@ -22448,6 +22562,11 @@ async function runDriverWithRetry(run) {
22448
22562
  for (let attempt = 1;; attempt += 1) {
22449
22563
  const before = run.progress();
22450
22564
  const startedAt = now();
22565
+ const admissionStop = run.signal.aborted ? "aborted" : budgetStop(run.budget(), now());
22566
+ if (admissionStop !== void 0) {
22567
+ if (reentry !== void 0) return;
22568
+ throw new DriverAttemptsExhaustedError(run.signal.aborted ? run.signal.reason : new ValidationError$1(`driver admission: ${admissionStop}`), attempts, admissionStop);
22569
+ }
22451
22570
  try {
22452
22571
  await run.drive(attempt, reentry);
22453
22572
  } catch (error) {
@@ -23390,6 +23509,6 @@ function isNonEmptySpend(s) {
23390
23509
  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);
23391
23510
  }
23392
23511
  //#endregion
23393
- export { bindReusableExecutorExecutionId as $, flatOtelSpan as $n, runtimeOwnedExecutorMaterialization as $r, addHarnessUsage as $t, waitUntil as A, randomSuffix as Ai, RunCancellationReason as An, promptResourceProfileMaterialization as Ar, spendFromUsageTotals as At, readWorkerInteractiveBinding as B, withBudgetResources as Bi, defaultRedactorIdentityMaterial as Bn, writeAllBytes as Br, createInbox as Bt, scopeOwnerExecutorNodeContext as C, addSpend as Ci, resolveAgentEnvironmentProvider as Cn, controlProfileMaterialization as Cr, workerTraceAnalysisStore as Ct, pollFor as D, hasCompleteCacheBreakdown as Di, sandboxSessionTraceSource as Dn, promptControlProfileMaterialization as Dr, meterUsageEvent as Dt, isWaitOutcome as E, deleteBoxSafe as Ei, decodeToolPart as En, profileMaterializationAxes$1 as Er, createBudgetPool as Et, scopeRetainedOwnerResult as F, unmeteredSpend as Fi, recoverRetainedRun as Fn, validateProfileMaterialization as Fr, workerTraceSeamKey as Ft, startRetainedInteractiveRun as G, promptOptionsFromAgentTurnInput as Gi, traceContextToEnv as Gn, inheritRuntimeOwnedExecutorAttestation as Gr, createPeerMailbox as Gt, workerInteractiveBindingsDir as H, abortError$2 as Hi, createPropagatingTraceEmitter as Hn, attestRuntimeOwnedScopeOwner as Hr, DEFAULT_PEER_MAIL_LIMITS as Ht, interactiveAdmissionSeamKey as I, withTimeout as Ii, startRetainedRun as In, worktreeCliProfileMaterialization as Ir, taskToPrompt as It, freeSlots as J, buildLoopSpanNodes as Jn, newExecutionAttemptId as Jr, peerMailVerbNames as Jt, destroyInteractiveEnvironment as K, providerMessageText as Ki, INTELLIGENCE_WIRE_VERSION as Kn, knownExecutionBindingReceipt as Kr, isPeerMailEnvelope as Kt, readWorkerInteractiveAdmissions as L, zeroSpend as Li, startRetainedRunInEnvironment as Ln, isNoEntError as Lr, DEFAULT_STALL_AFTER_MS as Lt, prepareScopeRetainedOwnerTask as M, stringifySafe as Mi, linkAbort as Mn, renderUnsupported as Mr, readWorkerTraceContext as Mt, scopeRetainedOwnerContext as N, throwAbort as Ni, runAbortable as Nn, sandboxActProfileMaterialization as Nr, workerTraceEnv as Nt, timerAt as O, isAbortError$2 as Oi, registerRetainedExecutorPreparation as On, promptModelProfileMaterialization as Or, newUsageTotals as Ot, scopeRetainedOwnerPriorSpend as P, throwIfAborted as Pi, reconnectRetainedRun as Pn, unsupportedProfileDimensions as Pr, workerTraceHeaders as Pt, teardownExecutor as Q, exportEvalRuns as Qn, runtimeOwnedExecutorExecutionBinding as Qr, bridgeModelRouteRefusal as Qt, workerInteractiveAdmissionFile as R, addResourceSpend as Ri, retainedCreateMaterial as Rn, parseCommittedJsonLines as Rr, createActivityLog as Rt, restoreScopeOwnerAcceptedExecution as S, sumSandboxUsage as Si, providerAsSandboxClient as Sn, assertProfileMaterialization as Sr, parseWorkerToolTraceArtifact as St, createWaitProbes as T, cloneSpend as Ti, createPushTraceSource as Tn, fullProfileMaterialization as Tr, assertValidBudget as Tt, reconnectRetainedInteractiveRun as U, awaitAbortable$1 as Ui, mergeTraceEnv as Un, authoredProfileDigest as Ur, PEER_MAIL_WIRE_KEY as Ut, workerInteractiveBindingFile as V, decodeHarnessUsage as Vi, resolveRedactor as Vn, attestRuntimeOwnedPendingExecutor as Vr, AUTHORITY_MARKERS as Vt, recoverRetainedInteractiveRun as W, promptFromAgentTurnInput as Wi, readTraceContextFromEnv as Wn, finalizeRuntimeOwnedPendingExecutor as Wr, claimsAuthority as Wt, rollingDispatch as X, createOpenInferenceFileExporter as Xn, recordRuntimeOwnedDriveHarnessProviderEvidence as Xr, isTerminalNodeStatus as Xt, queueOf as Y, buildRuntimeEventOtelSpans as Yn, providerAttemptEvidence as Yr, isLiveNodeStatus as Yt, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as Z, createOtelExporter as Zn, runtimeOwnedDriveHarnessProviderEvidence as Zr, bridgeAdmissionRefusal as Zt, createScope as _, mapSandboxEvent as _i, canonicalObservedModelParts as _n, harnessSupportsReasoningEffort as _r, pendingWaits as _t, pickBestDelivered as a, executableAgentProfileSnapshot as ai, TERMINAL_DECISIONS as an, createRuntimeEventCollector as ar, snapshotExecutorConfig as at, meterRuntimeOwnedProviderAttempt as b, sandboxEventServedBackend as bi, createAgentEnvironmentProviderRegistry as bn, CodexExecutionDiagnosticError as br, captureWorkerTraceEvidence as bt, DriverAttemptsExhaustedError as c, detachedSnapshot as ci, isTerminalDecision as cn, sanitizeKnowledgeReadinessReport as cr, createSteerableSandboxSession as ct, runDriverWithRetry as d, assertSandboxServedModel as di, probeSandboxCapabilities as dn, runWorktreeHarness as dr, FileSpawnJournal as dt, runtimeOwnedExecutorProviderEvidence as ei, createCodexRolloutStoreReader as en, generateSpanId as er, captureReusableExecutorConfig as et, driverChild as f, canonicalStreamEventFromSandboxEvent as fi, acquireSandbox as fn, captureWorktreeDiff as fr, InMemoryResultBlobStore as ft, beginScopeOwnerAttempt as g, isSandboxTerminalEvent as gi, runBrainLoop as gn, LOCAL_HARNESSES as gr, materializeTreeView as gt, withDriverExecutor as h, extractLlmCallEvent as hi, routerBrain as hn, DEFAULT_LOCAL_HARNESS as hr, loadSpawnForest as ht, collectDelivered as i, unknownMaterializationReceipt as ii, bridgeStopSignalKey as in, toOtelAttributes as ir, createExecutorRegistry as it, consumeScopeRetainedOwnerResult as j, sleep as ji, abortError as jn, renderProfileMaterializationIssues as jr, WORKER_TRACE_PROPAGATION as jt, validateWaitSpec as k, promptCacheTokenClasses as ki, retainedExecutorSeamKey as kn, promptOnlyProfileMaterialization as kr, spendFromUsageEvents as kt, classifyDriverFailure as l, projectSandboxOutcome as li, runAgentRounds as ln, sanitizeRuntimeStreamEvent as lr, createInPlaceCliExecutor as lt, isDriverSpec as m, createSandboxUsageLedger as mi, readPromptOptions as mn, removeWorktree as mr, insideCursorNamespace as mt, createSupervisor as n, runtimeOwnedScopeOwnerRuntime as ni, readCodexRolloutSession as nn, padSpanId as nr, cliWorktreeExecutor as nt, runFinalizer as o, executableAgentSpecSnapshot as oi, createSandboxForSpec as on, createRuntimeStreamEventCollector as or, createWorktreeCliExecutor as ot, driverExecutorFactory as p, createSandboxToolPartState as pi, assertBoxlessPromptOptions as pn, createWorktree as pr, InMemorySpawnJournal as pt, effectiveConcurrency as q, buildLoopOtelSpans as qn, knownMaterializationReceipt as qr, peerMailTools as qt, bestDelivered as r, unknownExecutionBindingReceipt as ri, bridgeRuntimeAttachmentsKey as rn, padTraceId as rr, createExecutor as rt, runTree as s, detachedFrozen as si, defaultSelectWinner as sn, sanitizeAgentRuntimeEvent as sr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as st, createRootHandle as t, runtimeOwnedPendingExecutorMaterialization as ti, harnessUsageIsEmpty as tn, loopEventToOtelSpan as tr, cliInPlaceExecutor as tt, defaultUnmetContractSteer as u, readSandboxOutcome as ui, createSandboxLineage as un, runSettledCommand as ur, FileResultBlobStore as ut, deriveNodeExecutionIdentity as v, mapSandboxToolEvent as vi, observedModelMatchesDeclared as vn, localHarnessExecutable as vr, replaySpawnTree as vt, settledToIteration as w, chargedTokens as wi, sandboxClientAsProvider as wn, defineProfileMaterializationContract as wr, contentAddress as wt, recordScopeOwnerMaterialization as x, sandboxProgressEvents as xi, providerAsExecutor as xn, AGENT_PROFILE_MATERIALIZATION_AXES as xr, isTraceAnalysisStore as xt, meterRuntimeOwnedAccounting as y, notifySandboxEventObserver as yi, DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS as yn, parseCodexTokenUsage as yr, WORKER_TOOL_TRACE_SCHEMA_VERSION as yt, attachWorker as z, resourceTelemetry as zi, defaultRedactor as zn, prepareJsonlAppend as zr, readWorkerProgress as zt };
23512
+ export { bindReusableExecutorExecutionId as $, exportEvalRuns as $n, runtimeOwnedExecutorExecutionBinding as $r, bridgeModelRouteRefusal as $t, waitUntil as A, promptCacheTokenClasses as Ai, retainedExecutorSeamKey as An, promptOnlyProfileMaterialization as Ar, spendFromUsageEvents as At, readWorkerInteractiveBinding as B, resourceTelemetry as Bi, defaultRedactor as Bn, prepareJsonlAppend as Br, readWorkerProgress as Bt, scopeOwnerExecutorNodeContext as C, sumSandboxUsage as Ci, providerAsSandboxClient as Cn, assertProfileMaterialization as Cr, workerTraceAnalysisStore as Ct, pollFor as D, deleteBoxSafe as Di, decodeToolPart as Dn, profileMaterializationAxes$1 as Dr, createBudgetPool as Dt, isWaitOutcome as E, cloneSpend as Ei, createPushTraceSource as En, fullProfileMaterialization as Er, assertValidBudget as Et, scopeRetainedOwnerResult as F, throwIfAborted as Fi, reconnectRetainedRun as Fn, unsupportedProfileDimensions as Fr, workerTraceHeaders as Ft, startRetainedInteractiveRun as G, promptFromAgentTurnInput as Gi, readTraceContextFromEnv as Gn, finalizeRuntimeOwnedPendingExecutor as Gr, claimsAuthority as Gt, workerInteractiveBindingsDir as H, decodeHarnessUsage as Hi, resolveRedactor as Hn, attestRuntimeOwnedPendingExecutor as Hr, AUTHORITY_MARKERS as Ht, interactiveAdmissionSeamKey as I, unmeteredSpend as Ii, recoverRetainedRun as In, validateProfileMaterialization as Ir, workerTraceSeamKey as It, freeSlots as J, buildLoopOtelSpans as Jn, knownMaterializationReceipt as Jr, peerMailTools as Jt, destroyInteractiveEnvironment as K, promptOptionsFromAgentTurnInput as Ki, traceContextToEnv as Kn, inheritRuntimeOwnedExecutorAttestation as Kr, createPeerMailbox as Kt, readWorkerInteractiveAdmissions as L, withTimeout as Li, startRetainedRun as Ln, worktreeCliProfileMaterialization as Lr, taskToPrompt as Lt, prepareScopeRetainedOwnerTask as M, sleep as Mi, abortError as Mn, renderProfileMaterializationIssues as Mr, WORKER_TRACE_PROPAGATION as Mt, scopeRetainedOwnerContext as N, stringifySafe as Ni, linkAbort as Nn, renderUnsupported as Nr, readWorkerTraceContext as Nt, timerAt as O, hasCompleteCacheBreakdown as Oi, sandboxSessionTraceSource as On, promptControlProfileMaterialization as Or, meterUsageEvent as Ot, scopeRetainedOwnerPriorSpend as P, throwAbort as Pi, runAbortable as Pn, sandboxActProfileMaterialization as Pr, workerTraceEnv as Pt, teardownExecutor as Q, createOtelExporter as Qn, runtimeOwnedDriveHarnessProviderEvidence as Qr, bridgeAdmissionRefusal as Qt, workerInteractiveAdmissionFile as R, zeroSpend as Ri, startRetainedRunInEnvironment as Rn, isNoEntError as Rr, DEFAULT_STALL_AFTER_MS as Rt, restoreScopeOwnerAcceptedExecution as S, sandboxProgressEvents as Si, providerAsExecutor as Sn, AGENT_PROFILE_MATERIALIZATION_AXES as Sr, parseWorkerToolTraceArtifact as St, createWaitProbes as T, chargedTokens as Ti, sandboxClientAsProvider as Tn, defineProfileMaterializationContract as Tr, BudgetReconcileFault as Tt, reconnectRetainedInteractiveRun as U, abortError$2 as Ui, createPropagatingTraceEmitter as Un, attestRuntimeOwnedScopeOwner as Ur, DEFAULT_PEER_MAIL_LIMITS as Ut, workerInteractiveBindingFile as V, withBudgetResources as Vi, defaultRedactorIdentityMaterial as Vn, writeAllBytes as Vr, createInbox as Vt, recoverRetainedInteractiveRun as W, awaitAbortable$1 as Wi, mergeTraceEnv as Wn, authoredProfileDigest as Wr, PEER_MAIL_WIRE_KEY as Wt, rollingDispatch as X, buildRuntimeEventOtelSpans as Xn, providerAttemptEvidence as Xr, isLiveNodeStatus as Xt, queueOf as Y, buildLoopSpanNodes as Yn, newExecutionAttemptId as Yr, peerMailVerbNames as Yt, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as Z, createOpenInferenceFileExporter as Zn, recordRuntimeOwnedDriveHarnessProviderEvidence as Zr, isTerminalNodeStatus as Zt, createScope as _, isSandboxTerminalEvent as _i, runBrainLoop as _n, LOCAL_HARNESSES as _r, pendingWaits as _t, pickBestDelivered as a, unknownMaterializationReceipt as ai, bridgeStopSignalKey as an, toOtelAttributes as ar, snapshotExecutorConfig as at, meterRuntimeOwnedProviderAttempt as b, notifySandboxEventObserver as bi, DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS as bn, parseCodexTokenUsage as br, captureWorkerTraceEvidence as bt, DriverAttemptsExhaustedError as c, detachedFrozen as ci, defaultSelectWinner as cn, sanitizeAgentRuntimeEvent as cr, createSteerableSandboxSession as ct, runDriverWithRetry as d, readSandboxOutcome as di, createSandboxLineage as dn, runSettledCommand as dr, FileSpawnJournal as dt, runtimeOwnedExecutorMaterialization as ei, addHarnessUsage as en, flatOtelSpan as er, captureReusableExecutorConfig as et, driverChild as f, assertSandboxServedModel as fi, probeSandboxCapabilities as fn, runWorktreeHarness as fr, InMemoryResultBlobStore as ft, beginScopeOwnerAttempt as g, extractLlmCallEvent as gi, routerBrain as gn, DEFAULT_LOCAL_HARNESS as gr, materializeTreeView as gt, withDriverExecutor as h, createSandboxUsageLedger as hi, readPromptOptions as hn, removeWorktree as hr, loadSpawnForest as ht, collectDelivered as i, unknownExecutionBindingReceipt as ii, bridgeRuntimeAttachmentsKey as in, padTraceId as ir, createExecutorRegistry as it, consumeScopeRetainedOwnerResult as j, randomSuffix as ji, RunCancellationReason as jn, promptResourceProfileMaterialization as jr, spendFromUsageTotals as jt, validateWaitSpec as k, isAbortError$2 as ki, registerRetainedExecutorPreparation as kn, promptModelProfileMaterialization as kr, newUsageTotals as kt, classifyDriverFailure as l, detachedSnapshot as li, isTerminalDecision as ln, sanitizeKnowledgeReadinessReport as lr, createInPlaceCliExecutor as lt, isDriverSpec as m, createSandboxToolPartState as mi, assertBoxlessPromptOptions as mn, createWorktree as mr, insideCursorNamespace as mt, createSupervisor as n, runtimeOwnedPendingExecutorMaterialization as ni, harnessUsageIsEmpty as nn, loopEventToOtelSpan as nr, cliWorktreeExecutor as nt, runFinalizer as o, executableAgentProfileSnapshot as oi, TERMINAL_DECISIONS as on, createRuntimeEventCollector as or, createWorktreeCliExecutor as ot, driverExecutorFactory as p, canonicalStreamEventFromSandboxEvent as pi, acquireSandbox as pn, captureWorktreeDiff as pr, InMemorySpawnJournal as pt, effectiveConcurrency as q, providerMessageText as qi, INTELLIGENCE_WIRE_VERSION as qn, knownExecutionBindingReceipt as qr, isPeerMailEnvelope as qt, bestDelivered as r, runtimeOwnedScopeOwnerRuntime as ri, readCodexRolloutSession as rn, padSpanId as rr, createExecutor as rt, runTree as s, executableAgentSpecSnapshot as si, createSandboxForSpec as sn, createRuntimeStreamEventCollector as sr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as st, createRootHandle as t, runtimeOwnedExecutorProviderEvidence as ti, createCodexRolloutStoreReader as tn, generateSpanId as tr, cliInPlaceExecutor as tt, defaultUnmetContractSteer as u, projectSandboxOutcome as ui, runAgentRounds as un, sanitizeRuntimeStreamEvent as ur, FileResultBlobStore as ut, deriveNodeExecutionIdentity as v, mapSandboxEvent as vi, canonicalObservedModelParts as vn, harnessSupportsReasoningEffort as vr, replaySpawnTree as vt, settledToIteration as w, addSpend as wi, resolveAgentEnvironmentProvider as wn, controlProfileMaterialization as wr, contentAddress as wt, recordScopeOwnerMaterialization as x, sandboxEventServedBackend as xi, createAgentEnvironmentProviderRegistry as xn, CodexExecutionDiagnosticError as xr, isTraceAnalysisStore as xt, meterRuntimeOwnedAccounting as y, mapSandboxToolEvent as yi, observedModelMatchesDeclared as yn, localHarnessExecutable as yr, WORKER_TOOL_TRACE_SCHEMA_VERSION as yt, attachWorker as z, addResourceSpend as zi, retainedCreateMaterial as zn, parseCommittedJsonLines as zr, createActivityLog as zt };
23394
23513
 
23395
- //# sourceMappingURL=supervisor-af7-tQrQ.js.map
23514
+ //# sourceMappingURL=supervisor-2fsHN1Mf.js.map