@tangle-network/agent-runtime 0.52.0 → 0.54.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.
Files changed (74) hide show
  1. package/README.md +27 -16
  2. package/dist/agent.d.ts +2 -2
  3. package/dist/agent.js +5 -3
  4. package/dist/agent.js.map +1 -1
  5. package/dist/analyst-loop.d.ts +1 -1
  6. package/dist/analyst-loop.js +2 -2
  7. package/dist/{chunk-COAVO6QB.js → chunk-2BDXWZUC.js} +5 -34
  8. package/dist/chunk-2BDXWZUC.js.map +1 -0
  9. package/dist/chunk-A73RADPB.js +281 -0
  10. package/dist/chunk-A73RADPB.js.map +1 -0
  11. package/dist/chunk-FRBWCJLP.js +396 -0
  12. package/dist/chunk-FRBWCJLP.js.map +1 -0
  13. package/dist/chunk-GRAGM4MC.js +72 -0
  14. package/dist/chunk-GRAGM4MC.js.map +1 -0
  15. package/dist/{chunk-2OU7ZQPD.js → chunk-JTH2FPCK.js} +3248 -456
  16. package/dist/chunk-JTH2FPCK.js.map +1 -0
  17. package/dist/{chunk-V2K35HF2.js → chunk-KJH62YEK.js} +2 -2
  18. package/dist/{chunk-HNUXAZIJ.js → chunk-P5OKDSLB.js} +2 -2
  19. package/dist/{chunk-GSUO5QS6.js → chunk-VLF5RHEQ.js} +2 -5
  20. package/dist/{chunk-GSUO5QS6.js.map → chunk-VLF5RHEQ.js.map} +1 -1
  21. package/dist/{chunk-7JITYN6T.js → chunk-XRYEZPR6.js} +18 -2
  22. package/dist/chunk-XRYEZPR6.js.map +1 -0
  23. package/dist/{coder-_YCf3BAK.d.ts → coder-CEkUFv8h.d.ts} +1 -1
  24. package/dist/{types-5MGt5KTY.d.ts → coordination-BMzskrUR.d.ts} +268 -2
  25. package/dist/{kb-gate-CHAyt4aI.d.ts → delegates-BPLIl8EC.d.ts} +491 -566
  26. package/dist/{delegation-profile-1GbW5yA3.d.ts → delegation-profile-Bvfro2m1.d.ts} +28 -2
  27. package/dist/index.d.ts +7 -7
  28. package/dist/index.js +25 -80
  29. package/dist/index.js.map +1 -1
  30. package/dist/intelligence.d.ts +475 -5
  31. package/dist/intelligence.js +547 -3
  32. package/dist/intelligence.js.map +1 -1
  33. package/dist/kb-gate-CuzMYGYM.d.ts +76 -0
  34. package/dist/{loop-runner-bin-DFUNgpeK.d.ts → loop-runner-bin-BGpVVyXp.d.ts} +6 -27
  35. package/dist/loop-runner-bin.d.ts +5 -5
  36. package/dist/loop-runner-bin.js +6 -5
  37. package/dist/loops.d.ts +8 -5
  38. package/dist/loops.js +32 -8
  39. package/dist/mcp/bin.js +94 -30
  40. package/dist/mcp/bin.js.map +1 -1
  41. package/dist/mcp/index.d.ts +10 -273
  42. package/dist/mcp/index.js +45 -365
  43. package/dist/mcp/index.js.map +1 -1
  44. package/dist/{openai-tools-D4HLDWgw.d.ts → openai-tools-CoeLQ7Uo.d.ts} +1 -1
  45. package/dist/profiles.d.ts +2 -2
  46. package/dist/profiles.js +4 -4
  47. package/dist/router-client-30Y_pca8.d.ts +120 -0
  48. package/dist/{run-loop-BIineL1T.d.ts → run-loop-DluzfJ2h.d.ts} +1 -1
  49. package/dist/runtime.d.ts +429 -131
  50. package/dist/runtime.js +32 -8
  51. package/dist/topology.d.ts +54 -1
  52. package/dist/topology.js +222 -0
  53. package/dist/topology.js.map +1 -1
  54. package/dist/{types-BEQsBhOE.d.ts → types-C8rNlxfV.d.ts} +6 -5
  55. package/dist/workflow.d.ts +2 -2
  56. package/dist/workflow.js +4 -2
  57. package/dist/workflow.js.map +1 -1
  58. package/package.json +5 -5
  59. package/skills/agent-runtime-adoption/SKILL.md +54 -46
  60. package/skills/build-with-agent-runtime/SKILL.md +12 -8
  61. package/skills/loop-writer/SKILL.md +9 -1
  62. package/skills/supervise/SKILL.md +24 -0
  63. package/dist/chunk-2OU7ZQPD.js.map +0 -1
  64. package/dist/chunk-4JI4BCBI.js +0 -623
  65. package/dist/chunk-4JI4BCBI.js.map +0 -1
  66. package/dist/chunk-7JITYN6T.js.map +0 -1
  67. package/dist/chunk-7SP2OVYZ.js +0 -908
  68. package/dist/chunk-7SP2OVYZ.js.map +0 -1
  69. package/dist/chunk-BERLUBAP.js +0 -1356
  70. package/dist/chunk-BERLUBAP.js.map +0 -1
  71. package/dist/chunk-COAVO6QB.js.map +0 -1
  72. package/dist/driver-DLI1io57.d.ts +0 -221
  73. /package/dist/{chunk-V2K35HF2.js.map → chunk-KJH62YEK.js.map} +0 -0
  74. /package/dist/{chunk-HNUXAZIJ.js.map → chunk-P5OKDSLB.js.map} +0 -0
