@tangle-network/agent-runtime 10.0.23 → 10.0.25

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 (81) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/{activation-D_J9qCzU.js → activation-Cisx6g4A.js} +2 -2
  3. package/dist/{activation-D_J9qCzU.js.map → activation-Cisx6g4A.js.map} +1 -1
  4. package/dist/{activation-DOzkzTrl.d.ts → activation-oYJrqzpN.d.ts} +2 -2
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/agent.js +3 -3
  7. package/dist/{delegate-DCZPcYy8.js → delegate-CwMTrSRm.js} +2 -2
  8. package/dist/{delegate-DCZPcYy8.js.map → delegate-CwMTrSRm.js.map} +1 -1
  9. package/dist/{driver-control-acknowledgers-CgGt3NcX.js → driver-control-acknowledgers-B213ctJ9.js} +7 -7
  10. package/dist/{driver-control-acknowledgers-CgGt3NcX.js.map → driver-control-acknowledgers-B213ctJ9.js.map} +1 -1
  11. package/dist/durable-writer-thread.js +2 -2
  12. package/dist/durable.d.ts +1 -1
  13. package/dist/durable.js +14 -13
  14. package/dist/durable.js.map +1 -1
  15. package/dist/{graph-B3pBmvnf.js → graph-DP8O_w3P.js} +7 -6
  16. package/dist/{graph-B3pBmvnf.js.map → graph-DP8O_w3P.js.map} +1 -1
  17. package/dist/{improve-DhOOHHRz.js → improve-WN8sqSH1.js} +5 -5
  18. package/dist/{improve-DhOOHHRz.js.map → improve-WN8sqSH1.js.map} +1 -1
  19. package/dist/index.d.ts +41 -6
  20. package/dist/index.js +55 -21
  21. package/dist/index.js.map +1 -1
  22. package/dist/intelligence.d.ts +2 -2
  23. package/dist/intelligence.js +4 -4
  24. package/dist/kernel.d.ts +2 -2
  25. package/dist/kernel.js +15 -15
  26. package/dist/{loop-runner-L594gDYR.js → loop-runner-B4Vjh1p9.js} +2 -2
  27. package/dist/{loop-runner-L594gDYR.js.map → loop-runner-B4Vjh1p9.js.map} +1 -1
  28. package/dist/{loop-runner-CcXKPnMR.d.ts → loop-runner-Dc-Vij6a.d.ts} +2 -2
  29. package/dist/loop-runner-bin.d.ts +1 -1
  30. package/dist/loop-runner-bin.js +1 -1
  31. package/dist/mcp/bin.js +3 -3
  32. package/dist/mcp/index.d.ts +1 -1
  33. package/dist/mcp/index.js +6 -6
  34. package/dist/mcp/memory-bin.js +1 -1
  35. package/dist/profiles.d.ts +1 -1
  36. package/dist/{provision-supervisor-Be-6HBsX.js → provision-supervisor-CqPcPBTA.js} +5 -5
  37. package/dist/{provision-supervisor-Be-6HBsX.js.map → provision-supervisor-CqPcPBTA.js.map} +1 -1
  38. package/dist/{result-blob-store-CJjp44Mz.js → result-blob-store-BZwRmrFF.js} +2 -2
  39. package/dist/{result-blob-store-CJjp44Mz.js.map → result-blob-store-BZwRmrFF.js.map} +1 -1
  40. package/dist/{run-cancellation-BNBmsY3a.js → run-cancellation-uCwV2Ra7.js} +2 -2
  41. package/dist/{run-cancellation-BNBmsY3a.js.map → run-cancellation-uCwV2Ra7.js.map} +1 -1
  42. package/dist/{run-reopen-Cr2SHmYa.js → run-reopen-YJwUAmv6.js} +6 -6
  43. package/dist/{run-reopen-Cr2SHmYa.js.map → run-reopen-YJwUAmv6.js.map} +1 -1
  44. package/dist/{run-state-Bko0BF0_.js → run-state-DXePNDvP.js} +5 -5
  45. package/dist/{run-state-Bko0BF0_.js.map → run-state-DXePNDvP.js.map} +1 -1
  46. package/dist/{runtime-Dfwc9cjt.js → runtime-DdfY-j79.js} +59 -38
  47. package/dist/{runtime-Dfwc9cjt.js.map → runtime-DdfY-j79.js.map} +1 -1
  48. package/dist/{search-executor-DnWnh4kj.js → search-executor-COdCsn9r.js} +4 -4
  49. package/dist/{search-executor-DnWnh4kj.js.map → search-executor-COdCsn9r.js.map} +1 -1
  50. package/dist/{server-RCsa_gyH.js → server-WSOQ-lg5.js} +4 -4
  51. package/dist/{server-RCsa_gyH.js.map → server-WSOQ-lg5.js.map} +1 -1
  52. package/dist/{settle-record-BlIw2MU1.js → settle-record-DWae7fwV.js} +2 -2
  53. package/dist/{settle-record-BlIw2MU1.js.map → settle-record-DWae7fwV.js.map} +1 -1
  54. package/dist/{structural-rollout-BLflx9cs.js → structural-rollout-kOx5PFfU.js} +4 -4
  55. package/dist/{structural-rollout-BLflx9cs.js.map → structural-rollout-kOx5PFfU.js.map} +1 -1
  56. package/dist/{supervise-037R-zl1.js → supervise-DEHDPDDb.js} +21 -11
  57. package/dist/supervise-DEHDPDDb.js.map +1 -0
  58. package/dist/{supervise-identity-CtxWEk1I.js → supervise-identity-DLPzZTp3.js} +2 -2
  59. package/dist/{supervise-identity-CtxWEk1I.js.map → supervise-identity-DLPzZTp3.js.map} +1 -1
  60. package/dist/{supervision-discovery-DKxqbnHf.js → supervision-discovery-8XnVtdOD.js} +3 -3
  61. package/dist/{supervision-discovery-DKxqbnHf.js.map → supervision-discovery-8XnVtdOD.js.map} +1 -1
  62. package/dist/{supervisor-DL4hO7UW.js → supervisor-C2KuUDnF.js} +507 -33
  63. package/dist/supervisor-C2KuUDnF.js.map +1 -0
  64. package/dist/{supervisor-accounting-DlDUl58C.js → supervisor-accounting-B0ofgTZX.js} +91 -14
  65. package/dist/supervisor-accounting-B0ofgTZX.js.map +1 -0
  66. package/dist/{supervisor-root-contract-BCbu1A4n.js → supervisor-root-contract-N7rW4Ynu.js} +3 -3
  67. package/dist/{supervisor-root-contract-BCbu1A4n.js.map → supervisor-root-contract-N7rW4Ynu.js.map} +1 -1
  68. package/dist/testing.d.ts +1 -1
  69. package/dist/testing.js +11 -11
  70. package/dist/{tool-server-n4XYpCok.js → tool-server-I63dnHZC.js} +39 -3
  71. package/dist/{tool-server-n4XYpCok.js.map → tool-server-I63dnHZC.js.map} +1 -1
  72. package/dist/{top-web-B-sHmI3g.js → top-web-BZM3es-m.js} +7 -7
  73. package/dist/{top-web-B-sHmI3g.js.map → top-web-BZM3es-m.js.map} +1 -1
  74. package/dist/tui/bin.js +3 -3
  75. package/dist/tui/index.d.ts +1 -1
  76. package/dist/tui/index.js +2 -2
  77. package/dist/{types-Pi5uCS88.d.ts → types-CMSBna4M.d.ts} +61 -41
  78. package/package.json +1 -1
  79. package/dist/supervise-037R-zl1.js.map +0 -1
  80. package/dist/supervisor-DL4hO7UW.js.map +0 -1
  81. package/dist/supervisor-accounting-DlDUl58C.js.map +0 -1
