@tangle-network/agent-runtime 0.222.1 → 0.223.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 (50) hide show
  1. package/dist/{activation-C3FIZinc.js → activation-DQseYGj1.js} +2 -2
  2. package/dist/{activation-C3FIZinc.js.map → activation-DQseYGj1.js.map} +1 -1
  3. package/dist/{activation-CoaTi81Q.d.ts → activation-ojBkrqcl.d.ts} +2 -2
  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-9I9bvmU7.js} +11 -4
  7. package/dist/coordination-driver-9I9bvmU7.js.map +1 -0
  8. package/dist/{delegate-_MIPlySb.js → delegate-C6YK72Cu.js} +2 -2
  9. package/dist/{delegate-_MIPlySb.js.map → delegate-C6YK72Cu.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-oFuyqROQ.js} +3 -3
  14. package/dist/{graph-DAzvl-CD.js.map → graph-oFuyqROQ.js.map} +1 -1
  15. package/dist/{improvement-cycle-DH28Q79j.js → improvement-cycle-o6XXAZ6L.js} +3 -3
  16. package/dist/{improvement-cycle-DH28Q79j.js.map → improvement-cycle-o6XXAZ6L.js.map} +1 -1
  17. package/dist/{index-ZJQ4RpP6.d.ts → index-C8i3o4mJ.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-DiAaRQud.js} +3 -3
  25. package/dist/{loop-runner-bin-D5F5XAqC.js.map → loop-runner-bin-DiAaRQud.js.map} +1 -1
  26. package/dist/{loop-runner-bin-CscIVOv-.d.ts → loop-runner-bin-zaiQXpVo.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-BalCsZB7.js} +3 -3
  33. package/dist/{provision-supervisor-ONy4pJ0l.js.map → provision-supervisor-BalCsZB7.js.map} +1 -1
  34. package/dist/{runtime-CGZo3BpF.js → runtime-C77tIYS6.js} +8 -8
  35. package/dist/{runtime-CGZo3BpF.js.map → runtime-C77tIYS6.js.map} +1 -1
  36. package/dist/{server-Z-5x4YsU.js → server-Bk92H603.js} +3 -3
  37. package/dist/{server-Z-5x4YsU.js.map → server-Bk92H603.js.map} +1 -1
  38. package/dist/{stream-agent-turn-CQf-EMwX.d.ts → stream-agent-turn-CKyDuKIj.d.ts} +49 -3
  39. package/dist/{structural-rollout-ysIAMLwb.js → structural-rollout-Bb4Vstic.js} +2 -2
  40. package/dist/{structural-rollout-ysIAMLwb.js.map → structural-rollout-Bb4Vstic.js.map} +1 -1
  41. package/dist/{supervise-l9fd1ZaI.js → supervise-B1IioRQs.js} +3 -3
  42. package/dist/{supervise-l9fd1ZaI.js.map → supervise-B1IioRQs.js.map} +1 -1
  43. package/dist/{supervisor-af7-tQrQ.js → supervisor-CuBPrwGp.js} +113 -29
  44. package/dist/{supervisor-af7-tQrQ.js.map → supervisor-CuBPrwGp.js.map} +1 -1
  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 +1 -1
  50. package/dist/coordination-driver-BMFwV_aM.js.map +0 -1
@@ -14190,6 +14190,9 @@ function mergeBridgeObservedModel(current, next) {
14190
14190
  * unknown reconcile) so a child can never refund twice. Reconciling an OPEN ticket always
14191
14191
  * closes it: a fail-loud condition settles the reservation first and throws afterwards, so no
14192
14192
  * error path can strand a reservation past the join barrier's `assertNoOpenTickets`.
14193
+ * Measured spend above a reservation is not a fail-loud condition. The pool commits it, returns
14194
+ * it as a `BudgetViolation`, and refuses later reservations from the reduced free balance; the
14195
+ * work it paid for is not discarded.
14193
14196
  * A child that declared no `maxUsd` reserved no dollar allocation, so its real dollars are
14194
14197
  * committed as observed spend and debited from the root's balance rather than treated as an
14195
14198
  * overspend of a $0 ceiling it never asked for. If dollar cost is unknowable under a