@@ -1,16 +1,18 @@
1
- import { S as SandboxClient, e as LoopSandboxPlacement } from '../types-BEQsBhOE.js';
2
- import { c as FleetHandle, d as DelegationExecutor, e as DelegateFeedbackArgs, f as DelegationFeedbackSnapshot, g as DelegationTaskQueue, h as CoderDelegate, R as ResearcherDelegate, U as UiAuditorDelegate, T as TraceContext, D as DelegateCodeArgs, i as DelegateCodeResult, j as DelegateFeedbackResult, k as ResearchSource, l as DelegateResearchArgs, m as DelegateResearchResult, n as DelegateUiAuditArgs, o as DelegateUiAuditResult, p as DelegationHistoryResult, q as DelegationHistoryArgs, r as DelegationStatusResult, s as DelegationStatusArgs } from '../kb-gate-CHAyt4aI.js';
3
- export { t as CappedDelegationTrace, u as CoderReview, C as CoderReviewer, a as CoderWinnerSelection, v as CreateDefaultCoderDelegateOptions, b as CreateKbGateOptions, w as DELEGATION_TRACE_MAX_BYTES, x as DELEGATION_TRACE_MAX_SPANS, y as DelegateCodeConfig, z as DelegateResearchConfig, A as DelegateRunCtx, B as DelegateUiAuditConfig, E as DelegateUiAuditRoute, G as DelegationError, H as DelegationHistoryEntry, I as DelegationPersistenceError, J as DelegationProfile, K as DelegationProgress, L as DelegationRecord, M as DelegationResultPayload, N as DelegationResumeContext, O as DelegationResumeDriver, P as DelegationResumeTick, Q as DelegationRunContext, S as DelegationStateCorruptError, V as DelegationStatus, W as DelegationStore, X as DelegationTaskQueueOptions, Y as DelegationTraceCaps, Z as DelegationTraceCollector, _ as DelegationTraceSpan, $ as DetachedSessionRefParts, a0 as DetachedTurn, a1 as DriveTurnCapableBox, a2 as DriveTurnResumeDriverOptions, a3 as DriveTurnTick, F as FactCandidate, a4 as FactJudge, a5 as FactJudgeVerdict, a6 as FeedbackRating, a7 as FeedbackRefersTo, a8 as FileDelegationStore, a9 as FileDelegationStoreOptions, aa as FleetWorkspaceExecutorOptions, ab as InMemoryDelegationStore, ac as KbGateResult, ad as ResearchOutputShape, ae as RunDetachedTurnOptions, af as SettleDetachedCoderTurnOptions, ag as SiblingSandboxExecutorOptions, ah as SubmitInput, ai as SubmitOutput, aj as UiAuditorDelegationOutput, ak as buildDelegationTraceSpans, al as capDelegationTrace, am as coderTaskFromArgs, an as composeLoopTraceEmitters, ao as createDefaultCoderDelegate, ap as createDelegationTraceCollector, aq as createDriveTurnResumeDriver, ar as createFleetWorkspaceExecutor, as as createKbGate, at as createPropagatingTraceEmitter, au as createSiblingSandboxExecutor, av as detachedTurnEvents, aw as formatDetachedSessionRef, ax as hashIdempotencyInput, ay as parseDetachedSessionRef, az as readTraceContextFromEnv, aA as runDetachedTurn, aB as settleDetachedCoderTurn, aC as traceContextToEnv } from '../kb-gate-CHAyt4aI.js';
4
- export { B as BuildDelegationMcpServerOptions, C as ComposeProductionAgentProfileOptions, D as DELEGATION_MCP_SERVER_KEY, b as buildDelegationMcpServer, c as composeProductionAgentProfile } from '../delegation-profile-1GbW5yA3.js';
1
+ import { S as SandboxClient, f as LoopSandboxPlacement } from '../types-C8rNlxfV.js';
2
+ import { F as FleetHandle, f as DelegationExecutor, d as DelegationTaskQueue, e as CoderDelegate, D as DelegateCodeArgs, g as DelegateCodeResult, h as DelegateFeedbackResult, b as DelegateFeedbackArgs, i as ResearchSource, R as ResearcherDelegate, j as DelegateResearchArgs, k as DelegateResearchResult, U as UiAuditorDelegate, l as DelegateUiAuditArgs, m as DelegateUiAuditResult, n as DelegationHistoryResult, o as DelegationHistoryArgs, p as DelegationStatusResult, q as DelegationStatusArgs } from '../delegates-BPLIl8EC.js';
3
+ export { r as CappedDelegationTrace, s as CoderReview, C as CoderReviewer, a as CoderWinnerSelection, t as CreateDefaultCoderDelegateOptions, u as DELEGATION_TRACE_MAX_BYTES, v as DELEGATION_TRACE_MAX_SPANS, w as DelegateCodeConfig, x as DelegateResearchConfig, y as DelegateRunCtx, z as DelegateUiAuditConfig, A as DelegateUiAuditRoute, B as DelegationError, c as DelegationFeedbackSnapshot, E as DelegationHistoryEntry, G as DelegationPersistenceError, H as DelegationProfile, I as DelegationProgress, J as DelegationRecord, K as DelegationResultPayload, L as DelegationResumeContext, M as DelegationResumeDriver, N as DelegationResumeTick, O as DelegationRunContext, P as DelegationStateCorruptError, Q as DelegationStatus, S as DelegationStore, V as DelegationTaskQueueOptions, W as DelegationTraceCaps, X as DelegationTraceCollector, Y as DelegationTraceSpan, Z as DetachedSessionRefParts, _ as DetachedTurn, $ as DriveTurnCapableBox, a0 as DriveTurnResumeDriverOptions, a1 as DriveTurnTick, a2 as FeedbackRating, a3 as FeedbackRefersTo, a4 as FileDelegationStore, a5 as FileDelegationStoreOptions, a6 as FleetWorkspaceExecutorOptions, a7 as InMemoryDelegationStore, a8 as ResearchOutputShape, a9 as RunDetachedTurnOptions, aa as SettleDetachedCoderTurnOptions, ab as SiblingSandboxExecutorOptions, ac as SubmitInput, ad as SubmitOutput, T as TraceContext, ae as UiAuditorDelegationOutput, af as buildDelegationTraceSpans, ag as capDelegationTrace, ah as coderTaskFromArgs, ai as composeLoopTraceEmitters, aj as createDefaultCoderDelegate, ak as createDelegationTraceCollector, al as createDriveTurnResumeDriver, am as createFleetWorkspaceExecutor, an as createPropagatingTraceEmitter, ao as createSiblingSandboxExecutor, ap as detachedTurnEvents, aq as formatDetachedSessionRef, ar as hashIdempotencyInput, as as parseDetachedSessionRef, at as readTraceContextFromEnv, au as runDetachedTurn, av as settleDetachedCoderTurn, aw as traceContextToEnv } from '../delegates-BPLIl8EC.js';
4
+ export { B as BuildDelegationMcpServerOptions, C as ComposeProductionAgentProfileOptions, D as DELEGATION_MCP_SERVER_KEY, b as buildDelegationMcpServer, c as composeProductionAgentProfile } from '../delegation-profile-Bvfro2m1.js';
5
+ import { F as FeedbackStore } from '../coordination-BMzskrUR.js';
6
+ export { A as AnalystRegistry, C as CoordinationEvent, a as CoordinationTools, b as CoordinationToolsOptions, c as FeedbackEvent, I as InMemoryFeedbackStore, J as JsonRpcMessage, d as JsonRpcResponse, M as MakeWorkerAgent, e as McpServer, f as McpServerOptions, g as McpToolDescriptor, h as McpTransport, Q as Question, i as QuestionDecision, j as QuestionPolicy, k as QuestionRecord, S as SettledWorker, l as createCoordinationTools, m as createInProcessTransport, n as createMcpServer, o as eventToSnapshot } from '../coordination-BMzskrUR.js';
5
7
  import { L as LocalHarness, r as runLocalHarness } from '../local-harness-KrdFTY5R.js';
