@tangle-network/agent-runtime 0.107.5 → 0.108.1
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 +17 -4
- package/dist/{activation-Ck5ksFWg.js → activation-DRpnplEm.js} +3 -3
- package/dist/{activation-Ck5ksFWg.js.map → activation-DRpnplEm.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/candidate-execution/index.js +4 -4
- package/dist/{candidate-execution-BUpR0mSD.js → candidate-execution-nYMa-bc-.js} +4 -4
- package/dist/{candidate-execution-BUpR0mSD.js.map → candidate-execution-nYMa-bc-.js.map} +1 -1
- package/dist/durable.d.ts +134 -0
- package/dist/durable.js +124 -0
- package/dist/durable.js.map +1 -0
- package/dist/{environment-provider-IUGU3epE.d.ts → environment-provider-D0NXc4Qz.d.ts} +73 -4
- package/dist/environment-provider.d.ts +1 -1
- package/dist/{improvement-cycle-Ulvvbg5p.js → improvement-cycle-CRnDDdX0.js} +49 -155
- package/dist/improvement-cycle-CRnDDdX0.js.map +1 -0
- package/dist/{index-B3wAV1SJ.d.ts → index-BZbJWqoZ.d.ts} +165 -25
- package/dist/{index-BbB5mmK0.d.ts → index-DQp3BPeC.d.ts} +11 -159
- package/dist/{index-D2g5qCwg.d.ts → index-cdkwHruJ.d.ts} +3 -3
- package/dist/index.d.ts +6 -6
- package/dist/index.js +14 -121
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +15 -7
- package/dist/intelligence.js +4 -4
- package/dist/{knowledge-Dizh_AtL.js → knowledge-rdrpPIXs.js} +5 -5
- package/dist/{knowledge-Dizh_AtL.js.map → knowledge-rdrpPIXs.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-Dw9_OZfu.d.ts → loop-runner-bin-9-JlGqN7.d.ts} +3 -3
- package/dist/{loop-runner-bin-BHELvjdO.js → loop-runner-bin-B1V-XS5A.js} +3 -3
- package/dist/{loop-runner-bin-BHELvjdO.js.map → loop-runner-bin-B1V-XS5A.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/loops.d.ts +3 -3
- package/dist/loops.js +5 -5
- package/dist/mcp/bin.js +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-CKLy1C7M.js → openai-tools-BjQq2TTL.js} +2 -2
- package/dist/{openai-tools-CKLy1C7M.js.map → openai-tools-BjQq2TTL.js.map} +1 -1
- package/dist/{prepare-_WTTffkz.js → prepare-Pr19X93k.js} +141 -6
- package/dist/prepare-Pr19X93k.js.map +1 -0
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/{protected-model-port-ZUwVuftA.js → protected-model-port-uthtDNqu.js} +2 -2
- package/dist/{protected-model-port-ZUwVuftA.js.map → protected-model-port-uthtDNqu.js.map} +1 -1
- package/dist/{redact-C5xOm8cu.d.ts → redact-BkasKlyd.d.ts} +17 -27
- package/dist/{runtime-M_GIzIwe.js → runtime-CDekUROm.js} +4 -4
- package/dist/{runtime-M_GIzIwe.js.map → runtime-CDekUROm.js.map} +1 -1
- package/dist/{structural-rollout-IXUEplky.js → structural-rollout-BC81Otmc.js} +10 -9
- package/dist/structural-rollout-BC81Otmc.js.map +1 -0
- package/dist/{supervise-BiRutHS9.js → supervise-JfKPwIlO.js} +270 -69
- package/dist/supervise-JfKPwIlO.js.map +1 -0
- package/dist/{supervisor-DTKhF-RV.js → supervisor-B2LzaWRb.js} +221 -16
- package/dist/supervisor-B2LzaWRb.js.map +1 -0
- package/dist/testing.js +288 -239
- package/dist/testing.js.map +1 -1
- package/dist/{workspace-archive-CIG1VNCj.js → workspace-archive-C9w_rxt6.js} +2 -2
- package/dist/{workspace-archive-CIG1VNCj.js.map → workspace-archive-C9w_rxt6.js.map} +1 -1
- package/package.json +11 -6
- package/dist/improvement-cycle-Ulvvbg5p.js.map +0 -1
- package/dist/prepare-_WTTffkz.js.map +0 -1
- package/dist/structural-rollout-IXUEplky.js.map +0 -1
- package/dist/supervise-BiRutHS9.js.map +0 -1
- package/dist/supervisor-DTKhF-RV.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { d as AgentTaskStatus, f as BackendErrorDetail, i as AgentExecutionBackend, x as RuntimeStreamEvent } from "./types-C9j4qg6l.js";
|
|
2
2
|
import { n as AnalystRegistryLike } from "./types-CfGKhIuj.js";
|
|
3
3
|
import { C as MountRecorder, D as SelectionReceipt, E as SandboxClient, K as RuntimeHooks, 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-BevOjfTY.js";
|
|
4
|
-
import { B as Executor, H as ExecutorFactory, I as Agent,
|
|
4
|
+
import { $ as RootHandle, B as Executor, H as ExecutorFactory, I as Agent, K as NodeId, L as AgentSpec, Mt as TraceSource, R as Budget, U as ExecutorRegistry, Vt as WorkerProgress, X as ResultBlobStore, Z as ResumedKeyState, _t as PendingWait, at as SpawnJournal, bt as WaitProbeRegistry, dt as Supervisor, i as AgentEnvironmentProvider, it as SpawnEvent, lt as Spend, mt as UsageEvent, nt as Scope, o as AgentEnvironmentProviderRegistry, ot as SpawnOpts, pt as TreeView, rt as Settled, tt as Runtime, ut as SupervisedResult, w as ProviderExecutorOptions, z as DefaultVerdict, zt as ExecutorProgress } from "./environment-provider-D0NXc4Qz.js";
|
|
5
5
|
import { o as UiLens, r as UiFinding, s as CoderTask } from "./substrate-BcnuSHXm.js";
|
|
6
6
|
import { D as RuntimeTelemetryOptions, c as runLocalHarness, d as RouterConfig, i as LocalHarness, m as ToolSpec, n as CodexExecutionPolicy, r as CodexTokenUsage, x as ToolLoopCompactionOptions, y as ToolLoopChat } from "./local-harness-Dh8PJ0ot.js";
|
|
7
|
-
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, RankTestMethod, RunRecord, StreamingDetector, ToolSpan, ValidationError, buildTrajectory, computeFindingId as computeFindingId$1, makeFinding as makeFinding$1 } from "@tangle-network/agent-eval";
|
|
7
|
+
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";
|
|
8
8
|
import { DispatchFn, JudgeConfig, ProfileDispatchFn, RunProfileMatrixOptions, RunProfileMatrixResult, Scenario } from "@tangle-network/agent-eval/campaign";
|
|
9
9
|
import { AgentProfile as AgentProfile$1, AgentProfile as AgentProfile$2, AgentProfile as AgentProfile$3, AgentProfileMcpServer, AgentProfileSecurityPolicy } from "@tangle-network/agent-interface";
|
|
10
10
|
import { WorkspacePlanReceipt } from "@tangle-network/agent-profile-materialize";
|
|
@@ -2532,6 +2532,13 @@ interface CoordinationToolsOptions {
|
|
|
2532
2532
|
* killed or retried. Omit = the runtime default.
|
|
2533
2533
|
*/
|
|
2534
2534
|
readonly stallAfterMs?: number;
|
|
2535
|
+
/**
|
|
2536
|
+
* Questions carried over from a prior process of the SAME run (a durable coordination log a
|
|
2537
|
+
* resuming caller replays). Seeded into the question ledger verbatim — `list_questions` shows
|
|
2538
|
+
* them, the stop policy counts the still-blocking ones, and `answer_question` can decide them.
|
|
2539
|
+
* Omit/empty = fresh ledger (every run that is not a resume).
|
|
2540
|
+
*/
|
|
2541
|
+
readonly priorQuestions?: ReadonlyArray<QuestionRecord>;
|
|
2535
2542
|
}
|
|
2536
2543
|
/** Online-detector wiring for spawned workers (`CoordinationToolsOptions.watchWorkers`). */
|
|
2537
2544
|
interface WorkerWatchOptions {
|
|
@@ -3883,7 +3890,7 @@ interface ObserveOptions {
|
|
|
3883
3890
|
/** The default observer instruction — exported so an optimizer can seed its population. */
|
|
3884
3891
|
declare const defaultAnalystInstruction: string;
|
|
3885
3892
|
interface Observation {
|
|
3886
|
-
findings:
|
|
3893
|
+
findings: ProposalFinding[];
|
|
3887
3894
|
/** Facts persisted to the corpus (empty when no corpus was supplied). */
|
|
3888
3895
|
learned: CorpusRecord[];
|
|
3889
3896
|
/** Operator-facing markdown: what the observer noticed + what to change. */
|
|
@@ -6174,6 +6181,98 @@ declare function spendFromUsageEvents(events: UsageEvent[]): Spend;
|
|
|
6174
6181
|
*/
|
|
6175
6182
|
declare function createBudgetPool(root: Budget, now?: () => number): BudgetPool;
|
|
6176
6183
|
//#endregion
|
|
6184
|
+
//#region src/runtime/supervise/coordination-log.d.ts
|
|
6185
|
+
/** What a prior process's coordination log replays into a resumed driver. */
|
|
6186
|
+
interface PriorCoordination {
|
|
6187
|
+
/** Every question the prior process raised, with answer-status folded in, raise order. */
|
|
6188
|
+
readonly questions: ReadonlyArray<QuestionRecord>;
|
|
6189
|
+
/** Every analyst finding the prior process published, publish order. */
|
|
6190
|
+
readonly findings: ReadonlyArray<AnalystFindingEvent>;
|
|
6191
|
+
}
|
|
6192
|
+
/** The durable coordination side-log seam. `append` records one bus event (kinds it does not
|
|
6193
|
+
* persist are ignored); `load` replays a run's prior records folded into `PriorCoordination`. */
|
|
6194
|
+
interface CoordinationLog {
|
|
6195
|
+
append(runId: string, event: CoordinationEvent, at: string): Promise<void>;
|
|
6196
|
+
load(runId: string): Promise<PriorCoordination>;
|
|
6197
|
+
}
|
|
6198
|
+
/** FS-backed `CoordinationLog`: append-only JSONL, fsynced per record. */
|
|
6199
|
+
declare class FileCoordinationLog implements CoordinationLog {
|
|
6200
|
+
private readonly path;
|
|
6201
|
+
constructor(path: string);
|
|
6202
|
+
append(runId: string, event: CoordinationEvent, at: string): Promise<void>;
|
|
6203
|
+
load(runId: string): Promise<PriorCoordination>;
|
|
6204
|
+
}
|
|
6205
|
+
//#endregion
|
|
6206
|
+
//#region src/runtime/supervise/finalizer.d.ts
|
|
6207
|
+
/** One settled worker as the finalizer sees it — the ledger row (structural fields only). */
|
|
6208
|
+
interface FinalizerSettled {
|
|
6209
|
+
readonly id: string;
|
|
6210
|
+
readonly status: 'done' | 'down';
|
|
6211
|
+
readonly score?: number;
|
|
6212
|
+
readonly valid?: boolean;
|
|
6213
|
+
readonly outRef?: string;
|
|
6214
|
+
readonly reason?: string;
|
|
6215
|
+
}
|
|
6216
|
+
/** One DELIVERED child, materialized: settled `done`, oracle-passed, output rehydrated. `out` is
|
|
6217
|
+
* `undefined` only when the child settled without an `outRef` (no artifact to rehydrate). */
|
|
6218
|
+
interface DeliveredOutput {
|
|
6219
|
+
readonly id: string;
|
|
6220
|
+
readonly score?: number;
|
|
6221
|
+
readonly outRef?: string;
|
|
6222
|
+
readonly out?: unknown;
|
|
6223
|
+
}
|
|
6224
|
+
/** What a finalizer gets to decide with. `delivered` is the ONLY output material; `allSettled`
|
|
6225
|
+
* and `tree` are metadata (record a disagreement, count the downs); `blobs` re-reads delivered
|
|
6226
|
+
* artifacts only; `budget` is the conserved-pool readout at finalize time. */
|
|
6227
|
+
interface FinalizeContext {
|
|
6228
|
+
readonly delivered: ReadonlyArray<DeliveredOutput>;
|
|
6229
|
+
readonly allSettled: ReadonlyArray<FinalizerSettled>;
|
|
6230
|
+
readonly tree: TreeView;
|
|
6231
|
+
readonly blobs: Pick<ResultBlobStore, 'get'>;
|
|
6232
|
+
readonly budget: Scope<unknown>['budget'];
|
|
6233
|
+
}
|
|
6234
|
+
/** The finalization seam: ledger in, output (or `undefined` = nothing deliverable) out. */
|
|
6235
|
+
type SupervisorFinalizer = (ctx: FinalizeContext) => Promise<unknown | undefined> | unknown | undefined;
|
|
6236
|
+
/**
|
|
6237
|
+
* The tree that describes the WHOLE run: this process's live nodes plus, on a resumed run, the
|
|
6238
|
+
* committed nodes of the prior process(es). Node ids are assigned by the journal and unique across
|
|
6239
|
+
* processes, so the union needs no reconciliation. `inFlight`/`waiting` stay the LIVE counts — a
|
|
6240
|
+
* prior process's in-flight node died with it and is not in flight now.
|
|
6241
|
+
*
|
|
6242
|
+
* Without this, a resumed run reports spend for work whose nodes are missing from its own tree.
|
|
6243
|
+
* On a run that never resumed there is nothing to merge and the live view is returned unchanged.
|
|
6244
|
+
*/
|
|
6245
|
+
declare function runTree(scope: Pick<Scope<unknown>, 'view' | 'resume'>): TreeView;
|
|
6246
|
+
/** The single argmax both the default finalizer and `finalizeBestDelivered` share: highest
|
|
6247
|
+
* score wins, missing scores count 0, ties keep the earliest ledger entry. */
|
|
6248
|
+
declare function pickBestDelivered<T extends {
|
|
6249
|
+
readonly score?: number;
|
|
6250
|
+
}>(delivered: ReadonlyArray<T>): T | undefined;
|
|
6251
|
+
/** Keep-best under the completion oracle — the DEFAULT finalizer and the exact behavior every
|
|
6252
|
+
* existing caller had: the highest-scoring delivered child's output, `undefined` when nothing
|
|
6253
|
+
* delivered (or the best delivered child carries no artifact). */
|
|
6254
|
+
declare const bestDelivered: SupervisorFinalizer;
|
|
6255
|
+
/**
|
|
6256
|
+
* Every verified distinct output, highest score first — the shape for competing hypotheses, a
|
|
6257
|
+
* Pareto front, or a recorded evaluator split (three judges 2:1 → both outputs survive, with
|
|
6258
|
+
* provenance, instead of the minority report being erased). Distinct by `outRef` (content
|
|
6259
|
+
* address), so identical outputs collapse to one entry. `undefined` when nothing delivered —
|
|
6260
|
+
* an empty collection is a no-winner, not a winner wrapping `[]`.
|
|
6261
|
+
*/
|
|
6262
|
+
declare const collectDelivered: SupervisorFinalizer;
|
|
6263
|
+
/**
|
|
6264
|
+
* Run a finalizer over a settled-worker ledger under the delivered-only invariant: filter the
|
|
6265
|
+
* ledger to structurally delivered children, materialize their outputs, and hand the finalizer a
|
|
6266
|
+
* blob reader that throws on any ref outside that set. This is the one call site both driver arms
|
|
6267
|
+
* (the in-process tool-loop and the MCP-mounted harness) finalize through.
|
|
6268
|
+
*/
|
|
6269
|
+
declare function runFinalizer(finalizer: SupervisorFinalizer, args: {
|
|
6270
|
+
readonly settled: ReadonlyArray<FinalizerSettled>;
|
|
6271
|
+
readonly blobs: ResultBlobStore;
|
|
6272
|
+
readonly tree: TreeView;
|
|
6273
|
+
readonly budget: Scope<unknown>['budget'];
|
|
6274
|
+
}): Promise<unknown | undefined>;
|
|
6275
|
+
//#endregion
|
|
6177
6276
|
//#region src/runtime/supervise/stop-rules.d.ts
|
|
6178
6277
|
/** One settled unit of work, reduced to what a stop rule reads. `objective` is the run's own
|
|
6179
6278
|
* quality signal (a verdict score, a test pass-rate, a judge rating); `undefined` = this
|
|
@@ -6401,6 +6500,18 @@ interface DriverAgentOptions {
|
|
|
6401
6500
|
* off (no behavior change). `distill` defaults to a self-summary authored by the brain combined
|
|
6402
6501
|
* with the factual settled-worker roster; override to supply your own. */
|
|
6403
6502
|
readonly compaction?: ToolLoopCompactionOptions;
|
|
6503
|
+
/** Pass-through subscriber for every coordination bus event (settled / question / finding /
|
|
6504
|
+
* steer / answer) — what a durable caller hooks its coordination log onto. Omit = no observer. */
|
|
6505
|
+
readonly onEvent?: (event: CoordinationEvent) => void | Promise<void>;
|
|
6506
|
+
/** Questions + findings a durable coordination log replayed from a prior process of this run.
|
|
6507
|
+
* Questions seed the ledger (`list_questions`, blocking-stop policy); both feed the resume
|
|
6508
|
+
* brief. Omit = fresh (every run that is not a resume). */
|
|
6509
|
+
readonly priorCoordination?: PriorCoordination;
|
|
6510
|
+
/** How the settled-worker ledger becomes the run's output. Default `bestDelivered` — the single
|
|
6511
|
+
* highest-scoring DELIVERED child (the exact keep-best every existing caller had). Runs under
|
|
6512
|
+
* the delivered-only invariant (`runFinalizer`): whatever the finalizer, an undelivered or
|
|
6513
|
+
* invalid child's output stays unreachable. */
|
|
6514
|
+
readonly finalizer?: SupervisorFinalizer;
|
|
6404
6515
|
}
|
|
6405
6516
|
/**
|
|
6406
6517
|
* Build the intelligent recursive driver. Its `act` is the LLM tool-loop; spawn it as a
|
|
@@ -6412,7 +6523,8 @@ declare function driverAgent(opts: DriverAgentOptions): Agent<unknown, unknown>;
|
|
|
6412
6523
|
* child delivered — an honest "the driver produced nothing", never a high-scoring result that
|
|
6413
6524
|
* ran without passing its check (Foreman's 0/18 lesson). `valid` is the single delivery signal,
|
|
6414
6525
|
* matching `defaultSelectWinner`'s valid-first rule; the oracle just doesn't fall back to an
|
|
6415
|
-
* unchecked best-effort.
|
|
6526
|
+
* unchecked best-effort. The same argmax as the `bestDelivered` finalizer (`pickBestDelivered`);
|
|
6527
|
+
* this direct form serves callers that hold a bare ledger + blob store. */
|
|
6416
6528
|
declare function finalizeBestDelivered(settled: ReadonlyArray<{
|
|
6417
6529
|
status: string;
|
|
6418
6530
|
score?: number;
|
|
@@ -6426,12 +6538,7 @@ interface CoordinationMcpHandle {
|
|
|
6426
6538
|
readonly url: string;
|
|
6427
6539
|
readonly port: number;
|
|
6428
6540
|
/** The coordination tools' settled-worker ledger (for the driver's finalize). */
|
|
6429
|
-
settled(): ReadonlyArray<
|
|
6430
|
-
status: string;
|
|
6431
|
-
score?: number;
|
|
6432
|
-
valid?: boolean;
|
|
6433
|
-
outRef?: string;
|
|
6434
|
-
}>;
|
|
6541
|
+
settled(): ReadonlyArray<SettledWorker>;
|
|
6435
6542
|
/** Post-loop drain of already-settled, unpulled children into the ledger — call before reading
|
|
6436
6543
|
* `settled()` for a finalize, so a delivered child the harness never awaited is not lost. */
|
|
6437
6544
|
drainResolved: CoordinationTools['drainResolved'];
|
|
@@ -6471,6 +6578,8 @@ declare function serveCoordinationMcp(opts: {
|
|
|
6471
6578
|
/** Pass-through subscriber for every bus event (settled / question / finding). */
|
|
6472
6579
|
onEvent?: (event: CoordinationEvent) => void | Promise<void>;
|
|
6473
6580
|
questionPolicy?: QuestionPolicy;
|
|
6581
|
+
/** Questions replayed from a prior process of this run — seeds the question ledger. */
|
|
6582
|
+
priorQuestions?: ReadonlyArray<QuestionRecord>;
|
|
6474
6583
|
}): Promise<CoordinationMcpHandle>;
|
|
6475
6584
|
//#endregion
|
|
6476
6585
|
//#region src/runtime/supervise/supervisor-agent.d.ts
|
|
@@ -6542,6 +6651,15 @@ interface SupervisorAgentDeps {
|
|
|
6542
6651
|
* distills its coordination transcript to a compact progress note once it exceeds the threshold,
|
|
6543
6652
|
* instead of re-billing the whole thing every turn. See `DriverAgentOptions.compaction`. */
|
|
6544
6653
|
readonly compaction?: ToolLoopCompactionOptions;
|
|
6654
|
+
/** Pass-through subscriber for every coordination bus event (both arms) — the seam a durable
|
|
6655
|
+
* caller hooks its coordination log onto. */
|
|
6656
|
+
readonly onEvent?: (event: CoordinationEvent) => void | Promise<void>;
|
|
6657
|
+
/** Questions + findings replayed from a prior process of this run (a durable coordination log).
|
|
6658
|
+
* Router arm: seeds the question ledger + the resume brief. Sandbox arm: seeds the ledger. */
|
|
6659
|
+
readonly priorCoordination?: PriorCoordination;
|
|
6660
|
+
/** How the settled ledger becomes the run's output (both arms). Default `bestDelivered` — the
|
|
6661
|
+
* exact keep-best every existing caller had. Always runs under the delivered-only invariant. */
|
|
6662
|
+
readonly finalizer?: SupervisorFinalizer;
|
|
6545
6663
|
}
|
|
6546
6664
|
/** Build a supervisor `Agent` from its profile: the brain resolves from `profile.harness` (backend-as-data), the same resolution rule as every worker. */
|
|
6547
6665
|
declare function supervisorAgent(profile: SupervisorProfile, deps: SupervisorAgentDeps): Agent<unknown, unknown>;
|
|
@@ -6814,6 +6932,13 @@ interface InMemoryRunContext {
|
|
|
6814
6932
|
* leaves it undefined: there is never a prior tree to resume, and the default stays fresh-run.
|
|
6815
6933
|
*/
|
|
6816
6934
|
readonly resume?: boolean;
|
|
6935
|
+
/**
|
|
6936
|
+
* Present only on a DURABLE context: the coordination side-log (questions + analyst findings —
|
|
6937
|
+
* the bus messages the spawn journal does not record). `supervise({ runDir })` appends to it as
|
|
6938
|
+
* they publish and replays it on resume, so a restarted coordinator keeps them. In-memory
|
|
6939
|
+
* contexts have none: nothing outlives the process to replay into.
|
|
6940
|
+
*/
|
|
6941
|
+
readonly coordinationLog?: CoordinationLog;
|
|
6817
6942
|
}
|
|
6818
6943
|
/** The stores a supervised run needs, in-memory or file-backed. `InMemoryRunContext` is the
|
|
6819
6944
|
* historical name for the same shape. */
|
|
@@ -6830,8 +6955,9 @@ declare function createInMemoryRunContext(opts?: InMemoryRunContextOptions): InM
|
|
|
6830
6955
|
* resumes when it is re-run with the SAME `runId` and the SAME `dir`: the committed children come
|
|
6831
6956
|
* back on `Scope.resume` (rehydrated by `replaySpawnTree`) instead of being re-executed.
|
|
6832
6957
|
*
|
|
6833
|
-
* Layout: `${dir}/spawn-journal.jsonl` (one JSONL record per event)
|
|
6834
|
-
* content-addressed JSON file per settled result)
|
|
6958
|
+
* Layout: `${dir}/spawn-journal.jsonl` (one JSONL record per event), `${dir}/blobs/` (one
|
|
6959
|
+
* content-addressed JSON file per settled result), and `${dir}/coordination-log.jsonl` (questions
|
|
6960
|
+
* + findings, replayed into a resumed driver). The directory is created on first write.
|
|
6835
6961
|
*
|
|
6836
6962
|
* Opt-in by construction — `createInMemoryRunContext()` is unchanged and stays the default, so no
|
|
6837
6963
|
* existing consumer writes to disk or resumes unless it asks for this.
|
|
@@ -6892,6 +7018,13 @@ interface ScopeArgs {
|
|
|
6892
7018
|
/** Waits journaled as armed but never woken — re-armed (same node id, same absolute deadline)
|
|
6893
7019
|
* when `wait` is called again with the SAME label. */
|
|
6894
7020
|
readonly waits: ReadonlyArray<PendingWait>;
|
|
7021
|
+
/** Keyed assignments from the prior journal — what a keyed re-spawn resolves against. */
|
|
7022
|
+
readonly keys: ReadonlyMap<string, ResumedKeyState<unknown>>;
|
|
7023
|
+
/** Prior committed spend summed off the journal (settled child work + metered inference). */
|
|
7024
|
+
readonly priorSpend: {
|
|
7025
|
+
readonly childWork: Spend;
|
|
7026
|
+
readonly driverInference: Spend;
|
|
7027
|
+
};
|
|
6895
7028
|
};
|
|
6896
7029
|
}
|
|
6897
7030
|
/** 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. */
|
|
@@ -6971,18 +7104,19 @@ interface SuperviseOptions {
|
|
|
6971
7104
|
/** Worker output store. Defaults to in-memory. */
|
|
6972
7105
|
readonly blobs?: ResultBlobStore;
|
|
6973
7106
|
/**
|
|
6974
|
-
* Make the run DURABLE: journal + result blobs are file-backed under
|
|
6975
|
-
* (`createFileRunContext`), fsynced per write, and the supervisor reads the prior
|
|
6976
|
-
* Re-running with the same `runDir` AND the same `runId` resumes
|
|
6977
|
-
*
|
|
6978
|
-
*
|
|
7107
|
+
* Make the run DURABLE: journal + result blobs + the coordination side-log are file-backed under
|
|
7108
|
+
* this directory (`createFileRunContext`), fsynced per write, and the supervisor reads the prior
|
|
7109
|
+
* tree first. Re-running with the same `runDir` AND the same `runId` resumes, and the built-in
|
|
7110
|
+
* driver is resume-AWARE out of the box: the children that already settled are replayed onto
|
|
7111
|
+
* `Scope.resume` (and into the driver's settled ledger + its first context), keyed assignments
|
|
7112
|
+
* (`spawn_agent`'s `key`) resolve to their committed results instead of re-running, pending
|
|
7113
|
+
* waits re-arm on their original deadlines, prior questions/findings replay from the
|
|
7114
|
+
* coordination log, and the finalize spans both processes' work. Unset = in-memory, fresh
|
|
7115
|
+
* every call.
|
|
6979
7116
|
*
|
|
6980
|
-
*
|
|
6981
|
-
*
|
|
6982
|
-
*
|
|
6983
|
-
* `Scope.resume`, so out of the box a resumed run re-spawns children it already paid for. Only a
|
|
6984
|
-
* root `Agent.act` that reads `scope.resume.settled` (as the durable-resume test's root does)
|
|
6985
|
-
* turns durability into work-skipping. Wiring that into the default brain is separate work.
|
|
7117
|
+
* The boundary that remains: work that was IN FLIGHT when the process died is not recovered —
|
|
7118
|
+
* the built-in executors cannot re-attach to a dead process's executions, so those assignments
|
|
7119
|
+
* resume as explicitly lost/in-doubt and re-run (reported, never silent).
|
|
6986
7120
|
*
|
|
6987
7121
|
* `runId` matters here: it defaults to the constant `'supervise'`, which is fine for a single
|
|
6988
7122
|
* resumable run per directory but collides across concurrent runs sharing one `runDir`.
|
|
@@ -7023,6 +7157,12 @@ interface SuperviseOptions {
|
|
|
7023
7157
|
* supervisor router model, the profile's model, and the backend's model — must be a member,
|
|
7024
7158
|
* or `supervise()` throws a `ConfigError` before any compute is spent. Unset = unrestricted. */
|
|
7025
7159
|
readonly allowedModels?: readonly string[];
|
|
7160
|
+
/** How the settled-worker ledger becomes the run's output. Default `bestDelivered` — the single
|
|
7161
|
+
* highest-scoring DELIVERED child (the exact behavior every existing caller had). Alternatives:
|
|
7162
|
+
* `collectDelivered` (every verified distinct output with provenance — a Pareto set / recorded
|
|
7163
|
+
* disagreement) or a custom `SupervisorFinalizer`. Whatever the finalizer, it operates on
|
|
7164
|
+
* structurally DELIVERED outputs only — an undelivered or invalid child stays ineligible. */
|
|
7165
|
+
readonly finalizer?: SupervisorFinalizer;
|
|
7026
7166
|
}
|
|
7027
7167
|
/** One-call supervisor: build + run a supervisor from its profile with sensible defaults; the raw `supervisorAgent` + `createSupervisor().run` seams stay available for power use. */
|
|
7028
7168
|
declare function supervise(profile: SupervisorProfile, task: unknown, opts: SuperviseOptions): Promise<SupervisedResult<unknown>>;
|
|
@@ -7228,5 +7368,5 @@ declare function runInWorkspace<T>(ws: Workspace, body: (cwd: string) => Promise
|
|
|
7228
7368
|
commitOnInvalid?: boolean;
|
|
7229
7369
|
}): Promise<WorkspaceRun<T>>;
|
|
7230
7370
|
//#endregion
|
|
7231
|
-
export { effectiveConcurrency as $, WidenDecision as $a, DetachedSessionRefParts as $c, mcpSecretEnvMetadataKey as $i, traceContextToEnv as $l, connectStdioMcp as $n, auditIntent as $o, createScopeAnalyst as $r, createExecutor as $s, StructuralRolloutMessage as $t, FileSpawnJournal as $u, createSupervisor as A, FlatWidenGate as Aa, McpToolDescriptor$1 as Ac, SurfaceScore as Ai, DelegateUiAuditConfig as Al, ReproductionCheck as An, completionAuthorizes as Ao, promotionGate as Ar, createCoordinationTools as As, sampleFromSettled as At, FileDelegationStore as Au, createFileRunContext as B, RenderCorpusToInstructions as Ba, DetachedSessionDelegateOptions as Bc, LoopDispatchOptions as Bi, DelegationResultPayload as Bl, strategyAuthorContract as Bn, PairwiseOptions as Bo, renderCorpusToInstructions as Br, DelegateResult as Bs, assessAuthoredProfile as Bt, RuntimeRunStateError as Bu, failuresAnalyst as C, EqualKOnCost as Ca, captureWorktreeDiff as Cc, ShotSpec as Ci, DelegateCodeResult as Cl, ChampionPolicy as Cn, LeaderboardScore as Co, probeSandboxCapabilities as Cr, QuestionLevel as Cs, StopRule as Ct, buildDelegationTraceSpans as Cu, worktreeFanout as D, FanoutOptions as Da, gateOnDeliverable as Dc, StrategyMessage as Di, DelegateResearchConfig as Dl, EvolutionCandidate as Dn, CompletionEvidence as Do, resolveSandboxClient as Dr, QuestionUrgency as Ds, createProgressTracker as Dt, DelegationPersistenceError as Du, WorktreeFanoutOptions as E, Fanout as Ea, DeliverableSpec as Ec, StrategyCtx as Ei, DelegateResearchArgs as El, EvolutionBandInfo as En, CompletionAnalyst as Eo, ResolveSandboxClientOptions as Er, QuestionRecord as Es, anyOf as Et, createDelegationTraceCollector as Eu, createScope as F, PanelJudge as Fa, eventToSnapshot as Fc, refine as Fi, DelegationHistoryArgs as Fl, selectChampion as Fn, GroupOf as Fo, registerShape as Fr, DELEGATE_DESCRIPTION as Fs, spendFromUsageEvents as Ft, BackendTransportError as Fu, WorktreePatchArtifact as G, SteerContext as Ga, detachedSessionDelegate as Gc, RunLoopOptions as Gi, FeedbackRefersTo as Gl, dumbDriver as Gn, pairwiseSignificance as Go, pipeline as Gr, CliWorktreeBridgeSeam as Gs, CheckExecChannel as Gt, BusStats as Gu, PatchDeliverableOptions as H, ScopeAnalyst as Ha, SettleDetachedCoderTurnOptions as Hc, loopCampaignDispatch as Hi, DelegationStatusArgs as Hl, DumbDriverOptions as Hn, ProfileKeyOf as Ho, flatWidenGate as Hr, validateDelegateArgs as Hs, defaultProfileRichnessThresholds as Ht, CoderOutput as Hu, settledToIteration as I, PanelSpec as Ia, CoderDelegate as Ic, runAgentic as Ii, DelegationHistoryEntry as Il, AuthorStrategyOptions as In, Interval as Io, definePersona as Ir, DELEGATE_INPUT_SCHEMA as Is, AuthoredProfile as It, ConfigError as Iu, ConcurrencyCaps as J, TrajectoryReportFn as Ja, FleetHandle as Jc, runLoop as Ji, UiAuditLensFilter as Jl, MaterializeLocalMcpOptions as Jn, renderLeaderboardSvg as Jo, widen as Jr, ProviderSeam as Js, CheckRunner as Jt, createEventBus as Ju, createWorktreeCliExecutor as K, TrajectoryNode as Ka, settleDetachedCoderTurn as Kc, defaultSelectWinner as Ki, ResearchOutputShape as Kl, naiveDriver as Kn, renderLeaderboardHtml as Ko, selectValidWinner as Kr, CliWorktreeSeam as Ks, CheckOutcome as Kt, EventBus as Ku, InMemoryRunContext as L, PanelVerdict as La, CoderReview as Lc, sample as Li, DelegationHistoryResult as Ll, AuthoredStrategy as Ln, Leaderboard as Lo, runPersonified as Lr, DELEGATE_TOOL_NAME as Ls, ProfileRichness as Lt, JudgeError as Lu, supervise as M, LoopUntilSpec as Ma, FeedbackEvent as Mc, breadthStrategy as Mi, DelegateUiAuditRoute as Ml, discriminatingMeans as Mn, sentinelCompletion as Mo, trajectoryReport as Mr, McpServerOptions as Ms, BudgetReadout as Mt, InMemoryDelegationStore as Mu, workerFromBackend as N, LoopUntilState as Na, FeedbackStore as Nc, defineStrategy as Ni, DelegationError as Nl, pickChampion as Nn, stopSentinel as No, builtinShapes as Nr, createInProcessTransport as Ns, ReservationTicket as Nt, AgentEvalError$1 as Nu, TrajectoryAnalysis as O, FanoutSynthesis as Oa, JsonRpcMessage as Oc, StrategyResult as Oi, DelegateResearchResult as Ol, EvolutionGeneration as On, CompletionPolicy as Oo, PromotionGateOptions as Or, SettledWorker as Os, noProgressFor as Ot, DelegationStateCorruptError as Ou, ScopeArgs as P, Panel as Pa, InMemoryFeedbackStore as Pc, depthStrategy as Pi, DelegationFeedbackSnapshot as Pl, runStrategyEvolution as Pn, AxisScoresOf as Po, createShapeRegistry as Pr, createMcpServer as Ps, createBudgetPool as Pt, AgentEvalErrorCode as Pu, RollingDispatchOptions as Q, Widen as Qa, createSiblingSandboxExecutor as Qc, envKeyProvider as Qi, readTraceContextFromEnv as Ql, StdioMcpServerSpec as Qn, IntentAudit as Qo, buildSteerContext as Qr, cliWorktreeExecutor as Qs, StructuralRolloutConfig as Qt, FileResultBlobStore as Qu, InMemoryRunContextOptions as R, Pipeline as Ra, CoderReviewer as Rc, sampleThenRefine as Ri, DelegationProfile as Rl, assertStrategyContract as Rn, LeaderboardOptions as Ro, FileCorpus as Rr, DelegateArgs as Rs, ProfileRichnessThresholds as Rt, NotFoundError as Ru, SurfaceWorkerOut as S, EqualKArm as Sa, WorktreeHandle as Sc, ShotPersona as Si, DelegateCodeConfig as Sl, ChampionPick as Sn, LeaderboardScenario as So, SandboxCapabilities as Sr, QuestionDecision as Ss, StopDecision as St, DelegationTraceSpan as Su, AuthoredHarness as T, EqualKVerdict as Ta, removeWorktree as Tc, StrategyArtifacts as Ti, DelegateFeedbackResult as Tl, EvolutionAuthor as Tn, defineLeaderboard as To, acquireSandbox as Tr, QuestionPolicy as Ts, allWorkersStalled as Tt, composeLoopTraceEmitters as Tu, patchDelivered as U, ScopeAnalyzeInput as Ua, UiAuditorDelegate as Uc, loopDispatch as Ui, DelegationStatusResult as Ul, NaiveDriverOptions as Un, ScoreOf as Uo, loopUntil as Ur, BridgeSeam as Us, profileRichnessFinding as Ut, BusEvent as Uu, createInMemoryRunContext as V, RenderCorpusToInstructionsOptions as Va, DetachedWinnerSelection as Vc, LoopOptionsForDispatch as Vi, DelegationStatus as Vl, ApplyContinuation as Vn, PairwiseVerdict as Vo, fanout as Vr, createDelegateHandler as Vs, authoredWorker as Vt, ValidationError as Vu, WorktreeCliExecutorOptions as W, ScopeWidenGate as Wa, coderTaskFromArgs as Wc, RunAgentRoundsOptions as Wi, FeedbackRating as Wl, SteeringDecision as Wn, leaderboard as Wo, panel as Wr, CliSeam as Ws, supervisorInstructions as Wt, BusRecord as Wu, DispatchStopReason as X, Verify as Xa, SiblingSandboxExecutorOptions as Xc, localSandboxClient as Xi, TraceContext as Xl, McpToolDescriptor as Xn, AuditIntentInput as Xo, RegistryAnalyzeProjection as Xr, RouterToolsSeam as Xs, CheckSourceCtx as Xt, defaultToolDetectors as Xu, DispatchReport as Y, TrajectoryReportOptions as Ya, FleetWorkspaceExecutorOptions as Yc, LocalSandboxClientOptions as Yi, UiAuditorDelegationOutput as Yl, McpSpawnFault as Yn, renderPairwiseMarkdown as Yo, CreateScopeAnalystOptions as Yr, RouterSeam as Ys, CheckSource as Yt, WatchTraceOptions as Yu, DispatchUnit as Z, VerifySpec as Za, createFleetWorkspaceExecutor as Zc, KeyProvider as Zi, createPropagatingTraceEmitter as Zl, StdioMcpConnection as Zn, AuditIntentOptions as Zo, assertTraceDerivedFindings as Zr, SandboxSeam as Zs, RepairStop as Zt, watchTrace as Zu, VerifierEnvironmentOptions as _, AssertTraceDerivedFindings as _a, CreateWorktreeOptions as _c, AgenticTask as _i, DelegationTaskQueueOptions as _l, AgentTurnUsage as _n, LeaderboardBenchTask as _o, extractLlmCallEvent as _r, CoordinationToolsOptions as _s, PlateauOptions as _t, CappedDelegationTrace as _u, SandboxInstance$1 as a, InProcessSandboxClientOptions as aa, createSteerableSandboxSession as ac, replaySpawnTree as ad, BenchmarkCell as ai, createDetachedTurnResumeDriver as al, composeCheckSources as an, LoopShape as ao, SandboxRun as ar, areaUnderCurve as as, delegate as at, LoopSpanNode as au, SuperviseSurfaceResult as b, CorpusFilter as ba, GitRunner as bc, CorpusReadbackOptions as bi, hashIdempotencyInput as bl, collectAgentTurn as bn, LeaderboardIterationInfo as bo, sumSandboxUsage as br, MakeWorkerAgent as bs, ProgressTrackerOptions as bt, DelegationTraceCaps as bu, GitWorkspaceOptions as c, HarvestFailure as ca, createInbox as cc, BenchmarkReport as ci, parseDetachedSessionRef as cl, filterAuthoredAsserts as cn, PersonaContext as co, openSandboxRun as cr, renderAnytimeTable as cs, SupervisorProfile as ct, OtelExporter as cu, WorkspaceCommit as d, Observation as da, piExecutor as dc, Environment as di, DelegationRecord as dl, resolveEntrySymbol as dn, RunPersonifiedOptions as do, SandboxLineage as dr, WaterfallSpan as ds, serveCoordinationMcp as dt, buildLoopOtelSpans as du, resolveSecretEnv as ea, createExecutorRegistry as ec, InMemoryResultBlobStore as ed, registryScopeAnalyst as ei, DetachedTurn as el, StructuralRolloutPolicy as en, WidenLineage as eo, materializeLocalMcp as er, defaultAuditorInstruction as es, freeSlots as et, EvalRunEvent as eu, WorkspaceRun as f, ObserveInput as fa, piSeamKey as fc, printBenchmarkReport as fi, DelegationResumeContext as fl, sandboxCheckRunner as fn, ShapeBudget as fo, SandboxLineageHandle as fr, createWaterfallCollector as fs, DriverAgentOptions as ft, buildLoopSpanNodes as fu, runInWorkspace as g, renderReport as ga, WorktreeProfileMaterializationReceipt as gc, AgenticSurface as gi, DelegationTaskQueue as gl, AgentTurnBackend as gn, LeaderboardBenchScore as go, createSandboxToolPartState as gr, CoordinationTools as gs, NoProgressForOptions as gt, loopEventToOtelSpan as gu, localShell as h, observe as ha, WorktreeHarnessResult as hc, AgenticRunResult as hi, DelegationRunContext as hl, visibleCheckScore as hn, DefinedLeaderboard as ho, SandboxToolPartState as hr, CoordinationEvent as hs, AllWorkersStalledOptions as ht, exportEvalRuns as hu, SandboxEvent$1 as i, InProcessPromptCtx as ia, SteerableSandboxSession as ic, pendingWaits as id, sanitizeMcpToolSchema as ii, RunDetachedTurnOptions as il, compareCheckOutcomes as in, DefinePersonaInput as io, OpenSandboxRunPromptOptions as ir, anytimeReport as is, defaultDelegateBudget as it, INTELLIGENCE_WIRE_VERSION as iu, SuperviseOptions as j, LoopUntil as ja, McpTransport as jc, adaptiveRefine as ji, DelegateUiAuditResult as jl, StrategyEvolutionConfig as jn, deterministicCompletion as jo, equalKOnCost as jr, McpServer as js, BudgetPool as jt, FileDelegationStoreOptions as ju, analyzeTrace as k, FanoutWinnerSelector as ka, JsonRpcResponse as kc, StrategyShotResult as ki, DelegateUiAuditArgs as kl, EvolutionReport as kn, CompletionVerdict as ko, PromotionVerdict as kr, WorkerWatchOptions as ks, plateau as kt, DelegationStore as ku, Shell as l, HarvestReport as la, PI_RUNTIME as lc, BenchmarkStrategySummary as li, runDetachedTurn as ll, modelAuthoredChecks as ln, PersonaExecutors as lo, CheckpointCapableBox as lr, WaterfallCollector as ls, supervisorAgent as lt, OtelSpan as lu, jjWorkspace as m, defaultAnalystInstruction as ma, WorktreeCommandResult as mc, AgenticOptions as mi, DelegationResumeTick as ml, structuralRollout as mn, ShapeRegistry as mo, createSandboxLineage as mr, AnalystRegistry as ms, finalizeBestDelivered as mt, createOtelExporter as mu, AnalystFinding$1 as n, inlineSandboxClient as na, SandboxSteeringOptions as nc, contentAddress as nd, McpEnvironmentOptions as ni, DriveTurnCapableBox as nl, VisibleCheck as nn, WinnerStrategy as no, OpenSandboxRunBeforeStartContext as nr, AnytimeStrategySummary as ns, rollingDispatch as nt, EvalRunsExportConfig as nu, computeFindingId$1 as o, inProcessSandboxClient as oa, Inbox as oc, BenchmarkConfig as oi, detachedTurnEvents as ol, defaultExtractCandidate as on, Outcome as oo, SandboxRunAbortError as or, bestSoFar as os, DriveHarness as ot, OtelAttribute as ou, gitWorkspace as p, ObserveOptions as pa, WorktreeCheckRunner as pc, runBenchmark as pi, DelegationResumeDriver as pl, selectBestIndex as pn, ShapeContext as po, SessionCapableBox as pr, AnalystFindingEvent as ps, driverAgent as pt, buildRuntimeEventOtelSpans as pu, assertModelAllowed as q, TrajectoryReport as qa, DelegationExecutor as qc, runAgentRounds as qi, ResearchSource as ql, LocalMcpMaterialization as qn, renderLeaderboardMarkdown as qo, verify as qr, ExecutorConfig as qs, CheckRunContext as qt, PublishOptions as qu, CreateSandboxOptions$1 as r, InProcessOnPrompt as ra, SteerableSandboxArgs as rc, materializeTreeView as rd, createMcpEnvironment as ri, DriveTurnTick as rl, canDisplace as rn, DefinePersona as ro, OpenSandboxRunOptions as rr, AnytimeTaskCurve as rs, DelegateOptions as rt, EvalRunsExportResult as ru, makeFinding$1 as s, HarvestCorpusOptions as sa, InboxMessage as sc, BenchmarkLift as si, formatDetachedSessionRef as sl, defaultStructuralRolloutPolicy as sn, Persona as so, TurnResult as sr, plateauLength as ss, SupervisorAgentDeps as st, OtelExportConfig as su, AgentProfile$2 as t, secretEnvOfMcpServer as ta, DEFAULT_SANDBOX_STEERING_MAX_TURNS as tc, InMemorySpawnJournal as td, McpEndpoint as ti, DetachedTurnResumeDriverOptions as tl, StructuralRolloutResult as tn, WidenSpec as to, Deliverable as tr, AnytimeReport as ts, queueOf as tt, EvalRunGeneration as tu, Workspace as u, harvestCorpus as ua, PiSeam as uc, BenchmarkTaskRow as ui, DelegationArgs as ul, officialChecksFromMeta as un, RunPersonified as uo, ForkCapableBox as ur, WaterfallReport as us, CoordinationMcpHandle as ut, RuntimeEventOtelOptions as uu, createVerifierEnvironment as v, CombinatorShape as va, DiffOptions as vc, AgenticTool as vi, SubmitInput as vl, CollectedAgentTurn as vn, LeaderboardBenchmarkAdapter as vo, mapSandboxEvent as vr, DEFAULT_AWAIT_EVENT_TIMEOUT_MS as vs, ProgressSample as vt, DELEGATION_TRACE_MAX_BYTES as vu, superviseSurface as w, EqualKOnCostOptions as wa, createWorktree as wc, Strategy as wi, DelegateFeedbackArgs as wl, EvolutionArchiveNode as wn, LeaderboardSpec as wo, AcquireOptions as wr, QuestionOption as ws, allOf as wt, capDelegationTrace as wu, SurfaceWorkerConfig as x, CorpusRecord as xa, RemoveWorktreeOptions as xc, RunAgenticOptions as xi, DelegateCodeArgs as xl, streamAgentTurn as xn, LeaderboardRunContext as xo, CriuCapableClient as xr, Question as xs, ProgressView as xt, DelegationTraceCollector as xu, SuperviseSurfaceOptions as y, Corpus as ya, DiffResult as yc, ArtifactHandle as yi, SubmitOutput as yl, StreamAgentTurnOptions as yn, LeaderboardFlagSpec as yo, mapSandboxToolEvent as yr, DownMessageEvent as ys, ProgressTracker as yt, DELEGATION_TRACE_MAX_SPANS as yu, RunContext as z, PipelineStage as za, DelegateRunCtx as zc, LoopCampaignDispatchOptions as zi, DelegationProgress as zl, authorStrategy as zn, LeaderboardRow as zo, InMemoryCorpus as zr, DelegateHandlerOptions as zs, asAuthoredProfile as zt, PlannerError as zu };
|
|
7232
|
-
//# sourceMappingURL=index-
|
|
7371
|
+
export { effectiveConcurrency as $, RenderCorpusToInstructionsOptions as $a, DetachedWinnerSelection as $c, LoopOptionsForDispatch as $i, DelegationStatus as $l, ApplyContinuation as $n, PairwiseVerdict as $o, fanout as $r, createDelegateHandler as $s, authoredWorker as $t, ValidationError as $u, createSupervisor as A, CombinatorShape as Aa, DiffOptions as Ac, AgenticTool as Ai, SubmitInput as Al, CollectedAgentTurn as An, LeaderboardBenchmarkAdapter as Ao, mapSandboxEvent as Ar, DEFAULT_AWAIT_EVENT_TIMEOUT_MS as As, sampleFromSettled as At, DELEGATION_TRACE_MAX_BYTES as Au, createFileRunContext as B, FanoutSynthesis as Ba, JsonRpcMessage as Bc, StrategyResult as Bi, DelegateResearchResult as Bl, EvolutionGeneration as Bn, CompletionPolicy as Bo, PromotionGateOptions as Br, SettledWorker as Bs, CoordinationLog as Bt, DelegationStateCorruptError as Bu, failuresAnalyst as C, Observation as Ca, piExecutor as Cc, Environment as Ci, DelegationRecord as Cl, resolveEntrySymbol as Cn, RunPersonifiedOptions as Co, SandboxLineage as Cr, WaterfallSpan as Cs, StopRule as Ct, buildLoopOtelSpans as Cu, worktreeFanout as D, observe as Da, WorktreeHarnessResult as Dc, AgenticRunResult as Di, DelegationRunContext as Dl, visibleCheckScore as Dn, DefinedLeaderboard as Do, SandboxToolPartState as Dr, CoordinationEvent as Ds, createProgressTracker as Dt, exportEvalRuns as Du, WorktreeFanoutOptions as E, defaultAnalystInstruction as Ea, WorktreeCommandResult as Ec, AgenticOptions as Ei, DelegationResumeTick as El, structuralRollout as En, ShapeRegistry as Eo, createSandboxLineage as Er, AnalystRegistry as Es, anyOf as Et, createOtelExporter as Eu, createScope as F, EqualKOnCost as Fa, captureWorktreeDiff as Fc, ShotSpec as Fi, DelegateCodeResult as Fl, ChampionPolicy as Fn, LeaderboardScore as Fo, probeSandboxCapabilities as Fr, QuestionLevel as Fs, bestDelivered as Ft, buildDelegationTraceSpans as Fu, WorktreePatchArtifact as G, LoopUntilState as Ga, FeedbackStore as Gc, defineStrategy as Gi, DelegationError as Gl, pickChampion as Gn, stopSentinel as Go, builtinShapes as Gr, createInProcessTransport as Gs, ReservationTicket as Gt, AgentEvalError$1 as Gu, PatchDeliverableOptions as H, FlatWidenGate as Ha, McpToolDescriptor$1 as Hc, SurfaceScore as Hi, DelegateUiAuditConfig as Hl, ReproductionCheck as Hn, completionAuthorizes as Ho, promotionGate as Hr, createCoordinationTools as Hs, PriorCoordination as Ht, FileDelegationStore as Hu, settledToIteration as I, EqualKOnCostOptions as Ia, createWorktree as Ic, Strategy as Ii, DelegateFeedbackArgs as Il, EvolutionArchiveNode as In, LeaderboardSpec as Io, AcquireOptions as Ir, QuestionOption as Is, collectDelivered as It, capDelegationTrace as Iu, ConcurrencyCaps as J, PanelSpec as Ja, CoderDelegate as Jc, runAgentic as Ji, DelegationHistoryEntry as Jl, AuthorStrategyOptions as Jn, Interval as Jo, definePersona as Jr, DELEGATE_INPUT_SCHEMA as Js, AuthoredProfile as Jt, ConfigError as Ju, createWorktreeCliExecutor as K, Panel as Ka, InMemoryFeedbackStore as Kc, depthStrategy as Ki, DelegationFeedbackSnapshot as Kl, runStrategyEvolution as Kn, AxisScoresOf as Ko, createShapeRegistry as Kr, createMcpServer as Ks, createBudgetPool as Kt, AgentEvalErrorCode as Ku, InMemoryRunContext as L, EqualKVerdict as La, removeWorktree as Lc, StrategyArtifacts as Li, DelegateFeedbackResult as Ll, EvolutionAuthor as Ln, defineLeaderboard as Lo, acquireSandbox as Lr, QuestionPolicy as Ls, pickBestDelivered as Lt, composeLoopTraceEmitters as Lu, supervise as M, CorpusFilter as Ma, GitRunner as Mc, CorpusReadbackOptions as Mi, hashIdempotencyInput as Ml, collectAgentTurn as Mn, LeaderboardIterationInfo as Mo, sumSandboxUsage as Mr, MakeWorkerAgent as Ms, FinalizeContext as Mt, DelegationTraceCaps as Mu, workerFromBackend as N, CorpusRecord as Na, RemoveWorktreeOptions as Nc, RunAgenticOptions as Ni, DelegateCodeArgs as Nl, streamAgentTurn as Nn, LeaderboardRunContext as No, CriuCapableClient as Nr, Question as Ns, FinalizerSettled as Nt, DelegationTraceCollector as Nu, TrajectoryAnalysis as O, renderReport as Oa, WorktreeProfileMaterializationReceipt as Oc, AgenticSurface as Oi, DelegationTaskQueue as Ol, AgentTurnBackend as On, LeaderboardBenchScore as Oo, createSandboxToolPartState as Or, CoordinationTools as Os, noProgressFor as Ot, loopEventToOtelSpan as Ou, ScopeArgs as P, EqualKArm as Pa, WorktreeHandle as Pc, ShotPersona as Pi, DelegateCodeConfig as Pl, ChampionPick as Pn, LeaderboardScenario as Po, SandboxCapabilities as Pr, QuestionDecision as Ps, SupervisorFinalizer as Pt, DelegationTraceSpan as Pu, RollingDispatchOptions as Q, RenderCorpusToInstructions as Qa, DetachedSessionDelegateOptions as Qc, LoopDispatchOptions as Qi, DelegationResultPayload as Ql, strategyAuthorContract as Qn, PairwiseOptions as Qo, renderCorpusToInstructions as Qr, DelegateResult as Qs, assessAuthoredProfile as Qt, RuntimeRunStateError as Qu, InMemoryRunContextOptions as R, Fanout as Ra, DeliverableSpec as Rc, StrategyCtx as Ri, DelegateResearchArgs as Rl, EvolutionBandInfo as Rn, CompletionAnalyst as Ro, ResolveSandboxClientOptions as Rr, QuestionRecord as Rs, runFinalizer as Rt, createDelegationTraceCollector as Ru, SurfaceWorkerOut as S, harvestCorpus as Sa, PiSeam as Sc, BenchmarkTaskRow as Si, DelegationArgs as Sl, officialChecksFromMeta as Sn, RunPersonified as So, ForkCapableBox as Sr, WaterfallReport as Ss, StopDecision as St, RuntimeEventOtelOptions as Su, AuthoredHarness as T, ObserveOptions as Ta, WorktreeCheckRunner as Tc, runBenchmark as Ti, DelegationResumeDriver as Tl, selectBestIndex as Tn, ShapeContext as To, SessionCapableBox as Tr, AnalystFindingEvent as Ts, allWorkersStalled as Tt, buildRuntimeEventOtelSpans as Tu, patchDelivered as U, LoopUntil as Ua, McpTransport as Uc, adaptiveRefine as Ui, DelegateUiAuditResult as Ul, StrategyEvolutionConfig as Un, deterministicCompletion as Uo, equalKOnCost as Ur, McpServer as Us, BudgetPool as Ut, FileDelegationStoreOptions as Uu, createInMemoryRunContext as V, FanoutWinnerSelector as Va, JsonRpcResponse as Vc, StrategyShotResult as Vi, DelegateUiAuditArgs as Vl, EvolutionReport as Vn, CompletionVerdict as Vo, PromotionVerdict as Vr, WorkerWatchOptions as Vs, FileCoordinationLog as Vt, DelegationStore as Vu, WorktreeCliExecutorOptions as W, LoopUntilSpec as Wa, FeedbackEvent as Wc, breadthStrategy as Wi, DelegateUiAuditRoute as Wl, discriminatingMeans as Wn, sentinelCompletion as Wo, trajectoryReport as Wr, McpServerOptions as Ws, BudgetReadout as Wt, InMemoryDelegationStore as Wu, DispatchStopReason as X, Pipeline as Xa, CoderReviewer as Xc, sampleThenRefine as Xi, DelegationProfile as Xl, assertStrategyContract as Xn, LeaderboardOptions as Xo, FileCorpus as Xr, DelegateArgs as Xs, ProfileRichnessThresholds as Xt, NotFoundError as Xu, DispatchReport as Y, PanelVerdict as Ya, CoderReview as Yc, sample as Yi, DelegationHistoryResult as Yl, AuthoredStrategy as Yn, Leaderboard as Yo, runPersonified as Yr, DELEGATE_TOOL_NAME as Ys, ProfileRichness as Yt, JudgeError as Yu, DispatchUnit as Z, PipelineStage as Za, DelegateRunCtx as Zc, LoopCampaignDispatchOptions as Zi, DelegationProgress as Zl, authorStrategy as Zn, LeaderboardRow as Zo, InMemoryCorpus as Zr, DelegateHandlerOptions as Zs, asAuthoredProfile as Zt, PlannerError as Zu, VerifierEnvironmentOptions as _, InProcessSandboxClientOptions as _a, createSteerableSandboxSession as _c, replaySpawnTree as _d, BenchmarkCell as _i, createDetachedTurnResumeDriver as _l, composeCheckSources as _n, LoopShape as _o, SandboxRun as _r, areaUnderCurve as _s, PlateauOptions as _t, LoopSpanNode as _u, SandboxInstance$1 as a, runAgentRounds as aa, ExecutorConfig as ac, PublishOptions as ad, verify as ai, DelegationExecutor as al, CheckRunContext as an, TrajectoryReport as ao, LocalMcpMaterialization as ar, renderLeaderboardMarkdown as as, delegate as at, ResearchSource as au, SuperviseSurfaceResult as b, HarvestFailure as ba, createInbox as bc, BenchmarkReport as bi, parseDetachedSessionRef as bl, filterAuthoredAsserts as bn, PersonaContext as bo, openSandboxRun as br, renderAnytimeTable as bs, ProgressTrackerOptions as bt, OtelExporter as bu, GitWorkspaceOptions as c, localSandboxClient as ca, RouterToolsSeam as cc, defaultToolDetectors as cd, RegistryAnalyzeProjection as ci, SiblingSandboxExecutorOptions as cl, CheckSourceCtx as cn, Verify as co, McpToolDescriptor as cr, AuditIntentInput as cs, SupervisorProfile as ct, TraceContext as cu, WorkspaceCommit as d, mcpSecretEnvMetadataKey as da, createExecutor as dc, FileSpawnJournal as dd, createScopeAnalyst as di, DetachedSessionRefParts as dl, StructuralRolloutMessage as dn, WidenDecision as do, connectStdioMcp as dr, auditIntent as ds, serveCoordinationMcp as dt, traceContextToEnv as du, loopCampaignDispatch as ea, validateDelegateArgs as ec, CoderOutput as ed, flatWidenGate as ei, SettleDetachedCoderTurnOptions as el, defaultProfileRichnessThresholds as en, ScopeAnalyst as eo, DumbDriverOptions as er, ProfileKeyOf as es, freeSlots as et, DelegationStatusArgs as eu, WorkspaceRun as f, resolveSecretEnv as fa, createExecutorRegistry as fc, InMemoryResultBlobStore as fd, registryScopeAnalyst as fi, DetachedTurn as fl, StructuralRolloutPolicy as fn, WidenLineage as fo, materializeLocalMcp as fr, defaultAuditorInstruction as fs, DriverAgentOptions as ft, EvalRunEvent as fu, runInWorkspace as g, InProcessPromptCtx as ga, SteerableSandboxSession as gc, pendingWaits as gd, sanitizeMcpToolSchema as gi, RunDetachedTurnOptions as gl, compareCheckOutcomes as gn, DefinePersonaInput as go, OpenSandboxRunPromptOptions as gr, anytimeReport as gs, NoProgressForOptions as gt, INTELLIGENCE_WIRE_VERSION as gu, localShell as h, InProcessOnPrompt as ha, SteerableSandboxArgs as hc, materializeTreeView as hd, createMcpEnvironment as hi, DriveTurnTick as hl, canDisplace as hn, DefinePersona as ho, OpenSandboxRunOptions as hr, AnytimeTaskCurve as hs, AllWorkersStalledOptions as ht, EvalRunsExportResult as hu, SandboxEvent$1 as i, defaultSelectWinner as ia, CliWorktreeSeam as ic, EventBus as id, selectValidWinner as ii, settleDetachedCoderTurn as il, CheckOutcome as in, TrajectoryNode as io, naiveDriver as ir, renderLeaderboardHtml as is, defaultDelegateBudget as it, ResearchOutputShape as iu, SuperviseOptions as j, Corpus as ja, DiffResult as jc, ArtifactHandle as ji, SubmitOutput as jl, StreamAgentTurnOptions as jn, LeaderboardFlagSpec as jo, mapSandboxToolEvent as jr, DownMessageEvent as js, DeliveredOutput as jt, DELEGATION_TRACE_MAX_SPANS as ju, analyzeTrace as k, AssertTraceDerivedFindings as ka, CreateWorktreeOptions as kc, AgenticTask as ki, DelegationTaskQueueOptions as kl, AgentTurnUsage as kn, LeaderboardBenchTask as ko, extractLlmCallEvent as kr, CoordinationToolsOptions as ks, plateau as kt, CappedDelegationTrace as ku, Shell as l, KeyProvider as la, SandboxSeam as lc, watchTrace as ld, assertTraceDerivedFindings as li, createFleetWorkspaceExecutor as ll, RepairStop as ln, VerifySpec as lo, StdioMcpConnection as lr, AuditIntentOptions as ls, supervisorAgent as lt, createPropagatingTraceEmitter as lu, jjWorkspace as m, inlineSandboxClient as ma, SandboxSteeringOptions as mc, contentAddress as md, McpEnvironmentOptions as mi, DriveTurnCapableBox as ml, VisibleCheck as mn, WinnerStrategy as mo, OpenSandboxRunBeforeStartContext as mr, AnytimeStrategySummary as ms, finalizeBestDelivered as mt, EvalRunsExportConfig as mu, AnalystFinding$1 as n, RunAgentRoundsOptions as na, CliSeam as nc, BusRecord as nd, panel as ni, coderTaskFromArgs as nl, supervisorInstructions as nn, ScopeWidenGate as no, SteeringDecision as nr, leaderboard as ns, rollingDispatch as nt, FeedbackRating as nu, computeFindingId$1 as o, runLoop as oa, ProviderSeam as oc, createEventBus as od, widen as oi, FleetHandle as ol, CheckRunner as on, TrajectoryReportFn as oo, MaterializeLocalMcpOptions as or, renderLeaderboardSvg as os, DriveHarness as ot, UiAuditLensFilter as ou, gitWorkspace as p, secretEnvOfMcpServer as pa, DEFAULT_SANDBOX_STEERING_MAX_TURNS as pc, InMemorySpawnJournal as pd, McpEndpoint as pi, DetachedTurnResumeDriverOptions as pl, StructuralRolloutResult as pn, WidenSpec as po, Deliverable as pr, AnytimeReport as ps, driverAgent as pt, EvalRunGeneration as pu, assertModelAllowed as q, PanelJudge as qa, eventToSnapshot as qc, refine as qi, DelegationHistoryArgs as ql, selectChampion as qn, GroupOf as qo, registerShape as qr, DELEGATE_DESCRIPTION as qs, spendFromUsageEvents as qt, BackendTransportError as qu, CreateSandboxOptions$1 as r, RunLoopOptions as ra, CliWorktreeBridgeSeam as rc, BusStats as rd, pipeline as ri, detachedSessionDelegate as rl, CheckExecChannel as rn, SteerContext as ro, dumbDriver as rr, pairwiseSignificance as rs, DelegateOptions as rt, FeedbackRefersTo as ru, makeFinding$1 as s, LocalSandboxClientOptions as sa, RouterSeam as sc, WatchTraceOptions as sd, CreateScopeAnalystOptions as si, FleetWorkspaceExecutorOptions as sl, CheckSource as sn, TrajectoryReportOptions as so, McpSpawnFault as sr, renderPairwiseMarkdown as ss, SupervisorAgentDeps as st, UiAuditorDelegationOutput as su, AgentProfile$2 as t, loopDispatch as ta, BridgeSeam as tc, BusEvent as td, loopUntil as ti, UiAuditorDelegate as tl, profileRichnessFinding as tn, ScopeAnalyzeInput as to, NaiveDriverOptions as tr, ScoreOf as ts, queueOf as tt, DelegationStatusResult as tu, Workspace as u, envKeyProvider as ua, cliWorktreeExecutor as uc, FileResultBlobStore as ud, buildSteerContext as ui, createSiblingSandboxExecutor as ul, StructuralRolloutConfig as un, Widen as uo, StdioMcpServerSpec as ur, IntentAudit as us, CoordinationMcpHandle as ut, readTraceContextFromEnv as uu, createVerifierEnvironment as v, inProcessSandboxClient as va, Inbox as vc, BenchmarkConfig as vi, detachedTurnEvents as vl, defaultExtractCandidate as vn, Outcome as vo, SandboxRunAbortError as vr, bestSoFar as vs, ProgressSample as vt, OtelAttribute as vu, superviseSurface as w, ObserveInput as wa, piSeamKey as wc, printBenchmarkReport as wi, DelegationResumeContext as wl, sandboxCheckRunner as wn, ShapeBudget as wo, SandboxLineageHandle as wr, createWaterfallCollector as ws, allOf as wt, buildLoopSpanNodes as wu, SurfaceWorkerConfig as x, HarvestReport as xa, PI_RUNTIME as xc, BenchmarkStrategySummary as xi, runDetachedTurn as xl, modelAuthoredChecks as xn, PersonaExecutors as xo, CheckpointCapableBox as xr, WaterfallCollector as xs, ProgressView as xt, OtelSpan as xu, SuperviseSurfaceOptions as y, HarvestCorpusOptions as ya, InboxMessage as yc, BenchmarkLift as yi, formatDetachedSessionRef as yl, defaultStructuralRolloutPolicy as yn, Persona as yo, TurnResult as yr, plateauLength as ys, ProgressTracker as yt, OtelExportConfig as yu, RunContext as z, FanoutOptions as za, gateOnDeliverable as zc, StrategyMessage as zi, DelegateResearchConfig as zl, EvolutionCandidate as zn, CompletionEvidence as zo, resolveSandboxClient as zr, QuestionUrgency as zs, runTree as zt, DelegationPersistenceError as zu };
|
|
7372
|
+
//# sourceMappingURL=index-BZbJWqoZ.d.ts.map
|
|
@@ -2,15 +2,15 @@ import { _ as RunAgentTaskOptions, b as RuntimeSessionStore, g as OpenAIChatTool
|
|
|
2
2
|
import { i as SurfaceImprovementEdit } from "./improvement-adapter-BaAdfJKT.js";
|
|
3
3
|
import { o as ImprovementProposalSource } from "./types-CfGKhIuj.js";
|
|
4
4
|
import { K as RuntimeHooks } from "./types-BevOjfTY.js";
|
|
5
|
-
import {
|
|
5
|
+
import { Ju as ConfigError, fn as StructuralRolloutPolicy } from "./index-BZbJWqoZ.js";
|
|
6
6
|
import { D as RuntimeTelemetryOptions, c as runLocalHarness, i as LocalHarness, y as ToolLoopChat } from "./local-harness-Dh8PJ0ot.js";
|
|
7
7
|
import "./index-C-FYUuFG.js";
|
|
8
8
|
import "./index-Efjb3nrQ.js";
|
|
9
|
-
import { H as CandidateGenerator, L as Verifier, a as ImproveCandidateValidationInput, j as ReadonlyAgentProfile, p as ImproveMethodFactory, t as Redactor } from "./redact-
|
|
10
|
-
import "./index-
|
|
11
|
-
import "./loop-runner-bin-
|
|
9
|
+
import { H as CandidateGenerator, L as Verifier, a as ImproveCandidateValidationInput, j as ReadonlyAgentProfile, p as ImproveMethodFactory, t as Redactor } from "./redact-BkasKlyd.js";
|
|
10
|
+
import "./index-cdkwHruJ.js";
|
|
11
|
+
import "./loop-runner-bin-9-JlGqN7.js";
|
|
12
12
|
import "./openai-tools-B68JaOCx.js";
|
|
13
|
-
import {
|
|
13
|
+
import { ControlBudget as ControlBudget$1, ControlDecision as ControlDecision$1, ControlEvalResult, ControlEvalResult as ControlEvalResult$1, ControlRunResult as ControlRunResult$1, ControlStep as ControlStep$1, DataAcquisitionPlan as DataAcquisitionPlan$1, KnowledgeReadinessReport, KnowledgeReadinessReport as KnowledgeReadinessReport$1, KnowledgeRequirement as KnowledgeRequirement$1, ProposalFinding, RunRecord, RunRecord as RunRecord$1 } from "@tangle-network/agent-eval";
|
|
14
14
|
import { GepaOptimizationMethodConfig, SkillOptOptimizationMethodConfig } from "@tangle-network/agent-eval/campaign";
|
|
15
15
|
import { AgentProfile as AgentProfile$1 } from "@tangle-network/agent-interface";
|
|
16
16
|
import { MutableSurface, Scenario as Scenario$1, SelfImproveOptions } from "@tangle-network/agent-eval/contract";
|
|
@@ -131,137 +131,13 @@ declare function createOpenAICompatibleBackend<TInput extends AgentBackendInput
|
|
|
131
131
|
retry?: BackendRetryPolicy;
|
|
132
132
|
}): AgentExecutionBackend<TInput>;
|
|
133
133
|
//#endregion
|
|
134
|
-
//#region src/durable/chat-engine.d.ts
|
|
135
|
-
/**
|
|
136
|
-
* `handleChatTurn` — framework-neutral chat-turn HTTP orchestrator.
|
|
137
|
-
* Owns the NDJSON `ChatStreamEvent` line protocol, the `session.run.*`
|
|
138
|
-
* lifecycle vocabulary, and the persist / post-process / trace-flush
|
|
139
|
-
* hook order. Returns a `ReadableStream` body the product hands to its
|
|
140
|
-
* platform `Response`.
|
|
141
|
-
*
|
|
142
|
-
* Execution durability is the substrate's concern: `box.streamPrompt`
|
|
143
|
-
* auto-reconnects in-call; cross-process reconnect via `X-Execution-ID`
|
|
144
|
-
* is the product's job. The producer this engine wraps already speaks
|
|
145
|
-
* that protocol — the engine just frames the events.
|
|
146
|
-
*
|
|
147
|
-
* Hooks (`ChatTurnHooks`):
|
|
148
|
-
* - `produce` — build the backend event stream
|
|
149
|
-
* - `persistAssistantMessage` — write the assistant turn to the product DB
|
|
150
|
-
* - `onTurnComplete?` — post-process (proposals, citations, …)
|
|
151
|
-
* - `onEvent?` — per-event side channel (e.g. DO broadcast)
|
|
152
|
-
* - `transformFinalText?` — pre-persist transform (e.g. PII redact)
|
|
153
|
-
* - `traceFlush?` — handed to waitUntil so OTLP export lands
|
|
154
|
-
*
|
|
155
|
-
* Framework neutrality: takes already-resolved values (`identity` tuple,
|
|
156
|
-
* a `waitUntil`), never a `Request` or a `Context`. The product's thin
|
|
157
|
-
* route adapter does auth + parse + access-control, then calls
|
|
158
|
-
* `handleChatTurn(...)` and returns `result.body` as its platform `Response`.
|
|
159
|
-
*/
|
|
160
|
-
/** The NDJSON line protocol every product chat client already speaks. */
|
|
161
|
-
interface ChatStreamEvent {
|
|
162
|
-
type: string;
|
|
163
|
-
data?: Record<string, unknown>;
|
|
164
|
-
}
|
|
165
|
-
/** Identity of a chat turn. `tenantId` is the workspace id for workspace-
|
|
166
|
-
* scoped products and the user id for session-scoped products. */
|
|
167
|
-
interface ChatTurnIdentity {
|
|
168
|
-
tenantId: string;
|
|
169
|
-
/** Thread / session id. */
|
|
170
|
-
sessionId: string;
|
|
171
|
-
userId: string;
|
|
172
|
-
/** Monotonic 0-based turn index within the session. */
|
|
173
|
-
turnIndex: number;
|
|
174
|
-
}
|
|
175
|
-
/** The live side of a turn — what the product's `produce` hook returns. */
|
|
176
|
-
interface ChatTurnProducer<TEvent extends ChatStreamEvent = ChatStreamEvent> {
|
|
177
|
-
/** The turn's event stream. Forwarded verbatim to the caller. */
|
|
178
|
-
stream: AsyncGenerator<TEvent, void, unknown>;
|
|
179
|
-
/** The turn's final assistant text. Read once, after `stream` drains. */
|
|
180
|
-
finalText(): string;
|
|
181
|
-
}
|
|
182
|
-
interface ChatTurnHooks {
|
|
183
|
-
/** Build the backend stream. The engine forwards events verbatim and
|
|
184
|
-
* reads `finalText()` once the stream drains. */
|
|
185
|
-
produce(): ChatTurnProducer;
|
|
186
|
-
/** Persist the assistant message to the product's own store. Called
|
|
187
|
-
* once, after drain, with the assembled (transform-applied) text. */
|
|
188
|
-
persistAssistantMessage(input: {
|
|
189
|
-
identity: ChatTurnIdentity;
|
|
190
|
-
finalText: string;
|
|
191
|
-
}): Promise<void>;
|
|
192
|
-
/** Optional post-processing (proposals, citations, credit metering …).
|
|
193
|
-
* Errors are swallowed + logged — post-process must never fail a turn
|
|
194
|
-
* that already streamed successfully. */
|
|
195
|
-
onTurnComplete?(input: {
|
|
196
|
-
identity: ChatTurnIdentity;
|
|
197
|
-
finalText: string;
|
|
198
|
-
}): Promise<void>;
|
|
199
|
-
/** Optional per-event side channel (e.g. DO broadcast). Runs for every
|
|
200
|
-
* emitted event, lifecycle envelope included. Errors swallowed — a
|
|
201
|
-
* broadcast failure must not break the chat stream. */
|
|
202
|
-
onEvent?(event: ChatStreamEvent): void | Promise<void>;
|
|
203
|
-
/** Optional pre-persist transform of the final text (e.g. PII
|
|
204
|
-
* redaction). Affects only what is persisted; the live stream is
|
|
205
|
-
* never altered. */
|
|
206
|
-
transformFinalText?(text: string): string | Promise<string>;
|
|
207
|
-
/** Optional trace flush — resolves when OTLP export completes. Handed
|
|
208
|
-
* to `waitUntil` so the worker isolate stays alive for the POST. */
|
|
209
|
-
traceFlush?(): Promise<void>;
|
|
210
|
-
}
|
|
211
|
-
interface RunChatTurnInput {
|
|
212
|
-
identity: ChatTurnIdentity;
|
|
213
|
-
hooks: ChatTurnHooks;
|
|
214
|
-
/** Worker liveness hook. When omitted, trace flush is awaited inline
|
|
215
|
-
* before the stream closes. */
|
|
216
|
-
waitUntil?: (p: Promise<unknown>) => void;
|
|
217
|
-
/** Structured logger for swallowed hook errors. Defaults to
|
|
218
|
-
* `console.error` so failures surface without product wiring. */
|
|
219
|
-
log?: (message: string, meta?: Record<string, unknown>) => void;
|
|
220
|
-
}
|
|
221
|
-
interface ChatTurnResult {
|
|
222
|
-
/** NDJSON body — return this as the platform `Response` body. */
|
|
223
|
-
body: ReadableStream<Uint8Array>;
|
|
224
|
-
/** Content type for the response. */
|
|
225
|
-
contentType: 'application/x-ndjson';
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Run one chat turn. Returns immediately with a `ReadableStream` body;
|
|
229
|
-
* the turn executes as the body is pulled. Never rejects — backend
|
|
230
|
-
* failures surface as `error` + `session.run.failed` events.
|
|
231
|
-
*/
|
|
232
|
-
declare function handleChatTurn(input: RunChatTurnInput): ChatTurnResult;
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region src/durable/execution-handle.d.ts
|
|
235
|
-
/**
|
|
236
|
-
* Derive a stable executionId from the run identity. The same
|
|
237
|
-
* `(projectId, sessionId, turnIndex)` tuple yields the same id — so a
|
|
238
|
-
* client retry of the same turn lands on the same substrate execution
|
|
239
|
-
* and the orchestrator's buffer replays instead of starting a second
|
|
240
|
-
* prompt.
|
|
241
|
-
*
|
|
242
|
-
* Format is readable, not hashed: operators grepping orchestrator logs
|
|
243
|
-
* for `gtm-agent:thread-abc:3` find the run without translating an
|
|
244
|
-
* opaque id. Substrate executionIds are not a secrecy boundary.
|
|
245
|
-
*
|
|
246
|
-
* Wire integration:
|
|
247
|
-
* - Sandbox PromptOptions accepts `executionId` and `lastEventId`.
|
|
248
|
-
* Products pass this id to make cross-process reconnect land on the
|
|
249
|
-
* same substrate execution instead of spawning a duplicate run.
|
|
250
|
-
*/
|
|
251
|
-
declare function deriveExecutionId(input: {
|
|
252
|
-
projectId: string;
|
|
253
|
-
sessionId: string;
|
|
254
|
-
turnIndex: number;
|
|
255
|
-
}): string;
|
|
256
|
-
//#endregion
|
|
257
134
|
//#region src/improvement/build-prompts.d.ts
|
|
258
135
|
/** Evidence supplied to a generated tool or MCP build instruction. */
|
|
259
136
|
interface BuildPromptFindingsInput {
|
|
260
|
-
|
|
261
|
-
findings: AnalystFinding[];
|
|
137
|
+
findings: ReadonlyArray<ProposalFinding>;
|
|
262
138
|
}
|
|
263
139
|
/** Render findings as the ranked-evidence block every build prompt ends with. */
|
|
264
|
-
declare function findingLines(findings:
|
|
140
|
+
declare function findingLines(findings: ReadonlyArray<ProposalFinding>): string[];
|
|
265
141
|
/** Build the starting instruction for a coder agent tasked with implementing a new tool. */
|
|
266
142
|
declare function toolBuildPrompt(args: BuildPromptFindingsInput): string;
|
|
267
143
|
/** Build the starting instruction for a coder agent tasked with implementing a new MCP server. */
|
|
@@ -281,8 +157,7 @@ interface DriverLoopGeneratorOptions {
|
|
|
281
157
|
* prompt the worker path uses (`toolBuildPrompt` / `mcpBuildPrompt`). The driver reads it and
|
|
282
158
|
* folds what each worker needs into its instruction. Default `defaultBuildPrompt`. */
|
|
283
159
|
buildPrompt?: (args: {
|
|
284
|
-
|
|
285
|
-
findings: AnalystFinding[];
|
|
160
|
+
findings: ReadonlyArray<ProposalFinding>;
|
|
286
161
|
}) => string;
|
|
287
162
|
/** Verify the worktree (the intrinsic check). Exposed to the driver as `run_verifier` AND
|
|
288
163
|
* re-run by code as the final keep/discard gate. Omitted ⇒ the final gate is dirty-tree only
|
|
@@ -307,29 +182,6 @@ interface DriverLoopGeneratorOptions {
|
|
|
307
182
|
/** Driver→worker `CandidateGenerator`: an LLM driver on the canonical tool-loop authors, observes, rates, and steers coding-harness sessions in the worktree until the verifier passes or the session budget is spent. */
|
|
308
183
|
declare function driverLoopGenerator(opts: DriverLoopGeneratorOptions): CandidateGenerator;
|
|
309
184
|
//#endregion
|
|
310
|
-
//#region src/improvement/findings.d.ts
|
|
311
|
-
/** Analyst id stamped on findings lifted from untyped seed values. */
|
|
312
|
-
declare const LIFTED_FINDING_ANALYST_ID = "lifted-seed";
|
|
313
|
-
/** Structural guard for the schema-versioned `AnalystFinding` envelope.
|
|
314
|
-
* Strict on the identity fields `makeFinding` always populates — a partial
|
|
315
|
-
* look-alike is lifted (re-enveloped), not trusted. */
|
|
316
|
-
declare function isAnalystFinding(value: unknown): value is AnalystFinding;
|
|
317
|
-
interface ToAnalystFindingsOptions {
|
|
318
|
-
/** `analyst_id` stamped on lifted (non-conforming) values.
|
|
319
|
-
* Default {@link LIFTED_FINDING_ANALYST_ID}. */
|
|
320
|
-
analystId?: string;
|
|
321
|
-
/** `area` stamped on lifted values. Default `'seed'`. */
|
|
322
|
-
area?: string;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Normalize a mixed `unknown[]` findings array to `AnalystFinding[]`:
|
|
326
|
-
* conforming findings pass through by reference; strings and finding-ish
|
|
327
|
-
* objects are lifted into envelopes (claim = most actionable text, original
|
|
328
|
-
* value under `metadata.raw`); values with no extractable text are dropped.
|
|
329
|
-
* Never throws — a malformed seed must not kill a proposal round.
|
|
330
|
-
*/
|
|
331
|
-
declare function toAnalystFindings(findings: readonly unknown[], opts?: ToAnalystFindingsOptions): AnalystFinding[];
|
|
332
|
-
//#endregion
|
|
333
185
|
//#region src/improvement/mcp-serve-verifier.d.ts
|
|
334
186
|
interface McpServeSpec {
|
|
335
187
|
/** Command that starts the built MCP server in the worktree (stdio transport). */
|
|
@@ -457,7 +309,7 @@ interface RawTraceDistillerOptions {
|
|
|
457
309
|
/** Findings to fall back to when the generation had NO failing cells, so a
|
|
458
310
|
* clean round never wipes the proposer's steering context. Mirrors the default
|
|
459
311
|
* distiller's static-seed fallback. Default: a single instruction finding. */
|
|
460
|
-
fallbackFindings?:
|
|
312
|
+
fallbackFindings?: ReadonlyArray<ProposalFinding>;
|
|
461
313
|
}
|
|
462
314
|
/**
|
|
463
315
|
* Build an `analyzeGeneration` producer that feeds the proposer RAW-TRACE
|
|
@@ -834,5 +686,5 @@ interface StreamToolLoopOptions<Raw> {
|
|
|
834
686
|
* `capped` if it stops for any non-completed reason with calls still pending. */
|
|
835
687
|
declare function streamToolLoop<Raw>(opts: StreamToolLoopOptions<Raw>): AsyncGenerator<StreamToolLoopYield<Raw>, void, unknown>;
|
|
836
688
|
//#endregion
|
|
837
|
-
export { rawTraceDistiller as $, ResolveAgentBackendOptions as A,
|
|
838
|
-
//# sourceMappingURL=index-
|
|
689
|
+
export { rawTraceDistiller as $, ResolveAgentBackendOptions as A, getModels as B, readinessServerSentEvent as C, runAgentTask as D, applyRunRecordDefaults as E, DEFAULT_ROUTER_BASE_URL as F, applyRolloutPolicyToProfile as G, resolveRouterBaseUrl as H, ModelInfo as I, serializeRolloutPolicy as J, normalizeRolloutPolicy as K, ResolvedChatModel as L, decideKnowledgeReadiness as M, ChatModelCandidate as N, runAgentTaskStream as O, ChatModelValidation as P, RawTraceDistillerOptions as Q, RouterEnv as R, ServerSentEventOptions as S, createSandboxPromptBackend as St, InMemoryRuntimeSessionStore as T, validateChatModelId as U, resolveChatModel as V, ROLLOUT_POLICY_EXTENSION as W, ReflectiveGeneratorOptions as X, structuralRolloutPolicyFromProfile as Y, reflectiveGenerator as Z, ToolLoopMessage as _, mcpBuildPrompt as _t, ControlStep$1 as a, OfficialOptimizerContextOptions as at, runToolLoop as b, createIterableBackend as bt, KnowledgeRequirement$1 as c, OfficialSkillOptOptions as ct, StreamToolLoopOptions as d, McpServeSpec as dt, buildDriverSystem as et, StreamToolLoopYield as f, mcpServeVerifier as ft, ToolLoopEvent as g, findingLines as gt, ToolLoopCall as h, BuildPromptFindingsInput as ht, ControlRunResult$1 as i, OfficialGepaOptions as it, resolveAgentBackend as j, AgentBackendKind as k, RunRecord$1 as l, officialGepa as lt, ToolLoopAssistantToolCall as m, driverLoopGenerator as mt, ControlDecision$1 as n, researchDriverNote as nt, DataAcquisitionPlan$1 as o, OfficialOptimizerUnavailableError as ot, ToolCallOutcome as p, DriverLoopGeneratorOptions as pt, parseRolloutPolicy as q, ControlEvalResult$1 as r, strategyAuthorMethod as rt, KnowledgeReadinessReport$1 as s, OfficialSensitiveCandidateInput as st, ControlBudget$1 as t, optimizerMethod as tt, RunToolLoopOptions as u, officialSkillOpt as ut, ToolLoopResult as v, toolBuildPrompt as vt, runtimeStreamServerSentEvent as w, streamToolLoop as x, createOpenAICompatibleBackend as xt, ToolLoopStopReason as y, BackendRetryPolicy as yt, cleanModelId as z };
|
|
690
|
+
//# sourceMappingURL=index-DQp3BPeC.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as Budget,
|
|
2
|
-
import {
|
|
1
|
+
import { R as Budget, ut as SupervisedResult } from "./environment-provider-D0NXc4Qz.js";
|
|
2
|
+
import { Rc as DeliverableSpec, ac as ExecutorConfig, ct as SupervisorProfile, j as SuperviseOptions } from "./index-BZbJWqoZ.js";
|
|
3
3
|
import { y as AgentCandidateOutputArtifactPort } from "./types-BaIpb0XT.js";
|
|
4
4
|
import { i as AgentImprovementActivationTransition, n as AgentImprovementActivationResultStore, t as AgentImprovementActivationReconciliation } from "./activation-DyWB0K6E.js";
|
|
5
5
|
import { AgentCandidateBundle, AgentCandidateCapturedArtifact, AgentCandidateKnowledge } from "@tangle-network/agent-interface";
|
|
@@ -137,4 +137,4 @@ declare function runKnowledgeImprovementJob(options: RunKnowledgeImprovementJobO
|
|
|
137
137
|
declare function buildKnowledgeImprovementExperimentBundles(bundle: AgentCandidateBundle, knowledge: KnowledgeImprovementCandidatePair): KnowledgeImprovementExperimentBundles;
|
|
138
138
|
//#endregion
|
|
139
139
|
export { KnowledgeImprovementActivationExecutor as C, CreateKnowledgeImprovementActivationExecutorOptions as S, SupervisedKnowledgeUpdater as _, KnowledgeImprovementJobResult as a, knowledgeReadinessDeliverable as b, createAgentKnowledgeReadinessCheck as c, KnowledgeReadinessCheckInput as d, KnowledgeReadinessCheckResult as f, SupervisedKnowledgeUpdateResult as g, SupervisedKnowledgeUpdateOptions as h, KnowledgeImprovementJobMeasurement as i, runKnowledgeImprovementJob as l, SupervisedKnowledgeUpdateInput as m, KnowledgeImprovementCandidatePair as n, RunKnowledgeImprovementJobOptions as o, RESEARCH_SUPERVISOR_SYSTEM_PROMPT as p, KnowledgeImprovementExperimentBundles as r, buildKnowledgeImprovementExperimentBundles as s, AgentKnowledgeReadinessCheckOptions as t, KnowledgeReadinessCheck as u, createSupervisedKnowledgeUpdater as v, createKnowledgeImprovementActivationExecutor as w, runSupervisedKnowledgeUpdate as x, formatSupervisedKnowledgeTask as y };
|
|
140
|
-
//# sourceMappingURL=index-
|
|
140
|
+
//# sourceMappingURL=index-cdkwHruJ.d.ts.map
|