@tangle-network/agent-runtime 0.218.1 → 0.219.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.
- package/dist/{activation-DI04_3R-.js → activation-C-8VqFSN.js} +2 -2
- package/dist/{activation-DI04_3R-.js.map → activation-C-8VqFSN.js.map} +1 -1
- package/dist/{activation-D5bSCvRA.d.ts → activation-D-YAPCtn.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-rlM6lqtZ.js → coordination-driver-CvinSUI-.js} +2 -2
- package/dist/{coordination-driver-rlM6lqtZ.js.map → coordination-driver-CvinSUI-.js.map} +1 -1
- package/dist/{delegate-CVlTAKGU.js → delegate-BH8r8hkQ.js} +2 -2
- package/dist/{delegate-CVlTAKGU.js.map → delegate-BH8r8hkQ.js.map} +1 -1
- package/dist/durable.d.ts +8 -2
- package/dist/durable.js +4 -2
- package/dist/durable.js.map +1 -1
- package/dist/{graph-i9EWCOK7.js → graph-5N4gLnOt.js} +4 -3
- package/dist/graph-5N4gLnOt.js.map +1 -0
- package/dist/{improvement-cycle-DqfEWpFs.js → improvement-cycle-BIAKVZ3B.js} +3 -3
- package/dist/{improvement-cycle-DqfEWpFs.js.map → improvement-cycle-BIAKVZ3B.js.map} +1 -1
- package/dist/{index-DgDpB-HB.d.ts → index-CLDpu-bs.d.ts} +15 -5
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +3 -3
- package/dist/kernel.js +9 -9
- package/dist/{loop-runner-bin-BiZuxoZW.js → loop-runner-bin-CTEJAcac.js} +3 -3
- package/dist/{loop-runner-bin-BiZuxoZW.js.map → loop-runner-bin-CTEJAcac.js.map} +1 -1
- package/dist/{loop-runner-bin-CDs3H8Ej.d.ts → loop-runner-bin-Cn9DBrLv.d.ts} +3 -3
- 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 +2 -2
- package/dist/mcp/index.js +4 -4
- package/dist/{provision-supervisor-SvnQnnII.js → provision-supervisor-40EOGn14.js} +3 -3
- package/dist/{provision-supervisor-SvnQnnII.js.map → provision-supervisor-40EOGn14.js.map} +1 -1
- package/dist/{runtime-DGdRJN30.js → runtime-BDK_GOAd.js} +8 -8
- package/dist/{runtime-DGdRJN30.js.map → runtime-BDK_GOAd.js.map} +1 -1
- package/dist/{server-BNE25y3V.js → server-DuvbSAVA.js} +3 -3
- package/dist/{server-BNE25y3V.js.map → server-DuvbSAVA.js.map} +1 -1
- package/dist/{stream-agent-turn-DPv9w25U.d.ts → stream-agent-turn-DSrEMRwR.d.ts} +89 -2
- package/dist/{structural-rollout-Bb0d3o-X.js → structural-rollout-BAr61WjX.js} +2 -2
- package/dist/{structural-rollout-Bb0d3o-X.js.map → structural-rollout-BAr61WjX.js.map} +1 -1
- package/dist/{supervise-DV0dlkir.js → supervise-W_mtzswa.js} +10 -6
- package/dist/supervise-W_mtzswa.js.map +1 -0
- package/dist/{supervisor-DELeLQRJ.js → supervisor-WRrw0nlk.js} +225 -42
- package/dist/supervisor-WRrw0nlk.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- 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/graph-i9EWCOK7.js.map +0 -1
- package/dist/supervise-DV0dlkir.js.map +0 -1
- package/dist/supervisor-DELeLQRJ.js.map +0 -1
|
@@ -708,27 +708,10 @@ function extractLlmCallEvent(event, agentRunName) {
|
|
|
708
708
|
if (!event || typeof event !== "object") return void 0;
|
|
709
709
|
const type = String(event.type ?? "");
|
|
710
710
|
const data = event.data && typeof event.data === "object" ? event.data : {};
|
|
711
|
-
if (type === "llm_call" || type === "cost.usage" || type === "usage") return buildLlmCall(
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
if (isSandboxTerminalEvent(type) && sandboxTerminalUsageField(type) === "usage") {
|
|
716
|
-
const usage = data.usage;
|
|
717
|
-
if (!usage || typeof usage !== "object") return void 0;
|
|
718
|
-
return buildLlmCall({
|
|
719
|
-
...usage,
|
|
720
|
-
model: data.model ?? usage.model,
|
|
721
|
-
...usage.costUsd === void 0 && data.costUsd !== void 0 ? { costUsd: data.costUsd } : {}
|
|
722
|
-
}, agentRunName);
|
|
723
|
-
}
|
|
724
|
-
if (type === "done") {
|
|
725
|
-
const usage = plainRecord$1(data.tokenUsage) ?? plainRecord$1(data.usage) ?? {};
|
|
726
|
-
return buildLlmCall({
|
|
727
|
-
...usage,
|
|
728
|
-
...data.totalCostUsd === void 0 ? {} : { totalCostUsd: data.totalCostUsd },
|
|
729
|
-
...data.costUsd === void 0 ? {} : { costUsd: data.costUsd },
|
|
730
|
-
model: data.model ?? usage.model
|
|
731
|
-
}, agentRunName);
|
|
711
|
+
if (type === "llm_call" || type === "cost.usage" || type === "usage") return buildLlmCall(usageReceiptData(data, plainRecord$1(data.usage)), agentRunName);
|
|
712
|
+
if (type === "error" || isSandboxTerminalEvent(type)) {
|
|
713
|
+
const field = type === "error" ? "tokenUsage" : sandboxTerminalUsageField(type);
|
|
714
|
+
return buildLlmCall(usageReceiptData(data, plainRecord$1(data[field]) ?? plainRecord$1(data[field === "usage" ? "tokenUsage" : "usage"])), agentRunName);
|
|
732
715
|
}
|
|
733
716
|
}
|
|
734
717
|
/** A {@link SandboxUsageLedger} for one worker. Pass the worker's harness to decode with that
|
|
@@ -774,9 +757,15 @@ function createSandboxUsageLedger(harness) {
|
|
|
774
757
|
/** Terminal totals replace already credited usage; only per-call receipts add to it. */
|
|
775
758
|
function creditCanonicalUsage(event, call, credited, receipts) {
|
|
776
759
|
const declaredMode = plainRecord$1(event.data)?.usageMode;
|
|
777
|
-
const mode = declaredMode === "delta" || declaredMode === "cumulative" ? declaredMode : declaredMode === void 0 && event.type === "llm_call" ? "delta" : declaredMode === void 0 && isSandboxTerminalEvent(String(event.type)) ? "cumulative" : void 0;
|
|
760
|
+
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;
|
|
778
761
|
const result = { ...call };
|
|
779
|
-
|
|
762
|
+
const data = plainRecord$1(event.data) ?? {};
|
|
763
|
+
const explicitTokensUnknown = [
|
|
764
|
+
data,
|
|
765
|
+
plainRecord$1(data.usage),
|
|
766
|
+
plainRecord$1(data.tokenUsage)
|
|
767
|
+
].some((receipt) => ["tokensKnown", "tokens_known"].some((key) => receipt?.[key] !== void 0 && receipt[key] !== true));
|
|
768
|
+
if (call.tokensIn === void 0 && call.tokensOut === void 0 && !call.tokensUnknownReason && !explicitTokensUnknown) delete result.tokensKnown;
|
|
780
769
|
let reason = mode === void 0 ? "usage receipt has no declared delta or cumulative semantics" : void 0;
|
|
781
770
|
if (event.id) {
|
|
782
771
|
const signature = JSON.stringify({
|
|
@@ -837,8 +826,7 @@ function creditCanonicalUsage(event, call, credited, receipts) {
|
|
|
837
826
|
* `output_tokens` — a turn reporting `output_tokens 1523` with `reasoning_output_tokens 1516`
|
|
838
827
|
* answered with about seven tokens of text — and `parseCodexUsageRecord` holds that as an
|
|
839
828
|
* invariant. The canonical `llm_call` carries no reasoning class, so the count is not
|
|
840
|
-
* forwarded to {@link buildLlmCall}
|
|
841
|
-
* `tokenUsage` record that reports reasoning BESIDE its output count.
|
|
829
|
+
* forwarded to {@link buildLlmCall}. Canonical output totals already include reasoning.
|
|
842
830
|
*
|
|
843
831
|
* A counter no report carried stays absent, because a zero would claim the provider measured none.
|
|
844
832
|
*/
|
|
@@ -927,6 +915,46 @@ function sumSandboxUsage(events, agentRunName = "agent") {
|
|
|
927
915
|
...unreadable === void 0 ? {} : { tokensUnknownReason: unreadable }
|
|
928
916
|
};
|
|
929
917
|
}
|
|
918
|
+
function usageReceiptData(envelope, usage = {}) {
|
|
919
|
+
const merged = {
|
|
920
|
+
...usage,
|
|
921
|
+
...envelope
|
|
922
|
+
};
|
|
923
|
+
for (const aliases of [
|
|
924
|
+
[
|
|
925
|
+
"tokensIn",
|
|
926
|
+
"inputTokens",
|
|
927
|
+
"prompt_tokens"
|
|
928
|
+
],
|
|
929
|
+
[
|
|
930
|
+
"tokensOut",
|
|
931
|
+
"outputTokens",
|
|
932
|
+
"completion_tokens"
|
|
933
|
+
],
|
|
934
|
+
[
|
|
935
|
+
"costUsd",
|
|
936
|
+
"totalCostUsd",
|
|
937
|
+
"cost_usd",
|
|
938
|
+
"cost"
|
|
939
|
+
],
|
|
940
|
+
["costProvenance", "cost_provenance"]
|
|
941
|
+
]) {
|
|
942
|
+
const key = aliases.find((alias) => envelope[alias] !== void 0);
|
|
943
|
+
if (key === void 0) continue;
|
|
944
|
+
for (const alias of aliases) delete merged[alias];
|
|
945
|
+
merged[key] = envelope[key];
|
|
946
|
+
}
|
|
947
|
+
for (const aliases of [["tokensKnown", "tokens_known"], [
|
|
948
|
+
"costKnown",
|
|
949
|
+
"cost_known",
|
|
950
|
+
"usdKnown",
|
|
951
|
+
"usd_known"
|
|
952
|
+
]]) {
|
|
953
|
+
const values = [usage, envelope].flatMap((receipt) => aliases.map((key) => receipt[key]).filter((value) => value !== void 0));
|
|
954
|
+
if (values.length > 0) merged[aliases[0]] = values.every((value) => value === true);
|
|
955
|
+
}
|
|
956
|
+
return merged;
|
|
957
|
+
}
|
|
930
958
|
function buildLlmCall(data, agentRunName) {
|
|
931
959
|
const tokensIn = pickFiniteNumber(data, [
|
|
932
960
|
"tokensIn",
|
|
@@ -939,7 +967,7 @@ function buildLlmCall(data, agentRunName) {
|
|
|
939
967
|
"completion_tokens"
|
|
940
968
|
]);
|
|
941
969
|
const reasoningTokens = pickFiniteNumber(data, ["reasoningTokens"]);
|
|
942
|
-
const tokensOut = outputTokens
|
|
970
|
+
const tokensOut = outputTokens ?? reasoningTokens;
|
|
943
971
|
const reportedCostUsd = pickFiniteNumber(data, [
|
|
944
972
|
"costUsd",
|
|
945
973
|
"totalCostUsd",
|
|
@@ -953,7 +981,7 @@ function buildLlmCall(data, agentRunName) {
|
|
|
953
981
|
const catalogEstimate = costProvenance === "catalog-estimate" ? explicitEstimate ?? reportedCostUsd : explicitEstimate;
|
|
954
982
|
const costUsd = costProvenance === "catalog-estimate" ? void 0 : reportedCostUsd;
|
|
955
983
|
const promptCache = readPromptCacheUsage(data);
|
|
956
|
-
const tokensKnown = explicitTokensKnown !== false && tokensIn !== void 0 &&
|
|
984
|
+
const tokensKnown = explicitTokensKnown !== false && tokensIn !== void 0 && outputTokens !== void 0;
|
|
957
985
|
const usdKnown = explicitCostKnown !== false && costUsd !== void 0 && (costProvenance === void 0 || costProvenance === "provider-receipt" || costProvenance === "billing-receipt");
|
|
958
986
|
if (tokensIn === void 0 && tokensOut === void 0 && costUsd === void 0 && catalogEstimate === void 0 && promptCache === void 0 && explicitTokensKnown !== false && explicitCostKnown !== false) return;
|
|
959
987
|
const event = {
|
|
@@ -7084,12 +7112,36 @@ function providerAsSandboxClient(provider, options = {}) {
|
|
|
7084
7112
|
} };
|
|
7085
7113
|
}
|
|
7086
7114
|
/**
|
|
7115
|
+
* The idle timeout this adapter sends when nothing else names one: 1,800 seconds.
|
|
7116
|
+
*
|
|
7117
|
+
* Sandbox substitutes no value of its own: an omitted field falls back to the platform's global
|
|
7118
|
+
* idle timeout, documented as 30 minutes unless an operator changed it, and Runtime sent none. Idle
|
|
7119
|
+
* means inactivity to Sandbox, which suspends the sandbox (the container stops; the workspace is
|
|
7120
|
+
* kept) rather than deleting it. The SDK does not define inactivity further. A request in flight
|
|
7121
|
+
* counts as activity: a Discovery Lab seat created with `idleTimeoutSeconds: 1800` ran one request
|
|
7122
|
+
* to 2,252 seconds, ended by a per-request cap, not by idling (fleet-launch-2026-08-22).
|
|
7123
|
+
*
|
|
7124
|
+
* The value restates the documented default, so it can tighten a longer operator setting but never
|
|
7125
|
+
* loosen the default. It is 3.8 times the longest gap between frames recorded across a healthy
|
|
7126
|
+
* fleet run (469 seconds, same report), and a supervised provider child is observed through an open
|
|
7127
|
+
* stream for its whole turn. It is a backstop for a process that dies holding an environment; the
|
|
7128
|
+
* settlement barrier releases retained environments itself (`Executor.releaseRetained`). It does
|
|
7129
|
+
* nothing on a driver with a create/delete-only lifecycle, which the SDK says skips suspension.
|
|
7130
|
+
*/
|
|
7131
|
+
const DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS = 1800;
|
|
7132
|
+
function sandboxIdleTimeoutSeconds(value) {
|
|
7133
|
+
if (value === void 0) return DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS;
|
|
7134
|
+
if (!Number.isSafeInteger(value) || value <= 0) throw new ValidationError(`sandboxClientAsProvider: idleTimeoutSeconds must be a positive whole number of seconds, got ${String(value)}`);
|
|
7135
|
+
return value;
|
|
7136
|
+
}
|
|
7137
|
+
/**
|
|
7087
7138
|
* Adapt a `SandboxClient` into the shared `AgentEnvironmentProvider` contract.
|
|
7088
7139
|
* The provider declares the public SDK contract before it creates an environment.
|
|
7089
7140
|
* Each environment exposes interactive methods only when its deployment declares every required capability.
|
|
7090
7141
|
* @experimental */
|
|
7091
7142
|
function sandboxClientAsProvider(client, options = {}) {
|
|
7092
7143
|
const providerName = options.name ?? "tangle-sandbox";
|
|
7144
|
+
const idleTimeoutSeconds = sandboxIdleTimeoutSeconds(options.idleTimeoutSeconds);
|
|
7093
7145
|
const providerCapabilities = async () => {
|
|
7094
7146
|
const resolved = await (options.capabilities ? typeof options.capabilities === "function" ? options.capabilities() : options.capabilities : defaultTangleSandboxCapabilities({
|
|
7095
7147
|
namedProfiles: options.resolveProfile !== void 0,
|
|
@@ -7104,14 +7156,18 @@ function sandboxClientAsProvider(client, options = {}) {
|
|
|
7104
7156
|
capabilities: providerCapabilities,
|
|
7105
7157
|
...options.validateProfile ? { validateProfile: options.validateProfile } : {},
|
|
7106
7158
|
async create(input) {
|
|
7107
|
-
const
|
|
7159
|
+
const custom = options.mapCreateInput?.(input);
|
|
7160
|
+
const createOptions = custom === void 0 ? await sandboxOptionsFromCreateInput(input, options.defaultBackend ?? "opencode", options.resolveProfile, providerName, idleTimeoutSeconds) : {
|
|
7161
|
+
...custom,
|
|
7162
|
+
idleTimeoutSeconds: custom.idleTimeoutSeconds ?? idleTimeoutSeconds
|
|
7163
|
+
};
|
|
7108
7164
|
const capabilities = await providerCapabilities();
|
|
7109
|
-
return sandboxInstanceAsEnvironment(await client.create(createOptions, input.signal === void 0 ? void 0 : { signal: input.signal }), providerName, client, capabilities);
|
|
7165
|
+
return sandboxInstanceAsEnvironment(await client.create(createOptions, input.signal === void 0 ? void 0 : { signal: input.signal }), providerName, client, capabilities, idleTimeoutSeconds);
|
|
7110
7166
|
},
|
|
7111
7167
|
...hasGet(client) ? { async get(id) {
|
|
7112
7168
|
const capabilities = await providerCapabilities();
|
|
7113
7169
|
const box = await client.get(id);
|
|
7114
|
-
return box ? sandboxInstanceAsEnvironment(box, providerName, client, capabilities) : null;
|
|
7170
|
+
return box ? sandboxInstanceAsEnvironment(box, providerName, client, capabilities, idleTimeoutSeconds) : null;
|
|
7115
7171
|
} } : {},
|
|
7116
7172
|
...hasList(client) ? { async list(query) {
|
|
7117
7173
|
return (await client.list(query?.providerOptions)).map((box) => ({
|
|
@@ -7331,6 +7387,31 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
7331
7387
|
};
|
|
7332
7388
|
}
|
|
7333
7389
|
},
|
|
7390
|
+
async releaseRetained(signal) {
|
|
7391
|
+
controller.abort();
|
|
7392
|
+
if (!pending) return [];
|
|
7393
|
+
const environmentId = retained?.controlRef.environmentId ?? environment?.id ?? admittedEnvironmentId(retention);
|
|
7394
|
+
if (environmentId === void 0) return [];
|
|
7395
|
+
const receipt = (destroyed, detail) => ({
|
|
7396
|
+
provider: provider.name,
|
|
7397
|
+
environmentId,
|
|
7398
|
+
destroyed,
|
|
7399
|
+
...detail === void 0 ? {} : { detail }
|
|
7400
|
+
});
|
|
7401
|
+
try {
|
|
7402
|
+
const target = environment ?? (provider.get === void 0 ? void 0 : await awaitAbortable$1(provider.get(environmentId), signal));
|
|
7403
|
+
if (target === void 0) return [receipt(false, `providerAsExecutor(${provider.name}): no environment handle and the provider exposes no get()`)];
|
|
7404
|
+
if (target !== null) {
|
|
7405
|
+
if (target.destroy === void 0) return [receipt(false, `providerAsExecutor(${provider.name}): environment exposes no destroy()`)];
|
|
7406
|
+
await awaitAbortable$1(target.destroy(), signal);
|
|
7407
|
+
}
|
|
7408
|
+
pending = false;
|
|
7409
|
+
destroyed = true;
|
|
7410
|
+
return [receipt(true)];
|
|
7411
|
+
} catch (error) {
|
|
7412
|
+
return [receipt(false, `providerAsExecutor(${provider.name}): environment.destroy() failed — ${error instanceof Error ? error.message : String(error)}`)];
|
|
7413
|
+
}
|
|
7414
|
+
},
|
|
7334
7415
|
resultArtifact() {
|
|
7335
7416
|
if (!artifact) throw new ValidationError(`providerAsExecutor(${provider.name}): resultArtifact() read before stream drained`);
|
|
7336
7417
|
return artifact;
|
|
@@ -7339,6 +7420,13 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
7339
7420
|
};
|
|
7340
7421
|
return attestRuntimeOwnedPendingExecutor(executor, runtime, plannedDeclaration, plannedBinding);
|
|
7341
7422
|
}
|
|
7423
|
+
/** The environment id the latest durable admission names, when creation got that far. */
|
|
7424
|
+
function admittedEnvironmentId(retention) {
|
|
7425
|
+
for (const admission of [...retention?.admissions ?? []].reverse()) {
|
|
7426
|
+
if (admission.phase === "dispatched") return admission.controlRef.environmentId;
|
|
7427
|
+
if (admission.phase === "environment") return admission.environmentId;
|
|
7428
|
+
}
|
|
7429
|
+
}
|
|
7342
7430
|
async function* streamProviderExecutor(args) {
|
|
7343
7431
|
const started = Date.now();
|
|
7344
7432
|
const linked = linkAbort(args.signal, args.controller.signal).signal;
|
|
@@ -7461,16 +7549,17 @@ async function* streamProviderExecutor(args) {
|
|
|
7461
7549
|
if (receipt === void 0) return;
|
|
7462
7550
|
const hasTokens = receipt.tokensIn !== void 0 || receipt.tokensOut !== void 0;
|
|
7463
7551
|
if (hasTokens && receipt.tokensIn !== void 0 && receipt.tokensOut !== void 0 && receipt.tokensKnown !== false) sawCompleteTokenReceipt = true;
|
|
7464
|
-
else if (hasTokens || receipt.tokensUnknownReason) sawIncompleteTokenReceipt = true;
|
|
7552
|
+
else if (hasTokens || receipt.tokensKnown === false || receipt.tokensUnknownReason) sawIncompleteTokenReceipt = true;
|
|
7465
7553
|
const input = receipt.tokensIn ?? 0;
|
|
7466
7554
|
const output = receipt.tokensOut ?? 0;
|
|
7467
|
-
if (input || output) {
|
|
7555
|
+
if (input || output || receipt.tokensKnown === false) {
|
|
7468
7556
|
tokens.input += input;
|
|
7469
7557
|
tokens.output += output;
|
|
7470
7558
|
yield {
|
|
7471
7559
|
kind: "tokens",
|
|
7472
7560
|
input,
|
|
7473
|
-
output
|
|
7561
|
+
output,
|
|
7562
|
+
...receipt.tokensKnown === false ? { tokensKnown: false } : {}
|
|
7474
7563
|
};
|
|
7475
7564
|
}
|
|
7476
7565
|
if (receipt.costUsd) {
|
|
@@ -7668,7 +7757,7 @@ function createInputFromSandboxOptions(options) {
|
|
|
7668
7757
|
providerOptions: { sandboxCreateOptions: options ?? {} }
|
|
7669
7758
|
};
|
|
7670
7759
|
}
|
|
7671
|
-
async function sandboxOptionsFromCreateInput(input, defaultBackend, resolveProfile, providerName = "tangle-sandbox") {
|
|
7760
|
+
async function sandboxOptionsFromCreateInput(input, defaultBackend, resolveProfile, providerName = "tangle-sandbox", idleTimeoutSeconds = DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS) {
|
|
7672
7761
|
if (input.runtimeAttachments !== void 0) throw new ValidationError("Tangle Sandbox runtimeAttachments require an explicit mapCreateInput mapper; the maintained Sandbox SDK create contract does not transport them");
|
|
7673
7762
|
const backendType = input.backend ?? defaultBackend;
|
|
7674
7763
|
const workspace = WorkspaceRequestSchema.parse(input.workspace ?? {});
|
|
@@ -7682,6 +7771,7 @@ async function sandboxOptionsFromCreateInput(input, defaultBackend, resolveProfi
|
|
|
7682
7771
|
const { profile: _baseProfile, ...baseBackend } = base.backend ?? {};
|
|
7683
7772
|
return {
|
|
7684
7773
|
...base,
|
|
7774
|
+
idleTimeoutSeconds: base.idleTimeoutSeconds ?? idleTimeoutSeconds,
|
|
7685
7775
|
...environment ? { environment } : {},
|
|
7686
7776
|
...workspace.repoUrl ? { git: {
|
|
7687
7777
|
url: workspace.repoUrl,
|
|
@@ -7782,18 +7872,27 @@ function environmentAsSandboxInstance(environment, options) {
|
|
|
7782
7872
|
let text = "";
|
|
7783
7873
|
let usage;
|
|
7784
7874
|
let terminal = false;
|
|
7875
|
+
const outcomeTracker = createAgentRunOutcomeTracker();
|
|
7876
|
+
let explicitFailure = false;
|
|
7785
7877
|
for await (const event of environment.stream(turnInputFromPrompt(message, promptOptions))) {
|
|
7786
7878
|
events.push(event);
|
|
7787
7879
|
if (isTerminalEnvironmentEvent(event)) terminal = true;
|
|
7880
|
+
const failureEvent = providerFailureEvent(event, sandboxEventFromEnvironmentEvent(event));
|
|
7881
|
+
if (failureEvent) {
|
|
7882
|
+
explicitFailure = true;
|
|
7883
|
+
outcomeTracker.observe(failureEvent);
|
|
7884
|
+
}
|
|
7788
7885
|
text += textFromEnvironmentEvent(event);
|
|
7789
7886
|
usage = mergeTokenUsage(usage, event.usage);
|
|
7790
7887
|
}
|
|
7791
7888
|
if (options.requireTerminalEvent && !terminal) throw new ValidationError(`providerAsSandboxClient(${environment.provider}): prompt ended without a terminal result/done/status event`);
|
|
7889
|
+
const outcome = explicitFailure ? outcomeTracker.finish() : void 0;
|
|
7792
7890
|
return {
|
|
7793
7891
|
response: resultFromEvents(events, text).content,
|
|
7794
|
-
success: true,
|
|
7795
|
-
status: "success",
|
|
7892
|
+
success: outcome?.success ?? true,
|
|
7893
|
+
status: outcome?.status ?? "success",
|
|
7796
7894
|
durationMs: 0,
|
|
7895
|
+
...outcome?.error ? { error: outcome.error } : {},
|
|
7797
7896
|
...usage ? { usage } : {}
|
|
7798
7897
|
};
|
|
7799
7898
|
},
|
|
@@ -7825,7 +7924,7 @@ function environmentAsSandboxInstance(environment, options) {
|
|
|
7825
7924
|
}
|
|
7826
7925
|
};
|
|
7827
7926
|
}
|
|
7828
|
-
async function sandboxInstanceAsEnvironment(box, providerName, client, providerCapabilities) {
|
|
7927
|
+
async function sandboxInstanceAsEnvironment(box, providerName, client, providerCapabilities, idleTimeoutSeconds) {
|
|
7829
7928
|
const capabilities = await sandboxEnvironmentCapabilities(box, providerCapabilities);
|
|
7830
7929
|
const interactiveAgent = capabilities.interactiveAgent;
|
|
7831
7930
|
return {
|
|
@@ -7912,9 +8011,10 @@ async function sandboxInstanceAsEnvironment(box, providerName, client, providerC
|
|
|
7912
8011
|
return sandboxInstanceAsEnvironment(await client.create({
|
|
7913
8012
|
fromSnapshot: checkpoint.id,
|
|
7914
8013
|
fromSandboxId: String(box.id),
|
|
8014
|
+
idleTimeoutSeconds,
|
|
7915
8015
|
...options?.name ? { name: options.name } : {},
|
|
7916
8016
|
...options?.metadata ? { metadata: options.metadata } : {}
|
|
7917
|
-
}), providerName, client, providerCapabilities);
|
|
8017
|
+
}), providerName, client, providerCapabilities, idleTimeoutSeconds);
|
|
7918
8018
|
},
|
|
7919
8019
|
async placement() {
|
|
7920
8020
|
return placementInfoFromLoopPlacement(client.describePlacement?.(box), box);
|
|
@@ -8140,6 +8240,7 @@ function usageSandboxEvent(event) {
|
|
|
8140
8240
|
return {
|
|
8141
8241
|
type: "usage",
|
|
8142
8242
|
data: {
|
|
8243
|
+
...event.data,
|
|
8143
8244
|
...usage,
|
|
8144
8245
|
..."usageMode" in event ? { usageMode: event.usageMode } : event.data.usageMode === void 0 ? {} : { usageMode: event.data.usageMode }
|
|
8145
8246
|
},
|
|
@@ -8286,7 +8387,7 @@ function isTerminalEnvironmentEvent(event) {
|
|
|
8286
8387
|
return normalized?.type === "status" && (normalized.status === "completed" || normalized.status === "failed");
|
|
8287
8388
|
}
|
|
8288
8389
|
function isTerminalEventShape(type, data) {
|
|
8289
|
-
if (isSandboxTerminalEvent(type)) return true;
|
|
8390
|
+
if (type === "error" || isSandboxTerminalEvent(type)) return true;
|
|
8290
8391
|
if (type.endsWith(".completed") || type.endsWith(".failed")) return true;
|
|
8291
8392
|
if (type !== "status") return false;
|
|
8292
8393
|
return data.status === "completed" || data.status === "failed" || data.status === "cancelled";
|
|
@@ -15129,6 +15230,7 @@ const outsideKinds = /* @__PURE__ */ new Set([
|
|
|
15129
15230
|
"reconciled",
|
|
15130
15231
|
"edge",
|
|
15131
15232
|
"teardown-unconfirmed",
|
|
15233
|
+
"environment-teardown",
|
|
15132
15234
|
"trace-unpropagated",
|
|
15133
15235
|
"node-inputs-resolved",
|
|
15134
15236
|
"edge-verdict",
|
|
@@ -15197,6 +15299,7 @@ async function replaySpawnTree(journal, blobs, root) {
|
|
|
15197
15299
|
if (ev.kind === "execution-input" || ev.kind === "execution-admitted" || ev.kind === "execution-result") continue;
|
|
15198
15300
|
if (ev.kind === "edge") continue;
|
|
15199
15301
|
if (ev.kind === "teardown-unconfirmed") continue;
|
|
15302
|
+
if (ev.kind === "environment-teardown") continue;
|
|
15200
15303
|
if (ev.kind === "trace-unpropagated") continue;
|
|
15201
15304
|
if (ev.kind === "node-inputs-resolved") continue;
|
|
15202
15305
|
if (ev.kind === "edge-verdict") continue;
|
|
@@ -19588,6 +19691,9 @@ function defaultSleep(ms, signal) {
|
|
|
19588
19691
|
/** Runtime-owned provider evidence is written through this private scope capability. */
|
|
19589
19692
|
const runtimeOwnedProviderMeters = /* @__PURE__ */ new WeakMap();
|
|
19590
19693
|
const recoveryStarters = /* @__PURE__ */ new WeakMap();
|
|
19694
|
+
const retainedReleasers = /* @__PURE__ */ new WeakMap();
|
|
19695
|
+
/** Per-child bound on a retained release: one remote destroy, answered or abandoned. */
|
|
19696
|
+
const RETAINED_RELEASE_TIMEOUT_MS = 3e4;
|
|
19591
19697
|
/** @internal Admit original children before the parent acts; do not wait for their results. */
|
|
19592
19698
|
async function startScopeRecoveries(scope) {
|
|
19593
19699
|
const start = recoveryStarters.get(scope);
|
|
@@ -19596,6 +19702,22 @@ async function startScopeRecoveries(scope) {
|
|
|
19596
19702
|
await start();
|
|
19597
19703
|
}
|
|
19598
19704
|
/**
|
|
19705
|
+
* @internal Release what this scope's settled children still hold for a retained execution, and
|
|
19706
|
+
* confirm each one's teardown afterwards through the executor's own teardown verb.
|
|
19707
|
+
*
|
|
19708
|
+
* A retained-pending child settles `down` with its cursor slot open and its environment alive,
|
|
19709
|
+
* because a resumed process reconciles the paid execution inside it. The supervisor calls this
|
|
19710
|
+
* once the root has reached a terminal outcome that no later process resumes — never while the
|
|
19711
|
+
* root is live, and never on a resumable interruption, since the open slot and the live
|
|
19712
|
+
* environment are exactly what a resume recovers. One `environment-teardown` receipt is journaled
|
|
19713
|
+
* per environment, on this scope's own tree; a nested manager reaches its children through
|
|
19714
|
+
* `Executor.releaseRetained`, and its nested scope journals theirs.
|
|
19715
|
+
*/
|
|
19716
|
+
async function releaseRetainedEnvironments(scope) {
|
|
19717
|
+
const release = retainedReleasers.get(scope);
|
|
19718
|
+
if (release) await release();
|
|
19719
|
+
}
|
|
19720
|
+
/**
|
|
19599
19721
|
* The recursion seam key. A `Scope` seeds a value of this on each child's
|
|
19600
19722
|
* `ExecutorContext.seams` so a child whose executor is a DRIVER can mount a NESTED `Scope`
|
|
19601
19723
|
* over the driver's reserved child allocation at `depth+1`. A leaf executor never reads it. Single-sourced
|
|
@@ -19975,6 +20097,10 @@ function createScope(args) {
|
|
|
19975
20097
|
...executor.interactive ? { readInteractive: executor.interactive.bind(executor) } : {},
|
|
19976
20098
|
...executor.interactiveReady ? { readInteractiveReady: executor.interactiveReady.bind(executor) } : {},
|
|
19977
20099
|
...executor.cancel ? { requestCancel: executor.cancel.bind(executor) } : {},
|
|
20100
|
+
...executor.releaseRetained ? {
|
|
20101
|
+
releaseRetained: executor.releaseRetained.bind(executor),
|
|
20102
|
+
confirmTeardown: () => teardownExecutor(executor, "brutalKill", void 0, now)
|
|
20103
|
+
} : {},
|
|
19978
20104
|
abortChild: (reason) => controller.abort(reason)
|
|
19979
20105
|
};
|
|
19980
20106
|
const recordCancellation = () => {
|
|
@@ -20581,6 +20707,33 @@ function createScope(args) {
|
|
|
20581
20707
|
throw error;
|
|
20582
20708
|
}
|
|
20583
20709
|
});
|
|
20710
|
+
retainedReleasers.set(scope, async () => {
|
|
20711
|
+
const held = [...children.values()].filter((child) => isTerminalNodeStatus(child.status) && !child.cleanupConfirmed && (child.recoveryPending === true || child.ownedTreeRoot !== void 0) && child.releaseRetained !== void 0 && child.confirmTeardown !== void 0);
|
|
20712
|
+
const released = await Promise.all(held.map(async (child) => {
|
|
20713
|
+
const bound = new AbortController();
|
|
20714
|
+
const timer = setTimeout(() => bound.abort(new ValidationError$1(`retained release did not acknowledge within ${RETAINED_RELEASE_TIMEOUT_MS}ms`)), RETAINED_RELEASE_TIMEOUT_MS);
|
|
20715
|
+
timer.unref?.();
|
|
20716
|
+
try {
|
|
20717
|
+
const receipts = await child.releaseRetained(bound.signal);
|
|
20718
|
+
if (receipts.every((receipt) => receipt.destroyed)) try {
|
|
20719
|
+
await child.confirmTeardown();
|
|
20720
|
+
child.cleanupConfirmed = true;
|
|
20721
|
+
} catch {}
|
|
20722
|
+
return {
|
|
20723
|
+
child,
|
|
20724
|
+
receipts
|
|
20725
|
+
};
|
|
20726
|
+
} catch {
|
|
20727
|
+
return {
|
|
20728
|
+
child,
|
|
20729
|
+
receipts: []
|
|
20730
|
+
};
|
|
20731
|
+
} finally {
|
|
20732
|
+
clearTimeout(timer);
|
|
20733
|
+
}
|
|
20734
|
+
}));
|
|
20735
|
+
for (const { child, receipts } of released) for (const receipt of receipts) await appendEnvironmentTeardown(args.journal, args.root, child.id, receipt, new Date(now()).toISOString());
|
|
20736
|
+
});
|
|
20584
20737
|
registerScopeRetainedOwner(scope, {
|
|
20585
20738
|
rootId: args.root,
|
|
20586
20739
|
nodeId: args.parentId,
|
|
@@ -20838,6 +20991,21 @@ async function appendReconciledFloor(journal, root, id, spent, at) {
|
|
|
20838
20991
|
at
|
|
20839
20992
|
});
|
|
20840
20993
|
}
|
|
20994
|
+
/** A release receipt has the same per-child sequence discipline: outside the cursor namespace and
|
|
20995
|
+
* monotonic per node, so a run released in two processes keeps its receipts ordered. */
|
|
20996
|
+
async function appendEnvironmentTeardown(journal, root, id, receipt, at) {
|
|
20997
|
+
const seq = await nextPerNodeSeq(journal, root, "environment-teardown", id);
|
|
20998
|
+
await journal.appendEvent(root, {
|
|
20999
|
+
kind: "environment-teardown",
|
|
21000
|
+
id,
|
|
21001
|
+
provider: receipt.provider,
|
|
21002
|
+
environmentId: receipt.environmentId,
|
|
21003
|
+
destroyed: receipt.destroyed,
|
|
21004
|
+
...receipt.detail === void 0 ? {} : { detail: receipt.detail },
|
|
21005
|
+
seq,
|
|
21006
|
+
at
|
|
21007
|
+
});
|
|
21008
|
+
}
|
|
20841
21009
|
async function nextPerNodeSeq(journal, root, kind, id) {
|
|
20842
21010
|
return (await journal.loadTree(root) ?? []).reduce((max, event) => event.kind === kind && event.id === id ? Math.max(max, event.seq) : max, -1) + 1;
|
|
20843
21011
|
}
|
|
@@ -21641,6 +21809,7 @@ const driverExecutorFactory = (rawSpec, ctx) => {
|
|
|
21641
21809
|
let cleanupFailure;
|
|
21642
21810
|
let unconfirmedDescendants = [];
|
|
21643
21811
|
let active;
|
|
21812
|
+
let nestedScopeHeld;
|
|
21644
21813
|
const closeActive = (reason) => {
|
|
21645
21814
|
if (active === void 0) return Promise.resolve();
|
|
21646
21815
|
if (!active.close) {
|
|
@@ -21695,6 +21864,7 @@ const driverExecutorFactory = (rawSpec, ctx) => {
|
|
|
21695
21864
|
controller,
|
|
21696
21865
|
scope: nestedScope
|
|
21697
21866
|
};
|
|
21867
|
+
nestedScopeHeld = nestedScope;
|
|
21698
21868
|
try {
|
|
21699
21869
|
if (recovering) {
|
|
21700
21870
|
await startScopeRecoveries(nestedScope);
|
|
@@ -21749,6 +21919,12 @@ const driverExecutorFactory = (rawSpec, ctx) => {
|
|
|
21749
21919
|
detail: `Nested executor cleanup is unconfirmed: ${unconfirmedDescendants.join(", ")}`
|
|
21750
21920
|
} : { destroyed: true };
|
|
21751
21921
|
},
|
|
21922
|
+
async releaseRetained() {
|
|
21923
|
+
if (nestedScopeHeld === void 0) return [];
|
|
21924
|
+
await releaseRetainedEnvironments(nestedScopeHeld);
|
|
21925
|
+
unconfirmedDescendants = nestedScopeHeld.workerCapacity.unconfirmed.map((node) => node.id);
|
|
21926
|
+
return [];
|
|
21927
|
+
},
|
|
21752
21928
|
resultArtifact() {
|
|
21753
21929
|
if (!artifact) throw new ValidationError$1("driverExecutor: resultArtifact() read before execute()");
|
|
21754
21930
|
return artifact;
|
|
@@ -22183,7 +22359,7 @@ function describeRejection(error) {
|
|
|
22183
22359
|
function createSupervisor() {
|
|
22184
22360
|
let attached;
|
|
22185
22361
|
async function run(root, task, opts) {
|
|
22186
|
-
const { budget, rootIdentity, rootMaterialization, runId, journal: journalStore, blobs: blobStore, executors: executorRegistry, recoverExecutor, probes, maxDepth, maxLiveWorkers, maxRestarts, withinMs, childSettleGraceMs, resume, now: suppliedNow, signal, hooks, workerTrace, workerTraceUnpropagated, interactiveBindingDir } = opts;
|
|
22362
|
+
const { budget, rootIdentity, rootMaterialization, runId, journal: journalStore, blobs: blobStore, executors: executorRegistry, recoverExecutor, probes, maxDepth, maxLiveWorkers, maxRestarts, withinMs, childSettleGraceMs, resume, retainedAtSettlement: requestedRetainedAtSettlement, now: suppliedNow, signal, hooks, workerTrace, workerTraceUnpropagated, interactiveBindingDir } = opts;
|
|
22187
22363
|
const input = detachedSnapshot({
|
|
22188
22364
|
task,
|
|
22189
22365
|
options: {
|
|
@@ -22197,9 +22373,11 @@ function createSupervisor() {
|
|
|
22197
22373
|
...withinMs === void 0 ? {} : { withinMs },
|
|
22198
22374
|
...childSettleGraceMs === void 0 ? {} : { childSettleGraceMs },
|
|
22199
22375
|
...resume === void 0 ? {} : { resume },
|
|
22376
|
+
...requestedRetainedAtSettlement === void 0 ? {} : { retainedAtSettlement: requestedRetainedAtSettlement },
|
|
22200
22377
|
...interactiveBindingDir === void 0 ? {} : { interactiveBindingDir }
|
|
22201
22378
|
}
|
|
22202
22379
|
}, "supervisor.run");
|
|
22380
|
+
if (requestedRetainedAtSettlement !== void 0 && requestedRetainedAtSettlement !== "release" && requestedRetainedAtSettlement !== "keep") throw new ValidationError$1(`supervisor: retainedAtSettlement must be 'release' or 'keep', got ${JSON.stringify(requestedRetainedAtSettlement)}`);
|
|
22203
22381
|
opts = Object.freeze({
|
|
22204
22382
|
...input.options,
|
|
22205
22383
|
journal: journalStore,
|
|
@@ -22345,6 +22523,7 @@ function createSupervisor() {
|
|
|
22345
22523
|
error: new RuntimeRunStateError("supervisor: root execution did not start")
|
|
22346
22524
|
};
|
|
22347
22525
|
let teardownUnconfirmed = [];
|
|
22526
|
+
const retainedAtSettlement = opts.retainedAtSettlement ?? (opts.resume === true ? "keep" : "release");
|
|
22348
22527
|
let teardownSeq = 0;
|
|
22349
22528
|
let executionAborted = controller.signal.aborted;
|
|
22350
22529
|
let allChildrenDownAtSettle = false;
|
|
@@ -22369,6 +22548,10 @@ function createSupervisor() {
|
|
|
22369
22548
|
const settleGraceMs = !controller.signal.aborted ? boundedSettleGrace(opts.childSettleGraceMs, rootDeadlineAtMs, now) : 0;
|
|
22370
22549
|
try {
|
|
22371
22550
|
teardownUnconfirmed = await drainLiveChildren(openScope, controller, settleGraceMs);
|
|
22551
|
+
if (retainedAtSettlement === "release") {
|
|
22552
|
+
await releaseRetainedEnvironments(openScope);
|
|
22553
|
+
teardownUnconfirmed = openScope.workerCapacity.unconfirmed;
|
|
22554
|
+
}
|
|
22372
22555
|
for (const node of teardownUnconfirmed) await opts.journal.appendEvent(opts.runId, {
|
|
22373
22556
|
kind: "teardown-unconfirmed",
|
|
22374
22557
|
id: node.id,
|
|
@@ -22762,6 +22945,6 @@ function isNonEmptySpend(s) {
|
|
|
22762
22945
|
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);
|
|
22763
22946
|
}
|
|
22764
22947
|
//#endregion
|
|
22765
|
-
export { createExecutor as $,
|
|
22948
|
+
export { createExecutor as $, createPropagatingTraceEmitter as $n, attestRuntimeOwnedScopeOwner as $r, createSandboxForSpec as $t, scopeRetainedOwnerPriorSpend as A, notifySandboxEventObserver as Ai, unmeteredSpend as An, parseCodexTokenUsage as Ar, DEFAULT_STALL_AFTER_MS as At, recoverRetainedInteractiveRun as B, retainedExecutorSeamKey as Bn, promptOnlyProfileMaterialization as Br, peerMailTools as Bt, pollFor as C, canonicalStreamEventFromSandboxEvent as Ci, isAbortError$2 as Cn, captureWorktreeDiff as Cr, spendFromUsageEvents as Ct, consumeScopeRetainedOwnerResult as D, isSandboxTerminalEvent as Di, stringifySafe as Dn, LOCAL_HARNESSES as Dr, workerTraceHeaders as Dt, waitUntil as E, extractLlmCallEvent as Ei, sleep as En, DEFAULT_LOCAL_HARNESS as Er, workerTraceEnv as Et, attachWorker as F, abortError$2 as Fi, withBudgetResources as Fn, defineProfileMaterializationContract as Fr, DEFAULT_PEER_MAIL_LIMITS as Ft, queueOf as G, reconnectRetainedRun as Gn, unsupportedProfileDimensions as Gr, bridgeModelRouteRefusal as Gt, destroyInteractiveEnvironment as H, abortError$1 as Hn, renderProfileMaterializationIssues as Hr, isLiveNodeStatus as Ht, readWorkerInteractiveBinding as I, awaitAbortable$1 as Ii, createPushTraceSource as In, fullProfileMaterialization as Ir, PEER_MAIL_WIRE_KEY as It, teardownExecutor as J, startRetainedRunInEnvironment as Jn, isNoEntError as Jr, harnessUsageIsEmpty as Jt, rollingDispatch as K, recoverRetainedRun as Kn, validateProfileMaterialization as Kr, addHarnessUsage as Kt, workerInteractiveBindingFile as L, promptFromAgentTurnInput as Li, decodeToolPart as Ln, profileMaterializationAxes$1 as Lr, claimsAuthority as Lt, interactiveAdmissionSeamKey as M, sandboxProgressEvents as Mi, zeroSpend as Mn, AGENT_PROFILE_MATERIALIZATION_AXES as Mr, readWorkerProgress as Mt, readWorkerInteractiveAdmissions as N, sumSandboxUsage as Ni, addResourceSpend as Nn, assertProfileMaterialization as Nr, createInbox as Nt, prepareScopeRetainedOwnerTask as O, mapSandboxEvent as Oi, throwAbort as On, harnessSupportsReasoningEffort as Or, workerTraceSeamKey as Ot, workerInteractiveAdmissionFile as P, decodeHarnessUsage as Pi, resourceTelemetry as Pn, controlProfileMaterialization as Pr, AUTHORITY_MARKERS as Pt, cliWorktreeExecutor as Q, resolveRedactor as Qn, attestRuntimeOwnedPendingExecutor as Qr, TERMINAL_DECISIONS as Qt, workerInteractiveBindingsDir as R, promptOptionsFromAgentTurnInput as Ri, sandboxSessionTraceSource as Rn, promptControlProfileMaterialization as Rr, createPeerMailbox as Rt, isWaitOutcome as S, assertSandboxServedModel as Si, hasCompleteCacheBreakdown as Sn, runWorktreeHarness as Sr, createBudgetPool as St, validateWaitSpec as T, createSandboxUsageLedger as Ti, randomSuffix as Tn, removeWorktree as Tr, readWorkerTraceContext as Tt, effectiveConcurrency as U, linkAbort as Un, renderUnsupported as Ur, isTerminalNodeStatus as Ut, startRetainedInteractiveRun as V, RunCancellationReason as Vn, promptResourceProfileMaterialization as Vr, peerMailVerbNames as Vt, freeSlots as W, runAbortable as Wn, sandboxActProfileMaterialization as Wr, bridgeAdmissionRefusal as Wt, captureReusableExecutorConfig as X, defaultRedactor as Xn, prepareJsonlAppend as Xr, bridgeRuntimeAttachmentsKey as Xt, bindReusableExecutorExecutionId as Y, retainedCreateMaterial as Yn, parseCommittedJsonLines as Yr, readCodexRolloutSession as Yt, cliInPlaceExecutor as Z, defaultRedactorIdentityMaterial as Zn, writeAllBytes as Zr, bridgeStopSignalKey as Zt, recordScopeOwnerMaterialization as _, executableAgentSpecSnapshot as _i, sandboxClientAsProvider as _n, createRuntimeStreamEventCollector as _r, isTraceAnalysisStore as _t, pickBestDelivered as a, newExecutionAttemptId as ai, acquireSandbox as an, buildLoopSpanNodes as ar, createInPlaceCliExecutor as at, settledToIteration as b, projectSandboxOutcome as bi, cloneSpend as bn, sanitizeRuntimeStreamEvent as br, contentAddress as bt, driverChild as c, runtimeOwnedDriveHarnessProviderEvidence as ci, routerBrain as cn, createOtelExporter as cr, InMemoryResultBlobStore as ct, withDriverExecutor as d, runtimeOwnedExecutorProviderEvidence as di, observedModelMatchesDeclared as dn, generateSpanId as dr, loadSpawnForest as dt, authoredProfileDigest as ei, defaultSelectWinner as en, mergeTraceEnv as er, createExecutorRegistry as et, beginScopeOwnerAttempt as f, runtimeOwnedPendingExecutorMaterialization as fi, DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS as fn, loopEventToOtelSpan as fr, materializeTreeView as ft, meterRuntimeOwnedProviderAttempt as g, executableAgentProfileSnapshot as gi, resolveAgentEnvironmentProvider as gn, createRuntimeEventCollector as gr, captureWorkerTraceEvidence as gt, meterRuntimeOwnedAccounting as h, unknownMaterializationReceipt as hi, providerAsSandboxClient as hn, toOtelAttributes as hr, WORKER_TOOL_TRACE_SCHEMA_VERSION as ht, collectDelivered as i, knownMaterializationReceipt as ii, probeSandboxCapabilities as in, buildLoopOtelSpans as ir, createSteerableSandboxSession as it, scopeRetainedOwnerResult as j, sandboxEventServedBackend as ji, withTimeout as jn, CodexExecutionDiagnosticError as jr, createActivityLog as jt, scopeRetainedOwnerContext as k, mapSandboxToolEvent as ki, throwIfAborted as kn, localHarnessExecutable as kr, taskToPrompt as kt, driverExecutorFactory as l, runtimeOwnedExecutorExecutionBinding as li, runBrainLoop as ln, exportEvalRuns as lr, InMemorySpawnJournal as lt, deriveNodeExecutionIdentity as m, unknownExecutionBindingReceipt as mi, providerAsExecutor as mn, padTraceId as mr, replaySpawnTree as mt, createSupervisor as n, inheritRuntimeOwnedExecutorAttestation as ni, runAgentRounds as nn, traceContextToEnv as nr, createWorktreeCliExecutor as nt, runFinalizer as o, providerAttemptEvidence as oi, assertBoxlessPromptOptions as on, buildRuntimeEventOtelSpans as or, FileResultBlobStore as ot, createScope as p, runtimeOwnedScopeOwnerRuntime as pi, createAgentEnvironmentProviderRegistry as pn, padSpanId as pr, pendingWaits as pt, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as q, startRetainedRun as qn, worktreeCliProfileMaterialization as qr, createCodexRolloutStoreReader as qt, bestDelivered as r, knownExecutionBindingReceipt as ri, createSandboxLineage as rn, INTELLIGENCE_WIRE_VERSION as rr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as rt, runTree as s, recordRuntimeOwnedDriveHarnessProviderEvidence as si, readPromptOptions as sn, createOpenInferenceFileExporter as sr, FileSpawnJournal as st, createRootHandle as t, finalizeRuntimeOwnedPendingExecutor as ti, isTerminalDecision as tn, readTraceContextFromEnv as tr, snapshotExecutorConfig as tt, isDriverSpec as u, runtimeOwnedExecutorMaterialization as ui, canonicalObservedModelParts as un, flatOtelSpan as ur, insideCursorNamespace as ut, restoreScopeOwnerAcceptedExecution as v, detachedFrozen as vi, addSpend as vn, sanitizeAgentRuntimeEvent as vr, parseWorkerToolTraceArtifact as vt, timerAt as w, createSandboxToolPartState as wi, promptCacheTokenClasses as wn, createWorktree as wr, WORKER_TRACE_PROPAGATION as wt, createWaitProbes as x, readSandboxOutcome as xi, deleteBoxSafe as xn, runSettledCommand as xr, assertValidBudget as xt, scopeOwnerExecutorNodeContext as y, detachedSnapshot as yi, chargedTokens as yn, sanitizeKnowledgeReadinessReport as yr, workerTraceAnalysisStore as yt, reconnectRetainedInteractiveRun as z, providerMessageText as zi, registerRetainedExecutorPreparation as zn, promptModelProfileMaterialization as zr, isPeerMailEnvelope as zt };
|
|
22766
22949
|
|
|
22767
|
-
//# sourceMappingURL=supervisor-
|
|
22950
|
+
//# sourceMappingURL=supervisor-WRrw0nlk.js.map
|