6
8
  export { a as LocalHarnessResult, R as RunLocalHarnessOptions } from '../local-harness-KrdFTY5R.js';
7
- export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from '../openai-tools-D4HLDWgw.js';
9
+ export { C as CreateKbGateOptions, F as FactCandidate, a as FactJudge, b as FactJudgeVerdict, K as KbGateResult, c as createKbGate } from '../kb-gate-CuzMYGYM.js';
10
+ export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from '../openai-tools-CoeLQ7Uo.js';
8
11
  import { AnalystFinding } from '@tangle-network/agent-eval';
9
- import { S as Scope, R as ResultBlobStore, A as Agent, B as Budget } from '../types-5MGt5KTY.js';
10
12
  import { a as UiLens } from '../substrate-CUgk7F7s.js';
11
13
  import '@tangle-network/sandbox';
12
14
  import '../runtime-hooks-C7JwKb9E.js';
13
- import '../coder-_YCf3BAK.js';
15
+ import '../coder-CEkUFv8h.js';
14
16
  import 'node:child_process';
15
17
 
16
18
  /**
@@ -49,61 +51,6 @@ interface DetectExecutorArgs {
49
51
  */
50
52
  declare function detectExecutor(args: DetectExecutorArgs): Promise<DelegationExecutor>;
51
53
 