@@ -14207,6 +14210,20 @@ function mergeBridgeObservedModel(current, next) {
14207
14210
  *
14208
14211
  * @experimental
14209
14212
  */
14213
+ /**
14214
+ * A reconciliation whose spend the pool cannot verify. It is thrown after the reservation has
14215
+ * settled. `budgetViolation` carries any measured overspend on the same settlement, so a child
14216
+ * that fails closed on the fault still records how far its known channels exceeded the
14217
+ * reservation.
14218
+ */
14219
+ var BudgetReconcileFault = class extends Error {
14220
+ budgetViolation;
14221
+ constructor(message, budgetViolation) {
14222
+ super(message);
14223
+ this.name = "BudgetReconcileFault";
14224
+ if (budgetViolation !== void 0) this.budgetViolation = budgetViolation;
14225
+ }
14226
+ };
14210
14227
  /** Reject malformed ceilings before they can mint capacity through negative reservations. */
14211
14228
  function assertValidBudget(budget, label = "budget") {
14212
14229
  const safeInteger = (value, field) => {
@@ -14370,12 +14387,25 @@ function createBudgetPool(root, runStartedAtMs, restore = {}) {
14370
14387
  if (limit && limit.unit !== value.unit) throw new Error(`resource ${name}: unit mismatch`);
14371
14388
  }
14372
14389
  }
14373
- function commitResources(spend, reserved = {}, requireAll = true) {
14374
- let violation;
14390
+ /**
14391
+ * Commit named-resource spend and classify it. `allocations` is the settling reservation's own
14392
+ * resource allocations, or `undefined` for spend that holds no reservation (`observe`, restore).
14393
+ *
14394
+ * Unverifiable usage is a `fault`: the remaining balance is consumed so admission closes.
14395
+ * Measured usage above an allocation is `overspent`. Without allocations, measured usage that
14396
+ * leaves a root limit overdrawn is `rootExceeded`. A reservation that stays within its own
14397
+ * allocation is never charged with a root overdraw: `reserve` admits an allocation only from
14398
+ * the remaining balance, so a negative balance at its settlement was caused, and reported, by
14399
+ * earlier spend.
14400
+ */
14401
+ function commitResources(spend, allocations, requireAll = true) {
14402
+ let fault;
14403
+ let rootExceeded;
14404
+ const overspent = [];
14375
14405
  for (const [name, state] of resources) {
14376
14406
  const value = spend.resources?.[name];
14377
14407
  if (!requireAll && value === void 0) continue;
14378
- const allocation = reserved?.[name]?.limit ?? 0;
14408
+ const allocation = allocations?.[name]?.limit ?? 0;
14379
14409
  const amount = value?.amount ?? 0;
14380
14410
  state.reserved -= allocation;
14381
14411
  const committed = state.committed + amount;
@@ -14387,11 +14417,20 @@ function createBudgetPool(root, runStartedAtMs, restore = {}) {
14387
14417
  const retained = Math.max(0, state.remaining);
14388
14418
  state.committed += retained;
14389
14419
  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}`;
14420
+ fault ??= overflow ? `resource ${name}: amount overflow under an enforced limit` : `resource ${name}: unknown usage under an enforced limit`;
14421
+ } else if (allocations !== void 0) {
14422
+ if (amount > allocation) overspent.push({
14423
+ channel: `resource:${name}`,
14424
+ reserved: allocation,
14425
+ spent: amount
14426
+ });
14427
+ } else if (state.remaining < 0) rootExceeded ??= `resource ${name}: exceeded root limit ${state.limit}`;
14393
14428
  }
14394
- return violation;
14429
+ return {
14430
+ ...fault ? { fault } : {},
14431
+ overspent,
14432
+ ...rootExceeded ? { rootExceeded } : {}
14433
+ };
14395
14434
  }
14396
14435
  let nextTicketId = 0;
14397
14436
  const open = /* @__PURE__ */ new Map();
@@ -14475,11 +14514,23 @@ function createBudgetPool(root, runStartedAtMs, restore = {}) {
14475
14514
  const unknownUnderCap = usdCapped && spent.usdKnown === false;
14476
14515
  const spentTokens = chargedTokens(spent.tokens);
14477
14516
  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}`;
14517
+ const overspent = [];
14518
+ if (spentTokens > rTokens) overspent.push({
14519
+ channel: "tokens",
14520
+ reserved: rTokens,
14521
+ spent: spentTokens
14522
+ });
14523
+ if (spent.iterations > rIterations) overspent.push({
14524
+ channel: "iterations",
14525
+ reserved: rIterations,
14526
+ spent: spent.iterations
14527
+ });
14528
+ let fault = unknownUnderCap ? `ticket ${ticket.id} reported unknown dollar cost under a dollar-capped budget` : void 0;
14529
+ if (!unknownUnderCap && usdCapped && usdBudgeted && spent.usd > rUsd) overspent.push({
14530
+ channel: "usd",
14531
+ reserved: rUsd,
14532
+ spent: spent.usd
14533
+ });
14483
14534
  open.delete(ticket.id);
14484
14535
  if (spent.tokensKnown === false) tokensTainted = true;
14485
14536
  if (!hasCompleteCacheBreakdown(spent.tokens)) cacheBreakdownTainted = true;
@@ -14498,9 +14549,12 @@ function createBudgetPool(root, runStartedAtMs, restore = {}) {
14498
14549
  freeUsd = 0;
14499
14550
  } else freeUsd += rUsd - spent.usd;
14500
14551
  } 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}`);
14552
+ const resourceSettlement = commitResources(spent, ticket.reserved.resources ?? {});
14553
+ fault ??= resourceSettlement.fault;
14554
+ overspent.push(...resourceSettlement.overspent);
14555
+ const violation = overspent.length === 0 ? void 0 : Object.freeze({ overspent: Object.freeze(overspent.map((entry) => Object.freeze(entry))) });
14556
+ if (fault !== void 0) throw new BudgetReconcileFault(`budget pool: ${fault}`, violation);
14557
+ return violation;
14504
14558
  }
14505
14559
  function observe(spend, options = {}) {
14506
14560
  assertValidSpend(spend, "observed spend");
@@ -14516,7 +14570,8 @@ function createBudgetPool(root, runStartedAtMs, restore = {}) {
14516
14570
  committedIterations += spend.iterations;
14517
14571
  committedUsd += spend.usd;
14518
14572
  if (usdCapped) freeUsd -= spend.usd;
14519
- const violation = commitResources(spend, {}, !options.partial);
14573
+ const settlement = commitResources(spend, void 0, !options.partial);
14574
+ const violation = settlement.fault ?? settlement.rootExceeded;
14520
14575
  if (violation) throw new ValidationError$1(`budget pool: ${violation}`);
14521
14576
  }
14522
14577
  function readout() {
@@ -15452,6 +15507,7 @@ async function replaySpawnTree(journal, blobs, root) {
15452
15507
  reason: ev.reason,
15453
15508
  infra: ev.infra === true,
15454
15509
  ...ev.providerModel === void 0 ? {} : { providerModel: copyProviderModelEvidence(ev.providerModel) },
15510
+ ...budgetViolationOf(ev),
15455
15511
  trace: ev.trace ?? {
15456
15512
  status: "unavailable",
15457
15513
  reason: "execution-did-not-start"
@@ -15470,6 +15526,7 @@ async function replaySpawnTree(journal, blobs, root) {
15470
15526
  reason: ev.reason ?? ev.verdict?.notes ?? "child down",
15471
15527
  infra: ev.infra === true,
15472
15528
  ...ev.providerModel === void 0 ? {} : { providerModel: copyProviderModelEvidence(ev.providerModel) },
15529
+ ...budgetViolationOf(ev),
15473
15530
  trace,
15474
15531
  ...settlementTime(ev.at),
15475
15532
  seq: ev.seq
@@ -15489,6 +15546,7 @@ async function replaySpawnTree(journal, blobs, root) {
15489
15546
  verdict: ev.verdict,
15490
15547
  spent: cloneSpend(ev.spent),
15491
15548
  ...ev.providerModel === void 0 ? {} : { providerModel: copyProviderModelEvidence(ev.providerModel) },
15549
+ ...budgetViolationOf(ev),
15492
15550
  trace,
15493
15551
  ...settlementTime(ev.at),
15494
15552
  seq: ev.seq
@@ -15569,6 +15627,7 @@ function materializeTreeView(events) {
15569
15627
  node.providerModel = copyProviderModelEvidence(ev.providerModel);
15570
15628
  node.outRef = ev.outRef;
15571
15629
  node.trace = traceEvidenceFor(ev);
15630
+ node.budgetViolation = budgetViolationOf(ev).budgetViolation;
15572
15631
  const settledAt = Date.parse(ev.at);
15573
15632
  if (Number.isFinite(settledAt)) node.settledAt = settledAt;
15574
15633
  } else if (ev.kind === "woken") {
@@ -15591,6 +15650,7 @@ function materializeTreeView(events) {
15591
15650
  if (ev.spent !== void 0) node.spent = cloneSpend(ev.spent);
15592
15651
  node.providerModel = copyProviderModelEvidence(ev.providerModel);
15593
15652
  node.outRef = ev.outRef;
15653
+ node.budgetViolation = budgetViolationOf(ev).budgetViolation;
15594
15654
  const settledAt = Date.parse(ev.at);
15595
15655
  if (Number.isFinite(settledAt)) node.settledAt = settledAt;
15596
15656
  }
@@ -15644,6 +15704,15 @@ function pendingWaits(events) {
15644
15704
  }
15645
15705
  return pending.sort((a, b) => a.ordinal - b.ordinal);
15646
15706
  }
15707
+ /** Copy a terminal record's overspend at the journal boundary; absent stays absent. */
15708
+ function budgetViolationOf(event) {
15709
+ if (event.budgetViolation === void 0) return {};
15710
+ return { budgetViolation: Object.freeze({ overspent: Object.freeze(event.budgetViolation.overspent.map((entry) => Object.freeze({
15711
+ channel: entry.channel,
15712
+ reserved: entry.reserved,
15713
+ spent: entry.spent
15714
+ }))) }) };
15715
+ }
15647
15716
  /** Copy provider evidence at the journal boundary so replay never exposes mutable event state. */
15648
15717
  function copyProviderModelEvidence(evidence) {
15649
15718
  if (evidence === void 0) return void 0;
@@ -15686,6 +15755,7 @@ function freezeSnapshot(node) {
15686
15755
  providerModel: node.providerModel,
15687
15756
  outRef: node.outRef,
15688
15757
  trace: node.trace,
15758
+ ...node.budgetViolation === void 0 ? {} : { budgetViolation: node.budgetViolation },
15689
15759
  settledAt: node.settledAt,
15690
15760
  spawnedAt: node.spawnedAt
15691
15761
  };
@@ -19286,15 +19356,18 @@ async function prepareInterruptedExecutors(opts, events, signal, now, parentId =
19286
19356
  const validation = createBudgetPool(rootBudget, 0);
19287
19357
  const reservation = validation.reserve(node.budget);
19288
19358
  if (!reservation.ok) throw new RuntimeRunStateError(`retained child '${node.id}' exceeds its original root budget`);
19289
- let violation;
19359
+ let fault;
19360
+ let budgetViolation;
19290
19361
  try {
19291
- validation.reconcile(reservation.ticket, recorded.spent);
19362
+ budgetViolation = validation.reconcile(reservation.ticket, recorded.spent);
19292
19363
  } catch (error) {
19293
- violation = error instanceof Error ? error.message : String(error);
19364
+ fault = error instanceof Error ? error.message : String(error);
19365
+ if (error instanceof BudgetReconcileFault) budgetViolation = error.budgetViolation;
19294
19366
  }
19295
19367
  accepted.push({
19296
19368
  result: recorded,
19297
- ...violation === void 0 ? {} : { violation }
19369
+ ...fault === void 0 ? {} : { fault },
19370
+ ...budgetViolation === void 0 ? {} : { budgetViolation }
19298
19371
  });
19299
19372
  continue;
19300
19373
  }
@@ -19336,20 +19409,21 @@ async function prepareInterruptedExecutors(opts, events, signal, now, parentId =
19336
19409
  });
19337
19410
  }
19338
19411
  let seq = events.reduce((max, event) => closesCursorSlot(event) ? Math.max(max, event.seq) : max, -1) + 1;
19339
- for (const { result, violation } of accepted) {
19412
+ for (const { result, fault, budgetViolation } of accepted) {
19340
19413
  signal.throwIfAborted();
19341
19414
  const failureReason = executorFailureReason(result);
19342
- const reason = violation ?? failureReason;
19415
+ const reason = fault ?? failureReason;
19343
19416
  await opts.journal.appendEvent(opts.runId, {
19344
19417
  kind: "settled",
19345
19418
  id: result.id,
19346
19419
  status: reason === void 0 ? "done" : "down",
19347
19420
  outRef: result.outRef,
19348
19421
  ...reason === void 0 ? {} : {
19349
- infra: violation !== void 0,
19422
+ infra: fault !== void 0,
19350
19423
  reason
19351
19424
  },
19352
19425
  spent: result.spent,
19426
+ ...budgetViolation === void 0 ? {} : { budgetViolation },
19353
19427
  ...result.verdict ? { verdict: result.verdict } : {},
19354
19428
  seq: seq++,
19355
19429
  at: new Date(now()).toISOString()
@@ -21210,6 +21284,7 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
21210
21284
  reason: settlement.reason,
21211
21285
  ...settlement.outRef ? { outRef: settlement.outRef } : {},
21212
21286
  ...settlement.providerModel ? { providerModel: settlement.providerModel } : {},
21287
+ ...child.budgetViolation ? { budgetViolation: child.budgetViolation } : {},
21213
21288
  trace: settlement.trace,
21214
21289
  seq,
21215
21290
  at
@@ -21238,6 +21313,7 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
21238
21313
  reason: settlement.reason,
21239
21314
  infra: settlement.infra,
21240
21315
  ...settlement.providerModel ? { providerModel: settlement.providerModel } : {},
21316
+ ...child.budgetViolation ? { budgetViolation: child.budgetViolation } : {},
21241
21317
  trace: settlement.trace,
21242
21318
  settledAt,
21243
21319
  seq
@@ -21256,6 +21332,7 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
21256
21332
  ...settlement.verdict ? { verdict: settlement.verdict } : {},
21257
21333
  spent: settlement.spent,
21258
21334
  ...settlement.providerModel ? { providerModel: settlement.providerModel } : {},
21335
+ ...child.budgetViolation ? { budgetViolation: child.budgetViolation } : {},
21259
21336
  trace: settlement.trace,
21260
21337
  seq,
21261
21338
  at
@@ -21286,6 +21363,7 @@ async function finalizeSettlement(child, settlement, seq, args, now) {
21286
21363
  ...settlement.verdict ? { verdict: settlement.verdict } : {},
21287
21364
  spent: settlement.spent,
21288
21365
  ...settlement.providerModel ? { providerModel: settlement.providerModel } : {},
21366
+ ...child.budgetViolation ? { budgetViolation: child.budgetViolation } : {},
21289
21367
  trace: settlement.trace,
21290
21368
  settledAt,
21291
21369
  seq
@@ -21308,6 +21386,7 @@ function settledNodeEvidence(child, settlement, settledAt) {
21308
21386
  ...child.providerModel ? { providerModel: detachedSnapshot(child.providerModel, "provider model evidence") } : {},
21309
21387
  ...child.materialization ? { materialization: detachedSnapshot(child.materialization, "materialization receipt") } : {},
21310
21388
  ...child.executionBindings.length > 0 ? { executionBindings: detachedSnapshot([...child.executionBindings], "execution binding receipts") } : {},
21389
+ ...child.budgetViolation ? { budgetViolation: detachedSnapshot(child.budgetViolation, "budget violation") } : {},
21311
21390
  trace: detachedSnapshot(settlement.trace, "worker trace evidence")
21312
21391
  };
21313
21392
  }
@@ -21424,13 +21503,16 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
21424
21503
  resources: void 0
21425
21504
  }, opts.budget);
21426
21505
  try {
21427
- pool.reconcile(ticket, spend);
21428
- } catch {}
21506
+ live.budgetViolation = pool.reconcile(ticket, spend);
21507
+ } catch (fault) {
21508
+ if (fault instanceof BudgetReconcileFault) live.budgetViolation = fault.budgetViolation;
21509
+ }
21429
21510
  throw error;
21430
21511
  }
21431
- pool.reconcile(ticket, spend);
21512
+ live.budgetViolation = pool.reconcile(ticket, spend);
21432
21513
  return;
21433
21514
  } catch (error) {
21515
+ if (error instanceof BudgetReconcileFault) live.budgetViolation = error.budgetViolation;
21434
21516
  reconciliationError = error;
21435
21517
  return error;
21436
21518
  }
@@ -21554,6 +21636,7 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
21554
21636
  ms
21555
21637
  });
21556
21638
  }
21639
+ live.budgetViolation = void 0;
21557
21640
  return {
21558
21641
  ...downRecord(errMessage(err), true, trace, executor.metered?.()),
21559
21642
  reconciled: live.spent
@@ -21646,7 +21729,8 @@ function makeTreeView(root, children) {
21646
21729
  ...c.settledAt === void 0 ? {} : { settledAt: c.settledAt },
21647
21730
  ...c.outRef ? { outRef: c.outRef } : {},
21648
21731
  ...c.trace ? { trace: c.trace } : {},
21649
- ...c.providerModel ? { providerModel: c.providerModel } : {}
21732
+ ...c.providerModel ? { providerModel: c.providerModel } : {},
21733
+ ...c.budgetViolation ? { budgetViolation: c.budgetViolation } : {}
21650
21734
  }));
21651
21735
  return {
21652
21736
  root,
@@ -23390,6 +23474,6 @@ function isNonEmptySpend(s) {
23390
23474
  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
23475
  }
23392
23476
  //#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 };
23477
+ 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
23478
 
23395
- //# sourceMappingURL=supervisor-af7-tQrQ.js.map
23479
+ //# sourceMappingURL=supervisor-CuBPrwGp.js.map