@tangle-network/agent-runtime 6.0.8 → 8.0.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/CHANGELOG.md +86 -0
- package/README.md +23 -12
- package/dist/{activation-Cwy3_Qn_.js → activation-Ce4zUcu8.js} +4 -4
- package/dist/{activation-Cwy3_Qn_.js.map → activation-Ce4zUcu8.js.map} +1 -1
- package/dist/{activation-CWx7I1PU.d.ts → activation-xxvLF1-1.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +3 -3
- package/dist/{bundle-Cy5igJdv.js → bundle-CcpL2lfr.js} +2 -2
- package/dist/{bundle-Cy5igJdv.js.map → bundle-CcpL2lfr.js.map} +1 -1
- package/dist/candidate-execution/index.js +4 -4
- package/dist/continuation-CIyKnS1Q.js +451 -0
- package/dist/continuation-CIyKnS1Q.js.map +1 -0
- package/dist/{coordination-manager-D9z7To7p.js → coordination-manager-sa_PkISw.js} +247 -149
- package/dist/coordination-manager-sa_PkISw.js.map +1 -0
- package/dist/{coordination-map-routing-CKRNZSaV.js → coordination-map-routing-XZXTlCmn.js} +2 -4
- package/dist/coordination-map-routing-XZXTlCmn.js.map +1 -0
- package/dist/{delegate-ws-KBA2H.js → delegate-DhTkJIta.js} +3 -3
- package/dist/{delegate-ws-KBA2H.js.map → delegate-DhTkJIta.js.map} +1 -1
- package/dist/durable.d.ts +71 -4
- package/dist/durable.js +162 -13
- package/dist/durable.js.map +1 -1
- package/dist/{errors-AzSuGI23.js → errors-DG8yufqX.js} +8 -1
- package/dist/errors-DG8yufqX.js.map +1 -0
- package/dist/{failure-cause-BzjUUsRz.js → failure-cause-CVB-YE88.js} +17 -16
- package/dist/failure-cause-CVB-YE88.js.map +1 -0
- package/dist/{graph-registry-7X2nrreR.js → graph-registry-czAwYwNj.js} +133 -9
- package/dist/graph-registry-czAwYwNj.js.map +1 -0
- package/dist/{graph-registry-gYbq4L5Z.js → graph-registry-uTIyyy7A.js} +1 -1
- package/dist/graph-tSIT_eWK.js +1793 -0
- package/dist/graph-tSIT_eWK.js.map +1 -0
- package/dist/{improve-BxfqTsZy.js → improve-H08hiIw9.js} +19 -48
- package/dist/improve-H08hiIw9.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +16 -16
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +8 -8
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +16 -15
- package/dist/{loop-runner-CUMypgRw.d.ts → loop-runner-BGwhcn1p.d.ts} +2 -2
- package/dist/{loop-runner-BmGZ4y1W.js → loop-runner-ChqK8kSz.js} +3 -3
- package/dist/{loop-runner-BmGZ4y1W.js.map → loop-runner-ChqK8kSz.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 +7 -5
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +9 -9
- package/dist/mcp/memory-bin.js +2 -2
- package/dist/{model-policy-JOcg3NRs.js → model-policy-yxOrDTTj.js} +9 -9
- package/dist/model-policy-yxOrDTTj.js.map +1 -0
- package/dist/{prepare-Dtfk_Wi_.js → prepare-BnF8nGIg.js} +4 -4
- package/dist/{prepare-Dtfk_Wi_.js.map → prepare-BnF8nGIg.js.map} +1 -1
- package/dist/{profile-CNSQjOes.js → profile-CD25rTJF.js} +4 -4
- package/dist/{profile-CNSQjOes.js.map → profile-CD25rTJF.js.map} +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/profiles.js +2 -2
- package/dist/{provision-supervisor-CeQTPHRr.js → provision-supervisor-Dx4TXTMM.js} +8 -8
- package/dist/{provision-supervisor-CeQTPHRr.js.map → provision-supervisor-Dx4TXTMM.js.map} +1 -1
- package/dist/{run-cancellation-D_4vJ522.js → run-cancellation-DYszFJtQ.js} +4 -4
- package/dist/{run-cancellation-D_4vJ522.js.map → run-cancellation-DYszFJtQ.js.map} +1 -1
- package/dist/{run-state-CTZVngI_.js → run-state-DHBoJjaF.js} +6 -6
- package/dist/{run-state-CTZVngI_.js.map → run-state-DHBoJjaF.js.map} +1 -1
- package/dist/{runtime-COm9uBBx.js → runtime-CaM5Gbbv.js} +76 -987
- package/dist/runtime-CaM5Gbbv.js.map +1 -0
- package/dist/{sandbox-profile-compat-oFGWESLn.js → sandbox-profile-compat-l-SLQnGb.js} +2 -2
- package/dist/{sandbox-profile-compat-oFGWESLn.js.map → sandbox-profile-compat-l-SLQnGb.js.map} +1 -1
- package/dist/{search-executor-DTEIl58w.js → search-executor-B9L8W_1O.js} +17 -46
- package/dist/search-executor-B9L8W_1O.js.map +1 -0
- package/dist/{server-zO9Nz9Nk.js → server-BlDV8sj_.js} +32 -8
- package/dist/{server-zO9Nz9Nk.js.map → server-BlDV8sj_.js.map} +1 -1
- package/dist/{settle-record-U7fkQEZa.js → settle-record-WWQasnDq.js} +12 -4
- package/dist/settle-record-WWQasnDq.js.map +1 -0
- package/dist/{snapshot-Cgj2Wzi6.js → snapshot-BKI_w3JD.js} +19 -5
- package/dist/snapshot-BKI_w3JD.js.map +1 -0
- package/dist/{structural-rollout-BwTwTUXF.js → structural-rollout-C1xxoWcN.js} +39 -57
- package/dist/structural-rollout-C1xxoWcN.js.map +1 -0
- package/dist/{supervise-tmqDU6YT.js → supervise-DWiSgPLB.js} +103 -111
- package/dist/supervise-DWiSgPLB.js.map +1 -0
- package/dist/{supervision-discovery-CGbXayGv.js → supervision-discovery-C9kfBLKy.js} +4 -4
- package/dist/{supervision-discovery-CGbXayGv.js.map → supervision-discovery-C9kfBLKy.js.map} +1 -1
- package/dist/{supervisor-1A27fE6k.js → supervisor-Dpeu7rnZ.js} +209 -999
- package/dist/supervisor-Dpeu7rnZ.js.map +1 -0
- package/dist/{scope-gIYQ5ZiL.js → supervisor-accounting-Bw4MJk-b.js} +755 -458
- package/dist/supervisor-accounting-Bw4MJk-b.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +13 -13
- package/dist/{tool-server-B9q2dtnW.js → tool-server-DYwRbi0I.js} +3 -3
- package/dist/{tool-server-B9q2dtnW.js.map → tool-server-DYwRbi0I.js.map} +1 -1
- package/dist/{top-web-CS4PD4ck.js → top-web-B3HOAtrZ.js} +9 -7
- package/dist/{top-web-CS4PD4ck.js.map → top-web-B3HOAtrZ.js.map} +1 -1
- package/dist/tui/bin.js +6 -6
- package/dist/tui/bin.js.map +1 -1
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +2 -2
- package/dist/{types-w3Oo1uRJ.d.ts → types-C_qbnw9N.d.ts} +1263 -1497
- package/dist/{util-C_cdPNC4.js → util-fcckrkKp.js} +39 -113
- package/dist/util-fcckrkKp.js.map +1 -0
- package/dist/{workspace-streams-B7yNMahl.js → workspace-streams-DA9R3j-p.js} +2 -2
- package/dist/{workspace-streams-B7yNMahl.js.map → workspace-streams-DA9R3j-p.js.map} +1 -1
- package/package.json +1 -1
- package/dist/coordination-manager-D9z7To7p.js.map +0 -1
- package/dist/coordination-map-routing-CKRNZSaV.js.map +0 -1
- package/dist/errors-AzSuGI23.js.map +0 -1
- package/dist/failure-cause-BzjUUsRz.js.map +0 -1
- package/dist/graph-2_nX4ib4.js +0 -579
- package/dist/graph-2_nX4ib4.js.map +0 -1
- package/dist/graph-registry-7X2nrreR.js.map +0 -1
- package/dist/improve-BxfqTsZy.js.map +0 -1
- package/dist/model-policy-JOcg3NRs.js.map +0 -1
- package/dist/runtime-COm9uBBx.js.map +0 -1
- package/dist/scope-gIYQ5ZiL.js.map +0 -1
- package/dist/search-executor-DTEIl58w.js.map +0 -1
- package/dist/settle-record-U7fkQEZa.js.map +0 -1
- package/dist/snapshot-Cgj2Wzi6.js.map +0 -1
- package/dist/structural-rollout-BwTwTUXF.js.map +0 -1
- package/dist/supervise-tmqDU6YT.js.map +0 -1
- package/dist/supervisor-1A27fE6k.js.map +0 -1
- package/dist/util-C_cdPNC4.js.map +0 -1
|
@@ -8,7 +8,7 @@ import { AgentEvalError, AgentEvalError as AgentEvalError$1, AgentEvalErrorCode,
|
|
|
8
8
|
import { AgentRunOutcome } from "@tangle-network/sandbox/runtime";
|
|
9
9
|
import { BackendType, CreateRequestOptions, CreateSandboxOptions, CreateSandboxOptions as CreateSandboxOptions$1, PromptOptions, SandboxEvent, SandboxEvent as SandboxEvent$1, SandboxInstance, SandboxInstance as SandboxInstance$1, SandboxResources } from "@tangle-network/sandbox";
|
|
10
10
|
import { z } from "zod";
|
|
11
|
-
import { AgentEnvironment, AgentEnvironment as AgentEnvironment$1, AgentEnvironmentCapabilities, AgentEnvironmentCapabilities as AgentEnvironmentCapabilities$1, AgentEnvironmentEvent, AgentEnvironmentEvent as AgentEnvironmentEvent$1, AgentEnvironmentProvider, AgentEnvironmentProvider as AgentEnvironmentProvider$1, AgentEnvironmentQuery, AgentEnvironmentStatus, AgentEnvironmentSummary, AgentSession, AgentSessionRef, AgentSessionStatus as AgentSessionStatus$1, AgentTurnFailure, AgentTurnInput, AgentTurnInput as AgentTurnInput$1, AgentTurnResult as AgentTurnResult$1, AgentTurnResult as AgentTurnResult$2, CheckpointRef, CheckpointRequest, CreateAgentEnvironmentInput, CreateAgentEnvironmentInput as CreateAgentEnvironmentInput$1, ExecRequest, ExecResult, ForkRequest, PlacementInfo, ResourceRequest, WorkspaceRequest } from "@tangle-network/agent-interface/environment-provider";
|
|
11
|
+
import { AgentEnvironment, AgentEnvironment as AgentEnvironment$1, AgentEnvironmentCapabilities, AgentEnvironmentCapabilities as AgentEnvironmentCapabilities$1, AgentEnvironmentEvent, AgentEnvironmentEvent as AgentEnvironmentEvent$1, AgentEnvironmentProvider, AgentEnvironmentProvider as AgentEnvironmentProvider$1, AgentEnvironmentQuery, AgentEnvironmentStatus, AgentEnvironmentSummary, AgentSession, AgentSessionRef, AgentSessionStatus as AgentSessionStatus$1, AgentTurnFailure, AgentTurnInput, AgentTurnInput as AgentTurnInput$1, AgentTurnResult as AgentTurnResult$1, AgentTurnResult as AgentTurnResult$2, CheckpointRef, CheckpointRequest, CreateAgentEnvironmentInput, CreateAgentEnvironmentInput as CreateAgentEnvironmentInput$1, ExecRequest, ExecResult, ForkRequest, PlacementInfo, ResourceRequest as ResourceRequest$1, WorkspaceRequest } from "@tangle-network/agent-interface/environment-provider";
|
|
12
12
|
import { watch } from "node:fs";
|
|
13
13
|
import { ChildProcess } from "node:child_process";
|
|
14
14
|
import { HarnessId, WorkspacePlanReceipt } from "@tangle-network/agent-profile-materialize";
|
|
@@ -65,13 +65,7 @@ type RetainedRunTurnInput = Omit<AgentTurnInput, 'contextTransfer'> & {
|
|
|
65
65
|
readonly turnId: string;
|
|
66
66
|
readonly contextTransfer?: ContextTransferRequest;
|
|
67
67
|
};
|
|
68
|
-
/**
|
|
69
|
-
* Admission and terminal result for one same-session continuation.
|
|
70
|
-
*
|
|
71
|
-
* The provider resolves `admission` after it durably owns the next exact run
|
|
72
|
-
* reference. `result` resolves when that run reaches its terminal result.
|
|
73
|
-
* @stable
|
|
74
|
-
*/
|
|
68
|
+
/** Admission once the next exact reference is durable, and the terminal result. @stable */
|
|
75
69
|
interface NativeContextContinuationHandle {
|
|
76
70
|
readonly admission: Promise<AgentExactRunControlRef>;
|
|
77
71
|
readonly result: Promise<NativeContextContinuationExecution>;
|
|
@@ -97,14 +91,7 @@ interface RetainedRunHandle {
|
|
|
97
91
|
continueNative(request: NativeContextContinuationRequest, turn: NativeContextContinuationInput): Promise<NativeContextContinuationExecution>;
|
|
98
92
|
cancel(options: RetainedRunCancelOptions): Promise<RetainedRunCancellation>;
|
|
99
93
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Sanitized headless intent durable before environment creation.
|
|
102
|
-
*
|
|
103
|
-
* The request digest binds the public create and turn material without
|
|
104
|
-
* retaining secret values. The original start material is required to replay
|
|
105
|
-
* this record after a process crash.
|
|
106
|
-
* @stable
|
|
107
|
-
*/
|
|
94
|
+
/** Intent durable before create. The digest omits secrets; replay needs the original start material. @stable */
|
|
108
95
|
interface RetainedRunIntentAdmission {
|
|
109
96
|
readonly phase: 'intent';
|
|
110
97
|
readonly provider: string;
|
|
@@ -135,14 +122,7 @@ interface RetainedRunDispatchedAdmission {
|
|
|
135
122
|
readonly idempotencyKey: string;
|
|
136
123
|
readonly turnId: string;
|
|
137
124
|
}
|
|
138
|
-
/**
|
|
139
|
-
* Sanitized intent durable before an interactive environment create begins.
|
|
140
|
-
*
|
|
141
|
-
* The digest covers the public start and create material without retaining that
|
|
142
|
-
* material. It never carries environment variables, secret values, or provider
|
|
143
|
-
* options. The replay input supplies private values after this check.
|
|
144
|
-
* @stable
|
|
145
|
-
*/
|
|
125
|
+
/** Interactive intent durable before create. The digest omits secrets, env, and provider options. @stable */
|
|
146
126
|
interface RetainedInteractiveIntentAdmission {
|
|
147
127
|
readonly phase: 'interactive_intent';
|
|
148
128
|
readonly provider: string;
|
|
@@ -174,16 +154,7 @@ interface RetainedInteractiveStartedAdmission {
|
|
|
174
154
|
type RetainedInteractiveAdmission = RetainedInteractiveIntentAdmission | RetainedInteractiveEnvironmentAdmission | RetainedInteractiveStartedAdmission;
|
|
175
155
|
/** One detached-run admission record the runtime persists before creation or dispatch proceeds. @stable */
|
|
176
156
|
type RetainedRunAdmission = RetainedRunIntentAdmission | RetainedRunEnvironmentAdmission | RetainedRunDispatchedAdmission;
|
|
177
|
-
/**
|
|
178
|
-
* Awaited durability hook for retained admission records.
|
|
179
|
-
*
|
|
180
|
-
* The runtime blocks after the pre-create intent, environment creation, and
|
|
181
|
-
* provider work until the hook resolves. No retained run becomes caller-visible
|
|
182
|
-
* before its exact recovery record is durable. A rejection keeps provider state
|
|
183
|
-
* for recovery when provider work has already started.
|
|
184
|
-
*
|
|
185
|
-
* @stable
|
|
186
|
-
*/
|
|
157
|
+
/** Blocks until the admission is durable. A rejection keeps provider state already started. @stable */
|
|
187
158
|
type RetainedRunAdmissionHook = (admission: RetainedRunAdmission) => Promise<void>;
|
|
188
159
|
/** Environment, turn, and optional identity needed to replay one retained start. @stable */
|
|
189
160
|
interface RetainedRunStartMaterial {
|
|
@@ -197,11 +168,7 @@ interface RetainedRunStartMaterial {
|
|
|
197
168
|
readonly turn: RetainedRunTurnInput;
|
|
198
169
|
/** Accepted destination to attach, without creating or replacing its environment. */
|
|
199
170
|
readonly contextTransferReceipt?: ContextTransferReceipt;
|
|
200
|
-
/**
|
|
201
|
-
* Explicit dispatch coordinates. When omitted, the runtime mints
|
|
202
|
-
* deterministic coordinates from `(environment.idempotencyKey, turn.turnId)`
|
|
203
|
-
* so every process derives the same values.
|
|
204
|
-
*/
|
|
171
|
+
/** Explicit coordinates. Omitted values are minted from the environment key and turn id. */
|
|
205
172
|
readonly identity?: {
|
|
206
173
|
readonly sessionId: string;
|
|
207
174
|
readonly executionId: string;
|
|
@@ -214,6 +181,8 @@ interface StartRetainedRunOptions extends RetainedRunStartMaterial {
|
|
|
214
181
|
readonly intent?: RetainedRunIntentAdmission;
|
|
215
182
|
readonly onAdmission: RetainedRunAdmissionHook;
|
|
216
183
|
readonly now?: () => number;
|
|
184
|
+
/** How long create may take after intent is durable. Absent uses the retained materialization bound. */
|
|
185
|
+
readonly materializationTimeoutMs?: number;
|
|
217
186
|
/** Directory whose `<runId>/observer.jsonl` (intent run id) receives admissions for agent-runtime-top. */
|
|
218
187
|
readonly journalRoot?: string;
|
|
219
188
|
}
|
|
@@ -253,48 +222,18 @@ interface RecoverRetainedRunIntentOptions {
|
|
|
253
222
|
readonly onAdmission: RetainedRunAdmissionHook;
|
|
254
223
|
readonly now?: () => number;
|
|
255
224
|
}
|
|
256
|
-
/**
|
|
257
|
-
* Pre-dispatch admission coordinates for one recovery attempt.
|
|
258
|
-
*
|
|
259
|
-
* A `phase: 'environment'` admission record carries these fields, so a caller
|
|
260
|
-
* can pass that record after a crash before the dispatched record landed.
|
|
261
|
-
*
|
|
262
|
-
* @stable
|
|
263
|
-
*/
|
|
225
|
+
/** Environment-phase coordinates, enough to recover before a dispatched record lands. @stable */
|
|
264
226
|
interface RecoverRetainedRunOptions {
|
|
265
227
|
readonly provider: AgentEnvironmentProvider;
|
|
266
228
|
readonly environmentId: string;
|
|
267
229
|
readonly sessionId: string;
|
|
268
230
|
readonly executionId: string;
|
|
269
|
-
/**
|
|
270
|
-
* Transfer replay identity, when the crashed run started from an ACCEPTED
|
|
271
|
-
* context transfer: the original request and its authoritative receipt.
|
|
272
|
-
* Recovery repeats the receipt-authorized lookup and verifies the receipt's
|
|
273
|
-
* run binding — without it, an adapter that requires receipt-authorized
|
|
274
|
-
* lookup answers not_found, and one that does not can return a run the
|
|
275
|
-
* receipt never bound. Callers that persisted the turn's context-transfer
|
|
276
|
-
* material supply these; behavior is unchanged for runs that had none.
|
|
277
|
-
*/
|
|
231
|
+
/** Accepted transfer request. Recovery repeats the receipt-authorized lookup; omit it only when the run had none. */
|
|
278
232
|
readonly contextTransfer?: ContextTransferRequest;
|
|
279
233
|
readonly transferReceipt?: ContextTransferReceipt;
|
|
280
234
|
readonly now?: () => number;
|
|
281
235
|
}
|
|
282
|
-
/**
|
|
283
|
-
* Outcome of one recovery attempt.
|
|
284
|
-
*
|
|
285
|
-
* `recovered` with `via: 'reattached'`: the provider self-identified the
|
|
286
|
-
* original session with a strict exact reference matching the recorded
|
|
287
|
-
* environment coordinates. `recovered` with `via: 'resumed'`: a pre-create
|
|
288
|
-
* intent was replayed through the exact, idempotent create and dispatch; the
|
|
289
|
-
* handle controls the admitted run, whether this call or the crashed one
|
|
290
|
-
* dispatched it. `not_found`: the provider no longer holds the environment;
|
|
291
|
-
* nothing remains to destroy. `unverifiable`: the environment exists but the
|
|
292
|
-
* provider cannot self-identify the session. Never destroy on this outcome:
|
|
293
|
-
* keep the environment, retry `reconnectRetainedRun` with a dispatched
|
|
294
|
-
* admission record, or inspect it with provider-native tools.
|
|
295
|
-
*
|
|
296
|
-
* @stable
|
|
297
|
-
*/
|
|
236
|
+
/** `reattached` matched the recorded session. `resumed` replayed intent. `not_found` has nothing to destroy. `unverifiable` keeps the environment. @stable */
|
|
298
237
|
type RecoverRetainedRunResult = {
|
|
299
238
|
readonly outcome: 'recovered';
|
|
300
239
|
readonly via: 'reattached' | 'resumed';
|
|
@@ -324,6 +263,12 @@ declare class BackendTransportError extends AgentEvalError {
|
|
|
324
263
|
* package does not understand, remains unknown to Runtime.
|
|
325
264
|
*/
|
|
326
265
|
readonly providerDispatch?: 'not_started';
|
|
266
|
+
/**
|
|
267
|
+
* Bridge-owned proof that the refusal came from a full executor semaphore, not a
|
|
268
|
+
* provider: the request waited on the host's concurrency gate and was refused as
|
|
269
|
+
* capacity (`executor_saturated`, HTTP 429). Retryable after `Retry-After`.
|
|
270
|
+
*/
|
|
271
|
+
readonly capacity?: true;
|
|
327
272
|
/**
|
|
328
273
|
* The upstream's own error class when it names one (the bridge's `parse_error`,
|
|
329
274
|
* `not_configured`, a provider's `invalid_request_error`). A class the upstream never
|
|
@@ -347,6 +292,7 @@ declare class BackendTransportError extends AgentEvalError {
|
|
|
347
292
|
remediation?: RuntimeFailureCause['remediation'];
|
|
348
293
|
body?: string;
|
|
349
294
|
providerDispatch?: 'not_started';
|
|
295
|
+
capacity?: true;
|
|
350
296
|
});
|
|
351
297
|
}
|
|
352
298
|
/**
|
|
@@ -2326,6 +2272,28 @@ interface MaterializedExecutionIdentity {
|
|
|
2326
2272
|
readonly kind: string;
|
|
2327
2273
|
readonly id: string;
|
|
2328
2274
|
}
|
|
2275
|
+
/** The box sizes the created environment reported as applied, or an explicit unknown. Known
|
|
2276
|
+
* values come from the environment's normalized observation (`resources.effective`), never from
|
|
2277
|
+
* the create input: the request was admission-validated, not applied, and the applied sizes stay
|
|
2278
|
+
* comparable against what the guest itself reads from its cgroup limits. `origin` and
|
|
2279
|
+
* `observedAt` carry the observation's provenance so an estimate is never mistaken for a
|
|
2280
|
+
* provider-applied size; `accelerator` is the observation's hardware shape. */
|
|
2281
|
+
type MaterializedResources = {
|
|
2282
|
+
readonly status: 'known';
|
|
2283
|
+
readonly cpu?: number;
|
|
2284
|
+
readonly memoryMb?: number;
|
|
2285
|
+
readonly diskMb?: number;
|
|
2286
|
+
readonly accelerator?: {
|
|
2287
|
+
readonly kind: string;
|
|
2288
|
+
readonly count: number;
|
|
2289
|
+
readonly memoryMb?: number;
|
|
2290
|
+
};
|
|
2291
|
+
readonly origin: 'estimated' | 'measured' | 'reported';
|
|
2292
|
+
readonly observedAt: string;
|
|
2293
|
+
} | {
|
|
2294
|
+
readonly status: 'unknown';
|
|
2295
|
+
readonly reason: string;
|
|
2296
|
+
};
|
|
2329
2297
|
/**
|
|
2330
2298
|
* Data-only declaration from trusted executor code about the exact sealed plan `execute` uses.
|
|
2331
2299
|
* Scope snapshots this value and computes the durable receipt; callers never provide digests.
|
|
@@ -2340,6 +2308,8 @@ interface ExecutorMaterialization {
|
|
|
2340
2308
|
readonly backend: string;
|
|
2341
2309
|
/** Exact selected model, or an explicit unknown reason. */
|
|
2342
2310
|
readonly model: MaterializedModelIdentity;
|
|
2311
|
+
/** Applied resources the created environment reported, or an explicit unknown reason. */
|
|
2312
|
+
readonly resources?: MaterializedResources;
|
|
2343
2313
|
/** Backend-native session/run/request/process identity. */
|
|
2344
2314
|
readonly execution: MaterializedExecutionIdentity;
|
|
2345
2315
|
/** Named implementation that turns the effective profile into executable backend inputs. */
|
|
@@ -2375,6 +2345,7 @@ type ProfileMaterializationReceipt = {
|
|
|
2375
2345
|
readonly runtime: Runtime;
|
|
2376
2346
|
readonly backend: string;
|
|
2377
2347
|
readonly model: MaterializedModelIdentity;
|
|
2348
|
+
readonly resources: MaterializedResources;
|
|
2378
2349
|
readonly execution: MaterializedExecutionIdentity;
|
|
2379
2350
|
readonly materializer: string;
|
|
2380
2351
|
} | {
|
|
@@ -2659,6 +2630,83 @@ interface BudgetPool {
|
|
|
2659
2630
|
* none), an absolute instant. A resumed pool passes the ORIGINAL instant.
|
|
2660
2631
|
*/
|
|
2661
2632
|
declare function createBudgetPool(root: Budget, runStartedAtMs: number, restore?: BudgetPoolRestore): BudgetPool;
|
|
2633
|
+
/** One journal tree in a recursively loaded supervision forest. */
|
|
2634
|
+
interface SpawnForestTree {
|
|
2635
|
+
readonly root: NodeId;
|
|
2636
|
+
/** Driver node that owns this tree; absent for the requested root tree. */
|
|
2637
|
+
readonly ownerNodeId?: NodeId;
|
|
2638
|
+
/** Journal tree containing `ownerNodeId`; absent for the requested root tree. */
|
|
2639
|
+
readonly parentTreeRoot?: NodeId;
|
|
2640
|
+
readonly events: ReadonlyArray<SpawnEvent>;
|
|
2641
|
+
readonly view: TreeView;
|
|
2642
|
+
}
|
|
2643
|
+
/** One event with the journal tree that establishes its cursor namespace. */
|
|
2644
|
+
interface SpawnForestEvent {
|
|
2645
|
+
readonly treeRoot: NodeId;
|
|
2646
|
+
readonly event: SpawnEvent;
|
|
2647
|
+
}
|
|
2648
|
+
/** One flattened node with the journal tree that owns its records. */
|
|
2649
|
+
interface SpawnForestNode extends NodeSnapshot {
|
|
2650
|
+
readonly treeRoot: NodeId;
|
|
2651
|
+
}
|
|
2652
|
+
/** A spawned worker with no terminal record in a cold snapshot. Resume treats the same state as
|
|
2653
|
+
* in-doubt and conservatively retains its reservation. Root nodes and armed waits are excluded. */
|
|
2654
|
+
interface SpawnForestInDoubtNode {
|
|
2655
|
+
readonly treeRoot: NodeId;
|
|
2656
|
+
readonly nodeId: NodeId;
|
|
2657
|
+
readonly label: string;
|
|
2658
|
+
readonly runtime: Runtime;
|
|
2659
|
+
}
|
|
2660
|
+
/** A driver spawn whose owned journal tree was never begun before the process stopped. */
|
|
2661
|
+
interface SpawnForestMissingTree {
|
|
2662
|
+
readonly parentTreeRoot: NodeId;
|
|
2663
|
+
readonly ownerNodeId: NodeId;
|
|
2664
|
+
readonly root: NodeId;
|
|
2665
|
+
}
|
|
2666
|
+
/** Complete cold-readable view of one recursive supervision run. */
|
|
2667
|
+
interface SpawnForest {
|
|
2668
|
+
readonly root: NodeId;
|
|
2669
|
+
readonly trees: ReadonlyArray<SpawnForestTree>;
|
|
2670
|
+
readonly nodes: ReadonlyArray<SpawnForestNode>;
|
|
2671
|
+
readonly events: ReadonlyArray<SpawnForestEvent>;
|
|
2672
|
+
readonly inDoubt: ReadonlyArray<SpawnForestInDoubtNode>;
|
|
2673
|
+
readonly missingTrees: ReadonlyArray<SpawnForestMissingTree>;
|
|
2674
|
+
}
|
|
2675
|
+
/**
|
|
2676
|
+
* Load every journal tree owned by one recursive supervision run and flatten its nodes/events.
|
|
2677
|
+
*
|
|
2678
|
+
* Nested driver tree keys are a Runtime implementation detail; callers should use this reader
|
|
2679
|
+
* instead of deriving or scanning keys themselves. The reader follows only the explicit
|
|
2680
|
+
* `ownedTreeRoot` written after Runtime privately attested a recursive executor; the open runtime
|
|
2681
|
+
* string `driver` is never treated as ownership. Legacy records without `ownedTreeRoot` are
|
|
2682
|
+
* intentionally treated as leaves rather than guessing or scanning convention-derived keys.
|
|
2683
|
+
* This preserves each tree's independent cursor namespace on flattened events.
|
|
2684
|
+
* A driver whose subtree was never begun is reported in `missingTrees`; any spawned non-root node
|
|
2685
|
+
* without a terminal record is reported in `inDoubt`, matching resume's conservative lost-work
|
|
2686
|
+
* interpretation.
|
|
2687
|
+
*
|
|
2688
|
+
* This is a cold/quiescent reader, not a transaction across an actively mutating file. Every value
|
|
2689
|
+
* returned is a detached immutable snapshot, so later journal writes or caller mutation cannot
|
|
2690
|
+
* change the result already observed.
|
|
2691
|
+
*/
|
|
2692
|
+
declare function loadSpawnForest(journal: SpawnJournal, root: NodeId): Promise<SpawnForest>;
|
|
2693
|
+
/** Measured tokens remain usable without claiming the unreported remainder is zero. */
|
|
2694
|
+
interface SettledUsage {
|
|
2695
|
+
readonly tokens: {
|
|
2696
|
+
readonly status: 'known' | 'lower-bound' | 'unknown';
|
|
2697
|
+
readonly input: number | null;
|
|
2698
|
+
readonly output: number | null;
|
|
2699
|
+
/** Null when legacy or unfinished work does not establish the number of attempts. */
|
|
2700
|
+
readonly unknownAttempts: number | null;
|
|
2701
|
+
};
|
|
2702
|
+
readonly requestedModel: {
|
|
2703
|
+
readonly id: string | null;
|
|
2704
|
+
readonly harness: string | null;
|
|
2705
|
+
readonly provider: string | null;
|
|
2706
|
+
};
|
|
2707
|
+
/** Observations only; providerModel separately states whether served identity is complete. */
|
|
2708
|
+
readonly observedModels: ReadonlyArray<string>;
|
|
2709
|
+
}
|
|
2662
2710
|
/** Live observation is bounded and process-local. A reconnect explicitly reports expired history. */
|
|
2663
2711
|
interface WorkerEventCursor {
|
|
2664
2712
|
readonly epoch: string;
|
|
@@ -2866,12 +2914,14 @@ interface UnconfirmedTeardown {
|
|
|
2866
2914
|
readonly runtime: Runtime;
|
|
2867
2915
|
readonly status: NodeStatus;
|
|
2868
2916
|
/** The provider environments the node may still hold and nothing keeps on purpose, by the
|
|
2869
|
-
* provider's own id
|
|
2870
|
-
*
|
|
2871
|
-
*
|
|
2917
|
+
* provider's own id. `reconcileUnconfirmedTeardowns` reads each one by that id and deletes it
|
|
2918
|
+
* only when the provider still holds it. Present when the executor names at least one
|
|
2919
|
+
* (`Executor.heldEnvironments`); absence means nothing was named, never "nothing is held".
|
|
2920
|
+
* Never contains a kept environment. */
|
|
2872
2921
|
readonly environments?: ReadonlyArray<HeldEnvironment>;
|
|
2873
2922
|
/** The environments the node holds on purpose, each with `keptFor` set: a retained execution
|
|
2874
|
-
* a resume reconciles, or a workspace preserved as evidence.
|
|
2923
|
+
* a resume reconciles, or a workspace preserved as evidence.
|
|
2924
|
+
* `reconcileUnconfirmedTeardowns` never reads or deletes these. */
|
|
2875
2925
|
readonly kept?: ReadonlyArray<HeldEnvironment>;
|
|
2876
2926
|
/** How many teardown requests Runtime sent the executor. */
|
|
2877
2927
|
readonly attempts?: number;
|
|
@@ -2947,27 +2997,19 @@ interface WidenGate<Out> {
|
|
|
2947
2997
|
* must be explicitly argued per cell, never defaulted on). */
|
|
2948
2998
|
readonly judgeExempt?: boolean;
|
|
2949
2999
|
}
|
|
2950
|
-
/** Provider
|
|
2951
|
-
* Runtime records this only from a Runtime-owned provider/bridge receipt; an authored profile
|
|
2952
|
-
* alias is never substituted when the provider omits the identity. */
|
|
3000
|
+
/** Provider receipts only; requested aliases never fill missing served identity. */
|
|
2953
3001
|
type RootProviderModelEvidence = ProviderModelExecutionEvidence;
|
|
2954
|
-
/**
|
|
2955
|
-
* The root manager's retained provider stream: `<runDir>/root-stream.jsonl`, one line per
|
|
2956
|
-
* progress event the root's executor observed, referenced by the content address of the file's
|
|
2957
|
-
* bytes and its committed line count. Present exactly when the run had a run directory and a
|
|
2958
|
-
* Runtime-driven root that began at least one drive attempt; a caller-supplied harness leaves it
|
|
2959
|
-
* absent, never an empty receipt. Distinct from `outRef`, which on a `winner` names the SELECTED
|
|
2960
|
-
* CHILD's artifact.
|
|
2961
|
-
*/
|
|
3002
|
+
/** Root executor progress, when captured; outRef instead names selected output. */
|
|
2962
3003
|
interface RootStreamReceipt {
|
|
2963
3004
|
/** `sha256:<hex>` over the file's bytes as they were when the receipt was taken. */
|
|
2964
3005
|
readonly ref: string;
|
|
2965
3006
|
/** Committed lines in the file. `0` is a root that drove and produced no observable output. */
|
|
2966
3007
|
readonly events: number;
|
|
3008
|
+
/** Subagent sessions the harness itself spawned, as its `task` tool results named them
|
|
3009
|
+
* (#1264: a completed subagent reached no record before). Absent when none were observed. */
|
|
3010
|
+
readonly subagentSessionIds?: readonly string[];
|
|
2967
3011
|
}
|
|
2968
|
-
/**
|
|
2969
|
-
* no trusted served model identity arrived before it failed or ended, unless Router explicitly
|
|
2970
|
-
* proves that admission rejected it before provider dispatch. */
|
|
3012
|
+
/** An empty observation list is unknown served identity unless dispatch was proven not started. */
|
|
2971
3013
|
interface ProviderModelAttemptEvidence {
|
|
2972
3014
|
readonly observations: ReadonlyArray<string>;
|
|
2973
3015
|
readonly identityConflict?: boolean;
|
|
@@ -2985,13 +3027,7 @@ type ProviderModelExecutionEvidence = {
|
|
|
2985
3027
|
readonly models: ReadonlyArray<string>;
|
|
2986
3028
|
readonly reason: 'provider-model-missing' | 'provider-model-conflict';
|
|
2987
3029
|
};
|
|
2988
|
-
/**
|
|
2989
|
-
* A driver's `act()` rejection, normalized to serializable evidence so it survives the typed
|
|
2990
|
-
* no-winner boundary (an `Error` does not cross a structured-clone / JSON hop intact). A
|
|
2991
|
-
* non-`Error` rejection normalizes to `{ name: 'NonError', message }` — never dropped.
|
|
2992
|
-
* Exported so a consumer handling `reason: 'driver-failed'` names this type instead of retyping
|
|
2993
|
-
* its fields.
|
|
2994
|
-
*/
|
|
3030
|
+
/** Serializable act() rejection; non-Errors retain name NonError and their message. */
|
|
2995
3031
|
interface NoWinnerError {
|
|
2996
3032
|
name: string;
|
|
2997
3033
|
message: string;
|
|
@@ -2999,227 +3035,88 @@ interface NoWinnerError {
|
|
|
2999
3035
|
/** Structural failure evidence captured before the rejection becomes message text. */
|
|
3000
3036
|
failure?: RuntimeFailureCause;
|
|
3001
3037
|
}
|
|
3002
|
-
/**
|
|
3003
|
-
*
|
|
3004
|
-
*
|
|
3005
|
-
* sweep wrote are included, and forest-wide so a director's grandchildren count (the population
|
|
3006
|
-
* the observer projection shows). Invariant: `spawned === done + down + cancelled + neverSettled`.
|
|
3007
|
-
* Distinct from a no-winner's `downCount`, the breaker's tally of ordinary down settlements: a
|
|
3008
|
-
* released record is the driver's earlier down re-stated, so the breaker skips it and
|
|
3009
|
-
* `downCount` never includes a retained child, while `down` here does. `spendGaps` stays
|
|
3010
|
-
* root-tree scoped, so on a nested run the two disagree by design.
|
|
3011
|
-
*/
|
|
3038
|
+
/** Children across the owned forest after the join barrier and release sweep.
|
|
3039
|
+
* spawned === done + down + cancelled + neverSettled. Unlike the breaker's downCount,
|
|
3040
|
+
* down includes released retained children. spendGaps and tree read the whole forest (#1189). */
|
|
3012
3041
|
interface FleetYield {
|
|
3013
|
-
/**
|
|
3014
|
-
* are exempt. */
|
|
3042
|
+
/** Spawned children; excludes root and synthetic owned-tree root copies. */
|
|
3015
3043
|
readonly spawned: number;
|
|
3016
3044
|
readonly done: number;
|
|
3017
3045
|
/** `settled` records with `status: 'down'`, released records included. */
|
|
3018
3046
|
readonly down: number;
|
|
3019
3047
|
readonly cancelled: number;
|
|
3020
|
-
/** Spawned
|
|
3021
|
-
* keeps its environments for a resume (`retainedAtSettlement: 'keep'`). Named after
|
|
3022
|
-
* `SpendGap`'s `never-settled`. */
|
|
3048
|
+
/** Spawned without a terminal record: crash-orphaned or retained for resume. */
|
|
3023
3049
|
readonly neverSettled: number;
|
|
3024
|
-
/**
|
|
3025
|
-
* A nested manager whose OWN retained execution was released counts here beside the
|
|
3026
|
-
* grandchildren it released, because its execution was destroyed unrecovered too. */
|
|
3050
|
+
/** Released without recovery; a subset of down + cancelled. */
|
|
3027
3051
|
readonly releasedUnrecovered: number;
|
|
3028
|
-
/**
|
|
3029
|
-
* `down + cancelled`, disjoint from `releasedUnrecovered`: executions a final settlement left
|
|
3030
|
-
* unrecovered without confirming their environment destroyed. */
|
|
3052
|
+
/** Teardown unconfirmed; a disjoint subset of down + cancelled. */
|
|
3031
3053
|
readonly releaseUnconfirmed: number;
|
|
3032
3054
|
}
|
|
3033
|
-
/**
|
|
3055
|
+
/** Terminal receipt fields accompany every outcome; usage preserves measured lower bounds.
|
|
3056
|
+
* The established union arms remain explicit for consumers of the public declaration. */
|
|
3034
3057
|
type SupervisedResult<Out> = {
|
|
3035
3058
|
kind: 'winner';
|
|
3036
3059
|
out: Out;
|
|
3037
3060
|
outRef: string;
|
|
3038
3061
|
verdict?: DefaultVerdict;
|
|
3039
3062
|
tree: TreeView;
|
|
3040
|
-
/** The run's terminal accounting. `iterations`/`tokens`/`usd` are per-channel journal sums;
|
|
3041
|
-
* `ms` is the wall clock from supervise start (the ORIGINAL root instant on a resumed run)
|
|
3042
|
-
* to this terminal state — executors under-report their own `ms` and parallel children
|
|
3043
|
-
* overlap, so a per-event sum cannot state the run's real duration. `tokensKnown`/`usdKnown`
|
|
3044
|
-
* are always explicit here: `true` is the checked claim that every spawn reached a terminal
|
|
3045
|
-
* record and every settled/metered record carried a complete receipt on that channel;
|
|
3046
|
-
* `false` comes with the unaccounted nodes named in `spendGaps`. */
|
|
3047
3063
|
spentTotal: Spend;
|
|
3048
|
-
|
|
3064
|
+
readonly usage?: SettledUsage;
|
|
3049
3065
|
readonly rootProviderModel?: RootProviderModelEvidence;
|
|
3050
|
-
/** The root manager's retained provider stream, when the run directory holds one. */
|
|
3051
3066
|
readonly rootStream?: RootStreamReceipt;
|
|
3052
|
-
/** The root manager's native harness session, persisted like a child's receipt. A child's
|
|
3053
|
-
* receipt rides its settle record and the root has none, so the result carries it. Absent
|
|
3054
|
-
* for a router-brained root, which runs no driver. */
|
|
3055
3067
|
readonly rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
3056
|
-
/** What the root's external driver loop did: genuine continuations, failure retries,
|
|
3057
|
-
* environment replacements, why the loop ended, and how the root closed the run. Absent for
|
|
3058
|
-
* a router-brained root, which runs no driver loop. */
|
|
3059
3068
|
readonly continuation?: DriverContinuationRecord;
|
|
3060
|
-
/** The root's caller-supplied attribution as it registered (`SuperviseOptions.execution`):
|
|
3061
|
-
* a fork's lineage keys, a SearchSpec's `searchSpecDigest`. Absent when the caller set none. */
|
|
3062
3069
|
readonly execution?: AgentExecutionRef;
|
|
3063
|
-
/** Runtime-owned provider evidence reduced across the complete journal forest. */
|
|
3064
3070
|
readonly providerModel?: ProviderModelExecutionEvidence;
|
|
3065
|
-
/** Settled children whose teardown stayed unconfirmed after the settlement retry window
|
|
3066
|
-
* (`teardownConfirmMs`) — the resources this run could not prove destroyed. Each names the
|
|
3067
|
-
* provider environments a sweeper deletes when its executor reports them, and each is
|
|
3068
|
-
* journaled as a `teardown-unconfirmed` event. Present exactly when non-empty; a healthy run
|
|
3069
|
-
* never carries it. */
|
|
3070
3071
|
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
3071
|
-
/** The journaled nodes whose usage accounting is incomplete — the named gaps behind a
|
|
3072
|
-
* `false` `tokensKnown`/`usdKnown` on `spentTotal`. Present exactly when non-empty. */
|
|
3073
3072
|
spendGaps?: ReadonlyArray<SpendGap>;
|
|
3074
|
-
/** How the fleet ended, see `FleetYield`. Always present: zeros are facts. */
|
|
3075
3073
|
fleetYield: FleetYield;
|
|
3076
|
-
/** Where `spentTotal` went: `driverInference` = the drivers' own chat turns (metered via
|
|
3077
|
-
* `Scope.meter`); `childWork` = every spawned child's reconciled spend (the journal sum).
|
|
3078
|
-
* `driverInference + childWork === spentTotal` on `iterations`/`tokens`/`usd`; the
|
|
3079
|
-
* breakdown's `ms` fields stay executor-reported sums while `spentTotal.ms` is wall clock.
|
|
3080
|
-
* Present whenever any driver metered. */
|
|
3081
3074
|
spentBreakdown?: {
|
|
3082
3075
|
driverInference: Spend;
|
|
3083
3076
|
childWork: Spend;
|
|
3084
3077
|
};
|
|
3085
3078
|
} | ({
|
|
3086
|
-
/**
|
|
3087
|
-
* The LIFECYCLE no-winner arms: the supervisor itself proved why nothing was delivered, so
|
|
3088
|
-
* the reason is complete on its own and there is no driver rejection to hand back. A tripped
|
|
3089
|
-
* breaker or every child down is `all-children-down`, a cascaded abort is `aborted`, the
|
|
3090
|
-
* run's own `budget.deadlineMs` passing is `deadline`, and a spent token, iteration, dollar
|
|
3091
|
-
* or resource pool is `budget-exhausted`. A run with no `deadlineMs` has no deadline ending.
|
|
3092
|
-
* These outrank `driver-failed`: when the driver threw BECAUSE the pool emptied, the
|
|
3093
|
-
* deadline passed or the run was aborted, the lifecycle cause is the explanation.
|
|
3094
|
-
* One down child among delivered siblings is not a lifecycle cause; it rides `downCount`.
|
|
3095
|
-
*/
|
|
3096
3079
|
kind: 'no-winner';
|
|
3097
3080
|
tree: TreeView;
|
|
3098
3081
|
downCount: number;
|
|
3099
|
-
/** The conserved spend incurred before the run failed — real cost is paid even when no
|
|
3100
|
-
* worker delivers, so the caller always learns what the delegation actually spent. Summed
|
|
3101
|
-
* off the same journal the `winner` path reads, with the same contract: wall-clock `ms`,
|
|
3102
|
-
* explicit `tokensKnown`/`usdKnown`, gaps named in `spendGaps`. */
|
|
3103
3082
|
spentTotal: Spend;
|
|
3104
|
-
|
|
3083
|
+
readonly usage?: SettledUsage;
|
|
3105
3084
|
readonly rootProviderModel?: RootProviderModelEvidence;
|
|
3106
|
-
/** The root manager's retained provider stream, when the run directory holds one. */
|
|
3107
3085
|
readonly rootStream?: RootStreamReceipt;
|
|
3108
|
-
/** The root manager's native harness session, persisted like a child's receipt. A child's
|
|
3109
|
-
* receipt rides its settle record and the root has none, so the result carries it. Absent
|
|
3110
|
-
* for a router-brained root, which runs no driver. */
|
|
3111
3086
|
readonly rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
3112
|
-
/** What the root's external driver loop did: genuine continuations, failure retries,
|
|
3113
|
-
* environment replacements, why the loop ended, and how the root closed the run. Absent for
|
|
3114
|
-
* a router-brained root, which runs no driver loop. */
|
|
3115
3087
|
readonly continuation?: DriverContinuationRecord;
|
|
3116
|
-
/** The root's caller-supplied attribution as it registered (`SuperviseOptions.execution`):
|
|
3117
|
-
* a fork's lineage keys, a SearchSpec's `searchSpecDigest`. Absent when the caller set none. */
|
|
3118
3088
|
readonly execution?: AgentExecutionRef;
|
|
3119
|
-
/** Runtime-owned provider evidence reduced across the complete journal forest. */
|
|
3120
3089
|
readonly providerModel?: ProviderModelExecutionEvidence;
|
|
3121
|
-
/** Settled children whose teardown stayed unconfirmed after the settlement retry window
|
|
3122
|
-
* (`teardownConfirmMs`) — the resources this run could not prove destroyed. Each names the
|
|
3123
|
-
* provider environments a sweeper deletes when its executor reports them, and each is
|
|
3124
|
-
* journaled as a `teardown-unconfirmed` event. Present exactly when non-empty; a healthy run
|
|
3125
|
-
* never carries it. */
|
|
3126
3090
|
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
3127
|
-
/** Budget reservations still open when the run reached its join barrier, each named by the
|
|
3128
|
-
* assignment, child id, and lifecycle stage that holds it. The conserved-pool identity
|
|
3129
|
-
* `total ≡ free + reserved + committed` does not hold, so `spentTotal` is a floor rather
|
|
3130
|
-
* than a measurement — the run still settles with the tree and the spend the journal
|
|
3131
|
-
* recorded. Present exactly when non-empty; a healthy run never carries it. */
|
|
3132
3091
|
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
3133
|
-
/** The journaled nodes whose usage accounting is incomplete — the named gaps behind a
|
|
3134
|
-
* `false` `tokensKnown`/`usdKnown` on `spentTotal`. Present exactly when non-empty. */
|
|
3135
3092
|
spendGaps?: ReadonlyArray<SpendGap>;
|
|
3136
|
-
/** How the fleet ended, see `FleetYield`. Always present: zeros are facts. */
|
|
3137
3093
|
fleetYield: FleetYield;
|
|
3138
|
-
/** Never present on a lifecycle arm — the discriminant, not prose, is what makes
|
|
3139
|
-
* `if (r.reason === 'driver-failed') r.error.message` compile and every other arm refuse it. */
|
|
3140
3094
|
error?: never;
|
|
3141
3095
|
} & ({
|
|
3142
|
-
/**
|
|
3143
|
-
* `no-children-spawned`: the root ran to completion under budget, selected nothing, and
|
|
3144
|
-
* never spawned a child. Until this arm existed that run settled `all-children-down`
|
|
3145
|
-
* with `downCount: 0`, which reads as a fleet failure to anyone who did not open the
|
|
3146
|
-
* journal; fifteen sandbox-placed directors settled that way in one week while the
|
|
3147
|
-
* actual fault was that the root never recursed.
|
|
3148
|
-
*
|
|
3149
|
-
* `no-result-selected`: the root ran to completion under budget, spawned children, and
|
|
3150
|
-
* selected nothing while no child was down when it settled. Until this arm existed that
|
|
3151
|
-
* run also settled `all-children-down`: on the 2026-09-20 fleet corpus, 46 of the 57
|
|
3152
|
-
* runs carrying that reason had zero down children in their own `fleetYield`, and a
|
|
3153
|
-
* reader of the label learned that banking pages was losing. `all-children-down` now
|
|
3154
|
-
* asserts what its name says: the supervisor observed a down child, a tripped breaker,
|
|
3155
|
-
* or every child down, before the root settled.
|
|
3156
|
-
*
|
|
3157
|
-
* `stopped`: a flow graph's `stop` edge ended the run (`runGraph` names the edge and its
|
|
3158
|
-
* reason on `GraphResult.stopped`). The run returns; it does not throw.
|
|
3159
|
-
*/
|
|
3160
3096
|
reason: 'all-children-down' | 'no-children-spawned' | 'no-result-selected' | 'stopped' | 'budget-exhausted' | 'deadline' | 'aborted';
|
|
3161
3097
|
} | {
|
|
3162
3098
|
reason: 'cancelled';
|
|
3163
3099
|
readonly source: string;
|
|
3164
3100
|
readonly cancellationReason: string;
|
|
3165
3101
|
readonly operationId?: string;
|
|
3166
|
-
/** Who stopped the run, as its durable cancel request named them. Absent for an
|
|
3167
|
-
* in-process abort and for a request written before `cancelRun` required one. */
|
|
3168
3102
|
readonly operator?: string;
|
|
3169
3103
|
})) | {
|
|
3170
|
-
/**
|
|
3171
|
-
* The DRIVER-FAULT arm: `act()` rejected and no lifecycle cause (breaker/abort/budget/every
|
|
3172
|
-
* child down) outranks it — so nothing about the tree explains the failure and the driver's
|
|
3173
|
-
* own rejection is the only thing that does. It is therefore REQUIRED here. One down child
|
|
3174
|
-
* among delivered siblings does not outrank it: that count rides `downCount`.
|
|
3175
|
-
* `all-children-down` with `downCount: 0` used to be indistinguishable from an honest empty
|
|
3176
|
-
* result; this arm is that configuration/authoring fault, named.
|
|
3177
|
-
*/
|
|
3178
3104
|
kind: 'no-winner';
|
|
3179
3105
|
reason: 'driver-failed';
|
|
3180
3106
|
tree: TreeView;
|
|
3181
3107
|
downCount: number;
|
|
3182
|
-
/** The conserved spend incurred before the run failed — real cost is paid even when no
|
|
3183
|
-
* worker delivers, so the caller always learns what the delegation actually spent. Summed
|
|
3184
|
-
* off the same journal the `winner` path reads, with the same contract: wall-clock `ms`,
|
|
3185
|
-
* explicit `tokensKnown`/`usdKnown`, gaps named in `spendGaps`. */
|
|
3186
3108
|
spentTotal: Spend;
|
|
3187
|
-
|
|
3109
|
+
readonly usage?: SettledUsage;
|
|
3188
3110
|
readonly rootProviderModel?: RootProviderModelEvidence;
|
|
3189
|
-
/** The root manager's retained provider stream, when the run directory holds one. */
|
|
3190
3111
|
readonly rootStream?: RootStreamReceipt;
|
|
3191
|
-
/** The root manager's native harness session, persisted like a child's receipt. A child's
|
|
3192
|
-
* receipt rides its settle record and the root has none, so the result carries it. Absent
|
|
3193
|
-
* for a router-brained root, which runs no driver. */
|
|
3194
3112
|
readonly rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
3195
|
-
/** What the root's external driver loop did: genuine continuations, failure retries,
|
|
3196
|
-
* environment replacements, why the loop ended, and how the root closed the run. Absent for
|
|
3197
|
-
* a router-brained root, which runs no driver loop. */
|
|
3198
3113
|
readonly continuation?: DriverContinuationRecord;
|
|
3199
|
-
/** The root's caller-supplied attribution as it registered (`SuperviseOptions.execution`):
|
|
3200
|
-
* a fork's lineage keys, a SearchSpec's `searchSpecDigest`. Absent when the caller set none. */
|
|
3201
3114
|
readonly execution?: AgentExecutionRef;
|
|
3202
|
-
/** Runtime-owned provider evidence reduced across the complete journal forest. */
|
|
3203
3115
|
readonly providerModel?: ProviderModelExecutionEvidence;
|
|
3204
|
-
/** Settled children whose teardown stayed unconfirmed after the settlement retry window
|
|
3205
|
-
* (`teardownConfirmMs`) — the resources this run could not prove destroyed. Each names the
|
|
3206
|
-
* provider environments a sweeper deletes when its executor reports them, and each is
|
|
3207
|
-
* journaled as a `teardown-unconfirmed` event. Present exactly when non-empty; a healthy run
|
|
3208
|
-
* never carries it. */
|
|
3209
3116
|
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
3210
|
-
/** Budget reservations still open when the run reached its join barrier, each named by the
|
|
3211
|
-
* assignment, child id, and lifecycle stage that holds it. The conserved-pool identity
|
|
3212
|
-
* `total ≡ free + reserved + committed` does not hold, so `spentTotal` is a floor rather
|
|
3213
|
-
* than a measurement — the run still settles with the tree and the spend the journal
|
|
3214
|
-
* recorded. Present exactly when non-empty; a healthy run never carries it. */
|
|
3215
3117
|
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
3216
|
-
/** The journaled nodes whose usage accounting is incomplete — the named gaps behind a
|
|
3217
|
-
* `false` `tokensKnown`/`usdKnown` on `spentTotal`. Present exactly when non-empty. */
|
|
3218
3118
|
spendGaps?: ReadonlyArray<SpendGap>;
|
|
3219
|
-
/** How the fleet ended, see `FleetYield`. Always present: zeros are facts. */
|
|
3220
3119
|
fleetYield: FleetYield;
|
|
3221
|
-
/** The driver's own rejection, carried across the typed no-winner boundary so the failure is
|
|
3222
|
-
* recoverable by the caller. A non-`Error` rejection is normalized, never dropped. */
|
|
3223
3120
|
error: NoWinnerError;
|
|
3224
3121
|
};
|
|
3225
3122
|
/** `'queued'` is an admitted child that holds its budget slice and waits for a worker slot
|
|
@@ -3252,9 +3149,9 @@ interface SpawnOpts {
|
|
|
3252
3149
|
* always run.
|
|
3253
3150
|
*/
|
|
3254
3151
|
readonly key?: string;
|
|
3255
|
-
/** The
|
|
3256
|
-
* whose work. The caller asserts the relation; the coordination `spawn_worker` tool admits
|
|
3257
|
-
*
|
|
3152
|
+
/** The sibling node this spawn revises or replaces, so a run's record names which worker took over
|
|
3153
|
+
* whose work. The caller asserts the relation; the coordination `spawn_worker` tool admits any
|
|
3154
|
+
* worker of the same manager, live or settled. Journaled on `spawned` and on the `agent.spawn` hook. */
|
|
3258
3155
|
readonly successorOf?: NodeId;
|
|
3259
3156
|
/**
|
|
3260
3157
|
* With `key`: when the key's committed result ended over its budget and its environment is still
|
|
@@ -3540,83 +3437,41 @@ interface Budget {
|
|
|
3540
3437
|
readonly deadlineMs?: number;
|
|
3541
3438
|
readonly resources?: Readonly<Record<string, ResourceLimit>>;
|
|
3542
3439
|
}
|
|
3543
|
-
/**
|
|
3544
|
-
*
|
|
3545
|
-
* channels (never folded).
|
|
3546
|
-
*
|
|
3547
|
-
* `boxMinutes` is a REPORTED channel, not a conserved one: it is summed across a run and carried
|
|
3548
|
-
* in the journal, and the budget pool never reserves, commits, or refunds against it. `budget.ts`
|
|
3549
|
-
* holds the reason.
|
|
3550
|
-
*/
|
|
3440
|
+
/** Conserved spend from the `UsageEvent` stream. Tokens and dollars stay separate.
|
|
3441
|
+
* `boxMinutes` is reported only: the pool does not reserve against it. */
|
|
3551
3442
|
interface Spend {
|
|
3552
3443
|
resources?: Readonly<Record<string, ResourceSpend>>;
|
|
3553
3444
|
iterations: number;
|
|
3554
3445
|
tokens: LoopTokenUsage;
|
|
3555
|
-
/**
|
|
3556
|
-
* an unreported token count: `tokens` then carries the known subtotal (often `{0,0}`) and must
|
|
3557
|
-
* not be read as the measured total. The twin of `usdKnown` on the token channel — an inference
|
|
3558
|
-
* turn whose provider reported no usage is recorded with this flag rather than omitted, because
|
|
3559
|
-
* omitting it makes the turn look free. */
|
|
3446
|
+
/** False marks work that happened with an unreported count. `tokens` is then a floor, not the total. */
|
|
3560
3447
|
tokensKnown?: boolean;
|
|
3561
3448
|
/** Dollar accounting is known unless explicitly false. A false value must not be treated as $0
|
|
3562
3449
|
* when enforcing a dollar-denominated comparison or limit. */
|
|
3563
3450
|
usdKnown?: boolean;
|
|
3564
3451
|
usd: number;
|
|
3565
|
-
/** The part of `usd
|
|
3566
|
-
* the work: a model catalog's own number, or a figure a provider stated but did not bill.
|
|
3567
|
-
* `usd - usdEstimated` is what a provider is known to have billed. Present only with
|
|
3568
|
-
* `usdKnown: false`; absence means nothing here was priced, not that `usd` is measured. */
|
|
3452
|
+
/** The priced part of `usd`, present only with `usdKnown: false`. `usd - usdEstimated` was billed. */
|
|
3569
3453
|
usdEstimated?: number;
|
|
3570
3454
|
ms: number;
|
|
3571
|
-
/**
|
|
3572
|
-
* Platform box wall time in minutes — the third conserved channel, beside tokens and dollars.
|
|
3573
|
-
*
|
|
3574
|
-
* A run on a subscription seat has no marginal dollar per model call, so box time is the only
|
|
3575
|
-
* real resource it consumes. Before this channel existed such a run reported `$0` with nothing
|
|
3576
|
-
* beside it and was unaccountable by construction.
|
|
3577
|
-
*
|
|
3578
|
-
* ABSENT when nothing was measured. Never `0` for unknown: a zero would claim the box consumed
|
|
3579
|
-
* no platform time, which is a different fact from a box nobody metered. The field is absent
|
|
3580
|
-
* entirely on a run with no box (router, cli-bridge, inline), because "not applicable" is not
|
|
3581
|
-
* the same fact as "unmeasured" either.
|
|
3582
|
-
*/
|
|
3455
|
+
/** Platform box minutes. Absent when unmeasured or when no box ran. Never `0` for unknown. */
|
|
3583
3456
|
boxMinutes?: number;
|
|
3584
|
-
/**
|
|
3585
|
-
* be paired, so `boxMinutes` — when present at all — is a floor, never the total. The twin of
|
|
3586
|
-
* `tokensKnown` and `usdKnown` on the platform channel. */
|
|
3457
|
+
/** False: a box ran and `boxMinutes`, if present, is a floor. */
|
|
3587
3458
|
boxMinutesKnown?: boolean;
|
|
3588
|
-
/**
|
|
3589
|
-
*
|
|
3590
|
-
* (`CostProvenance`, `cost-ledger.ts`).
|
|
3591
|
-
*
|
|
3592
|
-
* `'observed'` — the platform itself reported the minutes.
|
|
3593
|
-
* `'estimated'` — this runtime derived them from the box lifetime it watched. A derived number
|
|
3594
|
-
* is not a platform receipt, and the conserved pool never reserves against it.
|
|
3595
|
-
* `'uncaptured'` — a box ran and nothing measured its time. Comes WITHOUT `boxMinutes`.
|
|
3596
|
-
*/
|
|
3459
|
+
/** `observed` is the platform's number. `estimated` is derived and not reserved against.
|
|
3460
|
+
* `uncaptured` means a box ran and comes without `boxMinutes`. */
|
|
3597
3461
|
boxMinutesProvenance?: 'observed' | 'estimated' | 'uncaptured';
|
|
3598
|
-
/**
|
|
3599
|
-
* How the token counters in `tokens` were obtained, when this record states it.
|
|
3600
|
-
*
|
|
3601
|
-
* ABSENT means every count came from the executor's live stream, which is what every path
|
|
3602
|
-
* reported before harness stores were readable. `'harness-store'` says the harness's own file was
|
|
3603
|
-
* the receipt; `'mixed'` says both sources contributed to this settlement.
|
|
3604
|
-
*
|
|
3605
|
-
* This is a provenance fact, not a confidence one: a store read is the provider's own number and
|
|
3606
|
-
* carries `tokensKnown: true`. The twin of `boxMinutesProvenance` on the token channel.
|
|
3607
|
-
*/
|
|
3462
|
+
/** Where `tokens` came from. Absent means the live stream. A store read still has `tokensKnown: true`. */
|
|
3608
3463
|
tokensProvenance?: TokenUsageProvenance;
|
|
3464
|
+
/** Tokens the live stream had reported when a broken stream's exact result arrived. `tokens` stays the recorded total. */
|
|
3465
|
+
streamedTokens?: LoopTokenUsage;
|
|
3466
|
+
/** Recorded total minus `streamedTokens`, for each counter that grew. Absent when the exact result did not exceed the stream. */
|
|
3467
|
+
unobservedTokens?: LoopTokenUsage;
|
|
3468
|
+
/** False when `iterations` is only the provider-invocation floor: the exact result exceeded the stream, so this count does not name the model calls. */
|
|
3469
|
+
iterationsKnown?: false;
|
|
3609
3470
|
}
|
|
3610
3471
|
/** The accounting channels a usage gap leaves incomplete. */
|
|
3611
3472
|
type SpendChannel = 'tokens' | 'usd' | `resource:${string}`;
|
|
3612
|
-
/**
|
|
3613
|
-
*
|
|
3614
|
-
* `tokensKnown`/`usdKnown` on a terminal `spentTotal`. `never-settled`: the spawn is durable but
|
|
3615
|
-
* no terminal record landed, so the whole subtree is unaccounted on every channel and
|
|
3616
|
-
* `spentTotal` charges its budget ceiling instead of a fabricated zero. `unreported`: a settled
|
|
3617
|
-
* or metered record landed without a complete provider receipt, so the summed numbers are a
|
|
3618
|
-
* floor on the named channels, never the measured total.
|
|
3619
|
-
*/
|
|
3473
|
+
/** A node with missing usage. Recorded subtotals are lower bounds; never-settled
|
|
3474
|
+
* work has no terminal receipt and unreported work has an incomplete one. */
|
|
3620
3475
|
interface SpendGap {
|
|
3621
3476
|
readonly id: NodeId;
|
|
3622
3477
|
/** The spawn label, when the node's `spawned` event is in this journal tree. */
|
|
@@ -3636,15 +3491,7 @@ interface BudgetOverspend {
|
|
|
3636
3491
|
readonly reserved: number;
|
|
3637
3492
|
readonly spent: number;
|
|
3638
3493
|
}
|
|
3639
|
-
/**
|
|
3640
|
-
* A settled reservation whose measured spend exceeded what it reserved.
|
|
3641
|
-
*
|
|
3642
|
-
* It records an accounting fact, not an outcome. A child that completed stays `done` with its
|
|
3643
|
-
* artifact, and a child that failed stays `down`. The pool commits the true spend, so its free
|
|
3644
|
-
* balance already carries the overspend and later reservations are refused on their own.
|
|
3645
|
-
* Spend the pool cannot verify (unknown dollars under a dollar cap, unknown or overflowing
|
|
3646
|
-
* resource usage) is not an overspend: it fails the child closed instead.
|
|
3647
|
-
*/
|
|
3494
|
+
/** Measured spend past the reservation. The child stays done or down; unverifiable spend fails closed. */
|
|
3648
3495
|
interface BudgetViolation {
|
|
3649
3496
|
/** Every overspent channel, in the order tokens, iterations, usd, then resources. Never empty. */
|
|
3650
3497
|
readonly overspent: ReadonlyArray<BudgetOverspend>;
|
|
@@ -3956,13 +3803,8 @@ declare function createPropagatingTraceEmitter(ctx: TraceContext): {
|
|
|
3956
3803
|
* `SupervisorSpanRecorder.workerTrace` and threaded to the scope as `SupervisorOpts.workerTrace`.
|
|
3957
3804
|
*/
|
|
3958
3805
|
type WorkerTraceResolver = (spawningNodeId: string) => TraceContext | undefined;
|
|
3959
|
-
/**
|
|
3960
|
-
*
|
|
3961
|
-
* and the root handle. `run` executes the root `Agent` to completion; `attach` wires a
|
|
3962
|
-
* live `RootHandle` (the Q2 substrate the chat/pi-viz client later consumes).
|
|
3963
|
-
*
|
|
3964
|
-
* @stable
|
|
3965
|
-
*/
|
|
3806
|
+
/** Runs a root under the conserved pool, durable journal, abort cascade and restart breaker.
|
|
3807
|
+
* @stable */
|
|
3966
3808
|
interface Supervisor<Task, Out> {
|
|
3967
3809
|
run(root: Agent<Task, Out>, task: Task, opts: SupervisorOpts): Promise<SupervisedResult<Out>>;
|
|
3968
3810
|
attach(h: RootHandle<Out>): void;
|
|
@@ -3972,20 +3814,14 @@ interface Supervisor<Task, Out> {
|
|
|
3972
3814
|
interface RecursiveReservationPolicy {
|
|
3973
3815
|
readonly ownerShare: number;
|
|
3974
3816
|
}
|
|
3975
|
-
/**
|
|
3976
|
-
*
|
|
3977
|
-
*
|
|
3978
|
-
* Its profile's `model.provider`, `model.default`, `model.reasoningEffort` and `harness`, and the
|
|
3979
|
-
* package versions the caller ran it under. A run is one id for its whole life; a turn that ends, a lost stream or a dead supervisor is a
|
|
3980
|
-
* boundary between entries, and an entry on anything else here starts a new segment.
|
|
3981
|
-
*/
|
|
3817
|
+
/** One root's model, harness and package versions. Changed execution starts a new segment
|
|
3818
|
+
* under the same run id; a turn, lost stream or restart is only a new entry. */
|
|
3982
3819
|
interface RootSegment {
|
|
3983
3820
|
readonly provider?: string;
|
|
3984
3821
|
readonly model?: string;
|
|
3985
3822
|
readonly reasoningEffort?: ReasoningEffort;
|
|
3986
3823
|
readonly harness?: string;
|
|
3987
|
-
/**
|
|
3988
|
-
* them). Runtime records them and never reads them. */
|
|
3824
|
+
/** Caller package versions; recorded without interpretation. */
|
|
3989
3825
|
readonly stack?: Readonly<Record<string, string>>;
|
|
3990
3826
|
}
|
|
3991
3827
|
/** The segment a root enters with this process. */
|
|
@@ -4001,6 +3837,8 @@ interface SupervisorOpts {
|
|
|
4001
3837
|
readonly budget: Budget;
|
|
4002
3838
|
/** Exact root profile/task identity supplied by the one-call composition surface. */
|
|
4003
3839
|
readonly rootIdentity?: NodeExecutionIdentity;
|
|
3840
|
+
/** Authored request, independent of whether the root uses an external executor. */
|
|
3841
|
+
readonly requestedProfile?: import('@tangle-network/agent-interface').AgentProfile;
|
|
4004
3842
|
/** The segment this entry runs the root in. `rootIdentity` stays the recorded root's; when the
|
|
4005
3843
|
* segment differs from the one the run last ran, the journal gains one `root-segment` record. A
|
|
4006
3844
|
* fresh run refuses a segment that changes the recorded profile's model or harness. */
|
|
@@ -4052,23 +3890,10 @@ interface SupervisorOpts {
|
|
|
4052
3890
|
* teardown.
|
|
4053
3891
|
*/
|
|
4054
3892
|
readonly childSettleGraceMs?: number | null;
|
|
4055
|
-
/**
|
|
4056
|
-
*
|
|
4057
|
-
*
|
|
4058
|
-
*
|
|
4059
|
-
* 2026-09-20, cancelling 20 Discovery lanes left 2 workers running, and 136 of 612 agents
|
|
4060
|
-
* across that campaign ended with teardown unconfirmed. The barrier re-asks each unconfirmed
|
|
4061
|
-
* child with exponential backoff (starting at 1/300 of this window, doubling, capped at 1/10 of
|
|
4062
|
-
* it) and releases a failed retained environment again under `retainedAtSettlement:
|
|
4063
|
-
* 'release'`. A child still unconfirmed when the window closes is named in
|
|
4064
|
-
* `teardownUnconfirmed` with the environment ids its executor reports, and journaled. The
|
|
4065
|
-
* nodes pending when the window opens are journaled first as `teardown-pending`, so a process
|
|
4066
|
-
* that dies inside the window still leaves their environment ids on record. A retained
|
|
4067
|
-
* environment kept for a resume is not retried, and neither is an answer the executor marks
|
|
4068
|
-
* `permanent`. The window runs after the run's deadline too: a deadline stops work, not
|
|
4069
|
-
* cleanup, so settlement can return up to this long after it. `0` makes one attempt only.
|
|
4070
|
-
* Default: 300000 (5 minutes).
|
|
4071
|
-
*/
|
|
3893
|
+
/** Teardown retry window, including after the run deadline. Pending environments are
|
|
3894
|
+
* journaled before retry; unresolved teardown is named in teardownUnconfirmed.
|
|
3895
|
+
* Kept environments and permanent refusals are not retried. Zero makes one attempt.
|
|
3896
|
+
* supervisor-child-join.ts owns DEFAULT_TEARDOWN_CONFIRM_MS and retry backoff. */
|
|
4072
3897
|
readonly teardownConfirmMs?: number;
|
|
4073
3898
|
/**
|
|
4074
3899
|
* Load prior journal state and expose committed settlements through `Scope.resume`.
|
|
@@ -4082,35 +3907,13 @@ interface SupervisorOpts {
|
|
|
4082
3907
|
* @experimental
|
|
4083
3908
|
*/
|
|
4084
3909
|
readonly resume?: boolean;
|
|
4085
|
-
/**
|
|
4086
|
-
*
|
|
4087
|
-
*
|
|
4088
|
-
*
|
|
4089
|
-
* the
|
|
4090
|
-
*
|
|
4091
|
-
*
|
|
4092
|
-
* environments. The join barrier releases each one and journals an `environment-teardown`
|
|
4093
|
-
* receipt per environment. Four settled runs held 18 of a 60-slot
|
|
4094
|
-
* Sandbox fleet for 19 to 37 hours without it. It then closes each released child's cursor
|
|
4095
|
-
* slot with a terminal record marked `retainedExecution: 'released'`, so `spendGaps` names
|
|
4096
|
-
* it `unreported` (a floor) rather than `never-settled` (a ceiling) and
|
|
4097
|
-
* `fleetYield.releasedUnrecovered` counts it. A release that is refused or cannot be
|
|
4098
|
-
* confirmed names the node in `teardownUnconfirmed` and its `teardown-unconfirmed` record,
|
|
4099
|
-
* and after the retry window closes its slot with `retainedExecution: 'release-unconfirmed'`,
|
|
4100
|
-
* counted by `fleetYield.releaseUnconfirmed`: the settlement is final, so the slot closes
|
|
4101
|
-
* whether or not the environment is confirmed gone. Measured 2026-09-23/24 on the Discovery
|
|
4102
|
-
* fleet (Runtime 0.249.1 to 0.261.0): 338 of 1,620 agents never settled, and 179 of the
|
|
4103
|
-
* retained ones had an admission that never named an environment. A process that dies
|
|
4104
|
-
* between the last `destroyed: true` receipt and the released record leaves the slot open
|
|
4105
|
-
* only until the next resume, whose `healReleasedSlots` writes the identical record from the
|
|
4106
|
-
* `reconciled` record.
|
|
4107
|
-
* - `'keep'`: a later process may resume this run, so the environments stay for its recovery.
|
|
4108
|
-
*
|
|
4109
|
-
* Default: `'keep'` when `resume` is true (a durable run a later process may continue), else
|
|
4110
|
-
* `'release'`. A caller that owns finality says so: `supervisePursuit` records a settle record
|
|
4111
|
-
* that refuses re-entry, so it always releases. A process crash never reaches settlement, so it
|
|
4112
|
-
* releases nothing under either value.
|
|
4113
|
-
*/
|
|
3910
|
+
/** Held execution fate at root settlement. Release journals environment teardown and closes
|
|
3911
|
+
* each cursor, marking unconfirmed teardown release-unconfirmed. A later resume heals a
|
|
3912
|
+
* crash between confirmed teardown and terminal publication from its durable floor.
|
|
3913
|
+
* Keep preserves environments for resume and is the default when resume is enabled;
|
|
3914
|
+
* otherwise release is the default. supervisePursuit always releases because its sealed
|
|
3915
|
+
* result refuses re-entry. Process death does not itself release environments.
|
|
3916
|
+
* Missing receipts always leave measured terminal usage incomplete. */
|
|
4114
3917
|
readonly retainedAtSettlement?: 'release' | 'keep';
|
|
4115
3918
|
readonly now?: () => number;
|
|
4116
3919
|
readonly signal?: AbortSignal;
|
|
@@ -4198,7 +4001,7 @@ type SpawnEvent = {
|
|
|
4198
4001
|
key?: string;
|
|
4199
4002
|
/** Manager-scoped assignment identity used to join unkeyed and keyed work alike. */
|
|
4200
4003
|
assignmentId?: string;
|
|
4201
|
-
/** The
|
|
4004
|
+
/** The sibling node this spawn revises or replaces (`SpawnOpts.successorOf`). */
|
|
4202
4005
|
successorOf?: NodeId;
|
|
4203
4006
|
/** The budget-stopped node whose held environment and session this node continues. */
|
|
4204
4007
|
continues?: {
|
|
@@ -5266,66 +5069,6 @@ declare class FileResultBlobStore implements ResultBlobStore {
|
|
|
5266
5069
|
get(outRef: string): Promise<unknown | undefined>;
|
|
5267
5070
|
private blobPath;
|
|
5268
5071
|
}
|
|
5269
|
-
/** One journal tree in a recursively loaded supervision forest. */
|
|
5270
|
-
interface SpawnForestTree {
|
|
5271
|
-
readonly root: NodeId;
|
|
5272
|
-
/** Driver node that owns this tree; absent for the requested root tree. */
|
|
5273
|
-
readonly ownerNodeId?: NodeId;
|
|
5274
|
-
/** Journal tree containing `ownerNodeId`; absent for the requested root tree. */
|
|
5275
|
-
readonly parentTreeRoot?: NodeId;
|
|
5276
|
-
readonly events: ReadonlyArray<SpawnEvent>;
|
|
5277
|
-
readonly view: TreeView;
|
|
5278
|
-
}
|
|
5279
|
-
/** One event with the journal tree that establishes its cursor namespace. */
|
|
5280
|
-
interface SpawnForestEvent {
|
|
5281
|
-
readonly treeRoot: NodeId;
|
|
5282
|
-
readonly event: SpawnEvent;
|
|
5283
|
-
}
|
|
5284
|
-
/** One flattened node with the journal tree that owns its records. */
|
|
5285
|
-
interface SpawnForestNode extends NodeSnapshot {
|
|
5286
|
-
readonly treeRoot: NodeId;
|
|
5287
|
-
}
|
|
5288
|
-
/** A spawned worker with no terminal record in a cold snapshot. Resume treats the same state as
|
|
5289
|
-
* in-doubt and conservatively retains its reservation. Root nodes and armed waits are excluded. */
|
|
5290
|
-
interface SpawnForestInDoubtNode {
|
|
5291
|
-
readonly treeRoot: NodeId;
|
|
5292
|
-
readonly nodeId: NodeId;
|
|
5293
|
-
readonly label: string;
|
|
5294
|
-
readonly runtime: Runtime;
|
|
5295
|
-
}
|
|
5296
|
-
/** A driver spawn whose owned journal tree was never begun before the process stopped. */
|
|
5297
|
-
interface SpawnForestMissingTree {
|
|
5298
|
-
readonly parentTreeRoot: NodeId;
|
|
5299
|
-
readonly ownerNodeId: NodeId;
|
|
5300
|
-
readonly root: NodeId;
|
|
5301
|
-
}
|
|
5302
|
-
/** Complete cold-readable view of one recursive supervision run. */
|
|
5303
|
-
interface SpawnForest {
|
|
5304
|
-
readonly root: NodeId;
|
|
5305
|
-
readonly trees: ReadonlyArray<SpawnForestTree>;
|
|
5306
|
-
readonly nodes: ReadonlyArray<SpawnForestNode>;
|
|
5307
|
-
readonly events: ReadonlyArray<SpawnForestEvent>;
|
|
5308
|
-
readonly inDoubt: ReadonlyArray<SpawnForestInDoubtNode>;
|
|
5309
|
-
readonly missingTrees: ReadonlyArray<SpawnForestMissingTree>;
|
|
5310
|
-
}
|
|
5311
|
-
/**
|
|
5312
|
-
* Load every journal tree owned by one recursive supervision run and flatten its nodes/events.
|
|
5313
|
-
*
|
|
5314
|
-
* Nested driver tree keys are a Runtime implementation detail; callers should use this reader
|
|
5315
|
-
* instead of deriving or scanning keys themselves. The reader follows only the explicit
|
|
5316
|
-
* `ownedTreeRoot` written after Runtime privately attested a recursive executor; the open runtime
|
|
5317
|
-
* string `driver` is never treated as ownership. Legacy records without `ownedTreeRoot` are
|
|
5318
|
-
* intentionally treated as leaves rather than guessing or scanning convention-derived keys.
|
|
5319
|
-
* This preserves each tree's independent cursor namespace on flattened events.
|
|
5320
|
-
* A driver whose subtree was never begun is reported in `missingTrees`; any spawned non-root node
|
|
5321
|
-
* without a terminal record is reported in `inDoubt`, matching resume's conservative lost-work
|
|
5322
|
-
* interpretation.
|
|
5323
|
-
*
|
|
5324
|
-
* This is a cold/quiescent reader, not a transaction across an actively mutating file. Every value
|
|
5325
|
-
* returned is a detached immutable snapshot, so later journal writes or caller mutation cannot
|
|
5326
|
-
* change the result already observed.
|
|
5327
|
-
*/
|
|
5328
|
-
declare function loadSpawnForest(journal: SpawnJournal, root: NodeId): Promise<SpawnForest>;
|
|
5329
5072
|
/**
|
|
5330
5073
|
* Materialize a recorded `TreeView` from a journaled event list for inspection. Folds
|
|
5331
5074
|
* `spawned`/`settled`/`cancelled` into a per-node snapshot in `seq` order, then adds each
|
|
@@ -6512,6 +6255,19 @@ type CoordinationEvent = {
|
|
|
6512
6255
|
readonly type: 'tool-outcome';
|
|
6513
6256
|
readonly outcome: ToolOutcomeEvent;
|
|
6514
6257
|
} |
|
|
6258
|
+
/** Server timing of one coordination tool call. Record-only: it never wakes the manager.
|
|
6259
|
+
* `receivedAt` is the server clock when the handler started, `elapsedMs` is that handler's
|
|
6260
|
+
* duration, and `responseBytes` is the UTF-8 size of its JSON result or error message. */
|
|
6261
|
+
{
|
|
6262
|
+
readonly type: 'tool-timing';
|
|
6263
|
+
readonly call: {
|
|
6264
|
+
readonly tool: string;
|
|
6265
|
+
readonly receivedAt: number;
|
|
6266
|
+
readonly elapsedMs: number;
|
|
6267
|
+
readonly responseBytes: number;
|
|
6268
|
+
readonly ok: boolean;
|
|
6269
|
+
};
|
|
6270
|
+
} |
|
|
6515
6271
|
/** This manager's lead (its parent manager, or the operator for a root) sent it a steer or an
|
|
6516
6272
|
* answer. Queued: a manager's harness has no live inbox between turns, so the message is the
|
|
6517
6273
|
* input of its next wake instead of a refused delivery. */
|
|
@@ -9104,49 +8860,14 @@ interface ResolvedMcpServerLaunch {
|
|
|
9104
8860
|
*/
|
|
9105
8861
|
declare function resolveMcpServerLaunch(server: AgentProfileMcpServer, keys: KeyProvider | undefined, label: string): Promise<ResolvedMcpServerLaunch>;
|
|
9106
8862
|
/**
|
|
9107
|
-
* cli-bridge seam.
|
|
9108
|
-
*
|
|
9109
|
-
*
|
|
9110
|
-
*
|
|
9111
|
-
*
|
|
9112
|
-
*
|
|
9113
|
-
*
|
|
9114
|
-
*
|
|
9115
|
-
* operation allowed to stop it. Omit `sessionId` and the executor mints one per spawn.
|
|
9116
|
-
*
|
|
9117
|
-
* ── HOW TO CONTROL WHAT THE HARNESS LOADS (there is no argv field, by design) ──
|
|
9118
|
-
*
|
|
9119
|
-
* A worker often needs the harness started in a KNOWN state — no ambient extensions, skills,
|
|
9120
|
-
* context files, or prompt templates — because ambient state is how a paired experiment silently
|
|
9121
|
-
* loses its pairing: an installed extension that persists memory across runs carries arm A's state
|
|
9122
|
-
* into arm B, and nothing reports it.
|
|
9123
|
-
*
|
|
9124
|
-
* That is what the spawned `AgentProfile` is FOR. `agent_profile`
|
|
9125
|
-
* rides every request verbatim, and cli-bridge maps it onto each harness's own native controls:
|
|
9126
|
-
*
|
|
9127
|
-
* - Materializing any profile at all already starts the harness isolated from ambient
|
|
9128
|
-
* workspace state — for pi that is `--no-context-files --no-skills --no-prompt-templates`,
|
|
9129
|
-
* applied to every request that carries an `agent_profile`.
|
|
9130
|
-
* - `AgentProfile.extensions.<harness>` is the named, per-harness control channel. An explicit
|
|
9131
|
-
* `extensions: { pi: { load: [] } }` disables ambient extension discovery outright
|
|
9132
|
-
* (pi's `--no-extensions`); listing package names loads exactly those and nothing else.
|
|
9133
|
-
* - `permissions` / `tools` / `mcp` map onto the harness's native tool and server controls.
|
|
9134
|
-
*
|
|
9135
|
-
* A caller therefore does NOT need to hand-roll an `Executor` to isolate a harness run, and the
|
|
9136
|
-
* profile expressing it stays portable: the same declaration means the same thing on a different
|
|
9137
|
-
* harness, whereas an argv string means nothing anywhere else.
|
|
9138
|
-
*
|
|
9139
|
-
* WHY NOT A GENERAL ARGV PASSTHROUGH. `bridgeUrl` addresses a process-spawning server. Forwarding
|
|
9140
|
-
* an arbitrary argv array to it would let any caller holding a bearer token choose the flags of a
|
|
9141
|
-
* process on the bridge host — which for real harness CLIs includes flags that load code from a
|
|
9142
|
-
* path, read a file into the prompt, redirect the working directory, or turn off the isolation the
|
|
9143
|
-
* bridge applies. cli-bridge deliberately confines workers (a filesystem jail and deny-by-default
|
|
9144
|
-
* network egress), and every one of those confinements is expressed as spawn configuration, so an
|
|
9145
|
-
* argv channel is a channel for unwinding them. It would also break this executor's own contract:
|
|
9146
|
-
* the durable-run replay protocol, session pinning, and streaming mode are all argv the bridge
|
|
9147
|
-
* owns, and a caller-supplied duplicate silently wins or corrupts the parse. The structured profile
|
|
9148
|
-
* channel is validated, per-harness, portable, and refuses controls it does not understand — keep
|
|
9149
|
-
* new harness capability there.
|
|
8863
|
+
* cli-bridge transport seam. The spawned `AgentProfile` is the harness authority and is forwarded
|
|
8864
|
+
* verbatim; this seam carries transport only. `sessionId` is the harness conversation; each turn has
|
|
8865
|
+
* its own run id. A dropped reader reattaches to that run, and explicit cancel is the only stop.
|
|
8866
|
+
* Omit `sessionId` and the executor mints one. There is no argv field: materializing a profile
|
|
8867
|
+
* isolates the harness from ambient workspace state, `extensions.<harness>` chooses which extensions
|
|
8868
|
+
* load, and `permissions` / `tools` / `mcp` map to the harness's own controls. An argv array would
|
|
8869
|
+
* let a bearer token unwind the bridge's jail and egress policy and collide with the replay,
|
|
8870
|
+
* session, and streaming flags the bridge owns.
|
|
9150
8871
|
*/
|
|
9151
8872
|
interface BridgeSeam {
|
|
9152
8873
|
bridgeUrl: string;
|
|
@@ -9812,6 +9533,8 @@ interface ProviderSeam extends ProviderExecutorOptions {
|
|
|
9812
9533
|
* environment that every co-tenant of a shared box could read.
|
|
9813
9534
|
*/
|
|
9814
9535
|
shared?: SharedBoxPlacement;
|
|
9536
|
+
/** Largest `spawn_worker` `resources` a worker may request; above it is refused (#1277). */
|
|
9537
|
+
maxWorkerResources?: ResourceRequest;
|
|
9815
9538
|
}
|
|
9816
9539
|
/**
|
|
9817
9540
|
* Router seam WITH tool use — the tool-using router backend. Same direct
|
|
@@ -10055,9 +9778,14 @@ interface SpawnResourceReader {
|
|
|
10055
9778
|
}
|
|
10056
9779
|
/**
|
|
10057
9780
|
* The environment reader: a manager running inside a provider environment whose `read()` serves
|
|
10058
|
-
* its own workspace.
|
|
10059
|
-
*
|
|
10060
|
-
*
|
|
9781
|
+
* its own workspace. Containment of relative paths is the provider's property, not this
|
|
9782
|
+
* function's: the tangle sidecar enforces it in `resolveWorkspacePath`
|
|
9783
|
+
* (apps/sidecar/src/lib/workspace.ts:98-155, agent-dev-container) — relative paths stay inside
|
|
9784
|
+
* the sandbox workspace, absolute paths only through an allowlist, `.sidecar/` refused at any
|
|
9785
|
+
* depth because that tree holds the guest's orchestrator token. If that enforcement widened,
|
|
9786
|
+
* this reader would serve files from outside the workspace; the absolute, `..`, and `.sidecar`
|
|
9787
|
+
* refusals below are belt-and-braces so it stays correct for every path shape they can name
|
|
9788
|
+
* (#1284).
|
|
10061
9789
|
*
|
|
10062
9790
|
* `read()` returns a string, so an environment cannot hand back bytes that are not UTF-8; the
|
|
10063
9791
|
* provider has already decoded. The size bound is checked on what arrives.
|
|
@@ -10614,37 +10342,29 @@ type SupervisorFinalizer = (ctx: FinalizeContext) => Promise<unknown | undefined
|
|
|
10614
10342
|
* existing caller had: the highest-scoring delivered child's output, `undefined` when nothing
|
|
10615
10343
|
* delivered (or the best delivered child carries no artifact). */
|
|
10616
10344
|
declare const bestDelivered: SupervisorFinalizer;
|
|
10617
|
-
/** What the next drive continues, as the drive harness can prove it before the turn starts. */
|
|
10618
10345
|
interface ReentryContinuity {
|
|
10619
|
-
/** `continued
|
|
10620
|
-
* `new`: a new harness session, which knows only what its task says. */
|
|
10346
|
+
/** `continued` reuses the harness session. `new` knows only this task. */
|
|
10621
10347
|
readonly session: 'continued' | 'new';
|
|
10622
|
-
/**
|
|
10623
|
-
* previous environment the provider no longer holds. */
|
|
10348
|
+
/** `replaced` names an environment the provider no longer holds. */
|
|
10624
10349
|
readonly environment: 'same' | 'replaced' | 'unknown';
|
|
10625
10350
|
readonly environmentId?: string;
|
|
10626
10351
|
readonly previousEnvironmentId?: string;
|
|
10627
|
-
/**
|
|
10628
|
-
* the checkpoint taken at `checkpointAt`; anything written after it is gone. */
|
|
10352
|
+
/** `restored` is the checkpoint at `checkpointAt`. Later writes are gone. */
|
|
10629
10353
|
readonly workspace: 'kept' | 'restored' | 'lost' | 'unknown';
|
|
10630
10354
|
readonly checkpointAt?: string;
|
|
10631
10355
|
}
|
|
10632
|
-
/**
|
|
10356
|
+
/** What a re-entry may assume when nothing proved its session, environment or workspace. */
|
|
10633
10357
|
declare const UNPROVEN_CONTINUITY: ReentryContinuity;
|
|
10634
10358
|
interface ReentryTaskInput {
|
|
10635
|
-
/** The run's original task, exactly as the first drive received it. */
|
|
10636
10359
|
readonly originalTask: unknown;
|
|
10637
|
-
/** What the completion check requires, when the caller described it. */
|
|
10638
10360
|
readonly contract?: string;
|
|
10639
|
-
/** Coordination tools served to this manager. Absent means none are proven available. */
|
|
10640
10361
|
readonly tools?: ReadonlyArray<string>;
|
|
10641
10362
|
readonly reentry: DriverReentry;
|
|
10642
10363
|
readonly continuity: ReentryContinuity;
|
|
10643
10364
|
readonly state: ManagerReentryState;
|
|
10644
|
-
/** 1-based driver attempt this task starts. */
|
|
10645
10365
|
readonly attempt: number;
|
|
10646
10366
|
}
|
|
10647
|
-
/**
|
|
10367
|
+
/** The task a re-entered driver receives: what changed, why it re-entered, and its objective. */
|
|
10648
10368
|
declare function composeReentryTask(input: ReentryTaskInput): string;
|
|
10649
10369
|
/** The read-model a `StopRule` decides from — the run's progress, not its budget. */
|
|
10650
10370
|
interface ProgressView {
|
|
@@ -11382,134 +11102,562 @@ declare function subscriptionUsageLimitSignal(failure: {
|
|
|
11382
11102
|
readonly error: string;
|
|
11383
11103
|
readonly errorCode?: string;
|
|
11384
11104
|
}): 'subscription-usage-limit' | undefined;
|
|
11385
|
-
/**
|
|
11386
|
-
|
|
11387
|
-
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11105
|
+
/** Record-owned policy data; callbacks, panel execution and a host-computed best stay outside. */
|
|
11106
|
+
type PortableContinuationPolicy = Omit<ContinuationPolicy, 'append' | 'runPanel' | 'panel' | 'panelUsd' | 'best'> & {
|
|
11107
|
+
readonly panel: 'off';
|
|
11108
|
+
};
|
|
11109
|
+
/** The canonical policy admission, restricted to portable JSON rather than host callbacks. */
|
|
11110
|
+
declare const portableContinuationPolicySchema: z.ZodPipe<z.ZodUnknown, z.ZodTransform<PortableContinuationPolicy, unknown>>;
|
|
11111
|
+
/** A flow node's usable settle matched no routes edge leaving it (`unrouted`), or a fired edge named
|
|
11112
|
+
* a node that still had a running worker (`target-live`). The flow spawned nothing more; the full
|
|
11113
|
+
* evidence rides on the error, shaped like `GraphEdgeCapError`. */
|
|
11114
|
+
declare class GraphRouteError extends Error {
|
|
11115
|
+
readonly reason: 'unrouted' | 'target-live';
|
|
11116
|
+
readonly node: NodeId;
|
|
11117
|
+
readonly workerId: string;
|
|
11118
|
+
readonly ledger: ReadonlyArray<EdgeTraversal>;
|
|
11119
|
+
readonly result: SupervisedResult<unknown>;
|
|
11120
|
+
constructor(unrouted: {
|
|
11121
|
+
readonly reason: 'unrouted' | 'target-live';
|
|
11122
|
+
readonly node: NodeId;
|
|
11123
|
+
readonly workerId: string;
|
|
11124
|
+
readonly detail: string;
|
|
11125
|
+
}, ledger: ReadonlyArray<EdgeTraversal>, result: SupervisedResult<unknown>);
|
|
11394
11126
|
}
|
|
11395
|
-
/**
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
*
|
|
11399
|
-
*
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
|
|
11408
|
-
|
|
11409
|
-
*
|
|
11410
|
-
*
|
|
11127
|
+
/** Default per-edge traversal cap — the cyclic-graph backstop when an edge names none. */
|
|
11128
|
+
declare const defaultEdgeTraversalCap = 32;
|
|
11129
|
+
/** A graph node: an id and a canonical `AgentProfile`. The profile is the ONLY way a node is
|
|
11130
|
+
* described — its `prompt.systemPrompt` is the standing role (the 0.117 canonical resolution;
|
|
11131
|
+
* never a legacy top-level-only reduction), its tools/mcp/resources are its capabilities. */
|
|
11132
|
+
interface GraphNode {
|
|
11133
|
+
readonly id: NodeId;
|
|
11134
|
+
readonly profile: AgentProfile;
|
|
11135
|
+
/** A check node: Runtime runs this command instead of an agent (flow graphs only). Its profile is
|
|
11136
|
+
* `{ name: id }`; `graphFromStored` writes both. */
|
|
11137
|
+
readonly check?: GraphCheckNode;
|
|
11138
|
+
}
|
|
11139
|
+
type GraphEdge =
|
|
11140
|
+
/** Work flows down. The delegation directive is DATA → versionable, sweepable, optimizable.
|
|
11141
|
+
* Each spawn of `to` by `from` — and each mid-run steer from `from` to a live `to` worker —
|
|
11142
|
+
* is one traversal. */
|
|
11143
|
+
{
|
|
11144
|
+
readonly kind: 'delegates';
|
|
11145
|
+
readonly from: NodeId;
|
|
11146
|
+
readonly to: NodeId;
|
|
11147
|
+
readonly directive: PromptHandle;
|
|
11148
|
+
/** Cyclic-graph backstop: traversals beyond this REFUSE (fail loud). Default
|
|
11149
|
+
* {@link defaultEdgeTraversalCap}. */
|
|
11150
|
+
readonly maxTraversals?: number;
|
|
11151
|
+
/** Default continuity for this edge's SPAWN traversals. `'resume'` makes every spawn after
|
|
11152
|
+
* the node's first re-attach to its most recent SETTLED worker: a NEW live worker whose
|
|
11153
|
+
* spawn context carries `resume: { ofWorker, sequence }` for the executor seam, spending
|
|
11154
|
+
* from the same conserved pool — the node's first spawn is effectively `'fresh'`, and a
|
|
11155
|
+
* spawn while a prior worker is still live refuses loudly (steer is the live channel).
|
|
11156
|
+
* The driver's per-call `spawn_worker` `continuity` argument overrides either way. Omit =
|
|
11157
|
+
* `'fresh'` (today's behavior, byte-identical). Caps count resumes exactly like fresh
|
|
11158
|
+
* spawns. */
|
|
11159
|
+
readonly continuity?: ContinuityMode;
|
|
11160
|
+
} |
|
|
11161
|
+
/** Findings flow anywhere: an analyst over N nodes' settled traces, delivered to ONE node.
|
|
11162
|
+
* With a LENS analyst the directive wraps the findings for the recipient; with a NODE analyst
|
|
11163
|
+
* the directive is the analyst agent's task and the findings are its settle output. */
|
|
11164
|
+
{
|
|
11165
|
+
readonly kind: 'analyzes';
|
|
11166
|
+
/** The analyst REFERENCE, in one of two forms: a lens id resolved against
|
|
11167
|
+
* `RunGraphOptions.analysts` (environment), or the id of a graph NODE with no delegates
|
|
11168
|
+
* edge pointing at it — then each matching settle spawns that node's pinned profile as a
|
|
11169
|
+
* tool-equipped analyst WORKER (same spawn machinery, conserved budget, trace join) whose
|
|
11170
|
+
* task is this edge's directive plus the settled worker's trace evidence and whose settle
|
|
11171
|
+
* output is the findings. An id that is both a node and a registry lens is refused. */
|
|
11172
|
+
readonly analyst: string;
|
|
11173
|
+
readonly over: ReadonlyArray<NodeId>;
|
|
11174
|
+
readonly to: NodeId;
|
|
11175
|
+
readonly directive: PromptHandle;
|
|
11176
|
+
/** Observability cap: traversals beyond this are LEDGERED as exhausted (`unpropagated`).
|
|
11177
|
+
* Only delegates caps refuse traversal — they are what close the spawn cycle. */
|
|
11178
|
+
readonly maxTraversals?: number;
|
|
11179
|
+
} |
|
|
11180
|
+
/**
|
|
11181
|
+
* Fan-out over a list that exists only at run time, then one join. When `from` settles `done`,
|
|
11182
|
+
* the array at `pointer` in its result is expanded: each element becomes the TASK of one item
|
|
11183
|
+
* run, at most `concurrency` at a time, and once every item settled the `join` node runs with
|
|
11184
|
+
* `{ map, source, items, results: [{ index, item, result }], failures: [{ index, item, outcome,
|
|
11185
|
+
* reason }] }`, results in item order. The runtime spawns the items and the join (`from`'s
|
|
11186
|
+
* driver spends no turn on them) through the same authorized spawn path a delegates spawn
|
|
11187
|
+
* takes: each item reserves its budget from the one conserved pool and is pinned to the edge's
|
|
11188
|
+
* profile, so an item's content can never choose what runs.
|
|
11189
|
+
*
|
|
11190
|
+
* An item is either the node `to` (its pinned profile plus this edge's directive) or the nested
|
|
11191
|
+
* `graph`, started per item exactly as `run_graph` starts a graph. Refusals are loud and
|
|
11192
|
+
* ledgered, and the driver is woken with them: a pointer that does not resolve to an array, more
|
|
11193
|
+
* elements than `maxItems`, or a `concurrency` the run's worker-slot bound can never honor.
|
|
11194
|
+
* `concurrency` otherwise THROTTLES (items wait for a free place); it never refuses an item.
|
|
11195
|
+
*
|
|
11196
|
+
* An edge rather than a node-level spec, because every kernel invariant a map must keep already
|
|
11197
|
+
* attaches to edge traversal: pinning admits only the edge's item and join nodes (the spawn
|
|
11198
|
+
* context carries a runtime-authored `map` marker), each item is admitted like a spawn and
|
|
11199
|
+
* reserves from the conserved pool, each item settles under its own deliverable check, and each
|
|
11200
|
+
* expansion, item and join is a ledger row with its journal twin. Topology stays static; only the
|
|
11201
|
+
* traversal count is dynamic, so validation and the one-node-one-profile rule are unchanged.
|
|
11411
11202
|
*/
|
|
11412
|
-
|
|
11413
|
-
readonly
|
|
11414
|
-
|
|
11415
|
-
|
|
11416
|
-
readonly
|
|
11417
|
-
|
|
11203
|
+
{
|
|
11204
|
+
readonly kind: 'maps';
|
|
11205
|
+
/** The source node: a delegates target, or the join of another maps edge. Each of its `done`
|
|
11206
|
+
* settles expands the map once. */
|
|
11207
|
+
readonly from: NodeId;
|
|
11208
|
+
/** RFC 6901 JSON pointer into `from`'s settled result (`''` is the whole result). */
|
|
11209
|
+
readonly pointer: string;
|
|
11210
|
+
/** The item node, run once per element with the element as its task. Exactly one of `to`
|
|
11211
|
+
* and `graph`. Reachable only through this edge: never a delegates target. */
|
|
11212
|
+
readonly to?: NodeId;
|
|
11213
|
+
/** A graph run per element as one subtask, through the `run_graph` path. */
|
|
11214
|
+
readonly graph?: GraphTopology;
|
|
11215
|
+
/** Receives the ordered results once every item settled. Reachable only through this edge. */
|
|
11216
|
+
readonly join: NodeId;
|
|
11217
|
+
/** The item directive, appended to the item node's instructions per traversal. */
|
|
11218
|
+
readonly directive: PromptHandle;
|
|
11219
|
+
/** Lists longer than this are refused before any item runs. */
|
|
11220
|
+
readonly maxItems: number;
|
|
11221
|
+
/** How many items run at once. */
|
|
11222
|
+
readonly concurrency: number;
|
|
11223
|
+
readonly onItemFailure: MapItemFailurePolicy;
|
|
11224
|
+
/** Each item's budget, merged over the per-worker default as `spawn_worker`'s `budget` is. */
|
|
11225
|
+
readonly itemBudget?: Partial<Budget>;
|
|
11226
|
+
} |
|
|
11227
|
+
/**
|
|
11228
|
+
* A route in a flow graph (one with `entry`): Runtime traverses it when `from` settles, so no
|
|
11229
|
+
* root decides the order, the branch, the repair loop or the stop. On each usable settle of
|
|
11230
|
+
* `from` its outgoing routes edges are tried in declaration order and the first whose `when`
|
|
11231
|
+
* holds fires; an edge without `when` is the default branch and comes last. A node target is
|
|
11232
|
+
* spawned with `{ from: { node, result }, evidence: { [id]: latest usable result } }` (a join's
|
|
11233
|
+
* target with `{ from: { nodes }, evidence }`, see below) and the directive appended to its pinned instructions; `{ stop }` ends the run with no winner and
|
|
11234
|
+
* `GraphResult.stopped`; `{ finish }` makes this settle part of the run's output.
|
|
11235
|
+
*
|
|
11236
|
+
* A fork lists two or more nodes in `to`: one traversal spawns each of them at once, each under
|
|
11237
|
+
* its own key `route:<edge id>#<traversal>:<node>`. A join lists two or more nodes in `from`: it
|
|
11238
|
+
* fires once every member has settled usably since it last fired, and the target's task is
|
|
11239
|
+
* `{ from: { nodes: <members in declared order> }, evidence }` with each member's latest result
|
|
11240
|
+
* in `evidence`, so it does not depend on which member settled last and a resumed run derives the
|
|
11241
|
+
* same task. A routes edge that spawns a node with a settled worker in this flow (a back edge)
|
|
11242
|
+
* names that node's latest settled worker as the spawn's `successorOf`. A join carries no `when`, and it is the only routes edge
|
|
11243
|
+
* leaving each of its members. A route into a node that still has a running worker throws
|
|
11244
|
+
* {@link GraphRouteError} with reason `target-live`: converging branches use a join.
|
|
11245
|
+
*/
|
|
11246
|
+
{
|
|
11247
|
+
readonly kind: 'routes';
|
|
11248
|
+
readonly from: NodeId | ReadonlyArray<NodeId>;
|
|
11249
|
+
readonly to: NodeId | ReadonlyArray<NodeId> | {
|
|
11250
|
+
readonly stop: string;
|
|
11251
|
+
} | {
|
|
11252
|
+
readonly finish: string;
|
|
11418
11253
|
};
|
|
11254
|
+
readonly directive: PromptHandle;
|
|
11255
|
+
/** Absent on the default edge and on every join. A match reads `from` unless it names a node
|
|
11256
|
+
* in `evidence`. */
|
|
11257
|
+
readonly when?: RouteWhen;
|
|
11258
|
+
/** Nodes whose latest usable result rides the target's task. */
|
|
11259
|
+
readonly evidence?: ReadonlyArray<NodeId>;
|
|
11260
|
+
/** Traversals beyond this are skipped (ledgered `unpropagated`) and matching continues with
|
|
11261
|
+
* the next edge. Default {@link defaultEdgeTraversalCap}. Every routes cycle, each subcycle
|
|
11262
|
+
* included, must cross an edge that sets it. */
|
|
11263
|
+
readonly maxTraversals?: number;
|
|
11264
|
+
/** `'resume'` re-attaches each spawn of the target to its latest settled session. Omit =
|
|
11265
|
+
* `'fresh'`. */
|
|
11266
|
+
readonly continuity?: ContinuityMode;
|
|
11267
|
+
};
|
|
11268
|
+
/** A topology without the run's own budget and deliverable: the form a `maps` edge runs per item,
|
|
11269
|
+
* as `run_graph` runs it. With `entry` it is a flow graph. Inside a maps item, the item value is
|
|
11270
|
+
* the task of every entry whose task is the placeholder `{ item: true }`; a down settle inside the item ends
|
|
11271
|
+
* that item only, and the maps edge's `onItemFailure` decides the join. */
|
|
11272
|
+
interface GraphTopology {
|
|
11273
|
+
readonly nodes: ReadonlyArray<GraphNode>;
|
|
11274
|
+
readonly edges: ReadonlyArray<GraphEdge>;
|
|
11275
|
+
readonly entry?: AgentGraph['entry'];
|
|
11276
|
+
/** Refused here: a maps item's graph and a `run_graph` subtask have no `decideGate`. */
|
|
11277
|
+
readonly gates?: AgentGraph['gates'];
|
|
11419
11278
|
}
|
|
11420
|
-
interface
|
|
11421
|
-
/**
|
|
11422
|
-
readonly
|
|
11423
|
-
|
|
11424
|
-
readonly
|
|
11425
|
-
/**
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
readonly signal?: AbortSignal;
|
|
11431
|
-
/** Trusted candidate and pursuit attribution for the root. The runtime derives profile/task
|
|
11432
|
-
* digests itself from the exact detached values it executes. */
|
|
11433
|
-
readonly execution?: AgentExecutionRef;
|
|
11434
|
-
/** WHERE workers run — derives the worker seam. Provide this OR an explicit `makeWorkerAgent`. */
|
|
11435
|
-
readonly backend?: ExecutorConfig;
|
|
11436
|
-
/** Resolve an authored subscription stage to one eligible seat and a backend pinned to its
|
|
11437
|
-
* credential reference. The callback may report stage exhaustion with `resumeAt`; Runtime
|
|
11438
|
-
* advances the authored chain and never writes credentials into its record. */
|
|
11439
|
-
readonly selectSeat?: SelectSeat;
|
|
11440
|
-
/** The independent completion check for backend-derived workers and direct supervisor
|
|
11441
|
-
* submissions. Strongly recommended: without it the supervisor cannot submit its own work and
|
|
11442
|
-
* backend-derived workers fall back to their own validity signal. A `string` names an entry in
|
|
11443
|
-
* `registry.deliverables`. */
|
|
11444
|
-
readonly deliverable?: DeliverableSpec<unknown> | string;
|
|
11445
|
-
/** Resolve the completion check for one exact authorized backend-derived child. The callback runs
|
|
11446
|
-
* after spawn authorization and receives a detached immutable context. It may return `undefined`
|
|
11447
|
-
* to use the run-wide `deliverable`, or `null` to omit this child's assignment check and continuation.
|
|
11448
|
-
* Null does not turn completion into acceptance or erase existing backend/descendant verdicts.
|
|
11449
|
-
* An unchecked child must declare compatible tools: disable inherited spawn rights and author its
|
|
11450
|
-
* coordination grants without `submit_result` or `read_continuation`. Explicit incompatible
|
|
11451
|
-
* grants remain refused; the authorized profile is never rewritten after this callback. */
|
|
11452
|
-
readonly resolveDeliverable?: (input: DeliverableResolutionInput) => DeliverableSpec<unknown> | null | undefined;
|
|
11453
|
-
/** Name→value tables for the four code-valued options, so a recorded run configuration can name
|
|
11454
|
-
* them instead of carrying closures. See {@link SuperviseRegistry}. */
|
|
11455
|
-
readonly registry?: SuperviseRegistry;
|
|
11456
|
-
/** Where the coordination MCP binds when the supervisor is harness-driven. Omit = an ephemeral
|
|
11457
|
-
* port on `127.0.0.1`, which an off-host root cannot reach. A non-loopback host is refused
|
|
11458
|
-
* unless authentication is configured; provider managers also need a reachable public URL. */
|
|
11459
|
-
readonly coordination?: CoordinationBinding;
|
|
11460
|
-
/** OPT-IN peer mail for the run's workers: sibling-to-sibling `send_mail` / `read_mail`, bounded
|
|
11461
|
-
* and audited (`CoordinationToolsOptions.peerMail`). The runtime mints one capability URL per
|
|
11462
|
-
* spawn, serves the mail listener beside the coordination MCP, and hands each worker its
|
|
11463
|
-
* endpoint on {@link runtime.WorkerSpawnContext.peerMailUrl}.
|
|
11464
|
-
*
|
|
11465
|
-
* On the backend-derived worker path the runtime also MOUNTS that endpoint, the way a driver
|
|
11466
|
-
* receives its coordination MCP: out of band on the bridge's `runtime_attachments`, so the
|
|
11467
|
-
* authored profile digest never moves, and inside the leaf factory, so `authorizeSpawn` has
|
|
11468
|
-
* already decided the profile. A `bridge` worker therefore calls `send_mail` / `read_mail` as
|
|
11469
|
-
* native tools. `provider` workers mount it through their runtime MCP attachment capability. `router` and `router-tools` workers run no MCP client, so the URL
|
|
11470
|
-
* stays the caller's to use; every other backend refuses the spawn rather than mint a
|
|
11471
|
-
* capability it can never reach. A caller-owned `makeWorkerAgent` owns its own mount.
|
|
11472
|
-
*
|
|
11473
|
-
* Requires a harness-brained supervisor; a router-brained supervisor is refused rather than
|
|
11474
|
-
* silently unmailed. */
|
|
11475
|
-
readonly peerMail?: boolean | {
|
|
11476
|
-
limits?: Partial<PeerMailLimits>;
|
|
11279
|
+
interface AgentGraph {
|
|
11280
|
+
/** Preserve fully bound literal data when serializing a hydrated graph. */
|
|
11281
|
+
readonly triggerBindings?: readonly [];
|
|
11282
|
+
readonly nodes: ReadonlyArray<GraphNode>;
|
|
11283
|
+
readonly edges: ReadonlyArray<GraphEdge>;
|
|
11284
|
+
/** Termination is mandatory, not optional: the independent completion oracle. */
|
|
11285
|
+
readonly deliverable: DeliverableSpec<unknown> & {
|
|
11286
|
+
readonly checkRef?: string;
|
|
11287
|
+
readonly command?: GraphCommandCheck;
|
|
11288
|
+
readonly when?: RouteWhen;
|
|
11477
11289
|
};
|
|
11478
|
-
/**
|
|
11479
|
-
readonly
|
|
11480
|
-
/**
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
*
|
|
11484
|
-
*
|
|
11485
|
-
*
|
|
11486
|
-
readonly
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
*
|
|
11492
|
-
*
|
|
11493
|
-
*
|
|
11494
|
-
readonly
|
|
11495
|
-
/**
|
|
11496
|
-
*
|
|
11497
|
-
*
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
|
|
11290
|
+
/** One conserved pool across the whole graph — cycles without conservation never terminate. */
|
|
11291
|
+
readonly budget: Budget;
|
|
11292
|
+
/** Setting it makes this a FLOW graph: Runtime spawns every entry at once, each with its task,
|
|
11293
|
+
* and traverses `routes` edges itself. No node is a root and no caller brain runs; the run's
|
|
11294
|
+
* output is `{ [node]: latest usable result }` over its terminal nodes and `finish` sources,
|
|
11295
|
+
* judged by `deliverable`. A stored route check (`checkRef: 'route'`) may also name a
|
|
11296
|
+
* non-terminal node: its condition reads that node's latest delivered output, while the output
|
|
11297
|
+
* stays terminal-only. */
|
|
11298
|
+
readonly entry?: ReadonlyArray<{
|
|
11299
|
+
readonly node: NodeId;
|
|
11300
|
+
readonly task: unknown;
|
|
11301
|
+
}>;
|
|
11302
|
+
/** Flow-graph vertices that are not agents: a routes edge into one awaits
|
|
11303
|
+
* `RunGraphOptions.decideGate`, and one edge per choice leaves it, matching
|
|
11304
|
+
* `{ pointer: '/choice', equals: <choice> }`. A `finish` leaving a gate outputs
|
|
11305
|
+
* `{ [gate]: { choice, by } }`. */
|
|
11306
|
+
readonly gates?: ReadonlyArray<RouteGate>;
|
|
11307
|
+
/** Where nodes run: `cwd` (default) is the run's working directory; `fresh` is a new empty
|
|
11308
|
+
* directory the run owns, which the host creates and passes as that working directory
|
|
11309
|
+
* (`graphWorkspace`). */
|
|
11310
|
+
readonly workspace?: 'cwd' | 'fresh';
|
|
11311
|
+
/** The authored root's continuation; a flow has no root manager. */
|
|
11312
|
+
readonly continuation?: PortableContinuationPolicy;
|
|
11313
|
+
}
|
|
11314
|
+
/** `failed` is a maps item or join that ran and settled without a usable result (down, or
|
|
11315
|
+
* rejected by its deliverable check); a traversal that never reached a worker is `unpropagated`. */
|
|
11316
|
+
type EdgeDeliveryOutcome = 'delivered' | 'stripped' | 'empty' | 'unpropagated' | 'failed';
|
|
11317
|
+
/** How one ledgered hop CONTINUED: a spawn traversal stamps its effective spawn mode
|
|
11318
|
+
* (`'fresh'` | `'resume'`), and every mid-run delivery into an already-live recipient — a
|
|
11319
|
+
* driver steer leg and every analyzes delivery (routed steer or driver-destined finding) —
|
|
11320
|
+
* stamps `'steer'`. Zero ambiguity: every row carries exactly one of the three. */
|
|
11321
|
+
type TraversalContinuity = ContinuityMode | 'steer';
|
|
11322
|
+
/** One recorded edge traversal — the in-memory row; the journal twin is the `edge` SpawnEvent. */
|
|
11323
|
+
interface EdgeTraversal {
|
|
11324
|
+
/** Stable edge id: `delegates:<from>-><to>`, `analyzes:<analyst>:<over…>-><to>`,
|
|
11325
|
+
* `maps:<from>-><to | graph>-><join>`, `routes:<from>#<ordinal>-><to | stop:<reason> |
|
|
11326
|
+
* finish:<reason>>`, or `routes:entry-><node>` for an entry. */
|
|
11327
|
+
readonly edge: string;
|
|
11328
|
+
readonly kind: 'delegates' | 'analyzes' | 'maps' | 'routes';
|
|
11329
|
+
readonly from: string;
|
|
11330
|
+
readonly to: string;
|
|
11331
|
+
/** The resolved directive reference (`<surface>/v<n>`). */
|
|
11332
|
+
readonly directive: string;
|
|
11333
|
+
/** 1-based per-edge ordinal. */
|
|
11334
|
+
readonly traversal: number;
|
|
11335
|
+
readonly outcome: EdgeDeliveryOutcome;
|
|
11336
|
+
/** How this hop continued — see {@link TraversalContinuity}. */
|
|
11337
|
+
readonly continuity: TraversalContinuity;
|
|
11338
|
+
/** Bytes of directive + payload that actually crossed the edge. */
|
|
11339
|
+
readonly bytes: number;
|
|
11340
|
+
readonly reason?: string;
|
|
11341
|
+
/** The concrete worker node id, once known. A maps expansion names the source worker. */
|
|
11342
|
+
readonly workerId?: string;
|
|
11343
|
+
/** Present on maps rows: the expansion of the source's list, one item by its index, or the
|
|
11344
|
+
* join. */
|
|
11345
|
+
readonly map?: {
|
|
11346
|
+
readonly phase: 'expand' | 'item' | 'join';
|
|
11347
|
+
readonly index?: number;
|
|
11348
|
+
};
|
|
11349
|
+
/** Present on a gate's decision row (`gate:<id>`, `traversal` = visit): who decided, and what. */
|
|
11350
|
+
readonly gate?: GateDecisionRecord;
|
|
11351
|
+
}
|
|
11352
|
+
/** A delegates edge exhausted its traversal cap and the run produced no winner: the cap, not the
|
|
11353
|
+
* task, ended it. Carries the full evidence so failing loud loses nothing. */
|
|
11354
|
+
declare class GraphEdgeCapError extends Error {
|
|
11355
|
+
readonly exhaustedEdges: ReadonlyArray<string>;
|
|
11356
|
+
readonly ledger: ReadonlyArray<EdgeTraversal>;
|
|
11357
|
+
readonly result: SupervisedResult<unknown>;
|
|
11358
|
+
constructor(exhaustedEdges: ReadonlyArray<string>, ledger: ReadonlyArray<EdgeTraversal>, result: SupervisedResult<unknown>);
|
|
11359
|
+
}
|
|
11360
|
+
/**
|
|
11361
|
+
* Forwarded to the root `supervise()` VERBATIM. Everything not owned, transformed, or refused
|
|
11362
|
+
* above belongs here — the default is "a graph honors it", not "someone remembered to add it".
|
|
11363
|
+
*/
|
|
11364
|
+
declare const GRAPH_FORWARDED_SUPERVISE_OPTIONS: readonly ["parking", "backend", "profileGuidance", "escalateQuestion", "rootHandle", "signal", "execution", "resolveDeliverable", "coordination", "peerMail", "peerAudit", "traceTools", "driverBackend", "profileSecurity", "authorizeSpawn", "router", "driveHarness", "selectSeat", "driverRetry", "onDriverAttempt", "continuation", "childSettleGraceMs", "teardownConfirmMs", "retainedAtSettlement", "resolveDriveHarness", "driveHarnessMaterialization", "resolveSupervisorTools", "extraTools", "executeExtraTool", "recoverExecutor", "perWorker", "reservationPolicy", "deadlineCheckIn", "budgetStopHoldMs", "workerSlots", "watchWorkers", "stallAfterMs", "wake", "runDir", "resume", "segment", "runContext", "steerDir", "stopRule", "onProgressStop", "maxDepth", "maxTurns", "compaction", "now", "allowedModels", "finalizer", "otel", "graphRegistry"];
|
|
11365
|
+
/** `backend` and `driverBackend` keep graph-specific documentation below.
|
|
11366
|
+
*
|
|
11367
|
+
* Do not inherit and redeclare them through an indexed access type.
|
|
11368
|
+
* TypeScript 7 correctly treats `SuperviseOptions['backend']` as including `undefined`, which makes
|
|
11369
|
+
* that redeclaration wider than the exact optional property inherited from `SuperviseOptions`.
|
|
11370
|
+
*/
|
|
11371
|
+
type GraphInheritedSuperviseOption = Exclude<(typeof GRAPH_FORWARDED_SUPERVISE_OPTIONS)[number], 'backend' | 'driverBackend'>;
|
|
11372
|
+
/**
|
|
11373
|
+
* Options for one `runGraph` run.
|
|
11374
|
+
*
|
|
11375
|
+
* Extends every forwarded `SuperviseOptions` key, so a graph honors what a `supervise()` run
|
|
11376
|
+
* honors WITHOUT anyone restating it here. Only the graph-specific members and the ones whose
|
|
11377
|
+
* graph semantics differ are declared below; everything else inherits its type AND its
|
|
11378
|
+
* documentation from `SuperviseOptions`, which is the one owner of both.
|
|
11379
|
+
*/
|
|
11380
|
+
interface RunGraphOptions extends Pick<SuperviseOptions, GraphInheritedSuperviseOption> {
|
|
11381
|
+
/** WHERE worker nodes run — the executor backend. Provide this OR `makeLeafAgent`. Forwarded to
|
|
11382
|
+
* `supervise()`, which derives every authorized leaf from it. A node that declares
|
|
11383
|
+
* `agent_runtime_coordination_spawn_worker` becomes a nested supervisor instead, whose own
|
|
11384
|
+
* leaves are derived the same way. */
|
|
11385
|
+
readonly backend?: Exclude<SuperviseOptions['backend'], undefined>;
|
|
11386
|
+
/** WHERE the ROOT node's harness brain runs — forwarded to `supervise()` verbatim (see
|
|
11387
|
+
* `SuperviseOptions.driverBackend`). Needed when the root node's profile declares an external
|
|
11388
|
+
* harness (`codex`, `claude-code`, `opencode`): that root is driven by the harness, not by the
|
|
11389
|
+
* router brain, and automatic execution supports a local `bridge`. Unlike `supervise()`, this
|
|
11390
|
+
* does NOT default to `backend`: a graph's `backend` places WORKER nodes, so the root driver
|
|
11391
|
+
* is selected only by this field. Omit = no harness driver, which is correct for a root whose
|
|
11392
|
+
* `profile.harness` is omitted or `cli-base` (that root runs on the router brain). */
|
|
11393
|
+
readonly driverBackend?: Exclude<SuperviseOptions['driverBackend'], undefined>;
|
|
11394
|
+
/** Leaf-execution override (offline tests / advanced). `runGraph` still owns node pinning,
|
|
11395
|
+
* directive delivery, and the edge ledger AROUND this seam — only the leaf `act` is yours.
|
|
11396
|
+
* Slots INSIDE the kernel's authorized path (`SuperviseOptions.makeLeafAgent`), so a node that
|
|
11397
|
+
* declares the spawn tool still becomes a nested supervisor even under an offline leaf. */
|
|
11398
|
+
readonly makeLeafAgent?: MakeWorkerAgent;
|
|
11399
|
+
/** The ROOT driver's inference seam — a caller-owned `ToolLoopChat` that makes every root
|
|
11400
|
+
* model call. Use it when the root's decisions must be caller-owned orchestration (a
|
|
11401
|
+
* deterministic conversation driver, a persona loop with its own LLM calls) rather than a
|
|
11402
|
+
* router-derived model call. The graph machinery around the seam is unchanged: node pinning,
|
|
11403
|
+
* directive delivery, the edge ledger, and the journal twin all run the same shipped path,
|
|
11404
|
+
* and the root profile keeps prompt control (`prompt-control-execution` materialization —
|
|
11405
|
+
* `systemPrompt`/`instructions` still apply). What moves to the caller with the brain:
|
|
11406
|
+
* model selection and provider-identity validation (`expectedModel` cannot be enforced on a
|
|
11407
|
+
* call the runtime did not place) and per-turn usage reporting (a brain that reports no
|
|
11408
|
+
* usage meters nothing into the pool). Omit = the router brain derived from the root
|
|
11409
|
+
* profile — the unchanged default. Mutually exclusive with `driverBackend`, and refused
|
|
11410
|
+
* when the root profile declares an external harness (that root is driven BY the harness). */
|
|
11411
|
+
readonly brain?: ToolLoopChat;
|
|
11412
|
+
/** Caller-side runtime hooks (telemetry, policy, product extensions). Composed AFTER the
|
|
11413
|
+
* graph's own spawn-binding hook on the SAME event stream — the graph never swallows the
|
|
11414
|
+
* seam supervise() exposes. */
|
|
11415
|
+
readonly hooks?: RuntimeHooks;
|
|
11416
|
+
/** The analyst lens registry `analyzes` edges resolve against. ENVIRONMENT — needed only for
|
|
11417
|
+
* lens analysts; an analyzes edge naming a graph NODE as its analyst needs no registry. */
|
|
11418
|
+
readonly analysts?: AnalystRegistry$1;
|
|
11419
|
+
/** Answers a flow gate while the process holds the run; the wait counts against its deadline.
|
|
11420
|
+
* ENVIRONMENT, like `analysts`; required when the graph declares gates. */
|
|
11421
|
+
readonly decideGate?: (request: GateRequest) => Promise<GateDecision>;
|
|
11422
|
+
/** Directive registry. Default: the seeded kernel registry (`kernelPromptRegistry()`).
|
|
11423
|
+
*
|
|
11424
|
+
* NOT `SuperviseOptions.registry`, which is the `SuperviseRegistry` name→value table for
|
|
11425
|
+
* code-valued options. The two share a name and nothing else, and this one wins here — see
|
|
11426
|
+
* `GRAPH_REFUSED_SUPERVISE_OPTIONS`. */
|
|
11427
|
+
readonly registry?: PromptRegistry;
|
|
11428
|
+
/** The run journal the edge ledger and every spawn/settle ride. Default: in-memory. */
|
|
11429
|
+
readonly journal?: SpawnJournal;
|
|
11430
|
+
readonly blobs?: ResultBlobStore;
|
|
11431
|
+
readonly runId?: string;
|
|
11432
|
+
/** Product authority over every steer/answer instruction (the filter seam). `runGraph` observes
|
|
11433
|
+
* what it CHANGES: a narrowed instruction ledgers its steer traversal as `stripped`. */
|
|
11434
|
+
readonly authorizeMessage?: SuperviseOptions['authorizeMessage'];
|
|
11435
|
+
/** Where check nodes run: a fresh Sandbox box per check, created by `client` on the check account,
|
|
11436
|
+
* from each node's `environment`. Absent = locally, in the run's working directory (a loopback
|
|
11437
|
+
* Bridge `cwd` or a `cli-in-place` workspace). */
|
|
11438
|
+
readonly checkPlacement?: GraphCheckPlacement;
|
|
11439
|
+
}
|
|
11440
|
+
interface GraphResult<Out = unknown> {
|
|
11441
|
+
readonly result: SupervisedResult<Out>;
|
|
11442
|
+
/** Every edge traversal, in occurrence order — the observable-edge contract. */
|
|
11443
|
+
readonly ledger: ReadonlyArray<EdgeTraversal>;
|
|
11444
|
+
/** Edge ids whose traversal cap was hit — analyzes exhaustion included (observable here, never
|
|
11445
|
+
* a refusal). A DELEGATES cap paired with a `no-winner` result THROWS
|
|
11446
|
+
* ({@link GraphEdgeCapError}) instead of returning: only delegates caps refuse spawns, so only
|
|
11447
|
+
* they can have ended the run. A LIFECYCLE no-winner (`aborted` / `budget-exhausted`) returns
|
|
11448
|
+
* normally even with an exhausted delegates cap — the abort or the pool, not the cap, ended
|
|
11449
|
+
* that run, and the exhaustion stays observable here. */
|
|
11450
|
+
readonly exhaustedEdges: ReadonlyArray<string>;
|
|
11451
|
+
readonly runId: string;
|
|
11452
|
+
/** Why a flow graph ended early: a `stop` edge fired (`edge` names it), or a flow node settled
|
|
11453
|
+
* down (no `edge`; `reason` is `down: <worker reason>`) or, where a route was needed, without a
|
|
11454
|
+
* usable result (no `edge`; `reason` is `unusable: <why>`). Live flow workers are aborted. */
|
|
11455
|
+
readonly stopped?: {
|
|
11456
|
+
readonly code?: string;
|
|
11457
|
+
readonly edge?: string;
|
|
11458
|
+
readonly at: NodeId;
|
|
11459
|
+
readonly workerId: string;
|
|
11460
|
+
readonly reason: string;
|
|
11461
|
+
};
|
|
11462
|
+
}
|
|
11463
|
+
/** `RunGraphOptions` with the brain REQUIRED — the shape the `/testing` entry's
|
|
11464
|
+
* `runGraphWithTestBrain` keeps accepting now that `brain` is a production option. */
|
|
11465
|
+
interface RunGraphTestOptions extends RunGraphOptions {
|
|
11466
|
+
readonly brain: ToolLoopChat;
|
|
11467
|
+
}
|
|
11468
|
+
/**
|
|
11469
|
+
* Execute an {@link AgentGraph}. A flow graph (`entry` set) runs from its entries and routes edges
|
|
11470
|
+
* under a runtime-owned root that places no model call. Otherwise the root node becomes the
|
|
11471
|
+
* supervisor (`supervise()` — the execution core), each worker node is spawnable BY NODE ID
|
|
11472
|
+
* (`spawn_worker` with `profile: { name: '<node id>' }`; the node's canonical profile is pinned by
|
|
11473
|
+
* the graph), each
|
|
11474
|
+
* delegates directive is appended to the worker profile's `prompt.instructions` per traversal,
|
|
11475
|
+
* and each analyzes edge becomes an analyst-on-settle route with a real DESTINATION. Every
|
|
11476
|
+
* traversal is ledgered and journaled.
|
|
11477
|
+
*/
|
|
11478
|
+
declare function runGraph(graph: AgentGraph, opts: RunGraphOptions): Promise<GraphResult>;
|
|
11479
|
+
/** Alias for graph tests written before `RunGraphOptions.brain` was production. The production
|
|
11480
|
+
* entry accepts the same shape; this wrapper only keeps the `/testing` import path working. */
|
|
11481
|
+
declare function runGraphWithTestBrain(graph: AgentGraph, opts: RunGraphTestOptions): Promise<GraphResult>;
|
|
11482
|
+
/** An environment-owned check command, run outside the agent's conversation. */
|
|
11483
|
+
interface GraphCommandCheck {
|
|
11484
|
+
readonly command: string;
|
|
11485
|
+
readonly timeoutMs?: number;
|
|
11486
|
+
}
|
|
11487
|
+
/** A graph node that runs a command instead of an agent: no model, no seat. Locally it runs in the
|
|
11488
|
+
* run's working directory; with `RunGraphOptions.checkPlacement` it runs in a fresh Sandbox box
|
|
11489
|
+
* built from `environment`, through the box runner a declared check uses. */
|
|
11490
|
+
interface GraphCheckNode {
|
|
11491
|
+
readonly command: string;
|
|
11492
|
+
/** Default 15 minutes. */
|
|
11493
|
+
readonly timeoutMs?: number;
|
|
11494
|
+
/** The box image under `checkPlacement`; required there, unused locally. */
|
|
11495
|
+
readonly environment?: string;
|
|
11496
|
+
/** Domains a box may reach. Absent or empty: egress is blocked. Unused locally. */
|
|
11497
|
+
readonly egress?: readonly string[];
|
|
11498
|
+
/** Environment variable names the command needs; a missing one fails the node. In a box they
|
|
11499
|
+
* resolve only from the placement's `env`, the run owner's secrets. */
|
|
11500
|
+
readonly secrets?: readonly string[];
|
|
11501
|
+
/** The box's size under `checkPlacement`. */
|
|
11502
|
+
readonly resources?: SandboxResources;
|
|
11503
|
+
}
|
|
11504
|
+
/** Where check nodes run in boxes: the run owner's own account. A check node is a step of the
|
|
11505
|
+
* graph, not a judge, so `builderAccounts` is optional and never refuses the owner's account. */
|
|
11506
|
+
interface GraphCheckPlacement extends Omit<DeclaredCheckPlacement, 'builderAccounts' | 'env'> {
|
|
11507
|
+
readonly builderAccounts?: DeclaredCheckPlacement['builderAccounts'];
|
|
11508
|
+
/** The owner's secrets, or a resolver called before each box run so short-lived tokens stay
|
|
11509
|
+
* fresh. Absent: no secrets. */
|
|
11510
|
+
readonly env?: Readonly<Record<string, string | undefined>> | ((request: {
|
|
11511
|
+
readonly node: string;
|
|
11512
|
+
readonly secrets: readonly string[];
|
|
11513
|
+
readonly signal: AbortSignal;
|
|
11514
|
+
}) => Promise<Readonly<Record<string, string | undefined>>>);
|
|
11515
|
+
}
|
|
11516
|
+
/** A check node's settled output. `json` is the last stdout line when it parses as an object. */
|
|
11517
|
+
interface GraphCheckOutput {
|
|
11518
|
+
readonly pass: boolean;
|
|
11519
|
+
readonly exitCode: number | null;
|
|
11520
|
+
/** The last 64 KiB of stdout followed by stderr. */
|
|
11521
|
+
readonly output: string;
|
|
11522
|
+
readonly json?: Record<string, unknown>;
|
|
11523
|
+
}
|
|
11524
|
+
interface GraphFromStoredOptions {
|
|
11525
|
+
readonly trigger?: Readonly<Record<string, unknown>>;
|
|
11526
|
+
readonly checks?: Readonly<Record<string, AgentGraph['deliverable']['check'] | GraphCommandCheck>>;
|
|
11527
|
+
}
|
|
11528
|
+
/** The leaves of a flow's check nodes, for `supervise()`'s leaf path. */
|
|
11529
|
+
interface GraphCheckNodes {
|
|
11530
|
+
readonly names: ReadonlyArray<string>;
|
|
11531
|
+
readonly leaf: MakeWorkerAgent;
|
|
11532
|
+
}
|
|
11533
|
+
/** A name→value table in this package's resolver-port shape: construction stays the caller's,
|
|
11534
|
+
* lookup stays lazy, and a table backed by a file, a plugin loader, or a plain object all
|
|
11535
|
+
* satisfy one interface. */
|
|
11536
|
+
interface SuperviseRegistryTable<T> {
|
|
11537
|
+
resolve(name: string): T | undefined;
|
|
11538
|
+
/** The names the table holds. The three code-valued tables may omit it, because a caller names
|
|
11539
|
+
* their entries from data it already has. The profiles table must list them, because a
|
|
11540
|
+
* director can choose only from a menu it can read. */
|
|
11541
|
+
names?(): readonly string[];
|
|
11542
|
+
}
|
|
11543
|
+
/**
|
|
11544
|
+
* The name→value tables that make the three CODE-valued options expressible as run DATA, and the
|
|
11545
|
+
* profiles a director may spawn by name.
|
|
11546
|
+
*
|
|
11547
|
+
* `deliverable` / `finalizer` / `analysts` are functions and registries, so a recorded
|
|
11548
|
+
* run configuration (a JSON row, a campaign spec, a resumed run's options) cannot carry them — and
|
|
11549
|
+
* a run with no `deliverable` cannot return a `winner` at all outside the sandbox backend, because
|
|
11550
|
+
* the finalizer keeps only children whose oracle passed and nothing else writes that verdict. A
|
|
11551
|
+
* caller that owns the code registers it here once and names it from data thereafter.
|
|
11552
|
+
*
|
|
11553
|
+
* `profiles` is the profiles table: named AgentProfiles that every manager in the tree may spawn
|
|
11554
|
+
* with `spawn_worker({ profile: '<name>' })` instead of retyping them. The table is read once, when
|
|
11555
|
+
* `supervise` is called: each entry is validated like a root profile and frozen, so every spawn by
|
|
11556
|
+
* a name starts from the same bytes. Unless `profileGuidance` or `authorizeSpawn` rewrites the
|
|
11557
|
+
* profile, the journal records the entry's digest for the child. Omit the table, or list no names,
|
|
11558
|
+
* and nothing about the run changes: `spawn_worker` keeps its object-only `profile`.
|
|
11559
|
+
*/
|
|
11560
|
+
interface SuperviseRegistry {
|
|
11561
|
+
readonly deliverables?: SuperviseRegistryTable<DeliverableSpec<unknown>>;
|
|
11562
|
+
readonly finalizers?: SuperviseRegistryTable<SupervisorFinalizer>;
|
|
11563
|
+
readonly analysts?: SuperviseRegistryTable<AnalystRegistry$1>;
|
|
11564
|
+
readonly profiles?: SuperviseRegistryTable<SuperviseProfileEntry> & {
|
|
11565
|
+
names(): readonly string[];
|
|
11566
|
+
};
|
|
11567
|
+
}
|
|
11568
|
+
interface SuperviseOptions {
|
|
11569
|
+
/** Whole-run persistence and ownership. SQL contexts are acquired before replay and compute. */
|
|
11570
|
+
readonly runContext?: RunContext;
|
|
11571
|
+
/** The conserved compute pool for the whole run. */
|
|
11572
|
+
readonly budget: Budget;
|
|
11573
|
+
/** Caller-created live handle for observing, steering, or cancelling this root manager. Runtime
|
|
11574
|
+
* attaches it before execution and detaches it after the join barrier. */
|
|
11575
|
+
readonly rootHandle?: RootHandle<unknown>;
|
|
11576
|
+
/** Caller-owned cancellation for the complete recursive run. Aborting it cascades through the
|
|
11577
|
+
* root scope and every live child, including acquisition and backend execution. */
|
|
11578
|
+
readonly signal?: AbortSignal;
|
|
11579
|
+
/** Trusted candidate and pursuit attribution for the root. The runtime derives profile/task
|
|
11580
|
+
* digests itself from the exact detached values it executes. */
|
|
11581
|
+
readonly execution?: AgentExecutionRef;
|
|
11582
|
+
/** WHERE workers run — derives the worker seam. Provide this OR an explicit `makeWorkerAgent`. */
|
|
11583
|
+
readonly backend?: ExecutorConfig;
|
|
11584
|
+
/** Resolve an authored subscription stage to one eligible seat and a backend pinned to its
|
|
11585
|
+
* credential reference. The callback may report stage exhaustion with `resumeAt`; Runtime
|
|
11586
|
+
* advances the authored chain and never writes credentials into its record. */
|
|
11587
|
+
readonly selectSeat?: SelectSeat;
|
|
11588
|
+
/** The independent completion check for backend-derived workers and direct supervisor
|
|
11589
|
+
* submissions. Strongly recommended: without it the supervisor cannot submit its own work and
|
|
11590
|
+
* backend-derived workers fall back to their own validity signal. A `string` names an entry in
|
|
11591
|
+
* `registry.deliverables`. */
|
|
11592
|
+
readonly deliverable?: DeliverableSpec<unknown> | string;
|
|
11593
|
+
/** Resolve the completion check for one exact authorized backend-derived child. The callback runs
|
|
11594
|
+
* after spawn authorization and receives a detached immutable context. It may return `undefined`
|
|
11595
|
+
* to use the run-wide `deliverable`, or `null` to omit this child's assignment check and continuation.
|
|
11596
|
+
* Null does not turn completion into acceptance or erase existing backend/descendant verdicts.
|
|
11597
|
+
* An unchecked child must declare compatible tools: disable inherited spawn rights and author its
|
|
11598
|
+
* coordination grants without `submit_result` or `read_continuation`. Explicit incompatible
|
|
11599
|
+
* grants remain refused; the authorized profile is never rewritten after this callback. */
|
|
11600
|
+
readonly resolveDeliverable?: (input: DeliverableResolutionInput) => DeliverableSpec<unknown> | null | undefined;
|
|
11601
|
+
/** Name→value tables for the four code-valued options, so a recorded run configuration can name
|
|
11602
|
+
* them instead of carrying closures. See {@link SuperviseRegistry}. */
|
|
11603
|
+
readonly registry?: SuperviseRegistry;
|
|
11604
|
+
/** Where the coordination MCP binds when the supervisor is harness-driven. Omit = an ephemeral
|
|
11605
|
+
* port on `127.0.0.1`, which an off-host root cannot reach. A non-loopback host is refused
|
|
11606
|
+
* unless authentication is configured; provider managers also need a reachable public URL. */
|
|
11607
|
+
readonly coordination?: CoordinationBinding;
|
|
11608
|
+
/** OPT-IN peer mail for the run's workers: sibling-to-sibling `send_mail` / `read_mail`, bounded
|
|
11609
|
+
* and audited (`CoordinationToolsOptions.peerMail`). The runtime mints one capability URL per
|
|
11610
|
+
* spawn, serves the mail listener beside the coordination MCP, and hands each worker its
|
|
11611
|
+
* endpoint on {@link runtime.WorkerSpawnContext.peerMailUrl}.
|
|
11612
|
+
*
|
|
11613
|
+
* On the backend-derived worker path the runtime also MOUNTS that endpoint, the way a driver
|
|
11614
|
+
* receives its coordination MCP: out of band on the bridge's `runtime_attachments`, so the
|
|
11615
|
+
* authored profile digest never moves, and inside the leaf factory, so `authorizeSpawn` has
|
|
11616
|
+
* already decided the profile. A `bridge` worker therefore calls `send_mail` / `read_mail` as
|
|
11617
|
+
* native tools. `provider` workers mount it through their runtime MCP attachment capability. `router` and `router-tools` workers run no MCP client, so the URL
|
|
11618
|
+
* stays the caller's to use; every other backend refuses the spawn rather than mint a
|
|
11619
|
+
* capability it can never reach. A caller-owned `makeWorkerAgent` owns its own mount.
|
|
11620
|
+
*
|
|
11621
|
+
* Requires a harness-brained supervisor; a router-brained supervisor is refused rather than
|
|
11622
|
+
* silently unmailed. */
|
|
11623
|
+
readonly peerMail?: boolean | {
|
|
11624
|
+
limits?: Partial<PeerMailLimits>;
|
|
11625
|
+
};
|
|
11626
|
+
/** Let sibling root managers read each other's recorded evidence. No mutation or steering. Default false. */
|
|
11627
|
+
readonly peerAudit?: boolean;
|
|
11628
|
+
/** False removes observe_agent/read_journal from the root and every authored descendant. Default true. */
|
|
11629
|
+
readonly traceTools?: boolean;
|
|
11630
|
+
/** Override the worker seam directly (tests / advanced) instead of deriving it from `backend`.
|
|
11631
|
+
* This is caller-owned execution: profile security, spawn authorization, and recursive-driver
|
|
11632
|
+
* selection below apply only to the backend-derived worker path. `authorizeMessage` still
|
|
11633
|
+
* governs continuations sent through Runtime's coordination tools. */
|
|
11634
|
+
readonly makeWorkerAgent?: MakeWorkerAgent;
|
|
11635
|
+
/** Override ONLY how an authorized LEAF executes, keeping the whole backend-derived path —
|
|
11636
|
+
* profile security, spawn authorization, recursive-driver selection, nested supervisors — in
|
|
11637
|
+
* force. Unlike `makeWorkerAgent`, which replaces that path, this slots inside it: the kernel
|
|
11638
|
+
* authorizes and classifies every spawn, and a child that is NOT a driver runs through this
|
|
11639
|
+
* factory instead of `backend`. A child that IS a driver still becomes a nested supervisor, whose
|
|
11640
|
+
* own leaves use this same factory. Composes with `authorizeSpawn`; `backend` is then optional.
|
|
11641
|
+
* This is the seam an offline test or a pinning layer (an agent graph) should use. */
|
|
11642
|
+
readonly makeLeafAgent?: MakeWorkerAgent;
|
|
11643
|
+
/** Reconstruct executors for interrupted children on resume, for a run that owns its worker
|
|
11644
|
+
* factory (`makeWorkerAgent`/`makeLeafAgent`). Backend-derived recursive managers register one
|
|
11645
|
+
* automatically; a caller-owned factory cannot be, so a leaf whose execution can RE-ATTACH
|
|
11646
|
+
* across a process boundary (a sandbox session, a CLI bridge session — an executor that
|
|
11647
|
+
* journals its admission through the retained seam) needs this for a resume to recover the
|
|
11648
|
+
* in-flight child instead of refusing its key `in-doubt`. The factory receives the
|
|
11649
|
+
* reconstructed spec and the child's journaled context, including its prior admissions. */
|
|
11650
|
+
readonly recoverExecutor?: ExecutorFactory<unknown>;
|
|
11651
|
+
/** Run harness-brained supervisors here. Automatic execution supports a local `bridge`, or a
|
|
11652
|
+
* provider advertising runtime MCP attachments with authenticated `coordination.publicUrl`.
|
|
11653
|
+
* Defaults to `backend`; separate it when managers and workers use different services. */
|
|
11654
|
+
readonly driverBackend?: ExecutorConfig;
|
|
11655
|
+
/** Security policy applied to every manager-authored child profile before budget reservation.
|
|
11656
|
+
* The default blocks local and remote MCP, hooks, and connection grants. Pass an explicit
|
|
11657
|
+
* allowlist to grant remote MCP hosts or other author-controlled capabilities. */
|
|
11658
|
+
readonly profileSecurity?: AgentProfileSecurityPolicy;
|
|
11659
|
+
/** Product authority over one complete manager-authored spawn. The callback sees the detached,
|
|
11660
|
+
* immutable profile, task, budget, label, and key together, so approving a profile cannot
|
|
11513
11661
|
* authorize a different task. Return the exact allowed profile (which may be narrowed) plus
|
|
11514
11662
|
* trusted candidate/pursuit attribution, or throw to refuse the whole spawn before reservation. */
|
|
11515
11663
|
readonly authorizeSpawn?: (input: {
|
|
@@ -11556,10 +11704,11 @@ interface SuperviseOptions {
|
|
|
11556
11704
|
* Flow graphs keep derivation for native child drivers; their root uses Runtime's deterministic
|
|
11557
11705
|
* brain and makes no model call through this backend. */
|
|
11558
11706
|
readonly rootDriverFromBackend?: boolean;
|
|
11559
|
-
/** Pre-journal profile resolution
|
|
11560
|
-
*
|
|
11561
|
-
* sets this alongside `authorizeSpawn` so the backend
|
|
11562
|
-
* canonical profile. Identity-free and synchronous;
|
|
11707
|
+
/** Pre-journal profile resolution: the profile a driver authored → the profile that will run
|
|
11708
|
+
* (`CoordinationToolsOptions.resolveSpawnProfile`), for the spawn itself and its pre-flight
|
|
11709
|
+
* gate alike (#1281). A pinning layer sets this alongside `authorizeSpawn` so the backend
|
|
11710
|
+
* gate and the authorization see the same canonical profile. Identity-free and synchronous;
|
|
11711
|
+
* throw to refuse. */
|
|
11563
11712
|
readonly resolveSpawnProfile?: (profile: AgentProfile) => AgentProfile;
|
|
11564
11713
|
/** OPT-IN standing guidance from the profile knowledge base
|
|
11565
11714
|
* (`@tangle-network/agent-interface/profile-kb`). `'profile-kb'` composes harness guidance,
|
|
@@ -11739,787 +11888,431 @@ interface SuperviseOptions {
|
|
|
11739
11888
|
/** The flow the root manager runs: an AgentGraph with `entry` sets it, together with its
|
|
11740
11889
|
* runtime-owned root, which makes no model call. See `RouteFlow`. Omit = none. */
|
|
11741
11890
|
readonly routeFlow?: RouteFlow;
|
|
11891
|
+
/** The leaves of `routeFlow`'s check nodes: a route spawn of one runs its command, not an agent.
|
|
11892
|
+
* An AgentGraph's check nodes set it. Omit = none. */
|
|
11893
|
+
readonly checkNodes?: GraphCheckNodes;
|
|
11742
11894
|
/** Answers each gate visit of `routeFlow`; `runGraph` sets it from `RunGraphOptions.decideGate`,
|
|
11743
11895
|
* replaying a decision the run journal already holds. Omit = none. */
|
|
11744
11896
|
readonly decideGate?: DecideGate;
|
|
11745
11897
|
/**
|
|
11746
11898
|
* Watch every worker's LIVE tool trace with the online detector panel and raise a `finding` the
|
|
11747
11899
|
* moment one loops or error-storms — so the supervisor learns it mid-run (in its next wake)
|
|
11748
|
-
* instead of at settle. Pairs with a steerable worker: the finding is the evidence, `steer_agent`
|
|
11749
|
-
* is the correction. Requires a backend whose executor exposes a trace source (the steerable
|
|
11750
|
-
* sandbox worker and the pi wrapper do); other runtimes are simply not watched.
|
|
11751
|
-
*
|
|
11752
|
-
* Omit = off (status quo — no online watching, no extra events).
|
|
11753
|
-
*/
|
|
11754
|
-
readonly watchWorkers?: WorkerWatchOptions;
|
|
11755
|
-
/** Idle time after which `observe_agent` reports a running worker as `stalled`. A derived read
|
|
11756
|
-
* at observation time — nothing is killed or retried. Omit = the runtime default. */
|
|
11757
|
-
readonly stallAfterMs?: number;
|
|
11758
|
-
/** How Runtime wakes a manager that ended its turn with work open: the heartbeat, the debounce
|
|
11759
|
-
* that coalesces events into one wake, and the deadline warning. Omit = the defaults in
|
|
11760
|
-
* `./wake` (15 min, 2 s, 15 min). */
|
|
11761
|
-
readonly wake?: ManagerWakePolicy;
|
|
11762
|
-
/** Default continuity per worker PROFILE NAME: `'resume'` makes each spawn of that name after
|
|
11763
|
-
* the first re-attach to the node's most recent SETTLED worker — a NEW live worker whose spawn
|
|
11764
|
-
* context carries the prior worker's identity (`WorkerSpawnContext.resume`), which the executor
|
|
11765
|
-
* seam re-attaches with. `spawn_worker`'s per-call `continuity` argument overrides in either
|
|
11766
|
-
* direction; `runGraph` derives this from delegates-edge `continuity`. Omit = every spawn is
|
|
11767
|
-
* `'fresh'` (status quo). See `CoordinationToolsOptions.continuityByProfile` for the
|
|
11768
|
-
* refusal semantics (no-prior / while-live / with-key) and the process-local resume boundary. */
|
|
11769
|
-
readonly continuityByProfile?: Readonly<Record<string, ContinuityMode>>;
|
|
11770
|
-
/** Worker output store. Defaults to in-memory. */
|
|
11771
|
-
readonly blobs?: ResultBlobStore;
|
|
11772
|
-
/**
|
|
11773
|
-
* Make the run DURABLE: journal + result blobs + the coordination side-log are file-backed under
|
|
11774
|
-
* this directory (`createFileRunContext`), fsynced per write, and the supervisor reads the prior
|
|
11775
|
-
* tree first. Re-running with the same `runDir` AND the same `runId` resumes only when the exact
|
|
11776
|
-
* root profile/task identity and declared budget match. The original absolute deadline and prior
|
|
11777
|
-
* measured spend are restored before new admission. The built-in driver is resume-aware: children
|
|
11778
|
-
* that already settled, including their exact execution identities, are replayed onto
|
|
11779
|
-
* `Scope.resume` (and into the driver's settled ledger + its first context), keyed assignments
|
|
11780
|
-
* (`spawn_worker`'s `key`) resolve to their committed results instead of re-running, pending
|
|
11781
|
-
* waits re-arm on their original deadlines, and the coordination log loads prior questions,
|
|
11782
|
-
* findings, and instruction receipts. The router arm receives all three in its resume brief; the
|
|
11783
|
-
* external arm seeds prior questions while findings and receipts remain in the durable log.
|
|
11784
|
-
* Instruction receipts are evidence and are never delivered automatically to a replacement
|
|
11785
|
-
* worker. The final result spans both processes' work. Unset = in-memory, fresh every call.
|
|
11786
|
-
*
|
|
11787
|
-
* The boundary that remains: work that was IN FLIGHT when the process died is not recovered —
|
|
11788
|
-
* the built-in executors cannot re-attach to a dead process's executions. Each such keyed
|
|
11789
|
-
* assignment resumes as `in-doubt`, its full declared reservation stays charged, and its
|
|
11790
|
-
* token/dollar telemetry remains unknown. Runtime refuses a replacement under that key until the
|
|
11791
|
-
* exact prior execution is recovered, so restart cannot duplicate work or slide the deadline.
|
|
11792
|
-
*
|
|
11793
|
-
* `runId` matters here: it defaults to the constant `'supervise'`, which is fine for a single
|
|
11794
|
-
* resumable run per directory but collides across concurrent runs sharing one `runDir`.
|
|
11795
|
-
*/
|
|
11796
|
-
readonly runDir?: string;
|
|
11797
|
-
/** Hand a root with only a long wait and no live descendants to the caller's existing keeper.
|
|
11798
|
-
* Requires runDir. Rejects with RunParkedError after the idle threshold, retaining wakeAt in
|
|
11799
|
-
* the spawn journal without writing a terminal result. The caller must handle parking and
|
|
11800
|
-
* resume the same runDir/runId at wakeAt. Omit to keep waits in this process. */
|
|
11801
|
-
readonly parking?: RunParkingPolicy;
|
|
11802
|
-
/** Advanced test seam: opt into resume-first when the durable stores are caller-supplied
|
|
11803
|
-
* (`journal` + `blobs` / `runContext`) instead of derived from `runDir`. The normal durable path
|
|
11804
|
-
* is `runDir` or a `runContext` (see `docs/durability.md`). Exactly what the file
|
|
11805
|
-
* context sets automatically: load the prior tree for `runId` before starting fresh, refuse a
|
|
11806
|
-
* reused id without it. Ignored when `runDir` is also set — the file context owns the flag. */
|
|
11807
|
-
readonly resume?: boolean;
|
|
11808
|
-
/**
|
|
11809
|
-
* The segment this entry runs the root in. A run keeps one id for its whole life: a turn that
|
|
11810
|
-
* ends, a lost stream and a dead supervisor are boundaries between entries, and a resume may move
|
|
11811
|
-
* the root to another model, provider, reasoning effort or harness, or onto another stack, as a
|
|
11812
|
-
* new segment of the same run. `profile` stays the root profile the run recorded, so its identity,
|
|
11813
|
-
* coordination owner and settled children resume unchanged; the root executes that profile with
|
|
11814
|
-
* `model.provider`, `model.default`, `model.reasoningEffort` and `harness` replaced where given. `stack` names the
|
|
11815
|
-
* package versions the caller runs this entry under, its Runtime among them; Runtime records it
|
|
11816
|
-
* and never reads it. When the segment differs from the one the run last ran, the journal gains
|
|
11817
|
-
* one `root-segment` record with the time and `reason`. A different task, or any other profile
|
|
11818
|
-
* change, is still a resume identity mismatch: that is a new run. A fresh run records its first
|
|
11819
|
-
* segment and refuses a model or harness change: a new run takes them from its profile.
|
|
11820
|
-
*
|
|
11821
|
-
* A harness change starts a new native session: a session of one harness cannot continue in
|
|
11822
|
-
* another. The root re-enters with its objective and the run's state, in a workspace restored
|
|
11823
|
-
* from its latest checkpoint when the provider holds one.
|
|
11824
|
-
*/
|
|
11825
|
-
readonly segment?: {
|
|
11826
|
-
readonly provider?: string;
|
|
11827
|
-
readonly model?: string;
|
|
11828
|
-
readonly reasoningEffort?: ReasoningEffort;
|
|
11829
|
-
readonly harness?: AgentProfile['harness'];
|
|
11830
|
-
readonly stack?: Readonly<Record<string, string>>;
|
|
11831
|
-
readonly reason: string;
|
|
11832
|
-
};
|
|
11833
|
-
/** Durable steer directory when it differs from the run-control directory. */
|
|
11834
|
-
readonly steerDir?: string;
|
|
11835
|
-
/** Override the spawn journal directly (advanced; `runDir` is the ordinary durable path). Pair
|
|
11836
|
-
* with `blobs` — a journal whose result payloads live in a different store cannot replay. */
|
|
11837
|
-
readonly journal?: SpawnJournal;
|
|
11838
|
-
/**
|
|
11839
|
-
* PROGRESS-derived stop rule (BOTH arms). Ends a run that has stopped LEARNING before it
|
|
11840
|
-
* exhausts a ceiling — the answer to "a run should end because it is done or stuck, not because
|
|
11841
|
-
* it ran out". It composes with the budget guards and can never override one.
|
|
11842
|
-
*
|
|
11843
|
-
* The evaluation boundary differs by arm because the loop does: a router-brained supervisor is
|
|
11844
|
-
* evaluated before each of its own inference turns; a harness-brained supervisor is evaluated on
|
|
11845
|
-
* each worker settle, and a stop aborts its stop signal so the harness ends at its next turn
|
|
11846
|
-
* boundary. Both arms fold the same settled ledger through the same evaluator.
|
|
11847
|
-
*
|
|
11848
|
-
* Build it from `supervise/stop-rules`: `plateau({window, minDelta})`,
|
|
11849
|
-
* `noProgressFor({ms, settles})`, `allWorkersStalled({...})`, combined with `anyOf`/`allOf`. The
|
|
11850
|
-
* thresholds are policy and stay with you; the enforcement lives in the runtime. Omit = ceilings
|
|
11851
|
-
* only (unchanged behavior).
|
|
11852
|
-
*
|
|
11853
|
-
* A record may declare the plateau rule as data, `{ plateau: { window, minDelta } }`, so no
|
|
11854
|
-
* product module builds it.
|
|
11855
|
-
*/
|
|
11856
|
-
readonly stopRule?: StopRule | {
|
|
11857
|
-
readonly plateau: PlateauOptions;
|
|
11858
|
-
};
|
|
11859
|
-
/** One-shot notification of WHY a `stopRule` ended the run (BOTH arms) — so a caller records the
|
|
11860
|
-
* reason instead of inferring an early stop from an unexhausted budget. */
|
|
11861
|
-
readonly onProgressStop?: (reason: string) => void;
|
|
11862
|
-
/** Recursion ceiling for the tree (root = 0). The conserved pool is what bounds depth, since each
|
|
11863
|
-
* level's slice comes out of the level above; this only stops a runaway recursion. Omit =
|
|
11864
|
-
* `DEFAULT_MAX_DEPTH` (16). */
|
|
11865
|
-
readonly maxDepth?: number;
|
|
11866
|
-
/** Turn cap for the supervisor's OWN loop (BOTH arms). Router arm: inference turns of the
|
|
11867
|
-
* driver's tool loop. Harness arm: turns the harness reports, counted off its `iteration`
|
|
11868
|
-
* stream — reaching the cap aborts the stop signal, so the harness ends at its next turn
|
|
11869
|
-
* boundary rather than mid-request. `0` lifts the cap on both arms and leaves the conserved
|
|
11870
|
-
* pool, the deadline, and abort as the bounds; a negative value is refused. Omit = the router
|
|
11871
|
-
* arm's default cap, and no turn cap on the harness arm. */
|
|
11872
|
-
readonly maxTurns?: number;
|
|
11873
|
-
/** Give the supervisor brain a chapter-lifecycle on its OWN context window (ROUTER ARM ONLY —
|
|
11874
|
-
* a harness owns its own context window and its own compaction, so this is refused for a
|
|
11875
|
-
* harness-brained supervisor rather than silently ignored): once its coordination transcript
|
|
11876
|
-
* exceeds `thresholdTokens` it distills to a compact progress note and continues, instead of
|
|
11877
|
-
* re-billing the whole transcript every turn (the cost that makes the LLM-brain front door lose
|
|
11878
|
-
* to a dumb-Ralph respawn). The live `Scope` roster is the durable state across chapters.
|
|
11879
|
-
* Default off. `distill` defaults to a brain self-summary + the settled-worker roster. */
|
|
11880
|
-
readonly compaction?: ToolLoopCompactionOptions;
|
|
11881
|
-
readonly runId?: string;
|
|
11882
|
-
readonly now?: () => number;
|
|
11883
|
-
/** Restrict the run to this subset of models. When set, every configured model — the
|
|
11884
|
-
* supervisor router model, the profile's model, and the backend's model — must be a member,
|
|
11885
|
-
* or `supervise()` throws a `ConfigError` before any compute is spent. Unset = unrestricted.
|
|
11886
|
-
*
|
|
11887
|
-
* This is a MODEL-ID filter, not a route filter. The compared values are the bare ids a profile
|
|
11888
|
-
* declares — `model.default`, `model.small`, `subagents[].model`, `modes[].model`. The composed
|
|
11889
|
-
* wire id (`harness/provider/model`) is never built here and never compared, so an entry written
|
|
11890
|
-
* in qualified form matches nothing, and a child that names an allowed id is admitted whatever
|
|
11891
|
-
* harness and provider its own profile declares. Pin the route with `authorizeSpawn`: it reads
|
|
11892
|
-
* the authored child profile and may refuse the spawn before any reservation. */
|
|
11893
|
-
readonly allowedModels?: readonly string[];
|
|
11894
|
-
/** How the settled-worker ledger becomes the run's output. Default `bestDelivered` — the single
|
|
11895
|
-
* highest-scoring DELIVERED child (the exact behavior every existing caller had). Alternatives:
|
|
11896
|
-
* `collectDelivered` (every verified distinct output with provenance — a Pareto set / recorded
|
|
11897
|
-
* disagreement) or a custom `SupervisorFinalizer`. Whatever the finalizer, it operates on
|
|
11898
|
-
* structurally DELIVERED outputs only — an undelivered or invalid child stays ineligible. A
|
|
11899
|
-
* `string` names an entry in `registry.finalizers`. */
|
|
11900
|
-
readonly finalizer?: SupervisorFinalizer | string;
|
|
11901
|
-
/** Lifecycle observers for the whole recursive tree (`Scope` re-seeds them into every nested
|
|
11902
|
-
* scope). Composed with the `otel` recorder below when both are set. Omit = no observers, which
|
|
11903
|
-
* is the behavior every existing caller has. */
|
|
11904
|
-
readonly hooks?: RuntimeHooks;
|
|
11905
|
-
/**
|
|
11906
|
-
* OPT-IN OTLP tracing: emit one span per supervised node (opened at spawn, closed at settle,
|
|
11907
|
-
* parented to its parent node's span) plus an `LLM` child span per metered driver turn, so the
|
|
11908
|
-
* tree is readable by any trace viewer instead of only by a journal parser. See `otel-spans.ts`.
|
|
11900
|
+
* instead of at settle. Pairs with a steerable worker: the finding is the evidence, `steer_agent`
|
|
11901
|
+
* is the correction. Requires a backend whose executor exposes a trace source (the steerable
|
|
11902
|
+
* sandbox worker and the pi wrapper do); other runtimes are simply not watched.
|
|
11909
11903
|
*
|
|
11910
|
-
* Omit
|
|
11911
|
-
* never a default. Present with no reachable endpoint (no `exportConfig.endpoint` and no
|
|
11912
|
-
* `OTEL_EXPORTER_OTLP_ENDPOINT`) is also a no-op. The spawn journal is untouched either way:
|
|
11913
|
-
* spans are telemetry, never the replay/resume record.
|
|
11904
|
+
* Omit = off (status quo — no online watching, no extra events).
|
|
11914
11905
|
*/
|
|
11915
|
-
readonly
|
|
11916
|
-
|
|
11917
|
-
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
/**
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
readonly
|
|
11931
|
-
|
|
11932
|
-
readonly
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
declare const superviseFleetCapabilities: Readonly<{
|
|
11970
|
-
peerAudit: true;
|
|
11971
|
-
traceTools: true;
|
|
11972
|
-
graphTools: true;
|
|
11973
|
-
}>;
|
|
11974
|
-
/** One-call supervisor: build + run a supervisor from its exact profile. @stable */
|
|
11975
|
-
declare function supervise(profile: SupervisorProfile, task: unknown, opts: SuperviseOptions): Promise<{
|
|
11976
|
-
execution?: AgentExecutionRef;
|
|
11977
|
-
rootProviderModel: ProviderModelExecutionEvidence;
|
|
11978
|
-
kind: "no-winner";
|
|
11979
|
-
tree: TreeView;
|
|
11980
|
-
downCount: number;
|
|
11981
|
-
spentTotal: Spend;
|
|
11982
|
-
rootStream?: RootStreamReceipt;
|
|
11983
|
-
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
11984
|
-
continuation?: DriverContinuationRecord;
|
|
11985
|
-
providerModel?: ProviderModelExecutionEvidence;
|
|
11986
|
-
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
11987
|
-
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
11988
|
-
spendGaps?: ReadonlyArray<SpendGap>;
|
|
11989
|
-
fleetYield: FleetYield;
|
|
11990
|
-
error?: never;
|
|
11991
|
-
reason: "all-children-down" | "no-children-spawned" | "no-result-selected" | "stopped" | "budget-exhausted" | "deadline" | "aborted";
|
|
11992
|
-
} | {
|
|
11993
|
-
execution?: AgentExecutionRef;
|
|
11994
|
-
rootProviderModel: ProviderModelExecutionEvidence;
|
|
11995
|
-
kind: "no-winner";
|
|
11996
|
-
tree: TreeView;
|
|
11997
|
-
downCount: number;
|
|
11998
|
-
spentTotal: Spend;
|
|
11999
|
-
rootStream?: RootStreamReceipt;
|
|
12000
|
-
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12001
|
-
continuation?: DriverContinuationRecord;
|
|
12002
|
-
providerModel?: ProviderModelExecutionEvidence;
|
|
12003
|
-
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12004
|
-
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
12005
|
-
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12006
|
-
fleetYield: FleetYield;
|
|
12007
|
-
error?: never;
|
|
12008
|
-
reason: "cancelled";
|
|
12009
|
-
source: string;
|
|
12010
|
-
cancellationReason: string;
|
|
12011
|
-
operationId?: string;
|
|
12012
|
-
operator?: string;
|
|
12013
|
-
} | {
|
|
12014
|
-
execution?: AgentExecutionRef;
|
|
12015
|
-
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12016
|
-
kind: "no-winner";
|
|
12017
|
-
reason: "driver-failed";
|
|
12018
|
-
tree: TreeView;
|
|
12019
|
-
downCount: number;
|
|
12020
|
-
spentTotal: Spend;
|
|
12021
|
-
rootStream?: RootStreamReceipt;
|
|
12022
|
-
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12023
|
-
continuation?: DriverContinuationRecord;
|
|
12024
|
-
providerModel?: ProviderModelExecutionEvidence;
|
|
12025
|
-
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12026
|
-
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
12027
|
-
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12028
|
-
fleetYield: FleetYield;
|
|
12029
|
-
error: NoWinnerError;
|
|
12030
|
-
} | {
|
|
12031
|
-
execution?: AgentExecutionRef;
|
|
12032
|
-
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12033
|
-
kind: "winner";
|
|
12034
|
-
out: unknown;
|
|
12035
|
-
outRef: string;
|
|
12036
|
-
verdict?: import("@tangle-network/agent-eval").DefaultVerdict;
|
|
12037
|
-
tree: TreeView;
|
|
12038
|
-
spentTotal: Spend;
|
|
12039
|
-
rootStream?: RootStreamReceipt;
|
|
12040
|
-
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12041
|
-
continuation?: DriverContinuationRecord;
|
|
12042
|
-
providerModel?: ProviderModelExecutionEvidence;
|
|
12043
|
-
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12044
|
-
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12045
|
-
fleetYield: FleetYield;
|
|
12046
|
-
spentBreakdown?: {
|
|
12047
|
-
driverInference: Spend;
|
|
12048
|
-
childWork: Spend;
|
|
12049
|
-
};
|
|
12050
|
-
}>;
|
|
12051
|
-
/** Deterministic scripted-brain path for tests. Not exported from Runtime's main entry. */
|
|
12052
|
-
declare function superviseWithTestBrain(profile: SupervisorProfile, task: unknown, opts: SuperviseTestOptions): Promise<{
|
|
12053
|
-
execution?: AgentExecutionRef;
|
|
12054
|
-
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12055
|
-
kind: "no-winner";
|
|
12056
|
-
tree: TreeView;
|
|
12057
|
-
downCount: number;
|
|
12058
|
-
spentTotal: Spend;
|
|
12059
|
-
rootStream?: RootStreamReceipt;
|
|
12060
|
-
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12061
|
-
continuation?: DriverContinuationRecord;
|
|
12062
|
-
providerModel?: ProviderModelExecutionEvidence;
|
|
12063
|
-
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12064
|
-
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
12065
|
-
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12066
|
-
fleetYield: FleetYield;
|
|
12067
|
-
error?: never;
|
|
12068
|
-
reason: "all-children-down" | "no-children-spawned" | "no-result-selected" | "stopped" | "budget-exhausted" | "deadline" | "aborted";
|
|
12069
|
-
} | {
|
|
12070
|
-
execution?: AgentExecutionRef;
|
|
12071
|
-
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12072
|
-
kind: "no-winner";
|
|
12073
|
-
tree: TreeView;
|
|
12074
|
-
downCount: number;
|
|
12075
|
-
spentTotal: Spend;
|
|
12076
|
-
rootStream?: RootStreamReceipt;
|
|
12077
|
-
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12078
|
-
continuation?: DriverContinuationRecord;
|
|
12079
|
-
providerModel?: ProviderModelExecutionEvidence;
|
|
12080
|
-
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12081
|
-
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
12082
|
-
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12083
|
-
fleetYield: FleetYield;
|
|
12084
|
-
error?: never;
|
|
12085
|
-
reason: "cancelled";
|
|
12086
|
-
source: string;
|
|
12087
|
-
cancellationReason: string;
|
|
12088
|
-
operationId?: string;
|
|
12089
|
-
operator?: string;
|
|
12090
|
-
} | {
|
|
12091
|
-
execution?: AgentExecutionRef;
|
|
12092
|
-
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12093
|
-
kind: "no-winner";
|
|
12094
|
-
reason: "driver-failed";
|
|
12095
|
-
tree: TreeView;
|
|
12096
|
-
downCount: number;
|
|
12097
|
-
spentTotal: Spend;
|
|
12098
|
-
rootStream?: RootStreamReceipt;
|
|
12099
|
-
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12100
|
-
continuation?: DriverContinuationRecord;
|
|
12101
|
-
providerModel?: ProviderModelExecutionEvidence;
|
|
12102
|
-
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12103
|
-
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
12104
|
-
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12105
|
-
fleetYield: FleetYield;
|
|
12106
|
-
error: NoWinnerError;
|
|
12107
|
-
} | {
|
|
12108
|
-
execution?: AgentExecutionRef;
|
|
12109
|
-
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12110
|
-
kind: "winner";
|
|
12111
|
-
out: unknown;
|
|
12112
|
-
outRef: string;
|
|
12113
|
-
verdict?: import("@tangle-network/agent-eval").DefaultVerdict;
|
|
12114
|
-
tree: TreeView;
|
|
12115
|
-
spentTotal: Spend;
|
|
12116
|
-
rootStream?: RootStreamReceipt;
|
|
12117
|
-
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12118
|
-
continuation?: DriverContinuationRecord;
|
|
12119
|
-
providerModel?: ProviderModelExecutionEvidence;
|
|
12120
|
-
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12121
|
-
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12122
|
-
fleetYield: FleetYield;
|
|
12123
|
-
spentBreakdown?: {
|
|
12124
|
-
driverInference: Spend;
|
|
12125
|
-
childWork: Spend;
|
|
12126
|
-
};
|
|
12127
|
-
}>;
|
|
12128
|
-
/**
|
|
12129
|
-
* Start a run as a version of a settled run: the parent's recorded root inputs plus one change.
|
|
12130
|
-
*
|
|
12131
|
-
* The call's `profile`, `task` and `budget` must be the parent's, byte for byte, as its sealed
|
|
12132
|
-
* journal records them. Runtime applies `change` to that profile and runs the result in a new
|
|
12133
|
-
* run directory. The parent directory is read and never written.
|
|
12134
|
-
*/
|
|
12135
|
-
interface PursuitFork {
|
|
12136
|
-
/** The settled parent's run directory. */
|
|
12137
|
-
readonly runDir: string;
|
|
12138
|
-
/** The sha256 of the parent's `result.json` bytes: the sealed point the fork starts from. */
|
|
12139
|
-
readonly settleDigest: Sha256Digest;
|
|
12140
|
-
/** The one change, applied to the parent's root profile. Its `id` is recorded. */
|
|
12141
|
-
readonly change: AgentProfileDiff;
|
|
11906
|
+
readonly watchWorkers?: WorkerWatchOptions;
|
|
11907
|
+
/** Idle time after which `observe_agent` reports a running worker as `stalled`. A derived read
|
|
11908
|
+
* at observation time — nothing is killed or retried. Omit = the runtime default. */
|
|
11909
|
+
readonly stallAfterMs?: number;
|
|
11910
|
+
/** How Runtime wakes a manager that ended its turn with work open: the heartbeat, the debounce
|
|
11911
|
+
* that coalesces events into one wake, and the deadline warning. Omit = the defaults in
|
|
11912
|
+
* `./wake` (15 min, 2 s, 15 min). */
|
|
11913
|
+
readonly wake?: ManagerWakePolicy;
|
|
11914
|
+
/** Default continuity per worker PROFILE NAME: `'resume'` makes each spawn of that name after
|
|
11915
|
+
* the first re-attach to the node's most recent SETTLED worker — a NEW live worker whose spawn
|
|
11916
|
+
* context carries the prior worker's identity (`WorkerSpawnContext.resume`), which the executor
|
|
11917
|
+
* seam re-attaches with. `spawn_worker`'s per-call `continuity` argument overrides in either
|
|
11918
|
+
* direction; `runGraph` derives this from delegates-edge `continuity`. Omit = every spawn is
|
|
11919
|
+
* `'fresh'` (status quo). See `CoordinationToolsOptions.continuityByProfile` for the
|
|
11920
|
+
* refusal semantics (no-prior / while-live / with-key) and the process-local resume boundary. */
|
|
11921
|
+
readonly continuityByProfile?: Readonly<Record<string, ContinuityMode>>;
|
|
11922
|
+
/** Worker output store. Defaults to in-memory. */
|
|
11923
|
+
readonly blobs?: ResultBlobStore;
|
|
11924
|
+
/**
|
|
11925
|
+
* Make the run DURABLE: journal + result blobs + the coordination side-log are file-backed under
|
|
11926
|
+
* this directory (`createFileRunContext`), fsynced per write, and the supervisor reads the prior
|
|
11927
|
+
* tree first. Re-running with the same `runDir` AND the same `runId` resumes only when the exact
|
|
11928
|
+
* root profile/task identity and declared budget match. The original absolute deadline and prior
|
|
11929
|
+
* measured spend are restored before new admission. The built-in driver is resume-aware: children
|
|
11930
|
+
* that already settled, including their exact execution identities, are replayed onto
|
|
11931
|
+
* `Scope.resume` (and into the driver's settled ledger + its first context), keyed assignments
|
|
11932
|
+
* (`spawn_worker`'s `key`) resolve to their committed results instead of re-running, pending
|
|
11933
|
+
* waits re-arm on their original deadlines, and the coordination log loads prior questions,
|
|
11934
|
+
* findings, and instruction receipts. The router arm receives all three in its resume brief; the
|
|
11935
|
+
* external arm seeds prior questions while findings and receipts remain in the durable log.
|
|
11936
|
+
* Instruction receipts are evidence and are never delivered automatically to a replacement
|
|
11937
|
+
* worker. The final result spans both processes' work. Unset = in-memory, fresh every call.
|
|
11938
|
+
*
|
|
11939
|
+
* The boundary that remains: work that was IN FLIGHT when the process died is not recovered —
|
|
11940
|
+
* the built-in executors cannot re-attach to a dead process's executions. Each such keyed
|
|
11941
|
+
* assignment resumes as `in-doubt`, its full declared reservation stays charged, and its
|
|
11942
|
+
* token/dollar telemetry remains unknown. Runtime refuses a replacement under that key until the
|
|
11943
|
+
* exact prior execution is recovered, so restart cannot duplicate work or slide the deadline.
|
|
11944
|
+
*
|
|
11945
|
+
* `runId` matters here: it defaults to the constant `'supervise'`, which is fine for a single
|
|
11946
|
+
* resumable run per directory but collides across concurrent runs sharing one `runDir`.
|
|
11947
|
+
*/
|
|
11948
|
+
readonly runDir?: string;
|
|
11949
|
+
/** Hand a root with only a long wait and no live descendants to the caller's existing keeper.
|
|
11950
|
+
* Requires runDir. Rejects with RunParkedError after the idle threshold, retaining wakeAt in
|
|
11951
|
+
* the spawn journal without writing a terminal result. The caller must handle parking and
|
|
11952
|
+
* resume the same runDir/runId at wakeAt. Omit to keep waits in this process. */
|
|
11953
|
+
readonly parking?: RunParkingPolicy;
|
|
11954
|
+
/** Advanced test seam: opt into resume-first when the durable stores are caller-supplied
|
|
11955
|
+
* (`journal` + `blobs` / `runContext`) instead of derived from `runDir`. The normal durable path
|
|
11956
|
+
* is `runDir` or a `runContext` (see `docs/durability.md`). Exactly what the file
|
|
11957
|
+
* context sets automatically: load the prior tree for `runId` before starting fresh, refuse a
|
|
11958
|
+
* reused id without it. Ignored when `runDir` is also set — the file context owns the flag. */
|
|
11959
|
+
readonly resume?: boolean;
|
|
12142
11960
|
/**
|
|
12143
|
-
*
|
|
12144
|
-
*
|
|
12145
|
-
* the
|
|
12146
|
-
*
|
|
11961
|
+
* The segment this entry runs the root in. A run keeps one id for its whole life: a turn that
|
|
11962
|
+
* ends, a lost stream and a dead supervisor are boundaries between entries, and a resume may move
|
|
11963
|
+
* the root to another model, provider, reasoning effort or harness, or onto another stack, as a
|
|
11964
|
+
* new segment of the same run. `profile` stays the root profile the run recorded, so its identity,
|
|
11965
|
+
* coordination owner and settled children resume unchanged; the root executes that profile with
|
|
11966
|
+
* `model.provider`, `model.default`, `model.reasoningEffort` and `harness` replaced where given. `stack` names the
|
|
11967
|
+
* package versions the caller runs this entry under, its Runtime among them; Runtime records it
|
|
11968
|
+
* and never reads it. When the segment differs from the one the run last ran, the journal gains
|
|
11969
|
+
* one `root-segment` record with the time and `reason`. A different task, or any other profile
|
|
11970
|
+
* change, is still a resume identity mismatch: that is a new run. A fresh run records its first
|
|
11971
|
+
* segment and refuses a model or harness change: a new run takes them from its profile.
|
|
11972
|
+
*
|
|
11973
|
+
* A harness change starts a new native session: a session of one harness cannot continue in
|
|
11974
|
+
* another. The root re-enters with its objective and the run's state, in a workspace restored
|
|
11975
|
+
* from its latest checkpoint when the provider holds one.
|
|
12147
11976
|
*/
|
|
12148
|
-
readonly
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
declare const RUN_FORK_CORRELATION_KEYS: readonly ["forkParentRunId", "forkParentSettleDigest", "forkProfileDiffId", "lineageRootRunId"];
|
|
12156
|
-
/** A flow node's usable settle matched no routes edge leaving it (`unrouted`), or a fired edge named
|
|
12157
|
-
* a node that still had a running worker (`target-live`). The flow spawned nothing more; the full
|
|
12158
|
-
* evidence rides on the error, shaped like `GraphEdgeCapError`. */
|
|
12159
|
-
declare class GraphRouteError extends Error {
|
|
12160
|
-
readonly reason: 'unrouted' | 'target-live';
|
|
12161
|
-
readonly node: NodeId;
|
|
12162
|
-
readonly workerId: string;
|
|
12163
|
-
readonly ledger: ReadonlyArray<EdgeTraversal>;
|
|
12164
|
-
readonly result: SupervisedResult<unknown>;
|
|
12165
|
-
constructor(unrouted: {
|
|
12166
|
-
readonly reason: 'unrouted' | 'target-live';
|
|
12167
|
-
readonly node: NodeId;
|
|
12168
|
-
readonly workerId: string;
|
|
12169
|
-
readonly detail: string;
|
|
12170
|
-
}, ledger: ReadonlyArray<EdgeTraversal>, result: SupervisedResult<unknown>);
|
|
12171
|
-
}
|
|
12172
|
-
/** Default per-edge traversal cap — the cyclic-graph backstop when an edge names none. */
|
|
12173
|
-
declare const defaultEdgeTraversalCap = 32;
|
|
12174
|
-
/** An environment-owned check command, run outside the agent's conversation. */
|
|
12175
|
-
interface GraphCommandCheck {
|
|
12176
|
-
readonly command: string;
|
|
12177
|
-
readonly timeoutMs?: number;
|
|
12178
|
-
}
|
|
12179
|
-
interface GraphFromStoredOptions {
|
|
12180
|
-
readonly trigger?: Readonly<Record<string, unknown>>;
|
|
12181
|
-
readonly checks?: Readonly<Record<string, AgentGraph['deliverable']['check'] | GraphCommandCheck>>;
|
|
12182
|
-
}
|
|
12183
|
-
/** A graph node: an id and a canonical `AgentProfile`. The profile is the ONLY way a node is
|
|
12184
|
-
* described — its `prompt.systemPrompt` is the standing role (the 0.117 canonical resolution;
|
|
12185
|
-
* never a legacy top-level-only reduction), its tools/mcp/resources are its capabilities. */
|
|
12186
|
-
interface GraphNode {
|
|
12187
|
-
readonly id: NodeId;
|
|
12188
|
-
readonly profile: AgentProfile;
|
|
12189
|
-
}
|
|
12190
|
-
type GraphEdge =
|
|
12191
|
-
/** Work flows down. The delegation directive is DATA → versionable, sweepable, optimizable.
|
|
12192
|
-
* Each spawn of `to` by `from` — and each mid-run steer from `from` to a live `to` worker —
|
|
12193
|
-
* is one traversal. */
|
|
12194
|
-
{
|
|
12195
|
-
readonly kind: 'delegates';
|
|
12196
|
-
readonly from: NodeId;
|
|
12197
|
-
readonly to: NodeId;
|
|
12198
|
-
readonly directive: PromptHandle;
|
|
12199
|
-
/** Cyclic-graph backstop: traversals beyond this REFUSE (fail loud). Default
|
|
12200
|
-
* {@link defaultEdgeTraversalCap}. */
|
|
12201
|
-
readonly maxTraversals?: number;
|
|
12202
|
-
/** Default continuity for this edge's SPAWN traversals. `'resume'` makes every spawn after
|
|
12203
|
-
* the node's first re-attach to its most recent SETTLED worker: a NEW live worker whose
|
|
12204
|
-
* spawn context carries `resume: { ofWorker, sequence }` for the executor seam, spending
|
|
12205
|
-
* from the same conserved pool — the node's first spawn is effectively `'fresh'`, and a
|
|
12206
|
-
* spawn while a prior worker is still live refuses loudly (steer is the live channel).
|
|
12207
|
-
* The driver's per-call `spawn_worker` `continuity` argument overrides either way. Omit =
|
|
12208
|
-
* `'fresh'` (today's behavior, byte-identical). Caps count resumes exactly like fresh
|
|
12209
|
-
* spawns. */
|
|
12210
|
-
readonly continuity?: ContinuityMode;
|
|
12211
|
-
} |
|
|
12212
|
-
/** Findings flow anywhere: an analyst over N nodes' settled traces, delivered to ONE node.
|
|
12213
|
-
* With a LENS analyst the directive wraps the findings for the recipient; with a NODE analyst
|
|
12214
|
-
* the directive is the analyst agent's task and the findings are its settle output. */
|
|
12215
|
-
{
|
|
12216
|
-
readonly kind: 'analyzes';
|
|
12217
|
-
/** The analyst REFERENCE, in one of two forms: a lens id resolved against
|
|
12218
|
-
* `RunGraphOptions.analysts` (environment), or the id of a graph NODE with no delegates
|
|
12219
|
-
* edge pointing at it — then each matching settle spawns that node's pinned profile as a
|
|
12220
|
-
* tool-equipped analyst WORKER (same spawn machinery, conserved budget, trace join) whose
|
|
12221
|
-
* task is this edge's directive plus the settled worker's trace evidence and whose settle
|
|
12222
|
-
* output is the findings. An id that is both a node and a registry lens is refused. */
|
|
12223
|
-
readonly analyst: string;
|
|
12224
|
-
readonly over: ReadonlyArray<NodeId>;
|
|
12225
|
-
readonly to: NodeId;
|
|
12226
|
-
readonly directive: PromptHandle;
|
|
12227
|
-
/** Observability cap: traversals beyond this are LEDGERED as exhausted (`unpropagated`).
|
|
12228
|
-
* Only delegates caps refuse traversal — they are what close the spawn cycle. */
|
|
12229
|
-
readonly maxTraversals?: number;
|
|
12230
|
-
} |
|
|
12231
|
-
/**
|
|
12232
|
-
* Fan-out over a list that exists only at run time, then one join. When `from` settles `done`,
|
|
12233
|
-
* the array at `pointer` in its result is expanded: each element becomes the TASK of one item
|
|
12234
|
-
* run, at most `concurrency` at a time, and once every item settled the `join` node runs with
|
|
12235
|
-
* `{ map, source, items, results: [{ index, item, result }], failures: [{ index, item, outcome,
|
|
12236
|
-
* reason }] }`, results in item order. The runtime spawns the items and the join (`from`'s
|
|
12237
|
-
* driver spends no turn on them) through the same authorized spawn path a delegates spawn
|
|
12238
|
-
* takes: each item reserves its budget from the one conserved pool and is pinned to the edge's
|
|
12239
|
-
* profile, so an item's content can never choose what runs.
|
|
12240
|
-
*
|
|
12241
|
-
* An item is either the node `to` (its pinned profile plus this edge's directive) or the nested
|
|
12242
|
-
* `graph`, started per item exactly as `run_graph` starts a graph. Refusals are loud and
|
|
12243
|
-
* ledgered, and the driver is woken with them: a pointer that does not resolve to an array, more
|
|
12244
|
-
* elements than `maxItems`, or a `concurrency` the run's worker-slot bound can never honor.
|
|
12245
|
-
* `concurrency` otherwise THROTTLES (items wait for a free place); it never refuses an item.
|
|
12246
|
-
*
|
|
12247
|
-
* An edge rather than a node-level spec, because every kernel invariant a map must keep already
|
|
12248
|
-
* attaches to edge traversal: pinning admits only the edge's item and join nodes (the spawn
|
|
12249
|
-
* context carries a runtime-authored `map` marker), each item is admitted like a spawn and
|
|
12250
|
-
* reserves from the conserved pool, each item settles under its own deliverable check, and each
|
|
12251
|
-
* expansion, item and join is a ledger row with its journal twin. Topology stays static; only the
|
|
12252
|
-
* traversal count is dynamic, so validation and the one-node-one-profile rule are unchanged.
|
|
12253
|
-
*/
|
|
12254
|
-
{
|
|
12255
|
-
readonly kind: 'maps';
|
|
12256
|
-
/** The source node: a delegates target, or the join of another maps edge. Each of its `done`
|
|
12257
|
-
* settles expands the map once. */
|
|
12258
|
-
readonly from: NodeId;
|
|
12259
|
-
/** RFC 6901 JSON pointer into `from`'s settled result (`''` is the whole result). */
|
|
12260
|
-
readonly pointer: string;
|
|
12261
|
-
/** The item node, run once per element with the element as its task. Exactly one of `to`
|
|
12262
|
-
* and `graph`. Reachable only through this edge: never a delegates target. */
|
|
12263
|
-
readonly to?: NodeId;
|
|
12264
|
-
/** A graph run per element as one subtask, through the `run_graph` path. */
|
|
12265
|
-
readonly graph?: GraphTopology;
|
|
12266
|
-
/** Receives the ordered results once every item settled. Reachable only through this edge. */
|
|
12267
|
-
readonly join: NodeId;
|
|
12268
|
-
/** The item directive, appended to the item node's instructions per traversal. */
|
|
12269
|
-
readonly directive: PromptHandle;
|
|
12270
|
-
/** Lists longer than this are refused before any item runs. */
|
|
12271
|
-
readonly maxItems: number;
|
|
12272
|
-
/** How many items run at once. */
|
|
12273
|
-
readonly concurrency: number;
|
|
12274
|
-
readonly onItemFailure: MapItemFailurePolicy;
|
|
12275
|
-
/** Each item's budget, merged over the per-worker default as `spawn_worker`'s `budget` is. */
|
|
12276
|
-
readonly itemBudget?: Partial<Budget>;
|
|
12277
|
-
} |
|
|
12278
|
-
/**
|
|
12279
|
-
* A route in a flow graph (one with `entry`): Runtime traverses it when `from` settles, so no
|
|
12280
|
-
* root decides the order, the branch, the repair loop or the stop. On each usable settle of
|
|
12281
|
-
* `from` its outgoing routes edges are tried in declaration order and the first whose `when`
|
|
12282
|
-
* holds fires; an edge without `when` is the default branch and comes last. A node target is
|
|
12283
|
-
* spawned with `{ from: { node, result }, evidence: { [id]: latest usable result } }` (a join's
|
|
12284
|
-
* target with `{ from: { nodes }, evidence }`, see below) and the directive appended to its pinned instructions; `{ stop }` ends the run with no winner and
|
|
12285
|
-
* `GraphResult.stopped`; `{ finish }` makes this settle part of the run's output.
|
|
12286
|
-
*
|
|
12287
|
-
* A fork lists two or more nodes in `to`: one traversal spawns each of them at once, each under
|
|
12288
|
-
* its own key `route:<edge id>#<traversal>:<node>`. A join lists two or more nodes in `from`: it
|
|
12289
|
-
* fires once every member has settled usably since it last fired, and the target's task is
|
|
12290
|
-
* `{ from: { nodes: <members in declared order> }, evidence }` with each member's latest result
|
|
12291
|
-
* in `evidence`, so it does not depend on which member settled last and a resumed run derives the
|
|
12292
|
-
* same task. A routes edge that spawns a node with a settled worker in this flow (a back edge)
|
|
12293
|
-
* names that node's latest settled worker as the spawn's `successorOf`. A join carries no `when`, and it is the only routes edge
|
|
12294
|
-
* leaving each of its members. A route into a node that still has a running worker throws
|
|
12295
|
-
* {@link GraphRouteError} with reason `target-live`: converging branches use a join.
|
|
12296
|
-
*/
|
|
12297
|
-
{
|
|
12298
|
-
readonly kind: 'routes';
|
|
12299
|
-
readonly from: NodeId | ReadonlyArray<NodeId>;
|
|
12300
|
-
readonly to: NodeId | ReadonlyArray<NodeId> | {
|
|
12301
|
-
readonly stop: string;
|
|
12302
|
-
} | {
|
|
12303
|
-
readonly finish: string;
|
|
11977
|
+
readonly segment?: {
|
|
11978
|
+
readonly provider?: string;
|
|
11979
|
+
readonly model?: string;
|
|
11980
|
+
readonly reasoningEffort?: ReasoningEffort;
|
|
11981
|
+
readonly harness?: AgentProfile['harness'];
|
|
11982
|
+
readonly stack?: Readonly<Record<string, string>>;
|
|
11983
|
+
readonly reason: string;
|
|
12304
11984
|
};
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
|
|
12311
|
-
|
|
12312
|
-
*
|
|
12313
|
-
*
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
*
|
|
12317
|
-
|
|
12318
|
-
|
|
12319
|
-
|
|
12320
|
-
|
|
12321
|
-
|
|
12322
|
-
|
|
12323
|
-
|
|
12324
|
-
|
|
12325
|
-
|
|
12326
|
-
|
|
12327
|
-
|
|
12328
|
-
readonly
|
|
12329
|
-
|
|
12330
|
-
interface AgentGraph {
|
|
12331
|
-
/** Preserve fully bound literal data when serializing a hydrated graph. */
|
|
12332
|
-
readonly triggerBindings?: readonly [];
|
|
12333
|
-
readonly nodes: ReadonlyArray<GraphNode>;
|
|
12334
|
-
readonly edges: ReadonlyArray<GraphEdge>;
|
|
12335
|
-
/** Termination is mandatory, not optional: the independent completion oracle. */
|
|
12336
|
-
readonly deliverable: DeliverableSpec<unknown> & {
|
|
12337
|
-
readonly checkRef?: string;
|
|
12338
|
-
readonly command?: GraphCommandCheck;
|
|
12339
|
-
readonly when?: RouteWhen;
|
|
11985
|
+
/** Durable steer directory when it differs from the run-control directory. */
|
|
11986
|
+
readonly steerDir?: string;
|
|
11987
|
+
/** Override the spawn journal directly (advanced; `runDir` is the ordinary durable path). Pair
|
|
11988
|
+
* with `blobs` — a journal whose result payloads live in a different store cannot replay. */
|
|
11989
|
+
readonly journal?: SpawnJournal;
|
|
11990
|
+
/**
|
|
11991
|
+
* PROGRESS-derived stop rule (BOTH arms). Ends a run that has stopped LEARNING before it
|
|
11992
|
+
* exhausts a ceiling — the answer to "a run should end because it is done or stuck, not because
|
|
11993
|
+
* it ran out". It composes with the budget guards and can never override one.
|
|
11994
|
+
*
|
|
11995
|
+
* The evaluation boundary differs by arm because the loop does: a router-brained supervisor is
|
|
11996
|
+
* evaluated before each of its own inference turns; a harness-brained supervisor is evaluated on
|
|
11997
|
+
* each worker settle, and a stop aborts its stop signal so the harness ends at its next turn
|
|
11998
|
+
* boundary. Both arms fold the same settled ledger through the same evaluator.
|
|
11999
|
+
*
|
|
12000
|
+
* Build it from `supervise/stop-rules`: `plateau({window, minDelta})`,
|
|
12001
|
+
* `noProgressFor({ms, settles})`, `allWorkersStalled({...})`, combined with `anyOf`/`allOf`. The
|
|
12002
|
+
* thresholds are policy and stay with you; the enforcement lives in the runtime. Omit = ceilings
|
|
12003
|
+
* only (unchanged behavior).
|
|
12004
|
+
*
|
|
12005
|
+
* A record may declare the plateau rule as data, `{ plateau: { window, minDelta } }`, so no
|
|
12006
|
+
* product module builds it.
|
|
12007
|
+
*/
|
|
12008
|
+
readonly stopRule?: StopRule | {
|
|
12009
|
+
readonly plateau: PlateauOptions;
|
|
12340
12010
|
};
|
|
12341
|
-
/** One
|
|
12011
|
+
/** One-shot notification of WHY a `stopRule` ended the run (BOTH arms) — so a caller records the
|
|
12012
|
+
* reason instead of inferring an early stop from an unexhausted budget. */
|
|
12013
|
+
readonly onProgressStop?: (reason: string) => void;
|
|
12014
|
+
/** Recursion ceiling for the tree (root = 0). The conserved pool is what bounds depth, since each
|
|
12015
|
+
* level's slice comes out of the level above; this only stops a runaway recursion. Omit =
|
|
12016
|
+
* `DEFAULT_MAX_DEPTH` (16). */
|
|
12017
|
+
readonly maxDepth?: number;
|
|
12018
|
+
/** Turn cap for the supervisor's OWN loop (BOTH arms). Router arm: inference turns of the
|
|
12019
|
+
* driver's tool loop. Harness arm: turns the harness reports, counted off its `iteration`
|
|
12020
|
+
* stream — reaching the cap aborts the stop signal, so the harness ends at its next turn
|
|
12021
|
+
* boundary rather than mid-request. `0` lifts the cap on both arms and leaves the conserved
|
|
12022
|
+
* pool, the deadline, and abort as the bounds; a negative value is refused. Omit = the router
|
|
12023
|
+
* arm's default cap, and no turn cap on the harness arm. */
|
|
12024
|
+
readonly maxTurns?: number;
|
|
12025
|
+
/** Give the supervisor brain a chapter-lifecycle on its OWN context window (ROUTER ARM ONLY —
|
|
12026
|
+
* a harness owns its own context window and its own compaction, so this is refused for a
|
|
12027
|
+
* harness-brained supervisor rather than silently ignored): once its coordination transcript
|
|
12028
|
+
* exceeds `thresholdTokens` it distills to a compact progress note and continues, instead of
|
|
12029
|
+
* re-billing the whole transcript every turn (the cost that makes the LLM-brain front door lose
|
|
12030
|
+
* to a dumb-Ralph respawn). The live `Scope` roster is the durable state across chapters.
|
|
12031
|
+
* Default off. `distill` defaults to a brain self-summary + the settled-worker roster. */
|
|
12032
|
+
readonly compaction?: ToolLoopCompactionOptions;
|
|
12033
|
+
readonly runId?: string;
|
|
12034
|
+
readonly now?: () => number;
|
|
12035
|
+
/** Restrict the run to this subset of models. When set, every configured model — the
|
|
12036
|
+
* supervisor router model, the profile's model, and the backend's model — must be a member,
|
|
12037
|
+
* or `supervise()` throws a `ConfigError` before any compute is spent. Unset = unrestricted.
|
|
12038
|
+
*
|
|
12039
|
+
* This is a MODEL-ID filter, not a route filter. The compared values are the bare ids a profile
|
|
12040
|
+
* declares — `model.default`, `model.small`, `subagents[].model`, `modes[].model`. The composed
|
|
12041
|
+
* wire id (`harness/provider/model`) is never built here and never compared, so an entry written
|
|
12042
|
+
* in qualified form matches nothing, and a child that names an allowed id is admitted whatever
|
|
12043
|
+
* harness and provider its own profile declares. Pin the route with `authorizeSpawn`: it reads
|
|
12044
|
+
* the authored child profile and may refuse the spawn before any reservation. */
|
|
12045
|
+
readonly allowedModels?: readonly string[];
|
|
12046
|
+
/** How the settled-worker ledger becomes the run's output. Default `bestDelivered` — the single
|
|
12047
|
+
* highest-scoring DELIVERED child (the exact behavior every existing caller had). Alternatives:
|
|
12048
|
+
* `collectDelivered` (every verified distinct output with provenance — a Pareto set / recorded
|
|
12049
|
+
* disagreement) or a custom `SupervisorFinalizer`. Whatever the finalizer, it operates on
|
|
12050
|
+
* structurally DELIVERED outputs only — an undelivered or invalid child stays ineligible. A
|
|
12051
|
+
* `string` names an entry in `registry.finalizers`. */
|
|
12052
|
+
readonly finalizer?: SupervisorFinalizer | string;
|
|
12053
|
+
/** Lifecycle observers for the whole recursive tree (`Scope` re-seeds them into every nested
|
|
12054
|
+
* scope). Composed with the `otel` recorder below when both are set. Omit = no observers, which
|
|
12055
|
+
* is the behavior every existing caller has. */
|
|
12056
|
+
readonly hooks?: RuntimeHooks;
|
|
12057
|
+
/**
|
|
12058
|
+
* OPT-IN OTLP tracing: emit one span per supervised node (opened at spawn, closed at settle,
|
|
12059
|
+
* parented to its parent node's span) plus an `LLM` child span per metered driver turn, so the
|
|
12060
|
+
* tree is readable by any trace viewer instead of only by a journal parser. See `otel-spans.ts`.
|
|
12061
|
+
*
|
|
12062
|
+
* Omit and the run emits nothing, allocates no recorder, and installs no hook — telemetry is
|
|
12063
|
+
* never a default. Present with no reachable endpoint (no `exportConfig.endpoint` and no
|
|
12064
|
+
* `OTEL_EXPORTER_OTLP_ENDPOINT`) is also a no-op. The spawn journal is untouched either way:
|
|
12065
|
+
* spans are telemetry, never the replay/resume record.
|
|
12066
|
+
*/
|
|
12067
|
+
readonly otel?: Omit<SupervisorSpanOptions, 'runId' | 'now' | 'namespace'>;
|
|
12068
|
+
}
|
|
12069
|
+
/** The product-authorized result for one complete spawn request. Attribution is never accepted
|
|
12070
|
+
* from the manager itself; it enters only through this trusted callback. */
|
|
12071
|
+
interface AuthorizedSpawn {
|
|
12072
|
+
readonly profile: AgentProfile;
|
|
12073
|
+
readonly execution?: AgentExecutionRef;
|
|
12074
|
+
}
|
|
12075
|
+
/** Exact trusted context after a manager-authored spawn has passed product authorization. */
|
|
12076
|
+
interface AuthorizedSpawnContext {
|
|
12077
|
+
readonly profile: AgentProfile;
|
|
12078
|
+
readonly parent: AgentProfile;
|
|
12079
|
+
readonly parentIdentity: NodeExecutionIdentity;
|
|
12080
|
+
readonly execution: NodeExecutionIdentity;
|
|
12081
|
+
readonly parentNodeId: string;
|
|
12082
|
+
readonly assignmentId: string;
|
|
12083
|
+
readonly task: unknown;
|
|
12342
12084
|
readonly budget: Budget;
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
|
|
12346
|
-
* judged by `deliverable`. A stored route check (`checkRef: 'route'`) may also name a
|
|
12347
|
-
* non-terminal node: its condition reads that node's latest delivered output, while the output
|
|
12348
|
-
* stays terminal-only. */
|
|
12349
|
-
readonly entry?: ReadonlyArray<{
|
|
12350
|
-
readonly node: NodeId;
|
|
12351
|
-
readonly task: unknown;
|
|
12352
|
-
}>;
|
|
12353
|
-
/** Flow-graph vertices that are not agents: a routes edge into one awaits
|
|
12354
|
-
* `RunGraphOptions.decideGate`, and one edge per choice leaves it, matching
|
|
12355
|
-
* `{ pointer: '/choice', equals: <choice> }`. A `finish` leaving a gate outputs
|
|
12356
|
-
* `{ [gate]: { choice, by } }`. */
|
|
12357
|
-
readonly gates?: ReadonlyArray<RouteGate>;
|
|
12085
|
+
readonly label: string;
|
|
12086
|
+
readonly key?: string;
|
|
12087
|
+
readonly depth: number;
|
|
12358
12088
|
}
|
|
12359
|
-
/**
|
|
12360
|
-
|
|
12361
|
-
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
|
|
12384
|
-
|
|
12385
|
-
|
|
12386
|
-
|
|
12387
|
-
|
|
12388
|
-
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12089
|
+
/** Exact trusted context for selecting one backend-derived leaf's completion check. */
|
|
12090
|
+
type DeliverableResolutionInput = AuthorizedSpawnContext;
|
|
12091
|
+
/** Test-only one-call shape, exported only through the package's explicit `/testing` entry. */
|
|
12092
|
+
interface SuperviseTestOptions extends SuperviseOptions {
|
|
12093
|
+
readonly brain: ToolLoopChat;
|
|
12094
|
+
}
|
|
12095
|
+
/**
|
|
12096
|
+
* Build the worker seam from a backend (WHERE workers run) + an optional completion oracle (the
|
|
12097
|
+
* deliverable check that makes "settled ⟺ delivered" true — the guard against "ran but didn't
|
|
12098
|
+
* deliver"). The ONE place a backend becomes a spawnable worker.
|
|
12099
|
+
*
|
|
12100
|
+
* `seams` exists because this path builds the leaf executor EAGERLY and hands it back as a BYO
|
|
12101
|
+
* `executorSpec.executor`. The registry resolves a BYO executor without ever consulting the
|
|
12102
|
+
* per-child `ExecutorContext` the `Scope` seeds, so anything the scope would have supplied is
|
|
12103
|
+
* invisible here and has to be passed in. It is a FUNCTION because it is resolved once per worker
|
|
12104
|
+
* construction, so a caller may hand back something the run only learns later — which is exactly how
|
|
12105
|
+
* `supervise()` gives a traced run's workers their trace context without ordering the span recorder
|
|
12106
|
+
* ahead of the worker seam.
|
|
12107
|
+
*
|
|
12108
|
+
* Continuity: the `bridge` backend honors `continuity: 'resume'` by session re-attachment. A
|
|
12109
|
+
* bridge session id IS the harness conversation key (cli-bridge maps it to the CLI's own resume —
|
|
12110
|
+
* opencode `-s <id>`, claude `--resume`), so this seam records the session id each supervised
|
|
12111
|
+
* spawn was bound to, keyed by the worker id the Scope assigned, and a resume spawn binds the
|
|
12112
|
+
* prior worker's recorded session id instead of deriving a fresh one. The record is process-local
|
|
12113
|
+
* by construction, which matches the kernel's resume boundary (a prior process's workers are not
|
|
12114
|
+
* resume targets). Every other backend keeps failing loud: their executors have no re-attachable
|
|
12115
|
+
* session, and accepting the spawn would ledger `continuity: 'resume'` over a brand-new session —
|
|
12116
|
+
* a stamp asserting something that never happened.
|
|
12117
|
+
*/
|
|
12118
|
+
declare function workerFromBackend(backend: ExecutorConfig, deliverable?: DeliverableSpec<unknown>, seams?: () => Readonly<Record<string, unknown>>): MakeWorkerAgent;
|
|
12119
|
+
/** Capabilities a data-only consumer may require before building an opted-in run. `graphTools`:
|
|
12120
|
+
* a manager whose profile grants `run_graph` can start an agent graph as one subtask. */
|
|
12121
|
+
declare const superviseFleetCapabilities: Readonly<{
|
|
12122
|
+
peerAudit: true;
|
|
12123
|
+
traceTools: true;
|
|
12124
|
+
graphTools: true;
|
|
12125
|
+
}>;
|
|
12126
|
+
/** One-call supervisor: build + run a supervisor from its exact profile. @stable */
|
|
12127
|
+
declare function supervise(profile: SupervisorProfile, task: unknown, opts: SuperviseOptions): Promise<{
|
|
12128
|
+
execution?: AgentExecutionRef;
|
|
12129
|
+
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12130
|
+
kind: "no-winner";
|
|
12131
|
+
tree: TreeView;
|
|
12132
|
+
downCount: number;
|
|
12133
|
+
spentTotal: Spend;
|
|
12134
|
+
usage?: SettledUsage;
|
|
12135
|
+
rootStream?: RootStreamReceipt;
|
|
12136
|
+
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12137
|
+
continuation?: DriverContinuationRecord;
|
|
12138
|
+
providerModel?: ProviderModelExecutionEvidence;
|
|
12139
|
+
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12140
|
+
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
12141
|
+
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12142
|
+
fleetYield: FleetYield;
|
|
12143
|
+
error?: never;
|
|
12144
|
+
reason: "all-children-down" | "no-children-spawned" | "no-result-selected" | "stopped" | "budget-exhausted" | "deadline" | "aborted";
|
|
12145
|
+
} | {
|
|
12146
|
+
execution?: AgentExecutionRef;
|
|
12147
|
+
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12148
|
+
kind: "no-winner";
|
|
12149
|
+
tree: TreeView;
|
|
12150
|
+
downCount: number;
|
|
12151
|
+
spentTotal: Spend;
|
|
12152
|
+
usage?: SettledUsage;
|
|
12153
|
+
rootStream?: RootStreamReceipt;
|
|
12154
|
+
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12155
|
+
continuation?: DriverContinuationRecord;
|
|
12156
|
+
providerModel?: ProviderModelExecutionEvidence;
|
|
12157
|
+
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12158
|
+
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
12159
|
+
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12160
|
+
fleetYield: FleetYield;
|
|
12161
|
+
error?: never;
|
|
12162
|
+
reason: "cancelled";
|
|
12163
|
+
source: string;
|
|
12164
|
+
cancellationReason: string;
|
|
12165
|
+
operationId?: string;
|
|
12166
|
+
operator?: string;
|
|
12167
|
+
} | {
|
|
12168
|
+
execution?: AgentExecutionRef;
|
|
12169
|
+
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12170
|
+
kind: "no-winner";
|
|
12171
|
+
reason: "driver-failed";
|
|
12172
|
+
tree: TreeView;
|
|
12173
|
+
downCount: number;
|
|
12174
|
+
spentTotal: Spend;
|
|
12175
|
+
usage?: SettledUsage;
|
|
12176
|
+
rootStream?: RootStreamReceipt;
|
|
12177
|
+
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12178
|
+
continuation?: DriverContinuationRecord;
|
|
12179
|
+
providerModel?: ProviderModelExecutionEvidence;
|
|
12180
|
+
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12181
|
+
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
12182
|
+
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12183
|
+
fleetYield: FleetYield;
|
|
12184
|
+
error: NoWinnerError;
|
|
12185
|
+
} | {
|
|
12186
|
+
execution?: AgentExecutionRef;
|
|
12187
|
+
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12188
|
+
kind: "winner";
|
|
12189
|
+
out: unknown;
|
|
12190
|
+
outRef: string;
|
|
12191
|
+
verdict?: import("@tangle-network/agent-eval").DefaultVerdict;
|
|
12192
|
+
tree: TreeView;
|
|
12193
|
+
spentTotal: Spend;
|
|
12194
|
+
usage?: SettledUsage;
|
|
12195
|
+
rootStream?: RootStreamReceipt;
|
|
12196
|
+
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12197
|
+
continuation?: DriverContinuationRecord;
|
|
12198
|
+
providerModel?: ProviderModelExecutionEvidence;
|
|
12199
|
+
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12200
|
+
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12201
|
+
fleetYield: FleetYield;
|
|
12202
|
+
spentBreakdown?: {
|
|
12203
|
+
driverInference: Spend;
|
|
12204
|
+
childWork: Spend;
|
|
12393
12205
|
};
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
|
|
12399
|
-
|
|
12400
|
-
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12206
|
+
}>;
|
|
12207
|
+
/** Deterministic scripted-brain path for tests. Not exported from Runtime's main entry. */
|
|
12208
|
+
declare function superviseWithTestBrain(profile: SupervisorProfile, task: unknown, opts: SuperviseTestOptions): Promise<{
|
|
12209
|
+
execution?: AgentExecutionRef;
|
|
12210
|
+
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12211
|
+
kind: "no-winner";
|
|
12212
|
+
tree: TreeView;
|
|
12213
|
+
downCount: number;
|
|
12214
|
+
spentTotal: Spend;
|
|
12215
|
+
usage?: SettledUsage;
|
|
12216
|
+
rootStream?: RootStreamReceipt;
|
|
12217
|
+
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12218
|
+
continuation?: DriverContinuationRecord;
|
|
12219
|
+
providerModel?: ProviderModelExecutionEvidence;
|
|
12220
|
+
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12221
|
+
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
12222
|
+
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12223
|
+
fleetYield: FleetYield;
|
|
12224
|
+
error?: never;
|
|
12225
|
+
reason: "all-children-down" | "no-children-spawned" | "no-result-selected" | "stopped" | "budget-exhausted" | "deadline" | "aborted";
|
|
12226
|
+
} | {
|
|
12227
|
+
execution?: AgentExecutionRef;
|
|
12228
|
+
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12229
|
+
kind: "no-winner";
|
|
12230
|
+
tree: TreeView;
|
|
12231
|
+
downCount: number;
|
|
12232
|
+
spentTotal: Spend;
|
|
12233
|
+
usage?: SettledUsage;
|
|
12234
|
+
rootStream?: RootStreamReceipt;
|
|
12235
|
+
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12236
|
+
continuation?: DriverContinuationRecord;
|
|
12237
|
+
providerModel?: ProviderModelExecutionEvidence;
|
|
12238
|
+
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12239
|
+
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
12240
|
+
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12241
|
+
fleetYield: FleetYield;
|
|
12242
|
+
error?: never;
|
|
12243
|
+
reason: "cancelled";
|
|
12244
|
+
source: string;
|
|
12245
|
+
cancellationReason: string;
|
|
12246
|
+
operationId?: string;
|
|
12247
|
+
operator?: string;
|
|
12248
|
+
} | {
|
|
12249
|
+
execution?: AgentExecutionRef;
|
|
12250
|
+
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12251
|
+
kind: "no-winner";
|
|
12252
|
+
reason: "driver-failed";
|
|
12253
|
+
tree: TreeView;
|
|
12254
|
+
downCount: number;
|
|
12255
|
+
spentTotal: Spend;
|
|
12256
|
+
usage?: SettledUsage;
|
|
12257
|
+
rootStream?: RootStreamReceipt;
|
|
12258
|
+
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12259
|
+
continuation?: DriverContinuationRecord;
|
|
12260
|
+
providerModel?: ProviderModelExecutionEvidence;
|
|
12261
|
+
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12262
|
+
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
12263
|
+
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12264
|
+
fleetYield: FleetYield;
|
|
12265
|
+
error: NoWinnerError;
|
|
12266
|
+
} | {
|
|
12267
|
+
execution?: AgentExecutionRef;
|
|
12268
|
+
rootProviderModel: ProviderModelExecutionEvidence;
|
|
12269
|
+
kind: "winner";
|
|
12270
|
+
out: unknown;
|
|
12271
|
+
outRef: string;
|
|
12272
|
+
verdict?: import("@tangle-network/agent-eval").DefaultVerdict;
|
|
12273
|
+
tree: TreeView;
|
|
12274
|
+
spentTotal: Spend;
|
|
12275
|
+
usage?: SettledUsage;
|
|
12276
|
+
rootStream?: RootStreamReceipt;
|
|
12277
|
+
rootHarnessTranscript?: HarnessTranscriptEvidence;
|
|
12278
|
+
continuation?: DriverContinuationRecord;
|
|
12279
|
+
providerModel?: ProviderModelExecutionEvidence;
|
|
12280
|
+
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
12281
|
+
spendGaps?: ReadonlyArray<SpendGap>;
|
|
12282
|
+
fleetYield: FleetYield;
|
|
12283
|
+
spentBreakdown?: {
|
|
12284
|
+
driverInference: Spend;
|
|
12285
|
+
childWork: Spend;
|
|
12286
|
+
};
|
|
12287
|
+
}>;
|
|
12417
12288
|
/**
|
|
12418
|
-
*
|
|
12289
|
+
* Start a run as a version of a settled run: the parent's recorded root inputs plus one change.
|
|
12419
12290
|
*
|
|
12420
|
-
*
|
|
12421
|
-
*
|
|
12422
|
-
*
|
|
12423
|
-
* documentation from `SuperviseOptions`, which is the one owner of both.
|
|
12291
|
+
* The call's `profile`, `task` and `budget` must be the parent's, byte for byte, as its sealed
|
|
12292
|
+
* journal records them. Runtime applies `change` to that profile and runs the result in a new
|
|
12293
|
+
* run directory. The parent directory is read and never written.
|
|
12424
12294
|
*/
|
|
12425
|
-
interface
|
|
12426
|
-
/**
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
*
|
|
12434
|
-
*
|
|
12435
|
-
*
|
|
12436
|
-
*
|
|
12437
|
-
|
|
12438
|
-
readonly
|
|
12439
|
-
/** Leaf-execution override (offline tests / advanced). `runGraph` still owns node pinning,
|
|
12440
|
-
* directive delivery, and the edge ledger AROUND this seam — only the leaf `act` is yours.
|
|
12441
|
-
* Slots INSIDE the kernel's authorized path (`SuperviseOptions.makeLeafAgent`), so a node that
|
|
12442
|
-
* declares the spawn tool still becomes a nested supervisor even under an offline leaf. */
|
|
12443
|
-
readonly makeLeafAgent?: MakeWorkerAgent;
|
|
12444
|
-
/** The ROOT driver's inference seam — a caller-owned `ToolLoopChat` that makes every root
|
|
12445
|
-
* model call. Use it when the root's decisions must be caller-owned orchestration (a
|
|
12446
|
-
* deterministic conversation driver, a persona loop with its own LLM calls) rather than a
|
|
12447
|
-
* router-derived model call. The graph machinery around the seam is unchanged: node pinning,
|
|
12448
|
-
* directive delivery, the edge ledger, and the journal twin all run the same shipped path,
|
|
12449
|
-
* and the root profile keeps prompt control (`prompt-control-execution` materialization —
|
|
12450
|
-
* `systemPrompt`/`instructions` still apply). What moves to the caller with the brain:
|
|
12451
|
-
* model selection and provider-identity validation (`expectedModel` cannot be enforced on a
|
|
12452
|
-
* call the runtime did not place) and per-turn usage reporting (a brain that reports no
|
|
12453
|
-
* usage meters nothing into the pool). Omit = the router brain derived from the root
|
|
12454
|
-
* profile — the unchanged default. Mutually exclusive with `driverBackend`, and refused
|
|
12455
|
-
* when the root profile declares an external harness (that root is driven BY the harness). */
|
|
12456
|
-
readonly brain?: ToolLoopChat;
|
|
12457
|
-
/** Caller-side runtime hooks (telemetry, policy, product extensions). Composed AFTER the
|
|
12458
|
-
* graph's own spawn-binding hook on the SAME event stream — the graph never swallows the
|
|
12459
|
-
* seam supervise() exposes. */
|
|
12460
|
-
readonly hooks?: RuntimeHooks;
|
|
12461
|
-
/** The analyst lens registry `analyzes` edges resolve against. ENVIRONMENT — needed only for
|
|
12462
|
-
* lens analysts; an analyzes edge naming a graph NODE as its analyst needs no registry. */
|
|
12463
|
-
readonly analysts?: AnalystRegistry$1;
|
|
12464
|
-
/** Answers a flow gate while the process holds the run; the wait counts against its deadline.
|
|
12465
|
-
* ENVIRONMENT, like `analysts`; required when the graph declares gates. */
|
|
12466
|
-
readonly decideGate?: (request: GateRequest) => Promise<GateDecision>;
|
|
12467
|
-
/** Directive registry. Default: the seeded kernel registry (`kernelPromptRegistry()`).
|
|
12468
|
-
*
|
|
12469
|
-
* NOT `SuperviseOptions.registry`, which is the `SuperviseRegistry` name→value table for
|
|
12470
|
-
* code-valued options. The two share a name and nothing else, and this one wins here — see
|
|
12471
|
-
* `GRAPH_REFUSED_SUPERVISE_OPTIONS`. */
|
|
12472
|
-
readonly registry?: PromptRegistry;
|
|
12473
|
-
/** The run journal the edge ledger and every spawn/settle ride. Default: in-memory. */
|
|
12474
|
-
readonly journal?: SpawnJournal;
|
|
12475
|
-
readonly blobs?: ResultBlobStore;
|
|
12476
|
-
readonly runId?: string;
|
|
12477
|
-
/** Product authority over every steer/answer instruction (the filter seam). `runGraph` observes
|
|
12478
|
-
* what it CHANGES: a narrowed instruction ledgers its steer traversal as `stripped`. */
|
|
12479
|
-
readonly authorizeMessage?: SuperviseOptions['authorizeMessage'];
|
|
12480
|
-
}
|
|
12481
|
-
interface GraphResult<Out = unknown> {
|
|
12482
|
-
readonly result: SupervisedResult<Out>;
|
|
12483
|
-
/** Every edge traversal, in occurrence order — the observable-edge contract. */
|
|
12484
|
-
readonly ledger: ReadonlyArray<EdgeTraversal>;
|
|
12485
|
-
/** Edge ids whose traversal cap was hit — analyzes exhaustion included (observable here, never
|
|
12486
|
-
* a refusal). A DELEGATES cap paired with a `no-winner` result THROWS
|
|
12487
|
-
* ({@link GraphEdgeCapError}) instead of returning: only delegates caps refuse spawns, so only
|
|
12488
|
-
* they can have ended the run. A LIFECYCLE no-winner (`aborted` / `budget-exhausted`) returns
|
|
12489
|
-
* normally even with an exhausted delegates cap — the abort or the pool, not the cap, ended
|
|
12490
|
-
* that run, and the exhaustion stays observable here. */
|
|
12491
|
-
readonly exhaustedEdges: ReadonlyArray<string>;
|
|
12492
|
-
readonly runId: string;
|
|
12493
|
-
/** Why a flow graph ended early: a `stop` edge fired (`edge` names it), or a flow node settled
|
|
12494
|
-
* down (no `edge`; `reason` is `down: <worker reason>`) or, where a route was needed, without a
|
|
12495
|
-
* usable result (no `edge`; `reason` is `unusable: <why>`). Live flow workers are aborted. */
|
|
12496
|
-
readonly stopped?: {
|
|
12497
|
-
readonly code?: string;
|
|
12498
|
-
readonly edge?: string;
|
|
12499
|
-
readonly at: NodeId;
|
|
12500
|
-
readonly workerId: string;
|
|
12501
|
-
readonly reason: string;
|
|
12502
|
-
};
|
|
12503
|
-
}
|
|
12504
|
-
/** `RunGraphOptions` with the brain REQUIRED — the shape the `/testing` entry's
|
|
12505
|
-
* `runGraphWithTestBrain` keeps accepting now that `brain` is a production option. */
|
|
12506
|
-
interface RunGraphTestOptions extends RunGraphOptions {
|
|
12507
|
-
readonly brain: ToolLoopChat;
|
|
12295
|
+
interface PursuitFork {
|
|
12296
|
+
/** The settled parent's run directory. */
|
|
12297
|
+
readonly runDir: string;
|
|
12298
|
+
/** The sha256 of the parent's `result.json` bytes: the sealed point the fork starts from. */
|
|
12299
|
+
readonly settleDigest: Sha256Digest;
|
|
12300
|
+
/** The one change, applied to the parent's root profile. Its `id` is recorded. */
|
|
12301
|
+
readonly change: AgentProfileDiff;
|
|
12302
|
+
/**
|
|
12303
|
+
* Fork a parent whose journal holds a node without a terminal record, an unbegun owned tree, an
|
|
12304
|
+
* unconfirmed teardown, or work in flight. Such a node may still act, and a fork never replays
|
|
12305
|
+
* the parent's children, so it can only duplicate work outside the fork's tree. The root then
|
|
12306
|
+
* records those node ids as `forkParentUncertainNodes`. Omit it to refuse such a parent.
|
|
12307
|
+
*/
|
|
12308
|
+
readonly acceptUncertain?: boolean;
|
|
12508
12309
|
}
|
|
12509
12310
|
/**
|
|
12510
|
-
*
|
|
12511
|
-
*
|
|
12512
|
-
*
|
|
12513
|
-
* (`spawn_worker` with `profile: { name: '<node id>' }`; the node's canonical profile is pinned by
|
|
12514
|
-
* the graph), each
|
|
12515
|
-
* delegates directive is appended to the worker profile's `prompt.instructions` per traversal,
|
|
12516
|
-
* and each analyzes edge becomes an analyst-on-settle route with a real DESTINATION. Every
|
|
12517
|
-
* traversal is ledgered and journaled.
|
|
12311
|
+
* The `execution.correlation` keys a fork records on its root. Runtime writes them; a caller that
|
|
12312
|
+
* supplies one is refused. `lineageRootRunId` is the first run of the chain of parents, so the
|
|
12313
|
+
* spend of every version of one lineage groups under one id.
|
|
12518
12314
|
*/
|
|
12519
|
-
declare
|
|
12520
|
-
/** Alias for graph tests written before `RunGraphOptions.brain` was production. The production
|
|
12521
|
-
* entry accepts the same shape; this wrapper only keeps the `/testing` import path working. */
|
|
12522
|
-
declare function runGraphWithTestBrain(graph: AgentGraph, opts: RunGraphTestOptions): Promise<GraphResult>;
|
|
12315
|
+
declare const RUN_FORK_CORRELATION_KEYS: readonly ["forkParentRunId", "forkParentSettleDigest", "forkProfileDiffId", "lineageRootRunId"];
|
|
12523
12316
|
type ObserverRecordKind = 'event' | 'decision';
|
|
12524
12317
|
/**
|
|
12525
12318
|
* One immutable record in the observer plane. `sequence` is journal order, not
|
|
@@ -13169,6 +12962,9 @@ interface IsolatedCheckBox {
|
|
|
13169
12962
|
};
|
|
13170
12963
|
/** `customerId` from `Sandbox.getIdentity()` for every Sandbox key the judged run holds. */
|
|
13171
12964
|
builderAccounts: readonly [string, ...string[]];
|
|
12965
|
+
/** The check is the run's own step in its owner's account (a graph check node), not a judge:
|
|
12966
|
+
* `builderAccounts` is not consulted, and the box keeps a durable home. */
|
|
12967
|
+
ownerStep?: true;
|
|
13172
12968
|
/** Sandbox environment or image that holds the check's toolchain. */
|
|
13173
12969
|
environment: string;
|
|
13174
12970
|
/** Set `memoryMB` to require the API to report a finite granted limit before upload. */
|
|
@@ -15391,11 +15187,14 @@ interface PrivateCasArtifactPort extends AgentCandidateOutputArtifactPort {
|
|
|
15391
15187
|
declare function createPrivateCasArtifactPort(root: string, namespace: string, options?: PrivateCasOptions): PrivateCasArtifactPort;
|
|
15392
15188
|
/** Profile-exact adapter for packages that consume agent-eval's ChatClient contract.
|
|
15393
15189
|
* Every call still enters Runtime through createExecutor -> streamAgentTurn, and every
|
|
15394
|
-
* behavioral field is checked against the exact AgentProfile before any transport runs.
|
|
15190
|
+
* behavioral field is checked against the exact AgentProfile before any transport runs.
|
|
15191
|
+
* Optional `headers` are forwarded on every Router request. Runtime's own content-type,
|
|
15192
|
+
* authorization, idempotency-key, and x-correlation-id keep precedence. */
|
|
15395
15193
|
declare function profileChatClient(args: {
|
|
15396
15194
|
profile: AgentProfile;
|
|
15397
15195
|
executor: ExecutorConfig;
|
|
15398
15196
|
context: string;
|
|
15197
|
+
headers?: Readonly<Record<string, string>>;
|
|
15399
15198
|
}): ChatClient;
|
|
15400
15199
|
/** Profile-exact adapter for agent-eval's external optimizer callback.
|
|
15401
15200
|
* Eval validates and freezes the provider-neutral request; Runtime owns the exact
|
|
@@ -15405,6 +15204,7 @@ declare function profileOptimizerModelCall(args: {
|
|
|
15405
15204
|
executor: ExecutorConfig;
|
|
15406
15205
|
context: string;
|
|
15407
15206
|
pricing?: CustomTokenPricing;
|
|
15207
|
+
headers?: Readonly<Record<string, string>>;
|
|
15408
15208
|
}): ExternalOptimizerModelCall;
|
|
15409
15209
|
interface ResolveSandboxClientOptions {
|
|
15410
15210
|
/** The execution transport for the driven loop. */
|
|
@@ -15472,48 +15272,11 @@ interface ClaimRetainedInteractiveControlOptions {
|
|
|
15472
15272
|
* @stable
|
|
15473
15273
|
*/
|
|
15474
15274
|
declare function claimRetainedInteractiveControl(options: ClaimRetainedInteractiveControlOptions): Promise<AgentInteractiveSessionControlClaim>;
|
|
15475
|
-
/**
|
|
15476
|
-
* Dispatch one detached, replayable run and return only after exact durable
|
|
15477
|
-
* coordinates are confirmed by the provider and persisted by the caller.
|
|
15478
|
-
*
|
|
15479
|
-
* The required `onAdmission` hook first records a digest-only intent before
|
|
15480
|
-
* creation or receipt-authorized attachment, then records recovery coordinates and the verified exact control
|
|
15481
|
-
* reference. The returned promise resolves only after the dispatched admission
|
|
15482
|
-
* is durable, so a crash cannot lose a successful start's exact reference.
|
|
15483
|
-
*
|
|
15484
|
-
* @stable
|
|
15485
|
-
*/
|
|
15275
|
+
/** Dispatch one replayable run. Intent is durable before create; the promise resolves after dispatch is durable. @stable */
|
|
15486
15276
|
declare function startRetainedRun(options: StartRetainedRunOptions): Promise<RetainedRunHandle>;
|
|
15487
|
-
/**
|
|
15488
|
-
* Dispatch a fresh retained session inside an existing provider environment.
|
|
15489
|
-
*
|
|
15490
|
-
* This operation reuses only the environment. It does not append to a prior
|
|
15491
|
-
* harness chat and does not claim native conversation continuity. The caller
|
|
15492
|
-
* must use `RetainedRunHandle.continueNative` for a verified same-chat turn.
|
|
15493
|
-
*
|
|
15494
|
-
* @stable
|
|
15495
|
-
*/
|
|
15277
|
+
/** Fresh session in an existing environment. A same-chat turn uses `continueNative`. @stable */
|
|
15496
15278
|
declare function startRetainedRunInEnvironment(options: StartRetainedRunInEnvironmentOptions): Promise<RetainedRunHandle>;
|
|
15497
|
-
/**
|
|
15498
|
-
* Rebuild the exact run named by a persisted pre-create intent or pre-dispatch
|
|
15499
|
-
* admission coordinates, or report why the provider cannot prove it.
|
|
15500
|
-
*
|
|
15501
|
-
* An intent recovery replays the exact original start material through
|
|
15502
|
-
* `startRetainedRun`; a changed replay is rejected before provider creation.
|
|
15503
|
-
*
|
|
15504
|
-
* `not_found`: the provider no longer holds the environment, so nothing
|
|
15505
|
-
* remains to destroy. `recovered`: the provider self-identified the session
|
|
15506
|
-
* with a strict exact reference matching the recorded coordinates.
|
|
15507
|
-
* `unverifiable`: the environment exists but the provider cannot
|
|
15508
|
-
* self-identify the session — no session accessor, an accessor that throws,
|
|
15509
|
-
* a lazy accessor with no stored reference, or a loose reference. That
|
|
15510
|
-
* outcome is never destroy-safe: keep the environment, retry
|
|
15511
|
-
* `reconnectRetainedRun` with a dispatched admission record, or inspect the
|
|
15512
|
-
* environment with provider-native tools. A session that self-identifies
|
|
15513
|
-
* with different coordinates throws: something live is not the recorded run.
|
|
15514
|
-
*
|
|
15515
|
-
* @stable
|
|
15516
|
-
*/
|
|
15279
|
+
/** Replay a persisted intent, or reattach coordinates the provider can prove. `unverifiable` keeps the environment; different coordinates throw. @stable */
|
|
15517
15280
|
declare function recoverRetainedRun(options: RecoverRetainedRunIntentOptions): Promise<RecoverRetainedRunResult>;
|
|
15518
15281
|
declare function recoverRetainedRun(options: RecoverRetainedRunOptions): Promise<RecoverRetainedRunResult>;
|
|
15519
15282
|
/** Rebuild a retained-run client without retaining any object from the starter. @stable */
|
|
@@ -16011,6 +15774,12 @@ interface StreamAgentTurnOptions {
|
|
|
16011
15774
|
callId?: string;
|
|
16012
15775
|
/** Caller trace tag retained in evidence and forwarded when the transport supports it. */
|
|
16013
15776
|
correlationId?: string;
|
|
15777
|
+
/**
|
|
15778
|
+
* Request headers inherited by the executor. Network transports forward these after assembling
|
|
15779
|
+
* the request, and Runtime's own content-type, authorization, idempotency-key, and
|
|
15780
|
+
* x-correlation-id replace any caller value of the same name.
|
|
15781
|
+
*/
|
|
15782
|
+
propagatedHeaders?: Readonly<Record<string, string>>;
|
|
16014
15783
|
/**
|
|
16015
15784
|
* Opt-in tool-part projection for box and executor backends: sandbox tool
|
|
16016
15785
|
* parts additionally surface in-stream as
|
|
@@ -16535,11 +16304,15 @@ interface StoredGraphContent {
|
|
|
16535
16304
|
readonly nodes: ReadonlyArray<{
|
|
16536
16305
|
readonly id: string;
|
|
16537
16306
|
readonly profile: AgentProfile;
|
|
16307
|
+
/** A check node; its profile is `{ name: id }`. */
|
|
16308
|
+
readonly check?: GraphCheckNode;
|
|
16538
16309
|
}>;
|
|
16539
16310
|
readonly deliverable: Pick<AgentGraph['deliverable'], 'describe' | 'checkRef' | 'command' | 'when'>;
|
|
16540
16311
|
/** A flow graph's entry and gates; absent for any other graph. */
|
|
16541
16312
|
readonly entry?: AgentGraph['entry'];
|
|
16542
16313
|
readonly gates?: AgentGraph['gates'];
|
|
16314
|
+
readonly workspace?: AgentGraph['workspace'];
|
|
16315
|
+
readonly continuation?: AgentGraph['continuation'];
|
|
16543
16316
|
}
|
|
16544
16317
|
/** A graph as stored. Observed imports retain unknown directives and budgets;
|
|
16545
16318
|
* they describe what happened and cannot be replayed as executable graphs. */
|
|
@@ -16761,6 +16534,17 @@ interface LoadedGraphFile {
|
|
|
16761
16534
|
}
|
|
16762
16535
|
/** Compile canonical YAML/JSON to content-addressed graph data. Host resolvers may perform I/O. */
|
|
16763
16536
|
declare function loadGraphFile(file: string, options?: LoadGraphFileOptions): Promise<LoadedGraphFile>;
|
|
16537
|
+
/**
|
|
16538
|
+
* The directory a graph run's nodes work in. `workspace: cwd` (the default) is `cwd`. `workspace:
|
|
16539
|
+
* fresh` is a new empty directory the run owns, `<root>/<runId>` (default root
|
|
16540
|
+
* `~/.tangle/workspaces`); a resumed run with the same id reuses it. The host passes the result as
|
|
16541
|
+
* the backend's working directory, where agent and check nodes both run.
|
|
16542
|
+
*/
|
|
16543
|
+
declare function graphWorkspace(graph: Pick<AgentGraph, 'workspace'>, options: {
|
|
16544
|
+
readonly cwd: string;
|
|
16545
|
+
readonly runId: string;
|
|
16546
|
+
readonly root?: string;
|
|
16547
|
+
}): Promise<string>;
|
|
16764
16548
|
/** The same data grammar as routes; no executable expressions or additional operators. */
|
|
16765
16549
|
declare const graphRouteWhenSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
16766
16550
|
equals: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
@@ -16811,7 +16595,24 @@ declare const graphFileSchema: z.ZodObject<{
|
|
|
16811
16595
|
profile: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
16812
16596
|
seat: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
16813
16597
|
needs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16598
|
+
check: z.ZodOptional<z.ZodObject<{
|
|
16599
|
+
command: z.ZodString;
|
|
16600
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
16601
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
16602
|
+
egress: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16603
|
+
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16604
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
16605
|
+
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
16606
|
+
memoryMB: z.ZodOptional<z.ZodNumber>;
|
|
16607
|
+
diskGB: z.ZodOptional<z.ZodNumber>;
|
|
16608
|
+
}, z.core.$strict>>;
|
|
16609
|
+
}, z.core.$strict>>;
|
|
16814
16610
|
}, z.core.$strict>>;
|
|
16611
|
+
workspace: z.ZodOptional<z.ZodEnum<{
|
|
16612
|
+
fresh: "fresh";
|
|
16613
|
+
cwd: "cwd";
|
|
16614
|
+
}>>;
|
|
16615
|
+
continuation: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<PortableContinuationPolicy, unknown>>>;
|
|
16815
16616
|
entry: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
16816
16617
|
node: z.ZodString;
|
|
16817
16618
|
task: z.ZodUnknown;
|
|
@@ -17234,6 +17035,9 @@ interface RemoteSupervisorControl extends RemoteSupervisorReader {
|
|
|
17234
17035
|
declare function connectRemoteSupervisor(spec: HttpMcpServerSpec): Promise<RemoteSupervisorReader>;
|
|
17235
17036
|
/** Connect with the dedicated /control capability, keeping credentials on the protected transport. */
|
|
17236
17037
|
declare function connectRemoteSupervisorControl(access: CoordinationControlAccess): Promise<RemoteSupervisorControl>;
|
|
17038
|
+
/** An `escalateQuestion` that writes each `ask_parent` question to `questions/<id>.json` for an
|
|
17039
|
+
* out-of-process observer, who answers through `writeWorkerSteer` on the root (#1165). */
|
|
17040
|
+
declare function fileEscalateQuestion(rootDir: string, runId: string): EscalateQuestion;
|
|
17237
17041
|
/** One atomically admitted down-leg request for an exact worker id. @stable */
|
|
17238
17042
|
interface WorkerSteerRequest {
|
|
17239
17043
|
readonly schemaVersion: 1;
|
|
@@ -18304,6 +18108,8 @@ interface SettledWorker {
|
|
|
18304
18108
|
* children's results, each readable in full through `observe_agent({ outRef })`. */
|
|
18305
18109
|
readonly subtree?: SubtreeSummary;
|
|
18306
18110
|
}
|
|
18111
|
+
/** The machine a worker asks for: the canonical create-time resource request. */
|
|
18112
|
+
type ResourceRequest = NonNullable<CreateAgentEnvironmentInput['resources']>;
|
|
18307
18113
|
/** Immutable task, allocation, identity attribution, and semantic key supplied while a manager's
|
|
18308
18114
|
* complete worker profile is prepared for one spawn. */
|
|
18309
18115
|
interface WorkerSpawnContext {
|
|
@@ -18317,6 +18123,8 @@ interface WorkerSpawnContext {
|
|
|
18317
18123
|
readonly budget: Budget;
|
|
18318
18124
|
/** Detached, deeply immutable task bytes from this spawn request. */
|
|
18319
18125
|
readonly task: unknown;
|
|
18126
|
+
/** The machine `spawn_worker` requested, admitted under the backend's `maxWorkerResources`. */
|
|
18127
|
+
readonly resources?: ResourceRequest;
|
|
18320
18128
|
/** Exact trace label selected for this spawn. */
|
|
18321
18129
|
readonly label: string;
|
|
18322
18130
|
/** Semantic restart key, when the manager supplied one. */
|
|
@@ -18338,8 +18146,8 @@ interface WorkerSpawnContext {
|
|
|
18338
18146
|
readonly continuity?: ContinuityMode;
|
|
18339
18147
|
/** Present iff `continuity === 'resume'`: the lineage the executor seam re-attaches with. */
|
|
18340
18148
|
readonly resume?: WorkerResumeContext;
|
|
18341
|
-
/** The
|
|
18342
|
-
* `successorOf`). Runtime admits only a
|
|
18149
|
+
/** The worker this spawn revises or replaces, when the manager named one (`spawn_worker`'s
|
|
18150
|
+
* `successorOf`). Runtime admits only a worker of the same manager, live or settled, and journals the
|
|
18343
18151
|
* relation on the new node, so the run record shows who took over whose work. A seam may read
|
|
18344
18152
|
* it to hand the successor its predecessor's workspace or retained output; Runtime mounts
|
|
18345
18153
|
* nothing on its behalf. Independent of `resume`, which re-attaches the same node's session. */
|
|
@@ -18534,11 +18342,12 @@ interface CoordinationToolsOptions {
|
|
|
18534
18342
|
readonly preflightSpawn?: SpawnPreflight;
|
|
18535
18343
|
/**
|
|
18536
18344
|
* OPT-IN pre-journal PROFILE resolution: maps the profile a driver authored to the profile that
|
|
18537
|
-
* will actually run
|
|
18538
|
-
* profiles by name (an agent graph) installs this so the
|
|
18539
|
-
* its real model, tools and harness — never the `{ name }` stub the driver wrote.
|
|
18540
|
-
* throw-on-refusal, identity-free: it sees only the profile, never the assignment
|
|
18541
|
-
* because both are minted AFTER the pre-journal point. Omit = the authored profile
|
|
18345
|
+
* will actually run — both the spawn and `preflightSpawn`'s gate see the resolved profile. A
|
|
18346
|
+
* layer that pins profiles by name (an agent graph) installs this so the canonical profile —
|
|
18347
|
+
* its real model, tools and harness — runs, never the `{ name }` stub the driver wrote (#1281).
|
|
18348
|
+
* Synchronous, throw-on-refusal, identity-free: it sees only the profile, never the assignment
|
|
18349
|
+
* or budget, because both are minted AFTER the pre-journal point. Omit = the authored profile
|
|
18350
|
+
* is used.
|
|
18542
18351
|
*/
|
|
18543
18352
|
readonly resolveSpawnProfile?: (profile: AgentProfile) => AgentProfile;
|
|
18544
18353
|
/**
|
|
@@ -18646,6 +18455,7 @@ interface SpawnPreflightContext {
|
|
|
18646
18455
|
readonly label: string;
|
|
18647
18456
|
readonly key?: string;
|
|
18648
18457
|
readonly task: unknown;
|
|
18458
|
+
readonly resources?: ResourceRequest;
|
|
18649
18459
|
}
|
|
18650
18460
|
/** The gate `CoordinationToolsOptions.preflightSpawn` installs. */
|
|
18651
18461
|
type SpawnPreflight = (profile: AgentProfile, context: SpawnPreflightContext) => Promise<SpawnRefusal | undefined>;
|
|
@@ -18802,6 +18612,9 @@ interface DriverAttemptRecord {
|
|
|
18802
18612
|
readonly durationMs: number;
|
|
18803
18613
|
/** Absent when the attempt completed. */
|
|
18804
18614
|
readonly error?: string;
|
|
18615
|
+
/** With `error`: the deepest cause's stack, redacted and bounded, so a failure the message
|
|
18616
|
+
* alone cannot place still names its throw site (#2347). */
|
|
18617
|
+
readonly errorStack?: string;
|
|
18805
18618
|
/** Validated producer attribution, including its reset hint when supplied. */
|
|
18806
18619
|
readonly failure?: AgentTurnFailure;
|
|
18807
18620
|
readonly classification?: DriverFailureClass;
|
|
@@ -18863,26 +18676,9 @@ interface DriverAttemptRecord {
|
|
|
18863
18676
|
* already closed: the manager's own `stop` or a progress stop rule. A barren streak is never a
|
|
18864
18677
|
* refusal: it pauses the next continuation (`barrenPauseMs`). */
|
|
18865
18678
|
type DriverRepromptRefusal = 'closed' | Extract<DriverAttemptStop, 'aborted' | 'budget-exhausted' | 'deadline' | 'max-attempts'>;
|
|
18866
|
-
/**
|
|
18867
|
-
* How one driver failure is answered.
|
|
18868
|
-
*
|
|
18869
|
-
* - `terminal`: Runtime's own refusal, or a request that fails identically forever. The run ends.
|
|
18870
|
-
* - `transient`: a foreign accident. A streak in which nothing ran is retried as an outage for
|
|
18871
|
-
* `transientOutageMs`; after that, and for a failure that did work, `maxAttempts` and the
|
|
18872
|
-
* barren streak bound it.
|
|
18873
|
-
* - `unavailable`: the upstream cannot serve now (quota, rate limit, overload, or the router's
|
|
18874
|
-
* own provider credential refused). The driver pauses and re-enters, and only the deadline, the
|
|
18875
|
-
* budget, and cancellation bound the pauses.
|
|
18876
|
-
*/
|
|
18679
|
+
/** `terminal` ends the run. `transient` is an outage until `transientOutageMs`, then the attempt bounds. `unavailable` pauses until the deadline, budget, or cancel. */
|
|
18877
18680
|
type DriverFailureClass = 'transient' | 'terminal' | 'unavailable';
|
|
18878
|
-
/**
|
|
18879
|
-
* What one driver loop did, counted from its attempt records: the numbers a run's settle record
|
|
18880
|
-
* carries so a reader can tell genuine continuations from failure retries without the journal.
|
|
18881
|
-
*
|
|
18882
|
-
* Measured motive: the most genuine continuations in any recorded lab run was 11
|
|
18883
|
-
* (evidence-compiler-j, which won), while the two larger counts, 32 and 12, were re-entries after
|
|
18884
|
-
* failed turns. One `attempts` number hid which was which.
|
|
18885
|
-
*/
|
|
18681
|
+
/** Attempt counts split continuations from failure retries. One `attempts` number hid which was which. */
|
|
18886
18682
|
interface DriverLoopRecord {
|
|
18887
18683
|
/** Driver invocations started (the attempt numbers the loop reached). */
|
|
18888
18684
|
readonly attempts: number;
|
|
@@ -18933,46 +18729,16 @@ interface DriverContinuationRecord extends DriverLoopRecord {
|
|
|
18933
18729
|
readonly continuations: ReadonlyArray<ContinuationEntry>;
|
|
18934
18730
|
}
|
|
18935
18731
|
/**
|
|
18936
|
-
* Why a retained execution has no accepted terminal result
|
|
18937
|
-
*
|
|
18938
|
-
*
|
|
18939
|
-
*
|
|
18940
|
-
*
|
|
18941
|
-
*
|
|
18942
|
-
*
|
|
18943
|
-
*
|
|
18944
|
-
*
|
|
18945
|
-
*
|
|
18946
|
-
* Anything unclassifiable lands here, and so does a 4xx, a not-found, or a client deadline hit
|
|
18947
|
-
* AFTER admission: the provider cannot resolve what it admitted, which is exactly the case the
|
|
18948
|
-
* refusal exists for, not a rejected request.
|
|
18949
|
-
* - `'provider-contract'`: the provider answered with something its own contract forbids — a
|
|
18950
|
-
* `RetainedRunProviderContractError` naming a broken answer (an `*_INVALID`, `*_CHANGED`,
|
|
18951
|
-
* `*_DUPLICATE`, `*_MISSING` code), an event bound to another run.
|
|
18952
|
-
* - `'request-rejected'`: the request itself was refused BEFORE it ran — a schema violation
|
|
18953
|
-
* (`ZodError`), an HTTP 4xx at admission, a capacity refusal at admission that carries an
|
|
18954
|
-
* upstream capacity `code` and no HTTP status (the account owner's credential command refused a
|
|
18955
|
-
* fresh dispatch before the dispatch request existed), an unsupported credential route, or a
|
|
18956
|
-
* dispatch that Sandbox did not admit
|
|
18957
|
-
* because another execution owns the session or turn. Never named after admission.
|
|
18958
|
-
* - `'transport'`: the provider or a gateway in front of it failed — an HTTP 5xx, a socket
|
|
18959
|
-
* error, a platform service answering with a server error. Status is in doubt only because
|
|
18960
|
-
* the transport was.
|
|
18961
|
-
* - `'nested-recovery'`: a nested manager's own recovery could not be reconstructed. Stated by
|
|
18962
|
-
* the thrower, never inferred.
|
|
18963
|
-
*
|
|
18964
|
-
* Classification reads the cause's structure — class name, `code`, HTTP `status`, a Zod issue
|
|
18965
|
-
* list — and two untyped Sandbox refusals' text, never other message text: the provider is not a
|
|
18966
|
-
* dependency of this package and its messages are not a contract. #1204's exhibit 3 (an event
|
|
18967
|
-
* without a stable id) is delivered rather than thrown since agent-provider-tangle 1.4.0; its
|
|
18968
|
-
* exhibit 6 is typed as `JsonBoundError` (`code: 'JSON_BOUND_VIOLATION'`) since 1.5.0 and lands
|
|
18969
|
-
* with the schema violations. A provider still throwing plain `Error`s lands on `'unobservable'`,
|
|
18970
|
-
* which is the safe side.
|
|
18971
|
-
*
|
|
18972
|
-
* One `RetainedRunProviderContractError` is NOT one meaning. The runtime mints it both when the
|
|
18973
|
-
* provider answered wrongly and when a READ of the provider failed (`RETAINED_RESULT_READ_FAILED`,
|
|
18974
|
-
* `RETAINED_CONTROL_REF_READ_FAILED`). The second kind is a wrapper: what it wraps decides, in a
|
|
18975
|
-
* post-admission context, and a wrapper around nothing classifiable is exhibit 4.
|
|
18732
|
+
* Why a retained execution has no accepted terminal result. `unobservable` means it may have run
|
|
18733
|
+
* and nothing local can say, including a 4xx, not-found, or client deadline after admission, and
|
|
18734
|
+
* any plain `Error`. `provider-contract` is an answer the provider's contract forbids, or an event
|
|
18735
|
+
* bound to another run. `request-rejected` is a refusal before the request ran: schema, admission
|
|
18736
|
+
* 4xx, admission capacity code, unsupported credential route, or a session owned by another
|
|
18737
|
+
* execution. `transport` is HTTP 5xx, a socket error, or a platform server error. `nested-recovery`
|
|
18738
|
+
* is stated by the thrower. Classification reads class, `code`, HTTP `status`, and a Zod issue
|
|
18739
|
+
* list, plus two untyped Sandbox refusal strings, never other message text. A
|
|
18740
|
+
* `RetainedRunProviderContractError` for `RETAINED_RESULT_READ_FAILED` or
|
|
18741
|
+
* `RETAINED_CONTROL_REF_READ_FAILED` is classified by what it wraps.
|
|
18976
18742
|
*/
|
|
18977
18743
|
type RetainedPendingCause = 'unobservable' | 'provider-contract' | 'request-rejected' | 'transport' | 'nested-recovery';
|
|
18978
18744
|
/**
|
|
@@ -19624,5 +19390,5 @@ interface KnowledgeReadinessDecision {
|
|
|
19624
19390
|
blockingGapIds: string[];
|
|
19625
19391
|
nonBlockingGapIds: string[];
|
|
19626
19392
|
}
|
|
19627
|
-
export { AgentEnvironmentStatus as $, startRuntimeRun as $S, McpToolAnnotations as $_, startRetainedRunInEnvironment as $a, NodeExecutionIdentity as $b, ShapeContext as $c, FinalizeContext as $d, CliWorktreeBridgeSeam as $f, DecideGate as $g, HarnessUsage as $h, StructuralRolloutResult as $i, PursuitNodePlatform as $l, DelegationResultPayload as $m, safeWorkerFile as $n, SuperviseOptionsForDispatch as $o, SandboxUsageLedger as $p, graphDigest as $r, HarvestFailure as $s, settledWorkerOut as $t, createInMemoryRunContext as $u, readRunCancelRequest as $v, HarnessFileBinding as $x, SpendGap as $y, DriverContinuationRecord as A, RetainedRunIntentAdmission as AC, LoopResult as AS, MapItemFailurePolicy as A_, Deliverable as Aa, BudgetPoolRestore as Ab, ScopeAnalyzeInput as Ac, SupervisorAgentDeps as Ad, ResolveSpawnResourcePathsResult as Af, bestSoFar as Ag, ExecutorResultMapping as Ah, ChatWorkerSeamOptions as Ai, IsolatedCheckOutputFailure as Al, runDetachedTurn as Am, SearchSpecOwnedOption as An, RegistryAnalyzeProjection as Ao, ProviderExecutorOptions as Ap, workerFromInteractiveProvider as Ar, StrategyShotResult as As, boxSurfaceReader as At, PursuitFork as Au, openSqlRunStore as Av, readWorkerProgress as Ax, RuntimeStreamEventSink as Ay, PeerAuditAccess as B, OutputAdapter as BS, PeerMailOutcome as B_, createSandboxLineage as Ba, createBudgetPool as Bb, WidenLineage as Bc, PlateauOptions as Bd, EventSubscription as Bf, WorktreeCheckRunner as Bg, sentinelCompletion as Bh, profileRichnessFinding as Bi, VersionJudge as Bl, SubmitOutput as Bm, TraceRootArtifact as Bn, BenchmarkCell as Bo, ResolvedMcpServerLaunch as Bp, LoadGraphFileOptions as Br, Strategy as Bs, WorktreePatchArtifact as Bt, SuperviseRegistry as Bu, FileResultBlobStore as Bv, HarnessTranscriptBinding as Bx, createWorkerSlots as By, RuntimeFailureCause as C, RetainedRunCancelOptions as CC, LoopEndedPayload as CS, ContinuationInstruction as C_, EvolutionStrategy as Ca, Scope as Cb, Panel as Cc, CoordinationToolFace as Cd, ContinuationProfile as Cf, renderLeaderboardSvg as Cg, FileDelegationStoreOptions as Ch, DelegateOptions as Ci, IsolatedCheckBox as Cl, FleetHandle as Cm, FencedSqlRunContext as Cn, loopUntil as Co, ROUTER_CLIENT_HEADER as Cp, profileRegistry as Cr, AgenticSurface as Cs, BoxSurfaceReaderOptions as Ct, TraversalContinuity as Cu, RunLocalHarnessOptions as Cv, ActivityNote as Cx, OtelExporter as Cy, RetainedPendingCause as D, RetainedRunEnvironmentAdmission as DC, LoopLineageOptions as DS, DownMessageDeliveryOutcome as D_, TournamentRow as Da, WorkerEventEntry as Db, PipelineStage as Dc, ObserveSupervisorNodeEvent as Dd, DriverContractState as Df, AnytimeTaskCurve as Dg, CheckVerdict as Dh, ChatSessionStore as Di, runIsolatedCheck as Dl, createSiblingSandboxExecutor as Dm, SEARCH_SPEC_CORRELATION_KEY as Dn, verify as Do, AgentEnvironmentProviderRegistry as Dp, InteractiveWorkerKeyInput as Dr, CorpusReadbackOptions as Ds, SurfaceReadOutcome as Dt, GraphFromStoredOptions as Du, CodexTokenUsage as Dv, TeamProgress as Dx, loopEventToOtelSpan as Dy, EvidencePendingEvent as E, RetainedRunEffect as EC, LoopIterationStartedPayload as ES, DownMessageDeliveryAttempt as E_, TournamentCell as Ea, WorkerEventCursor as Eb, PanelVerdict as Ec, DriveHarnessOwnerContext as Ed, admitContinuationPolicy as Ef, AnytimeStrategySummary as Eg, CheckUnavailableError as Eh, ChatCompletionsTransport as Ei, IsolatedCheckResult as El, createFleetWorkspaceExecutor as Em, CompiledSearchSpec as En, selectValidWinner as Eo, AgentEnvironmentProviderRef as Ep, InteractiveWorkerEnvironment as Er, ArtifactHandle as Es, SurfaceReadBox as Et, GraphCommandCheck as Eu, LocalHarness as Ev, ScopeProgressInput as Ex, createOtelExporter as Ey, CoordinationTools as F, StartRetainedRunInEnvironmentOptions as FC, LoopTraceEmitter as FS, DEFAULT_PEER_MAIL_LIMITS as F_, SandboxRunAbortError as Fa, ReservationRejection as Fb, TrajectoryReportOptions as Fc, SupervisorToolInvocationContext as Fd, environmentReader as Ff, WaterfallSpan as Fg, CompletionEvidence as Fh, ProfileRichness as Fi, NextPursuitVersionInput as Fl, DelegationResumeTick as Fm, settledToIteration as Fn, observationFromRegistry as Fo, ProviderPlacement as Fp, graphFromSessionFacts as Fr, runAgentic as Fs, failuresAnalyst as Ft, workerFromBackend as Fu, SpawnForestInDoubtNode as Fv, RetainedInteractiveRunHandle as Fx, createRuntimeEventCollector as Fy, SpawnRefusalCause as G, Validator as GS, PeerMailboxOptions as G_, S3PrivateCasStoreOptions as Ga, SpawnModelSubstitution as Gb, LoopShape as Gc, anyOf as Gd, DelegateHandlerOptions as Gf, AwaitWakeInput as Gg, CodexRolloutStoreReader as Gh, CheckRunContext as Gi, SupervisePursuitOptions as Gl, DelegateUiAuditArgs as Gm, WorkerSteerAcknowledgement as Gn, BenchmarkTaskRow as Go, secretEnvOfMcpServer as Gp, GraphRegistryDir as Gr, assertStrategyContract as Gs, attachWorker as Gt, SeatStage as Gu, SpawnJournalReadResult as Gv, HarnessTranscriptUnavailableReason as Gx, readRunParking as Gy, SpawnPreflight as H, SandboxClient as HS, PeerMailRefusal as H_, AcquireOptions as Ha, ExecutorContext as Hb, WinnerStrategy as Hc, StopDecision as Hd, McpEventRecord as Hf, WorktreeHarnessResult as Hg, CodexForkBoundary as Hh, RunCancellationReason as Hi, assertPursuitVersions as Hl, DelegateCodeConfig as Hm, RunTraceSources as Hn, BenchmarkLift as Ho, mcpSecretEnvMetadataKey as Hp, loadGraphFile as Hr, StrategyCtx as Hs, AttachWorkerOptions as Ht, SeatSegment as Hu, SpawnJournalCursor as Hv, HarnessTranscriptEvidence as Hx, RunParkedError as Hy, CoordinationToolsOptions as I, StartRetainedRunOptions as IC, LoopTraceEvent as IS, PEER_MAIL_WIRE_KEY as I_, TurnResult as Ia, ReservationShortfall as Ib, Verify as Ic, ManagerWakePolicy as Id, resolveSpawnResourcePaths as If, createWaterfallCollector as Ig, CompletionPolicy as Ih, ProfileRichnessThresholds as Ii, PursuitVersionChain as Il, DelegationRunContext as Im, createScope as In, McpEndpoint as Io, BridgeHarnessStore as Ip, graphFileSchema as Ir, sample as Is, AuthoredHarness as It, AuthorizedSpawn as Iu, SpawnForestMissingTree as Iv, RetainedInteractiveStartMaterial as Ix, createRuntimeStreamEventCollector as Iy, AgentEnvironment$1 as J, RuntimeRunHandle as JS, isPeerMailEnvelope as J_, PrivateCasNamespaceObject as Ja, ExecutorExecutionBinding as Jb, PersonaContext as Jc, ReentryContinuity as Jd, createExecutorRegistry as Jf, LeadMessage as Jg, CodexStoreDelta as Jh, CheckSourceCtx as Ji, supervisePursuit as Jl, DelegationError as Jm, cancelWorker as Jn, runBenchmark as Jo, SandboxToolPartState as Jp, GraphSelection as Jr, sampleThenRefine as Js, NOTE_MAX_CHARS as Jt, InMemoryRunContext as Ju, RunState as Jv, captureHarnessTranscript as Jx, BudgetViolation as Jy, SuperviseProfileEntry as K, RuntimeRunCompleteInput as KS, claimsAuthority as K_, createS3PrivateCasStore as Ka, AgentExecutionRef as Kb, Outcome as Kc, noProgressFor as Kd, DelegateResult as Kf, CoordinationEvent as Kg, CodexRolloutStoreRef as Kh, CheckRunner as Ki, SupervisedPursuitResult as Kl, DelegateUiAuditConfig as Km, WorkerSteerRequest as Kn, Environment as Ko, SandboxLeafOut as Kp, GraphRunQuery as Kr, authorStrategy as Ks, readWorkerInteractiveBinding as Kt, SelectSeat as Ku, readSpawnJournal as Kv, ReadableEnvironment as Kx, Budget as Ky, GraphSubtaskPreparation as L, LoopWinner as LS, PeerMailEnvelope as L_, openSandboxRun as La, ReservationStage as Lb, VerifySpec as Lc, SupervisorProfile as Ld, McpServer as Lf, RunAgentRoundsOptions as Lg, CompletionVerdict as Lh, asAuthoredProfile as Li, PursuitVersionStop as Ll, DelegationTaskQueue as Lm, ScopeArgs as Ln, McpEnvironmentOptions as Lo, BridgeModelCredential as Lp, graphRouteWhenSchema as Lr, AuthorStrategyOptions as Ls, WorktreeFanoutOptions as Lt, AuthorizedSpawnContext as Lu, SpawnForestNode as Lv, StartRetainedInteractiveRunOptions as Lx, sanitizeKnowledgeReadinessReport as Ly, DriverRepromptRefusal as M, RetainedRunSnapshot as MC, LoopStartedPayload as MS, MapSpawnMarker as M_, OpenSandboxRunOptions as Ma, LeakedReservation as Mb, SteerContext as Mc, SupervisorNodeContext as Md, SpawnResourceBytes as Mf, renderAnytimeTable as Mg, mapExecutorResult as Mh, chatWorkerSeam as Mi, validateIsolatedCheckOutputs as Ml, DelegationRecord as Mm, compileSearchSpec as Mn, buildSteerContext as Mo, ProviderPromptOptions as Mp, createInPlaceCliExecutor as Mr, breadthStrategy as Ms, harvestSurfaceDiffs as Mt, supervise as Mu, materializeTreeView as Mv, RecoverRetainedInteractiveRunOptions as Mx, RuntimeTelemetryOptions as My, BlockedToolReport as N, RetainedRunStartMaterial as NC, LoopTeardownFailedPayload as NS, MapTraversalEvent as N_, OpenSandboxRunPromptOptions as Na, ReservationFloor as Nb, TrajectoryNode as Nc, SupervisorNodeContextSeed as Nd, SpawnResourceRead as Nf, WaterfallCollector as Ng, verdictFromJudgeScore as Nh, createChatSessionStore as Ni, JudgedPursuitVersion as Nl, DelegationResumeContext as Nm, searchPresets as Nn, createScopeAnalyst as No, providerAsExecutor as Np, GraphSessionObservationOptions as Nr, depthStrategy as Ns, AnalystAuthoring as Nt, superviseFleetCapabilities as Nu, SpawnForest as Nv, RetainedInteractiveAdmissionHook as Nx, SanitizedKnowledgeReadinessReport as Ny, DriverAttemptRecord as O, RetainedRunEventOptions as OC, LoopPlanDescription as OS, DownMessageEvent as O_, runStrategyEvolution as Oa, WorkerEventPage as Ob, RenderCorpusToInstructionsOptions as Oc, ResolveDriveHarness as Od, DriverReentry as Of, anytimeReport as Og, CompletionCheckContext as Oh, ChatTransportExecutorOptions as Oi, IsolatedCheckOutputDeclaration as Ol, DetachedTurn as Om, SearchSpec as On, widen as Oo, createAgentEnvironmentProviderRegistry as Op, InteractiveWorkerOptions as Or, RunAgenticOptions as Os, SurfaceReader as Ot, defaultEdgeTraversalCap as Ou, CodexExecutionPolicy as Ov, WorkerProgress as Ox, RuntimeEventCollector as Oy, CoordinationStats as P, RetainedRunTurnInput as PC, LoopTokenUsage as PS, AUTHORITY_MARKERS as P_, SandboxRun as Pa, ReservationHolder as Pb, TrajectoryReport as Pc, SupervisorToolDescriptor as Pd, SpawnResourceReader as Pf, WaterfallReport as Pg, CompletionAnalyst as Ph, AuthoredProfile as Pi, NextPursuitVersion as Pl, DelegationResumeDriver as Pm, searchSpecDigest as Pn, registryScopeAnalyst as Po, UnavailablePausePolicy as Pp, ObservedSessionFacts as Pr, refine as Ps, analystsFromRegistry as Pt, superviseWithTestBrain as Pu, SpawnForestEvent as Pv, RetainedInteractiveEnvironmentInput as Px, SanitizedKnowledgeRequirement as Py, AgentEnvironmentQuery as Q, RuntimeRunStatus as QS, JsonRpcResponse as Q_, startRetainedRun as Qa, MaterializedModelIdentity as Qb, ShapeBudget as Qc, DeliveredOutput as Qd, CliSeam as Qf, WorkerWatchOptions as Qg, readCodexRolloutSession as Qh, StructuralRolloutPolicy as Qi, PursuitNodeCost as Ql, DelegationProgress as Qm, readWorkerSteerRequests as Qn, SuperviseDispatchOptions as Qo, SandboxServedBackend as Qp, graphCorpusSummary as Qr, HarvestError as Qs, composeWorkerEvidence as Qt, createFileRunContext as Qu, cancelRun as Qv, HARNESS_TRANSCRIPT_READ_LIMITS as Qx, SpendChannel as Qy, GraphSubtasks as R, MountManifestEntry as RS, PeerMailEvent as R_, SandboxLineage as Ra, ReservationTicket as Rb, Widen as Rc, AllWorkersStalledOptions as Rd, McpServerOptions as Rf, runAgentRounds as Rg, completionAuthorizes as Rh, assessAuthoredProfile as Ri, PursuitVersions as Rl, DelegationTaskQueueOptions as Rm, TRACE_ROOT_SCHEMA as Rn, createMcpEnvironment as Ro, BridgeSeam as Rp, GraphFileResolutionError as Rr, AuthoredStrategy as Rs, worktreeFanout as Rt, SuperviseOptions as Ru, SpawnForestTree as Rv, HARNESS_TRANSCRIPT_SETTLE_TIMEOUT_MS as Rx, DeadlineCheckIn as Ry, RuntimeStreamEvent as S, RetainedRunAdmissionHook as SC, LoopDecisionPayload as SS, AuthorizedDownMessage as S_, EvolutionReport as Sa, ResumedWork as Sb, LoopUntilState as Sc, supervisorAgentWithTestBrain as Sd, ContinuationPolicy as Sf, renderLeaderboardMarkdown as Sg, FileDelegationStore as Sh, graphDesignerExtraTools as Si, readDeclaredCheck as Sl, DelegationExecutor as Sm, validateStoredGraph as Sn, flatWidenGate as So, sharedBoxPlacement as Sp, pickBestProfile as Sr, AgenticRunResult as Ss, createVerifierEnvironment as St, RunGraphTestOptions as Su, LocalHarnessResult as Sv, ActivityLog as Sx, OtelExportStats as Sy, RuntimeFailureOwner as T, RetainedRunDispatchedAdmission as TC, LoopIterationEndedPayload as TS, DownMessageAuthorizationInput as T_, StrategyTournament as Ta, WidenGate as Tb, PanelSpec as Tc, DriveHarness as Td, VerdictSummary as Tf, AnytimeReport as Tg, CoderTask as Th, delegate as Ti, IsolatedCheckOptions as Tl, SiblingSandboxExecutorOptions as Tm, createFencedSqlRunContext as Tn, pipeline as To, sharedWorkerClientName as Tp, recordProfileRun as Tr, AgenticTool as Ts, SurfaceDiff as Tt, runGraphWithTestBrain as Tu, LOCAL_HARNESSES as Tv, ExecutorProgress as Tx, buildLoopOtelSpans as Ty, SpawnPreflightContext as U, SelectionReceipt as US, PeerMailSendInput as U_, acquireSandbox as Ua, ExecutorFactory as Ub, DefinePersona as Uc, StopRule as Ud, McpEventSource as Uf, WorktreeProfileMaterializationReceipt as Ug, CodexRolloutIdentity as Uh, CheckExecChannel as Ui, SuperviseGraphPursuitOptions as Ul, DelegateResearchArgs as Um, runToolSpans as Un, BenchmarkReport as Uo, resolveMcpServerLaunch as Up, GraphCorpusGroup as Ur, StrategyResult as Us, WorkerInteractiveBinding as Ut, SeatSelection as Uu, SpawnJournalReadOptions as Uv, HarnessTranscriptFile as Ux, RunParkingPolicy as Uy, SettledWorker as V, RunProvenance as VS, PeerMailReadout as V_, SandboxEvidenceReceipt as Va, AgentSpec as Vb, WidenSpec as Vc, ProgressView as Vd, EventSubscriptionStore as Vf, WorktreeCommandResult as Vg, stopSentinel as Vh, supervisorInstructions as Vi, VersionVerdict as Vl, DelegateCodeArgs as Vm, TraceSummary as Vn, BenchmarkConfig as Vo, envKeyProvider as Vp, LoadedGraphFile as Vr, StrategyArtifacts as Vs, createWorktreeCliExecutor as Vt, SuperviseRegistryTable as Vu, replaySpawnTree as Vv, HarnessTranscriptCapture as Vx, ParkedRun as Vy, SpawnRefusal as W, ValidationCtx as WS, PeerMailbox as W_, S3PrivateCasStore as Wa, ExecutorRegistry as Wb, DefinePersonaInput as Wc, allWorkersStalled as Wd, DelegateError as Wf, GitRunner as Wg, CodexRolloutSession as Wh, CheckOutcome as Wi, SupervisePursuitError as Wl, DelegateResearchConfig as Wm, WorkerCancellation as Wn, BenchmarkStrategySummary as Wo, resolveSecretEnv as Wp, GraphCorpusSummary as Wr, adaptiveRefine as Ws, WorkerInteractiveProviderSource as Wt, SeatSelectionInput as Wu, SpawnJournalReadRecord as Wv, HarnessTranscriptUnavailable as Wx, RunParkingRecord as Wy, AgentEnvironmentEvent$1 as X, RuntimeRunPersistenceAdapter as XS, peerMailVerbNames as X_, reconnectRetainedRun as Xa, ExecutorNodeContext as Xb, RunPersonified as Xc, UNPROVEN_CONTINUITY as Xd, createExecutor as Xf, ManagerWake as Xg, createCodexRolloutStoreReader as Xh, StructuralRolloutConfig as Xi, PursuitObserverDelivery as Xl, DelegationHistoryArgs as Xm, readWorkerCancellation as Xn, LoopDispatchOptions as Xo, mapSandboxEvent as Xp, StoredGraphInput as Xr, strategyAuthorSystemPrompt as Xs, WorkerEvidenceInput as Xt, RunContext as Xu, RunCancelRequest as Xv, persistHarnessTranscript as Xx, ResourceSpend as Xy, AgentEnvironmentCapabilities$1 as Y, RuntimeRunOptions as YS, peerMailTools as Y_, PrivateCasNamespaceRetirement as Ya, ExecutorMaterialization as Yb, PersonaExecutors as Yc, ReentryTaskInput as Yd, ExecutorConfig as Yf, ManagerReentryState as Yg, addHarnessUsage as Yh, RepairStop as Yi, RunReopen as Yl, DelegationFeedbackSnapshot as Ym, legacySupervisorRunDir as Yn, LoopCampaignDispatchOptions as Yo, createSandboxToolPartState as Yp, StoredGraph as Yr, strategyAuthorContract as Ys, VERIFY_TAIL_CHARS as Yt, InMemoryRunContextOptions as Yu, readRunState as Yv, harnessTranscriptArtifact as Yx, ResourceLimit as Yy, AgentEnvironmentProvider$1 as Z, RuntimeRunRow as ZS, JsonRpcMessage as Z_, recoverRetainedRun as Za, MaterializedExecutionIdentity as Zb, RunPersonifiedOptions as Zc, composeReentryTask as Zd, CliInPlaceSeam as Zf, ToolOutcomeEvent as Zg, harnessUsageIsEmpty as Zh, StructuralRolloutMessage as Zi, PursuitCostProvenance as Zl, DelegationHistoryEntry as Zm, readWorkerSteerAcknowledgement as Zn, LoopOptionsForDispatch as Zo, mapSandboxToolEvent as Zp, digestOfGraph as Zr, HarvestCorpusOptions as Zs, closingWorkerNote as Zt, RunContextLease as Zu, RunCancellation as Zv, BoundHarnessSession as Zx, Spend as Zy, RunAgentTaskOptions as _, RetainedInteractiveAdmission as _C, AgentRunSpec as _S, QuestionPolicy as __, CollectedAgentTurn as _a, RootStreamReceipt as _b, EqualKVerdict as _c, createSupervisorSpanRecorder as _d, ContinuationAppend as _f, ProfileKeyOf as _g, researcherProfile as _h, queueOf as _i, assertDeclaredCheck as _l, DelegateRunCtx as _m, parseWorkerToolTraceArtifact as _n, runPersonified as _o, SharedBoxCloseReceipt as _p, provisionSupervisor as _r, StdioMcpConnection as _s, SandboxInstance$1 as _t, GraphEdgeCapError as _u, AnalyzeOnSettleRoute as _v, WorkerTraceUnavailableReason as _x, TraceContext as _y, AgentKnowledgeProvider as a, BackendTransportError as aC, readBoundHarnessSessions as aS, RouteGate as a_, defaultStructuralRolloutPolicy as aa, Settled as ab, ObserveInput as ac, createPromptRegistry as ad, CoordinationMcpHandle as af, CodeModeToolset as ag, UiAuditLensFilter as ah, lookupGraph as ai, LeaderboardBenchTask as al, ToolSpec as am, GitWorkspaceOptions as an, ResolveSandboxClientOptions as ao, DEFAULT_SANDBOX_STEERING_MAX_TURNS as ap, RemoteSupervisorCancelResult as ar, TerminalDecision as as, AgentTurnResult$2 as at, PursuitRunTotals as au, EventBus as av, ExecutorAccounting as ax, SpawnJournal as ay, RuntimeSession as b, RetainedInteractiveStartedAdmission as bC, ExecCtx as bS, questionEscalationTargets as b_, streamAgentTurn as ba, ReenteredWorkers as bb, FanoutWinnerSelector as bc, readRootStreamReceipt as bd, ContinuationPanelInput as bf, pairwiseSignificance as bg, DelegationPersistenceError as bh, DesignerToolsEnv as bi, declaredCheckDigest as bl, UiAuditorDelegate as bm, createRootHandle as bn, renderCorpusToInstructions as bo, SharedBoxStats as bp, bestProfileFor as br, materializeLocalMcp as bs, makeFinding$1 as bt, GraphTopology as bu, DefinedAnalystRecord as bv, TraceSource as bx, OtelAttribute as by, AgentTaskContext as c, NotFoundError as cC, ProviderWorkspaceAttemptProvenance as cS, ChildQuestionInbox as c_, officialChecksFromMeta as ca, SpawnRejection as cb, observe as cc, dumbContinuationPassPrompt as cd, CoordinationTransportOptions as cf, runCodeMode as cg, UiFindingScreenshot as ch, recordStoredGraphRun as ci, LeaderboardIterationInfo as cl, ToolLoopCompaction as cm, WorkspaceCommit as cn, profileOptimizerModelCall as co, SteerableSandboxSession as cp, RemoteSupervisorSteerResult as cr, InProcessOnPrompt as cs, CheckpointRequest as ct, FileObserverJournal as cu, WatchTraceOptions as cv, ExecutorResult as cx, RecursiveReservationPolicy as cy, AgentTaskStatus as d, NativeContextContinuationHandle as dC, ProviderWorkspaceCaptureResult as dS, QuestionDecision as d_, selectBestIndex as da, TreeView as db, CombinatorShape as dc, naiveContinuationPrompt as dd, CoordinationRejectReason as df, Interval as dg, KnowledgeItem as dh, GraphTriggerBinding as di, LeaderboardScore as dl, ToolLoopToolCall as dm, jjWorkspace as dn, PrivateCasOffloadReport as do, Inbox as dp, connectRemoteSupervisor as dr, inProcessSandboxClient as ds, ExecRequest as dt, ObserverRecordKind as du, AnalystAssignmentRecord as dv, HeldForContinuation as dx, RootSegmentEntry as dy, contentAddress as eC, HarnessTranscriptMetadata as eS, GateDecision as e_, VisibleCheck as ea, Handle as eb, HarvestReport as ec, withRunContext as ed, FinalizerSettled as ef, decodeHarnessUsage as eg, DelegationStatus as eh, graphFromStored as ei, ShapeRegistry as el, extractLlmCallEvent as em, spendFromUsageEvents as en, ClaimRetainedInteractiveControlOptions as eo, CliWorktreeSeam as ep, supervisorRunDir as er, loopCampaignDispatch as es, AgentEnvironmentSummary as et, PursuitNodeProjection as eu, McpToolDescriptor as ev, ProfileMaterializationReceipt as ex, readRunCancellation as ey, BackendErrorDetail as f, NativeContextContinuationInput as fC, ProviderWorkspaceEntryMetadata as fS, QuestionEscalationOutcome as f_, structuralRollout as fa, FleetYield as fb, Corpus as fc, promptHandle as fd, CoordinationDeliveryEvidence as ff, Leaderboard as fg, KnowledgeUpdate as fh, DispatchReport as fi, LeaderboardSpec as fl, FeedbackEvent as fm, localShell as fn, PrivateCasOptions as fo, InboxLease as fp, connectRemoteSupervisorControl as fr, HttpMcpServerSpec as fs, ExecResult as ft, observerRecordDigest as fu, AnalystFindingEvent as fv, HeldRelease as fx, RootSignal as fy, OpenAIChatToolChoice as g, RecoverRetainedRunResult as gC, UsageEvent as gS, QuestionOption as g_, AgentTurnUsage as ga, RootProviderModelEvidence as gb, EqualKOnCostOptions as gc, SupervisorSpanRecorder as gd, CheckRead as gf, PairwiseVerdict as gg, ResearcherProfileOptions as gh, freeSlots as gi, DeclaredCheckStateCapture as gl, CoderReviewer as gm, WorkerToolTraceArtifact as gn, definePersona as go, DEFAULT_SHARED_BOX_WORKERS as gp, SupervisorCleanupReceipt as gr, McpSpawnFault as gs, SandboxEvent$1 as gt, GraphEdge as gu, AnalystRunContext as gv, WorkerTraceEvidence as gx, WorkerTraceResolver as gy, OpenAIChatTool as h, RecoverRetainedRunOptions as hC, TokenUsageProvenance as hS, QuestionLevel as h_, AgentTurnInput$1 as ha, ProviderModelExecutionEvidence as hb, EqualKArm as hc, SupervisorSpanOutcome as hd, PriorCoordination as hf, PairwiseOptions as hg, ResearchTask as hh, RollingDispatchOptions as hi, DeclaredCheckPlacement as hl, CoderReview as hm, analyzeTrace as hn, trajectoryReport as ho, DEFAULT_SHARED_BOX_RESOURCES as hp, ProvisionedSupervisor as hr, McpListedTool as hs, ResourceRequest as ht, EdgeTraversal as hu, AnalystRegistry$1 as hv, WorkerInteractiveUnavailableReason as hx, SupervisorOpts as hy, AgentExecutionBackend as i, AgentEvalErrorCode as iC, RetainedHarnessTranscriptDescriptor as iS, RouteFlowEvent as i_, defaultExtractCandidate as ia, RetainedExecutionState as ib, ObservationError as ic, analyzesFindingsReportPrompt as id, CoordinationControlAccess as if, CodeModeToolsOptions as ig, ResearchOutputShape as ih, loadGraph as ii, LeaderboardBenchScore as il, RouterRouting as im, withUntrackedArtifacts as in, startRetainedInteractiveRun as io, SandboxSeam as ip, RemoteSupervisorAgent as ir, TERMINAL_DECISIONS as is, AgentSessionStatus$1 as it, PursuitRunProjection as iu, BusStats as iv, Executor as ix, SpawnEvent as iy, DriverFailureClass as j, RetainedRunReplayPoint as jC, LoopSandboxPlacement as jS, MapOnSettleRoute as j_, OpenSandboxRunBeforeStartContext as ja, BudgetReadout as jb, ScopeWidenGate as jc, SupervisorAgentTestDeps as jd, ResolvedSpawnResourcePath as jf, plateauLength as jg, gateOnDeliverable as jh, chatTransportExecutor as ji, IsolatedCheckOutputOptions as jl, DelegationArgs as jm, assertSearchSpec as jn, assertTraceDerivedFindings as jo, ProviderLeafOut as jp, InPlaceCliExecutorOptions as jr, SurfaceScore as js, fsSurfaceReader as jt, RUN_FORK_CORRELATION_KEYS as ju, SqlAdapter as jv, ReconnectRetainedInteractiveRunOptions as jx, RuntimeStreamEventSummary as jy, DriverAttemptStop as k, RetainedRunHandle as kC, LoopPlanPayload as kS, WorkerResumeContext as k_, strategyTournament as ka, BudgetPool as kb, ScopeAnalyst as kc, ResolveSupervisorTools as kd, DriverRetryPolicy as kf, areaUnderCurve as kg, DeliverableSpec as kh, ChatTransportTool as ki, IsolatedCheckOutputEvidence as kl, RunDetachedTurnOptions as km, SearchSpecInputs as kn, CreateScopeAnalystOptions as ko, resolveAgentEnvironmentProvider as kp, InteractiveWorkerResult as kr, StrategyMessage as ks, WatchedSurface as kt, GraphRouteError as ku, SqlRunOwnershipError as kv, createActivityLog as kx, RuntimeStreamEventCollector as ky, AgentTaskRunResult as l, ValidationError as lC, ProviderWorkspaceCaptureProvenance as lS, EscalateQuestion as l_, resolveEntrySymbol as la, SubtreeResult as lb, renderReport as lc, formatPromptHandle as ld, serveCoordinationMcp as lf, AxisScoresOf as lg, UiFindingSeverity as lh, storedGraphDigests as li, LeaderboardRunContext as ll, ToolLoopCompactionOptions as lm, WorkspaceRun as ln, PrivateCasArtifactPort as lo, createSteerableSandboxSession as lp, RemoteSupervisorTree as lr, InProcessPromptCtx as ls, CreateAgentEnvironmentInput$1 as lt, ObserverJournal as lu, defaultToolDetectors as lv, ExecutorTeardownWarning as lx, RootHandle as ly, OpenAIChatResponseFormat as m, RecoverRetainedRunIntentOptions as mC, ExecutorToolCall as mS, QuestionEscalationTarget as m_, AgentTurnBackend as ma, ProviderModelAttemptEvidence as mb, CorpusRecord as mc, SupervisorSpanOptions as md, FileCoordinationLog as mf, LeaderboardRow as mg, ResearchSource as mh, DispatchUnit as mi, DeclaredCheck as ml, CoderDelegate as mm, TrajectoryAnalysis as mn, equalKOnCost as mo, PeerInboxMessage as mp, ProvisionSupervisorRequest as mr, MaterializeLocalMcpOptions as ms, PlacementInfo as mt, EdgeDeliveryOutcome as mu, AnalystLensOutput as mv, WorkerInteractiveSession as mx, Supervisor as my, AgentBackendContext as n, defaultRedactor as nC, HarnessTranscriptReadOptions as nS, JsonScalar as n_, compareCheckOutcomes as na, NodeSnapshot as nb, Observation as nc, PromptRegistry as nd, bestDelivered as nf, CodeModeTool as ng, FeedbackRating as nh, graphRunsFor as ni, providerAsSandboxClient as nl, RouterResponseReceipt as nm, UntrackedCopyStats as nn, reconnectRetainedInteractiveRun as no, RouterSeam as np, workerInboxFileFromEventDir as nr, superviseDispatch as ns, AgentSession as nt, PursuitNodeUsage as nu, BusEvent as nv, UnknownMaterializationReason as nx, InMemorySpawnJournal as ny, AgentRuntimeEvent as o, ConfigError as oC, resolveHarnessTranscriptCapture as oS, RouteMatch as o_, filterAuthoredAsserts as oa, SpawnOpts as ob, ObserveOptions as oc, delegatesWorkerBriefPrompt as od, CoordinationPublicAddress as of, RunCodeModeOptions as og, UiAuditorDelegationOutput as oh, pickBestGraph as oi, LeaderboardBenchmarkAdapter as ol, ToolLoopCallContext as om, Shell as on, resolveSandboxClient as oo, SandboxSteeringOptions as op, RemoteSupervisorControl as or, defaultSelectWinner as os, AnalystFinding$1 as ot, PursuitStatus as ou, PublishOptions as ov, ExecutorCancellation as ox, TraceRootReceipt as oy, KnowledgeReadinessDecision as p, ReconnectRetainedRunOptions as pC, ExecutorProgressEvent as pS, QuestionEscalationRecord as p_, visibleCheckScore as pa, NoWinnerError as pb, CorpusFilter as pc, SupervisorSpanAttributes as pd, CoordinationLog as pf, LeaderboardOptions as pg, ResearchOutput as ph, DispatchStopReason as pi, defineLeaderboard as pl, FeedbackStore as pm, runInWorkspace as pn, createPrivateCasArtifactPort as po, InboxMessage as pp, ProvisionSupervisorConnection as pr, LocalMcpMaterialization as ps, ForkRequest as pt, AgentGraph as pu, AnalystKind as pv, Runtime as px, SteerableRootHandle as py, WorkerSpawnContext as q, RuntimeRunCost as qS, createPeerMailbox as q_, PrivateCasNamespaceInventory as qa, ExecutionBindingReceipt as qb, Persona as qc, plateau as qd, createDelegateHandler as qf, EventAcknowledgement as qg, CodexRolloutTurn as qh, CheckSource as qi, superviseGraphPursuit as ql, DelegateUiAuditRoute as qm, WriteWorkerSteerOptions as qn, printBenchmarkReport as qo, SandboxOutputMarker as qp, GraphRunRecord as qr, defineStrategy as qs, EVIDENCE_MAX_CHARS as qt, subscriptionUsageLimitSignal as qu, FileSpawnJournal as qv, captureBoundHarnessTranscript as qx, BudgetOverspend as qy, AgentBackendInput as r, AgentEvalError$1 as rC, RetainedHarnessTranscriptCapture as rS, RouteFlow as r_, composeCheckSources as ra, NodeStatus as rb, ObservationAnalysis as rc, RegisteredPrompt as rd, CoordinationAuthentication as rf, CodeModeToolContext as rg, FeedbackRefersTo as rh, listGraphRuns as ri, DefinedLeaderboard as rl, RouterTransportConfig as rm, copyUntrackedIntoClone as rn, recoverRetainedInteractiveRun as ro, RouterToolsSeam as rp, writeWorkerSteer as rr, LocalSandboxClientOptions as rs, AgentSessionRef as rt, PursuitProjection as ru, BusRecord as rv, EnvironmentTeardownReceipt as rx, ResultBlobStore as ry, AgentRuntimeEventSink as s, JudgeError as sC, retainHarnessTranscript as sS, RouteWhen as s_, modelAuthoredChecks as sa, SpawnPrior as sb, defaultAnalystInstruction as sc, dumbContinuationFailPrompt as sd, CoordinationReadAccess as sf, createCodeModeTools as sg, UiFinding as sh, recordGraphRun as si, LeaderboardFlagSpec as sl, ToolLoopChat as sm, Workspace as sn, profileChatClient as so, SteerableSandboxArgs as sp, RemoteSupervisorReader as sr, inlineSandboxClient as ss, CheckpointRef as st, projectPursuit as su, createEventBus as sv, ExecutorCancellationRequest as sx, WorkspaceCheckpointMarker as sy, AgentAdapter as t, Redactor as tC, HarnessTranscriptReadLimits as tS, GateRequest as t_, canDisplace as ta, NodeId as tb, harvestCorpus as tc, PromptHandle as td, SupervisorFinalizer as tf, CodeModeStore as tg, DelegationStatusResult as th, graphRegistry as ti, ProviderAsSandboxClientOptions as tl, sumSandboxUsage as tm, CopyOptions as tn, claimRetainedInteractiveControl as to, ProviderSeam as tp, supervisorRunsRoot as tr, loopDispatch as ts, AgentProfile$2 as tt, PursuitNodeTiming as tu, McpTransport as tv, RootMaterialization as tx, InMemoryResultBlobStore as ty, AgentTaskSpec as u, NativeContextContinuationExecution as uC, ProviderWorkspaceCaptureReceipt as uS, Question as u_, sandboxCheckRunner as ua, SubtreeSummary as ub, AssertTraceDerivedFindings as uc, kernelPromptRegistry as ud, CoordinationHttpAudit as uf, GroupOf as ug, UiLens as uh, taskShapeDigest as ui, LeaderboardScenario as ul, ToolLoopMessageRecord as um, gitWorkspace as un, PrivateCasDurableStore as uo, AuthorityInboxMessage as up, RemoteWorkerEvents as ur, InProcessSandboxClientOptions as us, CreateSandboxOptions$1 as ut, ObserverRecord as uu, watchTrace as uv, HeldEnvironment as ux, RootSegment as uy, RunAgentTaskStreamOptions as v, RetainedInteractiveEnvironmentAdmission as vC, DefaultVerdict$2 as vS, QuestionRecord as v_, StreamAgentTurnOptions as va, SupervisedResult as vb, FanoutOptions as vc, RootStreamRecord as vd, ContinuationEntry as vf, ScoreOf as vg, DelegationTraceSpan as vh, rollingDispatch as vi, checkProgramDigest as vl, DetachedSessionDelegateOptions as vm, DEFAULT_MAX_DEPTH as vn, FileCorpus as vo, SharedBoxPlacement as vp, ProfileRegistryDir as vr, StdioMcpServerSpec as vs, WorkspaceRequest as vt, GraphNode as vu, AuthoredAnalystDefinition as vv, SessionMessageLike as vx, createPropagatingTraceEmitter as vy, RuntimeFailureCode as w, RetainedRunCancellation as wC, LoopIterationDispatchPayload as wS, ContinuityMode as w_, StrategyEvolutionConfig as wa, UnconfirmedTeardown as wb, PanelJudge as wc, CoordinationVerbs as wd, PanelFinding as wf, renderPairwiseMarkdown as wg, CoderOutput as wh, defaultDelegateBudget as wi, IsolatedCheckBoxEvidence as wl, FleetWorkspaceExecutorOptions as wm, SqlRunContextOptions as wn, panel as wo, sharedBoxRefusal as wp, profileRunsForName as wr, AgenticTask as ws, HarvestSurfaceDiffsOptions as wt, runGraph as wu, runLocalHarness as wv, DEFAULT_STALL_AFTER_MS as wx, OtelSpan as wy, RuntimeSessionStore as x, RetainedRunAdmission as xC, Iteration as xS, AuthorizeDownMessage as x_, EvolutionAuthor as xa, ResumedKeyState as xb, LoopUntilSpec as xc, supervisorAgent as xd, ContinuationPanelResult as xf, renderLeaderboardHtml as xg, DelegationStore as xh, GraphDesignerExtraTools as xi, declaredCheckJudge as xl, detachedSessionDelegate as xm, ValidateStoredGraphOptions as xn, fanout as xo, SharedWorkerIdentity as xp, loadProfile as xr, AgenticOptions as xs, VerifierEnvironmentOptions as xt, RunGraphOptions as xu, CodexExecutionEvidence as xv, createPushTraceSource as xx, OtelExportConfig as xy, RuntimeCanonicalStreamEvent as y, RetainedInteractiveIntentAdmission as yC, Driver as yS, QuestionUrgency as y_, collectAgentTurn as ya, Agent as yb, FanoutSynthesis as yc, readRootStream as yd, ContinuationPanel as yf, leaderboard as yg, composeLoopTraceEmitters as yh, DesignerRunGraphEnv as yi, declaredCheckDeliverable as yl, DetachedWinnerSelection as ym, createSupervisor as yn, InMemoryCorpus as yo, SharedBoxPlacementOptions as yp, ProfileRunRecord as yr, connectStdioMcp as ys, computeFindingId$1 as yt, GraphResult as yu, AuthoredAnalystLimits as yv, ToolStepInput as yx, readTraceContextFromEnv as yy, MakeWorkerAgent as z, MountRecorder as zS, PeerMailLimits as z_, SandboxLineageHandle as za, ReserveOptions as zb, WidenDecision as zc, NoProgressForOptions as zd, createMcpServer as zf, InPlaceHarnessResult as zg, deterministicCompletion as zh, defaultProfileRichnessThresholds as zi, SettledPursuitVersion as zl, SubmitInput as zm, TRACE_SUMMARY_SCHEMA as zn, sanitizeMcpToolSchema as zo, KeyProvider as zp, GraphFileSeat as zr, ShotSpec as zs, WorktreeCliExecutorOptions as zt, SuperviseTestOptions as zu, loadSpawnForest as zv, HarnessTranscriptArtifact as zx, WorkerSlots as zy };
|
|
19628
|
-
//# sourceMappingURL=types-
|
|
19393
|
+
export { AgentEnvironmentStatus as $, SelectionReceipt as $S, PeerMailboxOptions as $_, recoverRetainedRun as $a, ExecutorRegistry as $b, RunPersonifiedOptions as $c, anyOf as $d, DelegateHandlerOptions as $f, AwaitWakeInput as $g, CodexRolloutStoreReader as $h, StructuralRolloutMessage as $i, PursuitCostProvenance as $l, DelegateUiAuditArgs as $m, readWorkerSteerRequests as $n, LoopOptionsForDispatch as $o, secretEnvOfMcpServer as $p, digestOfGraph as $r, HarvestCorpusOptions as $s, settledWorkerOut as $t, SeatStage as $u, cancelRun as $v, HarnessTranscriptFile as $x, SpendChannel as $y, DriverContinuationRecord as A, RetainedInteractiveStartedAdmission as AC, ExecCtx as AS, AuthorizedDownMessage as A_, runStrategyEvolution as Aa, SettledUsage as Ab, RenderCorpusToInstructionsOptions as Ac, supervisorAgentWithTestBrain as Ad, ContinuationPolicy as Af, renderLeaderboardMarkdown as Ag, FileDelegationStore as Ah, ChatTransportExecutorOptions as Ai, IsolatedCheckOutputDeclaration as Al, DelegationExecutor as Am, SearchSpecOwnedOption as An, widen as Ao, sharedBoxPlacement as Ap, InteractiveWorkerResult as Ar, RunAgenticOptions as As, boxSurfaceReader as At, GraphCheckPlacement as Au, LocalHarnessResult as Av, TraceSource as Ax, RuntimeStreamEventCollector as Ay, PeerAuditAccess as B, RetainedRunIntentAdmission as BC, LoopResult as BS, MapSpawnMarker as B_, SandboxLineage as Ba, BudgetReadout as Bb, Widen as Bc, SupervisorNodeContext as Bd, SpawnResourceBytes as Bf, renderAnytimeTable as Bg, mapExecutorResult as Bh, assessAuthoredProfile as Bi, PursuitVersions as Bl, DelegationRecord as Bm, TraceRootArtifact as Bn, createMcpEnvironment as Bo, ProviderPromptOptions as Bp, GraphFileSeat as Br, AuthoredStrategy as Bs, WorktreePatchArtifact as Bt, GraphTopology as Bu, materializeTreeView as Bv, readWorkerProgress as Bx, WorkerSlots as By, RuntimeFailureCause as C, ReconnectRetainedRunOptions as CC, ExecutorProgressEvent as CS, QuestionLevel as C_, EvolutionAuthor as Ca, ResumedWork as Cb, LoopUntilSpec as Cc, SupervisorSpanOutcome as Cd, PriorCoordination as Cf, PairwiseOptions as Cg, ResearchTask as Ch, GraphDesignerExtraTools as Ci, declaredCheckJudge as Cl, CoderReview as Cm, FencedSqlRunContext as Cn, fanout as Co, DEFAULT_SHARED_BOX_RESOURCES as Cp, pickBestProfile as Cr, AgenticOptions as Cs, BoxSurfaceReaderOptions as Ct, SuperviseOptions as Cu, AnalystRegistry$1 as Cv, Runtime as Cx, OtelExportStats as Cy, RetainedPendingCause as D, RetainedInteractiveAdmission as DC, AgentRunSpec as DS, QuestionUrgency as D_, StrategyTournament as Da, WorkerEventCursor as Db, PanelSpec as Dc, readRootStream as Dd, ContinuationPanel as Df, leaderboard as Dg, composeLoopTraceEmitters as Dh, delegate as Di, IsolatedCheckOptions as Dl, DetachedWinnerSelection as Dm, SEARCH_SPEC_CORRELATION_KEY as Dn, pipeline as Do, SharedBoxPlacementOptions as Dp, InteractiveWorkerEnvironment as Dr, AgenticTool as Ds, SurfaceReadOutcome as Dt, GraphCheckNode as Du, AuthoredAnalystLimits as Dv, WorkerTraceUnavailableReason as Dx, createOtelExporter as Dy, EvidencePendingEvent as E, RecoverRetainedRunResult as EC, UsageEvent as ES, QuestionRecord as E_, StrategyEvolutionConfig as Ea, WidenGate as Eb, PanelJudge as Ec, RootStreamRecord as Ed, ContinuationEntry as Ef, ScoreOf as Eg, DelegationTraceSpan as Eh, defaultDelegateBudget as Ei, IsolatedCheckBoxEvidence as El, DetachedSessionDelegateOptions as Em, CompiledSearchSpec as En, panel as Eo, SharedBoxPlacement as Ep, recordProfileRun as Er, AgenticTask as Es, SurfaceReadBox as Et, SuperviseRegistryTable as Eu, AuthoredAnalystDefinition as Ev, WorkerTraceEvidence as Ex, buildLoopOtelSpans as Ey, CoordinationTools as F, RetainedRunDispatchedAdmission as FC, LoopIterationEndedPayload as FS, DownMessageDeliveryOutcome as F_, OpenSandboxRunPromptOptions as Fa, SpawnForestNode as Fb, TrajectoryNode as Fc, ObserveSupervisorNodeEvent as Fd, DriverContractState as Ff, AnytimeTaskCurve as Fg, CheckVerdict as Fh, createChatSessionStore as Fi, JudgedPursuitVersion as Fl, createSiblingSandboxExecutor as Fm, settledToIteration as Fn, createScopeAnalyst as Fo, AgentEnvironmentProviderRegistry as Fp, ObservedSessionFacts as Fr, depthStrategy as Fs, failuresAnalyst as Ft, EdgeTraversal as Fu, CodexTokenUsage as Fv, ExecutorProgress as Fx, SanitizedKnowledgeRequirement as Fy, SpawnRefusalCause as G, StartRetainedRunInEnvironmentOptions as GC, LoopTraceEmitter as GS, PeerMailEnvelope as G_, acquireSandbox as Ga, ReservationShortfall as Gb, DefinePersona as Gc, SupervisorProfile as Gd, McpServer as Gf, RunAgentRoundsOptions as Gg, CompletionVerdict as Gh, CheckExecChannel as Gi, SuperviseGraphPursuitOptions as Gl, DelegationTaskQueue as Gm, WorkerSteerAcknowledgement as Gn, BenchmarkReport as Go, BridgeModelCredential as Gp, GraphCorpusGroup as Gr, StrategyResult as Gs, attachWorker as Gt, runGraphWithTestBrain as Gu, SpawnJournalReadRecord as Gv, RetainedInteractiveRunHandle as Gx, RunParkingRecord as Gy, SpawnPreflight as H, RetainedRunSnapshot as HC, LoopStartedPayload as HS, AUTHORITY_MARKERS as H_, createSandboxLineage as Ha, ReservationFloor as Hb, WidenLineage as Hc, SupervisorToolDescriptor as Hd, SpawnResourceReader as Hf, WaterfallReport as Hg, CompletionAnalyst as Hh, profileRichnessFinding as Hi, VersionJudge as Hl, DelegationResumeDriver as Hm, RunTraceSources as Hn, BenchmarkCell as Ho, UnavailablePausePolicy as Hp, LoadedGraphFile as Hr, Strategy as Hs, AttachWorkerOptions as Ht, RunGraphTestOptions as Hu, replaySpawnTree as Hv, RecoverRetainedInteractiveRunOptions as Hx, ParkedRun as Hy, CoordinationToolsOptions as I, RetainedRunEffect as IC, LoopIterationStartedPayload as IS, DownMessageEvent as I_, SandboxRun as Ia, SpawnForestTree as Ib, TrajectoryReport as Ic, ResolveDriveHarness as Id, DriverReentry as If, anytimeReport as Ig, CompletionCheckContext as Ih, AuthoredProfile as Ii, NextPursuitVersion as Il, DetachedTurn as Im, createScope as In, registryScopeAnalyst as Io, createAgentEnvironmentProviderRegistry as Ip, graphFromSessionFacts as Ir, refine as Is, AuthoredHarness as It, GraphEdge as Iu, CodexExecutionPolicy as Iv, ScopeProgressInput as Ix, createRuntimeEventCollector as Iy, AgentEnvironment$1 as J, MountManifestEntry as JS, PeerMailOutcome as J_, createS3PrivateCasStore as Ja, ReserveOptions as Jb, Outcome as Jc, PlateauOptions as Jd, EventSubscription as Jf, WorktreeCheckRunner as Jg, sentinelCompletion as Jh, CheckRunner as Ji, SupervisedPursuitResult as Jl, SubmitOutput as Jm, cancelWorker as Jn, Environment as Jo, ResolvedMcpServerLaunch as Jp, GraphRunQuery as Jr, authorStrategy as Js, NOTE_MAX_CHARS as Jt, PortableContinuationPolicy as Ju, FileSpawnJournal as Jv, HARNESS_TRANSCRIPT_SETTLE_TIMEOUT_MS as Jx, BudgetOverspend as Jy, SuperviseProfileEntry as K, StartRetainedRunOptions as KC, LoopTraceEvent as KS, PeerMailEvent as K_, S3PrivateCasStore as Ka, ReservationStage as Kb, DefinePersonaInput as Kc, AllWorkersStalledOptions as Kd, McpServerOptions as Kf, runAgentRounds as Kg, completionAuthorizes as Kh, CheckOutcome as Ki, SupervisePursuitError as Kl, DelegationTaskQueueOptions as Km, WorkerSteerRequest as Kn, BenchmarkStrategySummary as Ko, BridgeSeam as Kp, GraphCorpusSummary as Kr, adaptiveRefine as Ks, readWorkerInteractiveBinding as Kt, defaultEdgeTraversalCap as Ku, SpawnJournalReadResult as Kv, RetainedInteractiveStartMaterial as Kx, readRunParking as Ky, GraphSubtaskPreparation as L, RetainedRunEnvironmentAdmission as LC, LoopLineageOptions as LS, WorkerResumeContext as L_, SandboxRunAbortError as La, loadSpawnForest as Lb, TrajectoryReportOptions as Lc, ResolveSupervisorTools as Ld, DriverRetryPolicy as Lf, areaUnderCurve as Lg, DeliverableSpec as Lh, ProfileRichness as Li, NextPursuitVersionInput as Ll, RunDetachedTurnOptions as Lm, ScopeArgs as Ln, observationFromRegistry as Lo, resolveAgentEnvironmentProvider as Lp, graphFileSchema as Lr, runAgentic as Ls, WorktreeFanoutOptions as Lt, GraphEdgeCapError as Lu, SqlRunOwnershipError as Lv, TeamProgress as Lx, createRuntimeStreamEventCollector as Ly, DriverRepromptRefusal as M, RetainedRunAdmissionHook as MC, LoopDecisionPayload as MS, ContinuityMode as M_, Deliverable as Ma, SpawnForestEvent as Mb, ScopeAnalyzeInput as Mc, CoordinationVerbs as Md, PanelFinding as Mf, renderPairwiseMarkdown as Mg, CoderOutput as Mh, ChatWorkerSeamOptions as Mi, IsolatedCheckOutputFailure as Ml, FleetWorkspaceExecutorOptions as Mm, compileSearchSpec as Mn, RegistryAnalyzeProjection as Mo, sharedBoxRefusal as Mp, InPlaceCliExecutorOptions as Mr, StrategyShotResult as Ms, harvestSurfaceDiffs as Mt, GraphFromStoredOptions as Mu, runLocalHarness as Mv, ActivityLog as Mx, RuntimeStreamEventSummary as My, BlockedToolReport as N, RetainedRunCancelOptions as NC, LoopEndedPayload as NS, DownMessageAuthorizationInput as N_, OpenSandboxRunBeforeStartContext as Na, SpawnForestInDoubtNode as Nb, ScopeWidenGate as Nc, DriveHarness as Nd, VerdictSummary as Nf, AnytimeReport as Ng, CoderTask as Nh, chatTransportExecutor as Ni, IsolatedCheckOutputOptions as Nl, SiblingSandboxExecutorOptions as Nm, searchPresets as Nn, assertTraceDerivedFindings as No, sharedWorkerClientName as Np, createInPlaceCliExecutor as Nr, SurfaceScore as Ns, AnalystAuthoring as Nt, AgentGraph as Nu, LOCAL_HARNESSES as Nv, ActivityNote as Nx, RuntimeTelemetryOptions as Ny, DriverAttemptRecord as O, RetainedInteractiveEnvironmentAdmission as OC, DefaultVerdict$2 as OS, questionEscalationTargets as O_, TournamentCell as Oa, WorkerEventEntry as Ob, PanelVerdict as Oc, readRootStreamReceipt as Od, ContinuationPanelInput as Of, pairwiseSignificance as Og, DelegationPersistenceError as Oh, ChatCompletionsTransport as Oi, IsolatedCheckResult as Ol, UiAuditorDelegate as Om, SearchSpec as On, selectValidWinner as Oo, SharedBoxStats as Op, InteractiveWorkerKeyInput as Or, ArtifactHandle as Os, SurfaceReader as Ot, GraphCheckNodes as Ou, DefinedAnalystRecord as Ov, SessionMessageLike as Ox, loopEventToOtelSpan as Oy, CoordinationStats as P, RetainedRunCancellation as PC, LoopIterationDispatchPayload as PS, DownMessageDeliveryAttempt as P_, OpenSandboxRunOptions as Pa, SpawnForestMissingTree as Pb, SteerContext as Pc, DriveHarnessOwnerContext as Pd, admitContinuationPolicy as Pf, AnytimeStrategySummary as Pg, CheckUnavailableError as Ph, chatWorkerSeam as Pi, validateIsolatedCheckOutputs as Pl, createFleetWorkspaceExecutor as Pm, searchSpecDigest as Pn, buildSteerContext as Po, AgentEnvironmentProviderRef as Pp, GraphSessionObservationOptions as Pr, breadthStrategy as Ps, analystsFromRegistry as Pt, EdgeDeliveryOutcome as Pu, LocalHarness as Pv, DEFAULT_STALL_AFTER_MS as Px, SanitizedKnowledgeReadinessReport as Py, AgentEnvironmentQuery as Q, SandboxClient as QS, PeerMailbox as Q_, reconnectRetainedRun as Qa, ExecutorFactory as Qb, RunPersonified as Qc, allWorkersStalled as Qd, DelegateError as Qf, GitRunner as Qg, CodexRolloutSession as Qh, StructuralRolloutConfig as Qi, PursuitObserverDelivery as Ql, DelegateResearchConfig as Qm, readWorkerSteerAcknowledgement as Qn, LoopDispatchOptions as Qo, resolveSecretEnv as Qp, StoredGraphInput as Qr, strategyAuthorSystemPrompt as Qs, composeWorkerEvidence as Qt, SeatSelectionInput as Qu, RunCancellation as Qv, HarnessTranscriptEvidence as Qx, Spend as Qy, GraphSubtasks as R, RetainedRunEventOptions as RC, LoopPlanDescription as RS, MapItemFailurePolicy as R_, TurnResult as Ra, BudgetPool as Rb, Verify as Rc, SupervisorAgentDeps as Rd, ResolveSpawnResourcePathsResult as Rf, bestSoFar as Rg, ExecutorResultMapping as Rh, ProfileRichnessThresholds as Ri, PursuitVersionChain as Rl, runDetachedTurn as Rm, TRACE_ROOT_SCHEMA as Rn, McpEndpoint as Ro, ProviderExecutorOptions as Rp, graphRouteWhenSchema as Rr, sample as Rs, worktreeFanout as Rt, GraphNode as Ru, openSqlRunStore as Rv, WorkerProgress as Rx, sanitizeKnowledgeReadinessReport as Ry, RuntimeStreamEvent as S, NativeContextContinuationInput as SC, ProviderWorkspaceEntryMetadata as SS, QuestionEscalationTarget as S_, streamAgentTurn as Sa, ResumedKeyState as Sb, FanoutWinnerSelector as Sc, SupervisorSpanOptions as Sd, FileCoordinationLog as Sf, LeaderboardRow as Sg, ResearchSource as Sh, DesignerToolsEnv as Si, declaredCheckDigest as Sl, CoderDelegate as Sm, validateStoredGraph as Sn, renderCorpusToInstructions as So, PeerInboxMessage as Sp, loadProfile as Sr, materializeLocalMcp as Ss, createVerifierEnvironment as St, AuthorizedSpawnContext as Su, AnalystLensOutput as Sv, HeldRelease as Sx, OtelExportConfig as Sy, RuntimeFailureOwner as T, RecoverRetainedRunOptions as TC, TokenUsageProvenance as TS, QuestionPolicy as T_, EvolutionStrategy as Ta, UnconfirmedTeardown as Tb, Panel as Tc, createSupervisorSpanRecorder as Td, ContinuationAppend as Tf, ProfileKeyOf as Tg, researcherProfile as Th, DelegateOptions as Ti, IsolatedCheckBox as Tl, DelegateRunCtx as Tm, createFencedSqlRunContext as Tn, loopUntil as To, SharedBoxCloseReceipt as Tp, profileRunsForName as Tr, AgenticSurface as Ts, SurfaceDiff as Tt, SuperviseRegistry as Tu, AnalyzeOnSettleRoute as Tv, WorkerInteractiveUnavailableReason as Tx, OtelSpan as Ty, SpawnPreflightContext as U, RetainedRunStartMaterial as UC, LoopTeardownFailedPayload as US, DEFAULT_PEER_MAIL_LIMITS as U_, SandboxEvidenceReceipt as Ua, ReservationHolder as Ub, WidenSpec as Uc, SupervisorToolInvocationContext as Ud, environmentReader as Uf, WaterfallSpan as Ug, CompletionEvidence as Uh, supervisorInstructions as Ui, VersionVerdict as Ul, DelegationResumeTick as Um, runToolSpans as Un, BenchmarkConfig as Uo, ProviderPlacement as Up, graphWorkspace as Ur, StrategyArtifacts as Us, WorkerInteractiveBinding as Ut, TraversalContinuity as Uu, SpawnJournalCursor as Uv, RetainedInteractiveAdmissionHook as Ux, RunParkedError as Uy, SettledWorker as V, RetainedRunReplayPoint as VC, LoopSandboxPlacement as VS, MapTraversalEvent as V_, SandboxLineageHandle as Va, LeakedReservation as Vb, WidenDecision as Vc, SupervisorNodeContextSeed as Vd, SpawnResourceRead as Vf, WaterfallCollector as Vg, verdictFromJudgeScore as Vh, defaultProfileRichnessThresholds as Vi, SettledPursuitVersion as Vl, DelegationResumeContext as Vm, TraceSummary as Vn, sanitizeMcpToolSchema as Vo, providerAsExecutor as Vp, LoadGraphFileOptions as Vr, ShotSpec as Vs, createWorktreeCliExecutor as Vt, RunGraphOptions as Vu, FileResultBlobStore as Vv, ReconnectRetainedInteractiveRunOptions as Vx, createWorkerSlots as Vy, SpawnRefusal as W, RetainedRunTurnInput as WC, LoopTokenUsage as WS, PEER_MAIL_WIRE_KEY as W_, AcquireOptions as Wa, ReservationRejection as Wb, WinnerStrategy as Wc, ManagerWakePolicy as Wd, resolveSpawnResourcePaths as Wf, createWaterfallCollector as Wg, CompletionPolicy as Wh, RunCancellationReason as Wi, assertPursuitVersions as Wl, DelegationRunContext as Wm, WorkerCancellation as Wn, BenchmarkLift as Wo, BridgeHarnessStore as Wp, loadGraphFile as Wr, StrategyCtx as Ws, WorkerInteractiveProviderSource as Wt, runGraph as Wu, SpawnJournalReadOptions as Wv, RetainedInteractiveEnvironmentInput as Wx, RunParkingPolicy as Wy, AgentEnvironmentEvent$1 as X, OutputAdapter as XS, PeerMailRefusal as X_, PrivateCasNamespaceObject as Xa, AgentSpec as Xb, PersonaContext as Xc, StopDecision as Xd, McpEventRecord as Xf, WorktreeHarnessResult as Xg, CodexForkBoundary as Xh, CheckSourceCtx as Xi, supervisePursuit as Xl, DelegateCodeConfig as Xm, legacySupervisorRunDir as Xn, runBenchmark as Xo, mcpSecretEnvMetadataKey as Xp, GraphSelection as Xr, sampleThenRefine as Xs, WorkerEvidenceInput as Xt, SeatSegment as Xu, readRunState as Xv, HarnessTranscriptBinding as Xx, ResourceLimit as Xy, AgentEnvironmentCapabilities$1 as Y, MountRecorder as YS, PeerMailReadout as Y_, PrivateCasNamespaceInventory as Ya, createBudgetPool as Yb, Persona as Yc, ProgressView as Yd, EventSubscriptionStore as Yf, WorktreeCommandResult as Yg, stopSentinel as Yh, CheckSource as Yi, superviseGraphPursuit as Yl, DelegateCodeArgs as Ym, fileEscalateQuestion as Yn, printBenchmarkReport as Yo, envKeyProvider as Yp, GraphRunRecord as Yr, defineStrategy as Ys, VERIFY_TAIL_CHARS as Yt, portableContinuationPolicySchema as Yu, RunState as Yv, HarnessTranscriptArtifact as Yx, BudgetViolation as Yy, AgentEnvironmentProvider$1 as Z, RunProvenance as ZS, PeerMailSendInput as Z_, PrivateCasNamespaceRetirement as Za, ExecutorContext as Zb, PersonaExecutors as Zc, StopRule as Zd, McpEventSource as Zf, WorktreeProfileMaterializationReceipt as Zg, CodexRolloutIdentity as Zh, RepairStop as Zi, RunReopen as Zl, DelegateResearchArgs as Zm, readWorkerCancellation as Zn, LoopCampaignDispatchOptions as Zo, resolveMcpServerLaunch as Zp, StoredGraph as Zr, strategyAuthorContract as Zs, closingWorkerNote as Zt, SeatSelection as Zu, RunCancelRequest as Zv, HarnessTranscriptCapture as Zx, ResourceSpend as Zy, RunAgentTaskOptions as _, JudgeError as _C, retainHarnessTranscript as _S, EscalateQuestion as __, AgentTurnInput$1 as _a, RootProviderModelEvidence as _b, EqualKArm as _c, formatPromptHandle as _d, serveCoordinationMcp as _f, AxisScoresOf as _g, UiFindingSeverity as _h, RollingDispatchOptions as _i, DeclaredCheckPlacement as _l, ToolLoopCompactionOptions as _m, parseWorkerToolTraceArtifact as _n, trajectoryReport as _o, createSteerableSandboxSession as _p, SupervisorCleanupReceipt as _r, McpListedTool as _s, SandboxInstance$1 as _t, supervise as _u, defaultToolDetectors as _v, ExecutorCancellationRequest as _x, WorkerTraceResolver as _y, AgentKnowledgeProvider as a, RuntimeRunOptions as aC, harnessTranscriptArtifact as aS, ToolOutcomeEvent as a_, composeCheckSources as aa, RetainedExecutionState as ab, ObservationAnalysis as ac, RunContextLease as ad, composeReentryTask as af, harnessUsageIsEmpty as ag, DelegationHistoryEntry as ah, listGraphRuns as ai, DefinedLeaderboard as al, mapSandboxToolEvent as am, GitWorkspaceOptions as an, recoverRetainedInteractiveRun as ao, CliInPlaceSeam as ap, RemoteSupervisorAgent as ar, LocalSandboxClientOptions as as, AgentTurnResult$2 as at, PursuitProjection as au, JsonRpcMessage as av, ExecutorNodeContext as ax, SpawnEvent as ay, RuntimeSession as b, NativeContextContinuationExecution as bC, ProviderWorkspaceCaptureReceipt as bS, QuestionEscalationOutcome as b_, StreamAgentTurnOptions as ba, Agent as bb, FanoutOptions as bc, promptHandle as bd, CoordinationDeliveryEvidence as bf, Leaderboard as bg, KnowledgeUpdate as bh, rollingDispatch as bi, checkProgramDigest as bl, FeedbackEvent as bm, createRootHandle as bn, FileCorpus as bo, InboxLease as bp, ProfileRunRecord as br, StdioMcpServerSpec as bs, makeFinding$1 as bt, workerFromBackend as bu, AnalystFindingEvent as bv, HeldEnvironment as bx, readTraceContextFromEnv as by, AgentTaskContext as c, RuntimeRunStatus as cC, HARNESS_TRANSCRIPT_READ_LIMITS as cS, GateDecision as c_, filterAuthoredAsserts as ca, SpawnPrior as cb, ObserveOptions as cc, withRunContext as cd, FinalizerSettled as cf, decodeHarnessUsage as cg, DelegationStatus as ch, pickBestGraph as ci, LeaderboardBenchmarkAdapter as cl, extractLlmCallEvent as cm, WorkspaceCommit as cn, resolveSandboxClient as co, CliWorktreeSeam as cp, RemoteSupervisorReader as cr, defaultSelectWinner as cs, CheckpointRequest as ct, PursuitStatus as cu, McpToolDescriptor as cv, MaterializedResources as cx, WorkspaceCheckpointMarker as cy, AgentTaskStatus as d, Redactor as dC, HarnessTranscriptReadLimits as dS, RouteFlow as d_, resolveEntrySymbol as da, SubtreeSummary as db, renderReport as dc, RegisteredPrompt as dd, CoordinationAuthentication as df, CodeModeToolContext as dg, FeedbackRefersTo as dh, storedGraphDigests as di, LeaderboardRunContext as dl, RouterTransportConfig as dm, jjWorkspace as dn, PrivateCasArtifactPort as do, RouterToolsSeam as dp, RemoteWorkerEvents as dr, InProcessPromptCtx as ds, ExecRequest as dt, ObserverJournal as du, BusRecord as dv, RootMaterialization as dx, RootSegment as dy, ValidationCtx as eC, HarnessTranscriptUnavailable as eS, CoordinationEvent as e_, StructuralRolloutPolicy as ea, SpendGap as eb, HarvestError as ec, SelectSeat as ed, noProgressFor as ef, CodexRolloutStoreRef as eg, DelegateUiAuditConfig as eh, graphCorpusSummary as ei, ShapeBudget as el, SandboxLeafOut as em, spendFromUsageEvents as en, startRetainedRun as eo, DelegateResult as ep, safeWorkerFile as er, SuperviseDispatchOptions as es, AgentEnvironmentSummary as et, PursuitNodeCost as eu, claimsAuthority as ev, SpawnModelSubstitution as ex, readRunCancelRequest as ey, BackendErrorDetail as f, defaultRedactor as fC, HarnessTranscriptReadOptions as fS, RouteFlowEvent as f_, sandboxCheckRunner as fa, TreeView as fb, AssertTraceDerivedFindings as fc, analyzesFindingsReportPrompt as fd, CoordinationControlAccess as ff, CodeModeToolsOptions as fg, ResearchOutputShape as fh, taskShapeDigest as fi, LeaderboardScenario as fl, RouterRouting as fm, localShell as fn, PrivateCasDurableStore as fo, SandboxSeam as fp, connectRemoteSupervisor as fr, InProcessSandboxClientOptions as fs, ExecResult as ft, ObserverRecord as fu, BusStats as fv, UnknownMaterializationReason as fx, RootSegmentEntry as fy, OpenAIChatToolChoice as g, ConfigError as gC, resolveHarnessTranscriptCapture as gS, ChildQuestionInbox as g_, AgentTurnBackend as ga, ProviderModelExecutionEvidence as gb, CorpusRecord as gc, dumbContinuationPassPrompt as gd, CoordinationTransportOptions as gf, runCodeMode as gg, UiFindingScreenshot as gh, DispatchUnit as gi, DeclaredCheck as gl, ToolLoopCompaction as gm, WorkerToolTraceArtifact as gn, equalKOnCost as go, SteerableSandboxSession as gp, ProvisionedSupervisor as gr, MaterializeLocalMcpOptions as gs, SandboxEvent$1 as gt, RUN_FORK_CORRELATION_KEYS as gu, WatchTraceOptions as gv, ExecutorCancellation as gx, SupervisorOpts as gy, OpenAIChatTool as h, BackendTransportError as hC, readBoundHarnessSessions as hS, RouteWhen as h_, visibleCheckScore as ha, ProviderModelAttemptEvidence as hb, CorpusFilter as hc, dumbContinuationFailPrompt as hd, CoordinationReadAccess as hf, createCodeModeTools as hg, UiFinding as hh, DispatchStopReason as hi, defineLeaderboard as hl, ToolLoopChat as hm, analyzeTrace as hn, createPrivateCasArtifactPort as ho, SteerableSandboxArgs as hp, ProvisionSupervisorRequest as hr, LocalMcpMaterialization as hs, ResourceRequest$1 as ht, PursuitFork as hu, createEventBus as hv, ExecutorAccounting as hx, Supervisor as hy, AgentExecutionBackend as i, RuntimeRunHandle as iC, captureHarnessTranscript as iS, ManagerWake as i_, compareCheckOutcomes as ia, NodeStatus as ib, Observation as ic, RunContext as id, UNPROVEN_CONTINUITY as if, createCodexRolloutStoreReader as ig, DelegationHistoryArgs as ih, graphRunsFor as ii, providerAsSandboxClient as il, mapSandboxEvent as im, withUntrackedArtifacts as in, reconnectRetainedInteractiveRun as io, createExecutor as ip, writeWorkerSteer as ir, superviseDispatch as is, AgentSessionStatus$1 as it, PursuitNodeUsage as iu, peerMailVerbNames as iv, ExecutorMaterialization as ix, ResultBlobStore as iy, DriverFailureClass as j, RetainedRunAdmission as jC, Iteration as jS, ContinuationInstruction as j_, strategyTournament as ja, SpawnForest as jb, ScopeAnalyst as jc, CoordinationToolFace as jd, ContinuationProfile as jf, renderLeaderboardSvg as jg, FileDelegationStoreOptions as jh, ChatTransportTool as ji, IsolatedCheckOutputEvidence as jl, FleetHandle as jm, assertSearchSpec as jn, CreateScopeAnalystOptions as jo, ROUTER_CLIENT_HEADER as jp, workerFromInteractiveProvider as jr, StrategyMessage as js, fsSurfaceReader as jt, GraphCommandCheck as ju, RunLocalHarnessOptions as jv, createPushTraceSource as jx, RuntimeStreamEventSink as jy, DriverAttemptStop as k, RetainedInteractiveIntentAdmission as kC, Driver as kS, AuthorizeDownMessage as k_, TournamentRow as ka, WorkerEventPage as kb, PipelineStage as kc, supervisorAgent as kd, ContinuationPanelResult as kf, renderLeaderboardHtml as kg, DelegationStore as kh, ChatSessionStore as ki, runIsolatedCheck as kl, detachedSessionDelegate as km, SearchSpecInputs as kn, verify as ko, SharedWorkerIdentity as kp, InteractiveWorkerOptions as kr, CorpusReadbackOptions as ks, WatchedSurface as kt, GraphCheckOutput as ku, CodexExecutionEvidence as kv, ToolStepInput as kx, RuntimeEventCollector as ky, AgentTaskRunResult as l, startRuntimeRun as lC, HarnessFileBinding as lS, GateRequest as l_, modelAuthoredChecks as la, SpawnRejection as lb, defaultAnalystInstruction as lc, PromptHandle as ld, SupervisorFinalizer as lf, CodeModeStore as lg, DelegationStatusResult as lh, recordGraphRun as li, LeaderboardFlagSpec as ll, sumSandboxUsage as lm, WorkspaceRun as ln, profileChatClient as lo, ProviderSeam as lp, RemoteSupervisorSteerResult as lr, inlineSandboxClient as ls, CreateAgentEnvironmentInput$1 as lt, projectPursuit as lu, McpTransport as lv, NodeExecutionIdentity as lx, RecursiveReservationPolicy as ly, OpenAIChatResponseFormat as m, AgentEvalErrorCode as mC, RetainedHarnessTranscriptDescriptor as mS, RouteMatch as m_, structuralRollout as ma, NoWinnerError as mb, Corpus as mc, delegatesWorkerBriefPrompt as md, CoordinationPublicAddress as mf, RunCodeModeOptions as mg, UiAuditorDelegationOutput as mh, DispatchReport as mi, LeaderboardSpec as ml, ToolLoopCallContext as mm, TrajectoryAnalysis as mn, PrivateCasOptions as mo, SandboxSteeringOptions as mp, ProvisionSupervisorConnection as mr, HttpMcpServerSpec as ms, PlacementInfo as mt, observerRecordDigest as mu, PublishOptions as mv, Executor as mx, SteerableRootHandle as my, AgentBackendContext as n, RuntimeRunCompleteInput as nC, ReadableEnvironment as nS, LeadMessage as n_, VisibleCheck as na, NodeId as nb, HarvestReport as nc, InMemoryRunContext as nd, ReentryContinuity as nf, CodexStoreDelta as ng, DelegationError as nh, graphFromStored as ni, ShapeRegistry as nl, SandboxToolPartState as nm, UntrackedCopyStats as nn, ClaimRetainedInteractiveControlOptions as no, createExecutorRegistry as np, supervisorRunsRoot as nr, loopCampaignDispatch as ns, AgentSession as nt, PursuitNodeProjection as nu, isPeerMailEnvelope as nv, ExecutionBindingReceipt as nx, InMemoryResultBlobStore as ny, AgentRuntimeEvent as o, RuntimeRunPersistenceAdapter as oC, persistHarnessTranscript as oS, WorkerWatchOptions as o_, defaultExtractCandidate as oa, Settled as ob, ObservationError as oc, createFileRunContext as od, DeliveredOutput as of, readCodexRolloutSession as og, DelegationProgress as oh, loadGraph as oi, LeaderboardBenchScore as ol, SandboxServedBackend as om, Shell as on, startRetainedInteractiveRun as oo, CliSeam as op, RemoteSupervisorCancelResult as or, TERMINAL_DECISIONS as os, AnalystFinding$1 as ot, PursuitRunProjection as ou, JsonRpcResponse as ov, MaterializedExecutionIdentity as ox, SpawnJournal as oy, KnowledgeReadinessDecision as p, AgentEvalError$1 as pC, RetainedHarnessTranscriptCapture as pS, RouteGate as p_, selectBestIndex as pa, FleetYield as pb, CombinatorShape as pc, createPromptRegistry as pd, CoordinationMcpHandle as pf, CodeModeToolset as pg, UiAuditLensFilter as ph, GraphTriggerBinding as pi, LeaderboardScore as pl, ToolSpec as pm, runInWorkspace as pn, PrivateCasOffloadReport as po, DEFAULT_SANDBOX_STEERING_MAX_TURNS as pp, connectRemoteSupervisorControl as pr, inProcessSandboxClient as ps, ForkRequest as pt, ObserverRecordKind as pu, EventBus as pv, EnvironmentTeardownReceipt as px, RootSignal as py, WorkerSpawnContext as q, LoopWinner as qS, PeerMailLimits as q_, S3PrivateCasStoreOptions as qa, ReservationTicket as qb, LoopShape as qc, NoProgressForOptions as qd, createMcpServer as qf, InPlaceHarnessResult as qg, deterministicCompletion as qh, CheckRunContext as qi, SupervisePursuitOptions as ql, SubmitInput as qm, WriteWorkerSteerOptions as qn, BenchmarkTaskRow as qo, KeyProvider as qp, GraphRegistryDir as qr, assertStrategyContract as qs, EVIDENCE_MAX_CHARS as qt, GraphRouteError as qu, readSpawnJournal as qv, StartRetainedInteractiveRunOptions as qx, Budget as qy, AgentBackendInput as r, RuntimeRunCost as rC, captureBoundHarnessTranscript as rS, ManagerReentryState as r_, canDisplace as ra, NodeSnapshot as rb, harvestCorpus as rc, InMemoryRunContextOptions as rd, ReentryTaskInput as rf, addHarnessUsage as rg, DelegationFeedbackSnapshot as rh, graphRegistry as ri, ProviderAsSandboxClientOptions as rl, createSandboxToolPartState as rm, copyUntrackedIntoClone as rn, claimRetainedInteractiveControl as ro, ExecutorConfig as rp, workerInboxFileFromEventDir as rr, loopDispatch as rs, AgentSessionRef as rt, PursuitNodeTiming as ru, peerMailTools as rv, ExecutorExecutionBinding as rx, InMemorySpawnJournal as ry, AgentRuntimeEventSink as s, RuntimeRunRow as sC, BoundHarnessSession as sS, DecideGate as s_, defaultStructuralRolloutPolicy as sa, SpawnOpts as sb, ObserveInput as sc, createInMemoryRunContext as sd, FinalizeContext as sf, HarnessUsage as sg, DelegationResultPayload as sh, lookupGraph as si, LeaderboardBenchTask as sl, SandboxUsageLedger as sm, Workspace as sn, ResolveSandboxClientOptions as so, CliWorktreeBridgeSeam as sp, RemoteSupervisorControl as sr, TerminalDecision as ss, CheckpointRef as st, PursuitRunTotals as su, McpToolAnnotations as sv, MaterializedModelIdentity as sx, TraceRootReceipt as sy, AgentAdapter as t, Validator as tC, HarnessTranscriptUnavailableReason as tS, EventAcknowledgement as t_, StructuralRolloutResult as ta, Handle as tb, HarvestFailure as tc, subscriptionUsageLimitSignal as td, plateau as tf, CodexRolloutTurn as tg, DelegateUiAuditRoute as th, graphDigest as ti, ShapeContext as tl, SandboxOutputMarker as tm, CopyOptions as tn, startRetainedRunInEnvironment as to, createDelegateHandler as tp, supervisorRunDir as tr, SuperviseOptionsForDispatch as ts, AgentProfile$2 as tt, PursuitNodePlatform as tu, createPeerMailbox as tv, AgentExecutionRef as tx, readRunCancellation as ty, AgentTaskSpec as u, contentAddress as uC, HarnessTranscriptMetadata as uS, JsonScalar as u_, officialChecksFromMeta as ua, SubtreeResult as ub, observe as uc, PromptRegistry as ud, bestDelivered as uf, CodeModeTool as ug, FeedbackRating as uh, recordStoredGraphRun as ui, LeaderboardIterationInfo as ul, RouterResponseReceipt as um, gitWorkspace as un, profileOptimizerModelCall as uo, RouterSeam as up, RemoteSupervisorTree as ur, InProcessOnPrompt as us, CreateSandboxOptions$1 as ut, FileObserverJournal as uu, BusEvent as uv, ProfileMaterializationReceipt as ux, RootHandle as uy, RunAgentTaskStreamOptions as v, NotFoundError as vC, ProviderWorkspaceAttemptProvenance as vS, Question as v_, AgentTurnUsage as va, RootStreamReceipt as vb, EqualKOnCostOptions as vc, kernelPromptRegistry as vd, CoordinationHttpAudit as vf, GroupOf as vg, UiLens as vh, freeSlots as vi, DeclaredCheckStateCapture as vl, ToolLoopMessageRecord as vm, DEFAULT_MAX_DEPTH as vn, definePersona as vo, AuthorityInboxMessage as vp, provisionSupervisor as vr, McpSpawnFault as vs, WorkspaceRequest as vt, superviseFleetCapabilities as vu, watchTrace as vv, ExecutorResult as vx, TraceContext as vy, RuntimeFailureCode as w, RecoverRetainedRunIntentOptions as wC, ExecutorToolCall as wS, QuestionOption as w_, EvolutionReport as wa, Scope as wb, LoopUntilState as wc, SupervisorSpanRecorder as wd, CheckRead as wf, PairwiseVerdict as wg, ResearcherProfileOptions as wh, graphDesignerExtraTools as wi, readDeclaredCheck as wl, CoderReviewer as wm, SqlRunContextOptions as wn, flatWidenGate as wo, DEFAULT_SHARED_BOX_WORKERS as wp, profileRegistry as wr, AgenticRunResult as ws, HarvestSurfaceDiffsOptions as wt, SuperviseTestOptions as wu, AnalystRunContext as wv, WorkerInteractiveSession as wx, OtelExporter as wy, RuntimeSessionStore as x, NativeContextContinuationHandle as xC, ProviderWorkspaceCaptureResult as xS, QuestionEscalationRecord as x_, collectAgentTurn as xa, ReenteredWorkers as xb, FanoutSynthesis as xc, SupervisorSpanAttributes as xd, CoordinationLog as xf, LeaderboardOptions as xg, ResearchOutput as xh, DesignerRunGraphEnv as xi, declaredCheckDeliverable as xl, FeedbackStore as xm, ValidateStoredGraphOptions as xn, InMemoryCorpus as xo, InboxMessage as xp, bestProfileFor as xr, connectStdioMcp as xs, VerifierEnvironmentOptions as xt, AuthorizedSpawn as xu, AnalystKind as xv, HeldForContinuation as xx, OtelAttribute as xy, RuntimeCanonicalStreamEvent as y, ValidationError as yC, ProviderWorkspaceCaptureProvenance as yS, QuestionDecision as y_, CollectedAgentTurn as ya, SupervisedResult as yb, EqualKVerdict as yc, naiveContinuationPrompt as yd, CoordinationRejectReason as yf, Interval as yg, KnowledgeItem as yh, queueOf as yi, assertDeclaredCheck as yl, ToolLoopToolCall as ym, createSupervisor as yn, runPersonified as yo, Inbox as yp, ProfileRegistryDir as yr, StdioMcpConnection as ys, computeFindingId$1 as yt, superviseWithTestBrain as yu, AnalystAssignmentRecord as yv, ExecutorTeardownWarning as yx, createPropagatingTraceEmitter as yy, MakeWorkerAgent as z, RetainedRunHandle as zC, LoopPlanPayload as zS, MapOnSettleRoute as z_, openSandboxRun as za, BudgetPoolRestore as zb, VerifySpec as zc, SupervisorAgentTestDeps as zd, ResolvedSpawnResourcePath as zf, plateauLength as zg, gateOnDeliverable as zh, asAuthoredProfile as zi, PursuitVersionStop as zl, DelegationArgs as zm, TRACE_SUMMARY_SCHEMA as zn, McpEnvironmentOptions as zo, ProviderLeafOut as zp, GraphFileResolutionError as zr, AuthorStrategyOptions as zs, WorktreeCliExecutorOptions as zt, GraphResult as zu, SqlAdapter as zv, createActivityLog as zx, DeadlineCheckIn as zy };
|
|
19394
|
+
//# sourceMappingURL=types-C_qbnw9N.d.ts.map
|