@tangle-network/agent-runtime 0.259.0 → 0.261.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-Cus2oZaT.d.ts → activation-BpJ2CmXx.d.ts} +2 -2
- package/dist/{activation-Btw2npV2.js → activation-BwrMmguq.js} +3 -3
- package/dist/{activation-Btw2npV2.js.map → activation-BwrMmguq.js.map} +1 -1
- 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-LmDxHvAO.js} +77 -11
- package/dist/coordination-driver-LmDxHvAO.js.map +1 -0
- package/dist/{delegate-DJgmZZKH.js → delegate-rkhJf5w7.js} +2 -2
- package/dist/{delegate-DJgmZZKH.js.map → delegate-rkhJf5w7.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-Bn3wSH8-.js} +4 -3
- package/dist/graph-Bn3wSH8-.js.map +1 -0
- package/dist/{improvement-cycle-D0Os0Hg_.js → improvement-cycle-DYiwfjWY.js} +8 -7
- package/dist/improvement-cycle-DYiwfjWY.js.map +1 -0
- package/dist/{index-sGOO254Q.d.ts → index-tubViIQJ.d.ts} +122 -12
- 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 +8 -8
- package/dist/{loop-runner-bin-DAU4rNIL.d.ts → loop-runner-bin-CL4W2pu1.d.ts} +3 -3
- package/dist/{loop-runner-bin-pRlDgm1i.js → loop-runner-bin-Dxqxf91b.js} +3 -3
- package/dist/{loop-runner-bin-pRlDgm1i.js.map → loop-runner-bin-Dxqxf91b.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 +5 -5
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-BsqD1_Zr.d.ts → openai-tools-BlZHd0Nz.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-By5oGk3t.js} +3 -3
- package/dist/{provision-supervisor-B9tf4soF.js.map → provision-supervisor-By5oGk3t.js.map} +1 -1
- package/dist/{runtime-DKiucqGX.js → runtime-BbQmK7qe.js} +218 -20
- package/dist/runtime-BbQmK7qe.js.map +1 -0
- package/dist/{server-DIsiQ6mu.js → server-CHlpLE22.js} +3 -3
- package/dist/{server-DIsiQ6mu.js.map → server-CHlpLE22.js.map} +1 -1
- package/dist/{stream-agent-turn-DRTFLphI.d.ts → stream-agent-turn-DTgxWXbR.d.ts} +2 -2
- package/dist/{structural-rollout-BIBxgW64.js → structural-rollout-Dby60zHe.js} +2 -2
- package/dist/{structural-rollout-BIBxgW64.js.map → structural-rollout-Dby60zHe.js.map} +1 -1
- package/dist/{substrate-BToFBpfh.d.ts → substrate-CxwdhZri.d.ts} +2 -2
- package/dist/{supervise-DsQjhLN-.js → supervise-1QzYAyS2.js} +78 -7
- package/dist/supervise-1QzYAyS2.js.map +1 -0
- package/dist/{supervisor-CJyzUjc7.js → supervisor-yavsoQQo.js} +84 -9
- package/dist/{supervisor-CJyzUjc7.js.map → supervisor-yavsoQQo.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-DNCNRu0E.d.ts} +24 -2
- 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. */
|
|
@@ -22145,6 +22155,14 @@ function hasRetriableTeardowns(scope, release) {
|
|
|
22145
22155
|
function closeScopeAdmission(scope) {
|
|
22146
22156
|
admissionSeals.get(scope)?.();
|
|
22147
22157
|
}
|
|
22158
|
+
/** Fail before execution when an opted-in run cannot leave a live slot at every depth. */
|
|
22159
|
+
function assertRecursiveReservationPolicy(policy, maxDepth, maxLiveWorkers) {
|
|
22160
|
+
if (policy === void 0) return;
|
|
22161
|
+
if (typeof policy !== "object" || policy === null || Object.keys(policy).some((key) => key !== "ownerShare")) throw new ValidationError$1("reservationPolicy accepts only ownerShare");
|
|
22162
|
+
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");
|
|
22163
|
+
if (!Number.isSafeInteger(maxDepth) || maxDepth === void 0 || maxDepth < 2) throw new ValidationError$1("reservationPolicy requires maxDepth >= 2");
|
|
22164
|
+
if (!Number.isSafeInteger(maxLiveWorkers) || maxLiveWorkers === void 0 || maxLiveWorkers < maxDepth) throw new ValidationError$1("reservationPolicy requires maxLiveWorkers >= maxDepth to preserve a descendant path");
|
|
22165
|
+
}
|
|
22148
22166
|
/**
|
|
22149
22167
|
* The recursion seam key. A `Scope` seeds a value of this on each child's
|
|
22150
22168
|
* `ExecutorContext.seams` so a child whose executor is a DRIVER can mount a NESTED `Scope`
|
|
@@ -22157,13 +22175,14 @@ function makeNestedScopeSeam(args, liveWorkerCapacity, childNodeId, childBudget,
|
|
|
22157
22175
|
const mountScope = (nestedRoot, signal, restored) => {
|
|
22158
22176
|
const mountedAtMs = now();
|
|
22159
22177
|
const deadlineMs = childDeadlineAtMs === void 0 ? void 0 : Math.max(0, childDeadlineAtMs - mountedAtMs);
|
|
22178
|
+
const nestedBudget = {
|
|
22179
|
+
...childBudget,
|
|
22180
|
+
...deadlineMs !== void 0 ? { deadlineMs } : {}
|
|
22181
|
+
};
|
|
22160
22182
|
return createScope({
|
|
22161
22183
|
parentId: childNodeId,
|
|
22162
22184
|
root: nestedRoot,
|
|
22163
|
-
pool: createBudgetPool(
|
|
22164
|
-
...childBudget,
|
|
22165
|
-
...deadlineMs !== void 0 ? { deadlineMs } : {}
|
|
22166
|
-
}, mountedAtMs, restored?.poolRestore),
|
|
22185
|
+
pool: createBudgetPool(nestedBudget, mountedAtMs, restored?.poolRestore),
|
|
22167
22186
|
journal: args.journal,
|
|
22168
22187
|
blobs: args.blobs,
|
|
22169
22188
|
executors: args.executors,
|
|
@@ -22171,6 +22190,10 @@ function makeNestedScopeSeam(args, liveWorkerCapacity, childNodeId, childBudget,
|
|
|
22171
22190
|
depth: args.depth + 1,
|
|
22172
22191
|
...args.maxDepth !== void 0 ? { maxDepth: args.maxDepth } : {},
|
|
22173
22192
|
liveWorkerCapacity,
|
|
22193
|
+
...args.reservationPolicy ? {
|
|
22194
|
+
reservationPolicy: args.reservationPolicy,
|
|
22195
|
+
ownerBudget: nestedBudget
|
|
22196
|
+
} : {},
|
|
22174
22197
|
signal,
|
|
22175
22198
|
...restored ? { resumeFrom: restored.resumeFrom } : {},
|
|
22176
22199
|
...args.now ? { now: args.now } : {},
|
|
@@ -22209,6 +22232,16 @@ function createScope(args) {
|
|
|
22209
22232
|
max: normalizeLiveWorkerLimit(args.maxLiveWorkers),
|
|
22210
22233
|
live: 0
|
|
22211
22234
|
};
|
|
22235
|
+
const reservationPolicy = args.reservationPolicy;
|
|
22236
|
+
assertRecursiveReservationPolicy(reservationPolicy, args.maxDepth, liveWorkerCapacity.max);
|
|
22237
|
+
if (reservationPolicy && !args.ownerBudget) throw new ValidationError$1("reservationPolicy requires the owning scope budget");
|
|
22238
|
+
const ownerBudget = args.ownerBudget;
|
|
22239
|
+
const ownerFloor = reservationPolicy && ownerBudget ? {
|
|
22240
|
+
tokens: Math.ceil(ownerBudget.maxTokens * reservationPolicy.ownerShare),
|
|
22241
|
+
iterations: Math.ceil(ownerBudget.maxIterations * reservationPolicy.ownerShare),
|
|
22242
|
+
...ownerBudget.maxUsd === void 0 ? {} : { usd: ownerBudget.maxUsd * reservationPolicy.ownerShare }
|
|
22243
|
+
} : void 0;
|
|
22244
|
+
const admissionMax = reservationPolicy && liveWorkerCapacity.max !== void 0 && args.maxDepth !== void 0 ? liveWorkerCapacity.max - Math.max(0, args.maxDepth - (args.depth + 1)) : liveWorkerCapacity.max;
|
|
22212
22245
|
let spawnOrdinal = args.resumeFrom ? args.resumeFrom.maxSpawnOrdinal + 1 : 0;
|
|
22213
22246
|
let cursorSeq = args.resumeFrom ? args.resumeFrom.maxCursorSeq + 1 : 0;
|
|
22214
22247
|
let waitOrdinal = args.resumeFrom ? args.resumeFrom.maxWaitOrdinal + 1 : 0;
|
|
@@ -22329,6 +22362,29 @@ function createScope(args) {
|
|
|
22329
22362
|
reason: "depth-exceeded"
|
|
22330
22363
|
};
|
|
22331
22364
|
if (typeof agentOrFactory !== "function") prepared ??= prepare();
|
|
22365
|
+
if (!recovery && admissionMax !== void 0 && liveWorkerCapacity.live >= admissionMax) return {
|
|
22366
|
+
ok: false,
|
|
22367
|
+
reason: "max-live-workers"
|
|
22368
|
+
};
|
|
22369
|
+
if (!recovery && ownerFloor) {
|
|
22370
|
+
const available = args.pool.readout();
|
|
22371
|
+
const shortfalls = [];
|
|
22372
|
+
const short = (channel, requested, free) => {
|
|
22373
|
+
if (requested > free) shortfalls.push({
|
|
22374
|
+
channel,
|
|
22375
|
+
requested,
|
|
22376
|
+
free: Math.max(0, free)
|
|
22377
|
+
});
|
|
22378
|
+
};
|
|
22379
|
+
short("tokens", opts.budget.maxTokens, available.tokensLeft - ownerFloor.tokens);
|
|
22380
|
+
short("iterations", opts.budget.maxIterations, available.iterationsLeft - ownerFloor.iterations);
|
|
22381
|
+
if (ownerFloor.usd !== void 0) short("usd", opts.budget.maxUsd ?? 0, available.usdLeft - ownerFloor.usd);
|
|
22382
|
+
if (shortfalls.length > 0) return {
|
|
22383
|
+
ok: false,
|
|
22384
|
+
reason: "budget-exhausted",
|
|
22385
|
+
shortfalls
|
|
22386
|
+
};
|
|
22387
|
+
}
|
|
22332
22388
|
const permit = acquireLiveWorker(liveWorkerCapacity);
|
|
22333
22389
|
if (!permit.ok) return {
|
|
22334
22390
|
ok: false,
|
|
@@ -22565,6 +22621,7 @@ function createScope(args) {
|
|
|
22565
22621
|
label: opts.label,
|
|
22566
22622
|
...opts.key !== void 0 ? { key: opts.key } : {},
|
|
22567
22623
|
...opts.assignmentId === void 0 ? {} : { assignmentId: opts.assignmentId },
|
|
22624
|
+
...opts.successorOf === void 0 ? {} : { successorOf: opts.successorOf },
|
|
22568
22625
|
budget: opts.budget,
|
|
22569
22626
|
runtime: executor.runtime,
|
|
22570
22627
|
...ownedTreeRoot === void 0 ? {} : { ownedTreeRoot },
|
|
@@ -22709,6 +22766,7 @@ function createScope(args) {
|
|
|
22709
22766
|
childId: id,
|
|
22710
22767
|
label: opts.label,
|
|
22711
22768
|
...opts.assignmentId === void 0 ? {} : { assignmentId: opts.assignmentId },
|
|
22769
|
+
...opts.successorOf === void 0 ? {} : { successorOf: opts.successorOf },
|
|
22712
22770
|
runtime: executor.runtime,
|
|
22713
22771
|
...identity ? { identity } : {},
|
|
22714
22772
|
budget: opts.budget,
|
|
@@ -23084,7 +23142,7 @@ function createScope(args) {
|
|
|
23084
23142
|
get workerCapacity() {
|
|
23085
23143
|
return {
|
|
23086
23144
|
live: liveWorkerCapacity.live,
|
|
23087
|
-
freeSlots: freeSlots(liveWorkerCapacity.live,
|
|
23145
|
+
freeSlots: freeSlots(liveWorkerCapacity.live, admissionMax),
|
|
23088
23146
|
unconfirmed: Object.freeze([...children.values()].filter((child) => isTerminalNodeStatus(child.status) && !child.cleanupConfirmed).map((child) => unconfirmedTeardownOf(child, releasingScopes.has(scope))))
|
|
23089
23147
|
};
|
|
23090
23148
|
}
|
|
@@ -25189,6 +25247,12 @@ function assertResumeContract(events, opts) {
|
|
|
25189
25247
|
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
25248
|
const recorded = roots[0];
|
|
25191
25249
|
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`);
|
|
25250
|
+
const expectedAdmission = opts.reservationPolicy ? {
|
|
25251
|
+
policy: opts.reservationPolicy,
|
|
25252
|
+
maxDepth: opts.maxDepth ?? defaultMaxDepth,
|
|
25253
|
+
maxLiveWorkers: opts.maxLiveWorkers
|
|
25254
|
+
} : void 0;
|
|
25255
|
+
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
25256
|
if (!sameOptionalIdentity(recorded.identity, opts.rootIdentity)) throw new RuntimeRunStateError(`supervisor: resume identity mismatch for run '${opts.runId}'; ${describeIdentityMismatch(recorded.identity, opts.rootIdentity)}`);
|
|
25193
25257
|
const receipts = events.filter((event) => event.kind === "materialized" && event.id === opts.runId);
|
|
25194
25258
|
const expectedReceipt = rootMaterializationReceipt(opts);
|
|
@@ -25312,7 +25376,7 @@ function describeRejection(error) {
|
|
|
25312
25376
|
function createSupervisor() {
|
|
25313
25377
|
let attached;
|
|
25314
25378
|
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;
|
|
25379
|
+
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
25380
|
const input = detachedSnapshot({
|
|
25317
25381
|
task,
|
|
25318
25382
|
options: {
|
|
@@ -25322,6 +25386,7 @@ function createSupervisor() {
|
|
|
25322
25386
|
...rootMaterialization === void 0 ? {} : { rootMaterialization },
|
|
25323
25387
|
...maxDepth === void 0 ? {} : { maxDepth },
|
|
25324
25388
|
...maxLiveWorkers === void 0 ? {} : { maxLiveWorkers },
|
|
25389
|
+
...reservationPolicy === void 0 ? {} : { reservationPolicy },
|
|
25325
25390
|
...maxRestarts === void 0 ? {} : { maxRestarts },
|
|
25326
25391
|
...withinMs === void 0 ? {} : { withinMs },
|
|
25327
25392
|
...childSettleGraceMs === void 0 ? {} : { childSettleGraceMs },
|
|
@@ -25332,6 +25397,7 @@ function createSupervisor() {
|
|
|
25332
25397
|
...interactiveBindingDir === void 0 ? {} : { interactiveBindingDir }
|
|
25333
25398
|
}
|
|
25334
25399
|
}, "supervisor.run");
|
|
25400
|
+
assertRecursiveReservationPolicy(reservationPolicy, maxDepth ?? defaultMaxDepth, maxLiveWorkers);
|
|
25335
25401
|
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
25402
|
if (requestedRetainedAtSettlement !== void 0 && requestedRetainedAtSettlement !== "release" && requestedRetainedAtSettlement !== "keep") throw new ValidationError$1(`supervisor: retainedAtSettlement must be 'release' or 'keep', got ${JSON.stringify(requestedRetainedAtSettlement)}`);
|
|
25337
25403
|
opts = Object.freeze({
|
|
@@ -25394,6 +25460,11 @@ function createSupervisor() {
|
|
|
25394
25460
|
label: "root",
|
|
25395
25461
|
budget: opts.budget,
|
|
25396
25462
|
runtime: rootRuntime,
|
|
25463
|
+
...opts.reservationPolicy ? { recursiveAdmission: {
|
|
25464
|
+
policy: opts.reservationPolicy,
|
|
25465
|
+
maxDepth: opts.maxDepth ?? defaultMaxDepth,
|
|
25466
|
+
maxLiveWorkers: opts.maxLiveWorkers
|
|
25467
|
+
} } : {},
|
|
25397
25468
|
...opts.rootIdentity ? { identity: opts.rootIdentity } : {},
|
|
25398
25469
|
seq: 0,
|
|
25399
25470
|
at: runStartedAt
|
|
@@ -25445,6 +25516,10 @@ function createSupervisor() {
|
|
|
25445
25516
|
depth: 0,
|
|
25446
25517
|
maxDepth: opts.maxDepth ?? defaultMaxDepth,
|
|
25447
25518
|
...opts.maxLiveWorkers !== void 0 ? { maxLiveWorkers: opts.maxLiveWorkers } : {},
|
|
25519
|
+
...opts.reservationPolicy ? {
|
|
25520
|
+
reservationPolicy: opts.reservationPolicy,
|
|
25521
|
+
ownerBudget: opts.budget
|
|
25522
|
+
} : {},
|
|
25448
25523
|
signal: controller.signal,
|
|
25449
25524
|
now,
|
|
25450
25525
|
hooks: opts.hooks,
|
|
@@ -26030,6 +26105,6 @@ function isNonEmptySpend(s) {
|
|
|
26030
26105
|
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
26106
|
}
|
|
26032
26107
|
//#endregion
|
|
26033
|
-
export {
|
|
26108
|
+
export { recoverRetainedInteractiveRun as $, zeroSpend as $i, harnessTranscriptArtifact as $n, parseCommittedJsonLines as $r, isPeerMailEnvelope as $t, timerAt as A, createSandboxUsageLedger as Ai, providerAsSandboxClient as An, LOCAL_HARNESSES as Ar, workerTraceAnalysisStore as At, scopeRetainedOwnerResult as B, chargedTokens as Bi, startRetainedRun as Bn, fullProfileMaterialization as Br, workerTraceEnv as Bt, recordScopeOwnerMaterialization as C, detachedFrozen as Ci, routerBrain as Cn, sanitizeRuntimeStreamEvent as Cr, materializeTreeView as Ct, createWaitProbes as D, assertSandboxServedModel as Di, DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS as Dn, createWorktree as Dr, captureWorkerTraceEvidence as Dt, settledToIteration as E, readSandboxOutcome as Ei, observedModelMatchesDeclared as En, captureWorktreeDiff as Er, WORKER_TOOL_TRACE_SCHEMA_VERSION as Et, consumeScopeRetainedOwnerResult as F, notifySandboxEventObserver as Fi, sandboxSessionTraceSource as Fn, terminateProcessTreeAndConfirm as Fr, newUsageTotals as Ft, interactiveAdmissionSeamKey as G, promptCacheTokenClasses as Gi, RunCancellationReason as Gn, promptResourceProfileMaterialization as Gr, createActivityLog as Gt, environmentReader as H, deleteBoxSafe as Hi, retainedCreateMaterial as Hn, promptControlProfileMaterialization as Hr, workerTraceSeamKey as Ht, prepareScopeRetainedOwnerTask as I, sandboxEventServedBackend as Ii, registerRetainedExecutorPreparation as In, AGENT_PROFILE_MATERIALIZATION_AXES as Ir, spendFromUsageEvents as It, attachWorker as J, stringifySafe as Ji, runAbortable as Jn, sandboxActProfileMaterialization as Jr, AUTHORITY_MARKERS as Jt, readWorkerInteractiveAdmissions as K, randomSuffix as Ki, abortError as Kn, renderProfileMaterializationIssues as Kr, readWorkerProgress as Kt, scopeRetainedOwnerContext as L, sandboxProgressEvents as Li, retainedExecutorSeamKey as Ln, assertProfileMaterialization as Lr, spendFromUsageTotals as Lt, waitUntil as M, isSandboxTerminalEvent as Mi, sandboxClientAsProvider as Mn, localHarnessExecutable as Mr, assertValidBudget as Mt, bindScopeRetainedOwnerEnvironmentId as N, mapSandboxEvent as Ni, createPushTraceSource as Nn, parseCodexTokenUsage as Nr, createBudgetPool as Nt, isWaitOutcome as O, canonicalStreamEventFromSandboxEvent as Oi, createAgentEnvironmentProviderRegistry as On, removeWorktree as Or, isTraceAnalysisStore as Ot, bindScopeRetainedOwnerProvider as P, mapSandboxToolEvent as Pi, decodeToolPart as Pn, CodexExecutionDiagnosticError as Pr, meterUsageEvent as Pt, reconnectRetainedInteractiveRun as Q, withTimeout as Qi, captureHarnessTranscript as Qn, isNoEntError as Qr, createPeerMailbox as Qt, scopeRetainedOwnerPriorSpend as R, sumSandboxUsage as Ri, reconnectRetainedRun as Rn, controlProfileMaterialization as Rr, WORKER_TRACE_PROPAGATION as Rt, meterRuntimeOwnedProviderAttempt as S, executableAgentSpecSnapshot as Si, readPromptOptions as Sn, sanitizeKnowledgeReadinessReport as Sr, loadSpawnForest as St, scopeOwnerExecutorNodeContext as T, projectSandboxOutcome as Ti, canonicalObservedModelParts as Tn, runWorktreeHarness as Tr, replaySpawnTree as Tt, hostDirectoryReader as U, hasCompleteCacheBreakdown as Ui, destroyInteractiveEnvironment as Un, promptModelProfileMaterialization as Ur, taskToPrompt as Ut, SPAWN_RESOURCE_PATH_MAX_BYTES as V, cloneSpend as Vi, startRetainedRunInEnvironment as Vn, profileMaterializationAxes$1 as Vr, workerTraceHeaders as Vt, resolveSpawnResourcePaths as W, isAbortError$2 as Wi, environmentGone as Wn, promptOnlyProfileMaterialization as Wr, DEFAULT_STALL_AFTER_MS as Wt, workerInteractiveBindingFile as X, throwIfAborted as Xi, defaultRedactorIdentityMaterial as Xn, validateProfileMaterialization as Xr, PEER_MAIL_WIRE_KEY as Xt, readWorkerInteractiveBinding as Y, throwAbort as Yi, defaultRedactor as Yn, unsupportedProfileDimensions as Yr, DEFAULT_PEER_MAIL_LIMITS as Yt, workerInteractiveBindingsDir as Z, unmeteredSpend as Zi, resolveRedactor as Zn, worktreeCliProfileMaterialization as Zr, claimsAuthority as Zt, assertRecursiveReservationPolicy as _, runtimeOwnedPendingExecutorMaterialization as _i, runAgentRounds as _n, padTraceId as _r, FileResultBlobStore as _t, pickBestDelivered as a, awaitAbortable$1 as aa, authoredProfileDigest as ai, bridgeAdmissionRefusal as an, traceContextToEnv as ar, rollingDispatch as at, deriveNodeExecutionIdentity as b, unknownMaterializationReceipt as bi, acquireSandbox as bn, createRuntimeStreamEventCollector as br, InMemorySpawnJournal as bt, DriverAttemptsExhaustedError as c, teardownExecutor as ca, knownExecutionBindingReceipt as ci, createCodexRolloutStoreReader as cn, buildLoopSpanNodes as cr, cliInPlaceExecutor as ct, defaultUnmetContractSteer as d, promptOptionsFromAgentTurnInput as da, providerAttemptEvidence as di, bridgeRuntimeAttachmentsKey as dn, createOtelExporter as dr, createExecutorRegistry as dt, addResourceSpend as ea, prepareJsonlAppend as ei, peerMailTools as en, persistHarnessTranscript as er, startRetainedInteractiveRun as et, runDriverWithRetry as f, providerMessageText as fa, recordRuntimeOwnedDriveHarnessProviderEvidence as fi, bridgeStopSignalKey as fn, exportEvalRuns as fr, snapshotExecutorConfig as ft, withDriverExecutor as g, runtimeOwnedExecutorProviderEvidence as gi, isTerminalDecision as gn, padSpanId as gr, createInPlaceCliExecutor as gt, isDriverSpec as h, runtimeOwnedExecutorMaterialization as hi, defaultSelectWinner as hn, loopEventToOtelSpan as hr, createSteerableSandboxSession as ht, collectDelivered as i, abortError$2 as ia, attestRuntimeOwnedScopeOwner as ii, executorFailure as in, readTraceContextFromEnv as ir, queueOf as it, validateWaitSpec as j, extractLlmCallEvent as ji, resolveAgentEnvironmentProvider as jn, harnessSupportsReasoningEffort as jr, BudgetReconcileFault as jt, pollFor as k, createSandboxToolPartState as ki, providerAsExecutor as kn, DEFAULT_LOCAL_HARNESS as kr, parseWorkerToolTraceArtifact as kt, HarnessTurnFailedError as l, teardownSurfaces as la, knownMaterializationReceipt as li, harnessUsageIsEmpty as ln, buildRuntimeEventOtelSpans as lr, cliWorktreeExecutor as lt, driverExecutorFactory as m, runtimeOwnedExecutorExecutionBinding as mi, createSandboxForSpec as mn, generateSpanId as mr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as mt, createSupervisor as n, withBudgetResources as na, writeAllBytes as ni, isLiveNodeStatus as nn, createPropagatingTraceEmitter as nr, effectiveConcurrency as nt, runFinalizer as o, DEFAULT_SUCCESSFUL_SHUTDOWN_MS as oa, finalizeRuntimeOwnedPendingExecutor as oi, bridgeModelRouteRefusal as on, INTELLIGENCE_WIRE_VERSION as or, bindReusableExecutorExecutionId as ot, driverChild as p, runtimeOwnedDriveHarnessProviderEvidence as pi, TERMINAL_DECISIONS as pn, flatOtelSpan as pr, createWorktreeCliExecutor as pt, workerInteractiveAdmissionFile as q, sleep as qi, linkAbort as qn, renderUnsupported as qr, createInbox as qt, bestDelivered as r, decodeHarnessUsage as ra, attestRuntimeOwnedPendingExecutor as ri, isTerminalNodeStatus as rn, mergeTraceEnv as rr, freeSlots as rt, runTree as s, armDeadlineTimer as sa, inheritRuntimeOwnedExecutorAttestation as si, addHarnessUsage as sn, buildLoopOtelSpans as sr, captureReusableExecutorConfig as st, createRootHandle as t, resourceTelemetry as ta, readCommittedJsonLines as ti, peerMailVerbNames as tn, contentAddress as tr, errMessage as tt, classifyDriverFailure as u, promptFromAgentTurnInput as ua, newExecutionAttemptId as ui, readCodexRolloutSession as un, createOpenInferenceFileExporter as ur, createExecutor as ut, beginScopeOwnerAttempt as v, runtimeOwnedScopeOwnerRuntime as vi, createSandboxLineage as vn, toOtelAttributes as vr, FileSpawnJournal as vt, restoreScopeOwnerAcceptedExecution as w, detachedSnapshot as wi, runBrainLoop as wn, runSettledCommand as wr, pendingWaits as wt, meterRuntimeOwnedAccounting as x, executableAgentProfileSnapshot as xi, assertBoxlessPromptOptions as xn, sanitizeAgentRuntimeEvent as xr, insideCursorNamespace as xt, createScope as y, unknownExecutionBindingReceipt as yi, probeSandboxCapabilities as yn, createRuntimeEventCollector as yr, InMemoryResultBlobStore as yt, scopeRetainedOwnerResourceReader as z, addSpend as zi, recoverRetainedRun as zn, defineProfileMaterializationContract as zr, readWorkerTraceContext as zt };
|
|
26034
26109
|
|
|
26035
|
-
//# sourceMappingURL=supervisor-
|
|
26110
|
+
//# sourceMappingURL=supervisor-yavsoQQo.js.map
|