52
- /**
53
- * @experimental
54
- *
55
- * Feedback persistence surface for the MCP layer.
56
- *
57
- * The substrate cannot import `@tangle-network/agent-knowledge` (it would
58
- * induce a dependency cycle), so the store is an abstract interface. The
59
- * default implementation is in-memory; consumers wire their own adapter
60
- * (a real KbStore-backed sink, an HTTP relay to gtm-agent's knowledge
61
- * service, etc.) via `createMcpServer({ feedbackStore })`.
62
- *
63
- * Feedback events are append-only: every rating is a new event with a
64
- * fresh id, even when the same delegation is rated multiple times. The
65
- * caller decides how to roll up scores downstream.
66
- */
67
-
68
- /** @experimental */
69
- interface FeedbackEvent {
70
- id: string;
71
- refersTo: DelegateFeedbackArgs['refersTo'];
72
- rating: DelegateFeedbackArgs['rating'];
73
- by: DelegateFeedbackArgs['by'];
74
- capturedAt: string;
75
- namespace?: string;
76
- }
77
- /** @experimental */
78
- interface FeedbackStore {
79
- /** Append a new event. Never dedupes — every rating is its own event. */
80
- put(event: FeedbackEvent): Promise<void>;
81
- /**
82
- * List events filtered by `namespace`. When `namespace` is omitted, list
83
- * across all namespaces. Returns events in insertion order.
84
- */
85
- list(filter?: {
86
- namespace?: string;
87
- refersToRef?: string;
88
- }): Promise<FeedbackEvent[]>;
89
- }
90
- /** @experimental */
91
- declare class InMemoryFeedbackStore implements FeedbackStore {
92
- private readonly events;
93
- put(event: FeedbackEvent): Promise<void>;
94
- list(filter?: {
95
- namespace?: string;
96
- refersToRef?: string;
97
- }): Promise<FeedbackEvent[]>;
98
- }
99
- /**
100
- * Project a `FeedbackEvent` down to the snapshot shape carried on
101
- * `delegation_history` entries.
102
- *
103
- * @experimental
104
- */
105
- declare function eventToSnapshot(event: FeedbackEvent): DelegationFeedbackSnapshot;
106
-
107
54
  /**
108
55
  * @experimental
109
56
  *
@@ -289,133 +236,6 @@ interface InProcessExecutorDescribePlacement extends LoopSandboxPlacement {
289
236
  */
