@tangle-network/agent-runtime 0.217.2 → 0.218.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{activation-DGj9G2yE.js → activation-BLKHwI65.js} +2 -2
- package/dist/{activation-DGj9G2yE.js.map → activation-BLKHwI65.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-yaK8G6xJ.js → coordination-driver-DVzm7Tlo.js} +2 -2
- package/dist/{coordination-driver-yaK8G6xJ.js.map → coordination-driver-DVzm7Tlo.js.map} +1 -1
- package/dist/{delegate-C7VG1TYq.js → delegate-DoejjUdz.js} +2 -2
- package/dist/{delegate-C7VG1TYq.js.map → delegate-DoejjUdz.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-qQmOHVc3.js → graph-CAi1I_2o.js} +4 -3
- package/dist/graph-CAi1I_2o.js.map +1 -0
- package/dist/{improvement-cycle-CAIv8aB8.js → improvement-cycle-DAMh1H6T.js} +3 -3
- package/dist/{improvement-cycle-CAIv8aB8.js.map → improvement-cycle-DAMh1H6T.js.map} +1 -1
- package/dist/{index-XlvRo6ys.d.ts → index-DjgcOl1K.d.ts} +16 -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-su5-oyU1.js → loop-runner-bin-B0O51XXu.js} +3 -3
- package/dist/{loop-runner-bin-su5-oyU1.js.map → loop-runner-bin-B0O51XXu.js.map} +1 -1
- package/dist/{loop-runner-bin-C4hZxGiX.d.ts → loop-runner-bin-BACjC-lm.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-DviRl_a5.js → provision-supervisor-B7k56EGS.js} +3 -3
- package/dist/{provision-supervisor-DviRl_a5.js.map → provision-supervisor-B7k56EGS.js.map} +1 -1
- package/dist/{runtime-DoeK2k20.js → runtime-D7cA__Lw.js} +8 -8
- package/dist/{runtime-DoeK2k20.js.map → runtime-D7cA__Lw.js.map} +1 -1
- package/dist/{server-COJLaFTK.js → server-N09ZChmr.js} +3 -3
- package/dist/{server-COJLaFTK.js.map → server-N09ZChmr.js.map} +1 -1
- package/dist/{stream-agent-turn-DPv9w25U.d.ts → stream-agent-turn-DSrEMRwR.d.ts} +89 -2
- package/dist/{structural-rollout-CffrdFuX.js → structural-rollout-DLdNDY6d.js} +2 -2
- package/dist/{structural-rollout-CffrdFuX.js.map → structural-rollout-DLdNDY6d.js.map} +1 -1
- package/dist/{supervise-Bl5eBJhb.js → supervise-uUAqm_kQ.js} +126 -8
- package/dist/supervise-uUAqm_kQ.js.map +1 -0
- package/dist/{supervisor-CvF_KeLc.js → supervisor-CUlzJ5IO.js} +225 -42
- package/dist/supervisor-CUlzJ5IO.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-qQmOHVc3.js.map +0 -1
- package/dist/supervise-Bl5eBJhb.js.map +0 -1
- package/dist/supervisor-CvF_KeLc.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 $, mergeTraceEnv as $n, authoredProfileDigest as $r, createSandboxForSpec as $t, scopeRetainedOwnerPriorSpend as A, sandboxEventServedBackend as Ai, unmeteredSpend as An, CodexExecutionDiagnosticError as Ar, DEFAULT_STALL_AFTER_MS as At, recoverRetainedInteractiveRun as B, retainedExecutorSeamKey as Bn, promptResourceProfileMaterialization as Br, peerMailTools as Bt, pollFor as C, createSandboxToolPartState as Ci, isAbortError$2 as Cn, createWorktree as Cr, spendFromUsageEvents as Ct, consumeScopeRetainedOwnerResult as D, mapSandboxEvent as Di, stringifySafe as Dn, harnessSupportsReasoningEffort as Dr, workerTraceHeaders as Dt, waitUntil as E, isSandboxTerminalEvent as Ei, sleep as En, LOCAL_HARNESSES as Er, workerTraceEnv as Et, attachWorker as F, awaitAbortable$1 as Fi, withBudgetResources as Fn, fullProfileMaterialization as Fr, DEFAULT_PEER_MAIL_LIMITS as Ft, queueOf as G, recoverRetainedRun as Gn, validateProfileMaterialization as Gr, bridgeModelRouteRefusal as Gt, destroyInteractiveEnvironment as H, abortError$1 as Hn, renderUnsupported as Hr, isLiveNodeStatus as Ht, readWorkerInteractiveBinding as I, promptFromAgentTurnInput as Ii, createPushTraceSource as In, profileMaterializationAxes$1 as Ir, PEER_MAIL_WIRE_KEY as It, teardownExecutor as J, retainedCreateMaterial as Jn, parseCommittedJsonLines as Jr, harnessUsageIsEmpty as Jt, rollingDispatch as K, startRetainedRun as Kn, worktreeCliProfileMaterialization as Kr, addHarnessUsage as Kt, workerInteractiveBindingFile as L, promptOptionsFromAgentTurnInput as Li, decodeToolPart as Ln, promptControlProfileMaterialization as Lr, claimsAuthority as Lt, interactiveAdmissionSeamKey as M, sumSandboxUsage as Mi, zeroSpend as Mn, assertProfileMaterialization as Mr, readWorkerProgress as Mt, readWorkerInteractiveAdmissions as N, decodeHarnessUsage as Ni, addResourceSpend as Nn, controlProfileMaterialization as Nr, createInbox as Nt, prepareScopeRetainedOwnerTask as O, mapSandboxToolEvent as Oi, throwAbort as On, localHarnessExecutable as Or, workerTraceSeamKey as Ot, workerInteractiveAdmissionFile as P, abortError$2 as Pi, resourceTelemetry as Pn, defineProfileMaterializationContract as Pr, AUTHORITY_MARKERS as Pt, cliWorktreeExecutor as Q, createPropagatingTraceEmitter as Qn, attestRuntimeOwnedScopeOwner as Qr, TERMINAL_DECISIONS as Qt, workerInteractiveBindingsDir as R, providerMessageText as Ri, sandboxSessionTraceSource as Rn, promptModelProfileMaterialization as Rr, createPeerMailbox as Rt, isWaitOutcome as S, canonicalStreamEventFromSandboxEvent as Si, hasCompleteCacheBreakdown as Sn, captureWorktreeDiff as Sr, createBudgetPool as St, validateWaitSpec as T, extractLlmCallEvent as Ti, randomSuffix as Tn, DEFAULT_LOCAL_HARNESS as Tr, readWorkerTraceContext as Tt, effectiveConcurrency as U, linkAbort as Un, sandboxActProfileMaterialization as Ur, isTerminalNodeStatus as Ut, startRetainedInteractiveRun as V, RunCancellationReason as Vn, renderProfileMaterializationIssues as Vr, peerMailVerbNames as Vt, freeSlots as W, reconnectRetainedRun as Wn, unsupportedProfileDimensions as Wr, bridgeAdmissionRefusal as Wt, captureReusableExecutorConfig as X, defaultRedactorIdentityMaterial as Xn, writeAllBytes as Xr, bridgeRuntimeAttachmentsKey as Xt, bindReusableExecutorExecutionId as Y, defaultRedactor as Yn, prepareJsonlAppend as Yr, readCodexRolloutSession as Yt, cliInPlaceExecutor as Z, resolveRedactor as Zn, attestRuntimeOwnedPendingExecutor as Zr, bridgeStopSignalKey as Zt, recordScopeOwnerMaterialization as _, detachedFrozen as _i, sandboxClientAsProvider as _n, sanitizeAgentRuntimeEvent as _r, isTraceAnalysisStore as _t, pickBestDelivered as a, providerAttemptEvidence as ai, acquireSandbox as an, buildRuntimeEventOtelSpans as ar, createInPlaceCliExecutor as at, settledToIteration as b, readSandboxOutcome as bi, cloneSpend as bn, runSettledCommand as br, contentAddress as bt, driverChild as c, runtimeOwnedExecutorExecutionBinding as ci, routerBrain as cn, exportEvalRuns as cr, InMemoryResultBlobStore as ct, withDriverExecutor as d, runtimeOwnedPendingExecutorMaterialization as di, observedModelMatchesDeclared as dn, loopEventToOtelSpan as dr, loadSpawnForest as dt, finalizeRuntimeOwnedPendingExecutor as ei, defaultSelectWinner as en, readTraceContextFromEnv as er, createExecutorRegistry as et, beginScopeOwnerAttempt as f, runtimeOwnedScopeOwnerRuntime as fi, DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS as fn, padSpanId as fr, materializeTreeView as ft, meterRuntimeOwnedProviderAttempt as g, executableAgentSpecSnapshot as gi, resolveAgentEnvironmentProvider as gn, createRuntimeStreamEventCollector as gr, captureWorkerTraceEvidence as gt, meterRuntimeOwnedAccounting as h, executableAgentProfileSnapshot as hi, providerAsSandboxClient as hn, createRuntimeEventCollector as hr, WORKER_TOOL_TRACE_SCHEMA_VERSION as ht, collectDelivered as i, newExecutionAttemptId as ii, probeSandboxCapabilities as in, buildLoopSpanNodes as ir, createSteerableSandboxSession as it, scopeRetainedOwnerResult as j, sandboxProgressEvents as ji, withTimeout as jn, AGENT_PROFILE_MATERIALIZATION_AXES as jr, createActivityLog as jt, scopeRetainedOwnerContext as k, notifySandboxEventObserver as ki, throwIfAborted as kn, parseCodexTokenUsage as kr, taskToPrompt as kt, driverExecutorFactory as l, runtimeOwnedExecutorMaterialization as li, runBrainLoop as ln, flatOtelSpan as lr, InMemorySpawnJournal as lt, deriveNodeExecutionIdentity as m, unknownMaterializationReceipt as mi, providerAsExecutor as mn, toOtelAttributes as mr, replaySpawnTree as mt, createSupervisor as n, knownExecutionBindingReceipt as ni, runAgentRounds as nn, INTELLIGENCE_WIRE_VERSION as nr, createWorktreeCliExecutor as nt, runFinalizer as o, recordRuntimeOwnedDriveHarnessProviderEvidence as oi, assertBoxlessPromptOptions as on, createOpenInferenceFileExporter as or, FileResultBlobStore as ot, createScope as p, unknownExecutionBindingReceipt as pi, createAgentEnvironmentProviderRegistry as pn, padTraceId as pr, pendingWaits as pt, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as q, startRetainedRunInEnvironment as qn, isNoEntError as qr, createCodexRolloutStoreReader as qt, bestDelivered as r, knownMaterializationReceipt as ri, createSandboxLineage as rn, buildLoopOtelSpans as rr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as rt, runTree as s, runtimeOwnedDriveHarnessProviderEvidence as si, readPromptOptions as sn, createOtelExporter as sr, FileSpawnJournal as st, createRootHandle as t, inheritRuntimeOwnedExecutorAttestation as ti, isTerminalDecision as tn, traceContextToEnv as tr, snapshotExecutorConfig as tt, isDriverSpec as u, runtimeOwnedExecutorProviderEvidence as ui, canonicalObservedModelParts as un, generateSpanId as ur, insideCursorNamespace as ut, restoreScopeOwnerAcceptedExecution as v, detachedSnapshot as vi, addSpend as vn, sanitizeKnowledgeReadinessReport as vr, parseWorkerToolTraceArtifact as vt, timerAt as w, createSandboxUsageLedger as wi, promptCacheTokenClasses as wn, removeWorktree as wr, WORKER_TRACE_PROPAGATION as wt, createWaitProbes as x, assertSandboxServedModel as xi, deleteBoxSafe as xn, runWorktreeHarness as xr, assertValidBudget as xt, scopeOwnerExecutorNodeContext as y, projectSandboxOutcome as yi, chargedTokens as yn, sanitizeRuntimeStreamEvent as yr, workerTraceAnalysisStore as yt, reconnectRetainedInteractiveRun as z, registerRetainedExecutorPreparation as zn, promptOnlyProfileMaterialization as zr, isPeerMailEnvelope as zt };
|
|
22766
22949
|
|
|
22767
|
-
//# sourceMappingURL=supervisor-
|
|
22950
|
+
//# sourceMappingURL=supervisor-CUlzJ5IO.js.map
|