@tangle-network/agent-runtime 0.321.0 → 0.322.4
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-BxOOvwjo.d.ts → activation-Bw6S7lI1.d.ts} +2 -2
- package/dist/{activation-CXFl5YVE.js → activation-ClHYiUF-.js} +2 -2
- package/dist/{activation-CXFl5YVE.js.map → activation-ClHYiUF-.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-Bpn05N-Y.js → coordination-driver-xq1y2G6E.js} +69 -2
- package/dist/coordination-driver-xq1y2G6E.js.map +1 -0
- package/dist/{delegate-BHlcTOdK.js → delegate-C9dMTZ8s.js} +2 -2
- package/dist/{delegate-BHlcTOdK.js.map → delegate-C9dMTZ8s.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +2 -2
- package/dist/{graph-DE2dLhDI.js → graph-DLgIEaDB.js} +4 -4
- package/dist/{graph-DE2dLhDI.js.map → graph-DLgIEaDB.js.map} +1 -1
- package/dist/{improvement-cycle-CyChbojL.js → improvement-cycle-C0N4tt1G.js} +3 -3
- package/dist/{improvement-cycle-CyChbojL.js.map → improvement-cycle-C0N4tt1G.js.map} +1 -1
- package/dist/{index-BxiHetnG.d.ts → index-BE5-_p0B.d.ts} +638 -543
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +22 -6
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +9 -9
- package/dist/{loop-runner-bin-CT02Vzco.js → loop-runner-bin-B4QRhI5z.js} +3 -3
- package/dist/{loop-runner-bin-CT02Vzco.js.map → loop-runner-bin-B4QRhI5z.js.map} +1 -1
- package/dist/{loop-runner-bin-DInJZNgs.d.ts → loop-runner-bin-DeT99QWD.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 +2 -2
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-DLTw576v.d.ts → openai-tools-C80KeWl4.d.ts} +2 -2
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-DvgBNtoJ.js → provision-supervisor-C40ye4h2.js} +3 -3
- package/dist/{provision-supervisor-DvgBNtoJ.js.map → provision-supervisor-C40ye4h2.js.map} +1 -1
- package/dist/{runtime-wLgjMOaj.js → runtime-zv5GK0m4.js} +77 -12
- package/dist/runtime-zv5GK0m4.js.map +1 -0
- package/dist/{search-executor-TEKWC579.js → search-executor-BtJktjPt.js} +2 -2
- package/dist/{search-executor-TEKWC579.js.map → search-executor-BtJktjPt.js.map} +1 -1
- package/dist/{server-qYhzITTm.js → server-DNnLa4KU.js} +3 -3
- package/dist/{server-qYhzITTm.js.map → server-DNnLa4KU.js.map} +1 -1
- package/dist/{supervise-C4bLIU7J.js → supervise-DLezpJcp.js} +172 -123
- package/dist/supervise-DLezpJcp.js.map +1 -0
- package/dist/{supervisor-bkq2b8k-.js → supervisor-dlufUXys.js} +268 -42
- package/dist/supervisor-dlufUXys.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +12 -12
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/package.json +4 -4
- package/skills/profile-authoring/SKILL.md +4 -3
- package/dist/coordination-driver-Bpn05N-Y.js.map +0 -1
- package/dist/runtime-wLgjMOaj.js.map +0 -1
- package/dist/supervise-C4bLIU7J.js.map +0 -1
- package/dist/supervisor-bkq2b8k-.js.map +0 -1
|
@@ -1953,6 +1953,33 @@ function authoredProfileDigest(profile) {
|
|
|
1953
1953
|
return;
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
|
+
/**
|
|
1957
|
+
* Who acted, as a trace span says it: the authored profile's canonical digest, its name, the model
|
|
1958
|
+
* and harness it declares, and a digest of its skill set. `profileDigest` is the digest the spawn
|
|
1959
|
+
* journal already recorded for the node, passed so the span and the journal name the same agent.
|
|
1960
|
+
* A field the profile does not declare stays absent; input that is not an AgentProfile yields only
|
|
1961
|
+
* the recorded digest, if any.
|
|
1962
|
+
*/
|
|
1963
|
+
function authoredAgentIdentity(profile, profileDigest) {
|
|
1964
|
+
const parsed = agentProfileSchema.safeParse(profile);
|
|
1965
|
+
if (!parsed.success) return profileDigest === void 0 ? {} : { profileDigest };
|
|
1966
|
+
const authored = parsed.data;
|
|
1967
|
+
const digest = profileDigest ?? authoredProfileDigest(authored);
|
|
1968
|
+
const skills = authored.resources?.skills;
|
|
1969
|
+
let skillsDigest;
|
|
1970
|
+
try {
|
|
1971
|
+
skillsDigest = skills && skills.length > 0 ? canonicalCandidateDigest(skills) : void 0;
|
|
1972
|
+
} catch {
|
|
1973
|
+
skillsDigest = void 0;
|
|
1974
|
+
}
|
|
1975
|
+
return {
|
|
1976
|
+
...digest === void 0 ? {} : { profileDigest: digest },
|
|
1977
|
+
...authored.name ? { profileName: authored.name } : {},
|
|
1978
|
+
...authored.model?.default ? { model: authored.model.default } : {},
|
|
1979
|
+
...authored.harness ? { harness: authored.harness } : {},
|
|
1980
|
+
...skillsDigest === void 0 ? {} : { skillsDigest }
|
|
1981
|
+
};
|
|
1982
|
+
}
|
|
1956
1983
|
function assertExactDeclaration(value) {
|
|
1957
1984
|
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new ValidationError$1("executor materialization: declaration must be an object");
|
|
1958
1985
|
const unknown = Object.keys(value).filter((key) => !declarationKeys.has(key));
|
|
@@ -11206,6 +11233,20 @@ function traceEvidenceFor(event) {
|
|
|
11206
11233
|
};
|
|
11207
11234
|
}
|
|
11208
11235
|
//#endregion
|
|
11236
|
+
//#region src/runtime/supervise/credential-refusal.ts
|
|
11237
|
+
/**
|
|
11238
|
+
* The account owner refused an unsupported credential route before dispatch. This is the
|
|
11239
|
+
* provider SDK's machine contract, not an HTTP status, class-name guess, or prose match.
|
|
11240
|
+
*/
|
|
11241
|
+
function isCredentialRefusal(error) {
|
|
11242
|
+
if (!(error instanceof Error)) return false;
|
|
11243
|
+
try {
|
|
11244
|
+
return Object.getOwnPropertyDescriptor(error, "code")?.value === "model_credential_refused";
|
|
11245
|
+
} catch {
|
|
11246
|
+
return false;
|
|
11247
|
+
}
|
|
11248
|
+
}
|
|
11249
|
+
//#endregion
|
|
11209
11250
|
//#region src/runtime/supervise/trace-root.ts
|
|
11210
11251
|
/**
|
|
11211
11252
|
* Trace roots: one Merkle root over the events a turn archived, so a single event can be proven
|
|
@@ -11559,14 +11600,8 @@ function readString(value, key) {
|
|
|
11559
11600
|
const read = Reflect.get(value, key);
|
|
11560
11601
|
return typeof read === "string" ? read : void 0;
|
|
11561
11602
|
}
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
*
|
|
11565
|
-
* `phase` says whether a 4xx or a client deadline can mean "refused before it ran": only at
|
|
11566
|
-
* admission. After admission the same status means the provider cannot resolve what it
|
|
11567
|
-
* admitted, and the honest name is the refusal.
|
|
11568
|
-
*/
|
|
11569
|
-
function classifyRetainedPendingCause(cause, phase = "execution") {
|
|
11603
|
+
const credentialAdmissionRefusals = /* @__PURE__ */ new WeakSet();
|
|
11604
|
+
function classifyPendingCause(cause, phase, onCredentialRefusal) {
|
|
11570
11605
|
const seen = /* @__PURE__ */ new Set();
|
|
11571
11606
|
const queue = [{
|
|
11572
11607
|
value: cause,
|
|
@@ -11578,7 +11613,13 @@ function classifyRetainedPendingCause(cause, phase = "execution") {
|
|
|
11578
11613
|
const { value, phase: at } = queue.shift();
|
|
11579
11614
|
if (typeof value !== "object" || value === null || seen.has(value)) continue;
|
|
11580
11615
|
seen.add(value);
|
|
11581
|
-
if (value instanceof RetainedExecutionPendingError)
|
|
11616
|
+
if (value instanceof RetainedExecutionPendingError) {
|
|
11617
|
+
if (credentialAdmissionRefusals.has(value)) {
|
|
11618
|
+
if (at === "execution") return "unobservable";
|
|
11619
|
+
onCredentialRefusal?.();
|
|
11620
|
+
}
|
|
11621
|
+
return value.pendingCause;
|
|
11622
|
+
}
|
|
11582
11623
|
const name = readString(value, "name");
|
|
11583
11624
|
const code = readString(value, "code");
|
|
11584
11625
|
const status = readNumber(value, "status") ?? readNumber(value, "statusCode");
|
|
@@ -11592,6 +11633,11 @@ function classifyRetainedPendingCause(cause, phase = "execution") {
|
|
|
11592
11633
|
}
|
|
11593
11634
|
if (name === "ZodError" || Array.isArray(Reflect.get(value, "issues")) || code === "JSON_BOUND_VIOLATION") return at === "admission" ? "request-rejected" : "provider-contract";
|
|
11594
11635
|
if (code === "DISPATCH_NOT_ADMITTED") return at === "admission" ? "request-rejected" : "provider-contract";
|
|
11636
|
+
if (isCredentialRefusal(value)) {
|
|
11637
|
+
if (at === "execution") return "unobservable";
|
|
11638
|
+
onCredentialRefusal?.();
|
|
11639
|
+
return "request-rejected";
|
|
11640
|
+
}
|
|
11595
11641
|
if (code !== void 0 && transportCodes.has(code)) return "transport";
|
|
11596
11642
|
if (name === "NetworkError" || name === "ServerError") return "transport";
|
|
11597
11643
|
if (status === void 0 && at === "admission" && code !== void 0 && UNAVAILABLE_CODES.has(code.toLowerCase())) return "request-rejected";
|
|
@@ -11630,11 +11676,15 @@ var RetainedExecutionPendingError = class extends Error {
|
|
|
11630
11676
|
pendingCause;
|
|
11631
11677
|
phase;
|
|
11632
11678
|
constructor(cause, pendingCause = "execution") {
|
|
11633
|
-
|
|
11679
|
+
let credentialRefused = false;
|
|
11680
|
+
const resolved = pendingCause === "admission" || pendingCause === "execution" ? classifyPendingCause(cause, pendingCause, () => {
|
|
11681
|
+
credentialRefused = true;
|
|
11682
|
+
}) : pendingCause;
|
|
11634
11683
|
super(causeMessages[resolved], { cause });
|
|
11635
11684
|
this.name = "RetainedExecutionPendingError";
|
|
11636
11685
|
this.pendingCause = resolved;
|
|
11637
11686
|
this.phase = pendingCause === "admission" ? "admission" : "execution";
|
|
11687
|
+
if (credentialRefused) credentialAdmissionRefusals.add(this);
|
|
11638
11688
|
}
|
|
11639
11689
|
};
|
|
11640
11690
|
/** The execution id of a leaf's later invocation, derived from its `execution-input` sequence so
|
|
@@ -11981,7 +12031,7 @@ function providerAsSandboxClient(provider, options = {}) {
|
|
|
11981
12031
|
}
|
|
11982
12032
|
return { async create(createOptions) {
|
|
11983
12033
|
const defaults = options.defaults ?? {};
|
|
11984
|
-
const sandboxInput = createInputFromSandboxOptions(createOptions);
|
|
12034
|
+
const sandboxInput = createInputFromSandboxOptions(createOptions, options.mapCreateOptions !== void 0);
|
|
11985
12035
|
const customInput = options.mapCreateOptions?.(createOptions) ?? {};
|
|
11986
12036
|
const mapped = {
|
|
11987
12037
|
...defaults,
|
|
@@ -12000,16 +12050,17 @@ function providerAsSandboxClient(provider, options = {}) {
|
|
|
12000
12050
|
};
|
|
12001
12051
|
if (mapped.backend === void 0) delete mapped.backend;
|
|
12002
12052
|
if (mapped.profile === void 0) throw new ValidationError(`providerAsSandboxClient(${provider.name}): profile required in defaults or CreateSandboxOptions.backend.profile`);
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
}
|
|
12053
|
+
const needsMcp = hasRuntimeMcpAttachments(mapped);
|
|
12054
|
+
const capabilities = options.requireSession || needsMcp ? await provider.capabilities() : void 0;
|
|
12055
|
+
assertRuntimeMcpAttachments(provider.name, mapped, capabilities);
|
|
12056
|
+
if (options.requireSession && (!capabilities?.streaming.live || !capabilities.sessions.continue)) throw new ValidationError(`providerAsSandboxClient(${provider.name}): live session continuation is required`);
|
|
12007
12057
|
const environment = await provider.create(mapped);
|
|
12008
12058
|
if (options.requireSession && !environment.session) {
|
|
12009
12059
|
if (options.workspaceRetention === void 0) await environment.destroy?.();
|
|
12010
12060
|
throw new ValidationError(`providerAsSandboxClient(${provider.name}): session() is required`);
|
|
12011
12061
|
}
|
|
12012
12062
|
return environmentAsSandboxInstance(environment, {
|
|
12063
|
+
...typeof mapped.profile === "string" ? {} : { profile: mapped.profile },
|
|
12013
12064
|
requireTerminalEvent: options.requireTerminalEvent ?? true,
|
|
12014
12065
|
...options.workspaceRetention === void 0 ? {} : { workspaceRetention: options.workspaceRetention },
|
|
12015
12066
|
...options.retentionIdentity === void 0 ? {} : { retentionIdentity: options.retentionIdentity },
|
|
@@ -12996,7 +13047,10 @@ async function* streamProviderExecutor(args) {
|
|
|
12996
13047
|
const verdict = await args.options.validator?.validate(result, {
|
|
12997
13048
|
iteration: 0,
|
|
12998
13049
|
...args.node === void 0 ? {} : { node: args.node },
|
|
12999
|
-
box: environmentAsSandboxInstance(environment, {
|
|
13050
|
+
box: environmentAsSandboxInstance(environment, {
|
|
13051
|
+
profile: args.profile,
|
|
13052
|
+
requireTerminalEvent: args.options.requireTerminalEvent ?? true
|
|
13053
|
+
}),
|
|
13000
13054
|
signal: linked
|
|
13001
13055
|
});
|
|
13002
13056
|
const deferCapture = ownerTakesCapture();
|
|
@@ -13194,7 +13248,7 @@ async function* streamProviderExecutor(args) {
|
|
|
13194
13248
|
} else if (input > 0 || output > 0 || receipt.tokensKnown === false) pendingUnpricedWork = true;
|
|
13195
13249
|
}
|
|
13196
13250
|
}
|
|
13197
|
-
/** Subscription selection needs
|
|
13251
|
+
/** Subscription selection needs its complete profile and one identity for each fresh turn. */
|
|
13198
13252
|
function subscriptionTurnProfile(turn, profile) {
|
|
13199
13253
|
if (profile.model?.metadata?.credentialSource !== "subscription") return turn;
|
|
13200
13254
|
const backend = promptOptionsFromAgentTurnInput(turn).backend ?? {};
|
|
@@ -13202,14 +13256,26 @@ function subscriptionTurnProfile(turn, profile) {
|
|
|
13202
13256
|
if (turn.profile !== void 0 && canonicalAgentProfileDigest(turn.profile) !== digest || backend.profile !== void 0 && canonicalAgentProfileDigest(backend.profile) !== digest) throw new ValidationError("provider subscription turn cannot replace its exact AgentProfile");
|
|
13203
13257
|
return {
|
|
13204
13258
|
...turn,
|
|
13205
|
-
profile
|
|
13259
|
+
profile,
|
|
13260
|
+
...turn.turnId === void 0 && turn.lastEventId === void 0 && turn.controlRef === void 0 ? { turnId: randomUUID() } : {}
|
|
13206
13261
|
};
|
|
13207
13262
|
}
|
|
13263
|
+
function hasRuntimeMcpAttachments(input) {
|
|
13264
|
+
const mcp = input?.runtimeAttachments?.mcp;
|
|
13265
|
+
return mcp !== void 0 && Object.keys(mcp).length > 0;
|
|
13266
|
+
}
|
|
13267
|
+
function assertRuntimeMcpAttachments(provider, input, capabilities) {
|
|
13268
|
+
if (!hasRuntimeMcpAttachments(input)) return;
|
|
13269
|
+
const create = capabilities?.create;
|
|
13270
|
+
if (!create || !("runtimeAttachments" in create) || create.runtimeAttachments?.mcp !== true) throw new ValidationError(`provider ${provider} does not advertise create.runtimeAttachments.mcp; no environment was created`);
|
|
13271
|
+
}
|
|
13208
13272
|
/** One retained dispatch owns creation, replay, result identity, and cancellation. */
|
|
13209
13273
|
async function providerExecutionSource(args, turn, signal) {
|
|
13210
13274
|
const selectedTurn = subscriptionTurnProfile(turn, args.profile);
|
|
13211
13275
|
AgentTurnInputSchema.parse(selectedTurn);
|
|
13212
|
-
const
|
|
13276
|
+
const needsMcp = hasRuntimeMcpAttachments(args.options.defaults);
|
|
13277
|
+
const capabilities = args.retention || needsMcp ? await args.provider.capabilities() : void 0;
|
|
13278
|
+
assertRuntimeMcpAttachments(args.provider.name, args.options.defaults, capabilities);
|
|
13213
13279
|
if (!(args.retention !== void 0 && capabilities?.retainedControl !== void 0)) {
|
|
13214
13280
|
if (args.recovering) throw new Error(`provider ${args.provider.name} cannot recover retained executions`);
|
|
13215
13281
|
const environment = await args.provider.create({
|
|
@@ -13506,7 +13572,44 @@ async function providerExecutionSource(args, turn, signal) {
|
|
|
13506
13572
|
throw error;
|
|
13507
13573
|
}
|
|
13508
13574
|
}
|
|
13509
|
-
function createInputFromSandboxOptions(options) {
|
|
13575
|
+
function createInputFromSandboxOptions(options, customMapping) {
|
|
13576
|
+
if (!customMapping) {
|
|
13577
|
+
const mapped = /* @__PURE__ */ new Set([
|
|
13578
|
+
"backend",
|
|
13579
|
+
"environment",
|
|
13580
|
+
"git",
|
|
13581
|
+
"cwd",
|
|
13582
|
+
"resources",
|
|
13583
|
+
"env",
|
|
13584
|
+
"secrets",
|
|
13585
|
+
"metadata",
|
|
13586
|
+
"name",
|
|
13587
|
+
"idempotencyKey"
|
|
13588
|
+
]);
|
|
13589
|
+
const unsupported = Object.entries(options ?? {}).filter(([key, value]) => value !== void 0 && !mapped.has(key)).map(([key]) => key);
|
|
13590
|
+
for (const [prefix, value, keys] of [[
|
|
13591
|
+
"backend",
|
|
13592
|
+
options?.backend,
|
|
13593
|
+
[
|
|
13594
|
+
"type",
|
|
13595
|
+
"profile",
|
|
13596
|
+
"model"
|
|
13597
|
+
]
|
|
13598
|
+
], [
|
|
13599
|
+
"git",
|
|
13600
|
+
options?.git,
|
|
13601
|
+
["url", "ref"]
|
|
13602
|
+
]]) for (const [key, field] of Object.entries(value ?? {})) if (field !== void 0 && !keys.includes(key)) unsupported.push(`${prefix}.${key}`);
|
|
13603
|
+
const model = options?.backend?.model;
|
|
13604
|
+
if (model !== void 0) {
|
|
13605
|
+
for (const [key, value] of Object.entries(model)) if (value !== void 0 && !["provider", "model"].includes(key)) unsupported.push(`backend.model.${key}`);
|
|
13606
|
+
const profile = options?.backend?.profile;
|
|
13607
|
+
if (model.provider !== void 0 && model.provider !== profile?.model?.provider?.trim()) unsupported.push("backend.model.provider");
|
|
13608
|
+
if (model.model !== void 0 && model.model !== concreteProfileModel(profile ?? {})) unsupported.push("backend.model.model");
|
|
13609
|
+
}
|
|
13610
|
+
if (options?.secrets === "all") unsupported.push("secrets=all");
|
|
13611
|
+
if (unsupported.length > 0) throw new ValidationError(`providerAsSandboxClient: Sandbox create controls require mapCreateOptions: ${unsupported.join(", ")}`);
|
|
13612
|
+
}
|
|
13510
13613
|
const profile = options?.backend?.profile;
|
|
13511
13614
|
const backend = options?.backend?.type;
|
|
13512
13615
|
const cwd = options?.cwd === void 0 ? void 0 : canonicalWorkspaceCwd({
|
|
@@ -13528,8 +13631,7 @@ function createInputFromSandboxOptions(options) {
|
|
|
13528
13631
|
...Array.isArray(options?.secrets) ? { secrets: options.secrets } : {},
|
|
13529
13632
|
...options?.metadata ? { metadata: options.metadata } : {},
|
|
13530
13633
|
...options?.name ? { name: options.name } : {},
|
|
13531
|
-
...options?.idempotencyKey ? { idempotencyKey: options.idempotencyKey } : {}
|
|
13532
|
-
providerOptions: { sandboxCreateOptions: options ?? {} }
|
|
13634
|
+
...options?.idempotencyKey ? { idempotencyKey: options.idempotencyKey } : {}
|
|
13533
13635
|
};
|
|
13534
13636
|
}
|
|
13535
13637
|
function environmentAsSandboxInstance(environment, options) {
|
|
@@ -13554,7 +13656,7 @@ function environmentAsSandboxInstance(environment, options) {
|
|
|
13554
13656
|
},
|
|
13555
13657
|
async *streamPrompt(message, promptOptions) {
|
|
13556
13658
|
let terminal = false;
|
|
13557
|
-
const input = turnInputFromPrompt(message, promptOptions);
|
|
13659
|
+
const input = turnInputFromPrompt(message, promptOptions, options.profile);
|
|
13558
13660
|
providerSessionId = input.sessionId ?? null;
|
|
13559
13661
|
noteControlRef(input.controlRef);
|
|
13560
13662
|
let cancellation;
|
|
@@ -13616,7 +13718,7 @@ function environmentAsSandboxInstance(environment, options) {
|
|
|
13616
13718
|
const usageLedger = createSandboxUsageLedger();
|
|
13617
13719
|
let terminal = false;
|
|
13618
13720
|
const failures = createProviderFailureLedger();
|
|
13619
|
-
const input = turnInputFromPrompt(message, promptOptions);
|
|
13721
|
+
const input = turnInputFromPrompt(message, promptOptions, options.profile);
|
|
13620
13722
|
providerSessionId = input.sessionId ?? null;
|
|
13621
13723
|
noteControlRef(input.controlRef);
|
|
13622
13724
|
for await (const event of environment.stream(input)) {
|
|
@@ -13643,14 +13745,14 @@ function environmentAsSandboxInstance(environment, options) {
|
|
|
13643
13745
|
};
|
|
13644
13746
|
},
|
|
13645
13747
|
...environment.dispatch && environment.session ? { async dispatchPrompt(message, promptOptions) {
|
|
13646
|
-
const session = await environment.dispatch?.(turnInputFromPrompt(message, promptOptions));
|
|
13748
|
+
const session = await environment.dispatch?.(turnInputFromPrompt(message, promptOptions, options.profile));
|
|
13647
13749
|
if (!session) throw new ValidationError("providerAsSandboxClient: dispatch returned no session");
|
|
13648
13750
|
noteControlRef(session.controlRef);
|
|
13649
13751
|
return sandboxDispatchResultFromSessionRef(session);
|
|
13650
13752
|
} } : {},
|
|
13651
13753
|
...environment.session ? { session(id, sessionOptions) {
|
|
13652
13754
|
noteControlRef(sessionOptions?.controlRef);
|
|
13653
|
-
return sandboxSessionFromAgentSession(environment.session?.(id, sessionOptions), sessionOptions?.controlRef);
|
|
13755
|
+
return sandboxSessionFromAgentSession(environment.session?.(id, sessionOptions), sessionOptions?.controlRef, options.profile);
|
|
13654
13756
|
} } : {},
|
|
13655
13757
|
...environment.read ? { read: environment.read.bind(environment) } : {},
|
|
13656
13758
|
...environment.write ? { write: environment.write.bind(environment) } : {},
|
|
@@ -13704,7 +13806,7 @@ function environmentAsSandboxInstance(environment, options) {
|
|
|
13704
13806
|
}
|
|
13705
13807
|
};
|
|
13706
13808
|
}
|
|
13707
|
-
function sandboxSessionFromAgentSession(session, expectedControlRef) {
|
|
13809
|
+
function sandboxSessionFromAgentSession(session, expectedControlRef, profile) {
|
|
13708
13810
|
if (!session) throw new ValidationError("providerAsSandboxClient: session is unavailable");
|
|
13709
13811
|
const controlRef = resolveSessionControlRef(session.controlRef, expectedControlRef);
|
|
13710
13812
|
return {
|
|
@@ -13731,7 +13833,7 @@ function sandboxSessionFromAgentSession(session, expectedControlRef) {
|
|
|
13731
13833
|
return promptResultFromAgentTurnResult(await session.result());
|
|
13732
13834
|
},
|
|
13733
13835
|
async prompt(message, options) {
|
|
13734
|
-
return promptResultFromAgentTurnResult(await session.prompt(turnInputFromPrompt(message, options)));
|
|
13836
|
+
return promptResultFromAgentTurnResult(await session.prompt(turnInputFromPrompt(message, options, profile)));
|
|
13735
13837
|
},
|
|
13736
13838
|
...session.respondToInteraction ? { async respondToInteraction(command, options) {
|
|
13737
13839
|
assertInteractionCommandScope(command, controlRef);
|
|
@@ -13978,8 +14080,8 @@ function tokenUsageData(usage) {
|
|
|
13978
14080
|
...usage.cost !== void 0 ? { totalCostUsd: usage.cost } : {}
|
|
13979
14081
|
};
|
|
13980
14082
|
}
|
|
13981
|
-
function turnInputFromPrompt(message, options) {
|
|
13982
|
-
|
|
14083
|
+
function turnInputFromPrompt(message, options, profile) {
|
|
14084
|
+
const input = {
|
|
13983
14085
|
...typeof message === "string" ? { prompt: message } : { parts: message },
|
|
13984
14086
|
...options?.sessionId ? { sessionId: options.sessionId } : {},
|
|
13985
14087
|
...options?.model ? { model: options.model } : {},
|
|
@@ -13994,6 +14096,7 @@ function turnInputFromPrompt(message, options) {
|
|
|
13994
14096
|
...options?.signal ? { signal: options.signal } : {},
|
|
13995
14097
|
...options?.backend ? { providerOptions: { backend: options.backend } } : {}
|
|
13996
14098
|
};
|
|
14099
|
+
return profile === void 0 ? input : subscriptionTurnProfile(input, profile);
|
|
13997
14100
|
}
|
|
13998
14101
|
function resolveSessionControlRef(actual, expected, options = {}) {
|
|
13999
14102
|
if (expected === void 0) {
|
|
@@ -21350,14 +21453,15 @@ function routerTurnRequestIdentity(identity, turnIndex) {
|
|
|
21350
21453
|
* the recorded usage events are yielded; the terminal artifact is read from
|
|
21351
21454
|
* `resultArtifact()` after the stream drains.
|
|
21352
21455
|
*/
|
|
21353
|
-
const sandboxExecutor = (spec, ctx) =>
|
|
21456
|
+
const sandboxExecutor = (spec, ctx) => sandboxExecutorForPath(spec, ctx, "sandbox");
|
|
21457
|
+
function sandboxExecutorForPath(spec, ctx, modelPath) {
|
|
21354
21458
|
if (spec.harness === null) throw new ValidationError$1("sandboxExecutor: harness is null (router/inline) — wrong executor");
|
|
21355
21459
|
const harness = spec.harness;
|
|
21356
21460
|
const seam = readSeam(ctx, sandboxSeamKey, "sandbox");
|
|
21357
21461
|
if (!seam.sandboxClient || typeof seam.sandboxClient.create !== "function") throw new ValidationError$1("sandboxExecutor: SandboxSeam.sandboxClient.create required");
|
|
21358
21462
|
const maxIterations = seam.maxIterations ?? 1;
|
|
21359
21463
|
if (!Number.isFinite(maxIterations) || maxIterations <= 0) throw new ValidationError$1("sandboxExecutor: maxIterations must be > 0");
|
|
21360
|
-
const sandboxTokenLimits = enforceTokenLimits(profileModelExecutionSettings(spec.profile, "sandboxExecutor").tokenLimits, "sandbox", "sandboxExecutor");
|
|
21464
|
+
const sandboxTokenLimits = enforceTokenLimits(profileModelExecutionSettings(spec.profile, "sandboxExecutor", modelPath).tokenLimits, "sandbox", "sandboxExecutor");
|
|
21361
21465
|
const traceEnv = {
|
|
21362
21466
|
...workerLineage({
|
|
21363
21467
|
harness,
|
|
@@ -21486,7 +21590,7 @@ const sandboxExecutor = (spec, ctx) => {
|
|
|
21486
21590
|
return artifact;
|
|
21487
21591
|
}
|
|
21488
21592
|
}, sandboxMaterialization, sandboxBinding);
|
|
21489
|
-
}
|
|
21593
|
+
}
|
|
21490
21594
|
async function* streamSandboxLeaf(args) {
|
|
21491
21595
|
const linked = linkAbort(args.signal, args.controller.signal);
|
|
21492
21596
|
const agentRun = {
|
|
@@ -22285,6 +22389,7 @@ function createExecutor(config) {
|
|
|
22285
22389
|
const sandboxClient = providerAsSandboxClient(provider, {
|
|
22286
22390
|
defaults: {
|
|
22287
22391
|
...providerSeam.defaults ?? {},
|
|
22392
|
+
idempotencyKey: providerSeam.defaults?.idempotencyKey ?? seamed.node?.attemptId ?? randomUUID(),
|
|
22288
22393
|
signal: seamed.signal
|
|
22289
22394
|
},
|
|
22290
22395
|
requireTerminalEvent: providerSeam.requireTerminalEvent,
|
|
@@ -22321,10 +22426,10 @@ function createExecutor(config) {
|
|
|
22321
22426
|
}
|
|
22322
22427
|
}
|
|
22323
22428
|
};
|
|
22324
|
-
const executor =
|
|
22429
|
+
const executor = sandboxExecutorForPath({
|
|
22325
22430
|
...spec,
|
|
22326
22431
|
harness
|
|
22327
|
-
}, providerCtx);
|
|
22432
|
+
}, providerCtx, "provider");
|
|
22328
22433
|
const wrapper = inheritRuntimeOwnedExecutorAttestation(executor, {
|
|
22329
22434
|
...executor,
|
|
22330
22435
|
runtime: providerSeam.runtime ?? provider.name
|
|
@@ -26073,7 +26178,11 @@ function ownerCaptureIdentity(attempt, owner) {
|
|
|
26073
26178
|
node
|
|
26074
26179
|
};
|
|
26075
26180
|
}
|
|
26076
|
-
/**
|
|
26181
|
+
/**
|
|
26182
|
+
* Recover evidence before reuse. An accepted turn requires a complete receipt. A failed turn
|
|
26183
|
+
* keeps its source and pending evidence, while the driver's own classification decides retry.
|
|
26184
|
+
* Retry uses another environment if recovery cannot certify the failed turn's workspace.
|
|
26185
|
+
*/
|
|
26077
26186
|
async function reconcileOwnerWorkspaceBeforeReuse(state, signal) {
|
|
26078
26187
|
const { args } = state;
|
|
26079
26188
|
const events = await args.journal.loadTree(args.rootId) ?? [];
|
|
@@ -26119,7 +26228,16 @@ async function reconcileOwnerWorkspaceBeforeReuse(state, signal) {
|
|
|
26119
26228
|
if (!hasDurableWorkspaceCapture(output, captured.snapshot, environmentId, attempt.executionId, controlRef, identity)) throw new Error(captured.incompleteReason ?? "accepted workspace capture is incomplete");
|
|
26120
26229
|
await state.context.onEvidence(output);
|
|
26121
26230
|
} catch (cause) {
|
|
26122
|
-
|
|
26231
|
+
const pending = new RetainedWorkspaceCapturePendingError(attempt.executionId ?? args.nodeId, cause);
|
|
26232
|
+
if (executorFailureReason(attempt.result) === void 0) throw pending;
|
|
26233
|
+
await state.context.onEvidence({
|
|
26234
|
+
executionId: attempt.executionId,
|
|
26235
|
+
environmentId,
|
|
26236
|
+
controlRef: attempt.controlByEnvironment.get(environmentId),
|
|
26237
|
+
...ownerCaptureIdentity(attempt, args),
|
|
26238
|
+
workspaceCaptureFailure: pending.message
|
|
26239
|
+
});
|
|
26240
|
+
state.forceNewSession = true;
|
|
26123
26241
|
}
|
|
26124
26242
|
}
|
|
26125
26243
|
}
|
|
@@ -26592,6 +26710,77 @@ function checkedSeatSelection(stage, selected) {
|
|
|
26592
26710
|
return selected;
|
|
26593
26711
|
}
|
|
26594
26712
|
//#endregion
|
|
26713
|
+
//#region src/runtime/supervise/worker-events.ts
|
|
26714
|
+
const MAX_EVENTS = 256;
|
|
26715
|
+
const MAX_BYTES = 262144;
|
|
26716
|
+
/** One worker's already-redacted live output. Accounting stays on Scope's existing usage channel. */
|
|
26717
|
+
var WorkerEvents = class {
|
|
26718
|
+
#epoch = randomUUID();
|
|
26719
|
+
#entries = [];
|
|
26720
|
+
#next = 0;
|
|
26721
|
+
#capturing = false;
|
|
26722
|
+
start() {
|
|
26723
|
+
this.#capturing = true;
|
|
26724
|
+
}
|
|
26725
|
+
#bytes = 0;
|
|
26726
|
+
append(event, at) {
|
|
26727
|
+
let entry = {
|
|
26728
|
+
sequence: this.#next++,
|
|
26729
|
+
at,
|
|
26730
|
+
event: defaultRedactor(event)
|
|
26731
|
+
};
|
|
26732
|
+
let bytes;
|
|
26733
|
+
try {
|
|
26734
|
+
bytes = Buffer.byteLength(JSON.stringify(entry));
|
|
26735
|
+
} catch {
|
|
26736
|
+
entry = {
|
|
26737
|
+
sequence: entry.sequence,
|
|
26738
|
+
at,
|
|
26739
|
+
event: null,
|
|
26740
|
+
omitted: "event-not-serializable"
|
|
26741
|
+
};
|
|
26742
|
+
bytes = Buffer.byteLength(JSON.stringify(entry));
|
|
26743
|
+
}
|
|
26744
|
+
if (bytes > MAX_BYTES) {
|
|
26745
|
+
entry = {
|
|
26746
|
+
sequence: entry.sequence,
|
|
26747
|
+
at,
|
|
26748
|
+
event: null,
|
|
26749
|
+
omitted: "event-too-large"
|
|
26750
|
+
};
|
|
26751
|
+
bytes = Buffer.byteLength(JSON.stringify(entry));
|
|
26752
|
+
}
|
|
26753
|
+
this.#entries.push({
|
|
26754
|
+
entry,
|
|
26755
|
+
bytes
|
|
26756
|
+
});
|
|
26757
|
+
this.#bytes += bytes;
|
|
26758
|
+
while (this.#entries.length > MAX_EVENTS || this.#bytes > MAX_BYTES) this.#bytes -= this.#entries.shift().bytes;
|
|
26759
|
+
}
|
|
26760
|
+
read(cursor) {
|
|
26761
|
+
if (!this.#capturing) return {
|
|
26762
|
+
status: "unavailable",
|
|
26763
|
+
reason: "not-captured"
|
|
26764
|
+
};
|
|
26765
|
+
if (cursor && (!Number.isSafeInteger(cursor.next) || cursor.next < 0)) throw new Error("worker event cursor must name a non-negative safe integer");
|
|
26766
|
+
const reset = cursor !== void 0 && cursor.epoch !== this.#epoch;
|
|
26767
|
+
const first = this.#entries[0]?.entry.sequence ?? this.#next;
|
|
26768
|
+
const start = reset ? first : cursor?.next ?? first;
|
|
26769
|
+
if (!reset && start > this.#next) throw new Error("worker event cursor is ahead of this stream");
|
|
26770
|
+
return {
|
|
26771
|
+
status: "available",
|
|
26772
|
+
entries: this.#entries.filter(({ entry }) => entry.sequence >= start).map(({ entry }) => structuredClone(entry)),
|
|
26773
|
+
cursor: {
|
|
26774
|
+
epoch: this.#epoch,
|
|
26775
|
+
next: this.#next
|
|
26776
|
+
},
|
|
26777
|
+
reset,
|
|
26778
|
+
historyExpired: start < first || cursor === void 0 && first > 0,
|
|
26779
|
+
remaining: 0
|
|
26780
|
+
};
|
|
26781
|
+
}
|
|
26782
|
+
};
|
|
26783
|
+
//#endregion
|
|
26595
26784
|
//#region src/runtime/supervise/scope.ts
|
|
26596
26785
|
/**
|
|
26597
26786
|
*
|
|
@@ -27309,6 +27498,7 @@ function createScope(args) {
|
|
|
27309
27498
|
live.teardownAttempts += 1;
|
|
27310
27499
|
});
|
|
27311
27500
|
const live = {
|
|
27501
|
+
events: new WorkerEvents(),
|
|
27312
27502
|
id,
|
|
27313
27503
|
status: permit.granted ? "acquiring" : "queued",
|
|
27314
27504
|
runtime: executor.runtime,
|
|
@@ -27518,6 +27708,7 @@ function createScope(args) {
|
|
|
27518
27708
|
...opts.successorOf === void 0 ? {} : { successorOf: opts.successorOf },
|
|
27519
27709
|
runtime: executor.runtime,
|
|
27520
27710
|
...identity ? { identity } : {},
|
|
27711
|
+
agent: authoredAgentIdentity(spec.profile, identity?.profileDigest),
|
|
27521
27712
|
budget: opts.budget,
|
|
27522
27713
|
depth: args.depth,
|
|
27523
27714
|
attemptId,
|
|
@@ -27756,6 +27947,37 @@ function createScope(args) {
|
|
|
27756
27947
|
nextResolved,
|
|
27757
27948
|
send,
|
|
27758
27949
|
progress,
|
|
27950
|
+
observeTree: () => {
|
|
27951
|
+
const view = makeTreeView(args.parentId, children);
|
|
27952
|
+
const nodes = new Map((args.resumeFrom?.view.nodes ?? []).map((node) => [node.id, node]));
|
|
27953
|
+
for (const node of view.nodes) nodes.set(node.id, node);
|
|
27954
|
+
for (const child of children.values()) {
|
|
27955
|
+
const nested = child.readNestedScope?.();
|
|
27956
|
+
if (nested) for (const node of (nested.observeTree?.() ?? nested.view).nodes) nodes.set(node.id, node);
|
|
27957
|
+
}
|
|
27958
|
+
const all = [...nodes.values()];
|
|
27959
|
+
return {
|
|
27960
|
+
root: view.root,
|
|
27961
|
+
nodes: all,
|
|
27962
|
+
inFlight: all.filter((node) => [
|
|
27963
|
+
"queued",
|
|
27964
|
+
"acquiring",
|
|
27965
|
+
"running"
|
|
27966
|
+
].includes(node.status)).length
|
|
27967
|
+
};
|
|
27968
|
+
},
|
|
27969
|
+
observeEvents: (nodeId, cursor) => {
|
|
27970
|
+
const child = children.get(nodeId);
|
|
27971
|
+
if (child) return child.events.read(cursor);
|
|
27972
|
+
for (const candidate of children.values()) {
|
|
27973
|
+
const page = (candidate.readNestedScope?.())?.observeEvents?.(nodeId, cursor);
|
|
27974
|
+
if (page && (page.status === "available" || page.reason !== "unknown-worker")) return page;
|
|
27975
|
+
}
|
|
27976
|
+
return {
|
|
27977
|
+
status: "unavailable",
|
|
27978
|
+
reason: args.resumeFrom?.view.nodes.some((node) => node.id === nodeId) ? "not-captured" : "unknown-worker"
|
|
27979
|
+
};
|
|
27980
|
+
},
|
|
27759
27981
|
traceSource,
|
|
27760
27982
|
interactive,
|
|
27761
27983
|
cancel,
|
|
@@ -28611,6 +28833,7 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
|
|
|
28611
28833
|
const ran = recovering ? executor.recover(task, childAbort.signal) : executor.execute(task, childAbort.signal);
|
|
28612
28834
|
let artifact;
|
|
28613
28835
|
if (isAsyncIterable(ran)) {
|
|
28836
|
+
live.events.start();
|
|
28614
28837
|
const spend = await foldStream(ran, async (running) => {
|
|
28615
28838
|
live.spent = running;
|
|
28616
28839
|
live.lastActivityAt = now();
|
|
@@ -28621,7 +28844,7 @@ async function runChild(live, executor, childAbort, task, opts, pool, ticket, bl
|
|
|
28621
28844
|
seq: nextProgressSeq(),
|
|
28622
28845
|
at: new Date(now()).toISOString()
|
|
28623
28846
|
});
|
|
28624
|
-
}, childAbort.signal, priorSpent);
|
|
28847
|
+
}, childAbort.signal, priorSpent, (event) => live.events.append(event, now()));
|
|
28625
28848
|
live.spent = spend;
|
|
28626
28849
|
const reported = executor.resultArtifact();
|
|
28627
28850
|
artifact = await retainOutput(reported, preserveUnknownTelemetry(spend, reported.spent));
|
|
@@ -28985,7 +29208,7 @@ function freezeCorrelation(value) {
|
|
|
28985
29208
|
* turns deep from one that had produced nothing. It also means a worker that THROWS mid-stream
|
|
28986
29209
|
* now reconciles its real partial spend instead of refunding work the provider already billed.
|
|
28987
29210
|
*/
|
|
28988
|
-
async function foldStream(stream, onProgress, signal, priorSpent) {
|
|
29211
|
+
async function foldStream(stream, onProgress, signal, priorSpent, onEvent) {
|
|
28989
29212
|
const totals = newUsageTotals(priorSpent);
|
|
28990
29213
|
const iterator = stream[Symbol.asyncIterator]();
|
|
28991
29214
|
try {
|
|
@@ -28993,6 +29216,7 @@ async function foldStream(stream, onProgress, signal, priorSpent) {
|
|
|
28993
29216
|
const next = signal ? await awaitAbortable(Promise.resolve(iterator.next()), signal) : await iterator.next();
|
|
28994
29217
|
if (next.done) break;
|
|
28995
29218
|
const ev = next.value;
|
|
29219
|
+
if (ev.kind === "progress") onEvent?.(ev.progress);
|
|
28996
29220
|
meterUsageEvent(totals, ev);
|
|
28997
29221
|
await onProgress?.({
|
|
28998
29222
|
...addResourceSpend(totals.resources),
|
|
@@ -29712,6 +29936,7 @@ function upstreamUnavailableSignal(error) {
|
|
|
29712
29936
|
const admission = retainedAdmissionCause(error);
|
|
29713
29937
|
if (admission !== void 0) return upstreamUnavailableSignal(admission);
|
|
29714
29938
|
if (!(error instanceof Error)) return void 0;
|
|
29939
|
+
if (isCredentialRefusal(error)) return void 0;
|
|
29715
29940
|
if (isProviderSchemaRejection(error)) return void 0;
|
|
29716
29941
|
if (error instanceof CheckUnavailableError) return "check-unavailable";
|
|
29717
29942
|
if (error instanceof HarnessTurnFailedError) {
|
|
@@ -29776,6 +30001,7 @@ function classifyDriverFailure(error, signal) {
|
|
|
29776
30001
|
if (admission !== void 0) return classifyDriverFailure(admission, signal);
|
|
29777
30002
|
if (error instanceof Error && errorProperty(error, "name") === "AbortError") return "terminal";
|
|
29778
30003
|
if (error instanceof Error && isProviderSchemaRejection(error)) return "terminal";
|
|
30004
|
+
if (isCredentialRefusal(error)) return "terminal";
|
|
29779
30005
|
if (error instanceof HarnessTurnFailedError) {
|
|
29780
30006
|
if (error.errorCode !== void 0 && DETERMINISTIC_BRIDGE_CODES.has(error.errorCode)) return "terminal";
|
|
29781
30007
|
if (isUpstreamUnavailable(error)) return "unavailable";
|
|
@@ -29817,7 +30043,7 @@ function retainedAdmissionCause(error) {
|
|
|
29817
30043
|
if (errorProperty(value, "name") === "RetainedRunProviderContractError") return void 0;
|
|
29818
30044
|
const status = errorHttpStatus(value);
|
|
29819
30045
|
if (status !== void 0 && status >= 400) return error.pendingCause === "request-rejected" || UNAVAILABLE_STATUSES.has(status) ? value : void 0;
|
|
29820
|
-
if (error.pendingCause === "request-rejected" && (value instanceof AgentEvalError$1 || isProviderSchemaRejection(value) || isDispatchNotAdmitted(value) || capacityCode(value) !== void 0)) return value;
|
|
30046
|
+
if (error.pendingCause === "request-rejected" && (value instanceof AgentEvalError$1 || isProviderSchemaRejection(value) || isDispatchNotAdmitted(value) || isCredentialRefusal(value) || capacityCode(value) !== void 0)) return value;
|
|
29821
30047
|
const members = Reflect.get(value, "errors");
|
|
29822
30048
|
if (Array.isArray(members)) queue.push(...members.slice(0, 12 - steps));
|
|
29823
30049
|
queue.push(value.cause);
|
|
@@ -31349,6 +31575,6 @@ function isNonEmptySpend(s) {
|
|
|
31349
31575
|
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);
|
|
31350
31576
|
}
|
|
31351
31577
|
//#endregion
|
|
31352
|
-
export { environmentReader as $,
|
|
31578
|
+
export { environmentReader as $, runtimeOwnedExecutorMaterialization as $i, captureWorkerTraceEvidence as $n, flatOtelSpan as $r, PEER_MAIL_WIRE_KEY as $t, scopeOwnerExecutorNodeContext as A, promptControlProfileMaterialization as Ai, resolveAgentEnvironmentProvider as An, persistHarnessTranscript as Ar, captureReusableExecutorConfig as At, consumeScopeRetainedOwnerResult as B, attestRuntimeOwnedPendingExecutor as Bi, FileResultBlobStore as Bn, ROUTER_PRICE_SOURCE as Br, createInPlaceCliExecutor as Bt, deriveNodeExecutionIdentity as C, decodeHarnessUsage as Ca, AGENT_PROFILE_MATERIALIZATION_AXES as Ci, readPromptOptions as Cn, openSlotGroup as Cr, createContinuationKeeper as Ct, recordScopeOwnerMaterialization as D, promptOptionsFromAgentTurnInput as Da, defineProfileMaterializationContract as Di, createAgentEnvironmentProviderRegistry as Dn, runAbortable as Dr, passedItems as Dt, recordScopeOwnerDriverAttempt as E, promptFromAgentTurnInput as Ea, controlProfileMaterialization as Ei, LEAF_CONTINUATION_TASK as En, linkAbort as Er, failedItems as Et, seatExecutionProfile as F, renderUnsupported as Fi, retainedExecutorSeamKey as Fn, createCodeModeTools as Fr, snapshotExecutorConfig as Ft, scopeRetainedOwnerContext as G, inheritRuntimeOwnedExecutorAttestation as Gi, loadSpawnForest as Gn, defaultRedactor as Gr, workerTraceSeamKey as Gt, prepareScopeRetainedOwnerSeatSwitch as H, authoredAgentIdentity as Hi, InMemoryResultBlobStore as Hn, mergeTraceEnv as Hr, readWorkerTraceContext as Ht, abandonScopeRetainedOwnerInvocation as I, sandboxActProfileMaterialization as Ii, unavailablePauseMs as In, describeCodeModeTools as Ir, createWorktreeCliExecutor as It, scopeRetainedOwnerResourceReader as J, newExecutionAttemptId as Ji, isNoEntError as Jn, buildLoopOtelSpans as Jr, createActivityLog as Jt, scopeRetainedOwnerJournalRoot as K, knownExecutionBindingReceipt as Ki, materializeTreeView as Kn, defaultRedactorIdentityMaterial as Kr, taskToPrompt as Kt, beginScopeRetainedOwnerDrive as L, unsupportedProfileDimensions as Li, unavailableSignalOfFailure as Ln, runCodeMode as Lr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as Lt, SeatChain as M, promptOnlyProfileMaterialization as Mi, decodeToolPart as Mn, resolveHarnessTranscriptCapture as Mr, cliWorktreeExecutor as Mt, SeatChainExhaustedError as N, promptResourceProfileMaterialization as Ni, sandboxSessionTraceSource as Nn, retainHarnessTranscript as Nr, createExecutor as Nt, recordScopeOwnerPause as O, providerMessageText as Oa, fullProfileMaterialization as Oi, providerAsExecutor as On, captureHarnessTranscript as Or, verdictFromJudgeScore as Ot, authoredSeatStages as P, renderProfileMaterializationIssues as Pi, registerRetainedExecutorPreparation as Pn, contentAddress as Pr, createExecutorRegistry as Pt, SPAWN_RESOURCE_PATH_MAX_BYTES as Q, runtimeOwnedExecutorExecutionBinding as Qi, WORKER_TOOL_TRACE_SCHEMA_VERSION as Qn, createOtelExporter as Qr, DEFAULT_PEER_MAIL_LIMITS as Qt, bindScopeRetainedOwnerEnvironmentId as R, validateProfileMaterialization as Ri, TRACE_ROOT_SCHEMA as Rn, priceTokens as Rr, createSteerableSandboxSession as Rt, createScope as S, sumSandboxUsage as Sa, terminateProcessTreeAndConfirm as Si, assertBoxlessPromptOptions as Sn, createWorkerSlots as Sr, checkVerdictOf as St, meterRuntimeOwnedProviderAttempt as T, awaitAbortable$1 as Ta, assertProfileMaterializes as Ti, runBrainLoop as Tn, abortError as Tr, expandQuestions as Tt, prepareScopeRetainedOwnerTask as U, authoredProfileDigest as Ui, InMemorySpawnJournal as Un, readTraceContextFromEnv as Ur, workerTraceEnv as Ut, noteScopeRetainedOwnerCoordination as V, attestRuntimeOwnedScopeOwner as Vi, FileSpawnJournal as Vn, createPropagatingTraceEmitter as Vr, WORKER_TRACE_PROPAGATION as Vt, reconcileScopeRetainedOwnerEnvironment as W, finalizeRuntimeOwnedPendingExecutor as Wi, insideCursorNamespace as Wn, traceContextToEnv as Wr, workerTraceHeaders as Wt, scopeRetainedOwnerResult as X, recordRuntimeOwnedDriveHarnessProviderEvidence as Xi, readCommittedJsonLines as Xn, buildRuntimeEventOtelSpans as Xr, createInbox as Xt, scopeRetainedOwnerRestorePoint as Y, providerAttemptEvidence as Yi, prepareJsonlAppend as Yn, buildLoopSpanNodes as Yr, readWorkerProgress as Yt, scopeRetainedOwnerTurnEnded as Z, runtimeOwnedDriveHarnessProviderEvidence as Zi, writeAllBytes as Zn, createOpenInferenceFileExporter as Zr, AUTHORITY_MARKERS as Zt, isDriverSpec as _, mapSandboxEvent as _a, harnessInvocation as _i, runAgentRounds as _n, startRetainedRun as _r, CONTINUATION_FACTS as _t, collectDelivered as a, executableAgentProfileSnapshot as aa, createRuntimeEventCollector as ai, isLiveNodeStatus as an, ReservationWaitRefused as ar, interactiveAdmissionSeamKey as at, assertRecursiveReservationPolicy as b, sandboxEventServedBackend as ba, parseCodexTokenUsage as bi, SandboxEvidenceRetentionError as bn, destroyInteractiveEnvironment as br, admitFinding as bt, runTree as c, detachedSnapshot as ca, sanitizeKnowledgeReadinessReport as ci, bridgeModelRouteRefusal as cn, meterUsageEvent as cr, reconnectRetainedInteractiveRun as ct, classifyDriverFailure as d, assertSandboxServedModel as da, runWorktreeHarness as di, harnessUsageIsEmpty as dn, spendFromUsageTotals as dr, freeSlots as dt, runtimeOwnedExecutorProviderEvidence as ea, generateSpanId as ei, claimsAuthority as en, isTraceAnalysisStore as er, hostDirectoryReader as et, runDriverWithRetry as f, canonicalStreamEventFromSandboxEvent as fa, captureWorktreeDiff as fi, readCodexRolloutSession as fn, bridgeRuntimeAttachmentsKey as fr, queueOf as ft, driverExecutorFactory as g, isSandboxTerminalEvent as ga, LOCAL_HARNESSES as gi, isTerminalDecision as gn, recoverRetainedRun as gr, CONTINUATIONS_DIR as gt, driverChild as h, extractLlmCallEvent as ha, DEFAULT_LOCAL_HARNESS as hi, defaultSelectWinner as hn, reconnectRetainedRun as hr, mapExecutorResult as ht, bestDelivered as i, unknownMaterializationReceipt as ia, toOtelAttributes as ii, peerMailVerbNames as in, BudgetReconcileFault as ir, providerVisibleProfile as it, settledToIteration as j, promptModelProfileMaterialization as ji, createPushTraceSource as jn, readHarnessTranscript as jr, cliInPlaceExecutor as jt, restoreScopeOwnerAcceptedExecution as k, profileMaterializationAxes$1 as ki, providerAsSandboxClient as kn, harnessTranscriptArtifact as kr, bindReusableExecutorExecutionId as kt, DriverAttemptsExhaustedError as l, projectSandboxOutcome as la, sanitizeRuntimeStreamEvent as li, addHarnessUsage as ln, newUsageTotals as lr, recoverRetainedInteractiveRun as lt, upstreamUnavailableSignal as m, createSandboxUsageLedger as ma, removeWorktree as mi, createSandboxForSpec as mn, errMessage as mr, gateOnDeliverable as mt, createRootHandle as n, runtimeOwnedScopeOwnerRuntime as na, padSpanId as ni, isPeerMailEnvelope as nn, workerTraceAnalysisStore as nr, coordinationMcpAlias as nt, pickBestDelivered as o, executableAgentSpecSnapshot as oa, createRuntimeStreamEventCollector as oi, isTerminalNodeStatus as on, assertValidBudget as or, attachWorker as ot, summarizeDriverAttempts as p, createSandboxToolPartState as pa, createWorktree as pi, TERMINAL_DECISIONS as pn, bridgeStopSignalKey as pr, rollingDispatch as pt, scopeRetainedOwnerPriorSpend as q, knownMaterializationReceipt as qi, replaySpawnTree as qn, resolveRedactor as qr, DEFAULT_STALL_AFTER_MS as qt, createSupervisor as r, unknownExecutionBindingReceipt as ra, padTraceId as ri, peerMailTools as rn, executorFailure as rr, coordinationProfileToolPrefix as rt, runFinalizer as s, detachedFrozen as sa, sanitizeAgentRuntimeEvent as si, bridgeAdmissionRefusal as sn, createBudgetPool as sr, readWorkerInteractiveBinding as st, DEFAULT_MAX_DEPTH as t, runtimeOwnedPendingExecutorMaterialization as ta, loopEventToOtelSpan as ti, createPeerMailbox as tn, parseWorkerToolTraceArtifact as tr, resolveSpawnResourcePaths as tt, HarnessTurnFailedError as u, readSandboxOutcome as ua, runSettledCommand as ui, createCodexRolloutStoreReader as un, spendFromUsageEvents as ur, startRetainedInteractiveRun as ut, withDriverExecutor as v, mapSandboxToolEvent as va, harnessSupportsReasoningEffort as vi, createSandboxLineage as vn, startRetainedRunInEnvironment as vr, CheckUnavailableError as vt, meterRuntimeOwnedAccounting as w, abortError$1 as wa, assertProfileMaterialization as wi, routerBrain as wn, RunCancellationReason as wr, distillFindings as wt, beginScopeOwnerAttempt as x, sandboxProgressEvents as xa, CodexExecutionDiagnosticError as xi, captureBeforeDestroy as xn, environmentGone as xr, bestComposite as xt, SUBTREE_RESULT_LIMIT as y, notifySandboxEventObserver as ya, localHarnessExecutable as yi, acquireSandbox as yn, retainedCreateMaterial as yr, admitContinuationPolicy as yt, bindScopeRetainedOwnerProvider as z, worktreeCliProfileMaterialization as zi, TRACE_SUMMARY_SCHEMA as zn, routerTokenPrice as zr, createRouterTranscript as zt };
|
|
31353
31579
|
|
|
31354
|
-
//# sourceMappingURL=supervisor-
|
|
31580
|
+
//# sourceMappingURL=supervisor-dlufUXys.js.map
|