@tangle-network/agent-runtime 0.328.0 → 0.330.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-CZRtcDPo.d.ts → activation-Clj_x12h.d.ts} +2 -2
- package/dist/{activation-DfhOPF9_.js → activation-CrFcC-Sq.js} +2 -2
- package/dist/{activation-DfhOPF9_.js.map → activation-CrFcC-Sq.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-B7Z9jgFr.js → coordination-driver-C_uWKMgC.js} +81 -21
- package/dist/coordination-driver-C_uWKMgC.js.map +1 -0
- package/dist/{delegate-By9tikQT.js → delegate-CLMdrQh2.js} +2 -2
- package/dist/{delegate-By9tikQT.js.map → delegate-CLMdrQh2.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +3 -3
- package/dist/{graph-0iL-4gj2.js → graph-D0EkipP8.js} +4 -4
- package/dist/{graph-0iL-4gj2.js.map → graph-D0EkipP8.js.map} +1 -1
- package/dist/{improvement-cycle-sd7Y_buy.js → improvement-cycle-DD_Vplop.js} +3 -3
- package/dist/{improvement-cycle-sd7Y_buy.js.map → improvement-cycle-DD_Vplop.js.map} +1 -1
- 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 +2 -2
- package/dist/kernel.js +8 -8
- package/dist/{loop-runner-bin-CNmBGFAu.js → loop-runner-bin-DNYj9kk7.js} +3 -3
- package/dist/{loop-runner-bin-CNmBGFAu.js.map → loop-runner-bin-DNYj9kk7.js.map} +1 -1
- package/dist/{loop-runner-bin-DDz4VTyE.d.ts → loop-runner-bin-DSOzyQnW.d.ts} +2 -2
- 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 +3 -3
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-B3Z4i5_B.d.ts → openai-tools-CsqdULKE.d.ts} +2 -2
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-CCoerJyv.js → provision-supervisor-tHY0kh2t.js} +3 -3
- package/dist/{provision-supervisor-CCoerJyv.js.map → provision-supervisor-tHY0kh2t.js.map} +1 -1
- package/dist/{runtime-CYjHXjec.js → runtime-BnY1mLgV.js} +8 -8
- package/dist/{runtime-CYjHXjec.js.map → runtime-BnY1mLgV.js.map} +1 -1
- package/dist/{search-executor-BgMpZuhl.js → search-executor-BeRAutxm.js} +2 -2
- package/dist/{search-executor-BgMpZuhl.js.map → search-executor-BeRAutxm.js.map} +1 -1
- package/dist/{server-Czsqviqu.js → server-W0_4mp2S.js} +3 -3
- package/dist/{server-Czsqviqu.js.map → server-W0_4mp2S.js.map} +1 -1
- package/dist/{supervise-9WPjMFrH.js → supervise-BZFnOpzd.js} +74 -11
- package/dist/supervise-BZFnOpzd.js.map +1 -0
- package/dist/{supervisor-hIpqcCJr.js → supervisor-6t1YG2PP.js} +77 -25
- package/dist/supervisor-6t1YG2PP.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +12 -12
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-0czU5q4A.d.ts → types-B5Bs5Dav.d.ts} +70 -2
- package/package.json +1 -1
- package/dist/coordination-driver-B7Z9jgFr.js.map +0 -1
- package/dist/supervise-9WPjMFrH.js.map +0 -1
- package/dist/supervisor-hIpqcCJr.js.map +0 -1
|
@@ -2066,6 +2066,7 @@ function materializeTreeView(events) {
|
|
|
2066
2066
|
...ev.ownedTreeRoot === void 0 ? {} : { ownedTreeRoot: ev.ownedTreeRoot },
|
|
2067
2067
|
...ev.assignmentId === void 0 ? {} : { assignmentId: ev.assignmentId },
|
|
2068
2068
|
...ev.identity ? { identity: ev.identity } : {},
|
|
2069
|
+
...ev.modelSubstitution ? { modelSubstitution: ev.modelSubstitution } : {},
|
|
2069
2070
|
...Number.isFinite(Date.parse(ev.at)) ? { spawnedAt: Date.parse(ev.at) } : {},
|
|
2070
2071
|
spent: zeroSpend()
|
|
2071
2072
|
});
|
|
@@ -2171,6 +2172,7 @@ function freezeSnapshot(node) {
|
|
|
2171
2172
|
ownedTreeRoot: node.ownedTreeRoot,
|
|
2172
2173
|
assignmentId: node.assignmentId,
|
|
2173
2174
|
identity: node.identity,
|
|
2175
|
+
modelSubstitution: node.modelSubstitution,
|
|
2174
2176
|
materialization: node.materialization,
|
|
2175
2177
|
executionBindings: node.executionBindings === void 0 ? void 0 : Object.freeze([...node.executionBindings]),
|
|
2176
2178
|
spent: node.spent,
|
|
@@ -2359,7 +2361,7 @@ function assertRuntimeTimestamp(value, label) {
|
|
|
2359
2361
|
const harnessNativePayloadType = "raw";
|
|
2360
2362
|
/** Parse canonical payload fields without treating transport identity as event data. */
|
|
2361
2363
|
function parseCanonicalTransportEvent(type, data, normalized, source) {
|
|
2362
|
-
if (!isRecord$
|
|
2364
|
+
if (!isRecord$4(data)) throw new Error(`${source} emitted a canonical event without an object payload`);
|
|
2363
2365
|
const outerType = String(type ?? "");
|
|
2364
2366
|
const harnessNative = outerType === harnessNativePayloadType;
|
|
2365
2367
|
if (normalized !== void 0) {
|
|
@@ -2381,10 +2383,10 @@ function parseCanonicalTransportEvent(type, data, normalized, source) {
|
|
|
2381
2383
|
}
|
|
2382
2384
|
/** Extract shared event identity without privileging one provider wire shape. */
|
|
2383
2385
|
function extractTransportEventIdentity(event) {
|
|
2384
|
-
const record = isRecord$
|
|
2385
|
-
const data = isRecord$
|
|
2386
|
-
const providerEvent = isRecord$
|
|
2387
|
-
const providerData = isRecord$
|
|
2386
|
+
const record = isRecord$4(event) ? event : {};
|
|
2387
|
+
const data = isRecord$4(record.data) ? record.data : {};
|
|
2388
|
+
const providerEvent = isRecord$4(record.providerEvent) ? record.providerEvent : {};
|
|
2389
|
+
const providerData = isRecord$4(providerEvent.data) ? providerEvent.data : {};
|
|
2388
2390
|
const eventId = canonicalEventId(record, data, providerEvent, providerData);
|
|
2389
2391
|
const cursor = stableString(record.cursor ?? data.cursor ?? providerEvent.cursor ?? providerData.cursor);
|
|
2390
2392
|
const sequence = optionalSequence(record.sequence ?? data.sequence ?? providerEvent.sequence ?? providerData.sequence);
|
|
@@ -2432,7 +2434,7 @@ function optionalTimestamp(value) {
|
|
|
2432
2434
|
assertRuntimeTimestamp(value, "occurredAt");
|
|
2433
2435
|
return value;
|
|
2434
2436
|
}
|
|
2435
|
-
function isRecord$
|
|
2437
|
+
function isRecord$4(value) {
|
|
2436
2438
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2437
2439
|
}
|
|
2438
2440
|
//#endregion
|
|
@@ -4181,9 +4183,9 @@ async function exactSessionResult(session) {
|
|
|
4181
4183
|
return session.result();
|
|
4182
4184
|
}
|
|
4183
4185
|
function assertEventBinding(source, controlRef) {
|
|
4184
|
-
const transport = isRecord$
|
|
4185
|
-
const payload = isRecord$
|
|
4186
|
-
const providerEvent = isRecord$
|
|
4186
|
+
const transport = isRecord$3(source) ? source : void 0;
|
|
4187
|
+
const payload = isRecord$3(source.data) ? source.data : void 0;
|
|
4188
|
+
const providerEvent = isRecord$3(source.providerEvent) ? source.providerEvent : void 0;
|
|
4187
4189
|
const bindings = [
|
|
4188
4190
|
{
|
|
4189
4191
|
value: transport,
|
|
@@ -4211,7 +4213,7 @@ function assertCanonicalEventBinding(controlRef, event) {
|
|
|
4211
4213
|
const binding = event.request.binding;
|
|
4212
4214
|
if (binding.runId !== controlRef.runId || binding.environmentId !== controlRef.environmentId || binding.sessionId !== controlRef.sessionId || binding.executionId !== controlRef.executionId || binding.interactionId !== event.request.id) throw new Error("provider returned an interaction for another retained execution");
|
|
4213
4215
|
}
|
|
4214
|
-
function isRecord$
|
|
4216
|
+
function isRecord$3(value) {
|
|
4215
4217
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4216
4218
|
}
|
|
4217
4219
|
function assertStableText(value, label) {
|
|
@@ -4618,13 +4620,14 @@ function knownExecutionBindingReceipt(materialization, bindingInput) {
|
|
|
4618
4620
|
});
|
|
4619
4621
|
}
|
|
4620
4622
|
/** Preserve an attempt boundary even when its caller-owned transport cannot be attested. */
|
|
4621
|
-
function unknownExecutionBindingReceipt(materialization, attemptId, reason) {
|
|
4623
|
+
function unknownExecutionBindingReceipt(materialization, attemptId, reason, execution) {
|
|
4622
4624
|
assertNonEmpty(attemptId, "binding.attemptId");
|
|
4623
4625
|
return Object.freeze({
|
|
4624
4626
|
status: "unknown",
|
|
4625
4627
|
attemptId,
|
|
4626
4628
|
materializationReceiptDigest: canonicalCandidateDigest(materialization),
|
|
4627
|
-
reason
|
|
4629
|
+
reason,
|
|
4630
|
+
...execution === void 0 ? {} : { execution: Object.freeze({ ...execution }) }
|
|
4628
4631
|
});
|
|
4629
4632
|
}
|
|
4630
4633
|
/** Derive an authored-profile digest without turning non-canonical input into a fake identity. */
|
|
@@ -5928,13 +5931,13 @@ function normalizeCodexDebugPromptNewlines(value) {
|
|
|
5928
5931
|
function jsonTextContains(value, needle) {
|
|
5929
5932
|
if (typeof value === "string") return value.includes(needle);
|
|
5930
5933
|
if (Array.isArray(value)) return value.some((item) => jsonTextContains(item, needle));
|
|
5931
|
-
if (isRecord$
|
|
5934
|
+
if (isRecord$2(value)) return Object.values(value).some((item) => jsonTextContains(item, needle));
|
|
5932
5935
|
return false;
|
|
5933
5936
|
}
|
|
5934
5937
|
function redactJsonText(value, text) {
|
|
5935
5938
|
if (typeof value === "string") return value.replaceAll(text, "");
|
|
5936
5939
|
if (Array.isArray(value)) return value.map((item) => redactJsonText(item, text));
|
|
5937
|
-
if (isRecord$
|
|
5940
|
+
if (isRecord$2(value)) return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, redactJsonText(item, text)]));
|
|
5938
5941
|
return value;
|
|
5939
5942
|
}
|
|
5940
5943
|
const CODEX_AUTH_ENV = [
|
|
@@ -6281,11 +6284,11 @@ function parseCodexTokenUsage(stdout) {
|
|
|
6281
6284
|
} catch {
|
|
6282
6285
|
throw new ValidationError$1(`runLocalHarness: Codex JSONL line ${index + 1} is not valid JSON`);
|
|
6283
6286
|
}
|
|
6284
|
-
if (isRecord$
|
|
6287
|
+
if (isRecord$2(event) && event.type === "turn.completed") completed.push(event);
|
|
6285
6288
|
}
|
|
6286
6289
|
if (completed.length !== 1) throw new ValidationError$1(`runLocalHarness: expected exactly one Codex turn.completed usage event, received ${completed.length}`);
|
|
6287
6290
|
const event = completed[0];
|
|
6288
|
-
if (!isRecord$
|
|
6291
|
+
if (!isRecord$2(event) || !isRecord$2(event.usage)) throw new ValidationError$1("runLocalHarness: Codex turn.completed event is missing usage");
|
|
6289
6292
|
const record = parseCodexUsageRecord(event.usage, "runLocalHarness: Codex");
|
|
6290
6293
|
return {
|
|
6291
6294
|
inputTokens: record.inputTokens,
|
|
@@ -6295,7 +6298,7 @@ function parseCodexTokenUsage(stdout) {
|
|
|
6295
6298
|
...record.cacheWriteInputTokens === void 0 ? {} : { cacheWriteInputTokens: record.cacheWriteInputTokens }
|
|
6296
6299
|
};
|
|
6297
6300
|
}
|
|
6298
|
-
function isRecord$
|
|
6301
|
+
function isRecord$2(value) {
|
|
6299
6302
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
6300
6303
|
}
|
|
6301
6304
|
//#endregion
|
|
@@ -14775,7 +14778,7 @@ function chatCompletionBody(cfg, messages, opts) {
|
|
|
14775
14778
|
const maxTokens = opts?.maxTokens ?? cfg.maxTokens;
|
|
14776
14779
|
const maxCompletionTokens = opts?.maxCompletionTokens ?? cfg.maxCompletionTokens;
|
|
14777
14780
|
return {
|
|
14778
|
-
...providerRequestExtras(opts?.extraBody, [
|
|
14781
|
+
...withRouting(providerRequestExtras(opts?.extraBody, [
|
|
14779
14782
|
"model",
|
|
14780
14783
|
"messages",
|
|
14781
14784
|
"temperature",
|
|
@@ -14785,7 +14788,7 @@ function chatCompletionBody(cfg, messages, opts) {
|
|
|
14785
14788
|
"reasoning_effort",
|
|
14786
14789
|
"stream",
|
|
14787
14790
|
"stream_options"
|
|
14788
|
-
]),
|
|
14791
|
+
]), cfg.routing),
|
|
14789
14792
|
model: cfg.model,
|
|
14790
14793
|
messages,
|
|
14791
14794
|
...temperature !== void 0 ? { temperature } : {},
|
|
@@ -14911,7 +14914,7 @@ async function routerChatWithTools(cfg, messages, tools, opts) {
|
|
|
14911
14914
|
function toolCompletionBody(cfg, messages, tools, opts) {
|
|
14912
14915
|
const maxCompletionTokens = opts?.maxCompletionTokens ?? cfg.maxCompletionTokens;
|
|
14913
14916
|
return {
|
|
14914
|
-
...providerRequestExtras(opts?.extraBody, [
|
|
14917
|
+
...withRouting(providerRequestExtras(opts?.extraBody, [
|
|
14915
14918
|
"model",
|
|
14916
14919
|
"messages",
|
|
14917
14920
|
"tools",
|
|
@@ -14923,7 +14926,7 @@ function toolCompletionBody(cfg, messages, tools, opts) {
|
|
|
14923
14926
|
"reasoning_effort",
|
|
14924
14927
|
"stream",
|
|
14925
14928
|
"stream_options"
|
|
14926
|
-
]),
|
|
14929
|
+
]), cfg.routing),
|
|
14927
14930
|
model: cfg.model,
|
|
14928
14931
|
messages,
|
|
14929
14932
|
...tools.length > 0 ? {
|
|
@@ -14940,6 +14943,29 @@ function toolCompletionBody(cfg, messages, tools, opts) {
|
|
|
14940
14943
|
...opts?.reasoningEffort ? { reasoning_effort: opts.reasoningEffort } : {}
|
|
14941
14944
|
};
|
|
14942
14945
|
}
|
|
14946
|
+
/** The request extras with the transport's provider routing merged into `providerOptions`. */
|
|
14947
|
+
function withRouting(extras, routing) {
|
|
14948
|
+
if (routing === void 0) return extras;
|
|
14949
|
+
const gateway = {
|
|
14950
|
+
...routing.only !== void 0 ? { only: [...routing.only] } : {},
|
|
14951
|
+
...routing.allowFallbacks !== void 0 ? { allowFallbacks: routing.allowFallbacks } : {}
|
|
14952
|
+
};
|
|
14953
|
+
const providerOptions = isRecord$1(extras.providerOptions) ? extras.providerOptions : {};
|
|
14954
|
+
return {
|
|
14955
|
+
...extras,
|
|
14956
|
+
...Object.keys(gateway).length === 0 ? {} : { providerOptions: {
|
|
14957
|
+
...providerOptions,
|
|
14958
|
+
gateway: {
|
|
14959
|
+
...isRecord$1(providerOptions.gateway) ? providerOptions.gateway : {},
|
|
14960
|
+
...gateway
|
|
14961
|
+
}
|
|
14962
|
+
} },
|
|
14963
|
+
...routing.requireModel !== void 0 ? { require_model: routing.requireModel } : {}
|
|
14964
|
+
};
|
|
14965
|
+
}
|
|
14966
|
+
function isRecord$1(value) {
|
|
14967
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
14968
|
+
}
|
|
14943
14969
|
function providerRequestExtras(extraBody, reservedFields) {
|
|
14944
14970
|
if (!extraBody) return {};
|
|
14945
14971
|
const extras = { ...extraBody };
|
|
@@ -21037,6 +21063,7 @@ const routerInlineExecutor = (spec, ctx) => {
|
|
|
21037
21063
|
const r = await runRouterTransport("routerInlineExecutor", () => seam.tools ? (profileExecution.stream === true ? streamRouterChatWithTools : routerChatWithTools)({
|
|
21038
21064
|
routerBaseUrl: seam.routerBaseUrl,
|
|
21039
21065
|
routerKey: seam.routerKey,
|
|
21066
|
+
...seam.routing ? { routing: seam.routing } : {},
|
|
21040
21067
|
model,
|
|
21041
21068
|
...profileExecution.retry !== void 0 ? { retry: profileExecution.retry } : {},
|
|
21042
21069
|
...seam.complete ? { complete: seam.complete } : {}
|
|
@@ -21052,6 +21079,7 @@ const routerInlineExecutor = (spec, ctx) => {
|
|
|
21052
21079
|
}) : (profileExecution.stream === true ? streamRouterChatWithUsage : routerChatWithUsage)({
|
|
21053
21080
|
routerBaseUrl: seam.routerBaseUrl,
|
|
21054
21081
|
routerKey: seam.routerKey,
|
|
21082
|
+
...seam.routing ? { routing: seam.routing } : {},
|
|
21055
21083
|
model,
|
|
21056
21084
|
...profileExecution.retry !== void 0 ? { retry: profileExecution.retry } : {},
|
|
21057
21085
|
...seam.complete ? { complete: seam.complete } : {}
|
|
@@ -21224,6 +21252,7 @@ const routerToolsInlineExecutor = (spec, ctx) => {
|
|
|
21224
21252
|
const profileExecution = routerProfileExecution(spec.profile, {
|
|
21225
21253
|
routerBaseUrl: seam.routerBaseUrl,
|
|
21226
21254
|
routerKey: seam.routerKey,
|
|
21255
|
+
...seam.routing ? { routing: seam.routing } : {},
|
|
21227
21256
|
...seam.complete ? { complete: seam.complete } : {},
|
|
21228
21257
|
tools: seam.tools
|
|
21229
21258
|
}, { multiTurn: true });
|
|
@@ -21336,6 +21365,7 @@ const routerToolsInlineExecutor = (spec, ctx) => {
|
|
|
21336
21365
|
res = await (profileExecution.stream === true ? streamRouterChatWithTools : routerChatWithTools)({
|
|
21337
21366
|
routerBaseUrl: seam.routerBaseUrl,
|
|
21338
21367
|
routerKey: seam.routerKey,
|
|
21368
|
+
...seam.routing ? { routing: seam.routing } : {},
|
|
21339
21369
|
model,
|
|
21340
21370
|
...profileExecution.retry !== void 0 ? { retry: profileExecution.retry } : {},
|
|
21341
21371
|
...seam.complete ? { complete: seam.complete } : {}
|
|
@@ -27704,11 +27734,13 @@ function createScope(args) {
|
|
|
27704
27734
|
const executor = resolved.value(spec, ctx);
|
|
27705
27735
|
const ownedTreeRoot = runtimeOwnedNestedDriverTreeRoot(executor, args.root, id);
|
|
27706
27736
|
if (recovery && (!executor.recover || executor.runtime !== recovery.spawned.runtime || ownedTreeRoot !== recovery.spawned.ownedTreeRoot)) throw new ValidationError$1("scope recovery executor does not preserve its runtime, recovery method, or owned tree");
|
|
27737
|
+
const modelSubstitution = recovery ? recovery.spawned.modelSubstitution : spec.modelSubstitution;
|
|
27707
27738
|
const handle = {
|
|
27708
27739
|
id,
|
|
27709
27740
|
label: opts.label,
|
|
27710
27741
|
...opts.assignmentId === void 0 ? {} : { assignmentId: opts.assignmentId },
|
|
27711
27742
|
...identity ? { identity } : {},
|
|
27743
|
+
...modelSubstitution === void 0 ? {} : { modelSubstitution },
|
|
27712
27744
|
get status() {
|
|
27713
27745
|
return children.get(id)?.status ?? "cancelled";
|
|
27714
27746
|
},
|
|
@@ -27733,6 +27765,7 @@ function createScope(args) {
|
|
|
27733
27765
|
runtime: executor.runtime,
|
|
27734
27766
|
...ownedTreeRoot === void 0 ? {} : { ownedTreeRoot },
|
|
27735
27767
|
...identity ? { identity } : {},
|
|
27768
|
+
...modelSubstitution === void 0 ? {} : { modelSubstitution },
|
|
27736
27769
|
budget: opts.budget,
|
|
27737
27770
|
label: opts.label,
|
|
27738
27771
|
...opts.assignmentId === void 0 ? {} : { assignmentId: opts.assignmentId },
|
|
@@ -27793,6 +27826,7 @@ function createScope(args) {
|
|
|
27793
27826
|
...ownedTreeRoot === void 0 ? {} : { ownedTreeRoot },
|
|
27794
27827
|
...identity ? { identity } : {},
|
|
27795
27828
|
profileRef,
|
|
27829
|
+
...modelSubstitution === void 0 ? {} : { modelSubstitution },
|
|
27796
27830
|
seq: ordinal,
|
|
27797
27831
|
at: new Date(now()).toISOString()
|
|
27798
27832
|
}];
|
|
@@ -28477,6 +28511,20 @@ function meterRuntimeOwnedAccounting(scope, spend, detail, options) {
|
|
|
28477
28511
|
if (meter === void 0) throw new ValidationError$1("scope: Runtime-owned provider meter is not bound to this scope");
|
|
28478
28512
|
return meter(spend, void 0, detail, true, options?.alreadySpent === true);
|
|
28479
28513
|
}
|
|
28514
|
+
/**
|
|
28515
|
+
* @internal Record the execution a pending executor started for the current attempt. A bridge
|
|
28516
|
+
* manager whose turn ends before the bridge acknowledges it then still names its session:
|
|
28517
|
+
* magnetar-rust-20261018b:s2 ran 177 model calls in supervised-manager-46c412bb9975, and its
|
|
28518
|
+
* receipts read `root-agent-did-not-report` with no session at all.
|
|
28519
|
+
*/
|
|
28520
|
+
function noteScopeOwnerPlannedExecution(scope, execution) {
|
|
28521
|
+
const state = ownerMaterializationStates.get(scope);
|
|
28522
|
+
if (state === void 0) return;
|
|
28523
|
+
state.plannedExecution = Object.freeze({
|
|
28524
|
+
attemptId: state.attemptId,
|
|
28525
|
+
execution: Object.freeze({ ...execution })
|
|
28526
|
+
});
|
|
28527
|
+
}
|
|
28480
28528
|
const ownerMaterializationStates = /* @__PURE__ */ new WeakMap();
|
|
28481
28529
|
/**
|
|
28482
28530
|
* One owner materialization write at a time. A cancelled run settles without waiting for its root
|
|
@@ -28653,12 +28701,14 @@ async function finalizeOwnerMaterialization(state) {
|
|
|
28653
28701
|
throw new ValidationError$1("resumed scope owner did not re-attest its prior materialization before execution");
|
|
28654
28702
|
}
|
|
28655
28703
|
if (state.receipt !== void 0) return;
|
|
28704
|
+
const planned = state.plannedExecution?.attemptId === state.attemptId ? state.plannedExecution : void 0;
|
|
28705
|
+
const reason = planned ? "executor-failed-before-receipt" : "root-agent-did-not-report";
|
|
28656
28706
|
const receipt = unknownMaterializationReceipt({
|
|
28657
28707
|
...state.authoredProfileDigest === void 0 ? {} : { authoredProfileDigest: state.authoredProfileDigest },
|
|
28658
28708
|
runtime: state.runtime,
|
|
28659
|
-
reason
|
|
28709
|
+
reason
|
|
28660
28710
|
});
|
|
28661
|
-
const binding = unknownExecutionBindingReceipt(receipt, state.attemptId,
|
|
28711
|
+
const binding = unknownExecutionBindingReceipt(receipt, state.attemptId, reason, planned?.execution);
|
|
28662
28712
|
await appendOwnerMaterialization(state, receipt, binding);
|
|
28663
28713
|
state.onReceipt?.(receipt, binding);
|
|
28664
28714
|
if (state.requiredKnown) throw new ValidationError$1("runtime-owned scope owner did not publish materialization before completing");
|
|
@@ -29362,6 +29412,7 @@ function makeTreeView(root, children) {
|
|
|
29362
29412
|
...c.ownedTreeRoot === void 0 ? {} : { ownedTreeRoot: c.ownedTreeRoot },
|
|
29363
29413
|
...c.assignmentId === void 0 ? {} : { assignmentId: c.assignmentId },
|
|
29364
29414
|
...c.identity ? { identity: c.identity } : {},
|
|
29415
|
+
...c.modelSubstitution ? { modelSubstitution: c.modelSubstitution } : {},
|
|
29365
29416
|
...c.materialization ? { materialization: c.materialization } : {},
|
|
29366
29417
|
...c.executionBindings.length > 0 ? { executionBindings: Object.freeze([...c.executionBindings]) } : {},
|
|
29367
29418
|
spent: c.spent,
|
|
@@ -29387,6 +29438,7 @@ function frozenHandle(child) {
|
|
|
29387
29438
|
status: child.status,
|
|
29388
29439
|
...child.assignmentId === void 0 ? {} : { assignmentId: child.assignmentId },
|
|
29389
29440
|
...child.identity ? { identity: child.identity } : {},
|
|
29441
|
+
...child.modelSubstitution ? { modelSubstitution: child.modelSubstitution } : {},
|
|
29390
29442
|
...child.materialization ? { materialization: child.materialization } : {},
|
|
29391
29443
|
...child.executionBindings.length > 0 ? { executionBindings: Object.freeze([...child.executionBindings]) } : {},
|
|
29392
29444
|
abort() {}
|
|
@@ -31823,6 +31875,6 @@ function isNonEmptySpend(s) {
|
|
|
31823
31875
|
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);
|
|
31824
31876
|
}
|
|
31825
31877
|
//#endregion
|
|
31826
|
-
export {
|
|
31878
|
+
export { SPAWN_RESOURCE_PATH_MAX_BYTES as $, FileSpawnJournal as $i, persistHarnessTranscript as $n, renderProfileMaterializationIssues as $r, AUTHORITY_MARKERS as $t, restoreScopeOwnerAcceptedExecution as A, awaitAbortable$1 as Ai, providerAsExecutor as An, runWorktreeHarness as Ar, verdictFromJudgeScore as At, bindScopeRetainedOwnerProvider as B, canonicalStreamEventFromSandboxEvent as Bi, startRetainedRun as Bn, CodexExecutionDiagnosticError as Br, createSteerableSandboxSession as Bt, deriveNodeExecutionIdentity as C, spendFromUsageTotals as Ca, unknownExecutionBindingReceipt as Ci, captureBeforeDestroy as Cn, toOtelAttributes as Cr, bestComposite as Ct, recordScopeOwnerDriverAttempt as D, promptFromAgentTurnInput as Da, projectSandboxOutcome as Di, runBrainLoop as Dn, sanitizeKnowledgeReadinessReport as Dr, expandQuestions as Dt, noteScopeOwnerPlannedExecution as E, resolveRedactor as Ea, executableAgentSpecSnapshot as Ei, routerBrain as En, sanitizeAgentRuntimeEvent as Er, distillFindings as Et, authoredSeatStages as F, unavailablePauseMs as Fi, sandboxSessionTraceSource as Fn, LOCAL_HARNESSES as Fr, createExecutor as Ft, reconcileScopeRetainedOwnerEnvironment as G, mapSandboxEvent as Gi, createWorkerSlots as Gn, controlProfileMaterialization as Gr, workerTraceEnv as Gt, noteScopeRetainedOwnerCoordination as H, createSandboxUsageLedger as Hi, retainedCreateMaterial as Hn, AGENT_PROFILE_MATERIALIZATION_AXES as Hr, createInPlaceCliExecutor as Ht, seatExecutionProfile as I, unavailableSignalOfFailure as Ii, bridgeRuntimeAttachmentsKey as In, harnessInvocation as Ir, createExecutorRegistry as It, scopeRetainedOwnerPriorSpend as J, sandboxEventServedBackend as Ji, abortError as Jn, profileMaterializationAxes$1 as Jr, taskToPrompt as Jt, scopeRetainedOwnerContext as K, mapSandboxToolEvent as Ki, openSlotGroup as Kn, defineProfileMaterializationContract as Kr, workerTraceHeaders as Kt, abandonScopeRetainedOwnerInvocation as L, TRACE_ROOT_SCHEMA as Li, bridgeStopSignalKey as Ln, harnessSupportsReasoningEffort as Lr, snapshotExecutorConfig as Lt, settledToIteration as M, settlementFailureCause as Mi, resolveAgentEnvironmentProvider as Mn, createWorktree as Mr, captureReusableExecutorConfig as Mt, SeatChain as N, registerRetainedExecutorPreparation as Ni, createPushTraceSource as Nn, removeWorktree as Nr, cliInPlaceExecutor as Nt, recordScopeOwnerMaterialization as O, promptOptionsFromAgentTurnInput as Oa, readSandboxOutcome as Oi, LEAF_CONTINUATION_TASK as On, sanitizeRuntimeStreamEvent as Or, failedItems as Ot, SeatChainExhaustedError as P, retainedExecutorSeamKey as Pi, decodeToolPart as Pn, DEFAULT_LOCAL_HARNESS as Pr, cliWorktreeExecutor as Pt, scopeRetainedOwnerTurnEnded as Q, FileResultBlobStore as Qi, harnessTranscriptArtifact as Qn, promptResourceProfileMaterialization as Qr, createInbox as Qt, beginScopeRetainedOwnerDrive as R, TRACE_SUMMARY_SCHEMA as Ri, reconnectRetainedRun as Rn, localHarnessExecutable as Rr, createWorktreeCliExecutor as Rt, createScope as S, spendFromUsageEvents as Sa, runtimeOwnedScopeOwnerRuntime as Si, SandboxEvidenceRetentionError as Sn, padTraceId as Sr, admitFinding as St, meterRuntimeOwnedProviderAttempt as T, defaultRedactorIdentityMaterial as Ta, executableAgentProfileSnapshot as Ti, readPromptOptions as Tn, createRuntimeStreamEventCollector as Tr, createContinuationKeeper as Tt, prepareScopeRetainedOwnerSeatSwitch as U, extractLlmCallEvent as Ui, destroyInteractiveEnvironment as Un, assertProfileMaterialization as Ur, WORKER_TRACE_PROPAGATION as Ut, consumeScopeRetainedOwnerResult as V, createSandboxToolPartState as Vi, startRetainedRunInEnvironment as Vn, terminateProcessTreeAndConfirm as Vr, createRouterTranscript as Vt, prepareScopeRetainedOwnerTask as W, isSandboxTerminalEvent as Wi, environmentGone as Wn, assertProfileMaterializes as Wr, readWorkerTraceContext as Wt, scopeRetainedOwnerRestorePoint as X, sumSandboxUsage as Xi, runAbortable as Xn, promptModelProfileMaterialization as Xr, createActivityLog as Xt, scopeRetainedOwnerResourceReader as Y, sandboxProgressEvents as Yi, linkAbort as Yn, promptControlProfileMaterialization as Yr, DEFAULT_STALL_AFTER_MS as Yt, scopeRetainedOwnerResult as Z, decodeHarnessUsage as Zi, captureHarnessTranscript as Zn, promptOnlyProfileMaterialization as Zr, readWorkerProgress as Zt, isDriverSpec as _, ReservationWaitRefused as _a, runtimeOwnedDriveHarnessProviderEvidence as _i, defaultSelectWinner as _n, createOtelExporter as _r, mapExecutorResult as _t, collectDelivered as a, replaySpawnTree as aa, worktreeCliProfileMaterialization as ai, peerMailTools as an, runCodeMode as ar, providerVisibleProfile as at, assertRecursiveReservationPolicy as b, meterUsageEvent as ba, runtimeOwnedExecutorProviderEvidence as bi, createSandboxLineage as bn, loopEventToOtelSpan as br, CheckUnavailableError as bt, runTree as c, isTraceAnalysisStore as ca, authoredAgentIdentity as ci, isTerminalNodeStatus as cn, ROUTER_PRICE_SOURCE as cr, attachWorker as ct, classifyDriverFailure as d, contentAddress as da, inheritRuntimeOwnedExecutorAttestation as di, addHarnessUsage as dn, readTraceContextFromEnv as dr, recoverRetainedInteractiveRun as dt, InMemoryResultBlobStore as ea, renderUnsupported as ei, DEFAULT_PEER_MAIL_LIMITS as en, readHarnessTranscript as er, environmentReader as et, runDriverWithRetry as f, detachedFrozen as fa, knownExecutionBindingReceipt as fi, createCodexRolloutStoreReader as fn, traceContextToEnv as fr, startRetainedInteractiveRun as ft, driverExecutorFactory as g, BudgetReconcileFault as ga, recordRuntimeOwnedDriveHarnessProviderEvidence as gi, createSandboxForSpec as gn, createOpenInferenceFileExporter as gr, gateOnDeliverable as gt, driverChild as h, errMessage as ha, providerAttemptEvidence as hi, TERMINAL_DECISIONS as hn, buildRuntimeEventOtelSpans as hr, rollingDispatch as ht, bestDelivered as i, materializeTreeView as ia, validateProfileMaterialization as ii, isPeerMailEnvelope as in, describeCodeModeTools as ir, coordinationProfileToolPrefix as it, scopeOwnerExecutorNodeContext as j, runtimeFailureCause as ji, providerAsSandboxClient as jn, captureWorktreeDiff as jr, bindReusableExecutorExecutionId as jt, recordScopeOwnerPause as k, providerMessageText as ka, abortError$1 as ki, createAgentEnvironmentProviderRegistry as kn, runSettledCommand as kr, passedItems as kt, DriverAttemptsExhaustedError as l, parseWorkerToolTraceArtifact as la, authoredProfileDigest as li, bridgeAdmissionRefusal as ln, createPropagatingTraceEmitter as lr, readWorkerInteractiveBinding as lt, upstreamUnavailableSignal as m, executorFailure as ma, newExecutionAttemptId as mi, readCodexRolloutSession as mn, buildLoopSpanNodes as mr, queueOf as mt, createRootHandle as n, insideCursorNamespace as na, sandboxProfileMaterialization as ni, claimsAuthority as nn, retainHarnessTranscript as nr, resolveSpawnResourcePaths as nt, pickBestDelivered as o, WORKER_TOOL_TRACE_SCHEMA_VERSION as oa, attestRuntimeOwnedPendingExecutor as oi, peerMailVerbNames as on, priceTokens as or, runtimeGraphMetadataKey as ot, summarizeDriverAttempts as p, detachedSnapshot as pa, knownMaterializationReceipt as pi, harnessUsageIsEmpty as pn, buildLoopOtelSpans as pr, freeSlots as pt, scopeRetainedOwnerJournalRoot as q, notifySandboxEventObserver as qi, RunCancellationReason as qn, fullProfileMaterialization as qr, workerTraceSeamKey as qt, createSupervisor as r, loadSpawnForest as ra, unsupportedProfileDimensions as ri, createPeerMailbox as rn, createCodeModeTools as rr, coordinationMcpAlias as rt, runFinalizer as s, captureWorkerTraceEvidence as sa, attestRuntimeOwnedScopeOwner as si, isLiveNodeStatus as sn, routerTokenPrice as sr, interactiveAdmissionSeamKey as st, DEFAULT_MAX_DEPTH as t, InMemorySpawnJournal as ta, sandboxActProfileMaterialization as ti, PEER_MAIL_WIRE_KEY as tn, resolveHarnessTranscriptCapture as tr, hostDirectoryReader as tt, HarnessTurnFailedError as u, workerTraceAnalysisStore as ua, finalizeRuntimeOwnedPendingExecutor as ui, bridgeModelRouteRefusal as un, mergeTraceEnv as ur, reconnectRetainedInteractiveRun as ut, withDriverExecutor as v, assertValidBudget as va, runtimeOwnedExecutorExecutionBinding as vi, isTerminalDecision as vn, flatOtelSpan as vr, CONTINUATIONS_DIR as vt, meterRuntimeOwnedAccounting as w, defaultRedactor as wa, unknownMaterializationReceipt as wi, assertBoxlessPromptOptions as wn, createRuntimeEventCollector as wr, checkVerdictOf as wt, beginScopeOwnerAttempt as x, newUsageTotals as xa, runtimeOwnedPendingExecutorMaterialization as xi, acquireSandbox as xn, padSpanId as xr, admitContinuationPolicy as xt, SUBTREE_RESULT_LIMIT as y, createBudgetPool as ya, runtimeOwnedExecutorMaterialization as yi, runAgentRounds as yn, generateSpanId as yr, CONTINUATION_FACTS as yt, bindScopeRetainedOwnerEnvironmentId as z, assertSandboxServedModel as zi, recoverRetainedRun as zn, parseCodexTokenUsage as zr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as zt };
|
|
31827
31879
|
|
|
31828
|
-
//# sourceMappingURL=supervisor-
|
|
31880
|
+
//# sourceMappingURL=supervisor-6t1YG2PP.js.map
|