@@ -1,18 +1,18 @@
1
- import { $ as appendTeardownConfirmation, At as RELEASE_DESTROY_MS, Bn as environmentGone, Br as CheckUnavailableError, Ci as RetainedRunProviderContractError, Cn as verifyWorkspaceMarker, Ct as unconfirmedTeardowns, Di as freezeControlRef, Dn as reconnectRetainedRun, Dr as classifyDriverFailure, Ei as exactSession, En as mintRetainedIdentity, Gn as mergeTraceEnv, Gr as attestRuntimeOwnedDeferredExecutor, Hn as workerTraceEnv, Hr as gateOnDeliverable, Kr as attestRuntimeOwnedExecutor, L as resolveWorkerSlots, Lt as finalizeScopeOwnerMaterialization, Oi as retainedSessionReplaced, On as recoverRetainedRun, Qr as inheritRuntimeOwnedExecutorAttestation, R as prepareScopeResume, Sn as stopRetainedNativeExecution, Sr as isLiveNodeStatus, St as startScopeRecoveries, Ti as awaitAbortable, Tn as assertRetainedRunReplayMaterial, Tr as HarnessTurnFailedError, U as nestedScopeSeamKey, Un as workerTraceHeaders, Vn as WORKER_TRACE_PROPAGATION, Xt as scopeRetainedOwnerSettled, Z as appendSpawnEvents, Zr as finalizeRuntimeOwnedPendingExecutor, _i as executableAgentProfileSnapshot, _n as executorObservation, _t as registerNestedTeardownScope, ai as recordRuntimeOwnedProviderDispatchNotStarted, an as owners, ar as HARNESS_TRANSCRIPT_SETTLE_TIMEOUT_MS, br as describeToolArgs, bt as retryUnconfirmedTeardowns, ct as closeRetainedSlots, fn as attestNestedDriverTreeOwner, hn as SpawnEventIndex, ii as recordRuntimeOwnedProviderAttemptStart, in as bindScopeRetainedOwnerProvider, ji as promptOptionsFromAgentTurnInput, ki as sameControlCoordinates, kn as startRetainedRun, li as runtimeOwnedExecutorExecutionBinding, ln as loadSpawnForest, lr as harnessTranscriptFromLines, lt as closeScopeAdmission, mi as runtimeOwnedScopeOwnerRuntime, mn as nestedDriverTreeRoot, n as terminalAccounting, nn as scopeRetainedOwnerCheckpointing, nt as assertRecursiveReservationPolicy, oi as recordRuntimeOwnedProviderIdentityConflict, on as scopeOwnerLiabilities, pi as runtimeOwnedScopeOwnerControl, pn as driverRuntime, qr as attestRuntimeOwnedPendingExecutor, r as createScope, si as recordRuntimeOwnedProviderModel, sr as captureHarnessTranscript, st as boundRetainedReleases, t as isNonEmptySpend, ti as newExecutionAttemptId, ui as runtimeOwnedExecutorMaterialization, un as ownedTreeRootSpawn, ur as harnessTranscriptUnavailable, ut as hasRetriableTeardowns, vi as executableAgentSpecSnapshot, vt as releaseHeldEnvironments, wi as assertEventBinding, wn as RetainedMaterializationTimeoutError, wr as DriverAttemptsExhaustedError, wt as waitForScopeChildren, xn as describeRetainedNativeStops, xt as settleManagerWork, yn as observeModelRequest, yr as createActivityLog, yt as releaseRetainedEnvironments } from "./supervisor-accounting-DlDUl58C.js";
1
+ import { $ as appendTeardownConfirmation, $r as inheritRuntimeOwnedExecutorAttestation, Ai as sameControlCoordinates, An as startRetainedRun, At as RELEASE_DESTROY_MS, Cn as stopRetainedNativeExecution, Cr as isLiveNodeStatus, Ct as unconfirmedTeardowns, Di as exactSession, Dn as mintRetainedIdentity, Ei as awaitAbortable, En as assertRetainedRunReplayMaterial, Er as HarnessTurnFailedError, Hn as WORKER_TRACE_PROPAGATION, Jr as attestRuntimeOwnedPendingExecutor, Kn as mergeTraceEnv, Kr as attestRuntimeOwnedDeferredExecutor, L as resolveWorkerSlots, Mi as promptOptionsFromAgentTurnInput, Oi as freezeControlRef, On as reconnectRetainedRun, Or as classifyDriverFailure, Qr as finalizeRuntimeOwnedPendingExecutor, R as prepareScopeResume, Rt as finalizeScopeOwnerMaterialization, Sn as describeRetainedNativeStops, St as startScopeRecoveries, Ti as assertEventBinding, Tn as RetainedMaterializationTimeoutError, Tr as DriverAttemptsExhaustedError, U as nestedScopeSeamKey, Un as workerTraceEnv, Ur as gateOnDeliverable, Vn as environmentGone, Vr as CheckUnavailableError, Wn as workerTraceHeaders, Z as appendSpawnEvents, Zt as scopeRetainedOwnerSettled, _t as registerNestedTeardownScope, ai as recordRuntimeOwnedProviderAttemptStart, an as bindScopeRetainedOwnerProvider, bn as observeModelRequest, br as createActivityLog, bt as retryUnconfirmedTeardowns, ci as recordRuntimeOwnedProviderModel, cr as captureHarnessTranscript, ct as closeRetainedSlots, di as runtimeOwnedExecutorMaterialization, dn as ownedTreeRootSpawn, dr as harnessTranscriptUnavailable, gn as SpawnEventIndex, hi as runtimeOwnedScopeOwnerRuntime, hn as nestedDriverTreeRoot, jt as keepScopeRetainedOwnerRestorePoint, ki as retainedSessionReplaced, kn as recoverRetainedRun, lt as closeScopeAdmission, mi as runtimeOwnedScopeOwnerControl, mn as driverRuntime, n as terminalAccounting, ni as newExecutionAttemptId, nt as assertRecursiveReservationPolicy, oi as recordRuntimeOwnedProviderDispatchNotStarted, on as owners, or as HARNESS_TRANSCRIPT_SETTLE_TIMEOUT_MS, pn as attestNestedDriverTreeOwner, qr as attestRuntimeOwnedExecutor, r as createScope, rn as scopeRetainedOwnerCheckpointing, si as recordRuntimeOwnedProviderIdentityConflict, sn as scopeOwnerLiabilities, st as boundRetainedReleases, t as isNonEmptySpend, ui as runtimeOwnedExecutorExecutionBinding, un as loadSpawnForest, ur as harnessTranscriptFromLines, ut as hasRetriableTeardowns, vi as executableAgentProfileSnapshot, vn as executorObservation, vt as releaseHeldEnvironments, wi as RetainedRunProviderContractError, wn as verifyWorkspaceMarker, wt as waitForScopeChildren, xr as describeToolArgs, xt as settleManagerWork, yi as executableAgentSpecSnapshot, yt as releaseRetainedEnvironments } from "./supervisor-accounting-B0ofgTZX.js";
2
2
  import { f as RuntimeRunStateError, m as ValidationError$1, r as BackendTransportError } from "./errors-DG8yufqX.js";