290
237
  declare function createInProcessExecutor(options: InProcessExecutorOptions): DelegationExecutor;
291
238
 
292
- /**
293
- * @experimental
294
- *
295
- * Stdio JSON-RPC MCP server exposing the 5 delegation tools to sandbox
296
- * coding-harness agents (claude-code, codex, opencode, ...).
297
- *
298
- * The server is transport-bound but topology-free: tool execution is
299
- * delegated to handler functions composed from a queue, a feedback
300
- * store, and per-profile run delegates. Consumers wire those at
301
- * construction time. The `agent-runtime-mcp` bin spins up a default
302
- * configuration for the common case (real sandbox client + coder).
303
- *
304
- * Wire protocol: line-delimited JSON-RPC 2.0 over stdio. Each line is
305
- * one request; each response is one line. `tools/list` and `tools/call`
306
- * mirror the MCP 2024-11-05 spec; we do not pull in
307
- * `@modelcontextprotocol/sdk` to keep the dependency footprint zero.
308
- */
309
-
310
- /** @experimental */
311
- interface McpServerOptions {
312
- /** Required to enable delegate_code. */
313
- coderDelegate?: CoderDelegate;
314
- /**
315
- * Required to enable delegate_research. The substrate cannot ship a
316
- * default — wire one that closes over your `runLoop` + a
317
- * researcher profile (typically `@tangle-network/agent-knowledge`'s
318
- * `researcherProfile` / `multiHarnessResearcherFanout`).
319
- */
320
- researcherDelegate?: ResearcherDelegate;
321
- /**
322
- * Required to enable delegate_ui_audit. Wire one that closes over your
323
- * `runLoop` + `uiAuditorProfile` + a `SandboxClient` (the
324
- * canonical in-process choice is `createInProcessUiAuditClient` from
325
- * `@tangle-network/agent-runtime/profiles`) + your vision judge.
326
- */
327
- uiAuditorDelegate?: UiAuditorDelegate;
328
- /** Override the default in-memory feedback store. */
329
- feedbackStore?: FeedbackStore;
330
- /** Override the default in-memory task queue. */
331
- queue?: DelegationTaskQueue;
332
- /**
333
- * Record deterministic detached-session resume keys on single-variant
334
- * coder/researcher submissions so a durable queue can resume them after a
335
- * restart. Enable only when the wired delegates dispatch via sandbox
336
- * sessions (`driveTurn`) AND `queue` persists records — the keys are inert
337
- * otherwise. The bin turns this on alongside the durable store for
338
- * session-backed (sibling/fleet) placements.
339
- */
340
- detachedDispatch?: boolean;
341
- /**
342
- * Extra tools to serve alongside the delegation tools, for example
343
- * `createCoordinationTools(...).tools`. Registered after the built-ins; a
344
- * duplicate name throws so delegation tools cannot be shadowed silently.
345
- */
346
- extraTools?: McpToolDescriptor[];
347
- /**
348
- * Inherited trace identity (`readTraceContextFromEnv()`) stamped on every
349
- * record the DEFAULT queue creates. Ignored when `queue` is supplied —
350
- * pass `traceContext` to that queue's constructor instead.
351
- */
352
- traceContext?: TraceContext;
353
- /** Server display name surfaced via `initialize`. Default `'agent-runtime-mcp'`. */
354
- serverName?: string;
355
- /** Server version surfaced via `initialize`. Default = the package version baked at build time. */
356
- serverVersion?: string;
357
- }
358
- /** @experimental */
359
- interface McpToolDescriptor {
360
- name: string;
361
- description: string;
362
- inputSchema: Record<string, unknown>;
363
- handler: (raw: unknown) => Promise<unknown>;
364
- }
365
- /** @experimental */
366
- interface McpServer {
367
- /** Tools currently registered (depend on which delegates were wired). */
368
- readonly tools: ReadonlyMap<string, McpToolDescriptor>;
369
- /** The underlying queue — exposed so tests can introspect it. */
370
- readonly queue: DelegationTaskQueue;
371
- /** The feedback store — exposed for the same reason. */
372
- readonly feedbackStore: FeedbackStore;
373
- /** Handle a single parsed JSON-RPC message. Returns the response object (or `null` for notifications). */
374
- handle(message: JsonRpcMessage): Promise<JsonRpcResponse | null>;
375
- /** Drive the server on a stdio-shaped transport until `stop()` is called. */
376
- serve(transport?: McpTransport): Promise<void>;
377
- /** Stop a `serve` call. Subsequent requests are rejected. */
378
- stop(): void;
379
- }
380
- /** @experimental */
381
- interface McpTransport {
382
- input: NodeJS.ReadableStream;
383
- output: NodeJS.WritableStream;
384
- }
385
- /** @experimental */
386
- interface JsonRpcMessage {
387
- jsonrpc: '2.0';
388
- id?: number | string | null;
389
- method: string;
390
- params?: unknown;
391
- }
392
- /** @experimental */
393
- interface JsonRpcResponse {
394
- jsonrpc: '2.0';
395
- id: number | string | null;
396
- result?: unknown;
397
- error?: {
398
- code: number;
399
- message: string;
400
- data?: unknown;
401
- };
402
- }
403
- /** @experimental */
404
- declare function createMcpServer(options?: McpServerOptions): McpServer;
405
- /**
406
- * In-process pair of `Readable` + `Writable` streams suitable for driving
407
- * `server.serve(...)` from a test. Returns the agent-side stream (the
408
- * client writes to it) and the server-side stream (the test reads from it).
409
- *
410
- * @experimental
411
- */
412
- declare function createInProcessTransport(): {
413
- transport: McpTransport;
414
- clientWrite(line: string): void;
415
- clientClose(): void;
416
- readServer(): Promise<JsonRpcResponse[]>;
417
- };
418
-
419
239
  /**
420
240
  * @experimental
421
241
  *
@@ -471,89 +291,6 @@ declare function makeCheckRunner(kinds: Record<string, Check>, opts: CheckRunner
471
291
  error: string;
472
292
  }>;
473
293
 
474
- /**
475
- * @experimental
476
- *
477
- * MCP binding for a live `Scope`. A sandbox driver gets the same small verbs
478
- * the in-process driver has: spawn, observe, await, steer, ask/answer, analyze,
479
- * and stop. Settled outputs remain Scope artifacts; product code can project
480
- * them into any UI/report envelope it needs.
481
- */
482
-
483
- /** A worker the driver has drained via `await_next`. */
484
- interface SettledWorker {
485
- readonly id: string;
486
- readonly status: 'done' | 'down';
487
- readonly score?: number;
488
- readonly valid?: boolean;
489
- readonly outRef?: string;
490
- readonly reason?: string;
491
- }
492
- type QuestionLevel = 'worker' | 'driver' | 'loop';
493
- type QuestionUrgency = 'continue-without' | 'blocks-step' | 'blocks-run';
494
- interface QuestionOption {
495
- readonly label: string;
496
- readonly tradeoff: string;
497
- }
498
- interface Question {
499
- readonly id: string;
500
- readonly from: string;
501
- readonly level: QuestionLevel;
502
- readonly question: string;
503
- readonly reason: string;
504
- readonly urgency: QuestionUrgency;
505
- readonly options?: ReadonlyArray<QuestionOption>;
506
- }
507
- type QuestionDecision = {
508
- readonly kind: 'answer';
509
- readonly answer: string;
510
- readonly by: string;
511
- } | {
512
- readonly kind: 'defer';
513
- readonly reason: string;
514
- } | {
515
- readonly kind: 'escalate';
516
- readonly to: 'parent' | 'user' | string;
517
- readonly reason: string;
518
- };
519
- interface QuestionRecord extends Question {
520
- readonly status: 'open' | 'answered' | 'deferred' | 'escalated';
521
- readonly decision?: QuestionDecision;
522
- readonly openedAt: number;
523
- }
524
- type QuestionPolicy = 'auto' | 'mustDecide' | 'bubble' | 'failClosed';
525
- interface AnalystRegistry {
526
- readonly kinds: ReadonlyArray<{
527
- id: string;
528
- description: string;
529
- area: string;
530
- }>;
531
- readonly run: (kindId: string, trace: unknown) => Promise<unknown>;
532
- }
533
- type CoordinationEvent = {
534
- readonly type: 'question';
535
- readonly question: QuestionRecord;
536
- };
537
- type MakeWorkerAgent = (profile: unknown) => Agent<unknown, unknown>;
538
- interface CoordinationToolsOptions {
539
- readonly scope: Scope<unknown>;
540
- readonly blobs: ResultBlobStore;
541
- readonly makeWorkerAgent: MakeWorkerAgent;
542
- readonly perWorker: Budget;
543
- readonly analysts?: AnalystRegistry;
544
- readonly onEvent?: (event: CoordinationEvent) => void | Promise<void>;
545
- readonly questionPolicy?: QuestionPolicy;
546
- }
547
- interface CoordinationTools {
548
- readonly tools: McpToolDescriptor[];
549
- isStopped(): boolean;
550
- stopReason(): string | undefined;
551
- settled(): ReadonlyArray<SettledWorker>;
552
- questions(): ReadonlyArray<QuestionRecord>;
553
- }
554
- /** Build the driver's MCP tools over a live scope. */
555
- declare function createCoordinationTools(opts: CoordinationToolsOptions): CoordinationTools;
556
-
557
294
  /**
558
295
  * @experimental
559
296
  *
@@ -1012,4 +749,4 @@ interface DelegationStatusHandlerOptions {
1012
749
  /** @experimental */
