@tangle-network/agent-runtime 0.259.1 → 0.262.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-Btw2npV2.js → activation-C0AoYRgS.js} +3 -3
- package/dist/{activation-Btw2npV2.js.map → activation-C0AoYRgS.js.map} +1 -1
- package/dist/{activation-Cus2oZaT.d.ts → activation-CozZXBTg.d.ts} +2 -2
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/{bundle-DXrBPEFw.js → bundle-CvLGRVO-.js} +2 -2
- package/dist/{bundle-DXrBPEFw.js.map → bundle-CvLGRVO-.js.map} +1 -1
- package/dist/candidate-execution/index.js +5 -4
- package/dist/candidate-execution/index.js.map +1 -1
- package/dist/{coordination-driver-BmtrkNPu.js → coordination-driver-COGC8FK2.js} +377 -32
- package/dist/coordination-driver-COGC8FK2.js.map +1 -0
- package/dist/{delegate-DJgmZZKH.js → delegate-BC7Au73v.js} +2 -2
- package/dist/{delegate-DJgmZZKH.js.map → delegate-BC7Au73v.js.map} +1 -1
- package/dist/durable.d.ts +285 -57
- package/dist/durable.js +637 -108
- package/dist/durable.js.map +1 -1
- package/dist/{graph-BKRvWzHx.js → graph-DgODOGWN.js} +4 -3
- package/dist/graph-DgODOGWN.js.map +1 -0
- package/dist/{improvement-cycle-D0Os0Hg_.js → improvement-cycle-DirqO-fX.js} +8 -7
- package/dist/improvement-cycle-DirqO-fX.js.map +1 -0
- package/dist/{index-sGOO254Q.d.ts → index-B8tXCisZ.d.ts} +251 -293
- package/dist/index.d.ts +6 -6
- package/dist/index.js +9 -9
- package/dist/intelligence.d.ts +3 -3
- package/dist/intelligence.js +7 -6
- 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-DAU4rNIL.d.ts → loop-runner-bin-BaZd1XIm.d.ts} +3 -3
- package/dist/{loop-runner-bin-pRlDgm1i.js → loop-runner-bin-C9P1ELVv.js} +3 -3
- package/dist/{loop-runner-bin-pRlDgm1i.js.map → loop-runner-bin-C9P1ELVv.js.map} +1 -1
- 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 +6 -6
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-BsqD1_Zr.d.ts → openai-tools-CHwN_S24.d.ts} +2 -2
- package/dist/{prepare-RuaAclli.js → prepare-oHUQdC5-.js} +22 -452
- package/dist/prepare-oHUQdC5-.js.map +1 -0
- package/dist/profile-D3eXNBQV.js +438 -0
- package/dist/profile-D3eXNBQV.js.map +1 -0
- package/dist/profiles.d.ts +2 -2
- package/dist/{protected-model-port-BFhSgMAy.js → protected-model-port-DqF0qDU6.js} +4 -3
- package/dist/{protected-model-port-BFhSgMAy.js.map → protected-model-port-DqF0qDU6.js.map} +1 -1
- package/dist/{provision-supervisor-B9tf4soF.js → provision-supervisor-9FMwo-Es.js} +3 -3
- package/dist/{provision-supervisor-B9tf4soF.js.map → provision-supervisor-9FMwo-Es.js.map} +1 -1
- package/dist/{runtime-DKiucqGX.js → runtime-BXWVW51r.js} +218 -20
- package/dist/runtime-BXWVW51r.js.map +1 -0
- package/dist/{server-DIsiQ6mu.js → server-6g6KFwUC.js} +3 -3
- package/dist/{server-DIsiQ6mu.js.map → server-6g6KFwUC.js.map} +1 -1
- package/dist/{stream-agent-turn-DRTFLphI.d.ts → stream-agent-turn-u28hoxuR.d.ts} +2 -2
- package/dist/{structural-rollout-BIBxgW64.js → structural-rollout-WEfWpjub.js} +2 -2
- package/dist/{structural-rollout-BIBxgW64.js.map → structural-rollout-WEfWpjub.js.map} +1 -1
- package/dist/{substrate-BToFBpfh.d.ts → substrate-BeQiXkpa.d.ts} +2 -2
- package/dist/{supervise-DsQjhLN-.js → supervise-BeAI8-On.js} +295 -51
- package/dist/supervise-BeAI8-On.js.map +1 -0
- package/dist/{supervisor-CJyzUjc7.js → supervisor-BGGvnXvV.js} +243 -24
- package/dist/{supervisor-CJyzUjc7.js.map → supervisor-BGGvnXvV.js.map} +1 -1
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +14 -14
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-ChewVlpE.d.ts → types-CP3iQ8Ji.d.ts} +376 -4
- package/dist/{workspace-archive-DQGFwvM6.js → workspace-archive-C9lgf77y.js} +11 -11
- package/dist/workspace-archive-C9lgf77y.js.map +1 -0
- package/package.json +5 -5
- package/dist/coordination-driver-BmtrkNPu.js.map +0 -1
- package/dist/graph-BKRvWzHx.js.map +0 -1
- package/dist/improvement-cycle-D0Os0Hg_.js.map +0 -1
- package/dist/prepare-RuaAclli.js.map +0 -1
- package/dist/runtime-DKiucqGX.js.map +0 -1
- package/dist/supervise-DsQjhLN-.js.map +0 -1
- package/dist/workspace-archive-DQGFwvM6.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as RetainedInteractiveAdmissionError, d as RetainedRunDispatchBindingError, f as RuntimeRunStateError, i as ConfigError, l as RetainedInteractiveBindingError, m as ValidationError$1, r as BackendTransportError, t as AgentEvalError$1, u as RetainedRunAdmissionError } from "./errors-DodWX-cb.js";
|
|
2
2
|
import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, l as profileProviderModel, o as enforceTokenLimits, s as profileBridgeWireModel, t as assertExecutableAgentProfile, u as resolveRouterRetryPolicy } from "./model-policy-BbSCSak0.js";
|
|
3
|
-
import {
|
|
3
|
+
import { i as verifyAgentCandidateWorkspaceArchive, x as verifyWorkspaceSnapshotArtifacts } from "./workspace-archive-C9lgf77y.js";
|
|
4
4
|
import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
|
|
5
5
|
import { n as assertNoSymlinkDescendant, r as publishExclusiveDurableFile } from "./durable-file-DWQA4ooo.js";
|
|
6
6
|
import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentEnvironmentCapabilitiesSchema, AgentExactRunControlRefSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentNativeContextContinuationResultSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, AgentTurnInputSchema, AgentTurnResultSchema, CanonicalStreamEventSchema, ContextTransferRequestSchema, InteractionAcknowledgementSchema, InteractionResponseCommandSchema, NativeContextBoundaryProofSchema, NativeContextContinuationRequestSchema, REASONING_EFFORTS, RuntimeEventEnvelopeSchema, TerminalReplayWindowSchema, TerminalSessionRefSchema, WorkspaceRequestSchema, agentCandidateWorkspaceSnapshotEvidenceSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentNativeContextContinuationResultMatchesRequest, agentProfileSchema, agentRunCancellationAcknowledgementMatchesRequest, agentRunCancellationRequestDigest, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalWorkspaceCwd, exactAgentInteractiveSessionStart, harnessSystemPromptIntents, harnessTypeSchema, nativeContextContinuationTurnDigest, nativeReasoningControl, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, renderInputPartsAsText, sha256DigestSchema, workspaceCwdPathForBase } from "@tangle-network/agent-interface";
|
|
@@ -2409,6 +2409,16 @@ function providerAttemptEvidence(model) {
|
|
|
2409
2409
|
}
|
|
2410
2410
|
//#endregion
|
|
2411
2411
|
//#region src/durable/jsonl-file.ts
|
|
2412
|
+
/** Parse in-memory evidence with the same commit boundary as streamed journal reads. */
|
|
2413
|
+
function parseCommittedJsonLines(text, source) {
|
|
2414
|
+
const lines = text.split("\n");
|
|
2415
|
+
const records = [];
|
|
2416
|
+
for (const [index, line] of lines.entries()) {
|
|
2417
|
+
const record = parseRecord(line, source, index + 1, index < lines.length - 1);
|
|
2418
|
+
if (record !== void 0) records.push(record.value);
|
|
2419
|
+
}
|
|
2420
|
+
return records;
|
|
2421
|
+
}
|
|
2412
2422
|
/** Read a fixed file prefix one record at a time, never allocating the whole journal as a string.
|
|
2413
2423
|
* A reader cannot chase concurrent appends forever. Missing files are empty only when requested;
|
|
2414
2424
|
* corruption, short reads, and other I/O errors remain failures. Closing the iterator closes the fd. */
|
|
@@ -16763,7 +16773,7 @@ var SpawnEventIndex = class {
|
|
|
16763
16773
|
/** Called only after validation and, for the file writer, a successful durable append. */
|
|
16764
16774
|
add(event) {
|
|
16765
16775
|
if (!outsideCursorNamespace(event)) this.cursors.add(event.seq);
|
|
16766
|
-
if (event.kind !== "spawned" && event.kind !== "materialized" && event.kind !== "execution-bound" && event.kind !== "execution-input" && event.kind !== "execution-admitted" && event.kind !== "execution-result" && !closesCursorSlot(event)) return;
|
|
16776
|
+
if (event.kind !== "spawned" && event.kind !== "materialized" && event.kind !== "execution-bound" && event.kind !== "execution-input" && event.kind !== "execution-admitted" && event.kind !== "execution-result" && event.kind !== "environment-teardown" && !closesCursorSlot(event)) return;
|
|
16767
16777
|
let node = this.nodes.get(event.id);
|
|
16768
16778
|
if (!node) {
|
|
16769
16779
|
node = {
|
|
@@ -16774,10 +16784,16 @@ var SpawnEventIndex = class {
|
|
|
16774
16784
|
inputs: /* @__PURE__ */ new Set(),
|
|
16775
16785
|
input: false,
|
|
16776
16786
|
result: false,
|
|
16777
|
-
admissions: /* @__PURE__ */ new Map()
|
|
16787
|
+
admissions: /* @__PURE__ */ new Map(),
|
|
16788
|
+
destroyedEnvironments: /* @__PURE__ */ new Set()
|
|
16778
16789
|
};
|
|
16779
16790
|
this.nodes.set(event.id, node);
|
|
16780
16791
|
}
|
|
16792
|
+
if (event.kind === "environment-teardown") {
|
|
16793
|
+
if (event.destroyed) node.destroyedEnvironments.add(event.environmentId);
|
|
16794
|
+
return;
|
|
16795
|
+
}
|
|
16796
|
+
if (event.kind === "execution-admitted" && event.admission.phase === "environment") node.lastEnvironmentId = event.admission.environmentId;
|
|
16781
16797
|
if (event.kind === "spawned") node.spawned = true;
|
|
16782
16798
|
else if (event.kind === "materialized") node.materialized = true;
|
|
16783
16799
|
else if (event.kind === "execution-bound") node.bindings.add(event.binding.attemptId);
|
|
@@ -16800,7 +16816,10 @@ var SpawnEventIndex = class {
|
|
|
16800
16816
|
if (event.kind === "execution-input") {
|
|
16801
16817
|
if (!/^sha256:[0-9a-f]{64}$/.test(event.taskRef)) fail("has an invalid task reference");
|
|
16802
16818
|
if (node.inputs.has(event.seq)) fail("has duplicate input sequence");
|
|
16803
|
-
|
|
16819
|
+
const environment = node.admissions.get("environment");
|
|
16820
|
+
const ranIn = environment?.phase === "environment" ? environment.environmentId : node.lastEnvironmentId;
|
|
16821
|
+
const abandoned = ranIn !== void 0 && node.destroyedEnvironments.has(ranIn);
|
|
16822
|
+
if (node.input && !node.result && !abandoned) fail("input replaces an unfinished invocation");
|
|
16804
16823
|
return;
|
|
16805
16824
|
}
|
|
16806
16825
|
if (event.kind === "execution-result") {
|
|
@@ -21722,6 +21741,86 @@ function hasDurableWorkspaceSnapshot(value) {
|
|
|
21722
21741
|
const parsed = agentCandidateWorkspaceSnapshotEvidenceSchema.safeParse(value);
|
|
21723
21742
|
return parsed.success && "locator" in parsed.data.manifest && "locator" in parsed.data.archive;
|
|
21724
21743
|
}
|
|
21744
|
+
/** Environment ids this owner's provider confirmed gone, from their teardown receipts. */
|
|
21745
|
+
function destroyedEnvironmentIds(owned) {
|
|
21746
|
+
return new Set(owned.flatMap((event) => event.kind === "environment-teardown" && event.destroyed ? [event.environmentId] : []));
|
|
21747
|
+
}
|
|
21748
|
+
/** The environment the owner's next invocation would continue in, when there is one: the latest
|
|
21749
|
+
* environment admission of this owner, which is either the current invocation's own (recovered
|
|
21750
|
+
* in place) or the one a deliberate later invocation reuses after an accepted result. `inFlight`
|
|
21751
|
+
* says whether the latest invocation has no result yet. */
|
|
21752
|
+
function continuedEnvironment(owned) {
|
|
21753
|
+
const latestInput = [...owned].reverse().find((event) => event.kind === "execution-input");
|
|
21754
|
+
if (latestInput === void 0) return void 0;
|
|
21755
|
+
const attempt = owned.slice(owned.indexOf(latestInput));
|
|
21756
|
+
const admission = [...owned].reverse().flatMap((event) => event.kind === "execution-admitted" && event.admission.phase === "environment" ? [event.admission] : [])[0];
|
|
21757
|
+
if (admission === void 0) return void 0;
|
|
21758
|
+
return {
|
|
21759
|
+
admission,
|
|
21760
|
+
inFlight: !attempt.some((event) => event.kind === "execution-result")
|
|
21761
|
+
};
|
|
21762
|
+
}
|
|
21763
|
+
/**
|
|
21764
|
+
* Confirm, before a new drive, that the environment the owner would continue in still exists.
|
|
21765
|
+
*
|
|
21766
|
+
* A retained invocation whose environment is gone can never be recovered: the retained path asked
|
|
21767
|
+
* the provider to reconnect, the provider answered `Sandbox not found`, and every later attempt
|
|
21768
|
+
* repeated that refusal until the barren streak ended the run. Measured on the real opencode path
|
|
21769
|
+
* (autopsy-a-before-20260924a, agent-runtime 5c22fbb2): the root sandbox was deleted 17 s after it
|
|
21770
|
+
* dispatched a child, four attempts in 64 s each refused "retained provider execution requires
|
|
21771
|
+
* reconciliation before replacement", and the run settled `driver-failed` while the child it had
|
|
21772
|
+
* commissioned settled `done` two minutes later, unread.
|
|
21773
|
+
*
|
|
21774
|
+
* The reconciliation refusal protects against paying twice for an execution that may still run.
|
|
21775
|
+
* An environment the provider no longer holds runs nothing, so there is nothing to reconcile: the
|
|
21776
|
+
* loss is journaled as a destroyed teardown receipt, and the next prepare starts a new invocation.
|
|
21777
|
+
*/
|
|
21778
|
+
async function reconcileScopeRetainedOwnerEnvironment(scope) {
|
|
21779
|
+
const state = owners.get(scope);
|
|
21780
|
+
if (!state?.provider) return { state: "none" };
|
|
21781
|
+
const { provider, args } = state;
|
|
21782
|
+
const owned = (await args.journal.loadTree(args.rootId) ?? []).filter((event) => event.id === args.nodeId);
|
|
21783
|
+
const continued = continuedEnvironment(owned);
|
|
21784
|
+
if (continued === void 0) return { state: "none" };
|
|
21785
|
+
const environmentId = continued.admission.environmentId;
|
|
21786
|
+
if (destroyedEnvironmentIds(owned).has(environmentId)) return {
|
|
21787
|
+
state: "lost",
|
|
21788
|
+
environmentId
|
|
21789
|
+
};
|
|
21790
|
+
if (!provider.get) return {
|
|
21791
|
+
state: "unknown",
|
|
21792
|
+
environmentId
|
|
21793
|
+
};
|
|
21794
|
+
let environment;
|
|
21795
|
+
try {
|
|
21796
|
+
environment = await runAbortable(() => provider.get(environmentId), AbortSignal.any([scope.signal, AbortSignal.timeout(3e4)]), "retained owner environment check timed out");
|
|
21797
|
+
} catch {
|
|
21798
|
+
return {
|
|
21799
|
+
state: "unknown",
|
|
21800
|
+
environmentId
|
|
21801
|
+
};
|
|
21802
|
+
}
|
|
21803
|
+
if (environment !== null) return {
|
|
21804
|
+
state: "live",
|
|
21805
|
+
environmentId,
|
|
21806
|
+
inFlight: continued.inFlight
|
|
21807
|
+
};
|
|
21808
|
+
scope.signal.throwIfAborted();
|
|
21809
|
+
await args.journal.appendEvent(args.rootId, {
|
|
21810
|
+
kind: "environment-teardown",
|
|
21811
|
+
id: args.nodeId,
|
|
21812
|
+
provider: provider.name,
|
|
21813
|
+
environmentId,
|
|
21814
|
+
destroyed: true,
|
|
21815
|
+
detail: "lost: the provider no longer holds this environment, so the next invocation starts in a new one",
|
|
21816
|
+
seq: state.nextSequence(),
|
|
21817
|
+
at: new Date(args.now()).toISOString()
|
|
21818
|
+
});
|
|
21819
|
+
return {
|
|
21820
|
+
state: "lost",
|
|
21821
|
+
environmentId
|
|
21822
|
+
};
|
|
21823
|
+
}
|
|
21725
21824
|
/** Resume the original backend prompt; rebuilt coordination observations cannot replace it. */
|
|
21726
21825
|
async function prepareScopeRetainedOwnerTask(scope, task) {
|
|
21727
21826
|
const state = owners.get(scope);
|
|
@@ -21738,6 +21837,14 @@ async function prepareScopeRetainedOwnerTask(scope, task) {
|
|
|
21738
21837
|
const accepted = [...attempt].reverse().find((event) => event.kind === "execution-result");
|
|
21739
21838
|
if (accepted?.kind === "execution-result") state.acceptedRef = accepted;
|
|
21740
21839
|
}
|
|
21840
|
+
const destroyed = destroyedEnvironmentIds(owned);
|
|
21841
|
+
const inFlight = continuedEnvironment(owned);
|
|
21842
|
+
if (inFlight?.inFlight && destroyed.has(inFlight.admission.environmentId)) {
|
|
21843
|
+
delete state.inputSequence;
|
|
21844
|
+
delete state.taskRef;
|
|
21845
|
+
state.admissions.length = 0;
|
|
21846
|
+
delete state.priorSession;
|
|
21847
|
+
}
|
|
21741
21848
|
if (state.prepared && state.acceptedRef && state.acceptedConsumed) {
|
|
21742
21849
|
const currentEnvironment = [...state.admissions].reverse().find((admission) => admission.phase === "environment");
|
|
21743
21850
|
if (currentEnvironment?.phase === "environment") state.priorSession = currentEnvironment;
|
|
@@ -21748,6 +21855,7 @@ async function prepareScopeRetainedOwnerTask(scope, task) {
|
|
|
21748
21855
|
state.admissions.length = 0;
|
|
21749
21856
|
delete state.acceptedConsumed;
|
|
21750
21857
|
}
|
|
21858
|
+
if (state.priorSession !== void 0 && destroyed.has(state.priorSession.environmentId)) delete state.priorSession;
|
|
21751
21859
|
state.prepared = true;
|
|
21752
21860
|
if (state.taskRef !== void 0) {
|
|
21753
21861
|
const original = await args.blobs.get(state.taskRef);
|
|
@@ -22145,6 +22253,14 @@ function hasRetriableTeardowns(scope, release) {
|
|
|
22145
22253
|
function closeScopeAdmission(scope) {
|
|
22146
22254
|
admissionSeals.get(scope)?.();
|
|
22147
22255
|
}
|
|
22256
|
+
/** Fail before execution when an opted-in run cannot leave a live slot at every depth. */
|
|
22257
|
+
function assertRecursiveReservationPolicy(policy, maxDepth, maxLiveWorkers) {
|
|
22258
|
+
if (policy === void 0) return;
|
|
22259
|
+
if (typeof policy !== "object" || policy === null || Object.keys(policy).some((key) => key !== "ownerShare")) throw new ValidationError$1("reservationPolicy accepts only ownerShare");
|
|
22260
|
+
if (!Number.isFinite(policy.ownerShare) || policy.ownerShare <= 0 || policy.ownerShare >= 1) throw new ValidationError$1("reservationPolicy.ownerShare must be greater than 0 and less than 1");
|
|
22261
|
+
if (!Number.isSafeInteger(maxDepth) || maxDepth === void 0 || maxDepth < 2) throw new ValidationError$1("reservationPolicy requires maxDepth >= 2");
|
|
22262
|
+
if (!Number.isSafeInteger(maxLiveWorkers) || maxLiveWorkers === void 0 || maxLiveWorkers < maxDepth) throw new ValidationError$1("reservationPolicy requires maxLiveWorkers >= maxDepth to preserve a descendant path");
|
|
22263
|
+
}
|
|
22148
22264
|
/**
|
|
22149
22265
|
* The recursion seam key. A `Scope` seeds a value of this on each child's
|
|
22150
22266
|
* `ExecutorContext.seams` so a child whose executor is a DRIVER can mount a NESTED `Scope`
|
|
@@ -22157,13 +22273,14 @@ function makeNestedScopeSeam(args, liveWorkerCapacity, childNodeId, childBudget,
|
|
|
22157
22273
|
const mountScope = (nestedRoot, signal, restored) => {
|
|
22158
22274
|
const mountedAtMs = now();
|
|
22159
22275
|
const deadlineMs = childDeadlineAtMs === void 0 ? void 0 : Math.max(0, childDeadlineAtMs - mountedAtMs);
|
|
22276
|
+
const nestedBudget = {
|
|
22277
|
+
...childBudget,
|
|
22278
|
+
...deadlineMs !== void 0 ? { deadlineMs } : {}
|
|
22279
|
+
};
|
|
22160
22280
|
return createScope({
|
|
22161
22281
|
parentId: childNodeId,
|
|
22162
22282
|
root: nestedRoot,
|
|
22163
|
-
pool: createBudgetPool(
|
|
22164
|
-
...childBudget,
|
|
22165
|
-
...deadlineMs !== void 0 ? { deadlineMs } : {}
|
|
22166
|
-
}, mountedAtMs, restored?.poolRestore),
|
|
22283
|
+
pool: createBudgetPool(nestedBudget, mountedAtMs, restored?.poolRestore),
|
|
22167
22284
|
journal: args.journal,
|
|
22168
22285
|
blobs: args.blobs,
|
|
22169
22286
|
executors: args.executors,
|
|
@@ -22171,6 +22288,10 @@ function makeNestedScopeSeam(args, liveWorkerCapacity, childNodeId, childBudget,
|
|
|
22171
22288
|
depth: args.depth + 1,
|
|
22172
22289
|
...args.maxDepth !== void 0 ? { maxDepth: args.maxDepth } : {},
|
|
22173
22290
|
liveWorkerCapacity,
|
|
22291
|
+
...args.reservationPolicy ? {
|
|
22292
|
+
reservationPolicy: args.reservationPolicy,
|
|
22293
|
+
ownerBudget: nestedBudget
|
|
22294
|
+
} : {},
|
|
22174
22295
|
signal,
|
|
22175
22296
|
...restored ? { resumeFrom: restored.resumeFrom } : {},
|
|
22176
22297
|
...args.now ? { now: args.now } : {},
|
|
@@ -22209,6 +22330,16 @@ function createScope(args) {
|
|
|
22209
22330
|
max: normalizeLiveWorkerLimit(args.maxLiveWorkers),
|
|
22210
22331
|
live: 0
|
|
22211
22332
|
};
|
|
22333
|
+
const reservationPolicy = args.reservationPolicy;
|
|
22334
|
+
assertRecursiveReservationPolicy(reservationPolicy, args.maxDepth, liveWorkerCapacity.max);
|
|
22335
|
+
if (reservationPolicy && !args.ownerBudget) throw new ValidationError$1("reservationPolicy requires the owning scope budget");
|
|
22336
|
+
const ownerBudget = args.ownerBudget;
|
|
22337
|
+
const ownerFloor = reservationPolicy && ownerBudget ? {
|
|
22338
|
+
tokens: Math.ceil(ownerBudget.maxTokens * reservationPolicy.ownerShare),
|
|
22339
|
+
iterations: Math.ceil(ownerBudget.maxIterations * reservationPolicy.ownerShare),
|
|
22340
|
+
...ownerBudget.maxUsd === void 0 ? {} : { usd: ownerBudget.maxUsd * reservationPolicy.ownerShare }
|
|
22341
|
+
} : void 0;
|
|
22342
|
+
const admissionMax = reservationPolicy && liveWorkerCapacity.max !== void 0 && args.maxDepth !== void 0 ? liveWorkerCapacity.max - Math.max(0, args.maxDepth - (args.depth + 1)) : liveWorkerCapacity.max;
|
|
22212
22343
|
let spawnOrdinal = args.resumeFrom ? args.resumeFrom.maxSpawnOrdinal + 1 : 0;
|
|
22213
22344
|
let cursorSeq = args.resumeFrom ? args.resumeFrom.maxCursorSeq + 1 : 0;
|
|
22214
22345
|
let waitOrdinal = args.resumeFrom ? args.resumeFrom.maxWaitOrdinal + 1 : 0;
|
|
@@ -22329,6 +22460,29 @@ function createScope(args) {
|
|
|
22329
22460
|
reason: "depth-exceeded"
|
|
22330
22461
|
};
|
|
22331
22462
|
if (typeof agentOrFactory !== "function") prepared ??= prepare();
|
|
22463
|
+
if (!recovery && admissionMax !== void 0 && liveWorkerCapacity.live >= admissionMax) return {
|
|
22464
|
+
ok: false,
|
|
22465
|
+
reason: "max-live-workers"
|
|
22466
|
+
};
|
|
22467
|
+
if (!recovery && ownerFloor) {
|
|
22468
|
+
const available = args.pool.readout();
|
|
22469
|
+
const shortfalls = [];
|
|
22470
|
+
const short = (channel, requested, free) => {
|
|
22471
|
+
if (requested > free) shortfalls.push({
|
|
22472
|
+
channel,
|
|
22473
|
+
requested,
|
|
22474
|
+
free: Math.max(0, free)
|
|
22475
|
+
});
|
|
22476
|
+
};
|
|
22477
|
+
short("tokens", opts.budget.maxTokens, available.tokensLeft - ownerFloor.tokens);
|
|
22478
|
+
short("iterations", opts.budget.maxIterations, available.iterationsLeft - ownerFloor.iterations);
|
|
22479
|
+
if (ownerFloor.usd !== void 0) short("usd", opts.budget.maxUsd ?? 0, available.usdLeft - ownerFloor.usd);
|
|
22480
|
+
if (shortfalls.length > 0) return {
|
|
22481
|
+
ok: false,
|
|
22482
|
+
reason: "budget-exhausted",
|
|
22483
|
+
shortfalls
|
|
22484
|
+
};
|
|
22485
|
+
}
|
|
22332
22486
|
const permit = acquireLiveWorker(liveWorkerCapacity);
|
|
22333
22487
|
if (!permit.ok) return {
|
|
22334
22488
|
ok: false,
|
|
@@ -22565,6 +22719,7 @@ function createScope(args) {
|
|
|
22565
22719
|
label: opts.label,
|
|
22566
22720
|
...opts.key !== void 0 ? { key: opts.key } : {},
|
|
22567
22721
|
...opts.assignmentId === void 0 ? {} : { assignmentId: opts.assignmentId },
|
|
22722
|
+
...opts.successorOf === void 0 ? {} : { successorOf: opts.successorOf },
|
|
22568
22723
|
budget: opts.budget,
|
|
22569
22724
|
runtime: executor.runtime,
|
|
22570
22725
|
...ownedTreeRoot === void 0 ? {} : { ownedTreeRoot },
|
|
@@ -22709,6 +22864,7 @@ function createScope(args) {
|
|
|
22709
22864
|
childId: id,
|
|
22710
22865
|
label: opts.label,
|
|
22711
22866
|
...opts.assignmentId === void 0 ? {} : { assignmentId: opts.assignmentId },
|
|
22867
|
+
...opts.successorOf === void 0 ? {} : { successorOf: opts.successorOf },
|
|
22712
22868
|
runtime: executor.runtime,
|
|
22713
22869
|
...identity ? { identity } : {},
|
|
22714
22870
|
budget: opts.budget,
|
|
@@ -23084,7 +23240,7 @@ function createScope(args) {
|
|
|
23084
23240
|
get workerCapacity() {
|
|
23085
23241
|
return {
|
|
23086
23242
|
live: liveWorkerCapacity.live,
|
|
23087
|
-
freeSlots: freeSlots(liveWorkerCapacity.live,
|
|
23243
|
+
freeSlots: freeSlots(liveWorkerCapacity.live, admissionMax),
|
|
23088
23244
|
unconfirmed: Object.freeze([...children.values()].filter((child) => isTerminalNodeStatus(child.status) && !child.cleanupConfirmed).map((child) => unconfirmedTeardownOf(child, releasingScopes.has(scope))))
|
|
23089
23245
|
};
|
|
23090
23246
|
}
|
|
@@ -24720,9 +24876,22 @@ function unreportedSpend(total, prior) {
|
|
|
24720
24876
|
* driver that RETURNED with the contract unmet ended the run silently — 376 of 376 winning lab runs
|
|
24721
24877
|
* ended on this loop's own `stop: 'completed'`, with the completion gate left to label the result
|
|
24722
24878
|
* rather than to change it. A completed drive whose contract is unmet is now a first-class moment:
|
|
24723
|
-
* `reprompt.maxReprompts` re-enters the
|
|
24724
|
-
*
|
|
24725
|
-
*
|
|
24879
|
+
* `reprompt.maxReprompts` re-enters the driver with the unmet items, and every re-entry crosses the
|
|
24880
|
+
* same budget, deadline, and abort bounds. Successful continuations do not consume the failure
|
|
24881
|
+
* retry allowance.
|
|
24882
|
+
*
|
|
24883
|
+
* This loop decides WHETHER to re-enter; it does not know WHERE the next drive runs. Whether the
|
|
24884
|
+
* re-entered driver continues the same harness session, the same environment, or a replacement is
|
|
24885
|
+
* the drive harness's fact, and the caller composes the re-entry task from it (see
|
|
24886
|
+
* `./reentry.ts`). A re-prompt re-enters the same session only on a backend that proves it.
|
|
24887
|
+
*
|
|
24888
|
+
* Progress bounds the re-prompts too. The same delivery reading that resets the barren failure
|
|
24889
|
+
* counter decides whether a re-prompted drive earned another: `reprompt.maxBarren` consecutive
|
|
24890
|
+
* re-entered drives that completed without a delivery end the loop with `repromptRefusedBy:
|
|
24891
|
+
* 'no-progress'`. Before this, a completed drive reset the barren counter and `decideReprompt`
|
|
24892
|
+
* read only the count cap, budget, and deadline, so a director with `repromptOnUnmet: 100` or
|
|
24893
|
+
* `'until-complete'` that delivered nothing was re-prompted until the budget or deadline ended it;
|
|
24894
|
+
* the old prompt-owned loop logged 896 of 1,011 rounds with no progress.
|
|
24726
24895
|
*/
|
|
24727
24896
|
/**
|
|
24728
24897
|
* The instruction a completed-but-undelivered drive is re-entered with when the caller supplies no
|
|
@@ -24744,6 +24913,8 @@ function defaultUnmetContractSteer(context) {
|
|
|
24744
24913
|
}
|
|
24745
24914
|
const DEFAULT_MAX_CONSECUTIVE_FAILURES = 3;
|
|
24746
24915
|
const DEFAULT_MAX_ATTEMPTS = 8;
|
|
24916
|
+
/** Two re-prompted drives in a row that deliver nothing end the re-prompts. */
|
|
24917
|
+
const DEFAULT_MAX_BARREN_REPROMPTS = 2;
|
|
24747
24918
|
const DEFAULT_INITIAL_BACKOFF_MS = 2e3;
|
|
24748
24919
|
const DEFAULT_MAX_BACKOFF_MS = 3e4;
|
|
24749
24920
|
/**
|
|
@@ -24862,6 +25033,21 @@ var DriverAttemptsExhaustedError = class extends RuntimeRunStateError {
|
|
|
24862
25033
|
this.stop = stop;
|
|
24863
25034
|
}
|
|
24864
25035
|
};
|
|
25036
|
+
/** Count a loop's attempt records into its {@link DriverLoopRecord}. */
|
|
25037
|
+
function summarizeDriverAttempts(records) {
|
|
25038
|
+
let barren = 0;
|
|
25039
|
+
for (const record of records) if (record.madeProgress) barren = 0;
|
|
25040
|
+
else if (record.error === void 0 && record.reentry !== void 0 && record.contract === "unmet") barren += 1;
|
|
25041
|
+
const last = records.at(-1);
|
|
25042
|
+
return {
|
|
25043
|
+
attempts: records.length,
|
|
25044
|
+
reprompts: records.filter((record) => record.reprompted === true).length,
|
|
25045
|
+
failureRetries: records.filter((record) => record.error !== void 0 && record.retryInMs !== void 0).length,
|
|
25046
|
+
barrenReentries: barren,
|
|
25047
|
+
ended: last?.stop ?? "unrecorded",
|
|
25048
|
+
...last?.repromptRefusedBy === void 0 ? {} : { repromptRefusedBy: last.repromptRefusedBy }
|
|
25049
|
+
};
|
|
25050
|
+
}
|
|
24865
25051
|
async function defaultSleep(ms, signal) {
|
|
24866
25052
|
if (ms <= 0 || signal.aborted) return;
|
|
24867
25053
|
await sleep(ms, signal, false);
|
|
@@ -24888,14 +25074,21 @@ async function runDriverWithRetry(run) {
|
|
|
24888
25074
|
const deadline = run.budget().deadlineMs;
|
|
24889
25075
|
if (!Number.isFinite(deadline) || deadline <= 0) throw new ValidationError$1("runDriverWithRetry: until-complete requires a finite positive deadline");
|
|
24890
25076
|
}
|
|
25077
|
+
const maxBarren = Math.max(1, run.reprompt?.maxBarren ?? 2);
|
|
24891
25078
|
const attempts = [];
|
|
24892
25079
|
let consecutiveBarren = 0;
|
|
25080
|
+
let barrenReentries = 0;
|
|
24893
25081
|
let failures = 0;
|
|
24894
25082
|
let reprompts = 0;
|
|
24895
25083
|
let reentry;
|
|
24896
25084
|
const emit = async (record) => {
|
|
24897
|
-
|
|
24898
|
-
|
|
25085
|
+
const entered = reentry === void 0 ? {} : { reentry: reentry.reason };
|
|
25086
|
+
const stamped = {
|
|
25087
|
+
...record,
|
|
25088
|
+
...entered
|
|
25089
|
+
};
|
|
25090
|
+
attempts.push(stamped);
|
|
25091
|
+
await run.onAttempt?.(stamped);
|
|
24899
25092
|
};
|
|
24900
25093
|
/**
|
|
24901
25094
|
* Decide what a completed-but-undelivered drive does next. Every bound the FAILURE path applies
|
|
@@ -24904,6 +25097,7 @@ async function runDriverWithRetry(run) {
|
|
|
24904
25097
|
*/
|
|
24905
25098
|
const decideReprompt = async (attempt, after) => {
|
|
24906
25099
|
if (maxReprompts !== "until-complete" && reprompts >= maxReprompts) return { refusedBy: "reprompts-exhausted" };
|
|
25100
|
+
if (barrenReentries >= maxBarren) return { refusedBy: "no-progress" };
|
|
24907
25101
|
if (run.signal.aborted) return { refusedBy: "aborted" };
|
|
24908
25102
|
const byBudget = budgetStop(run.budget(), now());
|
|
24909
25103
|
if (byBudget === "deadline" || byBudget === "budget-exhausted") return { refusedBy: byBudget };
|
|
@@ -24913,7 +25107,8 @@ async function runDriverWithRetry(run) {
|
|
|
24913
25107
|
maxReprompts,
|
|
24914
25108
|
progress: after,
|
|
24915
25109
|
budget: run.budget(),
|
|
24916
|
-
...run.reprompt?.describe === void 0 ? {} : { describe: run.reprompt.describe }
|
|
25110
|
+
...run.reprompt?.describe === void 0 ? {} : { describe: run.reprompt.describe },
|
|
25111
|
+
barrenReentries
|
|
24917
25112
|
};
|
|
24918
25113
|
const decision = await run.reprompt?.onUnmetContract?.(context) ?? { steer: defaultUnmetContractSteer(context) };
|
|
24919
25114
|
if (decision === "stop") return { refusedBy: "caller-stop" };
|
|
@@ -24949,6 +25144,7 @@ async function runDriverWithRetry(run) {
|
|
|
24949
25144
|
if (progressed) return void 0;
|
|
24950
25145
|
return consecutiveBarren + 1 >= maxConsecutive ? "no-progress" : void 0;
|
|
24951
25146
|
})();
|
|
25147
|
+
if (progressed) barrenReentries = 0;
|
|
24952
25148
|
if (stop !== void 0) {
|
|
24953
25149
|
await emit({
|
|
24954
25150
|
attempt,
|
|
@@ -24961,7 +25157,6 @@ async function runDriverWithRetry(run) {
|
|
|
24961
25157
|
throw new DriverAttemptsExhaustedError(error, attempts, stop);
|
|
24962
25158
|
}
|
|
24963
25159
|
consecutiveBarren = progressed ? 0 : consecutiveBarren + 1;
|
|
24964
|
-
reentry = void 0;
|
|
24965
25160
|
const backoff = Math.min(maxBackoff, initialBackoff * 2 ** Math.max(0, consecutiveBarren - 1));
|
|
24966
25161
|
await emit({
|
|
24967
25162
|
attempt,
|
|
@@ -24971,6 +25166,11 @@ async function runDriverWithRetry(run) {
|
|
|
24971
25166
|
madeProgress: progressed,
|
|
24972
25167
|
retryInMs: backoff
|
|
24973
25168
|
});
|
|
25169
|
+
reentry = {
|
|
25170
|
+
reason: "driver-failure",
|
|
25171
|
+
failure: errMessage(error),
|
|
25172
|
+
retry: failures
|
|
25173
|
+
};
|
|
24974
25174
|
await sleep(backoff, run.signal);
|
|
24975
25175
|
if (run.signal.aborted) throw new DriverAttemptsExhaustedError(error, attempts, "aborted");
|
|
24976
25176
|
const afterWait = budgetStop(run.budget(), now());
|
|
@@ -24983,15 +25183,12 @@ async function runDriverWithRetry(run) {
|
|
|
24983
25183
|
const progressed = madeProgress(before, after);
|
|
24984
25184
|
const contract = contractOf(after);
|
|
24985
25185
|
const contractField = contract === "none" ? {} : { contract };
|
|
25186
|
+
if (progressed) barrenReentries = 0;
|
|
25187
|
+
else if (reentry !== void 0 && contract === "unmet") barrenReentries += 1;
|
|
24986
25188
|
if (contract === "unmet" && (maxReprompts === "until-complete" || maxReprompts > 0)) {
|
|
24987
25189
|
const decision = await decideReprompt(attempt, after);
|
|
24988
25190
|
if ("steer" in decision) {
|
|
24989
25191
|
reprompts += 1;
|
|
24990
|
-
reentry = {
|
|
24991
|
-
reason: "unmet-contract",
|
|
24992
|
-
steer: decision.steer,
|
|
24993
|
-
reprompt: reprompts
|
|
24994
|
-
};
|
|
24995
25192
|
await emit({
|
|
24996
25193
|
attempt,
|
|
24997
25194
|
durationMs,
|
|
@@ -25000,6 +25197,11 @@ async function runDriverWithRetry(run) {
|
|
|
25000
25197
|
reprompted: true,
|
|
25001
25198
|
retryInMs: 0
|
|
25002
25199
|
});
|
|
25200
|
+
reentry = {
|
|
25201
|
+
reason: "unmet-contract",
|
|
25202
|
+
steer: decision.steer,
|
|
25203
|
+
reprompt: reprompts
|
|
25204
|
+
};
|
|
25003
25205
|
continue;
|
|
25004
25206
|
}
|
|
25005
25207
|
await emit({
|
|
@@ -25189,6 +25391,12 @@ function assertResumeContract(events, opts) {
|
|
|
25189
25391
|
if (roots.length !== 1 || roots[0]?.id !== opts.runId) throw new RuntimeRunStateError(`supervisor: resumed run '${opts.runId}' must contain exactly one root identity event; found ${roots.length}`);
|
|
25190
25392
|
const recorded = roots[0];
|
|
25191
25393
|
if (contentAddress(recorded.budget) !== contentAddress(opts.budget)) throw new RuntimeRunStateError(`supervisor: resume budget mismatch for run '${opts.runId}'; use a new runId to change limits`);
|
|
25394
|
+
const expectedAdmission = opts.reservationPolicy ? {
|
|
25395
|
+
policy: opts.reservationPolicy,
|
|
25396
|
+
maxDepth: opts.maxDepth ?? defaultMaxDepth,
|
|
25397
|
+
maxLiveWorkers: opts.maxLiveWorkers
|
|
25398
|
+
} : void 0;
|
|
25399
|
+
if (contentAddress(recorded.recursiveAdmission ?? null) !== contentAddress(expectedAdmission ?? null)) throw new RuntimeRunStateError(`supervisor: resume reservation policy or fleet limits mismatch for run '${opts.runId}'; use a new runId`);
|
|
25192
25400
|
if (!sameOptionalIdentity(recorded.identity, opts.rootIdentity)) throw new RuntimeRunStateError(`supervisor: resume identity mismatch for run '${opts.runId}'; ${describeIdentityMismatch(recorded.identity, opts.rootIdentity)}`);
|
|
25193
25401
|
const receipts = events.filter((event) => event.kind === "materialized" && event.id === opts.runId);
|
|
25194
25402
|
const expectedReceipt = rootMaterializationReceipt(opts);
|
|
@@ -25312,7 +25520,7 @@ function describeRejection(error) {
|
|
|
25312
25520
|
function createSupervisor() {
|
|
25313
25521
|
let attached;
|
|
25314
25522
|
async function run(root, task, opts) {
|
|
25315
|
-
const { budget, rootIdentity, rootMaterialization, runId, journal: journalStore, blobs: blobStore, executors: executorRegistry, recoverExecutor, probes, maxDepth, maxLiveWorkers, maxRestarts, withinMs, childSettleGraceMs, teardownConfirmMs, resume, retainedAtSettlement: requestedRetainedAtSettlement, ownerWorkspaceRetention, now: suppliedNow, signal, hooks, workerTrace, workerTraceUnpropagated, interactiveBindingDir } = opts;
|
|
25523
|
+
const { budget, rootIdentity, rootMaterialization, runId, journal: journalStore, blobs: blobStore, executors: executorRegistry, recoverExecutor, probes, maxDepth, maxLiveWorkers, reservationPolicy, maxRestarts, withinMs, childSettleGraceMs, teardownConfirmMs, resume, retainedAtSettlement: requestedRetainedAtSettlement, ownerWorkspaceRetention, now: suppliedNow, signal, hooks, workerTrace, workerTraceUnpropagated, interactiveBindingDir } = opts;
|
|
25316
25524
|
const input = detachedSnapshot({
|
|
25317
25525
|
task,
|
|
25318
25526
|
options: {
|
|
@@ -25322,6 +25530,7 @@ function createSupervisor() {
|
|
|
25322
25530
|
...rootMaterialization === void 0 ? {} : { rootMaterialization },
|
|
25323
25531
|
...maxDepth === void 0 ? {} : { maxDepth },
|
|
25324
25532
|
...maxLiveWorkers === void 0 ? {} : { maxLiveWorkers },
|
|
25533
|
+
...reservationPolicy === void 0 ? {} : { reservationPolicy },
|
|
25325
25534
|
...maxRestarts === void 0 ? {} : { maxRestarts },
|
|
25326
25535
|
...withinMs === void 0 ? {} : { withinMs },
|
|
25327
25536
|
...childSettleGraceMs === void 0 ? {} : { childSettleGraceMs },
|
|
@@ -25332,6 +25541,7 @@ function createSupervisor() {
|
|
|
25332
25541
|
...interactiveBindingDir === void 0 ? {} : { interactiveBindingDir }
|
|
25333
25542
|
}
|
|
25334
25543
|
}, "supervisor.run");
|
|
25544
|
+
assertRecursiveReservationPolicy(reservationPolicy, maxDepth ?? defaultMaxDepth, maxLiveWorkers);
|
|
25335
25545
|
if (teardownConfirmMs !== void 0 && (typeof teardownConfirmMs !== "number" || !Number.isFinite(teardownConfirmMs) || teardownConfirmMs < 0)) throw new ValidationError$1(`supervisor: teardownConfirmMs must be a nonnegative finite number of milliseconds, got ${JSON.stringify(teardownConfirmMs)}`);
|
|
25336
25546
|
if (requestedRetainedAtSettlement !== void 0 && requestedRetainedAtSettlement !== "release" && requestedRetainedAtSettlement !== "keep") throw new ValidationError$1(`supervisor: retainedAtSettlement must be 'release' or 'keep', got ${JSON.stringify(requestedRetainedAtSettlement)}`);
|
|
25337
25547
|
opts = Object.freeze({
|
|
@@ -25394,6 +25604,11 @@ function createSupervisor() {
|
|
|
25394
25604
|
label: "root",
|
|
25395
25605
|
budget: opts.budget,
|
|
25396
25606
|
runtime: rootRuntime,
|
|
25607
|
+
...opts.reservationPolicy ? { recursiveAdmission: {
|
|
25608
|
+
policy: opts.reservationPolicy,
|
|
25609
|
+
maxDepth: opts.maxDepth ?? defaultMaxDepth,
|
|
25610
|
+
maxLiveWorkers: opts.maxLiveWorkers
|
|
25611
|
+
} } : {},
|
|
25397
25612
|
...opts.rootIdentity ? { identity: opts.rootIdentity } : {},
|
|
25398
25613
|
seq: 0,
|
|
25399
25614
|
at: runStartedAt
|
|
@@ -25445,6 +25660,10 @@ function createSupervisor() {
|
|
|
25445
25660
|
depth: 0,
|
|
25446
25661
|
maxDepth: opts.maxDepth ?? defaultMaxDepth,
|
|
25447
25662
|
...opts.maxLiveWorkers !== void 0 ? { maxLiveWorkers: opts.maxLiveWorkers } : {},
|
|
25663
|
+
...opts.reservationPolicy ? {
|
|
25664
|
+
reservationPolicy: opts.reservationPolicy,
|
|
25665
|
+
ownerBudget: opts.budget
|
|
25666
|
+
} : {},
|
|
25448
25667
|
signal: controller.signal,
|
|
25449
25668
|
now,
|
|
25450
25669
|
hooks: opts.hooks,
|
|
@@ -26030,6 +26249,6 @@ function isNonEmptySpend(s) {
|
|
|
26030
26249
|
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);
|
|
26031
26250
|
}
|
|
26032
26251
|
//#endregion
|
|
26033
|
-
export {
|
|
26252
|
+
export { workerInteractiveBindingFile as $, throwIfAborted as $i, defaultRedactorIdentityMaterial as $n, validateProfileMaterialization as $r, PEER_MAIL_WIRE_KEY as $t, isWaitOutcome as A, assertSandboxServedModel as Ai, DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS as An, createWorktree as Ar, captureWorkerTraceEvidence as At, scopeRetainedOwnerContext as B, sandboxProgressEvents as Bi, retainedExecutorSeamKey as Bn, assertProfileMaterialization as Br, spendFromUsageTotals as Bt, meterRuntimeOwnedAccounting as C, unknownMaterializationReceipt as Ci, acquireSandbox as Cn, createRuntimeStreamEventCollector as Cr, InMemorySpawnJournal as Ct, scopeOwnerExecutorNodeContext as D, detachedSnapshot as Di, runBrainLoop as Dn, runSettledCommand as Dr, pendingWaits as Dt, restoreScopeOwnerAcceptedExecution as E, detachedFrozen as Ei, routerBrain as En, sanitizeRuntimeStreamEvent as Er, materializeTreeView as Et, bindScopeRetainedOwnerEnvironmentId as F, isSandboxTerminalEvent as Fi, sandboxClientAsProvider as Fn, localHarnessExecutable as Fr, assertValidBudget as Ft, environmentReader as G, deleteBoxSafe as Gi, retainedCreateMaterial as Gn, promptControlProfileMaterialization as Gr, workerTraceSeamKey as Gt, scopeRetainedOwnerResourceReader as H, addSpend as Hi, recoverRetainedRun as Hn, defineProfileMaterializationContract as Hr, readWorkerTraceContext as Ht, bindScopeRetainedOwnerProvider as I, mapSandboxEvent as Ii, createPushTraceSource as In, parseCodexTokenUsage as Ir, createBudgetPool as It, interactiveAdmissionSeamKey as J, promptCacheTokenClasses as Ji, RunCancellationReason as Jn, promptResourceProfileMaterialization as Jr, createActivityLog as Jt, hostDirectoryReader as K, hasCompleteCacheBreakdown as Ki, destroyInteractiveEnvironment as Kn, promptModelProfileMaterialization as Kr, taskToPrompt as Kt, consumeScopeRetainedOwnerResult as L, mapSandboxToolEvent as Li, decodeToolPart as Ln, CodexExecutionDiagnosticError as Lr, meterUsageEvent as Lt, timerAt as M, createSandboxToolPartState as Mi, providerAsExecutor as Mn, DEFAULT_LOCAL_HARNESS as Mr, parseWorkerToolTraceArtifact as Mt, validateWaitSpec as N, createSandboxUsageLedger as Ni, providerAsSandboxClient as Nn, LOCAL_HARNESSES as Nr, workerTraceAnalysisStore as Nt, settledToIteration as O, projectSandboxOutcome as Oi, canonicalObservedModelParts as On, runWorktreeHarness as Or, replaySpawnTree as Ot, waitUntil as P, extractLlmCallEvent as Pi, resolveAgentEnvironmentProvider as Pn, harnessSupportsReasoningEffort as Pr, BudgetReconcileFault as Pt, readWorkerInteractiveBinding as Q, throwAbort as Qi, defaultRedactor as Qn, unsupportedProfileDimensions as Qr, DEFAULT_PEER_MAIL_LIMITS as Qt, prepareScopeRetainedOwnerTask as R, notifySandboxEventObserver as Ri, sandboxSessionTraceSource as Rn, terminateProcessTreeAndConfirm as Rr, newUsageTotals as Rt, deriveNodeExecutionIdentity as S, unknownExecutionBindingReceipt as Si, probeSandboxCapabilities as Sn, createRuntimeEventCollector as Sr, InMemoryResultBlobStore as St, recordScopeOwnerMaterialization as T, executableAgentSpecSnapshot as Ti, readPromptOptions as Tn, sanitizeKnowledgeReadinessReport as Tr, loadSpawnForest as Tt, scopeRetainedOwnerResult as U, chargedTokens as Ui, startRetainedRun as Un, fullProfileMaterialization as Ur, workerTraceEnv as Ut, scopeRetainedOwnerPriorSpend as V, sumSandboxUsage as Vi, reconnectRetainedRun as Vn, controlProfileMaterialization as Vr, WORKER_TRACE_PROPAGATION as Vt, SPAWN_RESOURCE_PATH_MAX_BYTES as W, cloneSpend as Wi, startRetainedRunInEnvironment as Wn, profileMaterializationAxes$1 as Wr, workerTraceHeaders as Wt, workerInteractiveAdmissionFile as X, sleep as Xi, linkAbort as Xn, renderUnsupported as Xr, createInbox as Xt, readWorkerInteractiveAdmissions as Y, randomSuffix as Yi, abortError as Yn, renderProfileMaterializationIssues as Yr, readWorkerProgress as Yt, attachWorker as Z, stringifySafe as Zi, runAbortable as Zn, sandboxActProfileMaterialization as Zr, AUTHORITY_MARKERS as Zt, isDriverSpec as _, runtimeOwnedExecutorExecutionBinding as _i, createSandboxForSpec as _n, generateSpanId as _r, DEFAULT_SANDBOX_STEERING_MAX_TURNS as _t, pickBestDelivered as a, withBudgetResources as aa, writeAllBytes as ai, isLiveNodeStatus as an, createPropagatingTraceEmitter as ar, effectiveConcurrency as at, beginScopeOwnerAttempt as b, runtimeOwnedPendingExecutorMaterialization as bi, runAgentRounds as bn, padTraceId as br, FileResultBlobStore as bt, DEFAULT_MAX_BARREN_REPROMPTS as c, awaitAbortable$1 as ca, authoredProfileDigest as ci, bridgeAdmissionRefusal as cn, traceContextToEnv as cr, rollingDispatch as ct, classifyDriverFailure as d, teardownExecutor as da, knownExecutionBindingReceipt as di, createCodexRolloutStoreReader as dn, buildLoopSpanNodes as dr, cliInPlaceExecutor as dt, unmeteredSpend as ea, worktreeCliProfileMaterialization as ei, claimsAuthority as en, resolveRedactor as er, workerInteractiveBindingsDir as et, defaultUnmetContractSteer as f, teardownSurfaces as fa, knownMaterializationReceipt as fi, harnessUsageIsEmpty as fn, buildRuntimeEventOtelSpans as fr, cliWorktreeExecutor as ft, driverExecutorFactory as g, runtimeOwnedDriveHarnessProviderEvidence as gi, TERMINAL_DECISIONS as gn, flatOtelSpan as gr, createWorktreeCliExecutor as gt, driverChild as h, providerMessageText as ha, recordRuntimeOwnedDriveHarnessProviderEvidence as hi, bridgeStopSignalKey as hn, exportEvalRuns as hr, snapshotExecutorConfig as ht, collectDelivered as i, resourceTelemetry as ia, readCommittedJsonLines as ii, peerMailVerbNames as in, contentAddress as ir, errMessage as it, pollFor as j, canonicalStreamEventFromSandboxEvent as ji, createAgentEnvironmentProviderRegistry as jn, removeWorktree as jr, isTraceAnalysisStore as jt, createWaitProbes as k, readSandboxOutcome as ki, observedModelMatchesDeclared as kn, captureWorktreeDiff as kr, WORKER_TOOL_TRACE_SCHEMA_VERSION as kt, DriverAttemptsExhaustedError as l, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as la, finalizeRuntimeOwnedPendingExecutor as li, bridgeModelRouteRefusal as ln, INTELLIGENCE_WIRE_VERSION as lr, bindReusableExecutorExecutionId as lt, summarizeDriverAttempts as m, promptOptionsFromAgentTurnInput as ma, providerAttemptEvidence as mi, bridgeRuntimeAttachmentsKey as mn, createOtelExporter as mr, createExecutorRegistry as mt, createSupervisor as n, zeroSpend as na, parseCommittedJsonLines as ni, isPeerMailEnvelope as nn, harnessTranscriptArtifact as nr, recoverRetainedInteractiveRun as nt, runFinalizer as o, decodeHarnessUsage as oa, attestRuntimeOwnedPendingExecutor as oi, isTerminalNodeStatus as on, mergeTraceEnv as or, freeSlots as ot, runDriverWithRetry as p, promptFromAgentTurnInput as pa, newExecutionAttemptId as pi, readCodexRolloutSession as pn, createOpenInferenceFileExporter as pr, createExecutor as pt, resolveSpawnResourcePaths as q, isAbortError$2 as qi, environmentGone as qn, promptOnlyProfileMaterialization as qr, DEFAULT_STALL_AFTER_MS as qt, bestDelivered as r, addResourceSpend as ra, prepareJsonlAppend as ri, peerMailTools as rn, persistHarnessTranscript as rr, startRetainedInteractiveRun as rt, runTree as s, abortError$2 as sa, attestRuntimeOwnedScopeOwner as si, executorFailure as sn, readTraceContextFromEnv as sr, queueOf as st, createRootHandle as t, withTimeout as ta, isNoEntError as ti, createPeerMailbox as tn, captureHarnessTranscript as tr, reconnectRetainedInteractiveRun as tt, HarnessTurnFailedError as u, armDeadlineTimer as ua, inheritRuntimeOwnedExecutorAttestation as ui, addHarnessUsage as un, buildLoopOtelSpans as ur, captureReusableExecutorConfig as ut, withDriverExecutor as v, runtimeOwnedExecutorMaterialization as vi, defaultSelectWinner as vn, loopEventToOtelSpan as vr, createSteerableSandboxSession as vt, meterRuntimeOwnedProviderAttempt as w, executableAgentProfileSnapshot as wi, assertBoxlessPromptOptions as wn, sanitizeAgentRuntimeEvent as wr, insideCursorNamespace as wt, createScope as x, runtimeOwnedScopeOwnerRuntime as xi, createSandboxLineage as xn, toOtelAttributes as xr, FileSpawnJournal as xt, assertRecursiveReservationPolicy as y, runtimeOwnedExecutorProviderEvidence as yi, isTerminalDecision as yn, padSpanId as yr, createInPlaceCliExecutor as yt, reconcileScopeRetainedOwnerEnvironment as z, sandboxEventServedBackend as zi, registerRetainedExecutorPreparation as zn, AGENT_PROFILE_MATERIALIZATION_AXES as zr, spendFromUsageEvents as zt };
|
|
26034
26253
|
|
|
26035
|
-
//# sourceMappingURL=supervisor-
|
|
26254
|
+
//# sourceMappingURL=supervisor-BGGvnXvV.js.map
|