3
3
  import { C as linkAbort, b as RunCancellationReason, h as checkVerdictOf, v as isFiniteNumber, w as runAbortable, x as abortReason, y as sha256 } from "./jsonl-file-B2ESMrTh.js";
4
4
  import { a as ROOT_DEADLINE_REASON, l as isDeadlineAbortReason, o as armDeadlineTimer, t as ACCEPTED_RESULT_GRACE_MS } from "./deadline-CySmJ_0S.js";
5
5
  import { C as unreportedSpend, D as addResourceSpend, E as zeroTokenUsage, S as unmeteredSpend, T as zeroSpend, _ as roundBoxMinutes, b as throwAbort, c as errorMessage, d as isAbortError, f as isAsyncIterable, g as randomUuid, h as randomSuffix, m as promptCacheTokenClasses, n as addSpend, o as cloneTokenUsage, p as mapWithConcurrency, r as addTokenUsage, s as deleteBoxSafe, v as sleep, w as withTimeout, x as throwIfAborted, y as stringifySafe } from "./util-qsH5cC9S.js";
6
6
  import { t as runTaskQueue } from "./task-queue-DbpZAp6C.js";
7
- import { At as sandboxTerminalUsageField, Ct as createSandboxUsageLedger, D as cappedDoublingMs, Dt as sameModelId, Et as notifySandboxEventObserver, G as turnFailureOf, J as hashJson, M as unavailablePauseMs, N as unavailableResumeAt, Nt as parseCodexUsageRecord, Ot as sandboxEventProviderModels, P as unavailableSignalOfFailure, Pt as recordValue, R as contentAddress, St as createSandboxTurnEventCollector, Tt as isSandboxTerminalEvent, W as runtimeFailureRemediationSchema, X as isCredentialRefusal, bt as assertSandboxServedModel, d as RetainedExecutionPendingError, ht as sandboxProgressEvents, i as runtimeFailureCause, j as reportedResetAt, k as placementRefusal, kt as sandboxEventServedBackend, mt as sandboxOutputMarker, nt as createBudgetPool, o as runtimeProviderCode, pt as sandboxLeafOutputFromEvents, q as turnRemediationOf, r as reportedFailureCause, ut as createSandboxToolPartState, vt as extractTransportEventIdentity, x as retainedExecutorContext, xt as canonicalSandboxUsageMode, z as contentRef } from "./tool-server-n4XYpCok.js";
7
+ import { At as sandboxTerminalUsageField, Ct as createSandboxUsageLedger, D as cappedDoublingMs, Dt as sameModelId, Et as notifySandboxEventObserver, G as turnFailureOf, J as hashJson, M as unavailablePauseMs, N as unavailableResumeAt, Nt as parseCodexUsageRecord, Ot as sandboxEventProviderModels, P as unavailableSignalOfFailure, Pt as recordValue, R as contentAddress, St as createSandboxTurnEventCollector, Tt as isSandboxTerminalEvent, W as runtimeFailureRemediationSchema, X as isCredentialRefusal, bt as assertSandboxServedModel, d as RetainedExecutionPendingError, ht as sandboxProgressEvents, i as runtimeFailureCause, j as reportedResetAt, k as placementRefusal, kt as sandboxEventServedBackend, mt as sandboxOutputMarker, nt as createBudgetPool, o as runtimeProviderCode, pt as sandboxLeafOutputFromEvents, q as turnRemediationOf, r as reportedFailureCause, ut as createSandboxToolPartState, vt as extractTransportEventIdentity, x as retainedExecutorContext, xt as canonicalSandboxUsageMode, z as contentRef } from "./tool-server-I63dnHZC.js";
8
8
  import { a as errMessage, f as defaultRedactor, i as causeChain, l as errorText, n as detachedSnapshot, s as errorProperty, t as detachedFrozen } from "./snapshot-BKLziJ5K.js";
9
9
  import { _ as reportedServedModel, a as concreteProfileModel, c as profileModelExecutionSettings, d as assertRouterAutoDeclaration, f as assertRouterAutoResponse, g as observedModelMatchesDeclared, l as profileProviderModel, m as mergeObservedModelIdentity, o as enforceTokenLimits, s as profileBridgeWireModel, t as assertExecutableAgentProfile, u as resolveRouterRetryPolicy, v as agentHarness } from "./model-policy-DFuhCC0-.js";
10
10
  import { r as nativeSystemPrompt, t as assertSandboxProfileCompatibility } from "./sandbox-profile-compat-l-SLQnGb.js";
11
11
  import { x as hasControlCharacter } from "./workspace-streams-C7PGLAUd.js";
12
12
  import { r as appendRunLines, u as writeAtomicDurableFile } from "./durable-file-pao7FijS.js";
13
13
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-CsW2pfFk.js";
14
- import { n as encodeResultBlob } from "./result-blob-store-CJjp44Mz.js";
15
- import { a as recordRootReentered, c as rootMaterializationReceipt, i as changesRootProfile, l as rootStartedAtMs, o as recordRootSegment, r as assertRootIdentity, s as rootExecutionBindingReceipt, t as assertResumeContract } from "./supervisor-root-contract-BCbu1A4n.js";
14
+ import { n as encodeResultBlob } from "./result-blob-store-BZwRmrFF.js";
15
+ import { a as recordRootReentered, c as rootMaterializationReceipt, i as changesRootProfile, l as rootStartedAtMs, o as recordRootSegment, r as assertRootIdentity, s as rootExecutionBindingReceipt, t as assertResumeContract } from "./supervisor-root-contract-N7rW4Ynu.js";
16
16
  import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentExactRunControlRefSchema, AgentFileOutputPolicySchema, AgentRetainedFilePublicationSchema, AgentRunCancellationRequestSchema, AgentTurnInputSchema, REASONING_EFFORTS, WorkspaceCheckpointRefSchema, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalWorkspaceCwd, harnessTypeSchema, mergeProxySecretBindings, nativeReasoningControl, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, renderInputPartsAsText, sameAgentRunControlRef, workspaceCwdPathForBase } from "@tangle-network/agent-interface";
17
17
  import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
18
18
  import { SDKError, generateIdempotencyKey, isRecord, withRetry } from "@tangle-network/agent-core";
