@tangle-network/agent-runtime 0.81.1 → 0.83.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 (88) hide show
  1. package/README.md +4 -0
  2. package/dist/agent.d.ts +5 -3
  3. package/dist/agent.js +7 -7
  4. package/dist/agent.js.map +1 -1
  5. package/dist/analyst-loop.d.ts +3 -2
  6. package/dist/analyst-loop.js +2 -2
  7. package/dist/{chunk-35WXYO26.js → chunk-4WXGK6GV.js} +2 -2
  8. package/dist/chunk-4WXGK6GV.js.map +1 -0
  9. package/dist/{chunk-UZ5SODU7.js → chunk-5IBQAPVB.js} +1 -1
  10. package/dist/chunk-5IBQAPVB.js.map +1 -0
  11. package/dist/{chunk-5JAUQZQA.js → chunk-7LO5GMAO.js} +1 -1
  12. package/dist/chunk-7LO5GMAO.js.map +1 -0
  13. package/dist/{chunk-H7IBHAFT.js → chunk-BZF3KQ6G.js} +1 -1
  14. package/dist/chunk-BZF3KQ6G.js.map +1 -0
  15. package/dist/{chunk-WIR4HOOJ.js → chunk-DPEUKJRO.js} +1 -1
  16. package/dist/chunk-DPEUKJRO.js.map +1 -0
  17. package/dist/{chunk-EAGRBFQF.js → chunk-J3N6GODQ.js} +2 -2
  18. package/dist/chunk-J3N6GODQ.js.map +1 -0
  19. package/dist/{chunk-GRAGM4MC.js → chunk-NURIQBJQ.js} +1 -1
  20. package/dist/chunk-NURIQBJQ.js.map +1 -0
  21. package/dist/{chunk-D6GIWPKD.js → chunk-QDVLTRCP.js} +51 -4
  22. package/dist/chunk-QDVLTRCP.js.map +1 -0
  23. package/dist/{chunk-FNMGYYSS.js → chunk-SGKPNBXE.js} +1 -1
  24. package/dist/chunk-SGKPNBXE.js.map +1 -0
  25. package/dist/{chunk-VHJDS6OR.js → chunk-SSA6OERV.js} +6 -6
  26. package/dist/chunk-SSA6OERV.js.map +1 -0
  27. package/dist/{chunk-BPS254IE.js → chunk-UD4BHQMI.js} +2 -2
  28. package/dist/{chunk-BPS254IE.js.map → chunk-UD4BHQMI.js.map} +1 -1
  29. package/dist/{chunk-OUGNIHDZ.js → chunk-UJ3ONGHR.js} +6 -6
  30. package/dist/chunk-UJ3ONGHR.js.map +1 -0
  31. package/dist/{chunk-LWGVVP2C.js → chunk-VNOOH22O.js} +2 -2
  32. package/dist/chunk-VNOOH22O.js.map +1 -0
  33. package/dist/{chunk-NBV35BR6.js → chunk-YEJR7IXO.js} +1 -1
  34. package/dist/chunk-YEJR7IXO.js.map +1 -0
  35. package/dist/{chunk-C2FZ6GR6.js → chunk-YPA5MLVE.js} +2 -2
  36. package/dist/chunk-YPA5MLVE.js.map +1 -0
  37. package/dist/{coordination-BI9tpcmF.d.ts → coordination-CuDLO8wj.d.ts} +53 -32
  38. package/dist/environment-provider.d.ts +2 -2
  39. package/dist/environment-provider.js +1 -1
  40. package/dist/{improvement-adapter-CioiEE2z.d.ts → improvement-adapter-CDR8QNVM.d.ts} +3 -0
  41. package/dist/index.d.ts +163 -49
  42. package/dist/index.js +43 -13
  43. package/dist/index.js.map +1 -1
  44. package/dist/intelligence.d.ts +14 -8
  45. package/dist/intelligence.js +1 -1
  46. package/dist/intelligence.js.map +1 -1
  47. package/dist/{kb-gate-CuzMYGYM.d.ts → kb-gate-CwHO0vz6.d.ts} +4 -2
  48. package/dist/lifecycle.d.ts +2 -2
  49. package/dist/lifecycle.js +3 -3
  50. package/dist/{local-harness-DU7yV6mG.d.ts → local-harness-sI0S_XNA.d.ts} +2 -1
  51. package/dist/{loop-runner-bin-CBkLsyFg.d.ts → loop-runner-bin-hQDUL8Ld.d.ts} +28 -13
  52. package/dist/loop-runner-bin.d.ts +7 -7
  53. package/dist/loop-runner-bin.js +10 -10
  54. package/dist/loops.d.ts +153 -46
  55. package/dist/loops.js +9 -7
  56. package/dist/mcp/bin.js +8 -8
  57. package/dist/mcp/bin.js.map +1 -1
  58. package/dist/mcp/index.d.ts +44 -38
  59. package/dist/mcp/index.js +11 -11
  60. package/dist/mcp/index.js.map +1 -1
  61. package/dist/{mcp-serve-verifier-BvMAV_8U.d.ts → mcp-serve-verifier-FL7-ZEb_.d.ts} +8 -3
  62. package/dist/{openai-tools-B-3v06BE.d.ts → openai-tools-BnrOmGjN.d.ts} +7 -4
  63. package/dist/platform.d.ts +4 -0
  64. package/dist/platform.js.map +1 -1
  65. package/dist/profiles.d.ts +36 -23
  66. package/dist/profiles.js +2 -2
  67. package/dist/profiles.js.map +1 -1
  68. package/dist/{router-client-D6Ocf4jG.d.ts → router-client-r8y_VFVM.d.ts} +1 -0
  69. package/dist/{substrate-rNj6TDc3.d.ts → substrate-DO2GHNg2.d.ts} +5 -3
  70. package/dist/{types-By9LXllv.d.ts → types-Driepl87.d.ts} +3 -2
  71. package/dist/{types-BF-MEsQB.d.ts → types-ESeMOj94.d.ts} +26 -11
  72. package/dist/{worktree-fanout-D9Z2dMS9.d.ts → worktree-fanout-D6xR2CIA.d.ts} +16 -10
  73. package/dist/{worktree-harness-Dx8XULW3.d.ts → worktree-harness-CX_McRLp.d.ts} +11 -8
  74. package/package.json +1 -1
  75. package/dist/chunk-35WXYO26.js.map +0 -1
  76. package/dist/chunk-5JAUQZQA.js.map +0 -1
  77. package/dist/chunk-C2FZ6GR6.js.map +0 -1
  78. package/dist/chunk-D6GIWPKD.js.map +0 -1
  79. package/dist/chunk-EAGRBFQF.js.map +0 -1
  80. package/dist/chunk-FNMGYYSS.js.map +0 -1
  81. package/dist/chunk-GRAGM4MC.js.map +0 -1
  82. package/dist/chunk-H7IBHAFT.js.map +0 -1
  83. package/dist/chunk-LWGVVP2C.js.map +0 -1
  84. package/dist/chunk-NBV35BR6.js.map +0 -1
  85. package/dist/chunk-OUGNIHDZ.js.map +0 -1
  86. package/dist/chunk-UZ5SODU7.js.map +0 -1
  87. package/dist/chunk-VHJDS6OR.js.map +0 -1
  88. package/dist/chunk-WIR4HOOJ.js.map +0 -1
