@tangle-network/agent-runtime 0.266.0 → 0.271.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-VpxSbDKJ.d.ts → activation-BrJmwTLB.d.ts} +4 -4
- package/dist/{activation-BERiJjx5.js → activation-DGbFPGR3.js} +2 -2
- package/dist/{activation-BERiJjx5.js.map → activation-DGbFPGR3.js.map} +1 -1
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-DdZ-nh_4.js → coordination-driver-iBGMKDvB.js} +20 -14
- package/dist/coordination-driver-iBGMKDvB.js.map +1 -0
- package/dist/{delegate-Ajx_PVyu.js → delegate-DOqUvaIz.js} +2 -2
- package/dist/{delegate-Ajx_PVyu.js.map → delegate-DOqUvaIz.js.map} +1 -1
- package/dist/durable.d.ts +5 -4
- package/dist/durable.js +3 -3
- package/dist/durable.js.map +1 -1
- package/dist/{graph-CK50N9vG.js → graph-DnMcepkN.js} +8 -5
- package/dist/graph-DnMcepkN.js.map +1 -0
- package/dist/{improvement-cycle-GRPoHLm1.js → improvement-cycle-1IyRJo5h.js} +9 -9
- package/dist/improvement-cycle-1IyRJo5h.js.map +1 -0
- package/dist/{index-CU2mlMfc.d.ts → index-CL1dduJd.d.ts} +70 -6
- package/dist/index.d.ts +7 -7
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +9 -3
- package/dist/intelligence.js +11 -5
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +4 -4
- package/dist/kernel.js +9 -9
- package/dist/{loop-runner-bin-cC16EPUq.js → loop-runner-bin-BPZ9tt1W.js} +3 -3
- package/dist/{loop-runner-bin-cC16EPUq.js.map → loop-runner-bin-BPZ9tt1W.js.map} +1 -1
- package/dist/{loop-runner-bin-XKZXM08Q.d.ts → loop-runner-bin-O_vM1w8Y.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 +12 -6
- package/dist/mcp/index.js +7 -7
- package/dist/mcp/memory-bin.js +1 -1
- package/dist/{memory-server-Cn8LbAxO.js → memory-server-DXQ8IxGR.js} +2 -2
- package/dist/{memory-server-Cn8LbAxO.js.map → memory-server-DXQ8IxGR.js.map} +1 -1
- package/dist/{openai-tools-D3ajI_D2.d.ts → openai-tools-DWHxpwx2.d.ts} +2 -2
- package/dist/profiles.d.ts +2 -2
- package/dist/{provision-supervisor-Bf_bPaCv.js → provision-supervisor-Cy8pqE95.js} +3 -3
- package/dist/{provision-supervisor-Bf_bPaCv.js.map → provision-supervisor-Cy8pqE95.js.map} +1 -1
- package/dist/{runtime-hOLlAc1i.js → runtime-DVjIH1eo.js} +233 -11
- package/dist/runtime-DVjIH1eo.js.map +1 -0
- package/dist/{server-DOb67ohd.js → server-CN9vzbSe.js} +4 -4
- package/dist/{server-DOb67ohd.js.map → server-CN9vzbSe.js.map} +1 -1
- package/dist/{stream-agent-turn-Gw9hLpBn.d.ts → stream-agent-turn-DbEsKgb_.d.ts} +21 -3
- package/dist/{structural-rollout-DV9YoQF6.js → structural-rollout-I92sIfNl.js} +2 -2
- package/dist/{structural-rollout-DV9YoQF6.js.map → structural-rollout-I92sIfNl.js.map} +1 -1
- package/dist/{substrate-CLt9S9ym.d.ts → substrate-CbC03Vzo.d.ts} +2 -2
- package/dist/{supervise--njTtSL3.js → supervise-DJ_1i9vj.js} +13 -8
- package/dist/{supervise--njTtSL3.js.map → supervise-DJ_1i9vj.js.map} +1 -1
- package/dist/{supervisor-B8UMAXya.js → supervisor-Cvd5mf7x.js} +285 -86
- package/dist/supervisor-Cvd5mf7x.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +14 -14
- package/dist/testing.js.map +1 -1
- package/dist/{tool-server-x9NEhvHZ.js → tool-server-Dqer2M4_.js} +30 -12
- package/dist/tool-server-Dqer2M4_.js.map +1 -0
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-CrnwLVYQ.d.ts → types-Bo7z5aG5.d.ts} +109 -43
- package/package.json +2 -1
- package/dist/coordination-driver-DdZ-nh_4.js.map +0 -1
- package/dist/graph-CK50N9vG.js.map +0 -1
- package/dist/improvement-cycle-GRPoHLm1.js.map +0 -1
- package/dist/runtime-hOLlAc1i.js.map +0 -1
- package/dist/supervisor-B8UMAXya.js.map +0 -1
- package/dist/tool-server-x9NEhvHZ.js.map +0 -1
|
@@ -14,7 +14,7 @@ import { access, chmod, copyFile, mkdir, mkdtemp, open, readFile, readdir, realp
|
|
|
14
14
|
import { applyWorkspacePlan, hashWorkspacePlan, materializeProfile, resolveAgentProfileResources } from "@tangle-network/agent-profile-materialize";
|
|
15
15
|
import { homedir, hostname, tmpdir } from "node:os";
|
|
16
16
|
import { stripVTControlCharacters } from "node:util";
|
|
17
|
-
import { deriveHexId, isW3CSpanId, isW3CTraceId } from "@tangle-network/agent-trace-contract";
|
|
17
|
+
import { ATTR, deriveHexId, isW3CSpanId, isW3CTraceId } from "@tangle-network/agent-trace-contract";
|
|
18
18
|
import { SDKError, generateIdempotencyKey, withRetry } from "@tangle-network/agent-core";
|
|
19
19
|
import { collectAgentFinalMessageText, collectAgentResponseText } from "@tangle-network/sandbox";
|
|
20
20
|
import { request } from "node:http";
|
|
@@ -5171,25 +5171,30 @@ const GEN_AI = {
|
|
|
5171
5171
|
* useless for the runs you most want to look at.
|
|
5172
5172
|
*/
|
|
5173
5173
|
function createOpenInferenceFileExporter(filePath) {
|
|
5174
|
-
|
|
5174
|
+
let written = 0;
|
|
5175
|
+
let dropped = 0;
|
|
5175
5176
|
let failed;
|
|
5176
|
-
const append = (line) => {
|
|
5177
|
-
try {
|
|
5178
|
-
appendFileSync(filePath, `${line}\n`, "utf8");
|
|
5179
|
-
} catch (error) {
|
|
5180
|
-
failed ??= error instanceof Error ? error : new Error(String(error));
|
|
5181
|
-
}
|
|
5182
|
-
};
|
|
5183
5177
|
return {
|
|
5184
5178
|
exportSpan(span) {
|
|
5185
|
-
|
|
5186
|
-
|
|
5179
|
+
try {
|
|
5180
|
+
appendFileSync(filePath, `${JSON.stringify(toOpenInferenceLine(span))}\n`, "utf8");
|
|
5181
|
+
written += 1;
|
|
5182
|
+
} catch (error) {
|
|
5183
|
+
dropped += 1;
|
|
5184
|
+
failed ??= error instanceof Error ? error : new Error(String(error));
|
|
5185
|
+
}
|
|
5187
5186
|
},
|
|
5188
5187
|
async flush() {
|
|
5189
|
-
if (failed) throw new Error(`OpenInference file exporter failed writing ${filePath}: ${failed.message}`);
|
|
5188
|
+
if (failed) throw new Error(`OpenInference file exporter failed writing ${filePath} (${dropped} spans dropped): ${failed.message}`);
|
|
5190
5189
|
},
|
|
5191
|
-
async shutdown() {
|
|
5192
|
-
|
|
5190
|
+
async shutdown() {},
|
|
5191
|
+
stats() {
|
|
5192
|
+
return {
|
|
5193
|
+
written,
|
|
5194
|
+
dropped,
|
|
5195
|
+
pending: 0,
|
|
5196
|
+
...failed ? { lastError: failed.message } : {}
|
|
5197
|
+
};
|
|
5193
5198
|
}
|
|
5194
5199
|
};
|
|
5195
5200
|
}
|
|
@@ -5240,68 +5245,172 @@ function toOpenInferenceLine(span) {
|
|
|
5240
5245
|
};
|
|
5241
5246
|
}
|
|
5242
5247
|
/**
|
|
5243
|
-
* Create an
|
|
5248
|
+
* Create an OTLP/HTTP exporter. Returns undefined when no endpoint is configured.
|
|
5249
|
+
*
|
|
5250
|
+
* One batch is in flight at a time; spans that arrive meanwhile wait in a queue bounded by
|
|
5251
|
+
* `maxQueueSize`. Every span ends in exactly one of `written` or `dropped`: a non-2xx response, a
|
|
5252
|
+
* network error, a timeout, an OTLP `partialSuccess.rejectedSpans` count and a full queue each count
|
|
5253
|
+
* as drops and set `lastError`. Nothing here throws into the caller's run; `flush()` reports the
|
|
5254
|
+
* loss, the same rule {@link createOpenInferenceFileExporter} follows.
|
|
5244
5255
|
*/
|
|
5245
5256
|
function createOtelExporter(config) {
|
|
5246
5257
|
const resolvedEndpoint = config?.endpoint ?? (typeof process !== "undefined" ? process.env.OTEL_EXPORTER_OTLP_ENDPOINT : void 0);
|
|
5247
5258
|
if (!resolvedEndpoint) return void 0;
|
|
5248
|
-
const
|
|
5259
|
+
const url = `${resolvedEndpoint.replace(/\/+$/, "")}/v1/traces`;
|
|
5249
5260
|
const headers = config?.headers ?? parseHeadersFromEnv();
|
|
5250
|
-
const batchSize = config?.batchSize
|
|
5261
|
+
const batchSize = positiveInteger(config?.batchSize, 64);
|
|
5251
5262
|
const flushIntervalMs = config?.flushIntervalMs ?? 5e3;
|
|
5252
|
-
const
|
|
5253
|
-
const
|
|
5254
|
-
const
|
|
5255
|
-
|
|
5263
|
+
const maxQueueSize = Math.max(positiveInteger(config?.maxQueueSize, 2048), batchSize);
|
|
5264
|
+
const timeoutMs = positiveInteger(config?.timeoutMs, 1e4);
|
|
5265
|
+
const resource = { attributes: toOtelAttributes({
|
|
5266
|
+
"service.name": config?.serviceName ?? "agent-runtime",
|
|
5267
|
+
...config?.resourceAttributes ?? {}
|
|
5268
|
+
}) };
|
|
5269
|
+
const queue = [];
|
|
5270
|
+
let inFlight = 0;
|
|
5271
|
+
let written = 0;
|
|
5272
|
+
let dropped = 0;
|
|
5273
|
+
let droppedAtLastFlush = 0;
|
|
5274
|
+
let lastError;
|
|
5275
|
+
let sending;
|
|
5256
5276
|
let stopped = false;
|
|
5257
|
-
const
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
pending.push(span);
|
|
5261
|
-
if (pending.length >= batchSize) doFlush();
|
|
5262
|
-
},
|
|
5263
|
-
async flush() {
|
|
5264
|
-
await doFlush();
|
|
5265
|
-
},
|
|
5266
|
-
async shutdown() {
|
|
5267
|
-
stopped = true;
|
|
5268
|
-
if (timer !== void 0) {
|
|
5269
|
-
clearInterval(timer);
|
|
5270
|
-
timer = void 0;
|
|
5271
|
-
}
|
|
5272
|
-
await doFlush();
|
|
5273
|
-
}
|
|
5277
|
+
const drop = (count, reason) => {
|
|
5278
|
+
dropped += count;
|
|
5279
|
+
lastError = reason;
|
|
5274
5280
|
};
|
|
5275
|
-
|
|
5276
|
-
if (pending.length > 0) doFlush();
|
|
5277
|
-
}, flushIntervalMs);
|
|
5278
|
-
if (typeof timer === "object" && "unref" in timer) timer.unref();
|
|
5279
|
-
async function doFlush() {
|
|
5280
|
-
if (pending.length === 0) return;
|
|
5281
|
-
const batch = pending.splice(0);
|
|
5281
|
+
async function send(batch) {
|
|
5282
5282
|
const body = { resourceSpans: [{
|
|
5283
|
-
resource
|
|
5284
|
-
"service.name": serviceName,
|
|
5285
|
-
...resourceAttrs
|
|
5286
|
-
}) },
|
|
5283
|
+
resource,
|
|
5287
5284
|
scopeSpans: [{
|
|
5288
5285
|
scope: SCOPE,
|
|
5289
5286
|
spans: batch
|
|
5290
5287
|
}]
|
|
5291
5288
|
}] };
|
|
5292
|
-
const url = `${endpoint.replace(/\/+$/, "")}/v1/traces`;
|
|
5293
5289
|
try {
|
|
5294
|
-
await fetch(url, {
|
|
5290
|
+
const response = await fetch(url, {
|
|
5295
5291
|
method: "POST",
|
|
5296
5292
|
headers: {
|
|
5297
5293
|
"content-type": "application/json",
|
|
5298
5294
|
...headers
|
|
5299
5295
|
},
|
|
5300
|
-
body: JSON.stringify(body)
|
|
5296
|
+
body: JSON.stringify(body),
|
|
5297
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
5301
5298
|
});
|
|
5302
|
-
|
|
5299
|
+
const text = await response.text().catch(() => "");
|
|
5300
|
+
if (!response.ok) {
|
|
5301
|
+
const detail = text ? `: ${text.slice(0, 200)}` : "";
|
|
5302
|
+
drop(batch.length, `HTTP ${response.status} from ${url}${detail}`);
|
|
5303
|
+
return;
|
|
5304
|
+
}
|
|
5305
|
+
const rejected = rejectedSpans(text, batch.length);
|
|
5306
|
+
if (rejected.count > 0) drop(rejected.count, `collector rejected ${rejected.count} spans: ${rejected.message}`);
|
|
5307
|
+
written += batch.length - rejected.count;
|
|
5308
|
+
} catch (error) {
|
|
5309
|
+
drop(batch.length, `POST ${url} failed: ${describeFetchError(error)}`);
|
|
5310
|
+
}
|
|
5311
|
+
}
|
|
5312
|
+
/** The single sender: it drains the queue batch by batch until the queue is empty. */
|
|
5313
|
+
function drain() {
|
|
5314
|
+
sending ??= (async () => {
|
|
5315
|
+
try {
|
|
5316
|
+
while (queue.length > 0) {
|
|
5317
|
+
const batch = queue.splice(0, batchSize);
|
|
5318
|
+
inFlight = batch.length;
|
|
5319
|
+
await send(batch);
|
|
5320
|
+
inFlight = 0;
|
|
5321
|
+
}
|
|
5322
|
+
} finally {
|
|
5323
|
+
sending = void 0;
|
|
5324
|
+
}
|
|
5325
|
+
})();
|
|
5326
|
+
return sending;
|
|
5327
|
+
}
|
|
5328
|
+
const timer = setInterval(() => {
|
|
5329
|
+
if (queue.length > 0) drain();
|
|
5330
|
+
}, flushIntervalMs);
|
|
5331
|
+
if (typeof timer === "object" && "unref" in timer) timer.unref();
|
|
5332
|
+
return {
|
|
5333
|
+
exportSpan(span) {
|
|
5334
|
+
if (stopped) {
|
|
5335
|
+
drop(1, "span exported after the exporter stopped");
|
|
5336
|
+
return;
|
|
5337
|
+
}
|
|
5338
|
+
if (queue.length + inFlight >= maxQueueSize) {
|
|
5339
|
+
drop(1, `queue full: ${maxQueueSize} spans already waiting on ${url}`);
|
|
5340
|
+
return;
|
|
5341
|
+
}
|
|
5342
|
+
queue.push(span);
|
|
5343
|
+
if (queue.length >= batchSize) drain();
|
|
5344
|
+
},
|
|
5345
|
+
async flush() {
|
|
5346
|
+
await drain();
|
|
5347
|
+
const lost = dropped - droppedAtLastFlush;
|
|
5348
|
+
droppedAtLastFlush = dropped;
|
|
5349
|
+
if (lost > 0) throw new Error(`OTLP exporter dropped ${lost} spans since the last flush: ${lastError}`);
|
|
5350
|
+
},
|
|
5351
|
+
async shutdown() {
|
|
5352
|
+
stopped = true;
|
|
5353
|
+
clearInterval(timer);
|
|
5354
|
+
await drain();
|
|
5355
|
+
},
|
|
5356
|
+
stats() {
|
|
5357
|
+
return {
|
|
5358
|
+
written,
|
|
5359
|
+
dropped,
|
|
5360
|
+
pending: queue.length + inFlight,
|
|
5361
|
+
...lastError !== void 0 ? { lastError } : {}
|
|
5362
|
+
};
|
|
5363
|
+
}
|
|
5364
|
+
};
|
|
5365
|
+
}
|
|
5366
|
+
/**
|
|
5367
|
+
* Spans a 2xx OTLP/HTTP response still refused. The spec lets a collector accept a request and
|
|
5368
|
+
* reject part of it through `partialSuccess.rejectedSpans`; reading only the status would count
|
|
5369
|
+
* those spans as delivered. An empty or non-JSON body is a full success.
|
|
5370
|
+
*/
|
|
5371
|
+
function rejectedSpans(text, batchLength) {
|
|
5372
|
+
if (!text.trim()) return {
|
|
5373
|
+
count: 0,
|
|
5374
|
+
message: ""
|
|
5375
|
+
};
|
|
5376
|
+
let parsed;
|
|
5377
|
+
try {
|
|
5378
|
+
parsed = JSON.parse(text);
|
|
5379
|
+
} catch {
|
|
5380
|
+
return {
|
|
5381
|
+
count: 0,
|
|
5382
|
+
message: ""
|
|
5383
|
+
};
|
|
5303
5384
|
}
|
|
5304
|
-
return
|
|
5385
|
+
if (parsed === null || typeof parsed !== "object") return {
|
|
5386
|
+
count: 0,
|
|
5387
|
+
message: ""
|
|
5388
|
+
};
|
|
5389
|
+
const partial = parsed.partialSuccess;
|
|
5390
|
+
if (partial === null || typeof partial !== "object") return {
|
|
5391
|
+
count: 0,
|
|
5392
|
+
message: ""
|
|
5393
|
+
};
|
|
5394
|
+
const { rejectedSpans: raw, errorMessage } = partial;
|
|
5395
|
+
const count = typeof raw === "string" ? Number(raw) : typeof raw === "number" ? raw : 0;
|
|
5396
|
+
if (!Number.isSafeInteger(count) || count <= 0) return {
|
|
5397
|
+
count: 0,
|
|
5398
|
+
message: ""
|
|
5399
|
+
};
|
|
5400
|
+
return {
|
|
5401
|
+
count: Math.min(count, batchLength),
|
|
5402
|
+
message: typeof errorMessage === "string" && errorMessage ? errorMessage : "no message"
|
|
5403
|
+
};
|
|
5404
|
+
}
|
|
5405
|
+
/** Node's fetch reports every socket failure as "fetch failed"; the cause names which one. */
|
|
5406
|
+
function describeFetchError(error) {
|
|
5407
|
+
if (!(error instanceof Error)) return String(error);
|
|
5408
|
+
const cause = error.cause;
|
|
5409
|
+
const code = cause && typeof cause === "object" && "code" in cause && typeof cause.code === "string" ? cause.code : void 0;
|
|
5410
|
+
return code ? `${error.message} (${code})` : error.message;
|
|
5411
|
+
}
|
|
5412
|
+
function positiveInteger(value, fallback) {
|
|
5413
|
+
return value !== void 0 && Number.isSafeInteger(value) && value > 0 ? value : fallback;
|
|
5305
5414
|
}
|
|
5306
5415
|
/**
|
|
5307
5416
|
* Convert a LoopTraceEvent into an OtelSpan for export.
|
|
@@ -5384,6 +5493,7 @@ function buildRuntimeEventOtelSpans(events, traceId, parentSpanId, options = {})
|
|
|
5384
5493
|
let name = `tangle.runtime.${event.type}`;
|
|
5385
5494
|
if (event.type === "tool_call" || event.type === "tool_result") {
|
|
5386
5495
|
name = `agent.${event.type}`;
|
|
5496
|
+
attrs[ATTR.spanKind] = "TOOL";
|
|
5387
5497
|
attrs["tool.name"] = event.toolName;
|
|
5388
5498
|
if (event.toolCallId) attrs["tool.call_id"] = event.toolCallId;
|
|
5389
5499
|
const mcp = mcpIdentity(event.toolName);
|
|
@@ -5393,6 +5503,7 @@ function buildRuntimeEventOtelSpans(events, traceId, parentSpanId, options = {})
|
|
|
5393
5503
|
if (payload !== void 0) attrs[event.type === "tool_call" ? "tool.input" : "tool.output"] = serialized(payload);
|
|
5394
5504
|
} else if (event.type === "llm_call") {
|
|
5395
5505
|
name = "gen_ai.client.inference";
|
|
5506
|
+
attrs[ATTR.spanKind] = "LLM";
|
|
5396
5507
|
attrs["gen_ai.request.model"] = event.model;
|
|
5397
5508
|
if (event.tokensIn !== void 0) attrs["gen_ai.usage.input_tokens"] = event.tokensIn;
|
|
5398
5509
|
if (event.tokensOut !== void 0) attrs["gen_ai.usage.output_tokens"] = event.tokensOut;
|
|
@@ -5446,11 +5557,24 @@ function buildLoopOtelSpans(events, traceId, rootParentSpanId) {
|
|
|
5446
5557
|
kind: 1,
|
|
5447
5558
|
startTimeUnixNano: msToNs(node.startMs),
|
|
5448
5559
|
endTimeUnixNano: msToNs(node.endMs),
|
|
5449
|
-
attributes: toOtelAttributes(
|
|
5560
|
+
attributes: toOtelAttributes({
|
|
5561
|
+
...node.attrs,
|
|
5562
|
+
[ATTR.spanKind]: LOOP_SPAN_KIND[node.kind]
|
|
5563
|
+
}),
|
|
5450
5564
|
status: { code: node.error ? 2 : 1 }
|
|
5451
5565
|
}));
|
|
5452
5566
|
}
|
|
5453
5567
|
/**
|
|
5568
|
+
* The declared kind of each loop level. An iteration span carries its own token total, and an
|
|
5569
|
+
* undeclared span with tokens reads as an LLM call, so declaring AGENT keeps those tokens from
|
|
5570
|
+
* being counted a second time beside the model-call spans beneath it.
|
|
5571
|
+
*/
|
|
5572
|
+
const LOOP_SPAN_KIND = {
|
|
5573
|
+
loop: "CHAIN",
|
|
5574
|
+
round: "CHAIN",
|
|
5575
|
+
branch: "AGENT"
|
|
5576
|
+
};
|
|
5577
|
+
/**
|
|
5454
5578
|
* Sink-neutral core behind {@link buildLoopOtelSpans}: reconstruct the
|
|
5455
5579
|
* loop → round → branch span tree from one run's ordered `LoopTraceEvent`
|
|
5456
5580
|
* stream. Consumed by the OTEL mapper above and by the MCP delegation
|
|
@@ -7404,7 +7528,8 @@ function assertRetainedRunReplayMaterial(provider, replay, admission) {
|
|
|
7404
7528
|
}, identity, retainedContextTransfer(replay.turn.contextTransfer)));
|
|
7405
7529
|
}
|
|
7406
7530
|
function retainedRunIntent(options, identity, contextTransfer) {
|
|
7407
|
-
const
|
|
7531
|
+
const { profile } = options.environment;
|
|
7532
|
+
const requestedProfileDigest = typeof profile === "string" ? canonicalCandidateDigest(profile) : canonicalAgentProfileDigest(profile);
|
|
7408
7533
|
const requestDigest = canonicalCandidateDigest({
|
|
7409
7534
|
kind: "retained-run-intent.v1",
|
|
7410
7535
|
provider: options.provider.name,
|
|
@@ -8263,6 +8388,7 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
8263
8388
|
let workspaceCapturePromise;
|
|
8264
8389
|
let workspaceCleanupPromise;
|
|
8265
8390
|
let retainedReleasePromise;
|
|
8391
|
+
let releaseReadTried = false;
|
|
8266
8392
|
let workspaceOutcome;
|
|
8267
8393
|
let workspacePreservationRequired = false;
|
|
8268
8394
|
let workspaceRunActive = false;
|
|
@@ -8615,6 +8741,11 @@ function createProviderExecutor(provider, profile, ctx, options, placement) {
|
|
|
8615
8741
|
environment = target;
|
|
8616
8742
|
resetWorkspaceState(target);
|
|
8617
8743
|
}
|
|
8744
|
+
if (harnessTranscript.status !== "captured" && !releaseReadTried) {
|
|
8745
|
+
releaseReadTried = true;
|
|
8746
|
+
const capture = await captureHarnessTranscript(target, profile.harness, signal);
|
|
8747
|
+
if (capture.status === "captured") harnessTranscript = capture;
|
|
8748
|
+
}
|
|
8618
8749
|
const result = await destroyEnvironment(signal);
|
|
8619
8750
|
if (!result.destroyed) return [receipt(false, result.detail, result.permanent)];
|
|
8620
8751
|
pending = false;
|
|
@@ -16636,6 +16767,7 @@ var FileResultBlobStore = class {
|
|
|
16636
16767
|
return `${this.dir}/${outRef.replace(/:/g, "-")}.json`;
|
|
16637
16768
|
}
|
|
16638
16769
|
};
|
|
16770
|
+
/** @internal shared with the SQL-backed store. */
|
|
16639
16771
|
function encodeResultBlob(outRef, artifact) {
|
|
16640
16772
|
const detached = detachedSnapshot(artifact, "result blob");
|
|
16641
16773
|
assertContentAddress(outRef, detached);
|
|
@@ -16648,6 +16780,7 @@ function encodeResultBlob(outRef, artifact) {
|
|
|
16648
16780
|
text
|
|
16649
16781
|
};
|
|
16650
16782
|
}
|
|
16783
|
+
/** @internal shared with the SQL-backed store. */
|
|
16651
16784
|
function assertContentAddress(outRef, artifact) {
|
|
16652
16785
|
const expected = contentAddress(artifact);
|
|
16653
16786
|
if (outRef !== expected) throw new Error(`blob outRef '${outRef}' does not match the artifact content hash '${expected}'; a content-addressed store refuses a mismatched ref (breaks the replay invariant)`);
|
|
@@ -17085,6 +17218,7 @@ function servedIdentityParts(model) {
|
|
|
17085
17218
|
};
|
|
17086
17219
|
}
|
|
17087
17220
|
/** One validation implementation for memory, durable append, and cold replay. */
|
|
17221
|
+
/** @internal shared with the SQL-backed store. */
|
|
17088
17222
|
var SpawnEventIndex = class {
|
|
17089
17223
|
root;
|
|
17090
17224
|
nodes = /* @__PURE__ */ new Map();
|
|
@@ -21025,14 +21159,15 @@ function settledNodeEvidence(subject, settlement, settledAt) {
|
|
|
21025
21159
|
trace: detachedSnapshot(settlement.trace, "worker trace evidence")
|
|
21026
21160
|
};
|
|
21027
21161
|
}
|
|
21028
|
-
/** The `agent.child` payload of
|
|
21029
|
-
* kept at the settlement instant and `metered` omitted so the
|
|
21030
|
-
* twice. The sweep and the resume heal emit
|
|
21031
|
-
|
|
21162
|
+
/** The `agent.child` payload of a closed retained slot: the settlement restated with the state
|
|
21163
|
+
* the slot closed in, `settledAt` kept at the settlement instant and `metered` omitted so the
|
|
21164
|
+
* driver's inference is not summed twice. The sweep, the final close and the resume heal emit
|
|
21165
|
+
* it from the same builder. */
|
|
21166
|
+
function releasedChildPayload(subject, settlement, settledAt, releasedAt, retainedExecution = "released") {
|
|
21032
21167
|
return {
|
|
21033
21168
|
childId: subject.id,
|
|
21034
21169
|
status: "down",
|
|
21035
|
-
retainedExecution
|
|
21170
|
+
retainedExecution,
|
|
21036
21171
|
...settlement.retainedPendingCause === void 0 ? {} : { retainedPendingCause: settlement.retainedPendingCause },
|
|
21037
21172
|
releasedAt,
|
|
21038
21173
|
...settlement.outRef === void 0 ? {} : { outRef: settlement.outRef },
|
|
@@ -21273,7 +21408,11 @@ async function assertRecordedResult(node, result, events, opts) {
|
|
|
21273
21408
|
* The keyed assignments a prior journal proves: every `spawned` event carrying a `key`, resolved
|
|
21274
21409
|
* against the replayed settlements. A key spawned more than once (a retry chain) resolves to its
|
|
21275
21410
|
* LATEST attempt — iterate in ordinal order so later spawns overwrite earlier ones. A spawned
|
|
21276
|
-
* event with no matching settlement is `in-doubt`: the process died with it in flight
|
|
21411
|
+
* event with no matching settlement is `in-doubt`: the process died with it in flight — UNLESS
|
|
21412
|
+
* the spawn's own runtime proves the execution cannot have outlived the process (`inline`, the
|
|
21413
|
+
* same predicate the budget layer charges no uncertain reservation for), in which case the resume
|
|
21414
|
+
* itself is the terminal evidence and the key resolves `down` with a derived reason, so a re-spawn
|
|
21415
|
+
* under the same key retries instead of wedging in-doubt.
|
|
21277
21416
|
*/
|
|
21278
21417
|
function keyedAssignments(events, settled) {
|
|
21279
21418
|
const byId = new Map(settled.map((s) => [s.handle.id, s]));
|
|
@@ -21283,7 +21422,13 @@ function keyedAssignments(events, settled) {
|
|
|
21283
21422
|
if (ev.key === void 0) continue;
|
|
21284
21423
|
if (ev.identity === void 0) throw new RuntimeRunStateError(`supervisor: keyed node '${ev.id}' has no durable execution identity`);
|
|
21285
21424
|
const s = byId.get(ev.id);
|
|
21286
|
-
keys.set(ev.key, s === void 0 ? {
|
|
21425
|
+
keys.set(ev.key, s === void 0 ? ev.runtime === "inline" ? {
|
|
21426
|
+
id: ev.id,
|
|
21427
|
+
label: ev.label,
|
|
21428
|
+
identity: ev.identity,
|
|
21429
|
+
state: "down",
|
|
21430
|
+
reason: `interrupted: the process died with '${ev.label}' in flight and its '${ev.runtime}' runtime cannot outlive that process, so the resume proves the attempt dead`
|
|
21431
|
+
} : {
|
|
21287
21432
|
id: ev.id,
|
|
21288
21433
|
label: ev.label,
|
|
21289
21434
|
identity: ev.identity,
|
|
@@ -22620,6 +22765,7 @@ const runtimeOwnedProviderMeters = /* @__PURE__ */ new WeakMap();
|
|
|
22620
22765
|
const pauseRecorders = /* @__PURE__ */ new WeakMap();
|
|
22621
22766
|
const recoveryStarters = /* @__PURE__ */ new WeakMap();
|
|
22622
22767
|
const retainedReleasers = /* @__PURE__ */ new WeakMap();
|
|
22768
|
+
const retainedSlotClosers = /* @__PURE__ */ new WeakMap();
|
|
22623
22769
|
const teardownRetriers = /* @__PURE__ */ new WeakMap();
|
|
22624
22770
|
const teardownRetriable = /* @__PURE__ */ new WeakMap();
|
|
22625
22771
|
/** The retained owner environments a scope's last release could not confirm destroyed. */
|
|
@@ -22707,6 +22853,25 @@ async function releaseRetainedEnvironments(scope) {
|
|
|
22707
22853
|
return unconfirmedTeardowns(scope);
|
|
22708
22854
|
}
|
|
22709
22855
|
/**
|
|
22856
|
+
* @internal Close the cursor slot of every retained child this scope and its nested scopes still
|
|
22857
|
+
* hold open, once the settlement is final and the release and its retries are done.
|
|
22858
|
+
*
|
|
22859
|
+
* The release sweep closes a slot only when it confirms the environment destroyed, and nothing
|
|
22860
|
+
* else ever closed the rest: a refused delete, a teardown probe that failed after a destroy, or an
|
|
22861
|
+
* admission that timed out before `create` named an environment. Measured on the Discovery fleet
|
|
22862
|
+
* of 2026-09-23/24 (Runtime 0.249.1 to 0.261.0): 338 of 1,620 agents never settled, so they had no
|
|
22863
|
+
* terminal record, no spend but the reservation ceiling, and no transcript receipt (#1301). A
|
|
22864
|
+
* settlement under `retainedAtSettlement: 'release'` is final, so no process will recover these
|
|
22865
|
+
* executions. Each slot closes with the settlement the driver already received, under the seq it
|
|
22866
|
+
* saw, marked `retainedExecution: 'release-unconfirmed'`. The environment it may still hold stays
|
|
22867
|
+
* named by its `teardown-unconfirmed` record for a sweeper. Never call this on a run a later
|
|
22868
|
+
* process may resume.
|
|
22869
|
+
*/
|
|
22870
|
+
async function closeRetainedSlots(scope) {
|
|
22871
|
+
const close = retainedSlotClosers.get(scope);
|
|
22872
|
+
if (close) await close();
|
|
22873
|
+
}
|
|
22874
|
+
/**
|
|
22710
22875
|
* @internal Everything this scope cannot prove destroyed: its settled children whose teardown is
|
|
22711
22876
|
* unconfirmed and, after a release, the retained owner environment that release could not
|
|
22712
22877
|
* confirm. Read live, so a later retry that confirms a node removes it.
|
|
@@ -22877,6 +23042,14 @@ function createScope(args) {
|
|
|
22877
23042
|
identity: prior.identity,
|
|
22878
23043
|
reason: prior.settled.reason
|
|
22879
23044
|
});
|
|
23045
|
+
} else if (prior.state === "down" && prior.settled === void 0) {
|
|
23046
|
+
if (prior.identity === void 0) continue;
|
|
23047
|
+
keyed.set(key, {
|
|
23048
|
+
state: "down",
|
|
23049
|
+
id: prior.id,
|
|
23050
|
+
identity: prior.identity,
|
|
23051
|
+
reason: prior.reason ?? "interrupted: resume proved the prior attempt dead"
|
|
23052
|
+
});
|
|
22880
23053
|
} else if (prior.identity !== void 0) keyed.set(key, {
|
|
22881
23054
|
state: "in-doubt",
|
|
22882
23055
|
id: prior.id,
|
|
@@ -23225,6 +23398,7 @@ function createScope(args) {
|
|
|
23225
23398
|
askTeardown,
|
|
23226
23399
|
...executor.heldEnvironments ? { readHeldEnvironments: executor.heldEnvironments.bind(executor) } : {},
|
|
23227
23400
|
...nestedTeardownScopes.has(executor) ? { readNestedScope: nestedTeardownScopes.get(executor) } : {},
|
|
23401
|
+
...executor.harnessTranscript ? { readTranscriptAtRelease: () => persistHarnessTranscript(readHarnessTranscript(executor), args.blobs) } : {},
|
|
23228
23402
|
teardownAttempts: 0,
|
|
23229
23403
|
abortChild: (reason) => controller.abort(reason)
|
|
23230
23404
|
};
|
|
@@ -23916,24 +24090,44 @@ function createScope(args) {
|
|
|
23916
24090
|
const prior = released.length > 0 ? await args.journal.loadTree(args.root) ?? [] : [];
|
|
23917
24091
|
for (const { child, receipts } of released) {
|
|
23918
24092
|
for (const receipt of receipts) await appendEnvironmentTeardown(args.journal, args.root, child.id, receipt, new Date(now()).toISOString());
|
|
23919
|
-
if (child.cleanupConfirmed
|
|
23920
|
-
|
|
23921
|
-
|
|
23922
|
-
|
|
23923
|
-
|
|
23924
|
-
|
|
23925
|
-
|
|
23926
|
-
|
|
23927
|
-
|
|
23928
|
-
|
|
23929
|
-
|
|
23930
|
-
|
|
23931
|
-
|
|
23932
|
-
|
|
23933
|
-
|
|
23934
|
-
|
|
23935
|
-
|
|
24093
|
+
if (child.cleanupConfirmed) await closeRetainedSlot(child, "released", prior);
|
|
24094
|
+
}
|
|
24095
|
+
});
|
|
24096
|
+
const closeRetainedSlot = async (child, state, prior) => {
|
|
24097
|
+
if (child.recoveryPending !== true || child.resolved?.kind !== "down" || child.settledSeq === void 0 || child.settledAt === void 0 || child.retainedExecution === "released" || child.retainedExecution === "release-unconfirmed" || prior.some((event) => event.id === child.id && closesCursorSlot(event))) return;
|
|
24098
|
+
child.budgetViolation = child.retainedViolation;
|
|
24099
|
+
const settledAt = child.settledAt;
|
|
24100
|
+
let settlement = child.resolved;
|
|
24101
|
+
if (settlement.harnessTranscript?.status !== "available" && child.readTranscriptAtRelease) {
|
|
24102
|
+
const atRelease = await child.readTranscriptAtRelease();
|
|
24103
|
+
if (atRelease.status === "available") settlement = {
|
|
24104
|
+
...settlement,
|
|
24105
|
+
harnessTranscript: atRelease
|
|
24106
|
+
};
|
|
24107
|
+
}
|
|
24108
|
+
await args.journal.appendEvent(args.root, terminalDownEvent(child, settlement, child.settledSeq, new Date(settledAt).toISOString(), state));
|
|
24109
|
+
child.retainedExecution = state;
|
|
24110
|
+
const closedAt = now();
|
|
24111
|
+
notifyRuntimeHookEvent(args.hooks, {
|
|
24112
|
+
id: `${child.id}:${state}`,
|
|
24113
|
+
runId: args.root,
|
|
24114
|
+
target: "agent.child",
|
|
24115
|
+
phase: "after",
|
|
24116
|
+
timestamp: closedAt,
|
|
24117
|
+
stepIndex: child.settledSeq,
|
|
24118
|
+
parentId: args.parentId,
|
|
24119
|
+
payload: releasedChildPayload(child, settlement, settledAt, closedAt, state)
|
|
24120
|
+
}, { signal: args.signal });
|
|
24121
|
+
};
|
|
24122
|
+
retainedSlotClosers.set(scope, async () => {
|
|
24123
|
+
for (const child of children.values()) {
|
|
24124
|
+
const nested = child.readNestedScope?.();
|
|
24125
|
+
if (nested !== void 0) await closeRetainedSlots(nested);
|
|
23936
24126
|
}
|
|
24127
|
+
const open = [...children.values()].filter((child) => child.recoveryPending === true && !child.cleanupConfirmed && isTerminalNodeStatus(child.status) && child.retainedExecution !== "released" && child.retainedExecution !== "release-unconfirmed");
|
|
24128
|
+
if (open.length === 0) return;
|
|
24129
|
+
const prior = await args.journal.loadTree(args.root) ?? [];
|
|
24130
|
+
for (const child of open) await closeRetainedSlot(child, "release-unconfirmed", prior);
|
|
23937
24131
|
});
|
|
23938
24132
|
registerScopeRetainedOwner(scope, {
|
|
23939
24133
|
rootId: args.root,
|
|
@@ -26501,6 +26695,7 @@ function createSupervisor() {
|
|
|
26501
26695
|
seq: teardownSeq++,
|
|
26502
26696
|
at: new Date(now()).toISOString()
|
|
26503
26697
|
});
|
|
26698
|
+
if (releasing) await closeRetainedSlots(openScope);
|
|
26504
26699
|
} catch (error) {
|
|
26505
26700
|
if (actOutcome?.ok !== false) actOutcome = {
|
|
26506
26701
|
ok: false,
|
|
@@ -26917,13 +27112,16 @@ function fleetYieldFromForest(forest) {
|
|
|
26917
27112
|
const spawned = /* @__PURE__ */ new Set();
|
|
26918
27113
|
const terminal = /* @__PURE__ */ new Map();
|
|
26919
27114
|
const released = /* @__PURE__ */ new Set();
|
|
27115
|
+
const unconfirmed = /* @__PURE__ */ new Set();
|
|
26920
27116
|
for (const { event } of forest.events) if (event.kind === "spawned") {
|
|
26921
27117
|
if (event.parent !== void 0) spawned.add(event.id);
|
|
26922
27118
|
} else if (event.kind === "settled" || event.kind === "cancelled") {
|
|
26923
27119
|
const bucket = event.kind === "cancelled" ? "cancelled" : event.status;
|
|
26924
27120
|
terminal.set(event.id, bucket);
|
|
26925
|
-
|
|
26926
|
-
|
|
27121
|
+
released.delete(event.id);
|
|
27122
|
+
unconfirmed.delete(event.id);
|
|
27123
|
+
if (bucket !== "done" && event.retainedExecution === "released") released.add(event.id);
|
|
27124
|
+
if (bucket !== "done" && event.retainedExecution === "release-unconfirmed") unconfirmed.add(event.id);
|
|
26927
27125
|
}
|
|
26928
27126
|
const count = (bucket) => [...terminal.values()].filter((value) => value === bucket).length;
|
|
26929
27127
|
const fleetYield = {
|
|
@@ -26932,10 +27130,11 @@ function fleetYieldFromForest(forest) {
|
|
|
26932
27130
|
down: count("down"),
|
|
26933
27131
|
cancelled: count("cancelled"),
|
|
26934
27132
|
neverSettled: forest.inDoubt.length,
|
|
26935
|
-
releasedUnrecovered: released.size
|
|
27133
|
+
releasedUnrecovered: released.size,
|
|
27134
|
+
releaseUnconfirmed: unconfirmed.size
|
|
26936
27135
|
};
|
|
26937
27136
|
if (fleetYield.done + fleetYield.down + fleetYield.cancelled + fleetYield.neverSettled !== fleetYield.spawned) throw new RuntimeRunStateError(`supervisor: fleet yield does not partition the spawned children of '${forest.root}' (${JSON.stringify(fleetYield)})`);
|
|
26938
|
-
if (fleetYield.releasedUnrecovered > fleetYield.down + fleetYield.cancelled) throw new RuntimeRunStateError(`supervisor: released children exceed down + cancelled for '${forest.root}' (${JSON.stringify(fleetYield)})`);
|
|
27137
|
+
if (fleetYield.releasedUnrecovered + fleetYield.releaseUnconfirmed > fleetYield.down + fleetYield.cancelled) throw new RuntimeRunStateError(`supervisor: released children exceed down + cancelled for '${forest.root}' (${JSON.stringify(fleetYield)})`);
|
|
26939
27138
|
return fleetYield;
|
|
26940
27139
|
}
|
|
26941
27140
|
/** The journaled nodes whose usage accounting is incomplete — one `SpendGap` per node+kind,
|
|
@@ -27000,6 +27199,6 @@ function isNonEmptySpend(s) {
|
|
|
27000
27199
|
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);
|
|
27001
27200
|
}
|
|
27002
27201
|
//#endregion
|
|
27003
|
-
export { interactiveAdmissionSeamKey as $,
|
|
27202
|
+
export { interactiveAdmissionSeamKey as $, sumSandboxUsage as $i, recoverRetainedRun as $n, controlProfileMaterialization as $r, taskToPrompt as $t, restoreScopeOwnerAcceptedExecution as A, runtimeOwnedExecutorMaterialization as Ai, acquireSandbox as An, padSpanId as Ar, insideCursorNamespace as At, bindScopeRetainedOwnerEnvironmentId as B, projectSandboxOutcome as Bi, providerAsExecutor as Bn, captureWorktreeDiff as Br, BudgetReconcileFault as Bt, beginScopeOwnerAttempt as C, teardownExecutor as Ca, knownExecutionBindingReceipt as Ci, TERMINAL_DECISIONS as Cn, buildRuntimeEventOtelSpans as Cr, FileResultBlobStore as Ct, meterRuntimeOwnedProviderAttempt as D, providerMessageText as Da, recordRuntimeOwnedDriveHarnessProviderEvidence as Di, runAgentRounds as Dn, flatOtelSpan as Dr, SpawnEventIndex as Dt, meterRuntimeOwnedAccounting as E, promptOptionsFromAgentTurnInput as Ea, providerAttemptEvidence as Ei, isTerminalDecision as En, exportEvalRuns as Er, InMemorySpawnJournal as Et, isWaitOutcome as F, unknownMaterializationReceipt as Fi, canonicalObservedModelParts as Fn, sanitizeAgentRuntimeEvent as Fr, WORKER_TOOL_TRACE_SCHEMA_VERSION as Ft, scopeRetainedOwnerContext as G, createSandboxUsageLedger as Gi, unavailableSignalOfFailure as Gn, harnessInvocation as Gr, newUsageTotals as Gt, consumeScopeRetainedOwnerResult as H, assertSandboxServedModel as Hi, resolveAgentEnvironmentProvider as Hn, removeWorktree as Hr, assertValidBudget as Ht, pollFor as I, executableAgentProfileSnapshot as Ii, observedModelMatchesDeclared as In, sanitizeKnowledgeReadinessReport as Ir, captureWorkerTraceEvidence as It, scopeRetainedOwnerResult as J, mapSandboxEvent as Ji, sandboxSessionTraceSource as Jn, parseCodexTokenUsage as Jr, WORKER_TRACE_PROPAGATION as Jt, scopeRetainedOwnerPriorSpend as K, extractLlmCallEvent as Ki, createPushTraceSource as Kn, harnessSupportsReasoningEffort as Kr, spendFromUsageEvents as Kt, timerAt as L, executableAgentSpecSnapshot as Li, DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS as Ln, sanitizeRuntimeStreamEvent as Lr, isTraceAnalysisStore as Lt, settledToIteration as M, runtimeOwnedPendingExecutorMaterialization as Mi, readPromptOptions as Mn, toOtelAttributes as Mr, materializeTreeView as Mt, createWorkerSlots as N, runtimeOwnedScopeOwnerRuntime as Ni, routerBrain as Nn, createRuntimeEventCollector as Nr, pendingWaits as Nt, recordScopeOwnerMaterialization as O, runtimeOwnedDriveHarnessProviderEvidence as Oi, createSandboxLineage as On, generateSpanId as Or, assertContentAddress as Ot, createWaitProbes as P, unknownExecutionBindingReceipt as Pi, runBrainLoop as Pn, createRuntimeStreamEventCollector as Pr, replaySpawnTree as Pt, resolveSpawnResourcePaths as Q, sandboxProgressEvents as Qi, reconnectRetainedRun as Qn, assertProfileMaterialization as Qr, workerTraceSeamKey as Qt, validateWaitSpec as R, detachedFrozen as Ri, LEAF_CONTINUATION_TASK as Rn, runSettledCommand as Rr, parseWorkerToolTraceArtifact as Rt, assertRecursiveReservationPolicy as S, armDeadlineTimer as Sa, inheritRuntimeOwnedExecutorAttestation as Si, bridgeStopSignalKey as Sn, buildLoopSpanNodes as Sr, createInPlaceCliExecutor as St, deriveNodeExecutionIdentity as T, promptFromAgentTurnInput as Ta, newExecutionAttemptId as Ti, defaultSelectWinner as Tn, createOtelExporter as Tr, InMemoryResultBlobStore as Tt, prepareScopeRetainedOwnerTask as U, canonicalStreamEventFromSandboxEvent as Ui, sandboxClientAsProvider as Un, DEFAULT_LOCAL_HARNESS as Ur, createBudgetPool as Ut, bindScopeRetainedOwnerProvider as V, readSandboxOutcome as Vi, providerAsSandboxClient as Vn, createWorktree as Vr, ReservationWaitRefused as Vt, reconcileScopeRetainedOwnerEnvironment as W, createSandboxToolPartState as Wi, unavailablePauseMs as Wn, LOCAL_HARNESSES as Wr, meterUsageEvent as Wt, environmentReader as X, notifySandboxEventObserver as Xi, retainedExecutorSeamKey as Xn, terminateProcessTreeAndConfirm as Xr, workerTraceEnv as Xt, SPAWN_RESOURCE_PATH_MAX_BYTES as Y, mapSandboxToolEvent as Yi, registerRetainedExecutorPreparation as Yn, CodexExecutionDiagnosticError as Yr, readWorkerTraceContext as Yt, hostDirectoryReader as Z, sandboxEventServedBackend as Zi, errMessage as Zn, AGENT_PROFILE_MATERIALIZATION_AXES as Zr, workerTraceHeaders as Zt, driverChild as _, withBudgetResources as _a, writeAllBytes as _i, addHarnessUsage as _n, mergeTraceEnv as _r, createExecutorRegistry as _t, collectDelivered as a, isAbortError$2 as aa, promptOnlyProfileMaterialization as ai, DEFAULT_PEER_MAIL_LIMITS as an, RunCancellationReason as ar, workerInteractiveBindingsDir as at, withDriverExecutor as b, awaitAbortable$1 as ba, authoredProfileDigest as bi, readCodexRolloutSession as bn, INTELLIGENCE_WIRE_VERSION as br, DEFAULT_SANDBOX_STEERING_MAX_TURNS as bt, runTree as c, sleep as ca, renderUnsupported as ci, createPeerMailbox as cn, runAbortable as cr, startRetainedInteractiveRun as ct, HarnessTurnFailedError as d, throwIfAborted as da, validateProfileMaterialization as di, peerMailVerbNames as dn, resolveRedactor as dr, rollingDispatch as dt, addSpend as ea, defineProfileMaterializationContract as ei, DEFAULT_STALL_AFTER_MS as en, startRetainedRun as er, readWorkerInteractiveAdmissions as et, classifyDriverFailure as f, unmeteredSpend as fa, worktreeCliProfileMaterialization as fi, isLiveNodeStatus as fn, captureHarnessTranscript as fr, bindReusableExecutorExecutionId as ft, upstreamUnavailableSignal as g, resourceTelemetry as ga, readCommittedJsonLines as gi, bridgeModelRouteRefusal as gn, createPropagatingTraceEmitter as gr, createExecutor as gt, summarizeDriverAttempts as h, addResourceSpend as ha, prepareJsonlAppend as hi, bridgeAdmissionRefusal as hn, contentAddress as hr, cliWorktreeExecutor as ht, bestDelivered as i, hasCompleteCacheBreakdown as ia, promptModelProfileMaterialization as ii, AUTHORITY_MARKERS as in, environmentGone as ir, workerInteractiveBindingFile as it, scopeOwnerExecutorNodeContext as j, runtimeOwnedExecutorProviderEvidence as ji, assertBoxlessPromptOptions as jn, padTraceId as jr, loadSpawnForest as jt, recordScopeOwnerPause as k, runtimeOwnedExecutorExecutionBinding as ki, probeSandboxCapabilities as kn, loopEventToOtelSpan as kr, encodeResultBlob as kt, DEFAULT_MAX_BARREN_REPROMPTS as l, stringifySafe as la, sandboxActProfileMaterialization as li, isPeerMailEnvelope as ln, defaultRedactor as lr, freeSlots as lt, runDriverWithRetry as m, zeroSpend as ma, parseCommittedJsonLines as mi, executorFailure as mn, persistHarnessTranscript as mr, cliInPlaceExecutor as mt, createRootHandle as n, cloneSpend as na, profileMaterializationAxes$1 as ni, readWorkerProgress as nn, retainedCreateMaterial as nr, attachWorker as nt, pickBestDelivered as o, promptCacheTokenClasses as oa, promptResourceProfileMaterialization as oi, PEER_MAIL_WIRE_KEY as on, abortError as or, reconnectRetainedInteractiveRun as ot, defaultUnmetContractSteer as p, withTimeout as pa, isNoEntError as pi, isTerminalNodeStatus as pn, harnessTranscriptArtifact as pr, captureReusableExecutorConfig as pt, scopeRetainedOwnerResourceReader as q, isSandboxTerminalEvent as qi, decodeToolPart as qn, localHarnessExecutable as qr, spendFromUsageTotals as qt, createSupervisor as r, deleteBoxSafe as ra, promptControlProfileMaterialization as ri, createInbox as rn, destroyInteractiveEnvironment as rr, readWorkerInteractiveBinding as rt, runFinalizer as s, randomSuffix as sa, renderProfileMaterializationIssues as si, claimsAuthority as sn, linkAbort as sr, recoverRetainedInteractiveRun as st, DEFAULT_MAX_DEPTH as t, chargedTokens as ta, fullProfileMaterialization as ti, createActivityLog as tn, startRetainedRunInEnvironment as tr, workerInteractiveAdmissionFile as tt, DriverAttemptsExhaustedError as u, throwAbort as ua, unsupportedProfileDimensions as ui, peerMailTools as un, defaultRedactorIdentityMaterial as ur, queueOf as ut, driverExecutorFactory as v, decodeHarnessUsage as va, attestRuntimeOwnedPendingExecutor as vi, createCodexRolloutStoreReader as vn, readTraceContextFromEnv as vr, snapshotExecutorConfig as vt, createScope as w, teardownSurfaces as wa, knownMaterializationReceipt as wi, createSandboxForSpec as wn, createOpenInferenceFileExporter as wr, FileSpawnJournal as wt, SUBTREE_RESULT_LIMIT as x, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as xa, finalizeRuntimeOwnedPendingExecutor as xi, bridgeRuntimeAttachmentsKey as xn, buildLoopOtelSpans as xr, createSteerableSandboxSession as xt, isDriverSpec as y, abortError$2 as ya, attestRuntimeOwnedScopeOwner as yi, harnessUsageIsEmpty as yn, traceContextToEnv as yr, createWorktreeCliExecutor as yt, waitUntil as z, detachedSnapshot as zi, createAgentEnvironmentProviderRegistry as zn, runWorktreeHarness as zr, workerTraceAnalysisStore as zt };
|
|
27004
27203
|
|
|
27005
|
-
//# sourceMappingURL=supervisor-
|
|
27204
|
+
//# sourceMappingURL=supervisor-Cvd5mf7x.js.map
|