1013
750
  declare function createDelegationStatusHandler(options: DelegationStatusHandlerOptions): (raw: unknown) => Promise<DelegationStatusResult>;
1014
751
 
1015
- export { type AnalystRegistry, type Check, type CheckRunnerOptions, CoderDelegate, type CoordinationEvent, type CoordinationTools, type CoordinationToolsOptions, type CreateWorktreeOptions, DELEGATE_CODE_DESCRIPTION, DELEGATE_CODE_INPUT_SCHEMA, DELEGATE_CODE_TOOL_NAME, DELEGATE_FEEDBACK_DESCRIPTION, DELEGATE_FEEDBACK_INPUT_SCHEMA, DELEGATE_FEEDBACK_TOOL_NAME, DELEGATE_RESEARCH_DESCRIPTION, DELEGATE_RESEARCH_INPUT_SCHEMA, DELEGATE_RESEARCH_TOOL_NAME, DELEGATE_UI_AUDIT_DESCRIPTION, DELEGATE_UI_AUDIT_INPUT_SCHEMA, DELEGATE_UI_AUDIT_TOOL_NAME, DELEGATION_HISTORY_DESCRIPTION, DELEGATION_HISTORY_INPUT_SCHEMA, DELEGATION_HISTORY_TOOL_NAME, DELEGATION_STATUS_DESCRIPTION, DELEGATION_STATUS_INPUT_SCHEMA, DELEGATION_STATUS_TOOL_NAME, DelegateCodeArgs, DelegateCodeResult, DelegateFeedbackArgs, DelegateFeedbackResult, DelegateResearchArgs, DelegateResearchResult, DelegateUiAuditArgs, DelegateUiAuditResult, DelegationExecutor, DelegationFeedbackSnapshot, DelegationHistoryArgs, DelegationHistoryResult, DelegationStatusArgs, DelegationStatusResult, DelegationTaskQueue, type DetectExecutorArgs, type DiffOptions, type DiffResult, type FeedbackEvent, type FeedbackStore, FleetHandle, type GitRunner, InMemoryFeedbackStore, type InProcessExecutorDescribePlacement, type InProcessExecutorOptions, type JsonRpcMessage, type JsonRpcResponse, LocalHarness, type MakeWorkerAgent, type McpServer, type McpServerOptions, type McpToolDescriptor, type McpTransport, type Question, type QuestionDecision, type QuestionPolicy, type QuestionRecord, type RemoveWorktreeOptions, ResearchSource, ResearcherDelegate, type SettledWorker, TraceContext, UiAuditorDelegate, type WorktreeHandle, captureWorktreeDiff, createCoordinationTools, createDelegateCodeHandler, createDelegateFeedbackHandler, createDelegateResearchHandler, createDelegateUiAuditHandler, createDelegationHistoryHandler, createDelegationStatusHandler, createInProcessExecutor, createInProcessTransport, createMcpServer, createWorktree, defaultChecks, detectExecutor, eventToSnapshot, liftFindings, makeCheckRunner, removeWorktree, renderTrace, runCheck, runLocalHarness, validateDelegateCodeArgs, validateDelegateFeedbackArgs, validateDelegateResearchArgs, validateDelegateUiAuditArgs, validateDelegationHistoryArgs, validateDelegationStatusArgs };
752
+ export { type Check, type CheckRunnerOptions, CoderDelegate, type CreateWorktreeOptions, DELEGATE_CODE_DESCRIPTION, DELEGATE_CODE_INPUT_SCHEMA, DELEGATE_CODE_TOOL_NAME, DELEGATE_FEEDBACK_DESCRIPTION, DELEGATE_FEEDBACK_INPUT_SCHEMA, DELEGATE_FEEDBACK_TOOL_NAME, DELEGATE_RESEARCH_DESCRIPTION, DELEGATE_RESEARCH_INPUT_SCHEMA, DELEGATE_RESEARCH_TOOL_NAME, DELEGATE_UI_AUDIT_DESCRIPTION, DELEGATE_UI_AUDIT_INPUT_SCHEMA, DELEGATE_UI_AUDIT_TOOL_NAME, DELEGATION_HISTORY_DESCRIPTION, DELEGATION_HISTORY_INPUT_SCHEMA, DELEGATION_HISTORY_TOOL_NAME, DELEGATION_STATUS_DESCRIPTION, DELEGATION_STATUS_INPUT_SCHEMA, DELEGATION_STATUS_TOOL_NAME, DelegateCodeArgs, DelegateCodeResult, DelegateFeedbackArgs, DelegateFeedbackResult, DelegateResearchArgs, DelegateResearchResult, DelegateUiAuditArgs, DelegateUiAuditResult, DelegationExecutor, DelegationHistoryArgs, DelegationHistoryResult, DelegationStatusArgs, DelegationStatusResult, DelegationTaskQueue, type DetectExecutorArgs, type DiffOptions, type DiffResult, FeedbackStore, FleetHandle, type GitRunner, type InProcessExecutorDescribePlacement, type InProcessExecutorOptions, LocalHarness, type RemoveWorktreeOptions, ResearchSource, ResearcherDelegate, UiAuditorDelegate, type WorktreeHandle, captureWorktreeDiff, createDelegateCodeHandler, createDelegateFeedbackHandler, createDelegateResearchHandler, createDelegateUiAuditHandler, createDelegationHistoryHandler, createDelegationStatusHandler, createInProcessExecutor, createWorktree, defaultChecks, detectExecutor, liftFindings, makeCheckRunner, removeWorktree, renderTrace, runCheck, runLocalHarness, validateDelegateCodeArgs, validateDelegateFeedbackArgs, validateDelegateResearchArgs, validateDelegateUiAuditArgs, validateDelegationHistoryArgs, validateDelegationStatusArgs };