@tangle-network/agent-runtime 0.337.2 → 0.338.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{activation-DRHM55Oo.d.ts → activation-CsbNax2X.d.ts} +92 -4
- package/dist/activation-kbkAuSmY.js +889 -0
- package/dist/activation-kbkAuSmY.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +3 -6
- package/dist/agent.js.map +1 -1
- package/dist/{bundle-BPGjESee.js → bundle-DM60AI2B.js} +2 -2
- package/dist/{bundle-BPGjESee.js.map → bundle-DM60AI2B.js.map} +1 -1
- package/dist/candidate-execution/index.d.ts +2 -2
- package/dist/candidate-execution/index.js +4 -5
- package/dist/candidate-execution/index.js.map +1 -1
- package/dist/content-digest-sBTLujlK.js +9 -0
- package/dist/content-digest-sBTLujlK.js.map +1 -0
- package/dist/{delegate-B-T_ZB50.js → delegate-Se1YZKMb.js} +2 -2
- package/dist/{delegate-B-T_ZB50.js.map → delegate-Se1YZKMb.js.map} +1 -1
- package/dist/{coordination-driver-BHkFVqIq.js → driver-control-acknowledgers-T2a1Ouay.js} +4514 -4440
- package/dist/driver-control-acknowledgers-T2a1Ouay.js.map +1 -0
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +223 -227
- package/dist/durable.js.map +1 -1
- package/dist/{graph-C4RFlWAJ.js → graph-CY0wH838.js} +65 -18
- package/dist/graph-CY0wH838.js.map +1 -0
- package/dist/{graph-registry-DAI6KNXB.js → graph-registry-By0tUj4S.js} +16 -15
- package/dist/graph-registry-By0tUj4S.js.map +1 -0
- package/dist/{improvement-cycle-D1I4hQvf.js → improve-CWGBT13K.js} +75 -1220
- package/dist/improve-CWGBT13K.js.map +1 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +10 -13
- package/dist/index.js.map +1 -1
- package/dist/{integrations-DopfCC2a.d.ts → integrations-6xttbPi9.d.ts} +3 -3
- package/dist/integrations-dFi-ALk7.js.map +1 -1
- package/dist/intelligence.d.ts +7 -94
- package/dist/intelligence.js +505 -13
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +13 -12
- package/dist/{loop-runner-bin-DOuBIJ2O.d.ts → loop-runner-bin-CFnrAHpl.d.ts} +2 -2
- package/dist/{loop-runner-bin-Dv5QvYDH.js → loop-runner-bin-CdPlhy9g.js} +3 -3
- package/dist/{loop-runner-bin-Dv5QvYDH.js.map → loop-runner-bin-CdPlhy9g.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +7 -3
- package/dist/mcp/index.js +6 -8
- package/dist/mcp/index.js.map +1 -1
- package/dist/{openai-tools-Oxk4KQrY.d.ts → openai-tools-zh2I_uD7.d.ts} +2 -2
- package/dist/platform.d.ts +7 -2
- package/dist/platform.js +16 -8
- package/dist/platform.js.map +1 -1
- package/dist/{prepare-CER-ZkPp.js → prepare-Bt0IouPq.js} +1241 -586
- package/dist/prepare-Bt0IouPq.js.map +1 -0
- package/dist/{profile-gNUsHNIJ.js → profile-Do-5xO_D.js} +89 -3
- package/dist/profile-Do-5xO_D.js.map +1 -0
- package/dist/profiles.d.ts +1 -1
- package/dist/profiles.js +1 -3
- package/dist/profiles.js.map +1 -1
- package/dist/{protected-model-port-BhpQRTw-.d.ts → protected-model-port-DGxQ8_YM.d.ts} +3 -3
- package/dist/{provision-supervisor-DGegCUH4.js → provision-supervisor-0jMufp4h.js} +12 -9
- package/dist/provision-supervisor-0jMufp4h.js.map +1 -0
- package/dist/record-value-B6bwJxLa.js +12 -0
- package/dist/record-value-B6bwJxLa.js.map +1 -0
- package/dist/{run-layout-Cu8H7aeh.js → run-cancellation-BoW5Sg9Y.js} +174 -95
- package/dist/run-cancellation-BoW5Sg9Y.js.map +1 -0
- package/dist/{runtime-BOGpotnH.js → runtime-D37zRSs7.js} +431 -621
- package/dist/runtime-D37zRSs7.js.map +1 -0
- package/dist/{sandbox-profile-compat-QTkLe1Z6.js → sandbox-profile-compat-xSoVtdWw.js} +690 -697
- package/dist/sandbox-profile-compat-xSoVtdWw.js.map +1 -0
- package/dist/search-executor-DmgUm5p7.js +1916 -0
- package/dist/search-executor-DmgUm5p7.js.map +1 -0
- package/dist/{server-hZWM-G8w.js → server-DQHJszfk.js} +4 -4
- package/dist/server-DQHJszfk.js.map +1 -0
- package/dist/{search-executor-Cm1WZmL-.js → structural-rollout-DAvIE8mw.js} +2261 -3984
- package/dist/structural-rollout-DAvIE8mw.js.map +1 -0
- package/dist/{supervise-CvAKVfue.js → supervise-WuPAwfPh.js} +7793 -5338
- package/dist/supervise-WuPAwfPh.js.map +1 -0
- package/dist/{supervisor-Rz8AGpYb.js → supervisor-CPG1I9UN.js} +26590 -27196
- package/dist/supervisor-CPG1I9UN.js.map +1 -0
- package/dist/testing.d.ts +226 -1
- package/dist/testing.js +13 -14
- package/dist/testing.js.map +1 -1
- package/dist/{top-app-BaMw1W2z.js → top-app-C55Wa7uy.js} +339 -337
- package/dist/top-app-C55Wa7uy.js.map +1 -0
- package/dist/tui/bin.js +1 -1
- package/dist/tui/index.d.ts +17 -15
- package/dist/tui/index.js +2 -2
- package/dist/{types-Dl5L4r8Z.d.ts → types-CrNWif8-.d.ts} +17410 -17173
- package/dist/{workspace-streams-JLjh5DC6.d.ts → workspace-streams-BZZds1Fw.d.ts} +18 -16
- package/package.json +2 -2
- package/skills/agent-graphs/SKILL.md +10 -3
- package/skills/agent-graphs/references/authoring.md +17 -0
- package/skills/profile-authoring/SKILL.md +3 -3
- package/skills/supervise/SKILL.md +2 -2
- package/dist/activation-BDP6Eivv.js +0 -234
- package/dist/activation-BDP6Eivv.js.map +0 -1
- package/dist/coordination-driver-BHkFVqIq.js.map +0 -1
- package/dist/graph-C4RFlWAJ.js.map +0 -1
- package/dist/graph-registry-DAI6KNXB.js.map +0 -1
- package/dist/improvement-cycle-D1I4hQvf.js.map +0 -1
- package/dist/prepare-CER-ZkPp.js.map +0 -1
- package/dist/profile-gNUsHNIJ.js.map +0 -1
- package/dist/protected-model-port-BuRsviSL.js +0 -766
- package/dist/protected-model-port-BuRsviSL.js.map +0 -1
- package/dist/provision-supervisor-DGegCUH4.js.map +0 -1
- package/dist/run-layout-Cu8H7aeh.js.map +0 -1
- package/dist/runtime-BOGpotnH.js.map +0 -1
- package/dist/sandbox-profile-compat-QTkLe1Z6.js.map +0 -1
- package/dist/search-executor-Cm1WZmL-.js.map +0 -1
- package/dist/server-hZWM-G8w.js.map +0 -1
- package/dist/supervise-CvAKVfue.js.map +0 -1
- package/dist/supervisor-Rz8AGpYb.js.map +0 -1
- package/dist/top-app-BaMw1W2z.js.map +0 -1
package/dist/testing.d.ts
CHANGED
|
@@ -1,5 +1,230 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ct as GraphSubtasks, Dp as ManagerWakePolicy, Dt as SpawnPreflight, Dx as WorkerWatchOptions, Em as PriorCoordination, F as Budget, Hw as HarnessTranscriptCapture, Ix as ChildQuestionInbox, Jg as ToolLoopToolCall, KS as AnalystRegistry, Kg as ToolLoopCompactionOptions, Lx as EscalateQuestion, MS as BusRecord, Mx as RouteFlow, Od as runGraphWithTestBrain, Ox as DecideGate, Qx as ContinuityMode, Rd as SuperviseTestOptions, Rh as Inbox, Td as RunGraphTestOptions, Tt as PeerAuditAccess, Ug as ToolLoopCallContext, Wg as ToolLoopChat, YS as AnalyzeOnSettleRoute, Yx as AuthorizeDownMessage, bt as CoordinationTools, ea as ResultBlobStore, ih as SpawnResourceReader, jd as superviseWithTestBrain, jt as SuperviseProfileEntry, kS as McpToolDescriptor, oS as MapOnSettleRoute, pa as Agent, qg as ToolLoopMessageRecord, qp as RunCancelRequest, sm as SupervisorFinalizer, ty as DeliverableSpec, up as supervisorAgentWithTestBrain, wt as MakeWorkerAgent, xp as SupervisorAgentTestDeps, xx as CoordinationEvent, zg as RouterResponseReceipt, zp as StopRule } from "./types-CrNWif8-.js";
|
|
2
2
|
import { AgentImprovementProposal, AgentProfile, AgentProfileImprovementMeasuredComparison, SandboxSizePreset } from "@tangle-network/agent-interface";
|
|
3
|
+
//#region src/runtime/supervise/router-transcript.d.ts
|
|
4
|
+
/** What the brain returned for one turn, as the recorder keeps it. */
|
|
5
|
+
interface RouterTranscriptReply {
|
|
6
|
+
readonly content?: string | null;
|
|
7
|
+
readonly toolCalls?: ReadonlyArray<ToolLoopToolCall>;
|
|
8
|
+
}
|
|
9
|
+
interface RouterTranscript {
|
|
10
|
+
/** Keep every message the loop added that is not yet kept. */
|
|
11
|
+
observe(messages: ReadonlyArray<ToolLoopMessageRecord>): void;
|
|
12
|
+
/** Keep the model's reply for this turn, and return what this turn added, for the turn event. */
|
|
13
|
+
reply(reply: RouterTranscriptReply): ReadonlyArray<ToolLoopMessageRecord>;
|
|
14
|
+
/** Keep a physical HTTP response outside the model conversation. */
|
|
15
|
+
response(receipt: RouterResponseReceipt): void;
|
|
16
|
+
/** The whole conversation so far as a harness transcript. */
|
|
17
|
+
capture(): HarnessTranscriptCapture;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/runtime/supervise/driver-agent-options.d.ts
|
|
21
|
+
interface DriverAgentOptions {
|
|
22
|
+
readonly name: string;
|
|
23
|
+
/** The driver-LLM seam — ONE inference turn over the conversation + the coordination tool specs
|
|
24
|
+
* (the canonical `ToolLoopChat`): a scripted mock offline, the router's tool-calling in
|
|
25
|
+
* production, or a sandboxed harness. The same seam every tool-loop uses; no bespoke shape. */
|
|
26
|
+
readonly brain: ToolLoopChat;
|
|
27
|
+
/** Profile-declared model for a production Router brain. When set, every turn must report this
|
|
28
|
+
* exact provider-observed model before its output is accepted. Omitted by scripted test brains. */
|
|
29
|
+
readonly expectedModel?: string;
|
|
30
|
+
/** Runtime-owned observation sink for the provider identity of each settled driver turn. */
|
|
31
|
+
readonly onProviderModel?: (model: string | undefined) => void;
|
|
32
|
+
/** Shared blob store — `observe_agent` reads settled outputs through it. */
|
|
33
|
+
readonly blobs: ResultBlobStore;
|
|
34
|
+
/** Resolve a spawned `profile` to a worker LEAF or a driver child (the recursion seam). */
|
|
35
|
+
readonly makeWorkerAgent: MakeWorkerAgent;
|
|
36
|
+
/** Serve `run_graph` — see `CoordinationToolsOptions.graphs`. */
|
|
37
|
+
readonly graphs?: GraphSubtasks;
|
|
38
|
+
readonly authorizeDownMessage?: AuthorizeDownMessage;
|
|
39
|
+
/** Per-child budget reserved from the conserved pool on each spawn. */
|
|
40
|
+
readonly perWorker: Budget;
|
|
41
|
+
/** Allow the manager's own metered turn after child admission reaches its protected share. */
|
|
42
|
+
readonly preserveOwnerTurns?: true;
|
|
43
|
+
/** Independent completion check for work the driver performs itself. When present, the driver
|
|
44
|
+
* receives `submit_result`; the first passing submission ends the loop and becomes the output. */
|
|
45
|
+
readonly deliverable?: DeliverableSpec<unknown>;
|
|
46
|
+
/** Receives a result only after this manager's completion check accepted it. */
|
|
47
|
+
readonly onAcceptedSubmission?: (result: unknown) => void;
|
|
48
|
+
/** The analyst lenses available to the driver. Required for `analyzeOnSettle` (and `run_analyst`).
|
|
49
|
+
* Unset → no analyst feed (status quo: the driver gets settled outputs, no findings). */
|
|
50
|
+
readonly analysts?: AnalystRegistry;
|
|
51
|
+
/** Where an `ask_parent` question goes when it leaves this manager. Omit = `no-parent`. */
|
|
52
|
+
readonly escalateQuestion?: EscalateQuestion;
|
|
53
|
+
/** Receives this manager's intake for questions its child managers raise. */
|
|
54
|
+
readonly onChildQuestionInbox?: (inbox: ChildQuestionInbox) => void;
|
|
55
|
+
/** Analyst kind ids run AUTOMATICALLY when a worker settles `done` — each result re-enters as a
|
|
56
|
+
* `finding` the driver pulls and composes its next steer from. The UP-leg of the self-improving
|
|
57
|
+
* loop. Omit/empty = no auto-analysis (status quo). Requires `analysts`. */
|
|
58
|
+
readonly analyzeOnSettle?: ReadonlyArray<string | AnalyzeOnSettleRoute>;
|
|
59
|
+
/** Maps expanded when their source worker settles (`CoordinationToolsOptions.mapOnSettle`). */
|
|
60
|
+
readonly mapOnSettle?: ReadonlyArray<MapOnSettleRoute>;
|
|
61
|
+
/** The flow this manager runs (`CoordinationToolsOptions.routeFlow`). Requires the runtime flow
|
|
62
|
+
* brain, which makes no model call. */
|
|
63
|
+
readonly routeFlow?: RouteFlow;
|
|
64
|
+
/** Answers the gates of `routeFlow` (`CoordinationToolsOptions.decideGate`). */
|
|
65
|
+
readonly decideGate?: DecideGate;
|
|
66
|
+
/** Trusted source refs for this manager’s existing observe_agent capability. */
|
|
67
|
+
readonly sourceEvidenceRefs?: ReadonlyArray<string>;
|
|
68
|
+
readonly peerAudit?: PeerAuditAccess;
|
|
69
|
+
/** Run the ONLINE detector panel over each worker's LIVE tool trace and raise a `finding` the
|
|
70
|
+
* moment it loops/error-storms — mid-run evidence to steer on, not a settle-time post-mortem.
|
|
71
|
+
* Omit = no online watching. */
|
|
72
|
+
readonly watchWorkers?: WorkerWatchOptions;
|
|
73
|
+
/** Idle time after which `observe_agent` reports a worker as stalled (a derived read; nothing is
|
|
74
|
+
* killed). Omit = the runtime default. */
|
|
75
|
+
readonly stallAfterMs?: number;
|
|
76
|
+
/** How Runtime wakes this driver after a turn that ends with work open. Omit = the defaults in
|
|
77
|
+
* `./wake`. */
|
|
78
|
+
readonly wake?: ManagerWakePolicy;
|
|
79
|
+
/** Default continuity per worker PROFILE NAME — `'resume'` makes spawns of that name re-attach
|
|
80
|
+
* to the node's latest settled worker (see
|
|
81
|
+
* `CoordinationToolsOptions.continuityByProfile`); `spawn_worker`'s per-call `continuity`
|
|
82
|
+
* argument overrides. Omit = every spawn fresh (status quo). */
|
|
83
|
+
readonly continuityByProfile?: Readonly<Record<string, ContinuityMode>>;
|
|
84
|
+
/** OPT-IN async gate run before every spawn mints an assignment or reserves budget. See
|
|
85
|
+
* `CoordinationToolsOptions.preflightSpawn`. */
|
|
86
|
+
readonly preflightSpawn?: SpawnPreflight;
|
|
87
|
+
/** Pre-journal profile resolution for `preflightSpawn`; see
|
|
88
|
+
* `CoordinationToolsOptions.resolveSpawnProfile`. */
|
|
89
|
+
readonly resolveSpawnProfile?: (profile: AgentProfile) => AgentProfile;
|
|
90
|
+
/** Composition of each authored child profile before identity is fixed —
|
|
91
|
+
* `CoordinationToolsOptions.composeSpawnProfile`. */
|
|
92
|
+
readonly composeSpawnProfile?: (profile: AgentProfile) => AgentProfile;
|
|
93
|
+
/** The run's validated profiles table — `CoordinationToolsOptions.profiles`. */
|
|
94
|
+
readonly profiles?: ReadonlyMap<string, SuperviseProfileEntry>;
|
|
95
|
+
/** See `CoordinationToolsOptions.spawnResourceRoot`. */
|
|
96
|
+
readonly spawnResourceRoot?: string;
|
|
97
|
+
/** See `CoordinationToolsOptions.spawnResourceReader`. */
|
|
98
|
+
readonly spawnResourceReader?: SpawnResourceReader;
|
|
99
|
+
/** The driver's stance — a string, or built from the task (the worker-driver prompt /
|
|
100
|
+
* the generator). INJECTED so the prompt is a pluggable, optimizable role. */
|
|
101
|
+
readonly systemPrompt: string | ((task: unknown) => string);
|
|
102
|
+
/** Product-selected tools already bound to this exact supervisor node. The same descriptors are
|
|
103
|
+
* served over MCP for external supervisors; this arm projects them into router ToolSpecs. */
|
|
104
|
+
readonly nodeTools?: ReadonlyArray<McpToolDescriptor>;
|
|
105
|
+
/** Exact bare names to expose from the coordination, node-tool, and direct-work-tool set.
|
|
106
|
+
* Runtime never grants an implicit complete tool set. */
|
|
107
|
+
readonly toolNames: ReadonlyArray<string>;
|
|
108
|
+
/** WORK tools the driver may call DIRECTLY (alongside the coordination verbs) — so the driver is
|
|
109
|
+
* not a pure manager but a full agent that can ACT (do simple work itself) OR SPAWN (delegate).
|
|
110
|
+
* Each is a router tool spec; their names must not collide with the coordination verbs. Pair with
|
|
111
|
+
* `executeExtraTool`. Unset → coordination-only (the prior behavior). */
|
|
112
|
+
readonly extraTools?: ReadonlyArray<{
|
|
113
|
+
readonly name: string;
|
|
114
|
+
readonly description?: string;
|
|
115
|
+
readonly parameters: Record<string, unknown>;
|
|
116
|
+
}>;
|
|
117
|
+
/** Runs an `extraTools` call. Returns a string result, or null/undefined to signal "not handled"
|
|
118
|
+
* so the call falls through to the coordination dispatch. Required iff `extraTools` is set. */
|
|
119
|
+
readonly executeExtraTool?: (name: string, args: Record<string, unknown>) => Promise<string | null | undefined>;
|
|
120
|
+
/** Max driver turns before the loop force-finalizes on the best settled child. Default: no
|
|
121
|
+
* turn-count cap. The loop is bounded by the conserved budget pool (every driver turn is metered
|
|
122
|
+
* into it), an absolute deadline, the driver's own stop, and abort, all checked before each
|
|
123
|
+
* turn. Without a deadline, a manager stops once it has overdrawn its pool by the pool's size
|
|
124
|
+
* again, and a brain that reports no usage keeps a 16-turn bound unless a dollar cap applies. A manager awaits one settlement per turn, so the old default of 16 ended any manager
|
|
125
|
+
* with more than about 14 workers and tore its unfinished workers down: measured 2026-09-25 on
|
|
126
|
+
* a 1 + 20 + 400 tree, 124 of 420 agents settled `down` at 16 and none at 0. */
|
|
127
|
+
readonly maxTurns?: number;
|
|
128
|
+
/** Injected clock for the in-loop absolute-deadline guard — keeps the deadline check
|
|
129
|
+
* deterministic in tests. Defaults to `Date.now`. */
|
|
130
|
+
readonly now?: () => number;
|
|
131
|
+
/**
|
|
132
|
+
* PROGRESS-derived stop (mechanic D). Today a run ends on a ceiling — iterations, tokens,
|
|
133
|
+
* dollars, deadline, turn cap — which answers "may it continue?" and never "is it still getting
|
|
134
|
+
* anywhere?". A stop rule reads the run's own progress (best-so-far over settled work, time
|
|
135
|
+
* since the last settle, the live worker feed) and ends a run that has stopped learning BEFORE
|
|
136
|
+
* it exhausts a budget.
|
|
137
|
+
*
|
|
138
|
+
* Composes with, and can never override, the hard guards: `poolStarved` / `deadlinePassed` /
|
|
139
|
+
* abort / the driver's own stop are evaluated first, so a rule can only ADD a stop.
|
|
140
|
+
*
|
|
141
|
+
* THRESHOLDS are the caller's judgment, not this module's — build the rule with
|
|
142
|
+
* `plateau({window, minDelta})` / `noProgressFor({...})` / `allWorkersStalled({...})` from
|
|
143
|
+
* `supervise/stop-rules`. Omit ⇒ ceilings only (unchanged behavior).
|
|
144
|
+
*/
|
|
145
|
+
readonly stopRule?: StopRule;
|
|
146
|
+
/** Called once with the rule's reason when a `stopRule` ends the run — so a caller can record
|
|
147
|
+
* WHY a run stopped early instead of inferring it from an unexhausted budget. */
|
|
148
|
+
readonly onProgressStop?: (reason: string, request?: RunCancelRequest) => void;
|
|
149
|
+
/** Give the driver brain a chapter-lifecycle on its OWN context window. The LLM-brain front doors
|
|
150
|
+
* lose to a dumb-Ralph respawn because the brain re-bills its whole coordination transcript every
|
|
151
|
+
* turn — the same context overflow a single steered agent suffers, one level up. With this set,
|
|
152
|
+
* once the brain's running conversation exceeds `thresholdTokens` it distills the accumulated
|
|
153
|
+
* history to a compact progress note and continues fresh: the supervisor analog of respawning
|
|
154
|
+
* against external tracking state, except the live `Scope` roster IS the durable state. Default
|
|
155
|
+
* off (no behavior change). `distill` defaults to a self-summary authored by the brain combined
|
|
156
|
+
* with the factual settled-worker roster; override to supply your own. */
|
|
157
|
+
readonly compaction?: ToolLoopCompactionOptions;
|
|
158
|
+
/** Pass-through subscriber for every coordination bus event: settled/question/finding,
|
|
159
|
+
* pre-delivery instruction receipts, and steer/answer delivery outcomes. A durable caller uses
|
|
160
|
+
* this to append the coordination log. Omit = no observer. */
|
|
161
|
+
readonly onEvent?: (event: CoordinationEvent, record: BusRecord<CoordinationEvent>) => void | Promise<void>;
|
|
162
|
+
/** Re-publish resume-time settlements through the awaited observer before the first brain turn. */
|
|
163
|
+
readonly replaySettlements?: boolean;
|
|
164
|
+
/** Questions, findings, and authorized continuation receipts loaded from a prior process.
|
|
165
|
+
* Questions seed the ledger (`list_questions`, blocking-stop policy); all three feed the resume
|
|
166
|
+
* brief. Continuation receipts are evidence only and are never auto-delivered. Omit = fresh. */
|
|
167
|
+
readonly priorCoordination?: PriorCoordination;
|
|
168
|
+
/** How the settled-worker ledger becomes the run's output. Default `bestDelivered` — the single
|
|
169
|
+
* highest-scoring DELIVERED child (the exact keep-best every existing caller had). Runs under
|
|
170
|
+
* the delivered-only invariant (`runFinalizer`): whatever the finalizer, an undelivered or
|
|
171
|
+
* invalid child's output stays unreachable. */
|
|
172
|
+
readonly finalizer?: SupervisorFinalizer;
|
|
173
|
+
/** The recorder of this agent's conversation. A wrapper that builds a new driver for each `act`
|
|
174
|
+
* passes one recorder to all of them, so the agent keeps one transcript across attempts.
|
|
175
|
+
* @internal Runtime's own wiring between `supervisorAgent` and its router arm. */
|
|
176
|
+
transcript?: RouterTranscript;
|
|
177
|
+
/** Optional shared manager inbox used by a wrapper that must accept messages before async node
|
|
178
|
+
* setup finishes. Ordinary callers omit it and the driver owns a fresh inbox. */
|
|
179
|
+
readonly inbox?: Inbox;
|
|
180
|
+
/**
|
|
181
|
+
* The durable run directory (`SuperviseOptions.runDir` / the `run-layout` event dir) this driver
|
|
182
|
+
* ACKNOWLEDGES worker-scoped cancel requests from. Each turn the driver reads the layout's
|
|
183
|
+
* cancellation inbox once, applies any request naming one of ITS OWN workers through that
|
|
184
|
+
* worker's existing per-child abort (cascading to the worker's subtree and no sibling), and
|
|
185
|
+
* writes the durable {@link runtime.WorkerCancellation} acknowledgement: `cancel_requested` when the
|
|
186
|
+
* abort is issued, `cancelled` only when the worker reaches a terminal `down` on the settle
|
|
187
|
+
* path, `not_live` when the worker is already gone — a missing worker never reads as success.
|
|
188
|
+
* Which requests this driver OWNS is set by {@link controlScope}. Omit = no acknowledger
|
|
189
|
+
* (in-memory runs keep in-process control via handles).
|
|
190
|
+
*/
|
|
191
|
+
readonly controlDir?: string;
|
|
192
|
+
/** Durable steer directory when it differs from the run-control directory. */
|
|
193
|
+
readonly steerDir?: string;
|
|
194
|
+
/**
|
|
195
|
+
* Which cancel requests this driver's acknowledger owns when `controlDir` is set.
|
|
196
|
+
*
|
|
197
|
+
* `'run'` (the default, and the tree root's role): exact node ids of its OWN direct children,
|
|
198
|
+
* plus every label/profile-name reference. `'subtree'` (a nested manager): exact direct-child
|
|
199
|
+
* node ids ONLY — never labels or profile names, which can match workers under more than one
|
|
200
|
+
* manager. Ownership makes each operation appliable by exactly ONE manager, so two acknowledgers
|
|
201
|
+
* sharing one `controlDir` can never abort two workers for one operation or race on the
|
|
202
|
+
* acknowledgement file. At the end of `act`, the owner writes an expiry record for each owned
|
|
203
|
+
* request still open: `not_live` for one never applied, `unknown` for an abort whose settle the
|
|
204
|
+
* run ended too soon to observe — so a reader can tell run-over from in-progress.
|
|
205
|
+
*/
|
|
206
|
+
/** Called with this driver's coordination tool descriptors once they exist and before the brain
|
|
207
|
+
* loop starts — the seam a node tool uses to call the same verbs in code
|
|
208
|
+
* (`SupervisorToolInvocationContext.verbs`). */
|
|
209
|
+
readonly onCoordinationTools?: (tools: ReadonlyArray<McpToolDescriptor>, coordination: Pick<CoordinationTools, 'awaitSettlement'>) => void;
|
|
210
|
+
readonly controlScope?: 'run' | 'subtree';
|
|
211
|
+
/**
|
|
212
|
+
* Abort the WHOLE run — the seam a run-scoped cancel request (`cancelRun`) is applied through.
|
|
213
|
+
* Wired by `supervise()` to the run's ONE cascade controller (the attached root control), so a
|
|
214
|
+
* run cancel takes the same path a caller's `RootHandle.abort` takes; there is no second
|
|
215
|
+
* controller and no poller. Read only by the `'run'`-scoped manager with a `controlDir`; omit
|
|
216
|
+
* and a run-scoped request stays unanswered.
|
|
217
|
+
*/
|
|
218
|
+
readonly abortRun?: (reason: string, request?: RunCancelRequest) => void;
|
|
219
|
+
}
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region src/runtime/supervise/driver-brain-agent.d.ts
|
|
222
|
+
/**
|
|
223
|
+
* Build the intelligent recursive driver. Its `act` is the LLM tool-loop; spawn it as a
|
|
224
|
+
* `driverChild` (`driver-executor.ts`) to run it inside a nested scope, recursively.
|
|
225
|
+
*/
|
|
226
|
+
declare function driverAgent(opts: DriverAgentOptions): Agent<unknown, unknown>;
|
|
227
|
+
//#endregion
|
|
3
228
|
//#region src/testing/index.d.ts
|
|
4
229
|
/** A proposal produced by Runtime's opaque profile-improvement path. */
|
|
5
230
|
type AgentProfileImprovementProposalFixture = Omit<AgentImprovementProposal, 'evaluation'> & {
|
package/dist/testing.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { F as canonicalCandidateDigest$1, z as immutableCandidateValue } from "./sandbox-profile-compat-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { r as runGraphWithTestBrain } from "./graph-C4RFlWAJ.js";
|
|
1
|
+
import { F as canonicalCandidateDigest$1, z as immutableCandidateValue } from "./sandbox-profile-compat-xSoVtdWw.js";
|
|
2
|
+
import { L as driverAgent, M as supervisorAgentWithTestBrain, r as superviseWithTestBrain } from "./supervise-WuPAwfPh.js";
|
|
3
|
+
import { c as verifyAgentImprovementProposal } from "./activation-kbkAuSmY.js";
|
|
4
|
+
import { a as applyExactAgentProfileDiff, v as parseExactAgentProfile } from "./profile-Do-5xO_D.js";
|
|
5
|
+
import { r as runGraphWithTestBrain } from "./graph-CY0wH838.js";
|
|
7
6
|
import { SANDBOX_SIZE_PRESET_NAMES, canonicalAgentProfileDigest } from "@tangle-network/agent-interface";
|
|
8
7
|
//#region src/testing/fixtures/agent-improvement-proposal.json
|
|
9
8
|
var agent_improvement_proposal_default = {
|
|
10
9
|
changedSurfaces: ["prompt"],
|
|
11
|
-
digest: "sha256:
|
|
10
|
+
digest: "sha256:50ae0acfec95c15a6ee5f09cac86e986ddebc8e20c287293fc4ccc5ab8433e49",
|
|
12
11
|
evaluation: {
|
|
13
12
|
"decision": {
|
|
14
13
|
"contributingChecks": [
|
|
@@ -4579,7 +4578,7 @@ var agent_improvement_proposal_default = {
|
|
|
4579
4578
|
],
|
|
4580
4579
|
"metadata": {
|
|
4581
4580
|
"fixture": "agent-improvement-proposal",
|
|
4582
|
-
"runtimeVersion": "0.
|
|
4581
|
+
"runtimeVersion": "0.338.0"
|
|
4583
4582
|
},
|
|
4584
4583
|
"objectives": [
|
|
4585
4584
|
{
|
|
@@ -4690,8 +4689,8 @@ var agent_improvement_proposal_default = {
|
|
|
4690
4689
|
"baselineContentHash": "sha256:5c21ee53e513fc604cb09754e21c392b24a424da0ef37dbf8f1ee4a8a0b08f09",
|
|
4691
4690
|
"candidateContentHash": "sha256:60fcbb1c728194bd51d7d19cb732d1c3f1881dce7e0a6266b41c8b98cfd65693",
|
|
4692
4691
|
"kind": "agent-eval-loop",
|
|
4693
|
-
"recordDigest": "sha256:
|
|
4694
|
-
"runId": "agent-runtime-0.
|
|
4692
|
+
"recordDigest": "sha256:a2b38993a29ff4b4dd605dc8c22cb0a43483de2d8e6acd7b4dbb5d19b88afc3d",
|
|
4693
|
+
"runId": "agent-runtime-0.338.0-proposal-fixture",
|
|
4695
4694
|
"schema": "agent-candidate-experiment"
|
|
4696
4695
|
}
|
|
4697
4696
|
},
|
|
@@ -4714,13 +4713,13 @@ var agent_improvement_proposal_default = {
|
|
|
4714
4713
|
}],
|
|
4715
4714
|
kind: "agent-improvement-proposal",
|
|
4716
4715
|
proposedAt: "2026-07-10T01:00:00.000Z",
|
|
4717
|
-
runId: "agent-runtime-0.
|
|
4716
|
+
runId: "agent-runtime-0.338.0-proposal-fixture"
|
|
4718
4717
|
};
|
|
4719
4718
|
//#endregion
|
|
4720
4719
|
//#region src/testing/fixtures/agent-profile-improvement-proposal.json
|
|
4721
4720
|
var agent_profile_improvement_proposal_default = {
|
|
4722
4721
|
changedSurfaces: ["prompt", "skills"],
|
|
4723
|
-
digest: "sha256:
|
|
4722
|
+
digest: "sha256:c70b01e9481baf95b0e01e2295d12d895ebcb92220738738509e3b29f7504d25",
|
|
4724
4723
|
evaluation: {
|
|
4725
4724
|
"decision": {
|
|
4726
4725
|
"contributingChecks": [
|
|
@@ -6354,7 +6353,7 @@ var agent_profile_improvement_proposal_default = {
|
|
|
6354
6353
|
],
|
|
6355
6354
|
"metadata": {
|
|
6356
6355
|
"fixture": "agent-profile-improvement-proposal",
|
|
6357
|
-
"runtimeVersion": "0.
|
|
6356
|
+
"runtimeVersion": "0.338.0"
|
|
6358
6357
|
},
|
|
6359
6358
|
"objectives": [
|
|
6360
6359
|
{
|
|
@@ -6465,7 +6464,7 @@ var agent_profile_improvement_proposal_default = {
|
|
|
6465
6464
|
"baselineContentHash": "sha256:21c495a37c418c10bde64fbaa188beddeed31f1f051ea60a6a6582a9ee0db704",
|
|
6466
6465
|
"candidateContentHash": "sha256:103f77bc8481601eef1ad5fe6ba84a40dffabc3a44f421f8c8559121edab84e9",
|
|
6467
6466
|
"kind": "agent-eval-loop",
|
|
6468
|
-
"recordDigest": "sha256:
|
|
6467
|
+
"recordDigest": "sha256:604275bc4e6e4af42a8801b82d6f0c621c45dea9eafc1e5391e255a6edeaba27",
|
|
6469
6468
|
"runId": "profile-improvement-1",
|
|
6470
6469
|
"schema": "agent-profile-improvement-experiment"
|
|
6471
6470
|
}
|
package/dist/testing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","names":["canonicalAgentImprovementProposalFixture","canonicalAgentProfileImprovementProposalFixture","canonicalAgentProfileImprovementStateFixture","canonicalCandidateDigest"],"sources":["../src/testing/fixtures/agent-improvement-proposal.json","../src/testing/fixtures/agent-profile-improvement-proposal.json","../src/testing/fixtures/agent-profile-improvement-state.json","../src/testing/index.ts"],"sourcesContent":["","","","import {\n type AgentImprovementProposal,\n type AgentProfile,\n type AgentProfileImprovementMeasuredComparison,\n canonicalAgentProfileDigest,\n SANDBOX_SIZE_PRESET_NAMES,\n type SandboxSizePreset,\n} from '@tangle-network/agent-interface'\n\nimport { canonicalCandidateDigest, immutableCandidateValue } from '../candidate-execution/digest'\nimport { applyExactAgentProfileDiff, parseExactAgentProfile } from '../candidate-execution/profile'\nimport { verifyAgentImprovementProposal } from '../intelligence/improvement-cycle'\nimport canonicalAgentImprovementProposalFixture from './fixtures/agent-improvement-proposal.json'\nimport canonicalAgentProfileImprovementProposalFixture from './fixtures/agent-profile-improvement-proposal.json'\nimport canonicalAgentProfileImprovementStateFixture from './fixtures/agent-profile-improvement-state.json'\n\nexport {\n type DriverAgentOptions,\n driverAgent,\n} from '../runtime/supervise/coordination-driver'\nexport {\n type RunGraphTestOptions,\n runGraphWithTestBrain,\n} from '../runtime/supervise/graph'\nexport {\n type SuperviseTestOptions,\n superviseWithTestBrain,\n} from '../runtime/supervise/supervise'\nexport {\n type SupervisorAgentTestDeps,\n supervisorAgentWithTestBrain,\n} from '../runtime/supervise/supervisor-agent'\nexport type { ToolLoopCallContext, ToolLoopChat } from '../runtime/tool-loop'\n\nconst serializedAgentImprovementProposalFixture = JSON.stringify(\n canonicalAgentImprovementProposalFixture,\n)\nconst serializedAgentProfileImprovementProposalFixture = JSON.stringify(\n canonicalAgentProfileImprovementProposalFixture,\n)\nconst serializedAgentProfileImprovementStateFixture = JSON.stringify(\n canonicalAgentProfileImprovementStateFixture,\n)\n\n/** A proposal produced by Runtime's opaque profile-improvement path. */\nexport type AgentProfileImprovementProposalFixture = Omit<\n AgentImprovementProposal,\n 'evaluation'\n> & {\n evaluation: AgentProfileImprovementMeasuredComparison\n}\n\n/** Complete private state for exercising profile activation and restore in consumer tests. */\nexport interface AgentProfileImprovementFixture {\n proposal: AgentProfileImprovementProposalFixture\n baselineProfile: AgentProfile\n candidateProfile: AgentProfile\n recommendedSize: SandboxSizePreset\n}\n\n/** Load an isolated, production-validated Runtime proposal for consumer tests. */\nexport function loadAgentImprovementProposalFixture(): AgentImprovementProposal {\n return verifyAgentImprovementProposal(JSON.parse(serializedAgentImprovementProposalFixture))\n}\n\n/** Load an isolated profile proposal and its private activation state for consumer tests. */\nexport function loadAgentProfileImprovementFixture(): AgentProfileImprovementFixture {\n const proposal = loadAgentProfileImprovementProposal()\n const state = parseAgentProfileImprovementState(\n JSON.parse(serializedAgentProfileImprovementStateFixture),\n )\n const experiment = proposal.evaluation.experiment\n const baselineStateDigest = profileStateDigest(state.baselineProfile, state.recommendedSize)\n const candidateStateDigest = profileStateDigest(state.candidateProfile, state.recommendedSize)\n if (\n baselineStateDigest !== experiment.baseline.stateDigest ||\n candidateStateDigest !== experiment.candidate.stateDigest\n ) {\n throw new Error('profile improvement fixture state does not match its proposal')\n }\n const appliedCandidate = experiment.change.reduce(\n (profile, change, index) =>\n applyExactAgentProfileDiff(profile, change, `profile improvement fixture change ${index}`),\n state.baselineProfile,\n )\n if (\n canonicalAgentProfileDigest(appliedCandidate) !==\n canonicalAgentProfileDigest(state.candidateProfile)\n ) {\n throw new Error('profile improvement fixture candidate does not match its proposal changes')\n }\n return immutableCandidateValue({ proposal, ...state })\n}\n\nfunction loadAgentProfileImprovementProposal(): AgentProfileImprovementProposalFixture {\n const proposal = verifyAgentImprovementProposal(\n JSON.parse(serializedAgentProfileImprovementProposalFixture),\n )\n if (proposal.evaluation.kind !== 'agent-profile-improvement-measured-comparison') {\n throw new Error('profile improvement fixture contains a sealed candidate comparison')\n }\n return { ...proposal, evaluation: proposal.evaluation }\n}\n\nfunction parseAgentProfileImprovementState(\n input: unknown,\n): Omit<AgentProfileImprovementFixture, 'proposal'> {\n if (typeof input !== 'object' || input === null || Array.isArray(input)) {\n throw new Error('profile improvement fixture state must be an object')\n }\n const record = input as Record<string, unknown>\n const fields = Object.keys(record).sort()\n const expectedFields = ['baselineProfile', 'candidateProfile', 'recommendedSize']\n if (\n fields.length !== expectedFields.length ||\n fields.some((field, i) => field !== expectedFields[i])\n ) {\n throw new Error('profile improvement fixture state contains unsupported fields')\n }\n const recommendedSize = SANDBOX_SIZE_PRESET_NAMES.find((size) => size === record.recommendedSize)\n if (!recommendedSize) {\n throw new Error('profile improvement fixture has an invalid recommended size')\n }\n return {\n baselineProfile: parseExactAgentProfile(\n record.baselineProfile,\n 'profile improvement fixture baseline',\n ),\n candidateProfile: parseExactAgentProfile(\n record.candidateProfile,\n 'profile improvement fixture candidate',\n ),\n recommendedSize,\n }\n}\n\nfunction profileStateDigest(\n profile: AgentProfile,\n recommendedSize: SandboxSizePreset,\n): ReturnType<typeof canonicalCandidateDigest> {\n return canonicalCandidateDigest({ definition: profile, recommendedSize })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,MAC5C,4BAA4B,MAAM,gBAAgB,GAElD,MAAM,IAAI,MAAM,2EAA2E;CAE7F,OAAO,wBAAwB;EAAE;EAAU,GAAG;CAAM,CAAC;AACvD;AAEA,SAAS,sCAA8E;CACrF,MAAM,WAAW,+BACf,KAAK,MAAM,gDAAgD,CAC7D;CACA,IAAI,SAAS,WAAW,SAAS,iDAC/B,MAAM,IAAI,MAAM,oEAAoE;CAEtF,OAAO;EAAE,GAAG;EAAU,YAAY,SAAS;CAAW;AACxD;AAEA,SAAS,kCACP,OACkD;CAClD,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK,GACpE,MAAM,IAAI,MAAM,qDAAqD;CAEvE,MAAM,SAAS;CACf,MAAM,SAAS,OAAO,KAAK,MAAM,CAAC,CAAC,KAAK;CACxC,MAAM,iBAAiB;EAAC;EAAmB;EAAoB;CAAiB;CAChF,IACE,OAAO,WAAW,eAAe,UACjC,OAAO,MAAM,OAAO,MAAM,UAAU,eAAe,EAAE,GAErD,MAAM,IAAI,MAAM,+DAA+D;CAEjF,MAAM,kBAAkB,0BAA0B,MAAM,SAAS,SAAS,OAAO,eAAe;CAChG,IAAI,CAAC,iBACH,MAAM,IAAI,MAAM,6DAA6D;CAE/E,OAAO;EACL,iBAAiB,uBACf,OAAO,iBACP,sCACF;EACA,kBAAkB,uBAChB,OAAO,kBACP,uCACF;EACA;CACF;AACF;AAEA,SAAS,mBACP,SACA,iBAC6C;CAC7C,OAAOC,2BAAyB;EAAE,YAAY;EAAS;CAAgB,CAAC;AAC1E"}
|
|
1
|
+
{"version":3,"file":"testing.js","names":["canonicalAgentImprovementProposalFixture","canonicalAgentProfileImprovementProposalFixture","canonicalAgentProfileImprovementStateFixture","canonicalCandidateDigest"],"sources":["../src/testing/fixtures/agent-improvement-proposal.json","../src/testing/fixtures/agent-profile-improvement-proposal.json","../src/testing/fixtures/agent-profile-improvement-state.json","../src/testing/index.ts"],"sourcesContent":["","","","import {\n type AgentImprovementProposal,\n type AgentProfile,\n type AgentProfileImprovementMeasuredComparison,\n canonicalAgentProfileDigest,\n SANDBOX_SIZE_PRESET_NAMES,\n type SandboxSizePreset,\n} from '@tangle-network/agent-interface'\n\nimport { canonicalCandidateDigest, immutableCandidateValue } from '../candidate-execution/digest'\nimport { applyExactAgentProfileDiff, parseExactAgentProfile } from '../candidate-execution/profile'\nimport { verifyAgentImprovementProposal } from '../intelligence/activation'\nimport canonicalAgentImprovementProposalFixture from './fixtures/agent-improvement-proposal.json'\nimport canonicalAgentProfileImprovementProposalFixture from './fixtures/agent-profile-improvement-proposal.json'\nimport canonicalAgentProfileImprovementStateFixture from './fixtures/agent-profile-improvement-state.json'\n\nexport type { DriverAgentOptions } from '../runtime/supervise/driver-agent-options'\nexport { driverAgent } from '../runtime/supervise/driver-brain-agent'\nexport {\n type RunGraphTestOptions,\n runGraphWithTestBrain,\n} from '../runtime/supervise/graph'\nexport {\n type SuperviseTestOptions,\n superviseWithTestBrain,\n} from '../runtime/supervise/supervise'\nexport {\n type SupervisorAgentTestDeps,\n supervisorAgentWithTestBrain,\n} from '../runtime/supervise/supervisor-agent'\nexport type { ToolLoopCallContext, ToolLoopChat } from '../runtime/tool-loop'\n\nconst serializedAgentImprovementProposalFixture = JSON.stringify(\n canonicalAgentImprovementProposalFixture,\n)\nconst serializedAgentProfileImprovementProposalFixture = JSON.stringify(\n canonicalAgentProfileImprovementProposalFixture,\n)\nconst serializedAgentProfileImprovementStateFixture = JSON.stringify(\n canonicalAgentProfileImprovementStateFixture,\n)\n\n/** A proposal produced by Runtime's opaque profile-improvement path. */\nexport type AgentProfileImprovementProposalFixture = Omit<\n AgentImprovementProposal,\n 'evaluation'\n> & {\n evaluation: AgentProfileImprovementMeasuredComparison\n}\n\n/** Complete private state for exercising profile activation and restore in consumer tests. */\nexport interface AgentProfileImprovementFixture {\n proposal: AgentProfileImprovementProposalFixture\n baselineProfile: AgentProfile\n candidateProfile: AgentProfile\n recommendedSize: SandboxSizePreset\n}\n\n/** Load an isolated, production-validated Runtime proposal for consumer tests. */\nexport function loadAgentImprovementProposalFixture(): AgentImprovementProposal {\n return verifyAgentImprovementProposal(JSON.parse(serializedAgentImprovementProposalFixture))\n}\n\n/** Load an isolated profile proposal and its private activation state for consumer tests. */\nexport function loadAgentProfileImprovementFixture(): AgentProfileImprovementFixture {\n const proposal = loadAgentProfileImprovementProposal()\n const state = parseAgentProfileImprovementState(\n JSON.parse(serializedAgentProfileImprovementStateFixture),\n )\n const experiment = proposal.evaluation.experiment\n const baselineStateDigest = profileStateDigest(state.baselineProfile, state.recommendedSize)\n const candidateStateDigest = profileStateDigest(state.candidateProfile, state.recommendedSize)\n if (\n baselineStateDigest !== experiment.baseline.stateDigest ||\n candidateStateDigest !== experiment.candidate.stateDigest\n ) {\n throw new Error('profile improvement fixture state does not match its proposal')\n }\n const appliedCandidate = experiment.change.reduce(\n (profile, change, index) =>\n applyExactAgentProfileDiff(profile, change, `profile improvement fixture change ${index}`),\n state.baselineProfile,\n )\n if (\n canonicalAgentProfileDigest(appliedCandidate) !==\n canonicalAgentProfileDigest(state.candidateProfile)\n ) {\n throw new Error('profile improvement fixture candidate does not match its proposal changes')\n }\n return immutableCandidateValue({ proposal, ...state })\n}\n\nfunction loadAgentProfileImprovementProposal(): AgentProfileImprovementProposalFixture {\n const proposal = verifyAgentImprovementProposal(\n JSON.parse(serializedAgentProfileImprovementProposalFixture),\n )\n if (proposal.evaluation.kind !== 'agent-profile-improvement-measured-comparison') {\n throw new Error('profile improvement fixture contains a sealed candidate comparison')\n }\n return { ...proposal, evaluation: proposal.evaluation }\n}\n\nfunction parseAgentProfileImprovementState(\n input: unknown,\n): Omit<AgentProfileImprovementFixture, 'proposal'> {\n if (typeof input !== 'object' || input === null || Array.isArray(input)) {\n throw new Error('profile improvement fixture state must be an object')\n }\n const record = input as Record<string, unknown>\n const fields = Object.keys(record).sort()\n const expectedFields = ['baselineProfile', 'candidateProfile', 'recommendedSize']\n if (\n fields.length !== expectedFields.length ||\n fields.some((field, i) => field !== expectedFields[i])\n ) {\n throw new Error('profile improvement fixture state contains unsupported fields')\n }\n const recommendedSize = SANDBOX_SIZE_PRESET_NAMES.find((size) => size === record.recommendedSize)\n if (!recommendedSize) {\n throw new Error('profile improvement fixture has an invalid recommended size')\n }\n return {\n baselineProfile: parseExactAgentProfile(\n record.baselineProfile,\n 'profile improvement fixture baseline',\n ),\n candidateProfile: parseExactAgentProfile(\n record.candidateProfile,\n 'profile improvement fixture candidate',\n ),\n recommendedSize,\n }\n}\n\nfunction profileStateDigest(\n profile: AgentProfile,\n recommendedSize: SandboxSizePreset,\n): ReturnType<typeof canonicalCandidateDigest> {\n return canonicalCandidateDigest({ definition: profile, recommendedSize })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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