@tangle-network/agent-runtime 0.115.1 → 0.117.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/README.md +7 -1
- package/dist/{activation-Bt_XVkjK.js → activation-BZ2FyX0O.js} +3 -3
- package/dist/{activation-Bt_XVkjK.js.map → activation-BZ2FyX0O.js.map} +1 -1
- package/dist/agent.d.ts +3 -64
- package/dist/agent.js +5 -207
- package/dist/agent.js.map +1 -1
- package/dist/{analyst-loop-BoNIG2hA.js → analyst-loop-DvSciOfB.js} +2 -2
- package/dist/{analyst-loop-BoNIG2hA.js.map → analyst-loop-DvSciOfB.js.map} +1 -1
- package/dist/analyst-loop.js +1 -1
- package/dist/candidate-execution/index.d.ts +3 -3
- package/dist/candidate-execution/index.js +5 -5
- package/dist/{candidate-execution-CfpJrd3o.js → candidate-execution-PX61zXd2.js} +4 -4
- package/dist/{candidate-execution-CfpJrd3o.js.map → candidate-execution-PX61zXd2.js.map} +1 -1
- package/dist/{environment-provider-Cygthiy3.d.ts → environment-provider-CTZjdIUg.d.ts} +661 -34
- package/dist/{environment-provider-CCaEhA-l.js → environment-provider-CzcEyRL7.js} +140 -31
- package/dist/environment-provider-CzcEyRL7.js.map +1 -0
- package/dist/environment-provider.d.ts +1 -1
- package/dist/environment-provider.js +1 -1
- package/dist/{improvement-cycle-tEswzEPr.js → improvement-cycle-Bcqz8rZI.js} +160 -19
- package/dist/improvement-cycle-Bcqz8rZI.js.map +1 -0
- package/dist/{index-DZukewLl.d.ts → index-BHSYaWrC.d.ts} +3 -3
- package/dist/{index-K7nucOmw.d.ts → index-BTUG4Xln.d.ts} +8 -7
- package/dist/{index-BUWd8QJq.d.ts → index-DPWJxSRa.d.ts} +884 -497
- package/dist/{index-C-FYUuFG.d.ts → index-X2YwyWkc.d.ts} +2 -2
- package/dist/index.d.ts +9 -10
- package/dist/index.js +12 -13
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +10 -9
- package/dist/intelligence.js +15 -9
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +4 -4
- package/dist/kernel.js +8 -8
- package/dist/{knowledge-CUXQE8Sq.js → knowledge-CDlrayRc.js} +7 -7
- package/dist/knowledge-CDlrayRc.js.map +1 -0
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{local-harness-BnB1E9nM.d.ts → local-harness-t6cDWDQ2.d.ts} +3 -105
- package/dist/{loop-runner-bin-DzJz48Fb.js → loop-runner-bin-BxhhDtmG.js} +4 -4
- package/dist/{loop-runner-bin-DzJz48Fb.js.map → loop-runner-bin-BxhhDtmG.js.map} +1 -1
- package/dist/{loop-runner-bin-BZl5vp7t.d.ts → loop-runner-bin-oyL7it5O.d.ts} +3 -3
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +43 -10
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +4 -43
- package/dist/mcp/index.js +5 -205
- package/dist/mcp/index.js.map +1 -1
- package/dist/{openai-tools-CynwZMZd.js → openai-tools-CO9X36zy.js} +2 -2
- package/dist/{openai-tools-CynwZMZd.js.map → openai-tools-CO9X36zy.js.map} +1 -1
- package/dist/{prepare-BHQBb02e.js → prepare-BbI6qGOW.js} +5 -2
- package/dist/prepare-BbI6qGOW.js.map +1 -0
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/{protected-model-port-BP6Z4eau.d.ts → protected-model-port-B0yXMpLL.d.ts} +10 -2
- package/dist/{protected-model-port-DqAH1Z2M.js → protected-model-port-COnyZfML.js} +2 -2
- package/dist/{protected-model-port-DqAH1Z2M.js.map → protected-model-port-COnyZfML.js.map} +1 -1
- package/dist/{redact-BRaHUFMf.d.ts → redact-BEtQtvd6.d.ts} +2 -2
- package/dist/{runtime-BatQajPB.js → runtime-Ce39zfqn.js} +145 -53
- package/dist/runtime-Ce39zfqn.js.map +1 -0
- package/dist/{sandbox-events-DeI5xX8P.js → sandbox-events-Yhd1GYWl.js} +4 -2
- package/dist/sandbox-events-Yhd1GYWl.js.map +1 -0
- package/dist/spawn-journal-B_mu_oH2.js +857 -0
- package/dist/spawn-journal-B_mu_oH2.js.map +1 -0
- package/dist/{structural-rollout-DEf37yQy.js → structural-rollout-DLwW69R4.js} +4 -4
- package/dist/structural-rollout-DLwW69R4.js.map +1 -0
- package/dist/{supervise-B7TIJR3D.js → supervise-U7_K5yuV.js} +2645 -829
- package/dist/supervise-U7_K5yuV.js.map +1 -0
- package/dist/{supervisor-DzQu5Ydu.js → supervisor-CAXiCKnX.js} +3802 -967
- package/dist/supervisor-CAXiCKnX.js.map +1 -0
- package/dist/testing.js +98 -76
- package/dist/testing.js.map +1 -1
- package/dist/{workspace-archive-DXzJq7WP.js → workspace-archive-CqPIijFA.js} +2 -2
- package/dist/{workspace-archive-DXzJq7WP.js.map → workspace-archive-CqPIijFA.js.map} +1 -1
- package/package.json +1 -1
- package/dist/environment-provider-CCaEhA-l.js.map +0 -1
- package/dist/improvement-cycle-tEswzEPr.js.map +0 -1
- package/dist/knowledge-CUXQE8Sq.js.map +0 -1
- package/dist/otel-export-CPZTSADj.js +0 -852
- package/dist/otel-export-CPZTSADj.js.map +0 -1
- package/dist/prepare-BHQBb02e.js.map +0 -1
- package/dist/runtime-BatQajPB.js.map +0 -1
- package/dist/sandbox-events-DeI5xX8P.js.map +0 -1
- package/dist/spawn-journal-DCPbicXB.js +0 -457
- package/dist/spawn-journal-DCPbicXB.js.map +0 -1
- package/dist/structural-rollout-DEf37yQy.js.map +0 -1
- package/dist/supervise-B7TIJR3D.js.map +0 -1
- package/dist/supervisor-DzQu5Ydu.js.map +0 -1
- package/dist/trace-propagation-B-pL7xn_.js +0 -57
- package/dist/trace-propagation-B-pL7xn_.js.map +0 -1
|
@@ -2,16 +2,148 @@ import { d as AgentTaskStatus, f as BackendErrorDetail, i as AgentExecutionBacke
|
|
|
2
2
|
import { n as AnalystRegistryLike } from "./types-zWfqDjeL.js";
|
|
3
3
|
import { l as RuntimeHooks } from "./runtime-hooks-sbRpjStq.js";
|
|
4
4
|
import { C as MountRecorder, D as SelectionReceipt, E as SandboxClient, a as Iteration, b as LoopTraceEvent, d as LoopLineageOptions, i as ExecCtx, k as Validator, m as LoopResult, r as Driver, t as AgentRunSpec, w as OutputAdapter, x as LoopWinner, y as LoopTraceEmitter } from "./types-DnNGJ5Gz.js";
|
|
5
|
-
import { B as
|
|
5
|
+
import { B as DefaultVerdict, Cn as WaitProbeRegistry, Ct as SupervisedResult, Et as TreeView, Fn as TraceSource, H as Executor, Hn as ExecutorProgress, I as Agent, K as ExecutorFactory, L as AgentExecutionRef, Nt as WorkerTraceResolver, Ot as UsageEvent, R as AgentSpec, Rt as TraceContext, St as SteerableRootHandle, V as ExecutionBindingReceipt, Wn as WorkerProgress, Xt as OtelExporter, Y as ExecutorRegistry, Yt as OtelExportConfig, _t as SpawnJournal, at as ProfileMaterializationReceipt, bn as PendingWait, ct as ResumedKeyState, gt as SpawnEvent, ht as Settled, i as AgentEnvironmentProvider, jt as WorkerTraceEvidence, mt as Scope, nt as NodeId, o as AgentEnvironmentProviderRegistry, pt as Runtime, rt as NodeSnapshot, st as ResultBlobStore, tt as NodeExecutionIdentity, ut as RootHandle, vt as SpawnOpts, w as ProviderExecutorOptions, wt as Supervisor, xt as Spend, z as Budget } from "./environment-provider-CTZjdIUg.js";
|
|
6
6
|
import { o as UiLens, r as UiFinding, s as CoderTask } from "./substrate-BcnuSHXm.js";
|
|
7
|
-
import {
|
|
8
|
-
import { AgentEvalError, AgentEvalError as AgentEvalError$1, AgentEvalErrorCode, AgentProfile, AnalystFinding, AnalystFinding as AnalystFinding$1, AnalystFinding as AnalystFinding$2, AnalystRunInputs, ChatClient, ConfigError, DetectorSignal, HarnessType, JudgeError, MaximumCharge, NotFoundError, ProposalFinding, RankTestMethod, RunRecord, StreamingDetector, ToolSpan, ValidationError, buildTrajectory, computeFindingId as computeFindingId$1, makeFinding as makeFinding$1 } from "@tangle-network/agent-eval";
|
|
7
|
+
import { S as ToolLoopCompactionOptions, b as ToolLoopChat, c as runLocalHarness, d as RouterConfig, i as LocalHarness, m as ToolSpec, n as CodexExecutionPolicy, r as CodexTokenUsage } from "./local-harness-t6cDWDQ2.js";
|
|
8
|
+
import { AgentEvalError, AgentEvalError as AgentEvalError$1, AgentEvalErrorCode, AgentProfile, AnalystFinding, AnalystFinding as AnalystFinding$1, AnalystFinding as AnalystFinding$2, AnalystRunInputs, ChatClient, ConfigError, DetectorSignal, HarnessType, JudgeError, MaximumCharge, NotFoundError, ProposalFinding, RankTestMethod, RunRecord, StreamingDetector, ToolSpan, TraceAnalysisStore, ValidationError, buildTrajectory, computeFindingId as computeFindingId$1, makeFinding as makeFinding$1 } from "@tangle-network/agent-eval";
|
|
9
9
|
import { DispatchFn, JudgeConfig, ProfileDispatchFn, RunProfileMatrixOptions, RunProfileMatrixResult, Scenario } from "@tangle-network/agent-eval/campaign";
|
|
10
|
-
import { AgentProfile as AgentProfile$1, AgentProfile as AgentProfile$2, AgentProfile as AgentProfile$3, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePrompt, AgentProfileResources, AgentProfileSecurityPolicy } from "@tangle-network/agent-interface";
|
|
10
|
+
import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentProfile as AgentProfile$1, AgentProfile as AgentProfile$2, AgentProfile as AgentProfile$3, AgentProfileMcpServer, AgentProfileModelHints, AgentProfilePrompt, AgentProfileResources, AgentProfileSecurityPolicy, CanonicalAgentProfileMaterializationAxis, Sha256Digest, profileMaterializationAxes } from "@tangle-network/agent-interface";
|
|
11
11
|
import { WorkspacePlanReceipt } from "@tangle-network/agent-profile-materialize";
|
|
12
12
|
import { BackendType, CreateSandboxOptions, CreateSandboxOptions as CreateSandboxOptions$1, PromptOptions, SandboxEvent, SandboxEvent as SandboxEvent$1, SandboxInstance, SandboxInstance as SandboxInstance$1 } from "@tangle-network/sandbox";
|
|
13
13
|
import { stuckLoopView, toolWasteView } from "@tangle-network/agent-eval/pipelines";
|
|
14
|
+
//#region src/agent/profile-materialization.d.ts
|
|
15
|
+
type KnownAgentProfileMaterializationAxis = CanonicalAgentProfileMaterializationAxis;
|
|
16
|
+
/** AgentProfile axis name, with `custom:<name>` reserved for caller-owned extensions. */
|
|
17
|
+
type AgentProfileMaterializationAxis = KnownAgentProfileMaterializationAxis | `custom:${string}`;
|
|
18
|
+
/** Declares which AgentProfile axes a concrete run path really carries. */
|
|
19
|
+
interface ProfileMaterializationContract {
|
|
20
|
+
/** Human-readable run path, e.g. `createSandboxAct` or `prompt-only-message`. */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Profile axes this run path actually carries into execution. */
|
|
23
|
+
axes: readonly AgentProfileMaterializationAxis[];
|
|
24
|
+
}
|
|
25
|
+
/** One changed AgentProfile axis that would be dropped by a run path. */
|
|
26
|
+
interface ProfileMaterializationIssue {
|
|
27
|
+
contract: string;
|
|
28
|
+
axis: AgentProfileMaterializationAxis;
|
|
29
|
+
reason: 'unsupported-axis';
|
|
30
|
+
supportedAxes: readonly AgentProfileMaterializationAxis[];
|
|
31
|
+
}
|
|
32
|
+
/** Input for declaring a run path's profile-axis support. */
|
|
33
|
+
interface DefineProfileMaterializationContractOptions {
|
|
34
|
+
name: string;
|
|
35
|
+
axes: readonly AgentProfileMaterializationAxis[];
|
|
36
|
+
}
|
|
37
|
+
/** Input for checking a candidate diff against a run path. */
|
|
38
|
+
interface ValidateProfileMaterializationOptions {
|
|
39
|
+
contract: ProfileMaterializationContract;
|
|
40
|
+
changedAxes: readonly AgentProfileMaterializationAxis[];
|
|
41
|
+
}
|
|
42
|
+
/** Input for throwing on dropped profile axes. */
|
|
43
|
+
interface AssertProfileMaterializationOptions extends ValidateProfileMaterializationOptions {
|
|
44
|
+
/** Extra label included in the thrown error, usually the caller or run id. */
|
|
45
|
+
context?: string;
|
|
46
|
+
}
|
|
47
|
+
/** Materialization contract for a run path that executes every canonical AgentProfile leaf. */
|
|
48
|
+
declare const fullProfileMaterialization: ProfileMaterializationContract;
|
|
49
|
+
/**
|
|
50
|
+
* Materialization contract for an intentionally limited prompt-and-model execution path.
|
|
51
|
+
* Identity, harness, and metadata are control fields consumed for naming, placement,
|
|
52
|
+
* authorization, and durable attribution; they are carried without adding worker behavior.
|
|
53
|
+
* Every behavioral axis other than prompt and model remains unsupported.
|
|
54
|
+
*/
|
|
55
|
+
declare const promptModelProfileMaterialization: ProfileMaterializationContract;
|
|
56
|
+
/**
|
|
57
|
+
* Materialization contract for a local coding CLI in an isolated git worktree.
|
|
58
|
+
* The shared workspace materializer carries native tools, permissions, MCP, hooks, subagents,
|
|
59
|
+
* modes, and file-backed resources when the selected CLI supports their exact values.
|
|
60
|
+
* `resourceFailOnError` is carried: it is the fail-closed policy the pre-worktree resource
|
|
61
|
+
* RESOLUTION step (`resolveAgentProfileResources`) applies to remote profile resources. Runtime
|
|
62
|
+
* placement concerns (hub connections and confidential execution), provider-native extensions,
|
|
63
|
+
* and unused model hints are deliberately absent so they fail before a worktree or executor is
|
|
64
|
+
* created rather than being mistaken for an effective candidate change.
|
|
65
|
+
*/
|
|
66
|
+
declare const worktreeCliProfileMaterialization: ProfileMaterializationContract;
|
|
67
|
+
/** Materialization contract for a raw process path that carries only control/identity fields. */
|
|
68
|
+
declare const controlProfileMaterialization: ProfileMaterializationContract;
|
|
69
|
+
/** Materialization contract for an injected inference function whose surrounding driver still
|
|
70
|
+
* applies the profile prompt, name, placement, and metadata, but not model selection. */
|
|
71
|
+
declare const promptControlProfileMaterialization: ProfileMaterializationContract;
|
|
72
|
+
/**
|
|
73
|
+
* Materialization contract for `createSandboxAct`.
|
|
74
|
+
*
|
|
75
|
+
* `createSandboxAct` hands the whole `AgentProfile` to the sandbox as `backend.profile`, so every
|
|
76
|
+
* profile leaf crosses the boundary. `buildBackendOptions` resolves the runner from an explicit
|
|
77
|
+
* `sandboxOverrides.backend.type`, then `profile.metadata.backendType`, then `profile.harness`,
|
|
78
|
+
* so a candidate that changes only `harness` runs on the harness it declares — and one declaring
|
|
79
|
+
* a harness the sandbox cannot run throws rather than running elsewhere and reporting success.
|
|
80
|
+
*/
|
|
81
|
+
declare const sandboxActProfileMaterialization: ProfileMaterializationContract;
|
|
82
|
+
/** Materialization contract for a run path that only injects prompt text. */
|
|
83
|
+
declare const promptOnlyProfileMaterialization: ProfileMaterializationContract;
|
|
84
|
+
/**
|
|
85
|
+
* Materialization contract for a run path that injects prompt text plus inline resources.
|
|
86
|
+
*
|
|
87
|
+
* `resourceFailOnError` is absent: it is a resolution POLICY the attaching path would have to
|
|
88
|
+
* enforce, and inlining resource content does not carry it.
|
|
89
|
+
*/
|
|
90
|
+
declare const promptResourceProfileMaterialization: ProfileMaterializationContract;
|
|
91
|
+
/** Define the profile axes a concrete run path actually carries into execution. */
|
|
92
|
+
declare function defineProfileMaterializationContract(options: DefineProfileMaterializationContractOptions): ProfileMaterializationContract;
|
|
93
|
+
/** Return every changed profile axis that the selected run path would drop. */
|
|
94
|
+
declare function validateProfileMaterialization(options: ValidateProfileMaterializationOptions): readonly ProfileMaterializationIssue[];
|
|
95
|
+
/** Throw when a candidate changes axes the selected run path cannot carry. */
|
|
96
|
+
declare function assertProfileMaterialization(options: AssertProfileMaterializationOptions): void;
|
|
97
|
+
/** Format profile-axis drop issues into a concise operator-facing error. */
|
|
98
|
+
declare function renderProfileMaterializationIssues(issues: readonly ProfileMaterializationIssue[], context?: string): string;
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/durable/content-address.d.ts
|
|
101
|
+
/** Stable content address shared by result and trace artifacts. */
|
|
102
|
+
declare function contentAddress(artifact: unknown): string;
|
|
103
|
+
//#endregion
|
|
14
104
|
//#region src/durable/spawn-journal.d.ts
|
|
105
|
+
/** One journal tree in a recursively loaded supervision forest. */
|
|
106
|
+
interface SpawnForestTree {
|
|
107
|
+
readonly root: NodeId;
|
|
108
|
+
/** Driver node that owns this tree; absent for the requested root tree. */
|
|
109
|
+
readonly ownerNodeId?: NodeId;
|
|
110
|
+
/** Journal tree containing `ownerNodeId`; absent for the requested root tree. */
|
|
111
|
+
readonly parentTreeRoot?: NodeId;
|
|
112
|
+
readonly events: ReadonlyArray<SpawnEvent>;
|
|
113
|
+
readonly view: TreeView;
|
|
114
|
+
}
|
|
115
|
+
/** One event with the journal tree that establishes its cursor namespace. */
|
|
116
|
+
interface SpawnForestEvent {
|
|
117
|
+
readonly treeRoot: NodeId;
|
|
118
|
+
readonly event: SpawnEvent;
|
|
119
|
+
}
|
|
120
|
+
/** One flattened node with the journal tree that owns its records. */
|
|
121
|
+
interface SpawnForestNode extends NodeSnapshot {
|
|
122
|
+
readonly treeRoot: NodeId;
|
|
123
|
+
}
|
|
124
|
+
/** A spawned worker with no terminal record in a cold snapshot. Resume treats the same state as
|
|
125
|
+
* in-doubt and conservatively retains its reservation. Root nodes and armed waits are excluded. */
|
|
126
|
+
interface SpawnForestInDoubtNode {
|
|
127
|
+
readonly treeRoot: NodeId;
|
|
128
|
+
readonly nodeId: NodeId;
|
|
129
|
+
readonly label: string;
|
|
130
|
+
readonly runtime: Runtime;
|
|
131
|
+
}
|
|
132
|
+
/** A driver spawn whose owned journal tree was never begun before the process stopped. */
|
|
133
|
+
interface SpawnForestMissingTree {
|
|
134
|
+
readonly parentTreeRoot: NodeId;
|
|
135
|
+
readonly ownerNodeId: NodeId;
|
|
136
|
+
readonly root: NodeId;
|
|
137
|
+
}
|
|
138
|
+
/** Complete cold-readable view of one recursive supervision run. */
|
|
139
|
+
interface SpawnForest {
|
|
140
|
+
readonly root: NodeId;
|
|
141
|
+
readonly trees: ReadonlyArray<SpawnForestTree>;
|
|
142
|
+
readonly nodes: ReadonlyArray<SpawnForestNode>;
|
|
143
|
+
readonly events: ReadonlyArray<SpawnForestEvent>;
|
|
144
|
+
readonly inDoubt: ReadonlyArray<SpawnForestInDoubtNode>;
|
|
145
|
+
readonly missingTrees: ReadonlyArray<SpawnForestMissingTree>;
|
|
146
|
+
}
|
|
15
147
|
/**
|
|
16
148
|
* Mint the content-addressed `outRef` for a result artifact: `sha256:<hex>` over a
|
|
17
149
|
* stable JSON encoding. Producers call this to derive the `outRef` they journal and
|
|
@@ -21,7 +153,6 @@ import { stuckLoopView, toolWasteView } from "@tangle-network/agent-eval/pipelin
|
|
|
21
153
|
* Stable encoding: object keys are sorted recursively so two structurally-equal
|
|
22
154
|
* artifacts hash identically regardless of key insertion order.
|
|
23
155
|
*/
|
|
24
|
-
declare function contentAddress(artifact: unknown): string;
|
|
25
156
|
/**
|
|
26
157
|
* In-memory `ResultBlobStore`. Content-addressed: `put` verifies the supplied
|
|
27
158
|
* `outRef` matches the artifact's hash so a stale/forged ref fails loud rather than
|
|
@@ -66,13 +197,33 @@ declare class InMemorySpawnJournal implements SpawnJournal {
|
|
|
66
197
|
*/
|
|
67
198
|
declare class FileSpawnJournal implements SpawnJournal {
|
|
68
199
|
private readonly path;
|
|
200
|
+
private appendTail;
|
|
69
201
|
constructor(path: string);
|
|
70
202
|
loadTree(root: NodeId): Promise<SpawnEvent[] | undefined>;
|
|
71
203
|
beginTree(root: NodeId, at: string): Promise<void>;
|
|
72
204
|
appendEvent(root: NodeId, ev: SpawnEvent): Promise<void>;
|
|
73
205
|
private loadTreeBegin;
|
|
74
206
|
private appendRecord;
|
|
207
|
+
private writeRecord;
|
|
75
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Load every journal tree owned by one recursive supervision run and flatten its nodes/events.
|
|
211
|
+
*
|
|
212
|
+
* Nested driver tree keys are a Runtime implementation detail; callers should use this reader
|
|
213
|
+
* instead of deriving or scanning keys themselves. The reader follows only the explicit
|
|
214
|
+
* `ownedTreeRoot` written after Runtime privately attested a recursive executor; the open runtime
|
|
215
|
+
* string `driver` is never treated as ownership. Legacy records without `ownedTreeRoot` are
|
|
216
|
+
* intentionally treated as leaves rather than guessing or scanning convention-derived keys.
|
|
217
|
+
* This preserves each tree's independent cursor namespace on flattened events.
|
|
218
|
+
* A driver whose subtree was never begun is reported in `missingTrees`; any spawned non-root node
|
|
219
|
+
* without a terminal record is reported in `inDoubt`, matching resume's conservative lost-work
|
|
220
|
+
* interpretation.
|
|
221
|
+
*
|
|
222
|
+
* This is a cold/quiescent reader, not a transaction across an actively mutating file. Every value
|
|
223
|
+
* returned is a detached immutable snapshot, so later journal writes or caller mutation cannot
|
|
224
|
+
* change the result already observed.
|
|
225
|
+
*/
|
|
226
|
+
declare function loadSpawnForest(journal: SpawnJournal, root: NodeId): Promise<SpawnForest>;
|
|
76
227
|
/**
|
|
77
228
|
* Re-feed a journaled spawn tree in strict `seq` order, rehydrating each settled
|
|
78
229
|
* child's `out` from the blob store by `outRef`, and return the `Settled[]` exactly
|
|
@@ -155,8 +306,8 @@ declare function watchTrace(source: TraceSource, opts?: WatchTraceOptions): () =
|
|
|
155
306
|
* queued settles/findings so the driver sees it first; ties resolve FIFO by publish order.
|
|
156
307
|
*
|
|
157
308
|
* Observability is first-class (A++): every event is stamped with a monotonic `seq` and wall-clock
|
|
158
|
-
* `at`, the full ordered `history()` is retained as
|
|
159
|
-
* published/pulled counts by kind. Subscribers receive the stamped record, not a bare event.
|
|
309
|
+
* `at`, the full ordered `history()` is retained as current-process audit evidence, and `stats()`
|
|
310
|
+
* exposes published/pulled counts by kind. Subscribers receive the stamped record, not a bare event.
|
|
160
311
|
*
|
|
161
312
|
* The interface is transport-agnostic on purpose. Same box → this in-process queue. Cross box →
|
|
162
313
|
* the SAME publish/pull/subscribe surface backed by a durable mailbox on the parent's box (children
|
|
@@ -193,8 +344,9 @@ interface BusStats {
|
|
|
193
344
|
readonly byKind: Readonly<Record<string, number>>;
|
|
194
345
|
}
|
|
195
346
|
interface EventBus<E extends BusEvent> {
|
|
196
|
-
/** Stamp
|
|
197
|
-
*
|
|
347
|
+
/** Stamp the event, await every subscriber in order, then make it pull-visible. A subscriber
|
|
348
|
+
* failure leaves the event invisible and retrying the SAME event object reuses the exact stamp.
|
|
349
|
+
* This lets an awaited product observer commit its record before a supervisor can consume it. */
|
|
198
350
|
publish(event: E, opts?: PublishOptions): Promise<BusRecord<E>>;
|
|
199
351
|
/** Remove and return the highest-priority QUEUED event whose type is in `kinds` (any if omitted),
|
|
200
352
|
* ties broken FIFO by `seq`; `undefined` when nothing matches. */
|
|
@@ -204,7 +356,7 @@ interface EventBus<E extends BusEvent> {
|
|
|
204
356
|
subscribe(handler: (record: BusRecord<E>) => void | Promise<void>): () => void;
|
|
205
357
|
/** Count of queued, not-yet-pulled events (filtered by `kinds` when given). */
|
|
206
358
|
pending(kinds?: ReadonlyArray<E['type']>): number;
|
|
207
|
-
/** The full ordered log of every event
|
|
359
|
+
/** The full ordered log of every event published in this process (audit evidence, not replay). */
|
|
208
360
|
history(): ReadonlyArray<BusRecord<E>>;
|
|
209
361
|
/** Throughput counters for observability dashboards. */
|
|
210
362
|
stats(): BusStats;
|
|
@@ -476,223 +628,6 @@ declare function createDelegationTraceCollector(onSpans: (spans: DelegationTrace
|
|
|
476
628
|
*/
|
|
477
629
|
declare function composeLoopTraceEmitters(...emitters: ReadonlyArray<LoopTraceEmitter | undefined>): LoopTraceEmitter | undefined;
|
|
478
630
|
//#endregion
|
|
479
|
-
//#region src/otel-export.d.ts
|
|
480
|
-
interface OtelExportConfig {
|
|
481
|
-
/** OTLP endpoint. Reads OTEL_EXPORTER_OTLP_ENDPOINT env by default. */
|
|
482
|
-
endpoint?: string;
|
|
483
|
-
/** OTLP headers. Reads OTEL_EXPORTER_OTLP_HEADERS env by default. */
|
|
484
|
-
headers?: Record<string, string>;
|
|
485
|
-
/** Batch size before flush. Default 64. */
|
|
486
|
-
batchSize?: number;
|
|
487
|
-
/** Flush interval ms. Default 5000. */
|
|
488
|
-
flushIntervalMs?: number;
|
|
489
|
-
/** Resource attributes stamped on every export. */
|
|
490
|
-
resourceAttributes?: Record<string, string | number | boolean>;
|
|
491
|
-
/** Service name. Default 'agent-runtime'. */
|
|
492
|
-
serviceName?: string;
|
|
493
|
-
}
|
|
494
|
-
interface OtelExporter {
|
|
495
|
-
/** Export a span. */
|
|
496
|
-
exportSpan(span: OtelSpan): void;
|
|
497
|
-
/** Force flush pending spans. */
|
|
498
|
-
flush(): Promise<void>;
|
|
499
|
-
/** Shutdown cleanly. */
|
|
500
|
-
shutdown(): Promise<void>;
|
|
501
|
-
}
|
|
502
|
-
interface OtelSpan {
|
|
503
|
-
traceId: string;
|
|
504
|
-
spanId: string;
|
|
505
|
-
parentSpanId?: string;
|
|
506
|
-
name: string;
|
|
507
|
-
kind?: number;
|
|
508
|
-
startTimeUnixNano: string;
|
|
509
|
-
endTimeUnixNano: string;
|
|
510
|
-
attributes?: OtelAttribute[];
|
|
511
|
-
status?: {
|
|
512
|
-
code: number;
|
|
513
|
-
message?: string;
|
|
514
|
-
};
|
|
515
|
-
}
|
|
516
|
-
interface OtelAttribute {
|
|
517
|
-
key: string;
|
|
518
|
-
value: {
|
|
519
|
-
stringValue?: string;
|
|
520
|
-
intValue?: string;
|
|
521
|
-
doubleValue?: number;
|
|
522
|
-
boolValue?: boolean;
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
/**
|
|
526
|
-
* Create an OTEL exporter. Returns undefined when no endpoint is configured.
|
|
527
|
-
*/
|
|
528
|
-
declare function createOtelExporter(config?: OtelExportConfig): OtelExporter | undefined;
|
|
529
|
-
/**
|
|
530
|
-
* Convert a LoopTraceEvent into an OtelSpan for export.
|
|
531
|
-
*/
|
|
532
|
-
declare function loopEventToOtelSpan(event: {
|
|
533
|
-
kind: string;
|
|
534
|
-
runId: string;
|
|
535
|
-
timestamp: number;
|
|
536
|
-
payload: object;
|
|
537
|
-
}, traceId: string, parentSpanId?: string): OtelSpan;
|
|
538
|
-
interface RuntimeEventOtelOptions extends RuntimeTelemetryOptions {
|
|
539
|
-
/** Final customer redactor applied after the schema-aware runtime sanitizer. */
|
|
540
|
-
redact?: (value: unknown) => unknown;
|
|
541
|
-
}
|
|
542
|
-
/** Convert normalized runtime events into lossless, redacted child spans. */
|
|
543
|
-
declare function buildRuntimeEventOtelSpans(events: ReadonlyArray<RuntimeStreamEvent>, traceId: string, parentSpanId?: string, options?: RuntimeEventOtelOptions): OtelSpan[];
|
|
544
|
-
/**
|
|
545
|
-
* Sink-neutral node in a reconstructed loop span tree. The root node's
|
|
546
|
-
* `parentSpanId` is `undefined` — sinks decide how to parent it (the OTEL
|
|
547
|
-
* mapper attaches the inherited delegation span; the delegation journal
|
|
548
|
-
* leaves it as the tree root).
|
|
549
|
-
*/
|
|
550
|
-
interface LoopSpanNode {
|
|
551
|
-
spanId: string;
|
|
552
|
-
parentSpanId?: string;
|
|
553
|
-
/** `'loop'` | `'loop.round'` | `'loop.iteration'`. */
|
|
554
|
-
name: string;
|
|
555
|
-
/** Topology level: loop root, plan round, or iteration branch. */
|
|
556
|
-
kind: 'loop' | 'round' | 'branch';
|
|
557
|
-
startMs: number;
|
|
558
|
-
endMs: number;
|
|
559
|
-
attrs: Record<string, string | number | boolean>;
|
|
560
|
-
/** True when the iteration carried an error — maps to OTEL status code 2. */
|
|
561
|
-
error: boolean;
|
|
562
|
-
}
|
|
563
|
-
/**
|
|
564
|
-
* Build a nested, real-duration OTLP span tree for ONE loop run from its full
|
|
565
|
-
* ordered `LoopTraceEvent` stream. Unlike `loopEventToOtelSpan` (one flat,
|
|
566
|
-
* zero-duration span per event), this reconstructs the topology hierarchy a
|
|
567
|
-
* GenAI trace viewer renders natively:
|
|
568
|
-
*
|
|
569
|
-
* loop (invoke_workflow)
|
|
570
|
-
* └─ loop.round[k] (invoke_workflow) ← tangle.loop.move.{kind,width,rationale}
|
|
571
|
-
* ├─ loop.iteration[i] (invoke_agent) ← gen_ai.agent.name + usage + verdict + placement
|
|
572
|
-
* └─ …
|
|
573
|
-
*
|
|
574
|
-
* Attributes follow the current GenAI semconv (`gen_ai.*`) where they apply and
|
|
575
|
-
* a namespaced `tangle.loop.*` / `tangle.cost.usd` extension for topology /
|
|
576
|
-
* verdict / placement / cost (not yet standardized). Pure: feed it a buffered
|
|
577
|
-
* per-runId event array (e.g. flushed on `loop.ended`) and export the result.
|
|
578
|
-
*/
|
|
579
|
-
declare function buildLoopOtelSpans(events: ReadonlyArray<{
|
|
580
|
-
kind: string;
|
|
581
|
-
runId: string;
|
|
582
|
-
timestamp: number;
|
|
583
|
-
payload: object;
|
|
584
|
-
}>, traceId: string, rootParentSpanId?: string): OtelSpan[];
|
|
585
|
-
/**
|
|
586
|
-
* Sink-neutral core behind {@link buildLoopOtelSpans}: reconstruct the
|
|
587
|
-
* loop → round → branch span tree from one run's ordered `LoopTraceEvent`
|
|
588
|
-
* stream. Consumed by the OTEL mapper above and by the MCP delegation
|
|
589
|
-
* journal's compact trace tee — one topology reconstruction, two sinks.
|
|
590
|
-
* Tolerates partial streams (a run that never reached `loop.ended` closes
|
|
591
|
-
* at the last observed event's timestamp).
|
|
592
|
-
*/
|
|
593
|
-
declare function buildLoopSpanNodes(events: ReadonlyArray<{
|
|
594
|
-
kind: string;
|
|
595
|
-
runId: string;
|
|
596
|
-
timestamp: number;
|
|
597
|
-
payload: object;
|
|
598
|
-
}>): LoopSpanNode[];
|
|
599
|
-
/**
|
|
600
|
-
* Convert a flat record into the OTLP attribute list. Non-finite numbers are DROPPED (an OTLP
|
|
601
|
-
* `doubleValue` of `NaN`/`Infinity` is not representable), integers ride as `intValue`. Exported so
|
|
602
|
-
* a producer that mints its own `OtelSpan` (the supervisor span recorder) builds attributes exactly
|
|
603
|
-
* the way every span in this file does, rather than re-deriving the encoding.
|
|
604
|
-
*/
|
|
605
|
-
declare function toOtelAttributes(record: Record<string, string | number | boolean>): OtelAttribute[];
|
|
606
|
-
/** Mint a fresh 16-hex-character OTLP span id. Exported so a producer that must know a span's id
|
|
607
|
-
* BEFORE the span closes (a node opened at spawn and parented by its children) uses this one
|
|
608
|
-
* generator instead of a second copy of it. */
|
|
609
|
-
declare function generateSpanId(): string;
|
|
610
|
-
/** Wire version the eval-runs ingest enforces (X-Tangle-Wire-Version + body). */
|
|
611
|
-
declare const INTELLIGENCE_WIRE_VERSION = "2026-05-26.v1";
|
|
612
|
-
interface EvalRunGeneration {
|
|
613
|
-
/** 0-based ordinal of this generation within the run (required by ingest). */
|
|
614
|
-
index: number;
|
|
615
|
-
/** Identity of the proposed surface change (content-addressed hash). */
|
|
616
|
-
surfaceHash: string;
|
|
617
|
-
/** Arbitrary provenance for this generation (rationale, evidence, source). */
|
|
618
|
-
surface?: unknown;
|
|
619
|
-
/** Per-scenario results; empty until the generation is measured. */
|
|
620
|
-
cells?: unknown[];
|
|
621
|
-
/** Mean composite score (0 when unmeasured — pair with labels.measured). */
|
|
622
|
-
compositeMean: number;
|
|
623
|
-
costUsd: number;
|
|
624
|
-
durationMs: number;
|
|
625
|
-
}
|
|
626
|
-
interface EvalRunEvent {
|
|
627
|
-
runId: string;
|
|
628
|
-
runDir: string;
|
|
629
|
-
/** ISO timestamp. */
|
|
630
|
-
timestamp: string;
|
|
631
|
-
status: 'started' | 'baseline-complete' | 'generation-complete' | 'gate-decided' | 'finished' | 'errored';
|
|
632
|
-
labels?: Record<string, string>;
|
|
633
|
-
baseline?: EvalRunGeneration;
|
|
634
|
-
generations?: EvalRunGeneration[];
|
|
635
|
-
gateDecision?: 'ship' | 'hold' | 'need_more_work' | 'model_ceiling' | 'arch_ceiling';
|
|
636
|
-
holdoutLift?: number;
|
|
637
|
-
totalCostUsd: number;
|
|
638
|
-
totalDurationMs: number;
|
|
639
|
-
errorMessage?: string;
|
|
640
|
-
}
|
|
641
|
-
interface EvalRunsExportConfig {
|
|
642
|
-
/** Bearer key — tenant is resolved server-side from it. Reads TANGLE_API_KEY. */
|
|
643
|
-
apiKey?: string;
|
|
644
|
-
/** Intelligence base. Reads TANGLE_INTELLIGENCE_URL env, else prod. */
|
|
645
|
-
base?: string;
|
|
646
|
-
/** Idempotency-Key header (e.g. the runId) — safe retries + upsert. */
|
|
647
|
-
idempotencyKey?: string;
|
|
648
|
-
}
|
|
649
|
-
interface EvalRunsExportResult {
|
|
650
|
-
ok: boolean;
|
|
651
|
-
status: number;
|
|
652
|
-
accepted: number;
|
|
653
|
-
rejected: Array<{
|
|
654
|
-
index: number;
|
|
655
|
-
reason: string;
|
|
656
|
-
}>;
|
|
657
|
-
}
|
|
658
|
-
/**
|
|
659
|
-
* Ship self-improvement eval-run events to Tangle Intelligence. Unlike the
|
|
660
|
-
* best-effort span exporter, this RESOLVES with the ingest verdict (accepted /
|
|
661
|
-
* rejected per event) so a consumer's loop can assert its provenance landed.
|
|
662
|
-
* Throws only on a missing key or network failure.
|
|
663
|
-
*/
|
|
664
|
-
declare function exportEvalRuns(events: EvalRunEvent[], config?: EvalRunsExportConfig): Promise<EvalRunsExportResult>;
|
|
665
|
-
//#endregion
|
|
666
|
-
//#region src/mcp/trace-propagation.d.ts
|
|
667
|
-
interface TraceContext {
|
|
668
|
-
/** Trace id inherited from the parent process, or a fresh one. */
|
|
669
|
-
traceId: string;
|
|
670
|
-
/** Parent span id from the delegation that launched this MCP server. */
|
|
671
|
-
parentSpanId?: string;
|
|
672
|
-
}
|
|
673
|
-
/**
|
|
674
|
-
* Read trace context from the process environment.
|
|
675
|
-
* Returns a context with inherited ids or a freshly generated root.
|
|
676
|
-
*/
|
|
677
|
-
declare function readTraceContextFromEnv(): TraceContext;
|
|
678
|
-
/**
|
|
679
|
-
* Create a LoopTraceEmitter that:
|
|
680
|
-
* 1. Parents all spans under the inherited PARENT_SPAN_ID.
|
|
681
|
-
* 2. Exports spans to OTEL when OTEL_EXPORTER_OTLP_ENDPOINT is set.
|
|
682
|
-
*
|
|
683
|
-
* Returns both the emitter and the optional exporter handle for shutdown.
|
|
684
|
-
*/
|
|
685
|
-
declare function createPropagatingTraceEmitter(ctx: TraceContext): {
|
|
686
|
-
emitter: LoopTraceEmitter;
|
|
687
|
-
exporter: OtelExporter | undefined;
|
|
688
|
-
context: TraceContext;
|
|
689
|
-
};
|
|
690
|
-
/**
|
|
691
|
-
* Build env vars to pass to a child MCP subprocess so it inherits the
|
|
692
|
-
* current trace context.
|
|
693
|
-
*/
|
|
694
|
-
declare function traceContextToEnv(ctx: TraceContext): Record<string, string>;
|
|
695
|
-
//#endregion
|
|
696
631
|
//#region src/mcp/types.d.ts
|
|
697
632
|
/** @experimental */
|
|
698
633
|
type DelegationProfile = 'coder' | 'researcher' | 'ui-auditor';
|
|
@@ -2123,7 +2058,8 @@ interface PiExecutorOutput {
|
|
|
2123
2058
|
* in-flight turn immediately, then re-plan with the message folded in — breaking the worker out
|
|
2124
2059
|
* of a wrong path mid-task instead of waiting for it to finish the step.
|
|
2125
2060
|
*
|
|
2126
|
-
* `deliver` never throws — a malformed message is ignored
|
|
2061
|
+
* `deliver` never throws — a malformed message is ignored and returns `false`, so no caller can
|
|
2062
|
+
* report delivery for bytes this inbox discarded.
|
|
2127
2063
|
*
|
|
2128
2064
|
* @experimental
|
|
2129
2065
|
*/
|
|
@@ -2136,8 +2072,9 @@ interface InboxMessage {
|
|
|
2136
2072
|
readonly questionId?: string;
|
|
2137
2073
|
}
|
|
2138
2074
|
interface Inbox {
|
|
2139
|
-
/** The `Executor.deliver` implementation
|
|
2140
|
-
|
|
2075
|
+
/** The `Executor.deliver` implementation. Returns false when the raw message is malformed and
|
|
2076
|
+
* therefore was not queued; callers must not acknowledge a message this inbox discarded. */
|
|
2077
|
+
deliver(msg: unknown): boolean;
|
|
2141
2078
|
/** Remove and return all pending messages (the flush). */
|
|
2142
2079
|
drain(): InboxMessage[];
|
|
2143
2080
|
pending(): number;
|
|
@@ -2186,6 +2123,12 @@ interface SteerableSandboxArgs {
|
|
|
2186
2123
|
readonly taskToPrompt: (task: unknown) => string;
|
|
2187
2124
|
readonly options?: SandboxSteeringOptions;
|
|
2188
2125
|
readonly loopCtx?: Partial<Omit<ExecCtx, 'sandboxClient' | 'signal'>>;
|
|
2126
|
+
/**
|
|
2127
|
+
* Inherited `TRACE_ID` / `PARENT_SPAN_ID` for the box, merged into `CreateSandboxOptions.env` so
|
|
2128
|
+
* the remote worker's own spans join the supervisor's trace under the spawning node's span.
|
|
2129
|
+
* Absent when the run records no spans — the create options are then untouched.
|
|
2130
|
+
*/
|
|
2131
|
+
readonly traceEnv?: Record<string, string>;
|
|
2189
2132
|
readonly contentRef: (prefix: string, value: unknown) => string;
|
|
2190
2133
|
readonly now?: () => number;
|
|
2191
2134
|
}
|
|
@@ -2244,7 +2187,9 @@ interface CliSeam {
|
|
|
2244
2187
|
/**
|
|
2245
2188
|
* cli-worktree seam. A supervisor-authored `AgentProfile` driving a local coding-harness CLI
|
|
2246
2189
|
* (claude / codex / opencode) on its own git worktree — the leaf `createWorktreeCliExecutor`
|
|
2247
|
-
* named as data. `harness` + `repoRoot`
|
|
2190
|
+
* named as data. `harness` + `repoRoot` are required; the task comes from `Executor.execute`.
|
|
2191
|
+
* `taskPrompt` remains an optional direct-call fallback for callers that execute with `undefined`.
|
|
2192
|
+
* The authored
|
|
2248
2193
|
* `profile.prompt.systemPrompt` + `profile.model.default` reach the harness via the §1.5
|
|
2249
2194
|
* `harnessInvocation` mapper. Everything else mirrors `WorktreeCliExecutorOptions`.
|
|
2250
2195
|
*/
|
|
@@ -2252,7 +2197,7 @@ interface CliWorktreeSeam {
|
|
|
2252
2197
|
repoRoot: string;
|
|
2253
2198
|
/** Local CLI harness transport. Omit when `bridge` is set. */
|
|
2254
2199
|
harness?: LocalHarness;
|
|
2255
|
-
taskPrompt
|
|
2200
|
+
taskPrompt?: string;
|
|
2256
2201
|
runId?: string;
|
|
2257
2202
|
baseRef?: string;
|
|
2258
2203
|
harnessTimeoutMs?: number;
|
|
@@ -2278,7 +2223,8 @@ interface CliWorktreeBridgeSeam {
|
|
|
2278
2223
|
bridgeBearer: string;
|
|
2279
2224
|
/** Bridge model/harness id. Defaults to the profile's model hint when omitted. */
|
|
2280
2225
|
model?: string;
|
|
2281
|
-
|
|
2226
|
+
/** Canonical profile overlay merged over the spawned profile. */
|
|
2227
|
+
agentProfile?: AgentProfile$1;
|
|
2282
2228
|
timeoutMs?: number;
|
|
2283
2229
|
/** Stable cli-bridge session id. Defaults to `bridge-worktree-${runId}`. */
|
|
2284
2230
|
sessionId?: string;
|
|
@@ -2292,19 +2238,20 @@ interface CliWorktreeBridgeSeam {
|
|
|
2292
2238
|
* forwarded verbatim per request — how an arm disables native tools or injects
|
|
2293
2239
|
* a provider search MCP.
|
|
2294
2240
|
*
|
|
2295
|
-
* The executor opens a
|
|
2296
|
-
*
|
|
2297
|
-
*
|
|
2298
|
-
*
|
|
2299
|
-
* `-s`, claude `--resume`, …). Omit it and the executor mints a stable one per spawn.
|
|
2241
|
+
* The executor opens a resumable cli-bridge session. `sessionId` identifies the
|
|
2242
|
+
* harness conversation across turns; each turn also receives its own durable run id.
|
|
2243
|
+
* A dropped HTTP reader reattaches to that exact run and explicit cancel is the only
|
|
2244
|
+
* operation allowed to stop it. Omit `sessionId` and the executor mints one per spawn.
|
|
2300
2245
|
*/
|
|
2301
2246
|
interface BridgeSeam {
|
|
2302
2247
|
bridgeUrl: string;
|
|
2303
2248
|
bridgeBearer: string;
|
|
2304
|
-
model
|
|
2249
|
+
/** Fallback bridge wire id. A spawned profile may select its own harness and model. */
|
|
2250
|
+
model?: string;
|
|
2305
2251
|
/** Optional working directory forwarded to cli-bridge and persisted with the session. */
|
|
2306
2252
|
cwd?: string;
|
|
2307
|
-
|
|
2253
|
+
/** Canonical profile overlay merged over the spawned profile. */
|
|
2254
|
+
agentProfile?: AgentProfile$1;
|
|
2308
2255
|
timeoutMs?: number;
|
|
2309
2256
|
/** Stable, caller-owned cli-bridge session id for harness-side resume. Defaults
|
|
2310
2257
|
* to a freshly minted per-spawn id so each worker is its own resumable session. */
|
|
@@ -2319,6 +2266,13 @@ interface BridgeSeam {
|
|
|
2319
2266
|
interface ProviderSeam extends ProviderExecutorOptions {
|
|
2320
2267
|
provider: AgentEnvironmentProvider | string;
|
|
2321
2268
|
registry?: AgentEnvironmentProviderRegistry;
|
|
2269
|
+
/**
|
|
2270
|
+
* Compose the provider through the existing steerable sandbox session.
|
|
2271
|
+
* The exact profile must name its harness, and the provider must expose live
|
|
2272
|
+
* continuation plus session controls. The provider still owns environment
|
|
2273
|
+
* creation and session semantics.
|
|
2274
|
+
*/
|
|
2275
|
+
steering?: SandboxSteeringOptions;
|
|
2322
2276
|
}
|
|
2323
2277
|
/**
|
|
2324
2278
|
* Router seam WITH tool use — the tool-using router backend. Same direct
|
|
@@ -2398,8 +2352,8 @@ declare function createExecutor(config: ExecutorConfig): ExecutorFactory<unknown
|
|
|
2398
2352
|
* without touching the registry at all. NOT a closed switch; registration + BYO
|
|
2399
2353
|
* ARE the extension points.
|
|
2400
2354
|
*
|
|
2401
|
-
* `resolve` precedence (frozen in `ExecutorRegistry`): a BYO `spec.
|
|
2402
|
-
* `harness === null` → the `'router'` factory; else a registered factory for the
|
|
2355
|
+
* `resolve` precedence (frozen in `ExecutorRegistry`): a BYO `spec.executorFactory` →
|
|
2356
|
+
* `spec.executor` → `harness === null` → the `'router'` factory; else a registered factory for the
|
|
2403
2357
|
* harness-derived runtime (`'sandbox'` for any `BackendType`); else fail loud.
|
|
2404
2358
|
*/
|
|
2405
2359
|
declare function createExecutorRegistry(): ExecutorRegistry;
|
|
@@ -2447,8 +2401,16 @@ type DelegateResult = {
|
|
|
2447
2401
|
} | {
|
|
2448
2402
|
status: 'no-winner';
|
|
2449
2403
|
reason: string;
|
|
2404
|
+
error?: DelegateError;
|
|
2450
2405
|
spentTotal: Spend;
|
|
2451
2406
|
};
|
|
2407
|
+
/** What killed a delegation, projected for the calling agent: the rejection's name and message.
|
|
2408
|
+
* `reason` is a four-word code (`driver-failed`), and a code alone is not diagnosable — the
|
|
2409
|
+
* supervisor attaches the rejection to the result precisely so a caller can read it. */
|
|
2410
|
+
interface DelegateError {
|
|
2411
|
+
name: string;
|
|
2412
|
+
message: string;
|
|
2413
|
+
}
|
|
2452
2414
|
/** @experimental */
|
|
2453
2415
|
interface DelegateHandlerOptions {
|
|
2454
2416
|
/** The supervisor brain's router substrate (REQUIRED — the default supervisor is router-brained). */
|
|
@@ -2547,13 +2509,26 @@ declare function createInProcessTransport(): {
|
|
|
2547
2509
|
interface SettledWorker {
|
|
2548
2510
|
readonly id: string;
|
|
2549
2511
|
readonly status: 'done' | 'down';
|
|
2512
|
+
/** Stable manager-scoped assignment, including deterministic unkeyed siblings. */
|
|
2513
|
+
readonly assignmentId?: string;
|
|
2514
|
+
/** Exact profile/task/candidate identity authorized for this node. */
|
|
2515
|
+
readonly identity?: NodeExecutionIdentity;
|
|
2516
|
+
/** Stable effective execution plan, or an explicit unknown receipt. */
|
|
2517
|
+
readonly materialization?: ProfileMaterializationReceipt;
|
|
2518
|
+
/** Backend bindings for each attempt, in durable oldest-first order. */
|
|
2519
|
+
readonly executionBindings?: ReadonlyArray<ExecutionBindingReceipt>;
|
|
2520
|
+
/** Conserved spend. Missing means unavailable; unknown accounting remains explicitly unknown. */
|
|
2521
|
+
readonly spent?: Spend;
|
|
2550
2522
|
readonly score?: number;
|
|
2551
2523
|
readonly valid?: boolean;
|
|
2552
2524
|
readonly outRef?: string;
|
|
2553
2525
|
readonly reason?: string;
|
|
2554
|
-
/**
|
|
2555
|
-
|
|
2556
|
-
|
|
2526
|
+
/** Structured tool-call evidence, never the worker's final prose. */
|
|
2527
|
+
readonly trace: WorkerTraceEvidence;
|
|
2528
|
+
/** True when projected from a prior process of the same durable run. */
|
|
2529
|
+
readonly resumed?: boolean;
|
|
2530
|
+
/** Epoch ms from the durable terminal record — the resolution a progress-based stop rule needs
|
|
2531
|
+
* to answer "how long since anything landed?" without inventing a timestamp at read time. */
|
|
2557
2532
|
readonly settledAt?: number;
|
|
2558
2533
|
}
|
|
2559
2534
|
type QuestionLevel = 'worker' | 'driver' | 'loop';
|
|
@@ -2595,7 +2570,7 @@ interface AnalystRegistry {
|
|
|
2595
2570
|
description: string;
|
|
2596
2571
|
area: string;
|
|
2597
2572
|
}>;
|
|
2598
|
-
readonly run: (kindId: string, trace:
|
|
2573
|
+
readonly run: (kindId: string, trace: TraceAnalysisStore) => Promise<unknown>;
|
|
2599
2574
|
}
|
|
2600
2575
|
/** A trace-analyst result re-entered as a message on the bus (the `finding` event kind). */
|
|
2601
2576
|
interface AnalystFindingEvent {
|
|
@@ -2603,16 +2578,63 @@ interface AnalystFindingEvent {
|
|
|
2603
2578
|
readonly analyst: string;
|
|
2604
2579
|
readonly findings: unknown;
|
|
2605
2580
|
}
|
|
2606
|
-
/**
|
|
2607
|
-
|
|
2581
|
+
/** The exact result of one parent→child delivery attempt. */
|
|
2582
|
+
type DownMessageDeliveryOutcome = 'delivered' | 'unknown-worker' | 'already-settled' | 'runtime-has-no-inbox' | 'scope-stopped' | 'runtime-error';
|
|
2583
|
+
/** A durable marker written after authorization and immediately before Runtime calls `Scope.send`.
|
|
2584
|
+
* If a process dies with this marker but no matching outcome, delivery is unknown and is never
|
|
2585
|
+
* replayed automatically. */
|
|
2586
|
+
interface DownMessageDeliveryAttempt {
|
|
2587
|
+
readonly receiptId: string;
|
|
2588
|
+
readonly kind: 'steer' | 'answer';
|
|
2589
|
+
readonly toWorker: string;
|
|
2590
|
+
readonly instructionDigest: string;
|
|
2591
|
+
readonly interrupt: boolean;
|
|
2592
|
+
readonly questionId?: string;
|
|
2593
|
+
}
|
|
2594
|
+
/** A parent→child delivery result (the down-leg): recorded for observability, never pulled back by
|
|
2595
|
+
* the parent. `receiptId` and `instructionDigest` link it to the pre-delivery authorization receipt
|
|
2596
|
+
* and attempt marker. */
|
|
2608
2597
|
interface DownMessageEvent {
|
|
2598
|
+
readonly receiptId: string;
|
|
2609
2599
|
readonly toWorker: string;
|
|
2610
2600
|
readonly instruction: string;
|
|
2601
|
+
readonly instructionDigest: string;
|
|
2611
2602
|
readonly delivered: boolean;
|
|
2603
|
+
readonly outcome: DownMessageDeliveryOutcome;
|
|
2604
|
+
readonly error?: string;
|
|
2605
|
+
}
|
|
2606
|
+
/** Durable authorization receipt written before a continuation reaches a worker. */
|
|
2607
|
+
interface ContinuationInstruction {
|
|
2608
|
+
readonly receiptId: string;
|
|
2609
|
+
readonly kind: 'steer' | 'answer';
|
|
2610
|
+
readonly toWorker: string;
|
|
2611
|
+
readonly instruction: string;
|
|
2612
|
+
readonly instructionDigest: string;
|
|
2613
|
+
readonly workerIdentity?: NodeExecutionIdentity;
|
|
2614
|
+
readonly interrupt: boolean;
|
|
2615
|
+
readonly questionId?: string;
|
|
2616
|
+
}
|
|
2617
|
+
/** Detached continuation bytes and exact worker identity presented to product authorization before
|
|
2618
|
+
* Runtime records or delivers a steer/answer. */
|
|
2619
|
+
interface DownMessageAuthorizationInput {
|
|
2620
|
+
readonly kind: 'steer' | 'answer';
|
|
2621
|
+
readonly workerId: string;
|
|
2622
|
+
readonly workerIdentity: NodeExecutionIdentity;
|
|
2623
|
+
readonly instruction: string;
|
|
2624
|
+
readonly interrupt: boolean;
|
|
2625
|
+
readonly questionId?: string;
|
|
2612
2626
|
}
|
|
2627
|
+
/** Product-authorized continuation bytes. Returning a narrowed instruction replaces the proposed
|
|
2628
|
+
* bytes; throwing refuses delivery. */
|
|
2629
|
+
interface AuthorizedDownMessage {
|
|
2630
|
+
readonly instruction: string;
|
|
2631
|
+
}
|
|
2632
|
+
/** Product decision over an exact continuation before it is durably recorded or delivered. */
|
|
2633
|
+
type AuthorizeDownMessage = (input: DownMessageAuthorizationInput) => AuthorizedDownMessage;
|
|
2613
2634
|
/** Every message on the one typed pipe. UP (child→parent): question / settled / finding — queued for
|
|
2614
|
-
* the driver to `pull`.
|
|
2615
|
-
*
|
|
2635
|
+
* the driver to `pull`. An `instruction` is the pre-delivery authorization receipt and is retained
|
|
2636
|
+
* as evidence. DOWN (parent→child): steer / answer — record-only (history + subscribers), routed
|
|
2637
|
+
* to the child inbox. Receipts are never auto-delivered on restart. New kinds are additive. */
|
|
2616
2638
|
type CoordinationEvent = {
|
|
2617
2639
|
readonly type: 'question';
|
|
2618
2640
|
readonly question: QuestionRecord;
|
|
@@ -2629,8 +2651,34 @@ type CoordinationEvent = {
|
|
|
2629
2651
|
readonly type: 'answer';
|
|
2630
2652
|
readonly down: DownMessageEvent;
|
|
2631
2653
|
readonly questionId: string;
|
|
2654
|
+
} | {
|
|
2655
|
+
readonly type: 'instruction';
|
|
2656
|
+
readonly instruction: ContinuationInstruction;
|
|
2657
|
+
} | {
|
|
2658
|
+
readonly type: 'delivery-attempt';
|
|
2659
|
+
readonly attempt: DownMessageDeliveryAttempt;
|
|
2632
2660
|
};
|
|
2633
|
-
|
|
2661
|
+
/** Immutable task, allocation, identity attribution, and semantic key supplied while a manager's
|
|
2662
|
+
* complete worker profile is prepared for one spawn. */
|
|
2663
|
+
interface WorkerSpawnContext {
|
|
2664
|
+
/** Stable assignment identity within this manager. A semantic key wins; otherwise Runtime mints
|
|
2665
|
+
* the manager's deterministic pre-factory spawn ordinal so identical unkeyed siblings stay
|
|
2666
|
+
* isolated and can recover by issuing the same assignments in the same order. */
|
|
2667
|
+
readonly assignmentId: string;
|
|
2668
|
+
/** Trusted concrete manager node authorizing this spawn. Never accepted from model arguments. */
|
|
2669
|
+
readonly parentNodeId: string;
|
|
2670
|
+
/** The exact allocation this node receives after the tool's optional override is merged. */
|
|
2671
|
+
readonly budget: Budget;
|
|
2672
|
+
/** Detached, deeply immutable task bytes from this spawn request. */
|
|
2673
|
+
readonly task: unknown;
|
|
2674
|
+
/** Exact trace label selected for this spawn. */
|
|
2675
|
+
readonly label: string;
|
|
2676
|
+
/** Semantic restart key, when the manager supplied one. */
|
|
2677
|
+
readonly key?: string;
|
|
2678
|
+
/** Trusted candidate/campaign attribution attached by product authorization. */
|
|
2679
|
+
readonly execution?: AgentExecutionRef;
|
|
2680
|
+
}
|
|
2681
|
+
type MakeWorkerAgent = (profile: AgentProfile$1, context?: WorkerSpawnContext) => Agent<unknown, unknown>;
|
|
2634
2682
|
interface CoordinationToolsOptions {
|
|
2635
2683
|
readonly scope: Scope<unknown>;
|
|
2636
2684
|
readonly blobs: ResultBlobStore;
|
|
@@ -2643,7 +2691,14 @@ interface CoordinationToolsOptions {
|
|
|
2643
2691
|
*/
|
|
2644
2692
|
readonly deliverable?: DeliverableSpec<unknown>;
|
|
2645
2693
|
readonly analysts?: AnalystRegistry;
|
|
2646
|
-
|
|
2694
|
+
/** Event-first for source compatibility; the second argument is its exact bus ordering stamp. */
|
|
2695
|
+
readonly onEvent?: (event: CoordinationEvent, record: BusRecord<CoordinationEvent>) => void | Promise<void>;
|
|
2696
|
+
/** Re-publish resumed settlements through the awaited observer before the driver starts. This is
|
|
2697
|
+
* the crash-window recovery path for product transactions; off preserves low-level legacy reads. */
|
|
2698
|
+
readonly replaySettlements?: boolean;
|
|
2699
|
+
/** Authorize each continuation against the exact worker identity. The returned instruction is
|
|
2700
|
+
* detached, recorded durably through `onEvent`, and only then delivered. */
|
|
2701
|
+
readonly authorizeDownMessage?: AuthorizeDownMessage;
|
|
2647
2702
|
readonly questionPolicy?: QuestionPolicy;
|
|
2648
2703
|
/** Analyst kind ids to run AUTOMATICALLY when a worker settles `done` (the analyst-on-settle
|
|
2649
2704
|
* hook). Each result is published as a `finding` event on the bus — pass-through to subscribers
|
|
@@ -2654,7 +2709,8 @@ interface CoordinationToolsOptions {
|
|
|
2654
2709
|
* counts the scope's non-terminal nodes and fails closed (`error: 'max-live-workers'`) BEFORE
|
|
2655
2710
|
* reserving from the pool when the cap is already met — a concurrency fence on top of the
|
|
2656
2711
|
* conserved-budget fence (the pool bounds total work; this bounds simultaneous work, e.g. live
|
|
2657
|
-
* sandboxes/boxes).
|
|
2712
|
+
* sandboxes/boxes). A tree-wide limit owned by `Scope` takes precedence when present; this field
|
|
2713
|
+
* is the local form for a caller-owned scope. Omit or `<= 0` = no local cap. */
|
|
2658
2714
|
readonly maxLiveWorkers?: number;
|
|
2659
2715
|
/** Max wall-clock ms a single `await_event` call may block waiting on a live worker to settle
|
|
2660
2716
|
* before it returns a non-error `{ pending: true, live }` snapshot and lets the caller re-poll.
|
|
@@ -2714,6 +2770,8 @@ declare const DEFAULT_AWAIT_EVENT_TIMEOUT_MS = 15000;
|
|
|
2714
2770
|
*/
|
|
2715
2771
|
interface CoordinationTools {
|
|
2716
2772
|
readonly tools: McpToolDescriptor$1[];
|
|
2773
|
+
/** Commit any resume-time event replay before a supervisor can reason or an MCP can listen. */
|
|
2774
|
+
ready(): Promise<void>;
|
|
2717
2775
|
isStopped(): boolean;
|
|
2718
2776
|
stopReason(): string | undefined;
|
|
2719
2777
|
/** The first result whose injected independent check passed, if the driver submitted one. */
|
|
@@ -2722,9 +2780,9 @@ interface CoordinationTools {
|
|
|
2722
2780
|
} | undefined;
|
|
2723
2781
|
settled(): ReadonlyArray<SettledWorker>;
|
|
2724
2782
|
questions(): ReadonlyArray<QuestionRecord>;
|
|
2725
|
-
/** The full ordered log of every bus event — UP (settled / question / finding)
|
|
2726
|
-
*
|
|
2727
|
-
* timestamp, and priority. */
|
|
2783
|
+
/** The full ordered log of every bus event — UP (settled / question / finding), authorized
|
|
2784
|
+
* instruction receipts, and DOWN delivery outcomes (steer / answer). Each record carries seq,
|
|
2785
|
+
* timestamp, and priority. A receipt is evidence and is never auto-delivered on restart. */
|
|
2728
2786
|
history(): ReadonlyArray<BusRecord<CoordinationEvent>>;
|
|
2729
2787
|
/** Bus throughput counters (published / pulled / by-kind) for live dashboards. */
|
|
2730
2788
|
stats(): BusStats;
|
|
@@ -6222,24 +6280,40 @@ interface StructuralRolloutConfig {
|
|
|
6222
6280
|
declare function structuralRollout(config?: StructuralRolloutConfig): Strategy<StructuralRolloutResult>;
|
|
6223
6281
|
//#endregion
|
|
6224
6282
|
//#region src/runtime/supervise/authoring.d.ts
|
|
6225
|
-
/** What the supervisor AUTHORS per sub-task
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
}
|
|
6283
|
+
/** What the supervisor AUTHORS per sub-task: one complete canonical profile whose name and
|
|
6284
|
+
* task-specific system prompt are present. Every other `AgentProfile` axis is preserved exactly. */
|
|
6285
|
+
type AuthoredProfile = AgentProfile$1 & {
|
|
6286
|
+
readonly name: string;
|
|
6287
|
+
readonly prompt: AgentProfilePrompt & {
|
|
6288
|
+
readonly systemPrompt: string;
|
|
6289
|
+
};
|
|
6290
|
+
};
|
|
6233
6291
|
/** Narrow an untyped `spawn_agent` profile argument to an `AuthoredProfile`, or null if the
|
|
6234
6292
|
* supervisor failed to author one (empty/placeholder profile — a skill violation worth catching). */
|
|
6235
6293
|
declare function asAuthoredProfile(raw: unknown): AuthoredProfile | null;
|
|
6294
|
+
/**
|
|
6295
|
+
* Lift a profile the supervisor AUTHORED into the canonical shape every executor reads.
|
|
6296
|
+
*
|
|
6297
|
+
* The skill asks for `systemPrompt` and `model` as flat fields — the vocabulary a model writes
|
|
6298
|
+
* well — while `AgentProfile` carries them as `prompt.systemPrompt` and `model.default`. Nothing
|
|
6299
|
+
* downstream reads the flat form: the router and cli-bridge leaves read `profile.prompt
|
|
6300
|
+
* .systemPrompt`, and the sandbox leaf hands the profile to a strict schema that REJECTS the flat
|
|
6301
|
+
* key outright (`Unrecognized key: "systemPrompt"`), which fails the worker's every round. Lift
|
|
6302
|
+
* both here, once, so what the supervisor writes is what the worker runs.
|
|
6303
|
+
*
|
|
6304
|
+
* Purely additive: a profile already canonical is returned untouched, and a flat field is dropped
|
|
6305
|
+
* only after its canonical slot is filled. Both spellings of the same standing instruction, set to
|
|
6306
|
+
* DIFFERENT text, is a contradiction with no safe reading — it fails loud, matching
|
|
6307
|
+
* `resolveSupervisorProfile`'s rule for the supervisor's own profile.
|
|
6308
|
+
*/
|
|
6309
|
+
declare function canonicalizeAuthoredProfile(raw: unknown): AgentProfile$1;
|
|
6236
6310
|
/** The supervisor SKILL — the how-to the supervisor reads (its system prompt). THE optimizable
|
|
6237
6311
|
* surface: editing this changes how the supervisor designs every agent it spawns. */
|
|
6238
6312
|
declare function supervisorInstructions(opts?: {
|
|
6239
6313
|
goal?: string;
|
|
6240
6314
|
}): string;
|
|
6241
|
-
/** Build a worker
|
|
6242
|
-
* `
|
|
6315
|
+
/** Build a router-only worker from an authored profile. This helper executes the prompt/model axes;
|
|
6316
|
+
* use `workerFromBackend` for full materialization of tools, MCP, resources, hooks, and subagents. */
|
|
6243
6317
|
declare function authoredWorker(profile: AuthoredProfile, opts: {
|
|
6244
6318
|
cfg: RouterConfig;
|
|
6245
6319
|
taskPrompt: string;
|
|
@@ -6313,6 +6387,7 @@ interface ReservationTicket {
|
|
|
6313
6387
|
/** Post-reservation pool readout — the shape `Scope.budget` exposes. `tokensLeft`,
|
|
6314
6388
|
* `usdLeft`, and `reservedTokens` reflect committed-but-unsettled reservations;
|
|
6315
6389
|
* `deadlineMs` is the ABSOLUTE wall-clock deadline (0 when the root set none).
|
|
6390
|
+
* `iterationsLeft` is the remaining iteration capacity.
|
|
6316
6391
|
* `usdCapped` distinguishes a real `usdLeft <= 0` exhaustion from an uncapped pool (which always
|
|
6317
6392
|
* reads `usdLeft: 0`) — the in-loop guard needs it to bound a usd-capped driver. */
|
|
6318
6393
|
type BudgetReadout = Readonly<{
|
|
@@ -6323,16 +6398,32 @@ type BudgetReadout = Readonly<{
|
|
|
6323
6398
|
* consumption is at least the debited amount and possibly more. Reading `tokensLeft` without this
|
|
6324
6399
|
* flag would present an under-count as an exact balance.
|
|
6325
6400
|
*/
|
|
6326
|
-
tokensKnown
|
|
6401
|
+
tokensKnown: boolean;
|
|
6327
6402
|
usdLeft: number;
|
|
6328
6403
|
usdCapped: boolean;
|
|
6404
|
+
/** False once any recorded work reported an unknown dollar cost; the dollar totals are then a
|
|
6405
|
+
* lower bound on real spend, not a measurement. */
|
|
6406
|
+
usdKnown: boolean;
|
|
6407
|
+
iterationsLeft: number;
|
|
6329
6408
|
deadlineMs: number;
|
|
6330
6409
|
reservedTokens: number;
|
|
6331
6410
|
}>;
|
|
6332
6411
|
/** Why a reservation was refused. `budget-exhausted` means the pool ran out of a channel it
|
|
6333
|
-
* budgets; `
|
|
6412
|
+
* budgets; `below-runtime-floor` means the request is under the amount that harness needs before
|
|
6413
|
+
* it does any work at all, so it is unsatisfiable at that size and the fix is to RAISE it;
|
|
6414
|
+
* `usd-unbudgeted` means the root declared no dollar ceiling, so a dollar request is
|
|
6334
6415
|
* unsatisfiable at any amount and the fix is to budget the root, not to ask for less. */
|
|
6335
|
-
type ReservationRejection = 'budget-exhausted' | 'usd-unbudgeted';
|
|
6416
|
+
type ReservationRejection = 'budget-exhausted' | 'usd-unbudgeted' | 'below-runtime-floor';
|
|
6417
|
+
/** State recovered from a prior process before new work is admitted. `committed` is measured spend
|
|
6418
|
+
* already present in the durable journal. Each `uncertainReservation` is a child that was recorded
|
|
6419
|
+
* as started but never recorded as settled: its full declared ceiling is charged conservatively,
|
|
6420
|
+
* while the public readout remains explicitly unknown. */
|
|
6421
|
+
interface BudgetPoolRestore {
|
|
6422
|
+
readonly committed?: Spend;
|
|
6423
|
+
readonly uncertainReservations?: ReadonlyArray<Budget>;
|
|
6424
|
+
/** Original absolute deadline from the first process. It may never slide on restart. */
|
|
6425
|
+
readonly absoluteDeadlineMs?: number;
|
|
6426
|
+
}
|
|
6336
6427
|
interface BudgetPool {
|
|
6337
6428
|
/**
|
|
6338
6429
|
* Atomically reserve a child's full ceiling from the free balance. Fails closed
|
|
@@ -6381,31 +6472,52 @@ declare function spendFromUsageEvents(events: UsageEvent[]): Spend;
|
|
|
6381
6472
|
/**
|
|
6382
6473
|
* Create a conserved reservation pool from a root `Budget`. `now()` is injected so the
|
|
6383
6474
|
* deadline readout is deterministic; defaults to `Date.now` for non-test callers. The
|
|
6384
|
-
* absolute deadline is fixed at construction (`now() + budget.deadlineMs`)
|
|
6385
|
-
*
|
|
6475
|
+
* absolute deadline for a fresh pool is fixed at construction (`now() + budget.deadlineMs`). A
|
|
6476
|
+
* restored pool instead retains `restore.absoluteDeadlineMs`, so restart never slides the original
|
|
6477
|
+
* wall-clock limit. The readout is an absolute instant, not a shrinking remainder.
|
|
6386
6478
|
*/
|
|
6387
|
-
declare function createBudgetPool(root: Budget, now?: () => number): BudgetPool;
|
|
6479
|
+
declare function createBudgetPool(root: Budget, now?: () => number, restore?: BudgetPoolRestore): BudgetPool;
|
|
6388
6480
|
//#endregion
|
|
6389
6481
|
//#region src/runtime/supervise/coordination-log.d.ts
|
|
6390
|
-
/**
|
|
6482
|
+
/** Stable identity of the supervisor that owns one coordination stream. High-level supervision
|
|
6483
|
+
* derives it from the exact root/child execution identity plus its parent assignment. */
|
|
6484
|
+
type CoordinationOwnerId = string;
|
|
6485
|
+
/** Durable delivery evidence retained in commit order. An attempt without a later event carrying
|
|
6486
|
+
* the same `receiptId` has an unknown outcome after a crash and is never replayed. */
|
|
6487
|
+
type CoordinationDeliveryEvidence = Extract<CoordinationEvent, {
|
|
6488
|
+
readonly type: 'delivery-attempt' | 'steer' | 'answer';
|
|
6489
|
+
}>;
|
|
6490
|
+
/** Coordination evidence loaded from prior processes of one durable supervised run. */
|
|
6391
6491
|
interface PriorCoordination {
|
|
6492
|
+
/** The owner filter used for this replay. Omitted only for the compatibility all-owner read. */
|
|
6493
|
+
readonly ownerId?: CoordinationOwnerId;
|
|
6392
6494
|
/** Every question the prior process raised, with answer-status folded in, raise order. */
|
|
6393
6495
|
readonly questions: ReadonlyArray<QuestionRecord>;
|
|
6394
6496
|
/** Every analyst finding the prior process published, publish order. */
|
|
6395
6497
|
readonly findings: ReadonlyArray<AnalystFindingEvent>;
|
|
6498
|
+
/** Every authorized continuation, in commit order. These are evidence, never replayed to a new
|
|
6499
|
+
* worker automatically. */
|
|
6500
|
+
readonly continuations: ReadonlyArray<ContinuationInstruction>;
|
|
6501
|
+
/** Delivery intent and result records in commit order, linked to receipts by `receiptId`. */
|
|
6502
|
+
readonly deliveryEvidence: ReadonlyArray<CoordinationDeliveryEvidence>;
|
|
6503
|
+
/** Exact source-bus stamps in durable append order. Bus `seq` restarts with each process; append
|
|
6504
|
+
* order remains the cross-process replay order. */
|
|
6505
|
+
readonly records: ReadonlyArray<BusRecord<CoordinationEvent>>;
|
|
6396
6506
|
}
|
|
6397
6507
|
/** The durable coordination side-log seam. `append` records one bus event (kinds it does not
|
|
6398
6508
|
* persist are ignored); `load` replays a run's prior records folded into `PriorCoordination`. */
|
|
6399
6509
|
interface CoordinationLog {
|
|
6400
|
-
append(runId: string,
|
|
6401
|
-
load(runId: string): Promise<PriorCoordination>;
|
|
6510
|
+
append(runId: string, record: BusRecord<CoordinationEvent>, ownerId?: CoordinationOwnerId): Promise<void>;
|
|
6511
|
+
load(runId: string, ownerId?: CoordinationOwnerId): Promise<PriorCoordination>;
|
|
6402
6512
|
}
|
|
6403
6513
|
/** FS-backed `CoordinationLog`: append-only JSONL, fsynced per record. */
|
|
6404
6514
|
declare class FileCoordinationLog implements CoordinationLog {
|
|
6405
6515
|
private readonly path;
|
|
6516
|
+
private appendTail;
|
|
6406
6517
|
constructor(path: string);
|
|
6407
|
-
append(runId: string,
|
|
6408
|
-
|
|
6518
|
+
append(runId: string, record: BusRecord<CoordinationEvent>, ownerId?: CoordinationOwnerId): Promise<void>;
|
|
6519
|
+
private appendRecord;
|
|
6520
|
+
load(runId: string, ownerId?: CoordinationOwnerId): Promise<PriorCoordination>;
|
|
6409
6521
|
}
|
|
6410
6522
|
//#endregion
|
|
6411
6523
|
//#region src/runtime/supervise/finalizer.d.ts
|
|
@@ -6636,6 +6748,7 @@ interface DriverAgentOptions {
|
|
|
6636
6748
|
readonly blobs: ResultBlobStore;
|
|
6637
6749
|
/** Resolve a spawned `profile` to a worker LEAF or a driver child (the recursion seam). */
|
|
6638
6750
|
readonly makeWorkerAgent: MakeWorkerAgent;
|
|
6751
|
+
readonly authorizeDownMessage?: AuthorizeDownMessage;
|
|
6639
6752
|
/** Per-child budget reserved from the conserved pool on each spawn. */
|
|
6640
6753
|
readonly perWorker: Budget;
|
|
6641
6754
|
/** Independent completion check for work the driver performs itself. When present, the driver
|
|
@@ -6661,6 +6774,9 @@ interface DriverAgentOptions {
|
|
|
6661
6774
|
/** The driver's stance — a string, or built from the task (the worker-driver prompt /
|
|
6662
6775
|
* the generator). INJECTED so the prompt is a pluggable, optimizable role. */
|
|
6663
6776
|
readonly systemPrompt: string | ((task: unknown) => string);
|
|
6777
|
+
/** Product-selected tools already bound to this exact supervisor node. The same descriptors are
|
|
6778
|
+
* served over MCP for external supervisors; this arm projects them into router ToolSpecs. */
|
|
6779
|
+
readonly nodeTools?: ReadonlyArray<McpToolDescriptor$1>;
|
|
6664
6780
|
/** WORK tools the driver may call DIRECTLY (alongside the coordination verbs) — so the driver is
|
|
6665
6781
|
* not a pure manager but a full agent that can ACT (do simple work itself) OR SPAWN (delegate).
|
|
6666
6782
|
* Each is a router tool spec; their names must not collide with the coordination verbs. Pair with
|
|
@@ -6708,18 +6824,24 @@ interface DriverAgentOptions {
|
|
|
6708
6824
|
* off (no behavior change). `distill` defaults to a self-summary authored by the brain combined
|
|
6709
6825
|
* with the factual settled-worker roster; override to supply your own. */
|
|
6710
6826
|
readonly compaction?: ToolLoopCompactionOptions;
|
|
6711
|
-
/** Pass-through subscriber for every coordination bus event
|
|
6712
|
-
* steer
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6827
|
+
/** Pass-through subscriber for every coordination bus event: settled/question/finding,
|
|
6828
|
+
* pre-delivery instruction receipts, and steer/answer delivery outcomes. A durable caller uses
|
|
6829
|
+
* this to append the coordination log. Omit = no observer. */
|
|
6830
|
+
readonly onEvent?: (event: CoordinationEvent, record: BusRecord<CoordinationEvent>) => void | Promise<void>;
|
|
6831
|
+
/** Re-publish resume-time settlements through the awaited observer before the first brain turn. */
|
|
6832
|
+
readonly replaySettlements?: boolean;
|
|
6833
|
+
/** Questions, findings, and authorized continuation receipts loaded from a prior process.
|
|
6834
|
+
* Questions seed the ledger (`list_questions`, blocking-stop policy); all three feed the resume
|
|
6835
|
+
* brief. Continuation receipts are evidence only and are never auto-delivered. Omit = fresh. */
|
|
6717
6836
|
readonly priorCoordination?: PriorCoordination;
|
|
6718
6837
|
/** How the settled-worker ledger becomes the run's output. Default `bestDelivered` — the single
|
|
6719
6838
|
* highest-scoring DELIVERED child (the exact keep-best every existing caller had). Runs under
|
|
6720
6839
|
* the delivered-only invariant (`runFinalizer`): whatever the finalizer, an undelivered or
|
|
6721
6840
|
* invalid child's output stays unreachable. */
|
|
6722
6841
|
readonly finalizer?: SupervisorFinalizer;
|
|
6842
|
+
/** Optional shared manager inbox used by a wrapper that must accept messages before async node
|
|
6843
|
+
* setup finishes. Ordinary callers omit it and the driver owns a fresh inbox. */
|
|
6844
|
+
readonly inbox?: Inbox;
|
|
6723
6845
|
}
|
|
6724
6846
|
/**
|
|
6725
6847
|
* Build the intelligent recursive driver. Its `act` is the LLM tool-loop; spawn it as a
|
|
@@ -6753,7 +6875,7 @@ interface CoordinationMcpHandle {
|
|
|
6753
6875
|
* `settled()` for a finalize, so a delivered child the harness never awaited is not lost. */
|
|
6754
6876
|
drainResolved: CoordinationTools['drainResolved'];
|
|
6755
6877
|
isStopped(): boolean;
|
|
6756
|
-
/** The full ordered bus-event log
|
|
6878
|
+
/** The full ordered bus-event log for current-process observability and audit evidence. */
|
|
6757
6879
|
history: CoordinationTools['history'];
|
|
6758
6880
|
/** Bus throughput counters for live dashboards. */
|
|
6759
6881
|
stats: CoordinationTools['stats'];
|
|
@@ -6768,6 +6890,7 @@ declare function serveCoordinationMcp(opts: {
|
|
|
6768
6890
|
scope: Scope<unknown>;
|
|
6769
6891
|
blobs: ResultBlobStore;
|
|
6770
6892
|
makeWorkerAgent: MakeWorkerAgent;
|
|
6893
|
+
authorizeDownMessage?: AuthorizeDownMessage;
|
|
6771
6894
|
perWorker: Budget;
|
|
6772
6895
|
/** Independent completion check exposed to the driver as `submit_result`. */
|
|
6773
6896
|
deliverable?: DeliverableSpec<unknown>;
|
|
@@ -6794,188 +6917,19 @@ declare function serveCoordinationMcp(opts: {
|
|
|
6794
6917
|
watchWorkers?: WorkerWatchOptions;
|
|
6795
6918
|
/** Idle time after which `observe_agent` reports a worker as stalled. */
|
|
6796
6919
|
stallAfterMs?: number;
|
|
6797
|
-
/** Pass-through subscriber for every bus event
|
|
6798
|
-
|
|
6920
|
+
/** Pass-through subscriber for every bus event, including pre-delivery instruction receipts and
|
|
6921
|
+
* steer/answer delivery outcomes. */
|
|
6922
|
+
onEvent?: (event: CoordinationEvent, record: BusRecord<CoordinationEvent>) => void | Promise<void>;
|
|
6923
|
+
/** Re-publish resume-time settlements through the awaited observer before this server listens. */
|
|
6924
|
+
replaySettlements?: boolean;
|
|
6799
6925
|
questionPolicy?: QuestionPolicy;
|
|
6800
6926
|
/** Questions replayed from a prior process of this run — seeds the question ledger. */
|
|
6801
6927
|
priorQuestions?: ReadonlyArray<QuestionRecord>;
|
|
6928
|
+
/** Product-selected tools already bound to this exact supervisor node. They share this server
|
|
6929
|
+
* with the coordination verbs, so the existing MCP duplicate-name guard applies before listen. */
|
|
6930
|
+
nodeTools?: ReadonlyArray<McpToolDescriptor$1>;
|
|
6802
6931
|
}): Promise<CoordinationMcpHandle>;
|
|
6803
6932
|
//#endregion
|
|
6804
|
-
//#region src/runtime/supervise/supervisor-agent.d.ts
|
|
6805
|
-
/**
|
|
6806
|
-
* The supervisor's profile — the subset of an `AgentProfile` that selects + shapes its brain.
|
|
6807
|
-
* `harness` is the backend-as-data discriminant; `systemPrompt` is the standing instruction.
|
|
6808
|
-
*
|
|
6809
|
-
* A canonical `AgentProfile` from `@tangle-network/agent-interface` satisfies this interface
|
|
6810
|
-
* structurally: its `model` is a hints OBJECT and its system prompt lives at `prompt.systemPrompt`,
|
|
6811
|
-
* so both spellings are accepted here and reduced by {@link resolveSupervisorProfile}. Before that,
|
|
6812
|
-
* a canonical profile's model object reached `RouterConfig.model` (a string) as an object and its
|
|
6813
|
-
* `prompt.systemPrompt` was dropped — a request the provider rejects, and a supervisor running the
|
|
6814
|
-
* default strategy while its profile named another.
|
|
6815
|
-
*
|
|
6816
|
-
* WHAT EACH ARM HONORS — the two brains read different amounts of a profile, so state it rather
|
|
6817
|
-
* than let a caller infer that a field took effect:
|
|
6818
|
-
*
|
|
6819
|
-
* - ROUTER arm (`harness` null): only `name`, the resolved model id (`model`, or
|
|
6820
|
-
* `model.default`), and the resolved system prompt (`prompt.systemPrompt`/`systemPrompt` plus
|
|
6821
|
-
* `prompt.instructions` and `resources.instructions`) reach the brain. A full `AgentProfile`'s
|
|
6822
|
-
* `tools`, `mcp`, `permissions`, `resources.skills`/`files`, `hooks`, `modes`, `subagents`,
|
|
6823
|
-
* `model.provider`, `model.small` and `model.reasoningEffort` are NOT honored here: the router
|
|
6824
|
-
* brain is one `ToolLoopChat` over the coordination verbs, and neither of its two tool-calling
|
|
6825
|
-
* transports (`routerChatWithTools` buffered, `streamRouterChatWithTools` when
|
|
6826
|
-
* `RouterConfig.stream` is set) has a parameter for any of them.
|
|
6827
|
-
* - HARNESS arm (`harness` set): the WHOLE profile object is handed to `deps.driveHarness`
|
|
6828
|
-
* untouched, plus the resolved system prompt as a separate argument. Everything the profile
|
|
6829
|
-
* declares is the harness's to materialize; this module changes none of it.
|
|
6830
|
-
*/
|
|
6831
|
-
interface SupervisorProfile {
|
|
6832
|
-
readonly name?: string;
|
|
6833
|
-
/** null/undefined → router brain (in-process tool-loop); a coding-CLI harness → sandboxed brain. */
|
|
6834
|
-
readonly harness?: string | null;
|
|
6835
|
-
/** The router model when the brain is router-driven: a model id, or a canonical profile's model
|
|
6836
|
-
* hints whose `default` IS the id. Absent (including a hints object with no `default`) → the
|
|
6837
|
-
* deps router config's model applies. Other hints (`small`, `provider`, `reasoningEffort`) are
|
|
6838
|
-
* harness-arm material only. */
|
|
6839
|
-
readonly model?: string | AgentProfileModelHints;
|
|
6840
|
-
/** Canonical `AgentProfile` prompt shaping. `prompt.systemPrompt` and the top-level `systemPrompt`
|
|
6841
|
-
* are the same standing instruction in two spellings; disagreeing values are a fault, not a pick.
|
|
6842
|
-
* `prompt.instructions` lines are appended to the resolved prompt, one per line. */
|
|
6843
|
-
readonly prompt?: AgentProfilePrompt;
|
|
6844
|
-
/** Canonical `AgentProfile` resources. Only `instructions` shapes the brain here (appended to the
|
|
6845
|
-
* resolved system prompt); every other resource is the harness's to materialize. */
|
|
6846
|
-
readonly resources?: AgentProfileResources;
|
|
6847
|
-
/** The standing instructions ("you delegate, you do not solve"). */
|
|
6848
|
-
readonly systemPrompt?: string;
|
|
6849
|
-
}
|
|
6850
|
-
/** A `SupervisorProfile` reduced to the scalars the two brain arms consume. `modelId`/`systemPrompt`
|
|
6851
|
-
* stay `undefined` when the profile named none — the caller's fallback (`deps.router.model`,
|
|
6852
|
-
* the built-in default supervisor prompt) then applies, and this type cannot hide which happened.
|
|
6853
|
-
*
|
|
6854
|
-
* There is deliberately no `reasoningEffort` here: the router brain runs on `chatWithTools` (the
|
|
6855
|
-
* buffered/streamed switch in the router client), and neither transport has a `reasoning_effort`
|
|
6856
|
-
* parameter — only the chat-only `routerChatWithUsage` does — so a field carrying it would be a
|
|
6857
|
-
* public promise nothing keeps. `model.reasoningEffort` still reaches the harness arm inside the
|
|
6858
|
-
* profile. */
|
|
6859
|
-
interface ResolvedSupervisorProfile {
|
|
6860
|
-
readonly name: string;
|
|
6861
|
-
readonly harness: string | null;
|
|
6862
|
-
readonly modelId?: string;
|
|
6863
|
-
readonly systemPrompt?: string;
|
|
6864
|
-
}
|
|
6865
|
-
/**
|
|
6866
|
-
* Reduce either profile spelling — a hand-written `SupervisorProfile` or a canonical `AgentProfile`
|
|
6867
|
-
* — to the scalars the brain arms consume:
|
|
6868
|
-
*
|
|
6869
|
-
* - `modelId`: a string `model` verbatim, else `model.default`. Absent or unresolvable → the
|
|
6870
|
-
* router config's own model applies unchanged.
|
|
6871
|
-
* - `systemPrompt`: the system prompt plus the `prompt.instructions` and `resources.instructions`
|
|
6872
|
-
* lines, one per line.
|
|
6873
|
-
*
|
|
6874
|
-
* `supervisorAgent` resolves each piece only where it is consumed (the model id on the router arm
|
|
6875
|
-
* only); this whole-profile reduction is the caller-facing view of the same rules.
|
|
6876
|
-
*/
|
|
6877
|
-
declare function resolveSupervisorProfile(profile: SupervisorProfile): ResolvedSupervisorProfile;
|
|
6878
|
-
/** Where the coordination MCP binds. Omit = an ephemeral port on `127.0.0.1` (the local-harness
|
|
6879
|
-
* default); set `host` when the root or the harness runs off-host. */
|
|
6880
|
-
interface CoordinationBinding {
|
|
6881
|
-
readonly host?: string;
|
|
6882
|
-
readonly port?: number;
|
|
6883
|
-
/** Explicit acknowledgment required to bind a NON-loopback host — see
|
|
6884
|
-
* {@link assertCoordinationBinding} for what is being accepted. */
|
|
6885
|
-
readonly allowUnauthenticatedRemote?: boolean;
|
|
6886
|
-
}
|
|
6887
|
-
/**
|
|
6888
|
-
* Fail closed on a non-loopback coordination bind. `serveCoordinationMcp` mounts spawn_agent /
|
|
6889
|
-
* steer_agent / stop with NO authentication of any kind (it is a bare JSON-RPC-over-HTTP handler),
|
|
6890
|
-
* so a non-loopback bind lets anyone who can reach the port spawn agents and spend the run's
|
|
6891
|
-
* conserved budget. There is no token to require yet, so the only honest options are loopback or an
|
|
6892
|
-
* explicit, recorded acknowledgment — never a silent bind.
|
|
6893
|
-
*/
|
|
6894
|
-
declare function assertCoordinationBinding(binding: CoordinationBinding | undefined): void;
|
|
6895
|
-
/** How to run a sandboxed harness as the DRIVER, with the coordination verbs mounted — the substrate
|
|
6896
|
-
* seam the caller supplies (mirrors `makeWorkerAgent` for spawned children). It runs `profile` on
|
|
6897
|
-
* `task` in its backend (sandbox / cli-bridge) with `coordinationMcpUrl` mounted as an MCP server,
|
|
6898
|
-
* so the harness calls spawn_agent / await_event / stop as native tools over the live scope. */
|
|
6899
|
-
type DriveHarness = (args: {
|
|
6900
|
-
/** The caller's profile, EXACTLY as passed to `supervisorAgent` — never rewritten. A canonical
|
|
6901
|
-
* `AgentProfile` stays schema-valid here (the canonical schema rejects unknown top-level keys,
|
|
6902
|
-
* so hoisting a resolved prompt onto it would make a profile its own validator refuses). */
|
|
6903
|
-
readonly profile: SupervisorProfile;
|
|
6904
|
-
/** The standing instruction assembled from the profile: its system prompt in either spelling,
|
|
6905
|
-
* plus the `prompt.instructions` and `resources.instructions` lines. Absent when the profile
|
|
6906
|
-
* names none — the harness's own default then applies. This, not `profile.systemPrompt`, is what
|
|
6907
|
-
* the harness should run under. */
|
|
6908
|
-
readonly systemPrompt?: string;
|
|
6909
|
-
readonly task: unknown;
|
|
6910
|
-
readonly scope: Scope<unknown>;
|
|
6911
|
-
readonly coordinationMcpUrl: string;
|
|
6912
|
-
}) => Promise<void>;
|
|
6913
|
-
interface SupervisorAgentDeps {
|
|
6914
|
-
readonly blobs: ResultBlobStore;
|
|
6915
|
-
/** Resolve a spawned worker `profile` to a leaf agent — the recursion seam (same for both arms). */
|
|
6916
|
-
readonly makeWorkerAgent: MakeWorkerAgent;
|
|
6917
|
-
/** Per-child budget reserved from the conserved pool on each spawn. */
|
|
6918
|
-
readonly perWorker: Budget;
|
|
6919
|
-
/** Independent completion check for direct driver work (`submit_result`). */
|
|
6920
|
-
readonly deliverable?: DeliverableSpec<unknown>;
|
|
6921
|
-
/** Hard cap on simultaneously-LIVE workers across both arms — `spawn_agent` fails closed once
|
|
6922
|
-
* this many are in flight (a concurrency fence on top of the conserved-pool fence; bounds live
|
|
6923
|
-
* boxes/sandboxes, not total work). Omit/`<= 0` = no cap. */
|
|
6924
|
-
readonly maxLiveWorkers?: number;
|
|
6925
|
-
/** Router substrate for a router-brained supervisor (`harness` null). The profile's model wins. */
|
|
6926
|
-
readonly router?: RouterConfig;
|
|
6927
|
-
/** Inject the brain directly (tests / advanced) instead of resolving `routerBrain` from the profile. */
|
|
6928
|
-
readonly brain?: ToolLoopChat;
|
|
6929
|
-
/** Required for a sandboxed-harness supervisor (`harness` set): runs the harness as the driver. */
|
|
6930
|
-
readonly driveHarness?: DriveHarness;
|
|
6931
|
-
/** WORK tools the supervisor may call DIRECTLY (router arm) — so it can do simple work ITSELF and
|
|
6932
|
-
* only delegate when it needs parallelism. Pair with `executeExtraTool`. */
|
|
6933
|
-
readonly extraTools?: ReadonlyArray<{
|
|
6934
|
-
readonly name: string;
|
|
6935
|
-
readonly description?: string;
|
|
6936
|
-
readonly parameters: Record<string, unknown>;
|
|
6937
|
-
}>;
|
|
6938
|
-
/** Runs an `extraTools` call; null/undefined falls through to the coordination dispatch. */
|
|
6939
|
-
readonly executeExtraTool?: (name: string, args: Record<string, unknown>) => Promise<string | null | undefined>;
|
|
6940
|
-
/** Analyst lenses available to the driver (both arms). Required for `analyzeOnSettle`. */
|
|
6941
|
-
readonly analysts?: AnalystRegistry;
|
|
6942
|
-
/** Analyst kinds run on each worker-settle → a `finding` the driver composes its next steer from
|
|
6943
|
-
* (the self-improving UP-leg). Unset/empty = status quo (no analyst feed). Requires `analysts`. */
|
|
6944
|
-
readonly analyzeOnSettle?: ReadonlyArray<string>;
|
|
6945
|
-
/** Run the ONLINE detector panel over each worker's LIVE tool trace (both arms) so the driver
|
|
6946
|
-
* learns a worker is looping mid-run instead of at settle. Omit = no online watching. */
|
|
6947
|
-
readonly watchWorkers?: WorkerWatchOptions;
|
|
6948
|
-
/** Idle time after which `observe_agent` reports a worker as stalled. Omit = runtime default. */
|
|
6949
|
-
readonly stallAfterMs?: number;
|
|
6950
|
-
/** PROGRESS-derived stop rule (router arm). Ends a run that has stopped learning BEFORE it
|
|
6951
|
-
* exhausts a ceiling; it can never keep a run alive past one. Build it with `plateau` /
|
|
6952
|
-
* `noProgressFor` / `allWorkersStalled` from `supervise/stop-rules` — the thresholds are the
|
|
6953
|
-
* caller's judgment. Omit = ceilings only. */
|
|
6954
|
-
readonly stopRule?: StopRule;
|
|
6955
|
-
/** One-shot notification of WHY a `stopRule` ended the run. */
|
|
6956
|
-
readonly onProgressStop?: (reason: string) => void;
|
|
6957
|
-
readonly maxTurns?: number;
|
|
6958
|
-
/** Give the supervisor brain a chapter-lifecycle on its OWN context window (router arm only) — it
|
|
6959
|
-
* distills its coordination transcript to a compact progress note once it exceeds the threshold,
|
|
6960
|
-
* instead of re-billing the whole thing every turn. See `DriverAgentOptions.compaction`. */
|
|
6961
|
-
readonly compaction?: ToolLoopCompactionOptions;
|
|
6962
|
-
/** Pass-through subscriber for every coordination bus event (both arms) — the seam a durable
|
|
6963
|
-
* caller hooks its coordination log onto. */
|
|
6964
|
-
readonly onEvent?: (event: CoordinationEvent) => void | Promise<void>;
|
|
6965
|
-
/** Questions + findings replayed from a prior process of this run (a durable coordination log).
|
|
6966
|
-
* Router arm: seeds the question ledger + the resume brief. Sandbox arm: seeds the ledger. */
|
|
6967
|
-
readonly priorCoordination?: PriorCoordination;
|
|
6968
|
-
/** How the settled ledger becomes the run's output (both arms). Default `bestDelivered` — the
|
|
6969
|
-
* exact keep-best every existing caller had. Always runs under the delivered-only invariant. */
|
|
6970
|
-
readonly finalizer?: SupervisorFinalizer;
|
|
6971
|
-
/** Where the coordination MCP binds (sandbox arm). Omit = an ephemeral loopback port, which is
|
|
6972
|
-
* unreachable from an off-host harness. A non-loopback host fails closed — see
|
|
6973
|
-
* {@link assertCoordinationBinding}. */
|
|
6974
|
-
readonly coordination?: CoordinationBinding;
|
|
6975
|
-
}
|
|
6976
|
-
/** Build a supervisor `Agent` from its profile: the brain resolves from `profile.harness` (backend-as-data), the same resolution rule as every worker. */
|
|
6977
|
-
declare function supervisorAgent(profile: SupervisorProfile, deps: SupervisorAgentDeps): Agent<unknown, unknown>;
|
|
6978
|
-
//#endregion
|
|
6979
6933
|
//#region src/runtime/supervise/delegate.d.ts
|
|
6980
6934
|
/** The conserved pool a `delegate()` call applies when the caller does not pass its own `budget`.
|
|
6981
6935
|
* A modest token ceiling + a small iteration ceiling — generous enough for a few-worker decompose,
|
|
@@ -7005,7 +6959,10 @@ interface DelegateOptions<Out = unknown> {
|
|
|
7005
6959
|
readonly brain?: ToolLoopChat;
|
|
7006
6960
|
/** Override the default authoring-supervisor profile (name / extra system-prompt stance). The
|
|
7007
6961
|
* default already carries the authoring skill; override only to add a goal or rename. */
|
|
7008
|
-
readonly supervisor?:
|
|
6962
|
+
readonly supervisor?: {
|
|
6963
|
+
readonly name?: string;
|
|
6964
|
+
readonly systemPrompt?: string;
|
|
6965
|
+
};
|
|
7009
6966
|
/** Restrict the run to this subset of models (forwarded to `supervise()`). */
|
|
7010
6967
|
readonly allowedModels?: readonly string[];
|
|
7011
6968
|
readonly runId?: string;
|
|
@@ -7121,6 +7078,9 @@ declare function queueOf<Out>(units: ReadonlyArray<{
|
|
|
7121
7078
|
* `model` is undefined (nothing was configured to check).
|
|
7122
7079
|
*/
|
|
7123
7080
|
declare function assertModelAllowed(model: string | undefined, allowed: readonly string[] | undefined): void;
|
|
7081
|
+
/** Check every canonical model-bearing field in a complete profile, including the models a
|
|
7082
|
+
* backend may select for cheap work, named subagents, or modes. */
|
|
7083
|
+
declare function assertProfileModelsAllowed(profile: AgentProfile$1, allowed: readonly string[] | undefined): void;
|
|
7124
7084
|
//#endregion
|
|
7125
7085
|
//#region src/runtime/supervise/otel-spans.d.ts
|
|
7126
7086
|
/** OTLP span attribute values. Exported because `SupervisorSpanOptions.attributes` is public and
|
|
@@ -7172,6 +7132,15 @@ interface SupervisorSpanRecorder {
|
|
|
7172
7132
|
readonly traceId: string;
|
|
7173
7133
|
/** The run's root span id — pass it to a child process to join this trace. */
|
|
7174
7134
|
readonly rootSpanId: string;
|
|
7135
|
+
/**
|
|
7136
|
+
* The trace context a worker spawned BY node `spawningNodeId` should inherit, so its own spans
|
|
7137
|
+
* join THIS trace under the span of the node that spawned it. Thread it to a run as
|
|
7138
|
+
* `SupervisorOpts.workerTrace` (`supervise()` does this whenever it builds a recorder) and the
|
|
7139
|
+
* `Scope` seeds it onto every child's `ExecutorContext`; a backend with an environment channel
|
|
7140
|
+
* stamps it with `workerTraceEnv`. An unknown node — one whose span was never opened — resolves
|
|
7141
|
+
* to the run's root span rather than to nothing, so a worker is never filed outside its own run.
|
|
7142
|
+
*/
|
|
7143
|
+
readonly workerTrace: WorkerTraceResolver;
|
|
7175
7144
|
/**
|
|
7176
7145
|
* Close the root span (and any node that never settled, marked as such), export, and flush. Safe
|
|
7177
7146
|
* to call twice; never throws — a telemetry failure is not a run failure.
|
|
@@ -7205,16 +7174,16 @@ interface WorktreeCliExecutorOptions {
|
|
|
7205
7174
|
repoRoot: string;
|
|
7206
7175
|
/**
|
|
7207
7176
|
* The supervisor-authored prompt/model plus materializable structural resources.
|
|
7208
|
-
* `model.default` selects the one-shot model
|
|
7209
|
-
*
|
|
7210
|
-
*
|
|
7211
|
-
* Harness-specific nested controls that the pinned materializer cannot preserve also fail closed.
|
|
7177
|
+
* `model.default` selects the one-shot model. Routing-only model hints, placement concerns,
|
|
7178
|
+
* provider extensions, and `resources.failOnError` fail before execution because this path
|
|
7179
|
+
* cannot honor them. Harness-specific values the materializer cannot preserve also fail closed.
|
|
7212
7180
|
*/
|
|
7213
7181
|
profile: AgentProfile$1;
|
|
7214
7182
|
/** Local CLI for this leaf. This explicit choice overrides `profile.harness`. */
|
|
7215
7183
|
harness: LocalHarness;
|
|
7216
|
-
/**
|
|
7217
|
-
|
|
7184
|
+
/** Default instruction for direct `execute(undefined, signal)` calls. An execution-time task
|
|
7185
|
+
* is authoritative. Omit when the caller always supplies the task to `execute`. */
|
|
7186
|
+
taskPrompt?: string;
|
|
7218
7187
|
/** Unique id for the worktree path + branch. Defaults to a fresh UUID. */
|
|
7219
7188
|
runId?: string;
|
|
7220
7189
|
/** Override the base ref the worktree is cut from (default `HEAD`). */
|
|
@@ -7251,13 +7220,16 @@ interface WorktreeCliExecutorOptions {
|
|
|
7251
7220
|
* likewise return `LocalHarnessResult.usage`.
|
|
7252
7221
|
*/
|
|
7253
7222
|
budgetExempt?: boolean;
|
|
7223
|
+
/** @internal Kernel-minted attempt identity threaded by the built-in registry. */
|
|
7224
|
+
executionAttemptId?: string;
|
|
7254
7225
|
}
|
|
7255
7226
|
/**
|
|
7256
7227
|
* Build a worktree-CLI leaf `Executor`. Per-spawn (a fresh worktree + abort + teardown each), so a
|
|
7257
7228
|
* fanout of N profiles = N parallel worktrees that never clobber each other.
|
|
7258
7229
|
*
|
|
7259
|
-
* Fail-loud: an empty `repoRoot`/`harness
|
|
7260
|
-
*
|
|
7230
|
+
* Fail-loud: an empty `repoRoot`/`harness` or an explicitly empty `taskPrompt` throws at
|
|
7231
|
+
* construction. Calling `execute(undefined, signal)` without a configured prompt throws before a
|
|
7232
|
+
* worktree is created. `resultArtifact()` before `execute()` resolves throws.
|
|
7261
7233
|
*
|
|
7262
7234
|
* @experimental
|
|
7263
7235
|
*/
|
|
@@ -7309,10 +7281,11 @@ interface InMemoryRunContext {
|
|
|
7309
7281
|
*/
|
|
7310
7282
|
readonly resume?: boolean;
|
|
7311
7283
|
/**
|
|
7312
|
-
* Present only on a DURABLE context: the coordination side-log
|
|
7313
|
-
*
|
|
7314
|
-
*
|
|
7315
|
-
*
|
|
7284
|
+
* Present only on a DURABLE context: the coordination side-log stores questions, analyst
|
|
7285
|
+
* findings, answer decisions, and authorized continuation receipts that the spawn journal does
|
|
7286
|
+
* not own. `supervise({ runDir })` appends them as they publish and loads them on resume.
|
|
7287
|
+
* Continuation receipts are evidence and are never auto-delivered to a replacement worker.
|
|
7288
|
+
* In-memory contexts have none: nothing outlives the process.
|
|
7316
7289
|
*/
|
|
7317
7290
|
readonly coordinationLog?: CoordinationLog;
|
|
7318
7291
|
}
|
|
@@ -7332,8 +7305,9 @@ declare function createInMemoryRunContext(opts?: InMemoryRunContextOptions): InM
|
|
|
7332
7305
|
* back on `Scope.resume` (rehydrated by `replaySpawnTree`) instead of being re-executed.
|
|
7333
7306
|
*
|
|
7334
7307
|
* Layout: `${dir}/spawn-journal.jsonl` (one JSONL record per event), `${dir}/blobs/` (one
|
|
7335
|
-
* content-addressed JSON file per settled result), and `${dir}/coordination-log.jsonl`
|
|
7336
|
-
*
|
|
7308
|
+
* content-addressed JSON file per settled result), and `${dir}/coordination-log.jsonl`
|
|
7309
|
+
* (questions, findings, answer decisions, and authorized continuation receipts retained as
|
|
7310
|
+
* evidence). The directory is created on first write.
|
|
7337
7311
|
*
|
|
7338
7312
|
* Opt-in by construction — `createInMemoryRunContext()` is unchanged and stays the default, so no
|
|
7339
7313
|
* existing consumer writes to disk or resumes unless it asks for this.
|
|
@@ -7424,7 +7398,7 @@ interface ScopeArgs {
|
|
|
7424
7398
|
readonly parentId: NodeId;
|
|
7425
7399
|
/** Journal/blob root key the supervisor `beginTree`'d. */
|
|
7426
7400
|
readonly root: NodeId;
|
|
7427
|
-
/** The
|
|
7401
|
+
/** The reservation pool for this scope: the root total or one nested allocated partition. */
|
|
7428
7402
|
readonly pool: BudgetPool;
|
|
7429
7403
|
/** Append-only spawn journal; this scope writes `spawned` + `settled` records. */
|
|
7430
7404
|
readonly journal: SpawnJournal;
|
|
@@ -7443,6 +7417,11 @@ interface ScopeArgs {
|
|
|
7443
7417
|
readonly depth: number;
|
|
7444
7418
|
/** Runtime recursion-depth ceiling — a spawn past it fails closed `depth-exceeded`. */
|
|
7445
7419
|
readonly maxDepth?: number;
|
|
7420
|
+
/** Root-owned limit on live spawned workers across this scope and every nested scope. */
|
|
7421
|
+
readonly maxLiveWorkers?: number;
|
|
7422
|
+
/** @internal Shared counter inherited by nested scopes. Callers set `maxLiveWorkers`; the root
|
|
7423
|
+
* scope creates this state once and passes the same object through its recursion seam. */
|
|
7424
|
+
readonly liveWorkerCapacity?: LiveWorkerCapacityState;
|
|
7446
7425
|
/** Abort signal for this scope; an abort cascades into every live child's executor. */
|
|
7447
7426
|
readonly signal: AbortSignal;
|
|
7448
7427
|
/** Injected clock — keeps the journal `at` timestamp deterministic in tests. */
|
|
@@ -7451,6 +7430,24 @@ interface ScopeArgs {
|
|
|
7451
7430
|
* SAME stream `runAgentRounds`/`tool-loop` feed, so the recursive tree is ONE observable stream
|
|
7452
7431
|
* (the topology viewer reads it). Undefined ⇒ the journal stays the only record. */
|
|
7453
7432
|
readonly hooks?: RuntimeHooks;
|
|
7433
|
+
/**
|
|
7434
|
+
* Trace context to hand down to each spawned worker (`SupervisorOpts.workerTrace`). Called with
|
|
7435
|
+
* THIS scope's own `parentId` — the node doing the spawning — and the resolved context is seeded
|
|
7436
|
+
* onto each child's `ExecutorContext` under `workerTraceSeamKey`. Absent (the untraced default)
|
|
7437
|
+
* ⇒ no seam is seeded and no worker environment is touched.
|
|
7438
|
+
*/
|
|
7439
|
+
readonly workerTrace?: WorkerTraceResolver;
|
|
7440
|
+
/** @internal Trusted root-adapter publication channel. It is never exposed as a Scope method. */
|
|
7441
|
+
readonly ownerMaterialization?: {
|
|
7442
|
+
readonly runtime: NodeSnapshot['runtime'];
|
|
7443
|
+
readonly authoredProfile?: unknown;
|
|
7444
|
+
readonly attemptId: string;
|
|
7445
|
+
readonly prior?: ProfileMaterializationReceipt;
|
|
7446
|
+
readonly journalRoot?: NodeId;
|
|
7447
|
+
readonly nodeId?: NodeId;
|
|
7448
|
+
readonly requiredKnown?: boolean;
|
|
7449
|
+
readonly onReceipt?: (materialization: ProfileMaterializationReceipt, binding: ExecutionBindingReceipt) => void;
|
|
7450
|
+
};
|
|
7454
7451
|
/**
|
|
7455
7452
|
* Resume seam — set ONLY by the supervisor when `SupervisorOpts.resume` is on AND a non-empty
|
|
7456
7453
|
* journal tree exists for this root. It carries the replayed committed work (so `scope.resume`
|
|
@@ -7478,6 +7475,11 @@ interface ScopeArgs {
|
|
|
7478
7475
|
};
|
|
7479
7476
|
};
|
|
7480
7477
|
}
|
|
7478
|
+
/** Mutable only inside Scope admission/release. Every nested scope receives this exact object. */
|
|
7479
|
+
interface LiveWorkerCapacityState {
|
|
7480
|
+
readonly max: number | undefined;
|
|
7481
|
+
live: number;
|
|
7482
|
+
}
|
|
7481
7483
|
/** Create the reactive `Scope` a driver's `Agent.act` runs inside: spawn children on an atomically reserved conserved budget, settle via the `next()` cursor, journal for replay. */
|
|
7482
7484
|
declare function createScope<Out>(args: ScopeArgs): Scope<Out>;
|
|
7483
7485
|
/**
|
|
@@ -7493,11 +7495,266 @@ declare function createScope<Out>(args: ScopeArgs): Scope<Out>;
|
|
|
7493
7495
|
*/
|
|
7494
7496
|
declare function settledToIteration<Out>(settled: Settled<Out>): Iteration<unknown, Out>;
|
|
7495
7497
|
//#endregion
|
|
7498
|
+
//#region src/runtime/supervise/supervisor-agent.d.ts
|
|
7499
|
+
/**
|
|
7500
|
+
* The supervisor's profile — the subset of an `AgentProfile` that selects + shapes its brain.
|
|
7501
|
+
* `harness` is the backend-as-data discriminant; `systemPrompt` is the standing instruction.
|
|
7502
|
+
*
|
|
7503
|
+
* A canonical `AgentProfile` from `@tangle-network/agent-interface` satisfies this interface
|
|
7504
|
+
* structurally: its `model` is a hints OBJECT and its system prompt lives at `prompt.systemPrompt`,
|
|
7505
|
+
* so both spellings are accepted here and reduced by {@link resolveSupervisorProfile}. Before that,
|
|
7506
|
+
* a canonical profile's model object reached `RouterConfig.model` (a string) as an object and its
|
|
7507
|
+
* `prompt.systemPrompt` was dropped — a request the provider rejects, and a supervisor running the
|
|
7508
|
+
* default strategy while its profile named another.
|
|
7509
|
+
*
|
|
7510
|
+
* WHAT EACH ARM HONORS — the two brains read different amounts of a profile, so state it rather
|
|
7511
|
+
* than let a caller infer that a field took effect:
|
|
7512
|
+
*
|
|
7513
|
+
* - ROUTER arm (`harness` null): only `name`, the resolved model id (`model`, or
|
|
7514
|
+
* `model.default`), and the resolved system prompt (`prompt.systemPrompt`/`systemPrompt` plus
|
|
7515
|
+
* `prompt.instructions` and `resources.instructions`) reach the brain. A full `AgentProfile`'s
|
|
7516
|
+
* `tools`, `mcp`, `permissions`, `resources.skills`/`files`, `hooks`, `modes`, `subagents`,
|
|
7517
|
+
* `model.provider`, `model.small` and `model.reasoningEffort` are NOT honored here: the router
|
|
7518
|
+
* brain is one `ToolLoopChat` over the coordination verbs, and neither of its two tool-calling
|
|
7519
|
+
* transports (`routerChatWithTools` buffered, `streamRouterChatWithTools` when
|
|
7520
|
+
* `RouterConfig.stream` is set) has a parameter for any of them.
|
|
7521
|
+
* - HARNESS arm (`harness` set): the WHOLE profile object is handed to `deps.driveHarness`
|
|
7522
|
+
* untouched, plus the resolved system prompt as a separate argument. Everything the profile
|
|
7523
|
+
* declares is the harness's to materialize; this module changes none of it.
|
|
7524
|
+
*/
|
|
7525
|
+
interface SupervisorProfile {
|
|
7526
|
+
readonly name?: string;
|
|
7527
|
+
/** null/undefined/`cli-base` → router brain (in-process tool-loop); a coding-CLI harness → an
|
|
7528
|
+
* external harness brain. */
|
|
7529
|
+
readonly harness?: string | null;
|
|
7530
|
+
/** The router model when the brain is router-driven: a model id, or a canonical profile's model
|
|
7531
|
+
* hints whose `default` IS the id. Absent (including a hints object with no `default`) → the
|
|
7532
|
+
* deps router config's model applies. Other hints (`small`, `provider`, `reasoningEffort`) are
|
|
7533
|
+
* harness-arm material only. */
|
|
7534
|
+
readonly model?: string | AgentProfileModelHints;
|
|
7535
|
+
/** Canonical `AgentProfile` prompt shaping. `prompt.systemPrompt` and the top-level `systemPrompt`
|
|
7536
|
+
* are the same standing instruction in two spellings; disagreeing values are a fault, not a pick.
|
|
7537
|
+
* `prompt.instructions` lines are appended to the resolved prompt, one per line. */
|
|
7538
|
+
readonly prompt?: AgentProfilePrompt;
|
|
7539
|
+
/** Canonical `AgentProfile` resources. Only `instructions` shapes the brain here (appended to the
|
|
7540
|
+
* resolved system prompt); every other resource is the harness's to materialize. */
|
|
7541
|
+
readonly resources?: AgentProfileResources;
|
|
7542
|
+
/** The standing instructions ("you delegate, you do not solve"). */
|
|
7543
|
+
readonly systemPrompt?: string;
|
|
7544
|
+
}
|
|
7545
|
+
/** A `SupervisorProfile` reduced to the scalars the two brain arms consume. `modelId`/`systemPrompt`
|
|
7546
|
+
* stay `undefined` when the profile named none — the caller's fallback (`deps.router.model`,
|
|
7547
|
+
* the built-in default supervisor prompt) then applies, and this type cannot hide which happened.
|
|
7548
|
+
*
|
|
7549
|
+
* There is deliberately no `reasoningEffort` here: the router brain runs on `chatWithTools` (the
|
|
7550
|
+
* buffered/streamed switch in the router client), and neither transport has a `reasoning_effort`
|
|
7551
|
+
* parameter — only the chat-only `routerChatWithUsage` does — so a field carrying it would be a
|
|
7552
|
+
* public promise nothing keeps. `model.reasoningEffort` still reaches the harness arm inside the
|
|
7553
|
+
* profile. */
|
|
7554
|
+
interface ResolvedSupervisorProfile {
|
|
7555
|
+
readonly name: string;
|
|
7556
|
+
readonly harness: string | null;
|
|
7557
|
+
readonly modelId?: string;
|
|
7558
|
+
readonly systemPrompt?: string;
|
|
7559
|
+
}
|
|
7560
|
+
/**
|
|
7561
|
+
* Reduce either profile spelling — a hand-written `SupervisorProfile` or a canonical `AgentProfile`
|
|
7562
|
+
* — to the scalars the brain arms consume:
|
|
7563
|
+
*
|
|
7564
|
+
* - `modelId`: a string `model` verbatim, else `model.default`. Absent or unresolvable → the
|
|
7565
|
+
* router config's own model applies unchanged.
|
|
7566
|
+
* - `systemPrompt`: the system prompt plus the `prompt.instructions` and `resources.instructions`
|
|
7567
|
+
* lines, one per line.
|
|
7568
|
+
*
|
|
7569
|
+
* `supervisorAgent` resolves each piece only where it is consumed (the model id on the router arm
|
|
7570
|
+
* only); this whole-profile reduction is the caller-facing view of the same rules.
|
|
7571
|
+
*/
|
|
7572
|
+
declare function resolveSupervisorProfile(profile: SupervisorProfile): ResolvedSupervisorProfile;
|
|
7573
|
+
/** Where the coordination MCP binds. Omit = an ephemeral port on `127.0.0.1` (the local-harness
|
|
7574
|
+
* default); set `host` when the root or the harness runs off-host. */
|
|
7575
|
+
interface CoordinationBinding {
|
|
7576
|
+
readonly host?: string;
|
|
7577
|
+
readonly port?: number;
|
|
7578
|
+
/** Explicit acknowledgment required to bind a NON-loopback host — see
|
|
7579
|
+
* {@link assertCoordinationBinding} for what is being accepted. */
|
|
7580
|
+
readonly allowUnauthenticatedRemote?: boolean;
|
|
7581
|
+
}
|
|
7582
|
+
/**
|
|
7583
|
+
* Fail closed on a non-loopback coordination bind. `serveCoordinationMcp` mounts spawn_agent /
|
|
7584
|
+
* steer_agent / stop with NO authentication of any kind (it is a bare JSON-RPC-over-HTTP handler),
|
|
7585
|
+
* so a non-loopback bind lets anyone who can reach the port spawn agents and spend the run's
|
|
7586
|
+
* conserved budget. There is no token to require yet, so the only honest options are loopback or an
|
|
7587
|
+
* explicit, recorded acknowledgment — never a silent bind.
|
|
7588
|
+
*/
|
|
7589
|
+
declare function assertCoordinationBinding(binding: CoordinationBinding | undefined): void;
|
|
7590
|
+
/** Trusted run/node identity Runtime binds to one manager. Model-authored tool arguments cannot
|
|
7591
|
+
* provide or replace any of these fields. */
|
|
7592
|
+
interface SupervisorNodeContext {
|
|
7593
|
+
readonly runId: string;
|
|
7594
|
+
/** Stable across a durable restart; unique per in-memory invocation. */
|
|
7595
|
+
readonly runNamespace: string;
|
|
7596
|
+
/** Concrete Scope node that owns this manager's coordination stream. */
|
|
7597
|
+
readonly nodeId: string;
|
|
7598
|
+
/** Stable identity of this manager's coordination stream. */
|
|
7599
|
+
readonly ownerId: string;
|
|
7600
|
+
readonly depth: number;
|
|
7601
|
+
readonly identity: NodeExecutionIdentity;
|
|
7602
|
+
/** Assignment identity within the parent manager; absent only for the root. */
|
|
7603
|
+
readonly assignmentId?: string;
|
|
7604
|
+
readonly profile: SupervisorProfile;
|
|
7605
|
+
readonly task: unknown;
|
|
7606
|
+
}
|
|
7607
|
+
/** Context known before `Agent.act`; Runtime adds the concrete node, profile, and task. */
|
|
7608
|
+
type SupervisorNodeContextSeed = Omit<SupervisorNodeContext, 'nodeId' | 'profile' | 'task'>;
|
|
7609
|
+
/** Trusted context for one product-tool invocation. The node identity remains the same detached,
|
|
7610
|
+
* immutable snapshot supplied to the resolver; `signal` is the one live control reference Runtime
|
|
7611
|
+
* adds. It aborts when this manager's scope is cancelled by the caller, RootHandle, deadline,
|
|
7612
|
+
* breaker, or a recursive parent. */
|
|
7613
|
+
interface SupervisorToolInvocationContext extends SupervisorNodeContext {
|
|
7614
|
+
readonly signal: AbortSignal;
|
|
7615
|
+
}
|
|
7616
|
+
/** One product-owned tool. It reuses the canonical MCP descriptor fields while Runtime supplies
|
|
7617
|
+
* the trusted invocation context as a separate argument and binds the result for either
|
|
7618
|
+
* transport. Existing handlers remain compatible: the second argument only gains `signal`. */
|
|
7619
|
+
interface SupervisorToolDescriptor extends Omit<McpToolDescriptor$1, 'handler'> {
|
|
7620
|
+
readonly handler: (raw: unknown, context: SupervisorToolInvocationContext) => Promise<unknown>;
|
|
7621
|
+
}
|
|
7622
|
+
/** Product policy for the tools one exact supervisor node may call. Resolved once per node. */
|
|
7623
|
+
type ResolveSupervisorTools = (context: SupervisorNodeContext) => ReadonlyArray<SupervisorToolDescriptor> | Promise<ReadonlyArray<SupervisorToolDescriptor>>;
|
|
7624
|
+
/** Context-aware observer used internally to bind product transactions to the actual live node. */
|
|
7625
|
+
type ObserveSupervisorNodeEvent = (context: SupervisorNodeContext, event: CoordinationEvent, record: BusRecord<CoordinationEvent>) => void | Promise<void>;
|
|
7626
|
+
/** How to run an external harness as the DRIVER, with the coordination verbs mounted — the substrate
|
|
7627
|
+
* seam the caller supplies (mirrors `makeWorkerAgent` for spawned children). It runs `profile` on
|
|
7628
|
+
* `task` in its backend (remote sandbox or local CLI bridge) with `coordinationMcpUrl` mounted as an MCP server,
|
|
7629
|
+
* so the harness calls spawn_agent / await_event / stop as native tools over the live scope. */
|
|
7630
|
+
interface DriveHarness {
|
|
7631
|
+
(args: {
|
|
7632
|
+
/** The caller's profile, EXACTLY as passed to `supervisorAgent` — never rewritten. A canonical
|
|
7633
|
+
* `AgentProfile` stays schema-valid here (the canonical schema rejects unknown top-level keys,
|
|
7634
|
+
* so hoisting a resolved prompt onto it would make a profile its own validator refuses). */
|
|
7635
|
+
readonly profile: SupervisorProfile;
|
|
7636
|
+
/** The standing instruction assembled from the profile: its system prompt in either spelling,
|
|
7637
|
+
* plus the `prompt.instructions` and `resources.instructions` lines. Absent when the profile
|
|
7638
|
+
* names none — the harness's own default then applies. This, not `profile.systemPrompt`, is
|
|
7639
|
+
* what the harness should run under. */
|
|
7640
|
+
readonly systemPrompt?: string;
|
|
7641
|
+
readonly task: unknown;
|
|
7642
|
+
readonly scope: Scope<unknown>;
|
|
7643
|
+
readonly coordinationMcpUrl: string;
|
|
7644
|
+
/** Data-only product tool surface mounted on the coordination MCP. Runtime-owned drivers include
|
|
7645
|
+
* this in their materialization evidence without persisting executable handlers. */
|
|
7646
|
+
readonly coordinationTools: ReadonlyArray<Omit<McpToolDescriptor$1, 'handler'>>;
|
|
7647
|
+
}): Promise<void>;
|
|
7648
|
+
/** Optional live inbox for the manager session this adapter currently drives. Return `false`
|
|
7649
|
+
* when no executor inbox is active instead of claiming a message was delivered. */
|
|
7650
|
+
deliver?(message: unknown): boolean;
|
|
7651
|
+
}
|
|
7652
|
+
/** Trusted manager identity available before its external harness starts. A product uses this to
|
|
7653
|
+
* return one independently steerable harness session per recursive manager. */
|
|
7654
|
+
type DriveHarnessOwnerContext = Omit<SupervisorNodeContext, 'nodeId'>;
|
|
7655
|
+
/** Resolve an external harness for one exact Runtime-owned manager identity. */
|
|
7656
|
+
type ResolveDriveHarness = (context: DriveHarnessOwnerContext) => DriveHarness;
|
|
7657
|
+
interface SupervisorAgentDeps {
|
|
7658
|
+
readonly blobs: ResultBlobStore;
|
|
7659
|
+
/** Resolve a spawned worker `profile` to a leaf agent — the recursion seam (same for both arms). */
|
|
7660
|
+
readonly makeWorkerAgent: MakeWorkerAgent;
|
|
7661
|
+
/** Product authorization for every down-leg continuation to a child. */
|
|
7662
|
+
readonly authorizeDownMessage?: AuthorizeDownMessage;
|
|
7663
|
+
/** Per-child budget reserved from the conserved pool on each spawn. */
|
|
7664
|
+
readonly perWorker: Budget;
|
|
7665
|
+
/** Independent completion check for direct driver work (`submit_result`). */
|
|
7666
|
+
readonly deliverable?: DeliverableSpec<unknown>;
|
|
7667
|
+
/** Hard cap on simultaneously-LIVE workers across both arms — `spawn_agent` fails closed once
|
|
7668
|
+
* this many are in flight (a concurrency fence on top of the conserved-pool fence; bounds live
|
|
7669
|
+
* boxes/sandboxes, not total work). Omit/`<= 0` = no cap. */
|
|
7670
|
+
readonly maxLiveWorkers?: number;
|
|
7671
|
+
/** Router substrate for a router-brained supervisor (`harness` omitted or `cli-base`). The
|
|
7672
|
+
* profile's model wins. */
|
|
7673
|
+
readonly router?: RouterConfig;
|
|
7674
|
+
/** Inject the brain directly (tests / advanced) instead of resolving `routerBrain` from the profile. */
|
|
7675
|
+
readonly brain?: ToolLoopChat;
|
|
7676
|
+
/** Required to run an external-harness supervisor: runs the harness as the driver. */
|
|
7677
|
+
readonly driveHarness?: DriveHarness;
|
|
7678
|
+
/** Trusted identity for this manager. Required with node-scoped tools or observation. */
|
|
7679
|
+
readonly nodeContext?: SupervisorNodeContextSeed;
|
|
7680
|
+
/** Resolve product-owned tools for this exact manager. Static `extraTools` remain a router-only
|
|
7681
|
+
* compatibility seam and deliberately receive no new recursive authority. */
|
|
7682
|
+
readonly resolveSupervisorTools?: ResolveSupervisorTools;
|
|
7683
|
+
/** Awaited product observation, enriched with this manager's actual live node context. */
|
|
7684
|
+
readonly observeNodeEvent?: ObserveSupervisorNodeEvent;
|
|
7685
|
+
/** Replay resume-time settlements through `observeNodeEvent` before the manager starts. */
|
|
7686
|
+
readonly replaySettlements?: boolean;
|
|
7687
|
+
/** WORK tools the supervisor may call DIRECTLY (router arm) — so it can do simple work ITSELF and
|
|
7688
|
+
* only delegate when it needs parallelism. Pair with `executeExtraTool`. */
|
|
7689
|
+
readonly extraTools?: ReadonlyArray<{
|
|
7690
|
+
readonly name: string;
|
|
7691
|
+
readonly description?: string;
|
|
7692
|
+
readonly parameters: Record<string, unknown>;
|
|
7693
|
+
}>;
|
|
7694
|
+
/** Runs an `extraTools` call; null/undefined falls through to the coordination dispatch. */
|
|
7695
|
+
readonly executeExtraTool?: (name: string, args: Record<string, unknown>) => Promise<string | null | undefined>;
|
|
7696
|
+
/** Analyst lenses available to the driver (both arms). Required for `analyzeOnSettle`. */
|
|
7697
|
+
readonly analysts?: AnalystRegistry;
|
|
7698
|
+
/** Analyst kinds run on each worker-settle → a `finding` the driver composes its next steer from
|
|
7699
|
+
* (the self-improving UP-leg). Unset/empty = status quo (no analyst feed). Requires `analysts`. */
|
|
7700
|
+
readonly analyzeOnSettle?: ReadonlyArray<string>;
|
|
7701
|
+
/** Run the ONLINE detector panel over each worker's LIVE tool trace (both arms) so the driver
|
|
7702
|
+
* learns a worker is looping mid-run instead of at settle. Omit = no online watching. */
|
|
7703
|
+
readonly watchWorkers?: WorkerWatchOptions;
|
|
7704
|
+
/** Idle time after which `observe_agent` reports a worker as stalled. Omit = runtime default. */
|
|
7705
|
+
readonly stallAfterMs?: number;
|
|
7706
|
+
/** PROGRESS-derived stop rule (router arm). Ends a run that has stopped learning BEFORE it
|
|
7707
|
+
* exhausts a ceiling; it can never keep a run alive past one. Build it with `plateau` /
|
|
7708
|
+
* `noProgressFor` / `allWorkersStalled` from `supervise/stop-rules` — the thresholds are the
|
|
7709
|
+
* caller's judgment. Omit = ceilings only. */
|
|
7710
|
+
readonly stopRule?: StopRule;
|
|
7711
|
+
/** One-shot notification of WHY a `stopRule` ended the run. */
|
|
7712
|
+
readonly onProgressStop?: (reason: string) => void;
|
|
7713
|
+
readonly maxTurns?: number;
|
|
7714
|
+
/** Give the supervisor brain a chapter-lifecycle on its OWN context window (router arm only) — it
|
|
7715
|
+
* distills its coordination transcript to a compact progress note once it exceeds the threshold,
|
|
7716
|
+
* instead of re-billing the whole thing every turn. See `DriverAgentOptions.compaction`. */
|
|
7717
|
+
readonly compaction?: ToolLoopCompactionOptions;
|
|
7718
|
+
/** Pass-through subscriber for every coordination bus event (both arms) — the seam a durable
|
|
7719
|
+
* caller hooks its coordination log onto. */
|
|
7720
|
+
readonly onEvent?: (event: CoordinationEvent, record: BusRecord<CoordinationEvent>) => void | Promise<void>;
|
|
7721
|
+
/** Questions, findings, and authorized continuation receipts loaded from a prior process.
|
|
7722
|
+
* Router arm: questions seed the ledger and all evidence enters the resume brief. External arm:
|
|
7723
|
+
* questions seed the ledger; receipts remain durable evidence and are never auto-delivered. */
|
|
7724
|
+
readonly priorCoordination?: PriorCoordination;
|
|
7725
|
+
/** Deferred owner-scoped replay for a recursive supervisor. Its stable owner is known while the
|
|
7726
|
+
* parent authorizes the child, but loading remains asynchronous; Runtime calls this before the
|
|
7727
|
+
* nested brain can publish or act on coordination state. */
|
|
7728
|
+
readonly loadPriorCoordination?: () => Promise<PriorCoordination>;
|
|
7729
|
+
/** How the settled ledger becomes the run's output (both arms). Default `bestDelivered` — the
|
|
7730
|
+
* exact keep-best every existing caller had. Always runs under the delivered-only invariant. */
|
|
7731
|
+
readonly finalizer?: SupervisorFinalizer;
|
|
7732
|
+
/** Where the coordination MCP binds (external arm). Omit = an ephemeral loopback port, which is
|
|
7733
|
+
* unreachable from an off-host harness. A non-loopback host fails closed — see
|
|
7734
|
+
* {@link assertCoordinationBinding}. */
|
|
7735
|
+
readonly coordination?: CoordinationBinding;
|
|
7736
|
+
}
|
|
7737
|
+
/** Build a supervisor `Agent` from its profile: the brain resolves from `profile.harness` (backend-as-data), the same resolution rule as every worker. */
|
|
7738
|
+
declare function supervisorAgent(profile: SupervisorProfile, deps: SupervisorAgentDeps): Agent<unknown, unknown>;
|
|
7739
|
+
//#endregion
|
|
7496
7740
|
//#region src/runtime/supervise/supervise.d.ts
|
|
7497
|
-
/**
|
|
7498
|
-
*
|
|
7499
|
-
*
|
|
7500
|
-
|
|
7741
|
+
/**
|
|
7742
|
+
* Build the worker seam from a backend (WHERE workers run) + an optional completion oracle (the
|
|
7743
|
+
* deliverable check that makes "settled ⟺ delivered" true — the guard against "ran but didn't
|
|
7744
|
+
* deliver"). The ONE place a backend becomes a spawnable worker.
|
|
7745
|
+
*
|
|
7746
|
+
* `seams` exists because this path builds the leaf executor EAGERLY and hands it back as a BYO
|
|
7747
|
+
* `executorSpec.executor`. The registry resolves a BYO executor without ever consulting the
|
|
7748
|
+
* per-child `ExecutorContext` the `Scope` seeds, so anything the scope would have supplied is
|
|
7749
|
+
* invisible here and has to be passed in. It is a FUNCTION because it is resolved once per worker
|
|
7750
|
+
* construction, so a caller may hand back something the run only learns later — which is exactly how
|
|
7751
|
+
* `supervise()` gives a traced run's workers their trace context without ordering the span recorder
|
|
7752
|
+
* ahead of the worker seam.
|
|
7753
|
+
*/
|
|
7754
|
+
declare function workerFromBackend(backend: ExecutorConfig, deliverable?: DeliverableSpec<unknown>, seams?: () => Readonly<Record<string, unknown>>): MakeWorkerAgent;
|
|
7755
|
+
/** Manager-authored profiles are untrusted until product policy says otherwise. Remote MCP and
|
|
7756
|
+
* ambient connection grants therefore fail closed by default, in addition to local MCP and hooks. */
|
|
7757
|
+
declare const DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY: AgentProfileSecurityPolicy;
|
|
7501
7758
|
/** A name→value table, in this package's resolver-port shape (the same one `WaitProbeRegistry`
|
|
7502
7759
|
* uses): construction stays the caller's, lookup stays lazy, and a table backed by a file, a
|
|
7503
7760
|
* plugin loader, or a plain object all satisfy one interface. */
|
|
@@ -7522,6 +7779,15 @@ interface SuperviseRegistry {
|
|
|
7522
7779
|
interface SuperviseOptions {
|
|
7523
7780
|
/** The conserved compute pool for the whole run. */
|
|
7524
7781
|
readonly budget: Budget;
|
|
7782
|
+
/** Caller-created live handle for observing, steering, or cancelling this root manager. Runtime
|
|
7783
|
+
* attaches it before execution and detaches it after the join barrier. */
|
|
7784
|
+
readonly rootHandle?: RootHandle<unknown>;
|
|
7785
|
+
/** Caller-owned cancellation for the complete recursive run. Aborting it cascades through the
|
|
7786
|
+
* root scope and every live child, including acquisition and backend execution. */
|
|
7787
|
+
readonly signal?: AbortSignal;
|
|
7788
|
+
/** Trusted candidate and pursuit attribution for the root. The runtime derives profile/task
|
|
7789
|
+
* digests itself from the exact detached values it executes. */
|
|
7790
|
+
readonly execution?: AgentExecutionRef;
|
|
7525
7791
|
/** WHERE workers run — derives the worker seam. Provide this OR an explicit `makeWorkerAgent`. */
|
|
7526
7792
|
readonly backend?: ExecutorConfig;
|
|
7527
7793
|
/** The independent completion check for backend-derived workers and direct supervisor
|
|
@@ -7529,6 +7795,10 @@ interface SuperviseOptions {
|
|
|
7529
7795
|
* backend-derived workers fall back to their own validity signal. A `string` names an entry in
|
|
7530
7796
|
* `registry.deliverables`. */
|
|
7531
7797
|
readonly deliverable?: DeliverableSpec<unknown> | string;
|
|
7798
|
+
/** Resolve the completion check for one exact authorized backend-derived leaf. The callback runs
|
|
7799
|
+
* after spawn authorization and driver classification, receives a detached immutable context,
|
|
7800
|
+
* and may return `undefined` to use the run-wide `deliverable`. Driver profiles never call it. */
|
|
7801
|
+
readonly resolveDeliverable?: (input: DeliverableResolutionInput) => DeliverableSpec<unknown> | undefined;
|
|
7532
7802
|
/** Name→value tables for the four code-valued options, so a recorded run configuration can name
|
|
7533
7803
|
* them instead of carrying closures. See {@link SuperviseRegistry}. */
|
|
7534
7804
|
readonly registry?: SuperviseRegistry;
|
|
@@ -7536,17 +7806,76 @@ interface SuperviseOptions {
|
|
|
7536
7806
|
* port on `127.0.0.1`, which an off-host root cannot reach. A non-loopback host is refused
|
|
7537
7807
|
* unless `allowUnauthenticatedRemote` acknowledges that the verbs are unauthenticated. */
|
|
7538
7808
|
readonly coordination?: CoordinationBinding;
|
|
7539
|
-
/** Override the worker seam directly (tests / advanced) instead of deriving it from `backend`.
|
|
7809
|
+
/** Override the worker seam directly (tests / advanced) instead of deriving it from `backend`.
|
|
7810
|
+
* This is caller-owned execution: profile security, spawn authorization, and recursive-driver
|
|
7811
|
+
* selection below apply only to the backend-derived worker path. `authorizeMessage` still
|
|
7812
|
+
* governs continuations sent through Runtime's coordination tools. */
|
|
7540
7813
|
readonly makeWorkerAgent?: MakeWorkerAgent;
|
|
7541
|
-
/**
|
|
7814
|
+
/** Run harness-brained supervisors here. Automatic execution supports a local `bridge`; a remote
|
|
7815
|
+
* sandbox requires an explicit `driveHarness` with a reachable coordination relay or tunnel.
|
|
7816
|
+
* Defaults to `backend`; separate it when managers and workers use different services. */
|
|
7817
|
+
readonly driverBackend?: ExecutorConfig;
|
|
7818
|
+
/** Security policy applied to every manager-authored child profile before budget reservation.
|
|
7819
|
+
* The default blocks local and remote MCP, hooks, and connection grants. Pass an explicit
|
|
7820
|
+
* allowlist to grant remote MCP hosts or other author-controlled capabilities. */
|
|
7821
|
+
readonly profileSecurity?: AgentProfileSecurityPolicy;
|
|
7822
|
+
/** Product authority over one complete manager-authored spawn. The callback sees the detached,
|
|
7823
|
+
* immutable profile, task, budget, label, and key together, so approving a profile cannot
|
|
7824
|
+
* authorize a different task. Return the exact allowed profile (which may be narrowed) plus
|
|
7825
|
+
* trusted candidate/pursuit attribution, or throw to refuse the whole spawn before reservation. */
|
|
7826
|
+
readonly authorizeSpawn?: (input: {
|
|
7827
|
+
readonly profile: AgentProfile$1;
|
|
7828
|
+
readonly parent: AgentProfile$1;
|
|
7829
|
+
/** Trusted identity of the manager authorizing this exact child. */
|
|
7830
|
+
readonly parentIdentity: NodeExecutionIdentity;
|
|
7831
|
+
/** Concrete manager node; never accepted from model-authored tool arguments. */
|
|
7832
|
+
readonly parentNodeId: string;
|
|
7833
|
+
/** Stable manager-scoped assignment, including deterministic unkeyed siblings. */
|
|
7834
|
+
readonly assignmentId: string;
|
|
7835
|
+
readonly task: unknown;
|
|
7836
|
+
readonly budget: Budget;
|
|
7837
|
+
readonly label: string;
|
|
7838
|
+
readonly key?: string;
|
|
7839
|
+
readonly depth: number;
|
|
7840
|
+
}) => AuthorizedSpawn;
|
|
7841
|
+
/** Product authority over every continuation sent to a live child. When spawn authorization is
|
|
7842
|
+
* enabled, omitting this refuses steer/answer instructions instead of silently extending the
|
|
7843
|
+
* authorized task. The exact worker identity and detached bytes are recorded before delivery. */
|
|
7844
|
+
readonly authorizeMessage?: (input: DownMessageAuthorizationInput & {
|
|
7845
|
+
readonly parent: AgentProfile$1;
|
|
7846
|
+
readonly depth: number;
|
|
7847
|
+
}) => AuthorizedDownMessage;
|
|
7848
|
+
/** Decide whether an authorized child becomes another supervisor. By default only
|
|
7849
|
+
* `metadata.role === 'driver'` does. Products receive the same frozen post-authorization
|
|
7850
|
+
* context as `resolveDeliverable`, so trusted execution/assignment authority can override
|
|
7851
|
+
* model-authored metadata without a side channel. */
|
|
7852
|
+
readonly isDriverProfile?: (input: AuthorizedSpawnContext) => boolean;
|
|
7853
|
+
/** The supervisor's router substrate (`profile.harness` omitted or `cli-base`). The profile's
|
|
7854
|
+
* model wins. */
|
|
7542
7855
|
readonly router?: RouterConfig;
|
|
7543
7856
|
/** Inject the supervisor brain directly (tests / advanced). */
|
|
7544
7857
|
readonly brain?: ToolLoopChat;
|
|
7545
|
-
/** Run
|
|
7858
|
+
/** Run an external-harness supervisor explicitly. Required for a remote sandbox; optional as a
|
|
7859
|
+
* caller-owned override for a local bridge. */
|
|
7546
7860
|
readonly driveHarness?: DriveHarness;
|
|
7861
|
+
/** Resolve one custom external-harness session per trusted manager identity. Use this instead of
|
|
7862
|
+
* `driveHarness` when recursive managers must be independently steerable. */
|
|
7863
|
+
readonly resolveDriveHarness?: ResolveDriveHarness;
|
|
7864
|
+
/** Required with a custom `driveHarness` or `resolveDriveHarness`: declares which complete
|
|
7865
|
+
* AgentProfile axes that path really applies. Built-in bridge driving supplies its own
|
|
7866
|
+
* full-profile contract. */
|
|
7867
|
+
readonly driveHarnessMaterialization?: ProfileMaterializationContract;
|
|
7868
|
+
/** Resolve product-owned tools from the exact trusted manager context. The same descriptors and
|
|
7869
|
+
* handlers are bound to router and external-harness managers; resolution happens once per node.
|
|
7870
|
+
* Each handler receives that manager scope's live cancellation signal in its trusted invocation
|
|
7871
|
+
* context, including recursive parent and root cascades. */
|
|
7872
|
+
readonly resolveSupervisorTools?: ResolveSupervisorTools;
|
|
7873
|
+
/** Awaited product transaction hook for every coordination record. `eventId` is stable across a
|
|
7874
|
+
* lost acknowledgement and durable restart; the record is not pull-visible until this commits. */
|
|
7875
|
+
readonly onCoordinationEvent?: (context: SupervisorNodeContext, eventId: Sha256Digest, record: BusRecord<CoordinationEvent>) => void | Promise<void>;
|
|
7547
7876
|
/** WORK tools the supervisor may call DIRECTLY — so a recursive atom can ACT (do simple work
|
|
7548
7877
|
* itself) OR SPAWN (delegate when it needs parallelism), not be a pure manager. Pair with
|
|
7549
|
-
* `executeExtraTool`. Router arm only (`harness`
|
|
7878
|
+
* `executeExtraTool`. Router arm only (`profile.harness` omitted or `cli-base`). */
|
|
7550
7879
|
readonly extraTools?: ReadonlyArray<{
|
|
7551
7880
|
readonly name: string;
|
|
7552
7881
|
readonly description?: string;
|
|
@@ -7556,9 +7885,9 @@ interface SuperviseOptions {
|
|
|
7556
7885
|
readonly executeExtraTool?: (name: string, args: Record<string, unknown>) => Promise<string | null | undefined>;
|
|
7557
7886
|
/** Per-child budget reserved on each spawn. Defaults to a quarter of the pool's tokens. */
|
|
7558
7887
|
readonly perWorker?: Budget;
|
|
7559
|
-
/** Hard cap on simultaneously
|
|
7560
|
-
*
|
|
7561
|
-
*
|
|
7888
|
+
/** Hard cap on simultaneously executing spawned workers across the WHOLE recursive tree. The
|
|
7889
|
+
* root is excluded; nested drivers and leaves share one allocation, so recursion cannot multiply
|
|
7890
|
+
* the cap. Omit/`<= 0` = no cap (the conserved pool stays the only bound). */
|
|
7562
7891
|
readonly maxLiveWorkers?: number;
|
|
7563
7892
|
/** Analyst lenses available to the driver. Required for `analyzeOnSettle`. Unset → status quo
|
|
7564
7893
|
* (the driver receives settled worker outputs, no analyst findings). A `string` names an entry in
|
|
@@ -7587,17 +7916,23 @@ interface SuperviseOptions {
|
|
|
7587
7916
|
/**
|
|
7588
7917
|
* Make the run DURABLE: journal + result blobs + the coordination side-log are file-backed under
|
|
7589
7918
|
* this directory (`createFileRunContext`), fsynced per write, and the supervisor reads the prior
|
|
7590
|
-
* tree first. Re-running with the same `runDir` AND the same `runId` resumes
|
|
7591
|
-
*
|
|
7919
|
+
* tree first. Re-running with the same `runDir` AND the same `runId` resumes only when the exact
|
|
7920
|
+
* root profile/task identity and declared budget match. The original absolute deadline and prior
|
|
7921
|
+
* measured spend are restored before new admission. The built-in driver is resume-aware: children
|
|
7922
|
+
* that already settled, including their exact execution identities, are replayed onto
|
|
7592
7923
|
* `Scope.resume` (and into the driver's settled ledger + its first context), keyed assignments
|
|
7593
7924
|
* (`spawn_agent`'s `key`) resolve to their committed results instead of re-running, pending
|
|
7594
|
-
* waits re-arm on their original deadlines,
|
|
7595
|
-
*
|
|
7596
|
-
*
|
|
7925
|
+
* waits re-arm on their original deadlines, and the coordination log loads prior questions,
|
|
7926
|
+
* findings, and instruction receipts. The router arm receives all three in its resume brief; the
|
|
7927
|
+
* external arm seeds prior questions while findings and receipts remain in the durable log.
|
|
7928
|
+
* Instruction receipts are evidence and are never delivered automatically to a replacement
|
|
7929
|
+
* worker. The final result spans both processes' work. Unset = in-memory, fresh every call.
|
|
7597
7930
|
*
|
|
7598
7931
|
* The boundary that remains: work that was IN FLIGHT when the process died is not recovered —
|
|
7599
|
-
* the built-in executors cannot re-attach to a dead process's executions
|
|
7600
|
-
*
|
|
7932
|
+
* the built-in executors cannot re-attach to a dead process's executions. Each such assignment
|
|
7933
|
+
* resumes as explicitly lost/in-doubt, its full declared reservation is charged conservatively,
|
|
7934
|
+
* and its token/dollar telemetry remains unknown. A retry is admitted only from safely remaining
|
|
7935
|
+
* capacity, so restart cannot mint a fresh budget or slide the original absolute deadline.
|
|
7601
7936
|
*
|
|
7602
7937
|
* `runId` matters here: it defaults to the constant `'supervise'`, which is fine for a single
|
|
7603
7938
|
* resumable run per directory but collides across concurrent runs sharing one `runDir`.
|
|
@@ -7662,12 +7997,57 @@ interface SuperviseOptions {
|
|
|
7662
7997
|
*/
|
|
7663
7998
|
readonly otel?: Omit<SupervisorSpanOptions, 'runId' | 'now'>;
|
|
7664
7999
|
}
|
|
8000
|
+
/** The product-authorized result for one complete spawn request. Attribution is never accepted
|
|
8001
|
+
* from the manager itself; it enters only through this trusted callback. */
|
|
8002
|
+
interface AuthorizedSpawn {
|
|
8003
|
+
readonly profile: AgentProfile$1;
|
|
8004
|
+
readonly execution?: AgentExecutionRef;
|
|
8005
|
+
}
|
|
8006
|
+
/** Exact trusted context after a manager-authored spawn has passed product authorization. */
|
|
8007
|
+
interface AuthorizedSpawnContext {
|
|
8008
|
+
readonly profile: AgentProfile$1;
|
|
8009
|
+
readonly parent: AgentProfile$1;
|
|
8010
|
+
readonly parentIdentity: NodeExecutionIdentity;
|
|
8011
|
+
readonly execution: NodeExecutionIdentity;
|
|
8012
|
+
readonly parentNodeId: string;
|
|
8013
|
+
readonly assignmentId: string;
|
|
8014
|
+
readonly task: unknown;
|
|
8015
|
+
readonly budget: Budget;
|
|
8016
|
+
readonly label: string;
|
|
8017
|
+
readonly key?: string;
|
|
8018
|
+
readonly depth: number;
|
|
8019
|
+
}
|
|
8020
|
+
/** Exact trusted context for selecting one backend-derived leaf's completion check. */
|
|
8021
|
+
type DeliverableResolutionInput = AuthorizedSpawnContext;
|
|
7665
8022
|
/** One-call supervisor: build + run a supervisor from its profile with sensible defaults; the raw `supervisorAgent` + `createSupervisor().run` seams stay available for power use. */
|
|
7666
8023
|
declare function supervise(profile: SupervisorProfile, task: unknown, opts: SuperviseOptions): Promise<SupervisedResult<unknown>>;
|
|
7667
8024
|
//#endregion
|
|
7668
8025
|
//#region src/runtime/supervise/supervisor.d.ts
|
|
7669
8026
|
/** Create a supervisor that owns one recursive agent execution tree. */
|
|
7670
8027
|
declare function createSupervisor<Task, Out>(): Supervisor<Task, Out>;
|
|
8028
|
+
/**
|
|
8029
|
+
* Mint a `RootHandle` plus its supervisor-private control. The handle is the substrate a
|
|
8030
|
+
* chat/pi-viz client attaches to (Q2): `view()` reads the live tree, `signal()` delivers
|
|
8031
|
+
* an out-of-band message, `abort()` cascades. Before `run` binds it (and after `run`
|
|
8032
|
+
* unbinds it) the handle is fail-loud: a client that talks to a handle that is not
|
|
8033
|
+
* driving a live run gets a typed error, never a silent no-op.
|
|
8034
|
+
*/
|
|
8035
|
+
declare function createRootHandle<Out>(): SteerableRootHandle<Out>;
|
|
8036
|
+
//#endregion
|
|
8037
|
+
//#region src/runtime/supervise/trace-evidence.d.ts
|
|
8038
|
+
/** Schema version for content-addressed worker tool-trace artifacts. */
|
|
8039
|
+
declare const WORKER_TOOL_TRACE_SCHEMA_VERSION: 1;
|
|
8040
|
+
/** Bytes stored under `WorkerTraceEvidence.traceRef`. */
|
|
8041
|
+
interface WorkerToolTraceArtifact {
|
|
8042
|
+
readonly schemaVersion: typeof WORKER_TOOL_TRACE_SCHEMA_VERSION;
|
|
8043
|
+
readonly spans: ReadonlyArray<ToolSpan>;
|
|
8044
|
+
}
|
|
8045
|
+
/** Collect and persist one executor's structured tool trace without changing its task outcome. */
|
|
8046
|
+
declare function captureWorkerTraceEvidence(readSource: (() => TraceSource | undefined) | undefined, blobs: ResultBlobStore, executed: boolean): Promise<WorkerTraceEvidence>;
|
|
8047
|
+
/** Rehydrate exact persisted spans through agent-eval's one bounded trace-analysis adapter. */
|
|
8048
|
+
declare function workerTraceAnalysisStore(evidence: WorkerTraceEvidence, blobs: Pick<ResultBlobStore, 'get'>): Promise<TraceAnalysisStore>;
|
|
8049
|
+
/** Validate a stored trace artifact before an analyst or replay trusts it. */
|
|
8050
|
+
declare function parseWorkerToolTraceArtifact(value: unknown, traceRef?: string): WorkerToolTraceArtifact;
|
|
7671
8051
|
//#endregion
|
|
7672
8052
|
//#region src/runtime/supervise/trajectory-recorder.d.ts
|
|
7673
8053
|
interface TrajectoryAnalysis {
|
|
@@ -7835,6 +8215,13 @@ interface AuthoredHarness {
|
|
|
7835
8215
|
profile: AgentProfile$1;
|
|
7836
8216
|
/** Which local harness CLI drives this leaf. */
|
|
7837
8217
|
harness: 'claude' | 'codex' | 'opencode';
|
|
8218
|
+
/** Require measured usage from this leaf. Budgeted supervision refuses the default unmetered
|
|
8219
|
+
* local-CLI mode; set false only when the selected runner actually returns token usage. */
|
|
8220
|
+
budgetExempt?: WorktreeCliExecutorOptions['budgetExempt'];
|
|
8221
|
+
/** Run Codex through its measured, isolated JSONL path. This implies `budgetExempt: false`. */
|
|
8222
|
+
codexReproducible?: WorktreeCliExecutorOptions['codexReproducible'];
|
|
8223
|
+
/** Host paths denied to a reproducible Codex leaf. */
|
|
8224
|
+
codexReadDeniedPaths?: WorktreeCliExecutorOptions['codexReadDeniedPaths'];
|
|
7838
8225
|
/** Per-harness model/runId/baseRef overrides flow through the profile + these. */
|
|
7839
8226
|
runId?: string;
|
|
7840
8227
|
baseRef?: string;
|
|
@@ -7951,5 +8338,5 @@ interface VerifierEnvironmentOptions {
|
|
|
7951
8338
|
/** Any checkable task as an `Environment`, no tool surface required: the artifact is the worker's answer and the domain is one deployable `check` over it. */
|
|
7952
8339
|
declare function createVerifierEnvironment(opts: VerifierEnvironmentOptions): Environment;
|
|
7953
8340
|
//#endregion
|
|
7954
|
-
export { safeWorkerFile as $, HarvestCorpusOptions as $a, InboxMessage as $c, defaultToolDetectors as $d, BenchmarkStrategySummary as $i, createSiblingSandboxExecutor as $l, modelAuthoredChecks as $n, Persona as $o, CheckpointCapableBox as $r, plateauLength as $s, StopDecision as $t, readTraceContextFromEnv as $u, GitWorkspaceOptions as A, LoopDispatchOptions as Aa, DelegateArgs as Ac, DelegationPersistenceError as Ad, renderCorpusToInstructions as Ai, JsonRpcResponse as Al, assessAuthoredProfile as An, Pipeline as Ao, strategyAuthorContract as Ar, LeaderboardOptions as As, DelegateOptions as At, DelegateUiAuditArgs as Au, analyzeTrace as B, localSandboxClient as Ba, ProviderSeam as Bc, JudgeError as Bd, RegistryAnalyzeProjection as Bi, DelegateRunCtx as Bl, CheckSourceCtx as Bn, TrajectoryReportFn as Bo, McpToolDescriptor as Br, renderLeaderboardSvg as Bs, supervisorAgent as Bt, DelegationProgress as Bu, closingWorkerNote as C, defineStrategy as Ca, McpServer as Cc, DelegationTraceCaps as Cd, builtinShapes as Ci, GitRunner as Cl, ReservationTicket as Cn, LoopUntil as Co, pickChampion as Cr, deterministicCompletion as Cs, DispatchStopReason as Ct, DelegateCodeConfig as Cu, UntrackedCopyStats as D, sample as Da, DELEGATE_DESCRIPTION as Dc, capDelegationTrace as Dd, runPersonified as Di, createWorktree as Dl, ProfileRichness as Dn, PanelJudge as Do, AuthoredStrategy as Dr, GroupOf as Ds, freeSlots as Dt, DelegateResearchArgs as Du, CopyOptions as E, runAgentic as Ea, createMcpServer as Ec, buildDelegationTraceSpans as Ed, definePersona as Ei, captureWorktreeDiff as El, AuthoredProfile as En, Panel as Eo, AuthorStrategyOptions as Er, AxisScoresOf as Es, effectiveConcurrency as Et, DelegateFeedbackResult as Eu, gitWorkspace as F, RunLoopOptions as Fa, BridgeSeam as Fc, InMemoryDelegationStore as Fd, pipeline as Fi, InMemoryFeedbackStore as Fl, CheckExecChannel as Fn, ScopeAnalyzeInput as Fo, dumbDriver as Fr, ScoreOf as Fs, ResolvedSupervisorProfile as Ft, DelegationFeedbackSnapshot as Fu, supervise as G, resolveMcpServerLaunch as Ga, createExecutor as Gc, CoderOutput as Gd, McpEndpoint as Gi, coderTaskFromArgs as Gl, StructuralRolloutResult as Gn, WidenDecision as Go, Deliverable as Gr, auditIntent as Gs, finalizeBestDelivered as Gt, FeedbackRating as Gu, SuperviseOptions as H, ResolvedMcpServerLaunch as Ha, RouterToolsSeam as Hc, PlannerError as Hd, buildSteerContext as Hi, DetachedWinnerSelection as Hl, StructuralRolloutConfig as Hn, Verify as Ho, StdioMcpServerSpec as Hr, AuditIntentInput as Hs, serveCoordinationMcp as Ht, DelegationStatus as Hu, jjWorkspace as I, defaultSelectWinner as Ia, CliSeam as Ic, AgentEvalError$1 as Id, selectValidWinner as Ii, eventToSnapshot as Il, CheckOutcome as In, ScopeWidenGate as Io, naiveDriver as Ir, leaderboard as Is, SupervisorAgentDeps as It, DelegationHistoryArgs as Iu, createScope as J, inlineSandboxClient as Ja, SandboxSteeringOptions as Jc, BusStats as Jd, sanitizeMcpToolSchema as Ji, DelegationExecutor as Jl, compareCheckOutcomes as Jn, WinnerStrategy as Jo, OpenSandboxRunPromptOptions as Jr, AnytimeStrategySummary as Js, PlateauOptions as Jt, ResearchSource as Ju, workerFromBackend as K, resolveSecretEnv as Ka, createExecutorRegistry as Kc, BusEvent as Kd, McpEnvironmentOptions as Ki, detachedSessionDelegate as Kl, VisibleCheck as Kn, WidenLineage as Ko, OpenSandboxRunBeforeStartContext as Kr, defaultAuditorInstruction as Ks, AllWorkersStalledOptions as Kt, FeedbackRefersTo as Ku, localShell as L, runAgentRounds as La, CliWorktreeBridgeSeam as Lc, AgentEvalErrorCode as Ld, verify as Li, CoderDelegate as Ll, CheckRunContext as Ln, SteerContext as Lo, LocalMcpMaterialization as Lr, pairwiseSignificance as Ls, SupervisorProfile as Lt, DelegationHistoryEntry as Lu, Workspace as M, loopCampaignDispatch as Ma, DelegateResult as Mc, DelegationStore as Md, flatWidenGate as Mi, McpTransport as Ml, defaultProfileRichnessThresholds as Mn, RenderCorpusToInstructions as Mo, DumbDriverOptions as Mr, PairwiseOptions as Ms, delegate as Mt, DelegateUiAuditResult as Mu, WorkspaceCommit as N, loopDispatch as Na, createDelegateHandler as Nc, FileDelegationStore as Nd, loopUntil as Ni, FeedbackEvent as Nl, profileRichnessFinding as Nn, RenderCorpusToInstructionsOptions as No, NaiveDriverOptions as Nr, PairwiseVerdict as Ns, CoordinationBinding as Nt, DelegateUiAuditRoute as Nu, copyUntrackedIntoClone as O, sampleThenRefine as Oa, DELEGATE_INPUT_SCHEMA as Oc, composeLoopTraceEmitters as Od, FileCorpus as Oi, removeWorktree as Ol, ProfileRichnessThresholds as On, PanelSpec as Oo, assertStrategyContract as Or, Interval as Os, queueOf as Ot, DelegateResearchConfig as Ou, WorkspaceRun as P, RunAgentRoundsOptions as Pa, validateDelegateArgs as Pc, FileDelegationStoreOptions as Pd, panel as Pi, FeedbackStore as Pl, supervisorInstructions as Pn, ScopeAnalyst as Po, SteeringDecision as Pr, ProfileKeyOf as Ps, DriveHarness as Pt, DelegationError as Pu, readWorkerSteerRequests as Q, inProcessSandboxClient as Qa, Inbox as Qc, WatchTraceOptions as Qd, BenchmarkReport as Qi, createFleetWorkspaceExecutor as Ql, filterAuthoredAsserts as Qn, Outcome as Qo, openSandboxRun as Qr, bestSoFar as Qs, ProgressView as Qt, createPropagatingTraceEmitter as Qu, runInWorkspace as R, runLoop as Ra, CliWorktreeSeam as Rc, BackendTransportError as Rd, widen as Ri, CoderReview as Rl, CheckRunner as Rn, TrajectoryNode as Ro, MaterializeLocalMcpOptions as Rr, renderLeaderboardHtml as Rs, assertCoordinationBinding as Rt, DelegationHistoryResult as Ru, WorkerEvidenceInput as S, breadthStrategy as Sa, createCoordinationTools as Sc, DELEGATION_TRACE_MAX_SPANS as Sd, trajectoryReport as Si, DiffResult as Sl, ReservationRejection as Sn, FlatWidenGate as So, discriminatingMeans as Sr, completionAuthorizes as Ss, DispatchReport as St, DelegateCodeArgs as Su, settledWorkerOut as T, refine as Ta, createInProcessTransport as Tc, DelegationTraceSpan as Td, registerShape as Ti, WorktreeHandle as Tl, spendFromUsageEvents as Tn, LoopUntilState as To, selectChampion as Tr, stopSentinel as Ts, RollingDispatchOptions as Tt, DelegateFeedbackArgs as Tu, SuperviseRegistry as U, envKeyProvider as Ua, SandboxSeam as Uc, RuntimeRunStateError as Ud, createScopeAnalyst as Ui, SettleDetachedCoderTurnOptions as Ul, StructuralRolloutMessage as Un, VerifySpec as Uo, connectStdioMcp as Ur, AuditIntentOptions as Us, DriverAgentOptions as Ut, DelegationStatusArgs as Uu, createSupervisor as V, KeyProvider as Va, RouterSeam as Vc, NotFoundError as Vd, assertTraceDerivedFindings as Vi, DetachedSessionDelegateOptions as Vl, RepairStop as Vn, TrajectoryReportOptions as Vo, StdioMcpConnection as Vr, renderPairwiseMarkdown as Vs, CoordinationMcpHandle as Vt, DelegationResultPayload as Vu, SuperviseRegistryTable as W, mcpSecretEnvMetadataKey as Wa, cliWorktreeExecutor as Wc, ValidationError as Wd, registryScopeAnalyst as Wi, UiAuditorDelegate as Wl, StructuralRolloutPolicy as Wn, Widen as Wo, materializeLocalMcp as Wr, IntentAudit as Ws, driverAgent as Wt, DelegationStatusResult as Wu, WorkerSteerRequest as X, InProcessPromptCtx as Xa, SteerableSandboxSession as Xc, PublishOptions as Xd, BenchmarkConfig as Xi, FleetWorkspaceExecutorOptions as Xl, defaultExtractCandidate as Xn, DefinePersonaInput as Xo, SandboxRunAbortError as Xr, anytimeReport as Xs, ProgressTracker as Xt, UiAuditorDelegationOutput as Xu, settledToIteration as Y, InProcessOnPrompt as Ya, SteerableSandboxArgs as Yc, EventBus as Yd, BenchmarkCell as Yi, FleetHandle as Yl, composeCheckSources as Yn, DefinePersona as Yo, SandboxRun as Yr, AnytimeTaskCurve as Ys, ProgressSample as Yt, UiAuditLensFilter as Yu, legacySupervisorRunDir as Z, InProcessSandboxClientOptions as Za, createSteerableSandboxSession as Zc, createEventBus as Zd, BenchmarkLift as Zi, SiblingSandboxExecutorOptions as Zl, defaultStructuralRolloutPolicy as Zn, LoopShape as Zo, TurnResult as Zr, areaUnderCurve as Zs, ProgressTrackerOptions as Zt, TraceContext as Zu, WorktreeFanoutOptions as _, StrategyMessage as _a, QuestionPolicy as _c, generateSpanId as _d, resolveSandboxClient as _i, WorktreeCommandResult as _l, CoordinationLog as _n, EqualKVerdict as _o, EvolutionCandidate as _r, defineLeaderboard as _s, SupervisorSpanOutcome as _t, DelegationTaskQueue as _u, SandboxInstance$1 as a, AgenticRunResult as aa, AnalystFindingEvent as ac, INTELLIGENCE_WIRE_VERSION as ad, InMemoryResultBlobStore as af, SandboxToolPartState as ai, piSeamKey as al, noProgressFor as an, ObserveOptions as ao, visibleCheckScore as ar, ShapeContext as as, InMemoryRunContext as at, RunDetachedTurnOptions as au, NOTE_MAX_CHARS as b, SurfaceScore as ba, SettledWorker as bc, CappedDelegationTrace as bd, promotionGate as bi, CreateWorktreeOptions as bl, BudgetPool as bn, FanoutSynthesis as bo, ReproductionCheck as br, CompletionPolicy as bs, assertModelAllowed as bt, SubmitOutput as bu, VerifierEnvironmentOptions as c, AgenticTool as ca, CoordinationTools as cc, OtelExportConfig as cd, materializeTreeView as cf, mapSandboxEvent as ci, PI_MCP_CONFIG_FLAG as cl, DeliveredOutput as cn, renderReport as co, CollectedAgentTurn as cr, LeaderboardBenchScore as cs, createFileRunContext as ct, formatDetachedSessionRef as cu, SuperviseSurfaceResult as d, RunAgenticOptions as da, DownMessageEvent as dc, RuntimeEventOtelOptions as dd, CriuCapableClient as di, PiMcpPreparation as dl, SupervisorFinalizer as dn, Corpus as do, streamAgentTurn as dr, LeaderboardFlagSpec as ds, patchDelivered as dt, DelegationArgs as du, BenchmarkTaskRow as ea, renderAnytimeTable as ec, traceContextToEnv as ed, watchTrace as ef, ForkCapableBox as ei, createInbox as el, StopRule as en, HarvestFailure as eo, officialChecksFromMeta as er, PersonaContext as es, supervisorRunDir as et, DetachedSessionRefParts as eu, SurfaceWorkerConfig as f, ShotPersona as fa, MakeWorkerAgent as fc, buildLoopOtelSpans as fd, SandboxCapabilities as fi, PiMcpReceipt as fl, bestDelivered as fn, CorpusFilter as fo, ChampionPick as fr, LeaderboardIterationInfo as fs, WorktreeCliExecutorOptions as ft, DelegationRecord as fu, AuthoredHarness as g, StrategyCtx as ga, QuestionOption as gc, exportEvalRuns as gd, ResolveSandboxClientOptions as gi, WorktreeCheckRunner as gl, runTree as gn, EqualKOnCostOptions as go, EvolutionBandInfo as gr, LeaderboardSpec as gs, SupervisorSpanOptions as gt, DelegationRunContext as gu, superviseSurface as h, StrategyArtifacts as ha, QuestionLevel as hc, createOtelExporter as hd, acquireSandbox as hi, preparePiMcp as hl, runFinalizer as hn, EqualKOnCost as ho, EvolutionAuthor as hr, LeaderboardScore as hs, SupervisorSpanAttributes as ht, DelegationResumeTick as hu, SandboxEvent$1 as i, AgenticOptions as ia, createWaterfallCollector as ic, EvalRunsExportResult as id, FileSpawnJournal as if, createSandboxLineage as ii, piExecutor as il, createProgressTracker as in, ObserveInput as io, structuralRollout as ir, ShapeBudget as is, writeWorkerSteer as it, DriveTurnTick as iu, Shell as j, LoopOptionsForDispatch as ja, DelegateHandlerOptions as jc, DelegationStateCorruptError as jd, fanout as ji, McpToolDescriptor$1 as jl, authoredWorker as jn, PipelineStage as jo, ApplyContinuation as jr, LeaderboardRow as js, defaultDelegateBudget as jt, DelegateUiAuditConfig as ju, withUntrackedArtifacts as k, LoopCampaignDispatchOptions as ka, DELEGATE_TOOL_NAME as kc, createDelegationTraceCollector as kd, InMemoryCorpus as ki, JsonRpcMessage as kl, asAuthoredProfile as kn, PanelVerdict as ko, authorStrategy as kr, Leaderboard as ks, rollingDispatch as kt, DelegateResearchResult as ku, createVerifierEnvironment as l, ArtifactHandle as la, CoordinationToolsOptions as lc, OtelExporter as ld, pendingWaits as lf, mapSandboxToolEvent as li, PiMcpMount as ll, FinalizeContext as ln, AssertTraceDerivedFindings as lo, StreamAgentTurnOptions as lr, LeaderboardBenchTask as ls, createInMemoryRunContext as lt, parseDetachedSessionRef as lu, failuresAnalyst as m, Strategy as ma, QuestionDecision as mc, buildRuntimeEventOtelSpans as md, AcquireOptions as mi, piMcpAdapterAvailable as ml, pickBestDelivered as mn, EqualKArm as mo, EvolutionArchiveNode as mr, LeaderboardScenario as ms, createWorktreeCliExecutor as mt, DelegationResumeDriver as mu, AnalystFinding$1 as n, printBenchmarkReport as na, WaterfallReport as nc, EvalRunGeneration as nd, gateOnDeliverable as nf, SandboxLineageHandle as ni, PiExecutorOutput as nl, allWorkersStalled as nn, harvestCorpus as no, sandboxCheckRunner as nr, RunPersonified as ns, workerInboxFile as nt, DetachedTurnResumeDriverOptions as nu, computeFindingId$1 as o, AgenticSurface as oa, AnalystRegistry as oc, LoopSpanNode as od, InMemorySpawnJournal as of, createSandboxToolPartState as oi, PI_MCP_ADAPTER as ol, plateau as on, defaultAnalystInstruction as oo, AgentTurnBackend as or, ShapeRegistry as os, InMemoryRunContextOptions as ot, createDetachedTurnResumeDriver as ou, SurfaceWorkerOut as p, ShotSpec as pa, Question as pc, buildLoopSpanNodes as pd, probeSandboxCapabilities as pi, buildPiMcpServers as pl, collectDelivered as pn, CorpusRecord as po, ChampionPolicy as pr, LeaderboardRunContext as ps, WorktreePatchArtifact as pt, DelegationResumeContext as pu, ScopeArgs as q, secretEnvOfMcpServer as qa, DEFAULT_SANDBOX_STEERING_MAX_TURNS as qc, BusRecord as qd, createMcpEnvironment as qi, settleDetachedCoderTurn as ql, canDisplace as qn, WidenSpec as qo, OpenSandboxRunOptions as qr, AnytimeReport as qs, NoProgressForOptions as qt, ResearchOutputShape as qu, CreateSandboxOptions$1 as r, runBenchmark as ra, WaterfallSpan as rc, EvalRunsExportConfig as rd, FileResultBlobStore as rf, SessionCapableBox as ri, PiSeam as rl, anyOf as rn, Observation as ro, selectBestIndex as rr, RunPersonifiedOptions as rs, workerInboxFileFromEventDir as rt, DriveTurnCapableBox as ru, makeFinding$1 as s, AgenticTask as sa, CoordinationEvent as sc, OtelAttribute as sd, contentAddress as sf, extractLlmCallEvent as si, PI_MCP_ADAPTER_ENV as sl, sampleFromSettled as sn, observe as so, AgentTurnUsage as sr, DefinedLeaderboard as ss, RunContext as st, detachedTurnEvents as su, AgentProfile$2 as t, Environment as ta, WaterfallCollector as tc, EvalRunEvent as td, DeliverableSpec as tf, SandboxLineage as ti, PI_RUNTIME as tl, allOf as tn, HarvestReport as to, resolveEntrySymbol as tr, PersonaExecutors as ts, supervisorRunsRoot as tt, DetachedTurn as tu, SuperviseSurfaceOptions as u, CorpusReadbackOptions as ua, DEFAULT_AWAIT_EVENT_TIMEOUT_MS as uc, OtelSpan as ud, replaySpawnTree as uf, sumSandboxUsage as ui, PiMcpMountOptions as ul, FinalizerSettled as un, CombinatorShape as uo, collectAgentTurn as ur, LeaderboardBenchmarkAdapter as us, PatchDeliverableOptions as ut, runDetachedTurn as uu, worktreeFanout as v, StrategyResult as va, QuestionRecord as vc, loopEventToOtelSpan as vd, PromotionGateOptions as vi, WorktreeHarnessResult as vl, FileCoordinationLog as vn, Fanout as vo, EvolutionGeneration as vr, CompletionAnalyst as vs, SupervisorSpanRecorder as vt, DelegationTaskQueueOptions as vu, composeWorkerEvidence as w, depthStrategy as wa, McpServerOptions as wc, DelegationTraceCollector as wd, createShapeRegistry as wi, RemoveWorktreeOptions as wl, createBudgetPool as wn, LoopUntilSpec as wo, runStrategyEvolution as wr, sentinelCompletion as ws, DispatchUnit as wt, DelegateCodeResult as wu, VERIFY_TAIL_CHARS as x, adaptiveRefine as xa, WorkerWatchOptions as xc, DELEGATION_TRACE_MAX_BYTES as xd, equalKOnCost as xi, DiffOptions as xl, BudgetReadout as xn, FanoutWinnerSelector as xo, StrategyEvolutionConfig as xr, CompletionVerdict as xs, ConcurrencyCaps as xt, hashIdempotencyInput as xu, EVIDENCE_MAX_CHARS as y, StrategyShotResult as ya, QuestionUrgency as yc, toOtelAttributes as yd, PromotionVerdict as yi, WorktreeProfileMaterializationReceipt as yl, PriorCoordination as yn, FanoutOptions as yo, EvolutionReport as yr, CompletionEvidence as ys, createSupervisorSpanRecorder as yt, SubmitInput as yu, TrajectoryAnalysis as z, LocalSandboxClientOptions as za, ExecutorConfig as zc, ConfigError as zd, CreateScopeAnalystOptions as zi, CoderReviewer as zl, CheckSource as zn, TrajectoryReport as zo, McpSpawnFault as zr, renderLeaderboardMarkdown as zs, resolveSupervisorProfile as zt, DelegationProfile as zu };
|
|
7955
|
-
//# sourceMappingURL=index-
|
|
8341
|
+
export { SuperviseRegistry as $, LoopDispatchOptions as $a, McpServer as $c, CoderOutput as $d, renderCorpusToInstructions as $i, DiffResult as $l, authoredWorker as $n, Pipeline as $o, strategyAuthorContract as $r, LeaderboardOptions as $s, effectiveConcurrency as $t, DelegateCodeArgs as $u, GitWorkspaceOptions as A, AgenticTask as Aa, AuthorizeDownMessage as Ac, DELEGATION_TRACE_MAX_SPANS as Ad, DefineProfileMaterializationContractOptions as Af, extractLlmCallEvent as Ai, InboxMessage as Al, SupervisorFinalizer as An, observe as Ao, AgentTurnUsage as Ar, DefinedLeaderboard as As, writeWorkerSteer as At, createSiblingSandboxExecutor as Au, analyzeTrace as B, StrategyMessage as Ba, DownMessageEvent as Bc, DelegationStore as Bd, promptControlProfileMaterialization as Bf, resolveSandboxClient as Bi, PiMcpMount as Bl, PriorCoordination as Bn, EqualKVerdict as Bo, EvolutionCandidate as Br, defineLeaderboard as Bs, createWorktreeCliExecutor as Bt, parseDetachedSessionRef as Bu, closingWorkerNote as C, BenchmarkTaskRow as Ca, renderAnytimeTable as Cc, FeedbackRefersTo as Cd, pendingWaits as Cf, ForkCapableBox as Ci, createExecutorRegistry as Cl, createProgressTracker as Cn, HarvestFailure as Co, officialChecksFromMeta as Cr, PersonaContext as Cs, legacySupervisorRunDir as Ct, detachedSessionDelegate as Cu, UntrackedCopyStats as D, AgenticOptions as Da, createWaterfallCollector as Dc, UiAuditorDelegationOutput as Dd, AgentProfileMaterializationAxis as Df, createSandboxLineage as Di, SteerableSandboxSession as Dl, DeliveredOutput as Dn, ObserveInput as Do, structuralRollout as Dr, ShapeBudget as Ds, supervisorRunsRoot as Dt, FleetWorkspaceExecutorOptions as Du, CopyOptions as E, runBenchmark as Ea, WaterfallSpan as Ec, UiAuditLensFilter as Ed, AGENT_PROFILE_MATERIALIZATION_AXES as Ef, SessionCapableBox as Ei, SteerableSandboxArgs as El, sampleFromSettled as En, Observation as Eo, selectBestIndex as Er, RunPersonifiedOptions as Es, supervisorRunDir as Et, FleetHandle as Eu, gitWorkspace as F, ShotPersona as Fa, CoordinationToolsOptions as Fc, capDelegationTrace as Fd, assertProfileMaterialization as Ff, SandboxCapabilities as Fi, piExecutor as Fl, runTree as Fn, CorpusFilter as Fo, ChampionPick as Fr, LeaderboardIterationInfo as Fs, createInMemoryRunContext as Ft, DriveTurnTick as Fu, workerTraceAnalysisStore as G, breadthStrategy as Ga, QuestionOption as Gc, AgentEvalErrorCode as Gd, sandboxActProfileMaterialization as Gf, trajectoryReport as Gi, piMcpAdapterAvailable as Gl, ReservationTicket as Gn, FlatWidenGate as Go, discriminatingMeans as Gr, completionAuthorizes as Gs, createSupervisorSpanRecorder as Gt, DelegationResumeDriver as Gu, WorkerToolTraceArtifact as H, StrategyShotResult as Ha, Question as Hc, FileDelegationStoreOptions as Hd, promptOnlyProfileMaterialization as Hf, PromotionVerdict as Hi, PiMcpPreparation as Hl, BudgetPoolRestore as Hn, FanoutOptions as Ho, EvolutionReport as Hr, CompletionEvidence as Hs, SupervisorSpanOptions as Ht, DelegationArgs as Hu, jjWorkspace as I, ShotSpec as Ia, DEFAULT_AWAIT_EVENT_TIMEOUT_MS as Ic, composeLoopTraceEmitters as Id, controlProfileMaterialization as If, probeSandboxCapabilities as Ii, piSeamKey as Il, CoordinationDeliveryEvidence as In, CorpusRecord as Io, ChampionPolicy as Ir, LeaderboardRunContext as Is, PatchDeliverableOptions as It, RunDetachedTurnOptions as Iu, AuthorizedSpawn as J, refine as Ja, QuestionUrgency as Jc, JudgeError as Jd, registerShape as Ji, WorktreeCommandResult as Jl, AuthoredProfile as Jn, LoopUntilState as Jo, selectChampion as Jr, stopSentinel as Js, ConcurrencyCaps as Jt, DelegationTaskQueue as Ju, createRootHandle as K, defineStrategy as Ka, QuestionPolicy as Kc, BackendTransportError as Kd, validateProfileMaterialization as Kf, builtinShapes as Ki, preparePiMcp as Kl, createBudgetPool as Kn, LoopUntil as Ko, pickChampion as Kr, deterministicCompletion as Ks, assertModelAllowed as Kt, DelegationResumeTick as Ku, localShell as L, Strategy as La, DownMessageAuthorizationInput as Lc, createDelegationTraceCollector as Ld, defineProfileMaterializationContract as Lf, AcquireOptions as Li, PI_MCP_ADAPTER as Ll, CoordinationLog as Ln, EqualKArm as Lo, EvolutionArchiveNode as Lr, LeaderboardScenario as Ls, patchDelivered as Lt, createDetachedTurnResumeDriver as Lu, Workspace as M, ArtifactHandle as Ma, ContinuationInstruction as Mc, DelegationTraceCollector as Md, ProfileMaterializationContract as Mf, mapSandboxToolEvent as Mi, PI_RUNTIME as Ml, collectDelivered as Mn, AssertTraceDerivedFindings as Mo, StreamAgentTurnOptions as Mr, LeaderboardBenchTask as Ms, InMemoryRunContextOptions as Mt, DetachedTurn as Mu, WorkspaceCommit as N, CorpusReadbackOptions as Na, CoordinationEvent as Nc, DelegationTraceSpan as Nd, ProfileMaterializationIssue as Nf, sumSandboxUsage as Ni, PiExecutorOutput as Nl, pickBestDelivered as Nn, CombinatorShape as No, collectAgentTurn as Nr, LeaderboardBenchmarkAdapter as Ns, RunContext as Nt, DetachedTurnResumeDriverOptions as Nu, copyUntrackedIntoClone as O, AgenticRunResult as Oa, AnalystFindingEvent as Oc, CappedDelegationTrace as Od, AssertProfileMaterializationOptions as Of, SandboxToolPartState as Oi, createSteerableSandboxSession as Ol, FinalizeContext as On, ObserveOptions as Oo, visibleCheckScore as Or, ShapeContext as Os, workerInboxFile as Ot, SiblingSandboxExecutorOptions as Ou, WorkspaceRun as P, RunAgenticOptions as Pa, CoordinationTools as Pc, buildDelegationTraceSpans as Pd, ValidateProfileMaterializationOptions as Pf, CriuCapableClient as Pi, PiSeam as Pl, runFinalizer as Pn, Corpus as Po, streamAgentTurn as Pr, LeaderboardFlagSpec as Ps, createFileRunContext as Pt, DriveTurnCapableBox as Pu, SuperviseOptions as Q, LoopCampaignDispatchOptions as Qa, createCoordinationTools as Qc, ValidationError as Qd, InMemoryCorpus as Qi, DiffOptions as Ql, assessAuthoredProfile as Qn, PanelVerdict as Qo, authorStrategy as Qr, Leaderboard as Qs, RollingDispatchOptions as Qt, hashIdempotencyInput as Qu, runInWorkspace as R, StrategyArtifacts as Ra, DownMessageDeliveryAttempt as Rc, DelegationPersistenceError as Rd, fullProfileMaterialization as Rf, acquireSandbox as Ri, PI_MCP_ADAPTER_ENV as Rl, CoordinationOwnerId as Rn, EqualKOnCost as Ro, EvolutionAuthor as Rr, LeaderboardScore as Rs, WorktreeCliExecutorOptions as Rt, detachedTurnEvents as Ru, WorkerEvidenceInput as S, BenchmarkStrategySummary as Sa, plateauLength as Sc, FeedbackRating as Sd, materializeTreeView as Sf, CheckpointCapableBox as Si, createExecutor as Sl, anyOf as Sn, HarvestCorpusOptions as So, modelAuthoredChecks as Sr, Persona as Ss, WorkerSteerRequest as St, coderTaskFromArgs as Su, settledWorkerOut as T, printBenchmarkReport as Ta, WaterfallReport as Tc, ResearchSource as Td, contentAddress as Tf, SandboxLineageHandle as Ti, SandboxSteeringOptions as Tl, plateau as Tn, harvestCorpus as To, sandboxCheckRunner as Tr, RunPersonified as Ts, safeWorkerFile as Tt, DelegationExecutor as Tu, captureWorkerTraceEvidence as U, SurfaceScore as Ua, QuestionDecision as Uc, InMemoryDelegationStore as Ud, promptResourceProfileMaterialization as Uf, promotionGate as Ui, PiMcpReceipt as Ul, BudgetReadout as Un, FanoutSynthesis as Uo, ReproductionCheck as Ur, CompletionPolicy as Us, SupervisorSpanOutcome as Ut, DelegationRecord as Uu, WORKER_TOOL_TRACE_SCHEMA_VERSION as V, StrategyResult as Va, MakeWorkerAgent as Vc, FileDelegationStore as Vd, promptModelProfileMaterialization as Vf, PromotionGateOptions as Vi, PiMcpMountOptions as Vl, BudgetPool as Vn, Fanout as Vo, EvolutionGeneration as Vr, CompletionAnalyst as Vs, SupervisorSpanAttributes as Vt, runDetachedTurn as Vu, parseWorkerToolTraceArtifact as W, adaptiveRefine as Wa, QuestionLevel as Wc, AgentEvalError$1 as Wd, renderProfileMaterializationIssues as Wf, equalKOnCost as Wi, buildPiMcpServers as Wl, ReservationRejection as Wn, FanoutWinnerSelector as Wo, StrategyEvolutionConfig as Wr, CompletionVerdict as Ws, SupervisorSpanRecorder as Wt, DelegationResumeContext as Wu, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as X, sample as Xa, WorkerSpawnContext as Xc, PlannerError as Xd, runPersonified as Xi, WorktreeProfileMaterializationReceipt as Xl, ProfileRichnessThresholds as Xn, PanelJudge as Xo, AuthoredStrategy as Xr, GroupOf as Xs, DispatchStopReason as Xt, SubmitInput as Xu, AuthorizedSpawnContext as Y, runAgentic as Ya, SettledWorker as Yc, NotFoundError as Yd, definePersona as Yi, WorktreeHarnessResult as Yl, ProfileRichness as Yn, Panel as Yo, AuthorStrategyOptions as Yr, AxisScoresOf as Ys, DispatchReport as Yt, DelegationTaskQueueOptions as Yu, DeliverableResolutionInput as Z, sampleThenRefine as Za, WorkerWatchOptions as Zc, RuntimeRunStateError as Zd, FileCorpus as Zi, CreateWorktreeOptions as Zl, asAuthoredProfile as Zn, PanelSpec as Zo, assertStrategyContract as Zr, Interval as Zs, DispatchUnit as Zt, SubmitOutput as Zu, WorktreeFanoutOptions as _, sanitizeMcpToolSchema as _a, AnytimeStrategySummary as _c, DelegationProgress as _d, SpawnForestInDoubtNode as _f, OpenSandboxRunPromptOptions as _i, ProviderSeam as _l, ProgressView as _n, inlineSandboxClient as _o, compareCheckOutcomes as _r, WinnerStrategy as _s, resolveSupervisorProfile as _t, DelegateRunCtx as _u, SandboxInstance$1 as a, selectValidWinner as aa, leaderboard as ac, DelegateResearchConfig as ad, createEventBus as af, naiveDriver as ai, DELEGATE_TOOL_NAME as al, delegate as an, defaultSelectWinner as ao, CheckOutcome as ar, ScopeWidenGate as as, DriveHarnessOwnerContext as at, removeWorktree as au, NOTE_MAX_CHARS as b, BenchmarkLift as ba, areaUnderCurve as bc, DelegationStatusArgs as bd, SpawnForestTree as bf, TurnResult as bi, SandboxSeam as bl, allOf as bn, InProcessSandboxClientOptions as bo, defaultStructuralRolloutPolicy as br, LoopShape as bs, createScope as bt, SettleDetachedCoderTurnOptions as bu, VerifierEnvironmentOptions as c, CreateScopeAnalystOptions as ca, renderLeaderboardMarkdown as cc, DelegateUiAuditConfig as cd, watchTrace as cf, McpSpawnFault as ci, DelegateHandlerOptions as cl, DriverAgentOptions as cn, LocalSandboxClientOptions as co, CheckSource as cr, TrajectoryReport as cs, ResolveSupervisorTools as ct, McpToolDescriptor$1 as cu, SuperviseSurfaceResult as d, buildSteerContext as da, AuditIntentInput as dc, DelegationError as dd, FileResultBlobStore as df, StdioMcpServerSpec as di, validateDelegateArgs as dl, AllWorkersStalledOptions as dn, ResolvedMcpServerLaunch as do, StructuralRolloutConfig as dr, Verify as ds, SupervisorNodeContext as dt, FeedbackStore as du, fanout as ea, LeaderboardRow as ec, DelegateCodeConfig as ed, BusEvent as ef, ApplyContinuation as ei, McpServerOptions as el, freeSlots as en, LoopOptionsForDispatch as eo, canonicalizeAuthoredProfile as er, PipelineStage as es, SuperviseRegistryTable as et, GitRunner as eu, SurfaceWorkerConfig as f, createScopeAnalyst as fa, AuditIntentOptions as fc, DelegationFeedbackSnapshot as fd, FileSpawnJournal as ff, connectStdioMcp as fi, BridgeSeam as fl, NoProgressForOptions as fn, envKeyProvider as fo, StructuralRolloutMessage as fr, VerifySpec as fs, SupervisorNodeContextSeed as ft, InMemoryFeedbackStore as fu, AuthoredHarness as g, createMcpEnvironment as ga, AnytimeReport as gc, DelegationProfile as gd, SpawnForestEvent as gf, OpenSandboxRunOptions as gi, ExecutorConfig as gl, ProgressTrackerOptions as gn, secretEnvOfMcpServer as go, canDisplace as gr, WidenSpec as gs, assertCoordinationBinding as gt, CoderReviewer as gu, superviseSurface as h, McpEnvironmentOptions as ha, defaultAuditorInstruction as hc, DelegationHistoryResult as hd, SpawnForest as hf, OpenSandboxRunBeforeStartContext as hi, CliWorktreeSeam as hl, ProgressTracker as hn, resolveSecretEnv as ho, VisibleCheck as hr, WidenLineage as hs, SupervisorToolInvocationContext as ht, CoderReview as hu, SandboxEvent$1 as i, pipeline as ia, ScoreOf as ic, DelegateResearchArgs as id, PublishOptions as if, dumbDriver as ii, DELEGATE_INPUT_SCHEMA as il, defaultDelegateBudget as in, RunLoopOptions as io, CheckExecChannel as ir, ScopeAnalyzeInput as is, DriveHarness as it, createWorktree as iu, Shell as j, AgenticTool as ja, AuthorizedDownMessage as jc, DelegationTraceCaps as jd, KnownAgentProfileMaterializationAxis as jf, mapSandboxEvent as ji, createInbox as jl, bestDelivered as jn, renderReport as jo, CollectedAgentTurn as jr, LeaderboardBenchScore as js, InMemoryRunContext as jt, DetachedSessionRefParts as ju, withUntrackedArtifacts as k, AgenticSurface as ka, AnalystRegistry as kc, DELEGATION_TRACE_MAX_BYTES as kd, CanonicalAgentProfileMaterializationAxis as kf, createSandboxToolPartState as ki, Inbox as kl, FinalizerSettled as kn, defaultAnalystInstruction as ko, AgentTurnBackend as kr, ShapeRegistry as ks, workerInboxFileFromEventDir as kt, createFleetWorkspaceExecutor as ku, createVerifierEnvironment as l, RegistryAnalyzeProjection as la, renderLeaderboardSvg as lc, DelegateUiAuditResult as ld, DeliverableSpec as lf, McpToolDescriptor as li, DelegateResult as ll, driverAgent as ln, localSandboxClient as lo, CheckSourceCtx as lr, TrajectoryReportFn as ls, ResolvedSupervisorProfile as lt, McpTransport as lu, failuresAnalyst as m, McpEndpoint as ma, auditIntent as mc, DelegationHistoryEntry as md, InMemorySpawnJournal as mf, Deliverable as mi, CliWorktreeBridgeSeam as ml, ProgressSample as mn, resolveMcpServerLaunch as mo, StructuralRolloutResult as mr, WidenDecision as ms, SupervisorToolDescriptor as mt, CoderDelegate as mu, AnalystFinding$1 as n, loopUntil as na, PairwiseVerdict as nc, DelegateFeedbackArgs as nd, BusStats as nf, NaiveDriverOptions as ni, createMcpServer as nl, rollingDispatch as nn, loopDispatch as no, profileRichnessFinding as nr, RenderCorpusToInstructionsOptions as ns, workerFromBackend as nt, WorktreeHandle as nu, computeFindingId$1 as o, verify as oa, pairwiseSignificance as oc, DelegateResearchResult as od, WatchTraceOptions as of, LocalMcpMaterialization as oi, DelegateArgs as ol, CoordinationMcpHandle as on, runAgentRounds as oo, CheckRunContext as or, SteerContext as os, ObserveSupervisorNodeEvent as ot, JsonRpcMessage as ou, SurfaceWorkerOut as p, registryScopeAnalyst as pa, IntentAudit as pc, DelegationHistoryArgs as pd, InMemoryResultBlobStore as pf, materializeLocalMcp as pi, CliSeam as pl, PlateauOptions as pn, mcpSecretEnvMetadataKey as po, StructuralRolloutPolicy as pr, Widen as ps, SupervisorProfile as pt, eventToSnapshot as pu, createSupervisor as q, depthStrategy as qa, QuestionRecord as qc, ConfigError as qd, worktreeCliProfileMaterialization as qf, createShapeRegistry as qi, WorktreeCheckRunner as ql, spendFromUsageEvents as qn, LoopUntilSpec as qo, runStrategyEvolution as qr, sentinelCompletion as qs, assertProfileModelsAllowed as qt, DelegationRunContext as qu, CreateSandboxOptions$1 as r, panel as ra, ProfileKeyOf as rc, DelegateFeedbackResult as rd, EventBus as rf, SteeringDecision as ri, DELEGATE_DESCRIPTION as rl, DelegateOptions as rn, RunAgentRoundsOptions as ro, supervisorInstructions as rr, ScopeAnalyst as rs, CoordinationBinding as rt, captureWorktreeDiff as ru, makeFinding$1 as s, widen as sa, renderLeaderboardHtml as sc, DelegateUiAuditArgs as sd, defaultToolDetectors as sf, MaterializeLocalMcpOptions as si, DelegateError as sl, serveCoordinationMcp as sn, runLoop as so, CheckRunner as sr, TrajectoryNode as ss, ResolveDriveHarness as st, JsonRpcResponse as su, AgentProfile$2 as t, flatWidenGate as ta, PairwiseOptions as tc, DelegateCodeResult as td, BusRecord as tf, DumbDriverOptions as ti, createInProcessTransport as tl, queueOf as tn, loopCampaignDispatch as to, defaultProfileRichnessThresholds as tr, RenderCorpusToInstructions as ts, supervise as tt, RemoveWorktreeOptions as tu, SuperviseSurfaceOptions as u, assertTraceDerivedFindings as ua, renderPairwiseMarkdown as uc, DelegateUiAuditRoute as ud, gateOnDeliverable as uf, StdioMcpConnection as ui, createDelegateHandler as ul, finalizeBestDelivered as un, KeyProvider as uo, RepairStop as ur, TrajectoryReportOptions as us, SupervisorAgentDeps as ut, FeedbackEvent as uu, worktreeFanout as v, BenchmarkCell as va, AnytimeTaskCurve as vc, DelegationResultPayload as vd, SpawnForestMissingTree as vf, SandboxRun as vi, RouterSeam as vl, StopDecision as vn, InProcessOnPrompt as vo, composeCheckSources as vr, DefinePersona as vs, supervisorAgent as vt, DetachedSessionDelegateOptions as vu, composeWorkerEvidence as w, Environment as wa, WaterfallCollector as wc, ResearchOutputShape as wd, replaySpawnTree as wf, SandboxLineage as wi, DEFAULT_SANDBOX_STEERING_MAX_TURNS as wl, noProgressFor as wn, HarvestReport as wo, resolveEntrySymbol as wr, PersonaExecutors as ws, readWorkerSteerRequests as wt, settleDetachedCoderTurn as wu, VERIFY_TAIL_CHARS as x, BenchmarkReport as xa, bestSoFar as xc, DelegationStatusResult as xd, loadSpawnForest as xf, openSandboxRun as xi, cliWorktreeExecutor as xl, allWorkersStalled as xn, inProcessSandboxClient as xo, filterAuthoredAsserts as xr, Outcome as xs, settledToIteration as xt, UiAuditorDelegate as xu, EVIDENCE_MAX_CHARS as y, BenchmarkConfig as ya, anytimeReport as yc, DelegationStatus as yd, SpawnForestNode as yf, SandboxRunAbortError as yi, RouterToolsSeam as yl, StopRule as yn, InProcessPromptCtx as yo, defaultExtractCandidate as yr, DefinePersonaInput as ys, ScopeArgs as yt, DetachedWinnerSelection as yu, TrajectoryAnalysis as z, StrategyCtx as za, DownMessageDeliveryOutcome as zc, DelegationStateCorruptError as zd, profileMaterializationAxes as zf, ResolveSandboxClientOptions as zi, PI_MCP_CONFIG_FLAG as zl, FileCoordinationLog as zn, EqualKOnCostOptions as zo, EvolutionBandInfo as zr, LeaderboardSpec as zs, WorktreePatchArtifact as zt, formatDetachedSessionRef as zu };
|
|
8342
|
+
//# sourceMappingURL=index-DPWJxSRa.d.ts.map
|