@@ -1,18 +1,17 @@
1
- import { E as ExecutorFactory, b as ExecutorRegistry, h as Spend, c as Agent, i as Scope, d as ResultBlobStore, B as Budget } from './types-By9LXllv.js';
1
+ import { E as ExecutorFactory, b as ExecutorRegistry, h as Spend, c as Agent, i as Scope, d as ResultBlobStore, B as Budget } from './types-Driepl87.js';
2
2
  import { AgentProfile } from '@tangle-network/agent-interface';
3
- import { U as UiLens, a as UiFinding, C as CoderTask } from './substrate-rNj6TDc3.js';
4
- import { e as LoopTraceEmitter, c as LoopTraceEvent, S as SandboxClient, A as AgentRunSpec, E as ExecCtx } from './types-BF-MEsQB.js';
3
+ import { U as UiLens, a as UiFinding, C as CoderTask } from './substrate-DO2GHNg2.js';
4
+ import { e as LoopTraceEmitter, c as LoopTraceEvent, S as SandboxClient, A as AgentRunSpec, E as ExecCtx } from './types-ESeMOj94.js';
5
5
  import { SandboxEvent, SandboxInstance, BackendType } from '@tangle-network/sandbox';
6
6
  import { AgentEvalError } from '@tangle-network/agent-eval';