@@ -2396,6 +2396,7 @@ function toToolSpan(input, runId, seq, at) {
2396
2396
  args: input.args,
2397
2397
  ...input.argsCaptured === false ? { argsCaptured: false } : {},
2398
2398
  ...status === void 0 ? {} : { status },
2399
+ ...input.callId === void 0 ? {} : { attributes: { toolCallId: input.callId } },
2399
2400
  ...input.error !== void 0 ? { error: input.error } : {},
2400
2401
  startedAt,
2401
2402
  endedAt,
@@ -2414,13 +2415,20 @@ const decodeOpencodePart = (raw) => {
2414
2415
  if (str(raw.type)?.toLowerCase() !== "tool" || !str(raw.tool)) return void 0;
2415
2416
  const part = raw;
2416
2417
  const state = obj(part.state);
2417
- const status = state?.status;
2418
- if (!status || status === "pending" || status === "running") return void 0;
2418
+ if (!state || state.status !== "completed" && state.status !== "error" && state.status !== "failed") return void 0;
2419
+ const argsCaptured = state.metadata?.argsCaptured !== false;
2420
+ const result = state.metadata?.outputCaptured === false ? void 0 : state.output;
2421
+ const failure = state.status === "completed" ? void 0 : state.error;
2419
2422
  return {
2420
2423
  toolName: part.tool,
2421
- args: state?.input ?? {},
2422
- status: status === "error" || status === "failed" ? "error" : "ok",
2423
- ...str(part.callID) ? { callId: part.callID } : {}
2424
+ args: argsCaptured ? defaultRedactor(state.input ?? {}) : void 0,
2425
+ ...argsCaptured ? {} : { argsCaptured: false },
2426
+ status: state.status === "completed" ? "ok" : "error",
2427
+ ...str(part.callID) ? { callId: part.callID } : {},
2428
+ ...result === void 0 ? {} : { result: defaultRedactor(result) },
2429
+ ...typeof failure === "string" ? { error: String(defaultRedactor(failure)) } : {},
2430
+ ...Number.isFinite(state.time?.start) ? { startedAt: state.time?.start } : {},
2431
+ ...Number.isFinite(state.time?.end) ? { endedAt: state.time?.end } : {}
2424
2432
  };
2425
2433
  };
2426
2434
  /** Anthropic / claude-code (also kimi's tool_use variant): a `{ type:'tool_use', id|tool_use_id,
@@ -3508,10 +3516,18 @@ function naturalNumber(value) {
3508
3516
  const ROUTER_PRICE_SOURCE = {
3509
3517
  repository: "tangle-network/tangle-router",
3510
3518
  path: "pricing/researched-provider-prices.json",
3511
- commit: "e3445f270eba5234a2f7e85dda1a88743c20f322"
3519
+ commit: "d4b47197727e78fed82d9c048ed3d19c04508ff1",
3520
+ committedAt: "2026-11-30T00:55:33Z"
3512
3521
  };
3513
3522
  /** USD per token for each model id the Router prices. */
3514
3523
  const ROUTER_TOKEN_PRICES = {
3524
+ "accounts/fireworks/routers/deepseek-v4p1-flash-us": {
3525
+ provider: "fireworks",
3526
+ input: 4.5000000000000003e-7,
3527
+ cachedInput: 9e-9,
3528
+ cacheWrite: 0,
3529
+ output: 18000000000000001e-22
3530
+ },
3515
3531
  "claude-fable-5-1": {
3516
3532
  provider: "anthropic",
3517
3533
  input: 1e-5,
@@ -3519,6 +3535,13 @@ const ROUTER_TOKEN_PRICES = {
3519
3535
  cacheWrite: null,
3520
3536
  output: 5e-5
3521
3537
  },
3538
+ "claude-fable-5-2": {
3539
+ provider: "anthropic",
3540
+ input: 8e-6,
3541
+ cachedInput: 2e-7,
3542
+ cacheWrite: null,
3543
+ output: 4e-5
3544
+ },
3522
3545
  "claude-haiku-5-5": {
3523
3546
  provider: "anthropic",
3524
3547
  input: 1e-7,
@@ -3561,13 +3584,6 @@ const ROUTER_TOKEN_PRICES = {
3561
3584
  cacheWrite: 3e-7,
3562
3585
  output: 12e-7
3563
3586
  },
3564
- "deepseek-chat": {
3565
- provider: "deepseek",
3566
- input: 15e-8,
3567
- cachedInput: 3e-9,
3568
- cacheWrite: 15e-8,
3569
- output: 6e-7
3570
- },
3571
3587
  "deepseek-flash": {
3572
3588
  provider: "deepseek",
3573
3589
  input: 15e-8,
@@ -3598,10 +3614,10 @@ const ROUTER_TOKEN_PRICES = {
3598
3614
  },
3599
3615
  "deepseek-v4-flash-vision-exp": {
3600
3616
  provider: "deepseek",
3601
- input: 44e-8,
3602
- cachedInput: 14e-9,
3603
- cacheWrite: null,
3604
- output: 132e-8
3617
+ input: 15e-8,
3618
+ cachedInput: 3e-9,
3619
+ cacheWrite: 15e-8,
3620
+ output: 6e-7
3605
3621
  },
3606
3622
  "deepseek-v4-pro": {
3607
3623
  provider: "deepseek",
@@ -3617,6 +3633,20 @@ const ROUTER_TOKEN_PRICES = {
3617
3633
  cacheWrite: 0,
3618
3634
  output: 12e-7
3619
3635
  },
3636
+ "deepseek-v4p1-flash-1017": {
3637
+ provider: "fireworks",
3638
+ input: 3e-7,
3639
+ cachedInput: 6e-9,
3640
+ cacheWrite: null,
3641
+ output: 12e-7
3642
+ },
3643
+ "deepseek-v4p1-flash-1017-ultrafast": {
3644
+ provider: "fireworks",
3645
+ input: 24e-7,
3646
+ cachedInput: 48e-9,
3647
+ cacheWrite: null,
3648
+ output: 96e-7
3649
+ },
3620
3650
  "ember-1": {
3621
3651
  provider: "fireworks",
3622
3652
  input: 3e-6,
@@ -3624,6 +3654,13 @@ const ROUTER_TOKEN_PRICES = {
3624
3654
  cacheWrite: 3e-6,
3625
3655
  output: 15e-6
3626
3656
  },
3657
+ "gemini-2.5-flash-image": {
3658
+ provider: "google",
3659
+ input: 3e-7,
3660
+ cachedInput: null,
3661
+ cacheWrite: null,
3662
+ output: 25e-7
3663
+ },
3627
3664
  "gemini-2.5-flash-lite": {
3628
3665
  provider: "google",
3629
3666
  input: 1e-7,
@@ -3631,6 +3668,20 @@ const ROUTER_TOKEN_PRICES = {
3631
3668
  cacheWrite: 1e-7,
3632
3669
  output: 4e-7
3633
3670
  },
3671
+ "gemini-3.1-flash-image": {
3672
+ provider: "google",
3673
+ input: 5e-7,
3674
+ cachedInput: null,
3675
+ cacheWrite: null,
3676
+ output: 3e-6
3677
+ },
3678
+ "gemini-3.1-flash-lite-image": {
3679
+ provider: "google",
3680
+ input: 25e-8,
3681
+ cachedInput: null,
3682
+ cacheWrite: null,
3683
+ output: 15e-7
3684
+ },
3634
3685
  "gemini-3.1-pro-preview": {
3635
3686
  provider: "google",
3636
3687
  input: 2e-6,
@@ -3666,6 +3717,20 @@ const ROUTER_TOKEN_PRICES = {
3666
3717
  cacheWrite: 1e-6,
3667
3718
  output: 18e-6
3668
3719
  },
3720
+ "gemini-4-argon": {
3721
+ provider: "google",
3722
+ input: 2e-6,
3723
+ cachedInput: 1.0000000000000001e-7,
3724
+ cacheWrite: 2e-6,
3725
+ output: 1e-5
3726
+ },
3727
+ "gemini-4-carbon": {
3728
+ provider: "google",
3729
+ input: 4e-6,
3730
+ cachedInput: 2.0000000000000002e-7,
3731
+ cacheWrite: 4e-6,
3732
+ output: 2e-5
3733
+ },
3669
3734
  "gemini-flash-latest": {
3670
3735
  provider: "google",
3671
3736
  input: 15e-7,
@@ -3673,6 +3738,13 @@ const ROUTER_TOKEN_PRICES = {
3673
3738
  cacheWrite: null,
3674
3739
  output: 75e-7
3675
3740
  },
3741
+ "gemini-nano-banana-2.1": {
3742
+ provider: "google",
3743
+ input: 15e-7,
3744
+ cachedInput: null,
3745
+ cacheWrite: null,
3746
+ output: 75e-7
3747
+ },
3676
3748
  "glm-5.2": {
3677
3749
  provider: "zai",
3678
3750
  input: 14e-7,
@@ -3687,6 +3759,27 @@ const ROUTER_TOKEN_PRICES = {
3687
3759
  cacheWrite: 0,
3688
3760
  output: 44e-7
3689
3761
  },
3762
+ "glm-5.3-flash": {
3763
+ provider: "moonmath",
3764
+ input: 15e-8,
3765
+ cachedInput: 4e-8,
3766
+ cacheWrite: 15e-8,
3767
+ output: 5e-7
3768
+ },
3769
+ "glm-5.3-flashx-legal": {
3770
+ provider: "zai",
3771
+ input: 37e-8,
3772
+ cachedInput: 75e-9,
3773
+ cacheWrite: null,
3774
+ output: 125e-8
3775
+ },
3776
+ "glm-5.4": {
3777
+ provider: "zai",
3778
+ input: 14e-7,
3779
+ cachedInput: 26e-8,
3780
+ cacheWrite: 0,
3781
+ output: 44e-7
3782
+ },
3690
3783
  "glm-5p3": {
3691
3784
  provider: "fireworks",
3692
3785
  input: 14e-7,
@@ -3694,6 +3787,41 @@ const ROUTER_TOKEN_PRICES = {
3694
3787
  cacheWrite: 14e-7,
3695
3788
  output: 44e-7
3696
3789
  },
3790
+ "glm-5p3-fast": {
3791
+ provider: "fireworks",
3792
+ input: 21e-7,
3793
+ cachedInput: 39e-8,
3794
+ cacheWrite: null,
3795
+ output: 66e-7
3796
+ },
3797
+ "glm-5p3-flash": {
3798
+ provider: "fireworks",
3799
+ input: 15e-8,
3800
+ cachedInput: 3e-8,
3801
+ cacheWrite: null,
3802
+ output: 5e-7
3803
+ },
3804
+ "google/gemini-4-hydrogen": {
3805
+ provider: "google",
3806
+ input: 15e-7,
3807
+ cachedInput: 75e-9,
3808
+ cacheWrite: 15e-7,
3809
+ output: 75e-7
3810
+ },
3811
+ "google/gemini-4-neon": {
3812
+ provider: "google",
3813
+ input: 3e-6,
3814
+ cachedInput: 15e-8,
3815
+ cacheWrite: 3e-6,
3816
+ output: 15e-6
3817
+ },
3818
+ "gpt-4o-mini-transcribe": {
3819
+ provider: "openai",
3820
+ input: 125e-8,
3821
+ cachedInput: null,
3822
+ cacheWrite: null,
3823
+ output: 5e-6
3824
+ },
3697
3825
  "gpt-4o-mini-tts": {
3698
3826
  provider: "openai",
3699
3827
  input: 6e-7,
@@ -3715,6 +3843,13 @@ const ROUTER_TOKEN_PRICES = {
3715
3843
  cacheWrite: 0,
3716
3844
  output: 12e-6
3717
3845
  },
3846
+ "gpt-4o-transcribe": {
3847
+ provider: "openai",
3848
+ input: 25e-7,
3849
+ cachedInput: null,
3850
+ cacheWrite: null,
3851
+ output: 1e-5
3852
+ },
3718
3853
  "gpt-5.6-luna": {
3719
3854
  provider: "openai",
3720
3855
  input: 2e-7,
@@ -3724,10 +3859,10 @@ const ROUTER_TOKEN_PRICES = {
3724
3859
  },
3725
3860
  "gpt-5.6-sol": {
3726
3861
  provider: "openai",
3727
- input: 5e-6,
3728
- cachedInput: 5.000000000000001e-7,
3729
- cacheWrite: 625e-8,
3730
- output: 3e-5
3862
+ input: 4e-6,
3863
+ cachedInput: 4e-7,
3864
+ cacheWrite: 5e-6,
3865
+ output: 2e-5
3731
3866
  },
3732
3867
  "gpt-5.6-terra": {
3733
3868
  provider: "openai",
@@ -3764,6 +3899,27 @@ const ROUTER_TOKEN_PRICES = {
3764
3899
  cacheWrite: 25e-7,
3765
3900
  output: 1e-5
3766
3901
  },
3902
+ "gpt-6.1-terra": {
3903
+ provider: "openai",
3904
+ input: 1e-6,
3905
+ cachedInput: 5e-8,
3906
+ cacheWrite: 125e-8,
3907
+ output: 5e-6
3908
+ },
3909
+ "gpt-6.2-astra": {
3910
+ provider: "openai",
3911
+ input: 8e-6,
3912
+ cachedInput: 4.0000000000000003e-7,
3913
+ cacheWrite: 1e-5,
3914
+ output: 4e-5
3915
+ },
3916
+ "gpt-6.2-sol": {
3917
+ provider: "openai",
3918
+ input: 2e-6,
3919
+ cachedInput: 1.0000000000000001e-7,
3920
+ cacheWrite: 25e-7,
3921
+ output: 1e-5
3922
+ },
3767
3923
  "gpt-audio": {
3768
3924
  provider: "openai",
3769
3925
  input: 25e-7,
@@ -3785,20 +3941,146 @@ const ROUTER_TOKEN_PRICES = {
3785
3941
  cacheWrite: 0,
3786
3942
  output: 24e-7
3787
3943
  },
3788
- "gpt-oss-120b": {
3789
- provider: "sambanova",
3790
- input: 22e-8,
3944
+ "gpt-image-2": {
3945
+ provider: "openai",
3946
+ input: 5e-6,
3791
3947
  cachedInput: null,
3792
3948
  cacheWrite: null,
3793
- output: 59e-8
3949
+ output: 3e-5
3794
3950
  },
3795
- "kimi-k3": {
3951
+ "gpt-image-2.5-flare": {
3952
+ provider: "openai",
3953
+ input: 5e-6,
3954
+ cachedInput: null,
3955
+ cacheWrite: null,
3956
+ output: 3e-5
3957
+ },
3958
+ "gpt-image-2.5-sunburst": {
3959
+ provider: "openai",
3960
+ input: 5e-6,
3961
+ cachedInput: null,
3962
+ cacheWrite: null,
3963
+ output: 3e-5
3964
+ },
3965
+ "gpt-image-2.6-flare": {
3966
+ provider: "openai",
3967
+ input: 5e-6,
3968
+ cachedInput: null,
3969
+ cacheWrite: null,
3970
+ output: 3e-5
3971
+ },
3972
+ "gpt-image-2.6-sunburst": {
3973
+ provider: "openai",
3974
+ input: 5e-6,
3975
+ cachedInput: null,
3976
+ cacheWrite: null,
3977
+ output: 3e-5
3978
+ },
3979
+ "gpt-oss-120b": {
3796
3980
  provider: "fireworks",
3981
+ input: 15e-8,
3982
+ cachedInput: 15e-9,
3983
+ cacheWrite: null,
3984
+ output: 6e-7
3985
+ },
3986
+ "grok-4.20-0309-non-reasoning": {
3987
+ provider: "xai",
3988
+ input: 125e-8,
3989
+ cachedInput: 2.0000000000000002e-7,
3990
+ cacheWrite: 125e-8,
3991
+ output: 25e-7
3992
+ },
3993
+ "grok-4.20-0309-reasoning": {
3994
+ provider: "xai",
3995
+ input: 125e-8,
3996
+ cachedInput: 2.0000000000000002e-7,
3997
+ cacheWrite: 125e-8,
3998
+ output: 25e-7
3999
+ },
4000
+ "grok-4.20-multi-agent-0309": {
4001
+ provider: "xai",
4002
+ input: 125e-8,
4003
+ cachedInput: 2.0000000000000002e-7,
4004
+ cacheWrite: 125e-8,
4005
+ output: 25e-7
4006
+ },
4007
+ "grok-4.3": {
4008
+ provider: "xai",
4009
+ input: 125e-8,
4010
+ cachedInput: 2.0000000000000002e-7,
4011
+ cacheWrite: 125e-8,
4012
+ output: 25e-7
4013
+ },
4014
+ "grok-4.5": {
4015
+ provider: "xai",
4016
+ input: 2e-6,
4017
+ cachedInput: 3e-7,
4018
+ cacheWrite: 2e-6,
4019
+ output: 6e-6
4020
+ },
4021
+ "grok-4.6": {
4022
+ provider: "xai",
4023
+ input: 2e-6,
4024
+ cachedInput: 5e-7,
4025
+ cacheWrite: 2e-6,
4026
+ output: 6e-6
4027
+ },
4028
+ "grok-4.7": {
4029
+ provider: "xai",
4030
+ input: 2e-6,
4031
+ cachedInput: 5e-7,
4032
+ cacheWrite: 2e-6,
4033
+ output: 6e-6
4034
+ },
4035
+ "grok-build-0.1": {
4036
+ provider: "xai",
4037
+ input: 1e-6,
4038
+ cachedInput: 2.0000000000000002e-7,
4039
+ cacheWrite: 1e-6,
4040
+ output: 2e-6
4041
+ },
4042
+ k3: {
4043
+ provider: "moonshot",
3797
4044
  input: 3e-6,
3798
4045
  cachedInput: 3e-7,
3799
- cacheWrite: 3e-6,
4046
+ cacheWrite: null,
4047
+ output: 15e-6
4048
+ },
4049
+ "k3.1-pro": {
4050
+ provider: "moonshot",
4051
+ input: 2e-6,
4052
+ cachedInput: 2.0000000000000002e-7,
4053
+ cacheWrite: null,
4054
+ output: 1e-5
4055
+ },
4056
+ "kimi-k3": {
4057
+ provider: "moonshot",
4058
+ input: 3e-6,
4059
+ cachedInput: 3e-7,
4060
+ cacheWrite: null,
3800
4061
  output: 15e-6
3801
4062
  },
4063
+ "kimi-k3-fast": {
4064
+ provider: "fireworks",
4065
+ input: 45e-7,
4066
+ cachedInput: 45e-8,
4067
+ cacheWrite: null,
4068
+ output: 225e-7
4069
+ },
4070
+ "kimi-k3.1-pro": {
4071
+ provider: "moonshot",
4072
+ input: 2e-6,
4073
+ cachedInput: 2.0000000000000002e-7,
4074
+ cacheWrite: null,
4075
+ output: 1e-5
4076
+ },
4077
+ "kimi-k3.1-pro-highspeed": {
4078
+ provider: "moonshot",
4079
+ input: 4e-6,
4080
+ cachedInput: 2.0000000000000002e-7,
4081
+ cacheWrite: null,
4082
+ output: 2e-5
4083
+ },
3802
4084
  "labs-leanstral-1-5": {
3803
4085
  provider: "mistral",
3804
4086
  input: 0,
@@ -3827,6 +4109,20 @@ const ROUTER_TOKEN_PRICES = {
3827
4109
  cacheWrite: null,
3828
4110
  output: 4e-8
3829
4111
  },
4112
+ "meta-models/Muse-Spark-Open-816B-A42B": {
4113
+ provider: "together",
4114
+ input: 125e-8,
4115
+ cachedInput: 15e-8,
4116
+ cacheWrite: 125e-8,
4117
+ output: 425e-8
4118
+ },
4119
+ "minimax-m3": {
4120
+ provider: "fireworks",
4121
+ input: 3e-7,
4122
+ cachedInput: 6e-8,
4123
+ cacheWrite: null,
4124
+ output: 12e-7
4125
+ },
3830
4126
  "MiniMax-M3": {
3831
4127
  provider: "sambanova",
3832
4128
  input: 6e-7,
@@ -3834,6 +4130,27 @@ const ROUTER_TOKEN_PRICES = {
3834
4130
  cacheWrite: null,
3835
4131
  output: 24e-7
3836
4132
  },
4133
+ "minimax-m3p1-flash": {
4134
+ provider: "fireworks",
4135
+ input: 15e-8,
4136
+ cachedInput: 15e-9,
4137
+ cacheWrite: null,
4138
+ output: 6e-7
4139
+ },
4140
+ "mistral-large-4": {
4141
+ provider: "mistral",
4142
+ input: 7e-7,
4143
+ cachedInput: 7e-8,
4144
+ cacheWrite: null,
4145
+ output: 21e-7
4146
+ },
4147
+ "mistral-large-4-0": {
4148
+ provider: "mistral",
4149
+ input: 7e-7,
4150
+ cachedInput: 7e-8,
4151
+ cacheWrite: 7e-7,
4152
+ output: 21000000000000002e-22
4153
+ },
3837
4154
  "mistral-medium-3": {
3838
4155
  provider: "mistral",
3839
4156
  input: 15e-7,
@@ -3862,6 +4179,27 @@ const ROUTER_TOKEN_PRICES = {
3862
4179
  cacheWrite: 3e-6,
3863
4180
  output: 15e-6
3864
4181
  },
4182
+ "nemotron-3-ultra-nvfp4": {
4183
+ provider: "fireworks",
4184
+ input: 6e-7,
4185
+ cachedInput: 12e-8,
4186
+ cacheWrite: null,
4187
+ output: 24e-7
4188
+ },
4189
+ "nemotron-lightning-3p5-30b-a3b": {
4190
+ provider: "fireworks",
4191
+ input: 5e-8,
4192
+ cachedInput: 1e-8,
4193
+ cacheWrite: null,
4194
+ output: 2e-7
4195
+ },
4196
+ "nvidia/NVIDIA-Nemotron-3.5-Super-VL": {
4197
+ provider: "together",
4198
+ input: 15e-8,
4199
+ cachedInput: 2e-8,
4200
+ cacheWrite: 15e-8,
4201
+ output: 5e-7
4202
+ },
3865
4203
  "openai/gpt-oss-120b": {
3866
4204
  provider: "groq",
3867
4205
  input: 15e-8,
@@ -3890,6 +4228,20 @@ const ROUTER_TOKEN_PRICES = {
3890
4228
  cacheWrite: 99e-8,
3891
4229
  output: 149e-8
3892
4230
  },
4231
+ "qwen/qwen3.7-max": {
4232
+ provider: "together",
4233
+ input: 25e-7,
4234
+ cachedInput: 5e-7,
4235
+ cacheWrite: 25e-7,
4236
+ output: 75e-7
4237
+ },
4238
+ "qwen/qwen3.7-plus": {
4239
+ provider: "together",
4240
+ input: 32e-8,
4241
+ cachedInput: 32e-8,
4242
+ cacheWrite: 32e-8,
4243
+ output: 128e-8
4244
+ },
3893
4245
  "qwen/qwen3.8-27b": {
3894
4246
  provider: "groq",
3895
4247
  input: 8e-7,
@@ -3897,6 +4249,111 @@ const ROUTER_TOKEN_PRICES = {
3897
4249
  cacheWrite: 8e-7,
3898
4250
  output: 4e-6
3899
4251
  },
4252
+ "qwen/qwen3.8-flash": {
4253
+ provider: "together",
4254
+ input: 15e-8,
4255
+ cachedInput: 15e-8,
4256
+ cacheWrite: 15e-8,
4257
+ output: 4.6999999999999995e-7
4258
+ },
4259
+ "ricursive-ai/Ripple-65B-Preview": {
4260
+ provider: "together",
4261
+ input: 2.0000000000000002e-7,
4262
+ cachedInput: 2e-8,
4263
+ cacheWrite: 2.0000000000000002e-7,
4264
+ output: 6e-7
4265
+ },
4266
+ "together/deepseek-ai/DeepSeek-V4.1-Flash-1017": {
4267
+ provider: "together",
4268
+ input: 3e-7,
4269
+ cachedInput: 6e-9,
4270
+ cacheWrite: 3e-7,
4271
+ output: 12e-7
4272
+ },
4273
+ "together/deepseek-ai/DeepSeek-V4.1-Flash-1017-fast": {
4274
+ provider: "together",
4275
+ input: 6e-7,
4276
+ cachedInput: 12e-9,
4277
+ cacheWrite: 6e-7,
4278
+ output: 24e-7
4279
+ },
4280
+ "together/meta-models/Muse-Glimmer-30B": {
4281
+ provider: "together",
4282
+ input: 35e-8,
4283
+ cachedInput: 4e-8,
4284
+ cacheWrite: 35e-8,
4285
+ output: 15e-7
4286
+ },
4287
+ "together/MiniMaxAI/MiniMax-M3.1-Flash": {
4288
+ provider: "together",
4289
+ input: 15e-8,
4290
+ cachedInput: 15e-9,
4291
+ cacheWrite: 15e-8,
4292
+ output: 6e-7
4293
+ },
4294
+ "together/moonshotai/Kimi-K3.1-Pro": {
4295
+ provider: "together",
4296
+ input: 2e-6,
4297
+ cachedInput: 2.0000000000000002e-7,
4298
+ cacheWrite: 2e-6,
4299
+ output: 1e-5
4300
+ },
4301
+ "together/openai/gpt-oss-120b": {
4302
+ provider: "together",
4303
+ input: 15e-8,
4304
+ cachedInput: 15e-8,
4305
+ cacheWrite: 15e-8,
4306
+ output: 6e-7
4307
+ },
4308
+ "together/Qwen/Qwen3.5-9B": {
4309
+ provider: "together",
4310
+ input: 1.7000000000000001e-7,
4311
+ cachedInput: 1.7000000000000001e-7,
4312
+ cacheWrite: 1.7000000000000001e-7,
4313
+ output: 25e-8
4314
+ },
4315
+ "together/Qwen/Qwen3.6-Plus": {
4316
+ provider: "together",
4317
+ input: 5e-7,
4318
+ cachedInput: 5e-7,
4319
+ cacheWrite: 5e-7,
4320
+ output: 3e-6
4321
+ },
4322
+ "together/Qwen/Qwen4-Max": {
4323
+ provider: "together",
4324
+ input: 15e-7,
4325
+ cachedInput: 75e-9,
4326
+ cacheWrite: 15e-7,
4327
+ output: 45e-7
4328
+ },
4329
+ "together/reflection/Beam-1.0-501B-A23B": {
4330
+ provider: "together",
4331
+ input: 4.0000000000000003e-7,
4332
+ cachedInput: 4e-8,
4333
+ cacheWrite: 4.0000000000000003e-7,
4334
+ output: 12e-7
4335
+ },
4336
+ "together/tencent/Hy4": {
4337
+ provider: "together",
4338
+ input: 834e-9,
4339
+ cachedInput: 4.2000000000000006e-8,
4340
+ cacheWrite: 834e-9,
4341
+ output: 2501e-9
4342
+ },
4343
+ "together/thinkingmachines/Inkling-2-Small": {
4344
+ provider: "together",
4345
+ input: 3e-7,
4346
+ cachedInput: 3e-8,
4347
+ cacheWrite: 3e-7,
4348
+ output: 1e-6
4349
+ },
4350
+ "together/zai-org/GLM-5.2": {
4351
+ provider: "together",
4352
+ input: 14e-7,
4353
+ cachedInput: 26e-8,
4354
+ cacheWrite: 14e-7,
4355
+ output: 44e-7
4356
+ },
3900
4357
  "voxtral-small-2507": {
3901
4358
  provider: "mistral",
3902
4359
  input: 1e-7,
@@ -3924,6 +4381,20 @@ const ROUTER_TOKEN_PRICES = {
3924
4381
  cachedInput: 26e-8,
3925
4382
  cacheWrite: 14e-7,
3926
4383
  output: 44e-7
4384
+ },
4385
+ "zai-org/GLM-5.3-Flash": {
4386
+ provider: "together",
4387
+ input: 15e-8,
4388
+ cachedInput: 3e-8,
4389
+ cacheWrite: 15e-8,
4390
+ output: 5e-7
4391
+ },
4392
+ "zro/glm-5.3-flash": {
4393
+ provider: "moonmath",
4394
+ input: 15e-8,
4395
+ cachedInput: 4e-8,
4396
+ cacheWrite: 15e-8,
4397
+ output: 5e-7
3927
4398
  }
3928
4399
  };
3929
4400
  // src/pricing/router-prices.ts
@@ -15459,7 +15930,7 @@ function guardRunPersistence(journal, blobs, interrupt) {
15459
15930
  /** Read every caller-owned field once, then detach and freeze all decision data before the first
15460
15931
  * await; stateful collaborators stay live by reference, but later opts mutation cannot redirect the run. */
15461
15932
  function admitSupervisorRun(task, opts) {
15462
- const { budget, rootIdentity, requestedProfile, rootSegment, rootMaterialization, runId, journal: journalStore, blobs: blobStore, executors: executorRegistry, recoverExecutor, maxDepth, workerSlots, reservationPolicy, deadlineCheckIn, budgetStopHoldMs, maxRestarts, withinMs, childSettleGraceMs, teardownConfirmMs, resume, retainedAtSettlement: requestedRetainedAtSettlement, now: suppliedNow, signal, hooks, workerTrace, workerTraceUnpropagated, interactiveBindingDir } = opts;
15933
+ const { budget, rootIdentity, requestedProfile, rootSegment, rootMaterialization, runId, journal: journalStore, blobs: blobStore, executors: executorRegistry, recoverExecutor, maxDepth, workerSlots, reservationPolicy, deadlineCheckIn, budgetStopHoldMs, maxRestarts, withinMs, childSettleGraceMs, teardownConfirmMs, resume, retainedAtSettlement: requestedRetainedAtSettlement, retainRestorePoint, now: suppliedNow, signal, hooks, workerTrace, workerTraceUnpropagated, interactiveBindingDir } = opts;
15463
15934
  const input = detachedSnapshot({
15464
15935
  task,
15465
15936
  options: {
@@ -15478,6 +15949,7 @@ function admitSupervisorRun(task, opts) {
15478
15949
  ...teardownConfirmMs === void 0 ? {} : { teardownConfirmMs },
15479
15950
  ...resume === void 0 ? {} : { resume },
15480
15951
  ...requestedRetainedAtSettlement === void 0 ? {} : { retainedAtSettlement: requestedRetainedAtSettlement },
15952
+ ...retainRestorePoint === void 0 ? {} : { retainRestorePoint },
15481
15953
  ...interactiveBindingDir === void 0 ? {} : { interactiveBindingDir }
15482
15954
  }
15483
15955
  }, "supervisor.run");
@@ -15485,6 +15957,7 @@ function admitSupervisorRun(task, opts) {
15485
15957
  const slots = resolveWorkerSlots(workerSlots);
15486
15958
  if (teardownConfirmMs !== void 0 && (typeof teardownConfirmMs !== "number" || !Number.isFinite(teardownConfirmMs) || teardownConfirmMs < 0)) throw new ValidationError$1(`supervisor: teardownConfirmMs must be a nonnegative finite number of milliseconds, got ${JSON.stringify(teardownConfirmMs)}`);
15487
15959
  if (requestedRetainedAtSettlement !== void 0 && requestedRetainedAtSettlement !== "release" && requestedRetainedAtSettlement !== "keep") throw new ValidationError$1(`supervisor: retainedAtSettlement must be 'release' or 'keep', got ${JSON.stringify(requestedRetainedAtSettlement)}`);
15960
+ if (retainRestorePoint !== void 0 && typeof retainRestorePoint !== "boolean") throw new ValidationError$1(`supervisor: retainRestorePoint must be a boolean, got ${JSON.stringify(retainRestorePoint)}`);
15488
15961
  const controller = new AbortController();
15489
15962
  const persistence = guardRunPersistence(journalStore, blobStore, (error) => {
15490
15963
  controller.abort(error);
@@ -15525,6 +15998,7 @@ async function joinRunChildren(join, settleGraceMs) {
15525
15998
  await releaseHeldEnvironments(scope);
15526
15999
  join.teardownUnconfirmed = unconfirmedTeardowns(scope);
15527
16000
  const releasing = !persistence.failed && join.retainedAtSettlement === "release";
16001
+ if (releasing && join.opts.retainRestorePoint === true) keepScopeRetainedOwnerRestorePoint(scope);
15528
16002
  const clock = { windowMs: Math.max(join.opts.teardownConfirmMs ?? 0, RELEASE_DESTROY_MS) };
15529
16003
  if (releasing) boundRetainedReleases(scope, clock);
15530
16004
  await Promise.all([settleManagerWork(scope), releasing ? releaseRetainedEnvironments(scope) : void 0]);
@@ -16070,4 +16544,4 @@ async function noWinner(settled, rejection) {
16070
16544
  }
16071
16545
  export { failPendingAfter as $, readPromptOptions as A, defineProfileMaterializationContract as At, toolResultText as B, projectSandboxOutcome as Bt, captureReusableExecutorConfig as C, runWorktreeHarness as Ct, createSteerableSandboxSession as D, assertProfileMaterialization as Dt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as E, terminateProcessTreeAndConfirm as Et, defaultSelectWinner as F, renderUnsupported as Ft, providerAsExecutor as G, routerBrain as H, codeModeArguments as I, sandboxActProfileMaterialization as It, providerAsSandboxClient as J, providerOutputOptions as K, codeModeModelOutput as L, sandboxProfileMaterialization as Lt, createSandboxLineage as M, profileMaterializationAxes$1 as Mt, acquireSandbox as N, promptControlProfileMaterialization as Nt, runAgentRounds as O, assertProfileMaterializes as Ot, TERMINAL_DECISIONS as P, promptModelProfileMaterialization as Pt, createInbox as Q, createCodeModeTools as R, unsupportedProfileDimensions as Rt, bindReusableExecutorExecutionId as S, runSettledCommand as St, snapshotExecutorConfig as T, harnessInvocation as Tt, createAgentEnvironmentProviderRegistry as U, createRouterTranscript as V, readSandboxOutcome as Vt, resolveAgentEnvironmentProvider as W, createInPlaceCliExecutor as X, createWorktreeCliExecutor as Y, INBOX_RECEIPT_KEY as Z, isDriverSpec as _, createPushTraceSource as _t, awaitRootWake as a, isPeerMailEnvelope as at, InMemorySpawnJournal as b, bridgeStopSignalKey as bt, readRunParking as c, taskToPrompt$1 as ct, bestDelivered as d, priceTokens as dt, AUTHORITY_MARKERS as et, runFinalizer as f, ROUTER_PRICE_SOURCE as ft, driverExecutorFactory as g, readCodexRolloutSession as gt, driverChild as h, harnessUsageIsEmpty as ht, assertRunParking as i, createPeerMailbox as it, createSandboxForSpec as j, fullProfileMaterialization as jt, assertBoxlessPromptOptions as k, controlProfileMaterialization as kt, sleepScopeWait as l, bridgeAdmissionRefusal as lt, createRootHandle as m, createCodexRolloutStoreReader as mt, createSupervisor as n, PEER_MAIL_WIRE_KEY as nt, bindScopeParkingDrain as o, peerMailTools as ot, runTree as p, addHarnessUsage as pt, LEAF_CONTINUATION_TASK as q, RunParkedError as r, claimsAuthority as rt, isRunParked as s, peerMailVerbNames as st, DEFAULT_MAX_DEPTH as t, DEFAULT_PEER_MAIL_LIMITS as tt, withRunParking as u, bridgeModelRouteRefusal as ut, withDriverExecutor as v, bridgeRuntimeAttachmentsKey as vt, createExecutor as w, LOCAL_HARNESSES as wt, createExecutorRegistry as x, defaultRunCommand as xt, InMemoryResultBlobStore as y, bridgeRuntimeEnvKey as yt, runCodeMode as z, worktreeCliProfileMaterialization as zt };
16072
16546
 
16073
- //# sourceMappingURL=supervisor-DL4hO7UW.js.map
16547
+ //# sourceMappingURL=supervisor-C2KuUDnF.js.map