@tangle-network/agent-runtime 0.225.1 → 0.225.3
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.
- package/dist/{activation-zQ47z9FG.js → activation-C7i-w3kS.js} +2 -2
- package/dist/{activation-zQ47z9FG.js.map → activation-C7i-w3kS.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-BqLV8b5T.js → coordination-driver-DcwOMS5C.js} +2 -2
- package/dist/{coordination-driver-BqLV8b5T.js.map → coordination-driver-DcwOMS5C.js.map} +1 -1
- package/dist/{delegate-CaAMnaO5.js → delegate-C9B_prgp.js} +2 -2
- package/dist/{delegate-CaAMnaO5.js.map → delegate-C9B_prgp.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +2 -2
- package/dist/{graph-I8lfvnso.js → graph-B_6SZzlE.js} +4 -4
- package/dist/{graph-I8lfvnso.js.map → graph-B_6SZzlE.js.map} +1 -1
- package/dist/{improvement-cycle-BULzVVIR.js → improvement-cycle-DmuqSX6_.js} +4 -4
- package/dist/{improvement-cycle-BULzVVIR.js.map → improvement-cycle-DmuqSX6_.js.map} +1 -1
- package/dist/{index-C2T1Z3jZ.d.ts → index-ClXIBpKe.d.ts} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +1 -1
- package/dist/kernel.js +9 -9
- package/dist/{loop-runner-bin-BMCpT2i0.d.ts → loop-runner-bin-BRfsk-9d.d.ts} +2 -2
- package/dist/{loop-runner-bin-Cq39sFKO.js → loop-runner-bin-Jxq-BUGo.js} +3 -3
- package/dist/{loop-runner-bin-Cq39sFKO.js.map → loop-runner-bin-Jxq-BUGo.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +5 -5
- package/dist/{model-policy-DKDyr-fc.js → model-policy-BbSCSak0.js} +4 -4
- package/dist/model-policy-BbSCSak0.js.map +1 -0
- package/dist/profiles.js +1 -1
- package/dist/{provision-supervisor-DmJM7tiC.js → provision-supervisor-ChEnL5xX.js} +8 -35
- package/dist/provision-supervisor-ChEnL5xX.js.map +1 -0
- package/dist/{runtime-DHRhpyLd.js → runtime-BVV9PbmE.js} +24 -24
- package/dist/runtime-BVV9PbmE.js.map +1 -0
- package/dist/{server-C9iqlpwt.js → server-Cf0_J9nZ.js} +3 -3
- package/dist/{server-C9iqlpwt.js.map → server-Cf0_J9nZ.js.map} +1 -1
- package/dist/{structural-rollout-1Y1xqzLI.js → structural-rollout-C_tpSY6Y.js} +6 -7
- package/dist/structural-rollout-C_tpSY6Y.js.map +1 -0
- package/dist/{supervise-DhIgG9_d.js → supervise-Ah7kMn2p.js} +9 -15
- package/dist/supervise-Ah7kMn2p.js.map +1 -0
- package/dist/{supervisor-BXzhAITL.js → supervisor-0ksHf44Z.js} +210 -170
- package/dist/supervisor-0ksHf44Z.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +12 -12
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/package.json +1 -1
- package/dist/model-policy-DKDyr-fc.js.map +0 -1
- package/dist/provision-supervisor-DmJM7tiC.js.map +0 -1
- package/dist/runtime-DHRhpyLd.js.map +0 -1
- package/dist/structural-rollout-1Y1xqzLI.js.map +0 -1
- package/dist/supervise-DhIgG9_d.js.map +0 -1
- package/dist/supervisor-BXzhAITL.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as RetainedInteractiveAdmissionError, d as RetainedRunDispatchBindingError, f as RuntimeRunStateError, i as ConfigError, l as RetainedInteractiveBindingError, m as ValidationError$1, r as BackendTransportError, t as AgentEvalError$1, u as RetainedRunAdmissionError } from "./errors-DodWX-cb.js";
|
|
2
|
-
import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, l as profileProviderModel, o as enforceTokenLimits, s as profileBridgeWireModel, t as assertExecutableAgentProfile, u as resolveRouterRetryPolicy } from "./model-policy-
|
|
2
|
+
import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, l as profileProviderModel, o as enforceTokenLimits, s as profileBridgeWireModel, t as assertExecutableAgentProfile, u as resolveRouterRetryPolicy } from "./model-policy-BbSCSak0.js";
|
|
3
3
|
import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
|
|
4
4
|
import { n as assertNoSymlinkDescendant, r as publishExclusiveDurableFile } from "./durable-file-D24y9zg7.js";
|
|
5
5
|
import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentEnvironmentCapabilitiesSchema, AgentExactRunControlRefSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentNativeContextContinuationResultSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, AgentTurnInputSchema, AgentTurnResultSchema, CanonicalStreamEventSchema, ContextTransferRequestSchema, InteractionAcknowledgementSchema, InteractionResponseCommandSchema, NativeContextBoundaryProofSchema, NativeContextContinuationRequestSchema, REASONING_EFFORTS, RuntimeEventEnvelopeSchema, TerminalReplayWindowSchema, TerminalSessionRefSchema, WorkspaceRequestSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentNativeContextContinuationResultMatchesRequest, agentProfileSchema, agentRunCancellationAcknowledgementMatchesRequest, agentRunCancellationRequestDigest, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalWorkspaceCwd, exactAgentInteractiveSessionStart, harnessSystemPromptIntents, harnessTypeSchema, nativeContextContinuationTurnDigest, nativeReasoningControl, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, renderInputPartsAsText, sha256DigestSchema, workspaceCwdPathForBase } from "@tangle-network/agent-interface";
|
|
@@ -94,6 +94,72 @@ function promptPartFromInputPart(part) {
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
//#endregion
|
|
97
|
+
//#region src/runtime/supervise/deadline.ts
|
|
98
|
+
const MAX_TIMER_DELAY_MS = 2147483647;
|
|
99
|
+
const DEFAULT_SUCCESSFUL_SHUTDOWN_MS = 5e3;
|
|
100
|
+
const TEARDOWN_ACKNOWLEDGEMENT_MS = 250;
|
|
101
|
+
/** Arm a finite wall-clock deadline in safe chunks. Resource deadlines unref by default;
|
|
102
|
+
* a standalone wait opts into keeping the process alive until it settles or is cancelled. */
|
|
103
|
+
function armDeadlineTimer(delayMs, onDeadline, keepAlive = false) {
|
|
104
|
+
const deadlineAtMs = Date.now() + Math.max(0, delayMs);
|
|
105
|
+
if (!Number.isFinite(delayMs) || !Number.isSafeInteger(Math.ceil(deadlineAtMs))) throw new ValidationError$1("timer delay must produce a finite safe deadline");
|
|
106
|
+
let cleared = false;
|
|
107
|
+
let timer;
|
|
108
|
+
const arm = () => {
|
|
109
|
+
if (cleared) return;
|
|
110
|
+
const remainingMs = Math.max(0, deadlineAtMs - Date.now());
|
|
111
|
+
timer = setTimeout(() => {
|
|
112
|
+
if (cleared) return;
|
|
113
|
+
if (Date.now() >= deadlineAtMs) onDeadline();
|
|
114
|
+
else arm();
|
|
115
|
+
}, Math.min(remainingMs, MAX_TIMER_DELAY_MS));
|
|
116
|
+
if (!keepAlive && typeof timer.unref === "function") timer.unref();
|
|
117
|
+
};
|
|
118
|
+
arm();
|
|
119
|
+
return () => {
|
|
120
|
+
cleared = true;
|
|
121
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Resolve a spawned child's duration into one absolute cutoff. An omitted child deadline inherits
|
|
126
|
+
* the parent cutoff; an explicit child duration may shorten, but never extend, that cutoff.
|
|
127
|
+
*/
|
|
128
|
+
function boundedChildDeadlineAt(parentDeadlineAtMs, childDeadlineMs, nowMs) {
|
|
129
|
+
const parent = parentDeadlineAtMs > 0 ? parentDeadlineAtMs : void 0;
|
|
130
|
+
const child = childDeadlineMs === void 0 ? void 0 : nowMs + childDeadlineMs;
|
|
131
|
+
if (parent === void 0) return child;
|
|
132
|
+
if (child === void 0) return parent;
|
|
133
|
+
return Math.min(parent, child);
|
|
134
|
+
}
|
|
135
|
+
/** Invoke teardown once and bound how long the runtime waits for its acknowledgement. A hard
|
|
136
|
+
* execution deadline always wins; without one, numeric grace gets a short acknowledgement
|
|
137
|
+
* allowance and a brutal kill gets only that allowance. Explicit `infinity` remains unbounded
|
|
138
|
+
* only when no execution deadline exists. The losing promise stays observed. */
|
|
139
|
+
async function teardownExecutor(executor, grace, deadlineAtMs, now) {
|
|
140
|
+
const work = Promise.resolve(executor.teardown(grace));
|
|
141
|
+
const requestedWaitMs = grace === "infinity" ? void 0 : grace === "brutalKill" ? executor.teardownTimeoutMs ?? TEARDOWN_ACKNOWLEDGEMENT_MS : grace + TEARDOWN_ACKNOWLEDGEMENT_MS;
|
|
142
|
+
const deadlineWaitMs = deadlineAtMs === void 0 ? void 0 : Math.max(0, deadlineAtMs - now()) + TEARDOWN_ACKNOWLEDGEMENT_MS;
|
|
143
|
+
const waitMs = requestedWaitMs === void 0 ? deadlineWaitMs : deadlineWaitMs === void 0 ? requestedWaitMs : Math.min(requestedWaitMs, deadlineWaitMs);
|
|
144
|
+
let receipt;
|
|
145
|
+
if (waitMs === void 0) receipt = await work;
|
|
146
|
+
else if (waitMs <= 0) {
|
|
147
|
+
work.catch(() => void 0);
|
|
148
|
+
throw new ValidationError$1("executor teardown did not acknowledge before its deadline");
|
|
149
|
+
} else {
|
|
150
|
+
let clearTimer;
|
|
151
|
+
const timedOut = new Promise((_resolve, reject) => {
|
|
152
|
+
clearTimer = armDeadlineTimer(waitMs, () => reject(new ValidationError$1(`executor teardown did not acknowledge within ${waitMs}ms`)), true);
|
|
153
|
+
});
|
|
154
|
+
try {
|
|
155
|
+
receipt = await Promise.race([work, timedOut]);
|
|
156
|
+
} finally {
|
|
157
|
+
clearTimer?.();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (!receipt.destroyed) throw new ValidationError$1(`executor teardown reported destroyed=false${receipt.detail ? `: ${receipt.detail}` : ""}`);
|
|
161
|
+
}
|
|
162
|
+
//#endregion
|
|
97
163
|
//#region src/runtime/retained-run-binding.ts
|
|
98
164
|
function exactSession(environment, controlRef) {
|
|
99
165
|
if (environment.id !== controlRef.environmentId || environment.provider !== controlRef.provider) throw new Error("provider reconstructed a different retained environment");
|
|
@@ -296,13 +362,13 @@ function isTerminalSessionStatus(status) {
|
|
|
296
362
|
function delay(ms, signal) {
|
|
297
363
|
if (signal?.aborted) return Promise.reject(abortError$2(signal.reason));
|
|
298
364
|
return new Promise((resolveDelay, rejectDelay) => {
|
|
299
|
-
const
|
|
365
|
+
const clearTimer = armDeadlineTimer(ms, finish, true);
|
|
300
366
|
function finish() {
|
|
301
367
|
signal?.removeEventListener("abort", onAbort);
|
|
302
368
|
resolveDelay();
|
|
303
369
|
}
|
|
304
370
|
function onAbort() {
|
|
305
|
-
|
|
371
|
+
clearTimer();
|
|
306
372
|
signal?.removeEventListener("abort", onAbort);
|
|
307
373
|
rejectDelay(abortError$2(signal?.reason));
|
|
308
374
|
}
|
|
@@ -638,24 +704,16 @@ function isAbortError$2(err) {
|
|
|
638
704
|
* keeps the event loop alive. Resolves (does not reject) on abort — callers
|
|
639
705
|
* re-check the signal explicitly after the sleep.
|
|
640
706
|
*/
|
|
641
|
-
function sleep(ms, signal) {
|
|
707
|
+
function sleep(ms, signal, keepAlive = true) {
|
|
708
|
+
if (signal?.aborted) return Promise.resolve();
|
|
642
709
|
return new Promise((resolve) => {
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
}
|
|
647
|
-
let onAbort;
|
|
648
|
-
const timer = setTimeout(() => {
|
|
649
|
-
if (onAbort && signal) signal.removeEventListener("abort", onAbort);
|
|
710
|
+
const done = () => {
|
|
711
|
+
clearTimer();
|
|
712
|
+
signal?.removeEventListener("abort", done);
|
|
650
713
|
resolve();
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
clearTimeout(timer);
|
|
655
|
-
resolve();
|
|
656
|
-
};
|
|
657
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
658
|
-
}
|
|
714
|
+
};
|
|
715
|
+
const clearTimer = armDeadlineTimer(ms, done, keepAlive);
|
|
716
|
+
signal?.addEventListener("abort", done, { once: true });
|
|
659
717
|
});
|
|
660
718
|
}
|
|
661
719
|
/**
|
|
@@ -664,12 +722,12 @@ function sleep(ms, signal) {
|
|
|
664
722
|
*/
|
|
665
723
|
function withTimeout(promise, ms) {
|
|
666
724
|
return new Promise((resolve) => {
|
|
667
|
-
const
|
|
725
|
+
const clearTimer = armDeadlineTimer(ms, () => resolve(void 0), true);
|
|
668
726
|
promise.then((value) => {
|
|
669
|
-
|
|
727
|
+
clearTimer();
|
|
670
728
|
resolve(value);
|
|
671
729
|
}, () => {
|
|
672
|
-
|
|
730
|
+
clearTimer();
|
|
673
731
|
resolve(void 0);
|
|
674
732
|
});
|
|
675
733
|
});
|
|
@@ -1254,10 +1312,14 @@ function createSandboxUsageLedger(harness) {
|
|
|
1254
1312
|
}
|
|
1255
1313
|
};
|
|
1256
1314
|
}
|
|
1315
|
+
/** Shared receipt semantics; an undeclared nonterminal observation is not a cumulative total. */
|
|
1316
|
+
function canonicalSandboxUsageMode(event) {
|
|
1317
|
+
const declaredMode = plainRecord$1(event.data)?.usageMode;
|
|
1318
|
+
return declaredMode === "delta" || declaredMode === "cumulative" ? declaredMode : declaredMode === void 0 && event.type === "llm_call" ? "delta" : declaredMode === void 0 && (event.type === "error" || isSandboxTerminalEvent(String(event.type))) ? "cumulative" : void 0;
|
|
1319
|
+
}
|
|
1257
1320
|
/** Terminal totals replace already credited usage; only per-call receipts add to it. */
|
|
1258
1321
|
function creditCanonicalUsage(event, call, credited, receipts, onCredit) {
|
|
1259
|
-
const
|
|
1260
|
-
const mode = declaredMode === "delta" || declaredMode === "cumulative" ? declaredMode : declaredMode === void 0 && event.type === "llm_call" ? "delta" : declaredMode === void 0 && (event.type === "error" || isSandboxTerminalEvent(String(event.type))) ? "cumulative" : void 0;
|
|
1322
|
+
const mode = canonicalSandboxUsageMode(event);
|
|
1261
1323
|
const result = { ...call };
|
|
1262
1324
|
const data = plainRecord$1(event.data) ?? {};
|
|
1263
1325
|
const explicitTokensUnknown = [
|
|
@@ -2330,26 +2392,60 @@ async function writeAllBytes(handle, value) {
|
|
|
2330
2392
|
offset += bytesWritten;
|
|
2331
2393
|
}
|
|
2332
2394
|
}
|
|
2333
|
-
/** Prepare
|
|
2334
|
-
*
|
|
2395
|
+
/** Prepare the tail under the journal owner's existing single-writer discipline.
|
|
2396
|
+
* Healthy appends read one byte, regardless of history size. Only recovery scans backward,
|
|
2397
|
+
* retaining a valid unterminated value or truncating an uncommitted torn tail. */
|
|
2335
2398
|
async function prepareJsonlAppend(path) {
|
|
2336
2399
|
const fs = await import("node:fs/promises");
|
|
2337
|
-
let
|
|
2400
|
+
let handle;
|
|
2338
2401
|
try {
|
|
2339
|
-
|
|
2402
|
+
handle = await fs.open(path, "r+");
|
|
2340
2403
|
} catch (error) {
|
|
2341
2404
|
if (isNoEntError(error)) return false;
|
|
2342
2405
|
throw error;
|
|
2343
2406
|
}
|
|
2344
|
-
if (bytes.byteLength === 0 || bytes[bytes.byteLength - 1] === 10) return false;
|
|
2345
|
-
const lastNewline = bytes.lastIndexOf(10);
|
|
2346
|
-
const tail = bytes.subarray(lastNewline + 1).toString("utf8");
|
|
2347
2407
|
try {
|
|
2348
|
-
|
|
2349
|
-
return
|
|
2350
|
-
|
|
2351
|
-
await
|
|
2352
|
-
return false;
|
|
2408
|
+
const size = (await handle.stat()).size;
|
|
2409
|
+
if (size === 0) return false;
|
|
2410
|
+
const lastByte = Buffer.allocUnsafe(1);
|
|
2411
|
+
await readAt(handle, lastByte, size - 1);
|
|
2412
|
+
if (lastByte[0] === 10) return false;
|
|
2413
|
+
const chunks = [];
|
|
2414
|
+
let end = size;
|
|
2415
|
+
let tailStart = 0;
|
|
2416
|
+
while (end > 0) {
|
|
2417
|
+
const start = Math.max(0, end - 65536);
|
|
2418
|
+
const chunk = Buffer.allocUnsafe(end - start);
|
|
2419
|
+
await readAt(handle, chunk, start);
|
|
2420
|
+
const newline = chunk.lastIndexOf(10);
|
|
2421
|
+
chunks.push(chunk.subarray(newline + 1));
|
|
2422
|
+
if (newline >= 0) {
|
|
2423
|
+
tailStart = start + newline + 1;
|
|
2424
|
+
break;
|
|
2425
|
+
}
|
|
2426
|
+
end = start;
|
|
2427
|
+
}
|
|
2428
|
+
const tail = Buffer.concat(chunks.reverse()).toString("utf8");
|
|
2429
|
+
try {
|
|
2430
|
+
JSON.parse(tail);
|
|
2431
|
+
return true;
|
|
2432
|
+
} catch (error) {
|
|
2433
|
+
if (!(error instanceof SyntaxError)) throw error;
|
|
2434
|
+
await handle.truncate(tailStart);
|
|
2435
|
+
await handle.sync();
|
|
2436
|
+
return false;
|
|
2437
|
+
}
|
|
2438
|
+
} finally {
|
|
2439
|
+
await handle.close();
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
/** A short read is legal; an unexpected EOF means the owner's snapshot changed. */
|
|
2443
|
+
async function readAt(handle, buffer, position) {
|
|
2444
|
+
let offset = 0;
|
|
2445
|
+
while (offset < buffer.length) {
|
|
2446
|
+
const { bytesRead } = await handle.read(buffer, offset, buffer.length - offset, position + offset);
|
|
2447
|
+
if (bytesRead === 0) throw new Error("journal changed while preparing its append tail");
|
|
2448
|
+
offset += bytesRead;
|
|
2353
2449
|
}
|
|
2354
2450
|
}
|
|
2355
2451
|
/** True for a filesystem error meaning "the file is not there yet" — the one condition an
|
|
@@ -7504,6 +7600,10 @@ async function* streamProviderExecutor(args) {
|
|
|
7504
7600
|
let sawIncompleteTokenReceipt = false;
|
|
7505
7601
|
let sawCostReceipt = false;
|
|
7506
7602
|
let sawUnknownCostReceipt = false;
|
|
7603
|
+
let sawCostEstimate = false;
|
|
7604
|
+
let pendingUnpricedWork = false;
|
|
7605
|
+
let pendingEstimate;
|
|
7606
|
+
let usdEstimated = 0;
|
|
7507
7607
|
let usd = 0;
|
|
7508
7608
|
let text = "";
|
|
7509
7609
|
let terminal = false;
|
|
@@ -7537,11 +7637,27 @@ async function* streamProviderExecutor(args) {
|
|
|
7537
7637
|
progress
|
|
7538
7638
|
};
|
|
7539
7639
|
const usageEvent = usageSandboxEvent(event);
|
|
7540
|
-
if (usageEvent) yield* creditUsage(usageLedger.observe(usageEvent, args.profile.name ?? "agent"));
|
|
7541
|
-
yield* creditUsage(usageLedger.observe(sandboxEvent, args.profile.name ?? "agent"));
|
|
7640
|
+
if (usageEvent) yield* creditUsage(usageLedger.observe(usageEvent, args.profile.name ?? "agent"), usageEvent);
|
|
7641
|
+
yield* creditUsage(usageLedger.observe(sandboxEvent, args.profile.name ?? "agent"), sandboxEvent);
|
|
7542
7642
|
if (isTerminalEnvironmentEvent(event)) terminal = true;
|
|
7543
7643
|
}
|
|
7544
7644
|
yield* creditUsage(usageLedger.settleTurn(args.profile.name ?? "agent"));
|
|
7645
|
+
if (pendingUnpricedWork) {
|
|
7646
|
+
const estimate = pendingEstimate ?? 0;
|
|
7647
|
+
sawUnknownCostReceipt = true;
|
|
7648
|
+
usd += estimate;
|
|
7649
|
+
if (pendingEstimate !== void 0) {
|
|
7650
|
+
sawCostEstimate = true;
|
|
7651
|
+
usdEstimated += estimate;
|
|
7652
|
+
}
|
|
7653
|
+
yield {
|
|
7654
|
+
kind: "cost",
|
|
7655
|
+
usd: estimate,
|
|
7656
|
+
usdKnown: false,
|
|
7657
|
+
...pendingEstimate === void 0 ? {} : { usdEstimated: estimate },
|
|
7658
|
+
provenance: pendingEstimate === void 0 ? "uncaptured" : "catalog-estimate"
|
|
7659
|
+
};
|
|
7660
|
+
}
|
|
7545
7661
|
if ((args.options.requireTerminalEvent ?? true) && !terminal) throw new ValidationError(`providerAsExecutor(${args.provider.name}): stream ended without a terminal result/done/status event`);
|
|
7546
7662
|
yield { kind: "iteration" };
|
|
7547
7663
|
const result = {
|
|
@@ -7555,7 +7671,7 @@ async function* streamProviderExecutor(args) {
|
|
|
7555
7671
|
...sawCompleteTokenReceipt && !sawIncompleteTokenReceipt ? {} : { tokensKnown: false },
|
|
7556
7672
|
usd,
|
|
7557
7673
|
usdKnown: sawCostReceipt && !sawUnknownCostReceipt,
|
|
7558
|
-
...
|
|
7674
|
+
...sawCostEstimate ? { usdEstimated } : {},
|
|
7559
7675
|
ms: Date.now() - started
|
|
7560
7676
|
};
|
|
7561
7677
|
const verdict = await args.options.validator?.validate(result, {
|
|
@@ -7599,7 +7715,7 @@ async function* streamProviderExecutor(args) {
|
|
|
7599
7715
|
}
|
|
7600
7716
|
}
|
|
7601
7717
|
if (failed) throw failure;
|
|
7602
|
-
function* creditUsage(receipt) {
|
|
7718
|
+
function* creditUsage(receipt, event) {
|
|
7603
7719
|
if (receipt === void 0) return;
|
|
7604
7720
|
const hasTokens = receipt.tokensIn !== void 0 || receipt.tokensOut !== void 0;
|
|
7605
7721
|
if (hasTokens && receipt.tokensIn !== void 0 && receipt.tokensOut !== void 0 && receipt.tokensKnown !== false) sawCompleteTokenReceipt = true;
|
|
@@ -7615,25 +7731,37 @@ async function* streamProviderExecutor(args) {
|
|
|
7615
7731
|
...receipt.tokensKnown === false ? { tokensKnown: false } : {}
|
|
7616
7732
|
};
|
|
7617
7733
|
}
|
|
7618
|
-
|
|
7734
|
+
const amount = receipt.costUsd;
|
|
7735
|
+
if (amount !== void 0) {
|
|
7619
7736
|
sawCostReceipt = true;
|
|
7620
|
-
usd +=
|
|
7737
|
+
usd += amount;
|
|
7621
7738
|
if (receipt.usdKnown === false) {
|
|
7622
7739
|
sawUnknownCostReceipt = true;
|
|
7740
|
+
sawCostEstimate = true;
|
|
7741
|
+
usdEstimated += amount;
|
|
7623
7742
|
yield {
|
|
7624
7743
|
kind: "cost",
|
|
7625
7744
|
usdKnown: false,
|
|
7626
|
-
usd:
|
|
7627
|
-
usdEstimated:
|
|
7745
|
+
usd: amount,
|
|
7746
|
+
usdEstimated: amount,
|
|
7628
7747
|
provenance: "uncaptured"
|
|
7629
7748
|
};
|
|
7630
|
-
} else
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7749
|
+
} else {
|
|
7750
|
+
if (event && canonicalSandboxUsageMode(event) === "cumulative") {
|
|
7751
|
+
pendingUnpricedWork = false;
|
|
7752
|
+
pendingEstimate = void 0;
|
|
7753
|
+
}
|
|
7754
|
+
yield {
|
|
7755
|
+
kind: "cost",
|
|
7756
|
+
usdKnown: true,
|
|
7757
|
+
usd: amount,
|
|
7758
|
+
provenance: "provider-receipt"
|
|
7759
|
+
};
|
|
7760
|
+
}
|
|
7761
|
+
} else if (receipt.estimatedCostUsd !== void 0) {
|
|
7762
|
+
pendingUnpricedWork = true;
|
|
7763
|
+
pendingEstimate = (pendingEstimate ?? 0) + receipt.estimatedCostUsd;
|
|
7764
|
+
} else if (input > 0 || output > 0 || receipt.tokensKnown === false) pendingUnpricedWork = true;
|
|
7637
7765
|
}
|
|
7638
7766
|
}
|
|
7639
7767
|
/** One retained dispatch owns creation, replay, result identity, and cancellation. */
|
|
@@ -9566,14 +9694,14 @@ function withRouterRequestTimeout(callerSignal, timeoutMs) {
|
|
|
9566
9694
|
dispose: () => void 0
|
|
9567
9695
|
};
|
|
9568
9696
|
const controller = new AbortController();
|
|
9569
|
-
const
|
|
9697
|
+
const clearTimeout = armDeadlineTimer(timeoutMs, () => controller.abort(/* @__PURE__ */ new Error(`router request timeout after ${timeoutMs}ms`)), true);
|
|
9570
9698
|
const onCallerAbort = () => controller.abort(callerSignal?.reason ?? /* @__PURE__ */ new Error("aborted"));
|
|
9571
9699
|
if (callerSignal?.aborted) onCallerAbort();
|
|
9572
9700
|
else callerSignal?.addEventListener("abort", onCallerAbort, { once: true });
|
|
9573
9701
|
return {
|
|
9574
9702
|
signal: controller.signal,
|
|
9575
9703
|
dispose: () => {
|
|
9576
|
-
clearTimeout(
|
|
9704
|
+
clearTimeout();
|
|
9577
9705
|
callerSignal?.removeEventListener("abort", onCallerAbort);
|
|
9578
9706
|
}
|
|
9579
9707
|
};
|
|
@@ -12322,16 +12450,7 @@ const BRIDGE_RECONNECT_MAX_BACKOFF_MS = 2e3;
|
|
|
12322
12450
|
async function reconnectBackoff(attempt, signal) {
|
|
12323
12451
|
const ms = Math.min(BRIDGE_RECONNECT_MAX_BACKOFF_MS, 200 * 2 ** Math.max(0, attempt - 1));
|
|
12324
12452
|
if (ms <= 0 || signal.aborted) return;
|
|
12325
|
-
await
|
|
12326
|
-
const done = () => {
|
|
12327
|
-
clearTimeout(timer);
|
|
12328
|
-
signal.removeEventListener("abort", done);
|
|
12329
|
-
resolve();
|
|
12330
|
-
};
|
|
12331
|
-
const timer = setTimeout(done, ms);
|
|
12332
|
-
if (typeof timer === "object" && timer !== null && "unref" in timer) timer.unref();
|
|
12333
|
-
signal.addEventListener("abort", done, { once: true });
|
|
12334
|
-
});
|
|
12453
|
+
await sleep(ms, signal, false);
|
|
12335
12454
|
}
|
|
12336
12455
|
async function* streamDurableBridgeRun(args) {
|
|
12337
12456
|
let reconnects = 0;
|
|
@@ -13756,13 +13875,14 @@ async function* streamBridgeSession(args) {
|
|
|
13756
13875
|
else external.addEventListener("abort", abortTurn);
|
|
13757
13876
|
interruptSig.addEventListener("abort", abortTurn, { once: true });
|
|
13758
13877
|
let timedOut = false;
|
|
13759
|
-
const
|
|
13878
|
+
const clearTimer = seam.timeoutMs !== void 0 ? armDeadlineTimer(seam.timeoutMs, () => {
|
|
13760
13879
|
timedOut = true;
|
|
13761
13880
|
abortTurn();
|
|
13762
|
-
},
|
|
13881
|
+
}, true) : void 0;
|
|
13763
13882
|
const cleanup = () => {
|
|
13764
13883
|
external.removeEventListener("abort", abortTurn);
|
|
13765
|
-
|
|
13884
|
+
interruptSig.removeEventListener("abort", abortTurn);
|
|
13885
|
+
clearTimer?.();
|
|
13766
13886
|
};
|
|
13767
13887
|
let initialModelCredential;
|
|
13768
13888
|
const preflightSignal = args.stopSignal === void 0 ? turnController.signal : AbortSignal.any([turnController.signal, args.stopSignal]);
|
|
@@ -16089,11 +16209,12 @@ function createSteerableSandboxSession(args) {
|
|
|
16089
16209
|
args.controller.signal.addEventListener("abort", abortTurn);
|
|
16090
16210
|
}
|
|
16091
16211
|
interruptSig.addEventListener("abort", abortTurn, { once: true });
|
|
16092
|
-
const
|
|
16212
|
+
const clearTimer = args.options?.turnTimeoutMs ? armDeadlineTimer(args.options.turnTimeoutMs, abortTurn, true) : void 0;
|
|
16093
16213
|
const cleanup = () => {
|
|
16094
16214
|
signal.removeEventListener("abort", abortTurn);
|
|
16095
16215
|
args.controller.signal.removeEventListener("abort", abortTurn);
|
|
16096
|
-
|
|
16216
|
+
interruptSig.removeEventListener("abort", abortTurn);
|
|
16217
|
+
clearTimer?.();
|
|
16097
16218
|
};
|
|
16098
16219
|
let events;
|
|
16099
16220
|
let sawLlmCall = false;
|
|
@@ -17351,9 +17472,13 @@ const cliExecutor = (_spec, ctx) => {
|
|
|
17351
17472
|
});
|
|
17352
17473
|
},
|
|
17353
17474
|
async teardown(grace) {
|
|
17475
|
+
if (!proc) {
|
|
17476
|
+
controller.abort();
|
|
17477
|
+
return { destroyed: true };
|
|
17478
|
+
}
|
|
17479
|
+
const receipt = await killWithGrace(proc, grace);
|
|
17354
17480
|
controller.abort();
|
|
17355
|
-
|
|
17356
|
-
return killWithGrace(proc, grace);
|
|
17481
|
+
return receipt;
|
|
17357
17482
|
},
|
|
17358
17483
|
resultArtifact() {
|
|
17359
17484
|
if (!artifact) throw new ValidationError$1("cliExecutor: resultArtifact() read before stream drained");
|
|
@@ -17447,11 +17572,11 @@ async function* streamCliLeaf(args) {
|
|
|
17447
17572
|
/** SIGTERM, then SIGKILL after `grace` ms (`'brutalKill'` = immediate SIGKILL,
|
|
17448
17573
|
* `'infinity'` = await clean exit, never escalate). */
|
|
17449
17574
|
function killWithGrace(proc, grace) {
|
|
17450
|
-
if (proc.exitCode !== null || proc.
|
|
17575
|
+
if (proc.pid === void 0 || proc.exitCode !== null || proc.signalCode !== null) return Promise.resolve({ destroyed: true });
|
|
17451
17576
|
return new Promise((resolve) => {
|
|
17452
|
-
let
|
|
17577
|
+
let clearTimer;
|
|
17453
17578
|
proc.once("close", () => {
|
|
17454
|
-
|
|
17579
|
+
clearTimer?.();
|
|
17455
17580
|
resolve({ destroyed: true });
|
|
17456
17581
|
});
|
|
17457
17582
|
if (grace === "brutalKill") {
|
|
@@ -17460,9 +17585,9 @@ function killWithGrace(proc, grace) {
|
|
|
17460
17585
|
}
|
|
17461
17586
|
proc.kill("SIGTERM");
|
|
17462
17587
|
if (grace === "infinity") return;
|
|
17463
|
-
|
|
17464
|
-
if (proc.exitCode === null &&
|
|
17465
|
-
},
|
|
17588
|
+
clearTimer = armDeadlineTimer(grace, () => {
|
|
17589
|
+
if (proc.exitCode === null && proc.signalCode === null) proc.kill("SIGKILL");
|
|
17590
|
+
}, true);
|
|
17466
17591
|
});
|
|
17467
17592
|
}
|
|
17468
17593
|
function bridgeWorktreeExecutor(spec, ctx, seam) {
|
|
@@ -18184,70 +18309,6 @@ function singleShotDriver(maxIterations) {
|
|
|
18184
18309
|
};
|
|
18185
18310
|
}
|
|
18186
18311
|
//#endregion
|
|
18187
|
-
//#region src/runtime/supervise/deadline.ts
|
|
18188
|
-
const MAX_TIMER_DELAY_MS = 2147483647;
|
|
18189
|
-
const DEFAULT_SUCCESSFUL_SHUTDOWN_MS = 5e3;
|
|
18190
|
-
const TEARDOWN_ACKNOWLEDGEMENT_MS = 250;
|
|
18191
|
-
/** Arm one wall-clock deadline without keeping the Node.js process alive. */
|
|
18192
|
-
function armDeadlineTimer(delayMs, onDeadline) {
|
|
18193
|
-
const deadlineAtMs = Date.now() + Math.max(0, delayMs);
|
|
18194
|
-
let cleared = false;
|
|
18195
|
-
let timer;
|
|
18196
|
-
const arm = () => {
|
|
18197
|
-
if (cleared) return;
|
|
18198
|
-
const remainingMs = Math.max(0, deadlineAtMs - Date.now());
|
|
18199
|
-
timer = setTimeout(() => {
|
|
18200
|
-
if (cleared) return;
|
|
18201
|
-
if (Date.now() >= deadlineAtMs) onDeadline();
|
|
18202
|
-
else arm();
|
|
18203
|
-
}, Math.min(remainingMs, MAX_TIMER_DELAY_MS));
|
|
18204
|
-
if (typeof timer.unref === "function") timer.unref();
|
|
18205
|
-
};
|
|
18206
|
-
arm();
|
|
18207
|
-
return () => {
|
|
18208
|
-
cleared = true;
|
|
18209
|
-
if (timer !== void 0) clearTimeout(timer);
|
|
18210
|
-
};
|
|
18211
|
-
}
|
|
18212
|
-
/**
|
|
18213
|
-
* Resolve a spawned child's duration into one absolute cutoff. An omitted child deadline inherits
|
|
18214
|
-
* the parent cutoff; an explicit child duration may shorten, but never extend, that cutoff.
|
|
18215
|
-
*/
|
|
18216
|
-
function boundedChildDeadlineAt(parentDeadlineAtMs, childDeadlineMs, nowMs) {
|
|
18217
|
-
const parent = parentDeadlineAtMs > 0 ? parentDeadlineAtMs : void 0;
|
|
18218
|
-
const child = childDeadlineMs === void 0 ? void 0 : nowMs + childDeadlineMs;
|
|
18219
|
-
if (parent === void 0) return child;
|
|
18220
|
-
if (child === void 0) return parent;
|
|
18221
|
-
return Math.min(parent, child);
|
|
18222
|
-
}
|
|
18223
|
-
/** Invoke teardown once and bound how long the runtime waits for its acknowledgement. A hard
|
|
18224
|
-
* execution deadline always wins; without one, numeric grace gets a short acknowledgement
|
|
18225
|
-
* allowance and a brutal kill gets only that allowance. Explicit `infinity` remains unbounded
|
|
18226
|
-
* only when no execution deadline exists. The losing promise stays observed. */
|
|
18227
|
-
async function teardownExecutor(executor, grace, deadlineAtMs, now) {
|
|
18228
|
-
const work = Promise.resolve(executor.teardown(grace));
|
|
18229
|
-
const requestedWaitMs = grace === "infinity" ? void 0 : grace === "brutalKill" ? executor.teardownTimeoutMs ?? TEARDOWN_ACKNOWLEDGEMENT_MS : grace + TEARDOWN_ACKNOWLEDGEMENT_MS;
|
|
18230
|
-
const deadlineWaitMs = deadlineAtMs === void 0 ? void 0 : Math.max(0, deadlineAtMs - now()) + TEARDOWN_ACKNOWLEDGEMENT_MS;
|
|
18231
|
-
const waitMs = requestedWaitMs === void 0 ? deadlineWaitMs : deadlineWaitMs === void 0 ? requestedWaitMs : Math.min(requestedWaitMs, deadlineWaitMs);
|
|
18232
|
-
let receipt;
|
|
18233
|
-
if (waitMs === void 0) receipt = await work;
|
|
18234
|
-
else if (waitMs <= 0) {
|
|
18235
|
-
work.catch(() => void 0);
|
|
18236
|
-
throw new ValidationError$1("executor teardown did not acknowledge before its deadline");
|
|
18237
|
-
} else {
|
|
18238
|
-
let timer;
|
|
18239
|
-
const timedOut = new Promise((_resolve, reject) => {
|
|
18240
|
-
timer = setTimeout(() => reject(new ValidationError$1(`executor teardown did not acknowledge within ${waitMs}ms`)), waitMs);
|
|
18241
|
-
});
|
|
18242
|
-
try {
|
|
18243
|
-
receipt = await Promise.race([work, timedOut]);
|
|
18244
|
-
} finally {
|
|
18245
|
-
if (timer !== void 0) clearTimeout(timer);
|
|
18246
|
-
}
|
|
18247
|
-
}
|
|
18248
|
-
if (!receipt.destroyed) throw new ValidationError$1(`executor teardown reported destroyed=false${receipt.detail ? `: ${receipt.detail}` : ""}`);
|
|
18249
|
-
}
|
|
18250
|
-
//#endregion
|
|
18251
18312
|
//#region src/runtime/supervise/dispatch.ts
|
|
18252
18313
|
/**
|
|
18253
18314
|
*
|
|
@@ -19908,18 +19969,8 @@ function outcome(kind, settled, label, untilMs, armedAt, wokenAt, polls, probeEr
|
|
|
19908
19969
|
/** `setTimeout` that resolves early (and clears) when the scope aborts, so a cancelled wait
|
|
19909
19970
|
* releases the event loop immediately instead of holding the process to its deadline. */
|
|
19910
19971
|
function defaultSleep$1(ms, signal) {
|
|
19911
|
-
if (ms <= 0 || signal
|
|
19912
|
-
return
|
|
19913
|
-
const timer = setTimeout(() => {
|
|
19914
|
-
signal.removeEventListener("abort", onAbort);
|
|
19915
|
-
resolve();
|
|
19916
|
-
}, ms);
|
|
19917
|
-
function onAbort() {
|
|
19918
|
-
clearTimeout(timer);
|
|
19919
|
-
resolve();
|
|
19920
|
-
}
|
|
19921
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
19922
|
-
});
|
|
19972
|
+
if (ms <= 0 || signal?.aborted) return Promise.resolve();
|
|
19973
|
+
return sleep(ms, signal);
|
|
19923
19974
|
}
|
|
19924
19975
|
//#endregion
|
|
19925
19976
|
//#region src/runtime/supervise/scope.ts
|
|
@@ -22544,16 +22595,7 @@ var DriverAttemptsExhaustedError = class extends RuntimeRunStateError {
|
|
|
22544
22595
|
};
|
|
22545
22596
|
async function defaultSleep(ms, signal) {
|
|
22546
22597
|
if (ms <= 0 || signal.aborted) return;
|
|
22547
|
-
await
|
|
22548
|
-
const done = () => {
|
|
22549
|
-
clearTimeout(timer);
|
|
22550
|
-
signal.removeEventListener("abort", done);
|
|
22551
|
-
resolve();
|
|
22552
|
-
};
|
|
22553
|
-
const timer = setTimeout(done, ms);
|
|
22554
|
-
if (typeof timer === "object" && timer !== null && "unref" in timer) timer.unref();
|
|
22555
|
-
signal.addEventListener("abort", done, { once: true });
|
|
22556
|
-
});
|
|
22598
|
+
await sleep(ms, signal, false);
|
|
22557
22599
|
}
|
|
22558
22600
|
/**
|
|
22559
22601
|
* Run the driver until it completes WITH ITS CONTRACT MET, or until the budget, the deadline, an
|
|
@@ -23391,15 +23433,13 @@ async function drainLiveChildren(scope, controller, settleGraceMs = 0) {
|
|
|
23391
23433
|
await drainCursor(scope);
|
|
23392
23434
|
return unconfirmedTeardowns(scope);
|
|
23393
23435
|
}
|
|
23394
|
-
let
|
|
23395
|
-
if (settleGraceMs !== null && settleGraceMs > 0 && !controller.signal.aborted)
|
|
23396
|
-
|
|
23397
|
-
graceTimer.unref?.();
|
|
23398
|
-
} else if (settleGraceMs !== null && !controller.signal.aborted) controller.abort("root driver failed; no child settle grace configured");
|
|
23436
|
+
let clearGraceTimer;
|
|
23437
|
+
if (settleGraceMs !== null && settleGraceMs > 0 && !controller.signal.aborted) clearGraceTimer = armDeadlineTimer(settleGraceMs, () => controller.abort("root driver failed; child settle grace expired"));
|
|
23438
|
+
else if (settleGraceMs !== null && !controller.signal.aborted) controller.abort("root driver failed; no child settle grace configured");
|
|
23399
23439
|
try {
|
|
23400
23440
|
await drainCursor(scope);
|
|
23401
23441
|
} finally {
|
|
23402
|
-
|
|
23442
|
+
clearGraceTimer?.();
|
|
23403
23443
|
}
|
|
23404
23444
|
const after = scope.view;
|
|
23405
23445
|
if (after.inFlight > 0 || after.waiting > 0) throw new RuntimeRunStateError(`supervisor: cleanup ended with ${after.inFlight} running, ${after.waiting} waiting, and ` + describeUnconfirmed(scope));
|
|
@@ -23560,6 +23600,6 @@ function isNonEmptySpend(s) {
|
|
|
23560
23600
|
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);
|
|
23561
23601
|
}
|
|
23562
23602
|
//#endregion
|
|
23563
|
-
export {
|
|
23603
|
+
export { cliInPlaceExecutor as $, generateSpanId as $n, runtimeOwnedExecutorProviderEvidence as $r, createCodexRolloutStoreReader as $t, waitUntil as A, sleep as Ai, abortError as An, renderProfileMaterializationIssues as Ar, WORKER_TRACE_PROPAGATION as At, readWorkerInteractiveBinding as B, decodeHarnessUsage as Bi, resolveRedactor as Bn, attestRuntimeOwnedPendingExecutor as Br, AUTHORITY_MARKERS as Bt, scopeOwnerExecutorNodeContext as C, chargedTokens as Ci, sandboxClientAsProvider as Cn, defineProfileMaterializationContract as Cr, BudgetReconcileFault as Ct, pollFor as D, isAbortError$2 as Di, registerRetainedExecutorPreparation as Dn, promptModelProfileMaterialization as Dr, newUsageTotals as Dt, isWaitOutcome as E, hasCompleteCacheBreakdown as Ei, sandboxSessionTraceSource as En, promptControlProfileMaterialization as Er, meterUsageEvent as Et, scopeRetainedOwnerResult as F, withTimeout as Fi, startRetainedRun as Fn, worktreeCliProfileMaterialization as Fr, taskToPrompt as Ft, startRetainedInteractiveRun as G, teardownExecutor as Gi, INTELLIGENCE_WIRE_VERSION as Gn, knownExecutionBindingReceipt as Gr, isPeerMailEnvelope as Gt, workerInteractiveBindingsDir as H, awaitAbortable$1 as Hi, mergeTraceEnv as Hn, authoredProfileDigest as Hr, PEER_MAIL_WIRE_KEY as Ht, interactiveAdmissionSeamKey as I, zeroSpend as Ii, startRetainedRunInEnvironment as In, isNoEntError as Ir, DEFAULT_STALL_AFTER_MS as It, freeSlots as J, providerMessageText as Ji, buildRuntimeEventOtelSpans as Jn, providerAttemptEvidence as Jr, isLiveNodeStatus as Jt, destroyInteractiveEnvironment as K, promptFromAgentTurnInput as Ki, buildLoopOtelSpans as Kn, knownMaterializationReceipt as Kr, peerMailTools as Kt, readWorkerInteractiveAdmissions as L, addResourceSpend as Li, retainedCreateMaterial as Ln, parseCommittedJsonLines as Lr, createActivityLog as Lt, prepareScopeRetainedOwnerTask as M, throwAbort as Mi, runAbortable as Mn, sandboxActProfileMaterialization as Mr, workerTraceEnv as Mt, scopeRetainedOwnerContext as N, throwIfAborted as Ni, reconnectRetainedRun as Nn, unsupportedProfileDimensions as Nr, workerTraceHeaders as Nt, timerAt as O, promptCacheTokenClasses as Oi, retainedExecutorSeamKey as On, promptOnlyProfileMaterialization as Or, spendFromUsageEvents as Ot, scopeRetainedOwnerPriorSpend as P, unmeteredSpend as Pi, recoverRetainedRun as Pn, validateProfileMaterialization as Pr, workerTraceSeamKey as Pt, captureReusableExecutorConfig as Q, flatOtelSpan as Qn, runtimeOwnedExecutorMaterialization as Qr, addHarnessUsage as Qt, workerInteractiveAdmissionFile as R, resourceTelemetry as Ri, defaultRedactor as Rn, prepareJsonlAppend as Rr, readWorkerProgress as Rt, restoreScopeOwnerAcceptedExecution as S, addSpend as Si, resolveAgentEnvironmentProvider as Sn, controlProfileMaterialization as Sr, contentAddress as St, createWaitProbes as T, deleteBoxSafe as Ti, decodeToolPart as Tn, profileMaterializationAxes$1 as Tr, createBudgetPool as Tt, reconnectRetainedInteractiveRun as U, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as Ui, readTraceContextFromEnv as Un, finalizeRuntimeOwnedPendingExecutor as Ur, claimsAuthority as Ut, workerInteractiveBindingFile as V, abortError$2 as Vi, createPropagatingTraceEmitter as Vn, attestRuntimeOwnedScopeOwner as Vr, DEFAULT_PEER_MAIL_LIMITS as Vt, recoverRetainedInteractiveRun as W, armDeadlineTimer as Wi, traceContextToEnv as Wn, inheritRuntimeOwnedExecutorAttestation as Wr, createPeerMailbox as Wt, rollingDispatch as X, createOtelExporter as Xn, runtimeOwnedDriveHarnessProviderEvidence as Xr, bridgeAdmissionRefusal as Xt, queueOf as Y, createOpenInferenceFileExporter as Yn, recordRuntimeOwnedDriveHarnessProviderEvidence as Yr, isTerminalNodeStatus as Yt, bindReusableExecutorExecutionId as Z, exportEvalRuns as Zn, runtimeOwnedExecutorExecutionBinding as Zr, bridgeModelRouteRefusal as Zt, createScope as _, mapSandboxToolEvent as _i, observedModelMatchesDeclared as _n, localHarnessExecutable as _r, WORKER_TOOL_TRACE_SCHEMA_VERSION as _t, pickBestDelivered as a, executableAgentSpecSnapshot as ai, createSandboxForSpec as an, createRuntimeStreamEventCollector as ar, DEFAULT_SANDBOX_STEERING_MAX_TURNS as at, meterRuntimeOwnedProviderAttempt as b, sandboxProgressEvents as bi, providerAsExecutor as bn, AGENT_PROFILE_MATERIALIZATION_AXES as br, parseWorkerToolTraceArtifact as bt, DriverAttemptsExhaustedError as c, projectSandboxOutcome as ci, runAgentRounds as cn, sanitizeRuntimeStreamEvent as cr, FileResultBlobStore as ct, runDriverWithRetry as d, canonicalStreamEventFromSandboxEvent as di, acquireSandbox as dn, captureWorktreeDiff as dr, InMemorySpawnJournal as dt, runtimeOwnedPendingExecutorMaterialization as ei, harnessUsageIsEmpty as en, loopEventToOtelSpan as er, cliWorktreeExecutor as et, driverChild as f, createSandboxToolPartState as fi, assertBoxlessPromptOptions as fn, createWorktree as fr, insideCursorNamespace as ft, beginScopeOwnerAttempt as g, mapSandboxEvent as gi, canonicalObservedModelParts as gn, harnessSupportsReasoningEffort as gr, replaySpawnTree as gt, withDriverExecutor as h, isSandboxTerminalEvent as hi, runBrainLoop as hn, LOCAL_HARNESSES as hr, pendingWaits as ht, collectDelivered as i, executableAgentProfileSnapshot as ii, TERMINAL_DECISIONS as in, createRuntimeEventCollector as ir, createWorktreeCliExecutor as it, consumeScopeRetainedOwnerResult as j, stringifySafe as ji, linkAbort as jn, renderUnsupported as jr, readWorkerTraceContext as jt, validateWaitSpec as k, randomSuffix as ki, RunCancellationReason as kn, promptResourceProfileMaterialization as kr, spendFromUsageTotals as kt, classifyDriverFailure as l, readSandboxOutcome as li, createSandboxLineage as ln, runSettledCommand as lr, FileSpawnJournal as lt, isDriverSpec as m, extractLlmCallEvent as mi, routerBrain as mn, DEFAULT_LOCAL_HARNESS as mr, materializeTreeView as mt, createSupervisor as n, unknownExecutionBindingReceipt as ni, bridgeRuntimeAttachmentsKey as nn, padTraceId as nr, createExecutorRegistry as nt, runFinalizer as o, detachedFrozen as oi, defaultSelectWinner as on, sanitizeAgentRuntimeEvent as or, createSteerableSandboxSession as ot, driverExecutorFactory as p, createSandboxUsageLedger as pi, readPromptOptions as pn, removeWorktree as pr, loadSpawnForest as pt, effectiveConcurrency as q, promptOptionsFromAgentTurnInput as qi, buildLoopSpanNodes as qn, newExecutionAttemptId as qr, peerMailVerbNames as qt, bestDelivered as r, unknownMaterializationReceipt as ri, bridgeStopSignalKey as rn, toOtelAttributes as rr, snapshotExecutorConfig as rt, runTree as s, detachedSnapshot as si, isTerminalDecision as sn, sanitizeKnowledgeReadinessReport as sr, createInPlaceCliExecutor as st, createRootHandle as t, runtimeOwnedScopeOwnerRuntime as ti, readCodexRolloutSession as tn, padSpanId as tr, createExecutor as tt, defaultUnmetContractSteer as u, assertSandboxServedModel as ui, probeSandboxCapabilities as un, runWorktreeHarness as ur, InMemoryResultBlobStore as ut, deriveNodeExecutionIdentity as v, notifySandboxEventObserver as vi, DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS as vn, parseCodexTokenUsage as vr, captureWorkerTraceEvidence as vt, settledToIteration as w, cloneSpend as wi, createPushTraceSource as wn, fullProfileMaterialization as wr, assertValidBudget as wt, recordScopeOwnerMaterialization as x, sumSandboxUsage as xi, providerAsSandboxClient as xn, assertProfileMaterialization as xr, workerTraceAnalysisStore as xt, meterRuntimeOwnedAccounting as y, sandboxEventServedBackend as yi, createAgentEnvironmentProviderRegistry as yn, CodexExecutionDiagnosticError as yr, isTraceAnalysisStore as yt, attachWorker as z, withBudgetResources as zi, defaultRedactorIdentityMaterial as zn, writeAllBytes as zr, createInbox as zt };
|
|
23564
23604
|
|
|
23565
|
-
//# sourceMappingURL=supervisor-
|
|
23605
|
+
//# sourceMappingURL=supervisor-0ksHf44Z.js.map
|