7
7
  import { O as OtelExporter } from './otel-export-BKmNwiCb.js';
8
- import { T as ToolSpec, R as RouterConfig } from './router-client-D6Ocf4jG.js';
9
- import { G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './worktree-harness-Dx8XULW3.js';
10
- import { L as LocalHarness } from './local-harness-DU7yV6mG.js';
8
+ import { T as ToolSpec, R as RouterConfig } from './router-client-r8y_VFVM.js';
9
+ import { G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './worktree-harness-CX_McRLp.js';
10
+ import { L as LocalHarness } from './local-harness-sI0S_XNA.js';
11
11
  import { ProviderExecutorOptions, AgentEnvironmentProviderRegistry } from './environment-provider.js';
12
12
  import { AgentEnvironmentProvider } from '@tangle-network/agent-interface/environment-provider';
13
13
 
14
14
  /**
15
- * @experimental
16
15
  *
17
16
  * The child→parent message bus: the ONE pipe carrying every message a worker, sub-driver, or
18
17
  * analyst sends up to the driver — settled outputs, questions, and trace-analyst findings. It
@@ -33,6 +32,8 @@ import { AgentEnvironmentProvider } from '@tangle-network/agent-interface/enviro
33
32
  * the SAME publish/pull/subscribe surface backed by a durable mailbox on the parent's box (children
34
33
  * POST events with at-least-once retry; payloads are blob refs so the event stays small). Consumers
35
34
  * depend only on this interface, so distribution is a transport swap, never an architecture change.
35
+ *
36
+ * @experimental
36
37
  */
37
38
  /** Every bus event is a discriminated union member keyed by `type`. */
38
39
  interface BusEvent {
@@ -78,10 +79,10 @@ interface EventBus<E extends BusEvent> {
78
79
  /** Throughput counters for observability dashboards. */
79
80
  stats(): BusStats;
80
81
  }
82
+ /** Create the child→parent coordination bus: one typed pipe for settled outputs, questions, and analyst findings, with a priority-ordered pull queue and a pass-through subscribe lane. */
81
83
  declare function createEventBus<E extends BusEvent>(now?: () => number): EventBus<E>;
82
84
 
83
85
  /**
84
- * @experimental
85
86
  *
86
87
  * Sandbox-session coder decode layer. The sandbox-session delegate (`./delegates`) and the
87
88
  * cross-restart resume driver run the in-box harness over a `SandboxClient` and need to
@@ -96,6 +97,8 @@ declare function createEventBus<E extends BusEvent>(now?: () => number): EventBu
96
97
  * projected onto `CoderOutput`; and
97
98
  * 2. an LLM-emitted JSON block (`{ branch, patch, testResult, typecheckResult, diffStats }`),
98
99
  * lifted onto `data.result` or scanned out of the assistant transcript (any harness shape).
100
+ *
101
+ * @experimental
99
102
  */
100
103
 
101
104
  /** @experimental The structured coder result the sandbox-session path decodes + gates. */
@@ -122,7 +125,6 @@ interface CoderOutput {
122
125
  }
123
126
 
124
127
  /**
125
- * @experimental
126
128
  *
127
129
  * Persistence port for the MCP delegation queue.
128
130
  *
@@ -135,6 +137,8 @@ interface CoderOutput {
135
137
  * Records MUST be JSON-safe — `FileDelegationStore` round-trips them
136
138
  * through `JSON.stringify`/`JSON.parse`, so a `Date`, `Map`, or function
137
139
  * smuggled into `args`/`result` would corrupt the journal.
140
+ *
141
+ * @experimental
138
142
  */
139
143
 
140
144
  /** @experimental */
@@ -186,7 +190,7 @@ declare class DelegationPersistenceError extends AgentEvalError {
186
190
  cause?: unknown;
187
191
  });
188
192
  }
189
- /** @experimental */
193
+ /** In-memory `DelegationStore` — suitable for single-process use and tests. @experimental */
190
194
  declare class InMemoryDelegationStore implements DelegationStore {
191
195
  private readonly records;
192
196
  loadAll(): Promise<DelegationRecord[]>;
@@ -236,7 +240,6 @@ declare class FileDelegationStore implements DelegationStore {
236
240
  }
237
241
 
238
242
  /**
239
- * @experimental
240
243
  *
241
244
  * Compact loop-trace tee for the delegation journal.
242
245
  *
@@ -251,6 +254,8 @@ declare class FileDelegationStore implements DelegationStore {
251
254
  * Payload discipline: a record's trace is hard-capped (spans + serialized
252
255
  * bytes). Past the cap the OLDEST spans are dropped and the record carries a
253
256
  * `traceTruncated: true` marker — truncation is never silent.
257
+ *
258
+ * @experimental
254
259
  */
255
260
 
256
261
  /**
@@ -325,7 +330,7 @@ interface DelegationTraceCollector {
325
330
  /** Flush buffered events of runs that never reached `loop.ended`. */
326
331
  settle(): void;
327
332
  }
328
- /** @experimental */
333
+ /** Build a `DelegationTraceCollector` that buffers loop-trace events and converts them to spans on settle. @experimental */
329
334
  declare function createDelegationTraceCollector(onSpans: (spans: DelegationTraceSpan[]) => void): DelegationTraceCollector;
330
335
  /**
331
336
  * Fan one `LoopTraceEvent` stream into several emitters — e.g. the
@@ -338,7 +343,6 @@ declare function createDelegationTraceCollector(onSpans: (spans: DelegationTrace
338
343
  declare function composeLoopTraceEmitters(...emitters: ReadonlyArray<LoopTraceEmitter | undefined>): LoopTraceEmitter | undefined;
339
344
 
340
345
  /**
341
- * @experimental
342
346
  *
343
347
  * Trace context propagation for MCP subprocess.
344
348
  *
@@ -354,6 +358,8 @@ declare function composeLoopTraceEmitters(...emitters: ReadonlyArray<LoopTraceEm
354
358
  *
355
359
  * When these env vars are absent, the MCP generates a fresh trace root —
356
360
  * the server operates standalone without trace joining.
361
+ *
362
+ * @experimental
357
363
  */
358
364
 
359
365
  interface TraceContext {
@@ -386,7 +392,6 @@ declare function createPropagatingTraceEmitter(ctx: TraceContext): {
386
392
  declare function traceContextToEnv(ctx: TraceContext): Record<string, string>;
387
393
 
388
394
  /**
389
- * @experimental
390
395
  *
391
396
  * MCP delegation tool surface — the typed inputs/outputs the product agent
392
397
  * sees over the wire. These types are the contract; the JSON schemas under
@@ -397,6 +402,8 @@ declare function traceContextToEnv(ctx: TraceContext): Record<string, string>;
397
402
  * `completed` | `failed` | `cancelled`. `delegate_feedback` +
398
403
  * `delegation_history` are synchronous reads / writes against the local
399
404
  * task queue + feedback store.
405
+ *
406
+ * @experimental
400
407
  */
401
408
 
402
409
  /** @experimental */
@@ -674,7 +681,6 @@ interface DelegationHistoryResult {
674
681
  }
675
682
 
676
683
  /**
677
- * @experimental
678
684
  *
679
685
  * State machine for async MCP delegations:
680
686
  *
@@ -698,6 +704,8 @@ interface DelegationHistoryResult {
698
704
  * stay queryable, in-flight records either re-attach through the
699
705
  * `resumeDelegate` seam (when they carry a `detachedSessionRef`) or fail
700
706
  * loud with a driver-restart error so `delegation_status` tells the truth.
707
+ *
708
+ * @experimental
701
709
  */
702
710
 
703
711
  type AnyDelegateArgs = DelegateCodeArgs | DelegateResearchArgs | DelegateUiAuditArgs;
@@ -881,7 +889,7 @@ interface DelegationTaskQueueOptions {
881
889
  */
882
890
  traceContext?: TraceContext;
883
891
  }
884
- /** @experimental */
892
+ /** In-process queue for async delegation tasks — submit, cancel, poll status, and read history. @experimental */
885
893
  declare class DelegationTaskQueue {
886
894
  private readonly records;
887
895
  private readonly controllers;
@@ -982,7 +990,6 @@ declare class DelegationTaskQueue {
982
990
  declare function hashIdempotencyInput(value: unknown): string;
983
991
 
984
992
  /**
985
- * @experimental
986
993
  *
987
994
  * Detached delegation turns over the sandbox SDK's `driveTurn` primitive.
988
995
  *
@@ -1014,6 +1021,8 @@ declare function hashIdempotencyInput(value: unknown): string;
1014
1021
  * under the `'detached-turn'` driver tag. Multi-variant fanout stays on the
1015
1022
  * streaming `runLoop` path — N concurrent sessions cannot be expressed as one
1016
1023
  * resume key, and winner selection needs every candidate.
1024
+ *
1025
+ * @experimental
1017
1026
  */
1018
1027
 
1019
1028
  /**
@@ -1072,7 +1081,7 @@ interface DetachedSessionRefParts {
1072
1081
  * @experimental
1073
1082
  */
1074
1083
  declare function formatDetachedSessionRef(parts: DetachedSessionRefParts): string;
1075
- /** @experimental Inverse of {@link formatDetachedSessionRef}; throws `ValidationError` on malformed input. */
1084
+ /** Parse a `detachedSessionRef` string back to parts; throws `ValidationError` on malformed input. @experimental */
1076
1085
  declare function parseDetachedSessionRef(raw: string): DetachedSessionRefParts;
1077
1086
  /** @experimental The terminal payload of a finished detached turn. */
1078
1087
  interface DetachedTurn {
@@ -1187,7 +1196,6 @@ interface DetachedTurnResumeDriverOptions {
1187
1196
  declare function createDetachedTurnResumeDriver(options: DetachedTurnResumeDriverOptions): DelegationResumeDriver;
1188
1197
 
1189
1198
  /**
1190
- * @experimental
1191
1199
  *
1192
1200
  * Delegation executors — the layer between MCP delegates and the sandbox
1193
1201
  * substrate. Each executor exposes a {@link SandboxClient} the kernel
@@ -1204,6 +1212,8 @@ declare function createDetachedTurnResumeDriver(options: DetachedTurnResumeDrive
1204
1212
  * in the caller's existing fleet so worker diffs land directly on the
1205
1213
  * caller's filesystem (the fleet's shared workspace). Selected when the
1206
1214
  * parent sandbox passes `TANGLE_FLEET_ID` into the MCP server's env.
1215
+ *
1216
+ * @experimental
1207
1217
  */
1208
1218
 
1209
1219
  /** @experimental */
@@ -1280,7 +1290,6 @@ interface FleetWorkspaceExecutorOptions {
1280
1290
  declare function createFleetWorkspaceExecutor(options: FleetWorkspaceExecutorOptions): DelegationExecutor;
1281
1291
 
1282
1292
  /**
1283
- * @experimental
1284
1293
  *
1285
1294
  * `detachedSessionDelegate` — the sandbox-session coder delegate: a closure that drives `runLoop`
1286
1295
  * against a `SandboxClient` + a caller-supplied (or minimal model-only default) worker profile, to a
@@ -1297,6 +1306,8 @@ declare function createFleetWorkspaceExecutor(options: FleetWorkspaceExecutorOpt
1297
1306
  * none is passed, a minimal model-only default profile is materialized in `./detached-coder` — no
1298
1307
  * hardcoded skills or tools. For NEW local-repo coding use `worktreeFanout` / `worktreeLoopRunner`
1299
1308
  * (author one `AgentProfile` per harness → `createWorktreeCliExecutor` leaves → `gateOnDeliverable`).
1309
+ *
1310
+ * @experimental
1300
1311
  */
1301
1312
 
1302
1313
  /** @experimental */
@@ -1345,13 +1356,14 @@ interface CoderReview {
1345
1356
  notes?: string;
1346
1357
  }
1347
1358
  /**
1348
- * @experimental
1349
1359
  *
1350
1360
  * Optional adversarial reviewer over a coder candidate that already passed
1351
1361
  * mechanical validation (tests/typecheck/forbidden/diff/no-op/secrets). Folded
1352
1362
  * from the ai-trading-blueprint delegation MCP: a candidate is only eligible to
1353
1363
  * win if the reviewer approves it. The reviewer is the consumer's seam — an LLM
1354
1364
  * judge, a `pnpm review` command, anything returning a `CoderReview`.
1365
+ *
1366
+ * @experimental
1355
1367
  */
1356
1368
  type CoderReviewer = (output: CoderOutput, task: CoderTask, ctx: {
1357
1369
  signal: AbortSignal;
@@ -1484,7 +1496,6 @@ interface SettleDetachedCoderTurnOptions {
1484
1496
  declare function settleDetachedCoderTurn(turn: DetachedTurn, options: SettleDetachedCoderTurnOptions): Promise<CoderOutput>;
1485
1497
 
1486
1498
  /**
1487
- * @experimental
1488
1499
  *
1489
1500
  * Feedback persistence surface for the MCP layer.
1490
1501
  *
@@ -1497,6 +1508,8 @@ declare function settleDetachedCoderTurn(turn: DetachedTurn, options: SettleDeta
1497
1508
  * Feedback events are append-only: every rating is a new event with a
1498
1509
  * fresh id, even when the same delegation is rated multiple times. The
1499
1510
  * caller decides how to roll up scores downstream.
1511
+ *
1512
+ * @experimental
1500
1513
  */
1501
1514
 
1502
1515
  /** @experimental */
@@ -1521,7 +1534,7 @@ interface FeedbackStore {
1521
1534
  refersToRef?: string;
1522
1535
  }): Promise<FeedbackEvent[]>;
1523
1536
  }
1524
- /** @experimental */
1537
+ /** In-memory `FeedbackStore` — suitable for single-process use and tests. @experimental */
1525
1538
  declare class InMemoryFeedbackStore implements FeedbackStore {
1526
1539
  private readonly events;
1527
1540
  put(event: FeedbackEvent): Promise<void>;
@@ -1539,7 +1552,6 @@ declare class InMemoryFeedbackStore implements FeedbackStore {
1539
1552
  declare function eventToSnapshot(event: FeedbackEvent): DelegationFeedbackSnapshot;
1540
1553
 
1541
1554
  /**
1542
- * @experimental
1543
1555
  *
1544
1556
  * The leaf runtime — the built-in `Executor` IMPLEMENTATIONS behind the ONE
1545
1557
  * open interface frozen in `./types`, plus the open resolver/registry that maps
@@ -1561,6 +1573,8 @@ declare function eventToSnapshot(event: FeedbackEvent): DelegationFeedbackSnapsh
1561
1573
  * Layering: `estimateCost`/`isModelPriced` are substrate primitives from
1562
1574
  * `@tangle-network/agent-eval`; `runLoop`/`acquireSandbox` are runtime kernels
1563
1575
  * from this package. No per-vendor adapters live here.
1576
+ *
1577
+ * @experimental
1564
1578
  */
1565
1579
 
1566
1580
  /**
@@ -1757,7 +1771,6 @@ declare function createExecutor(config: ExecutorConfig): ExecutorFactory<unknown
1757
1771
  declare function createExecutorRegistry(): ExecutorRegistry;
1758
1772
 
1759
1773
  /**
1760
- * @experimental
1761
1774
  *
1762
1775
  * `delegate` MCP tool — the ONE generic delegation verb, the agent-facing front door to
1763
1776
  * `delegate()` / `supervise()`. The agent hands it an INTENT (what it wants done); a default
@@ -1771,13 +1784,15 @@ declare function createExecutorRegistry(): ExecutorRegistry;
1771
1784
  * The supervisor's substrate (its brain `router`, the worker `backend`, the completion `deliverable`)
1772
1785
  * is INJECTED at server construction — never an agent-supplied arg. The agent supplies only the
1773
1786
  * intent (+ an optional per-call `model` / `runId`).
1787
+ *
1788
+ * @experimental
1774
1789
  */
1775
1790
 
1776
- /** @experimental */
1791
+ /** MCP tool name for the `delegate` generic-delegation tool. @experimental */
1777
1792
  declare const DELEGATE_TOOL_NAME = "delegate";
1778
- /** @experimental */
1793
+ /** Human-readable description of the `delegate` MCP tool, injected into the tool manifest. @experimental */
1779
1794
  declare const DELEGATE_DESCRIPTION: string;
1780
- /** @experimental */
1795
+ /** JSON Schema for `delegate` tool arguments (`intent` + optional `model` and `runId`). @experimental */
1781
1796
  declare const DELEGATE_INPUT_SCHEMA: {
1782
1797
  readonly type: "object";
1783
1798
  readonly properties: {
@@ -1803,7 +1818,7 @@ interface DelegateArgs {
1803
1818
  model?: string;
1804
1819
  runId?: string;
1805
1820
  }
1806
- /** @experimental */
1821
+ /** Parse and validate raw MCP tool input into typed `DelegateArgs`; throws `TypeError` on bad input. @experimental */
1807
1822
  declare function validateDelegateArgs(raw: unknown): DelegateArgs;
1808
1823
  /** The synchronous result the `delegate` tool returns to the calling agent: the delivered output (or
1809
1824
  * the no-winner reason) PLUS the conserved spend of the whole delegation. */
@@ -1838,7 +1853,6 @@ interface DelegateHandlerOptions {
1838
1853
  declare function createDelegateHandler(options: DelegateHandlerOptions): (raw: unknown) => Promise<DelegateResult>;
1839
1854
 
1840
1855
  /**
1841
- * @experimental
1842
1856
  *
1843
1857
  * Stdio JSON-RPC MCP server exposing the delegation tools to sandbox
1844
1858
  * coding-harness agents (claude-code, codex, opencode, ...): the generic
@@ -1856,6 +1870,8 @@ declare function createDelegateHandler(options: DelegateHandlerOptions): (raw: u
1856
1870
  * one request; each response is one line. `tools/list` and `tools/call`
1857
1871
  * mirror the MCP 2024-11-05 spec; we do not pull in
1858
1872
  * `@modelcontextprotocol/sdk` to keep the dependency footprint zero.
1873
+ *
1874
+ * @experimental
1859
1875
  */
1860
1876
 
1861
1877
  /** @experimental */
@@ -1940,7 +1956,11 @@ interface JsonRpcResponse {
1940
1956
  data?: unknown;
1941
1957
  };
1942
1958
  }
1943
- /** @experimental */
1959
+ /**
1960
+ * Stdio JSON-RPC MCP server exposing the delegation tools (`delegate`, `delegate_feedback`, `delegation_status`, `delegation_history`, optional `delegate_ui_audit`) to sandbox coding-harness agents.
1961
+ *
1962
+ * @experimental
1963
+ */
1944
1964
  declare function createMcpServer(options?: McpServerOptions): McpServer;
1945
1965
  /**
1946
1966
  * In-process pair of `Readable` + `Writable` streams suitable for driving
@@ -1957,12 +1977,13 @@ declare function createInProcessTransport(): {
1957
1977
  };
1958
1978
 
1959
1979
  /**
1960
- * @experimental
1961
1980
  *
1962
1981
  * MCP binding for a live `Scope`. A sandbox driver gets the same small verbs
1963
1982
  * the in-process driver has: spawn, observe, await, steer, ask/answer, analyze,
1964
1983
  * and stop. Settled outputs remain Scope artifacts; product code can project
1965
1984
  * them into any UI/report envelope it needs.
1985
+ *
1986
+ * @experimental
1966
1987
  */
1967
1988
 
1968
1989
  /** A worker the driver has drained via `await_event`. */
@@ -2,8 +2,8 @@ import { AgentProfile, AgentProfileValidationResult } from '@tangle-network/agen
2
2
  import { AgentEnvironmentProvider, AgentEnvironmentCapabilities, CreateAgentEnvironmentInput, AgentTurnInput, AgentProfileRef } from '@tangle-network/agent-interface/environment-provider';
3
3
  export { AgentEnvironment, AgentEnvironmentCapabilities, AgentEnvironmentEvent, AgentEnvironmentProvider, AgentEnvironmentQuery, AgentEnvironmentStatus, AgentEnvironmentSummary, AgentProfileRef, AgentSession, AgentSessionRef, AgentSessionStatus, AgentTurnInput, AgentTurnResult, CheckpointRef, CheckpointRequest, CreateAgentEnvironmentInput, ExecRequest, ExecResult, ForkRequest, PlacementInfo, ResourceRequest, WorkspaceRequest } from '@tangle-network/agent-interface/environment-provider';
4
4
  import { CreateSandboxOptions, BackendType } from '@tangle-network/sandbox';
5
- import { R as Runtime, E as ExecutorFactory } from './types-By9LXllv.js';
6
- import { S as SandboxClient } from './types-BF-MEsQB.js';
5
+ import { R as Runtime, E as ExecutorFactory } from './types-Driepl87.js';
6
+ import { S as SandboxClient } from './types-ESeMOj94.js';
7
7
  import '@tangle-network/agent-eval';
8
8
 
9
9
  /** Provider object or registry name accepted by runtime provider adapters.
@@ -4,7 +4,7 @@ import {
4
4
  providerAsSandboxClient,
5
5
  resolveAgentEnvironmentProvider,
6
6
  sandboxClientAsProvider
7
- } from "./chunk-H7IBHAFT.js";
7
+ } from "./chunk-BZF3KQ6G.js";
8
8
  import "./chunk-DGUM43GV.js";
9
9
  export {
10
10
  createAgentEnvironmentProviderRegistry,
@@ -94,7 +94,9 @@ interface SurfaceValidationIssue {
94
94
  path: string;
95
95
  reason: 'missing' | 'not-directory' | 'not-file';
96
96
  }
97
+ /** Validate an `AgentSurfaces` map on disk — missing paths fail loud at `defineAgent` time instead of silently skipping self-improvement edits. */
97
98
  declare function validateSurfaces(surfaces: AgentSurfaces, repoRoot: string): ReadonlyArray<SurfaceValidationIssue>;
99
+ /** Format a list of surface validation issues into a human-readable error string. */
98
100
  declare function renderSurfaceIssues(issues: ReadonlyArray<SurfaceValidationIssue>, repoRoot: string): string;
99
101
 
100
102
  /**
@@ -202,6 +204,7 @@ interface DraftPatchOutput {
202
204
  /** Multi-line rationale for the PR body. */
203
205
  rationale: string;
204
206
  }
207
+ /** The substrate-default `ImprovementAdapter`: resolve each finding's subject to a real surface path, LLM-draft a unified-diff patch, then auto-apply or open a PR. */
205
208
  declare function createSurfaceImprovementAdapter(opts: CreateSurfaceImprovementAdapterOpts): ImprovementAdapter<SurfaceImprovementEdit>;
206
209
 
207
210
  export { type AgentSurfaces as A, type CreateSurfaceImprovementAdapterOpts as C, type DraftPatchInput as D, type ResolvedSurface as R, type SurfaceImprovementEdit as S, type DraftPatchOutput as a, type SurfaceValidationIssue as b, createSurfaceImprovementAdapter as c, resolveSubjectPath as d, renderSurfaceIssues as r, validateSurfaces as v };