@tangle-network/agent-runtime 0.82.0 → 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-A7LZR5DT.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-DJQFJEOD.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-JYURIKPF.js → chunk-QDVLTRCP.js} +4 -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-CO2KBPRE.js → chunk-SSA6OERV.js} +6 -6
  26. package/dist/chunk-SSA6OERV.js.map +1 -0
  27. package/dist/{chunk-SRGV56W4.js → chunk-UD4BHQMI.js} +2 -2
  28. package/dist/{chunk-SRGV56W4.js.map → chunk-UD4BHQMI.js.map} +1 -1
  29. package/dist/{chunk-KSGHI53L.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 +102 -45
  55. package/dist/loops.js +7 -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-5JAUQZQA.js.map +0 -1
  76. package/dist/chunk-A7LZR5DT.js.map +0 -1
  77. package/dist/chunk-C2FZ6GR6.js.map +0 -1
  78. package/dist/chunk-CO2KBPRE.js.map +0 -1
  79. package/dist/chunk-DJQFJEOD.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-JYURIKPF.js.map +0 -1
  84. package/dist/chunk-KSGHI53L.js.map +0 -1
  85. package/dist/chunk-LWGVVP2C.js.map +0 -1
  86. package/dist/chunk-NBV35BR6.js.map +0 -1
  87. package/dist/chunk-UZ5SODU7.js.map +0 -1
  88. package/dist/chunk-WIR4HOOJ.js.map +0 -1
package/dist/lifecycle.js CHANGED
@@ -4,11 +4,11 @@ import {
4
4
  mcpBuildPrompt,
5
5
  mcpServeVerifier,
6
6
  toolBuildPrompt
7
- } from "./chunk-LWGVVP2C.js";
8
- import "./chunk-5JAUQZQA.js";
7
+ } from "./chunk-VNOOH22O.js";
8
+ import "./chunk-7LO5GMAO.js";
9
9
  import {
10
10
  ValidationError
11
- } from "./chunk-NBV35BR6.js";
11
+ } from "./chunk-YEJR7IXO.js";
12
12
  import "./chunk-DGUM43GV.js";
13
13
 
14
14
  // src/lifecycle/apply.ts
@@ -1,7 +1,6 @@
1
1
  import { ChildProcess } from 'node:child_process';
2
2
 
3
3
  /**
4
- * @experimental
5
4
  *
6
5
  * Subprocess wrappers for the local coding-harness CLIs installed in the
7
6
  * sandbox image (claude-code, codex, opencode). Used by the in-process
@@ -16,6 +15,8 @@ import { ChildProcess } from 'node:child_process';
16
15
  * - capture stdout/stderr
17
16
  * - support cancellation via AbortSignal
18
17
  * - enforce a wall-clock timeout
18
+ *
19
+ * @experimental
19
20
  */
20
21
 
21
22
  /** Local coding harness available inside the sandbox. */
@@ -1,12 +1,11 @@
1
1
  import { Scenario } from '@tangle-network/agent-eval/campaign';
2
2
  import { SelfImproveOptions, SelfImproveResult } from '@tangle-network/agent-eval/contract';
3
3
  import { R as RunAnalystLoopOpts, a as RunAnalystLoopResult } from './types-BC3bZpH0.js';
4
- import { F as FactCandidate, C as CreateKbGateOptions } from './kb-gate-CuzMYGYM.js';
5
- import { B as Budget } from './types-By9LXllv.js';
6
- import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions, b as WorktreePatchArtifact } from './worktree-fanout-D9Z2dMS9.js';
4
+ import { F as FactCandidate, C as CreateKbGateOptions } from './kb-gate-CwHO0vz6.js';
5
+ import { B as Budget } from './types-Driepl87.js';
6
+ import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions, b as WorktreePatchArtifact } from './worktree-fanout-D6xR2CIA.js';
7
7
 
8
8
  /**
9
- * @experimental
10
9
  *
11
10
  * `runDelegatedLoop` — the configured delegated loop-runner.
12
11
  *
@@ -25,13 +24,15 @@ import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions,
25
24
  * mode routing, timing, fail-loud on an unregistered mode, and a uniform result
26
25
  * shape; each mode's engine is a pre-configured runner in the registry (build it
27
26
  * with the factories below, or inject your own / a stub).
27
+ *
28
+ * @experimental
28
29
  */
29
30
 
30
- /** @experimental Every delegated-loop mode, for validation + CLI surfaces. */
31
+ /** All valid delegated-loop mode names — used for validation and CLI surfaces. @experimental */
31
32
  declare const DELEGATED_LOOP_MODES: readonly ["code", "review", "research", "audit", "self-improve"];
32
33
  /** @experimental */
33
34
  type DelegatedLoopMode = (typeof DELEGATED_LOOP_MODES)[number];
34
- /** @experimental Type guard for an untrusted mode string (CLI / config input). */
35
+ /** Type guard returns true when `value` is a valid `DelegatedLoopMode` string. @experimental */
35
36
  declare function isDelegatedLoopMode(value: unknown): value is DelegatedLoopMode;
36
37
  /** @experimental A pre-configured loop for one mode. Returns the mode's raw
37
38
  * output; the dispatcher wraps it in a {@link DelegatedLoopResult}. */
@@ -55,12 +56,13 @@ interface RunDelegatedLoopOptions {
55
56
  now?: () => number;
56
57
  }
57
58
  /**
58
- * @experimental
59
59
  *
60
60
  * Dispatch a configured loop by mode. Fails loud (throws `ConfigError`) when no
61
61
  * runner is registered for the mode — a routine pointed at an unwired mode is a
62
62
  * config bug, not a silent no-op. A runner that throws is captured as
63
63
  * `{ ok: false }` so unattended runs record the failure rather than crash.
64
+ *
65
+ * @experimental
64
66
  */
65
67
  declare function runDelegatedLoop<T = unknown>(mode: DelegatedLoopMode, registry: DelegatedLoopRegistry, options?: RunDelegatedLoopOptions): Promise<DelegatedLoopResult<T>>;
66
68
  /** @experimental Options for the local-repo `code` runner over the GENERIC recursive path. */
@@ -91,7 +93,6 @@ interface WorktreeLoopRunnerOptions {
91
93
  runCommand?: WorktreeFanoutOptions['runCommand'];
92
94
  }
93
95
  /**
94
- * @experimental
95
96
  *
96
97
  * `code` mode on the GENERIC recursive path: author one `AgentProfile` per harness, run them as a
97
98
  * `worktreeFanout` (N `createWorktreeCliExecutor` leaves, each `gateOnDeliverable`) through
@@ -102,6 +103,8 @@ interface WorktreeLoopRunnerOptions {
102
103
  * the winner is the shared valid-only selector (NOT `defaultSelectWinner`, whose non-valid fallback
103
104
  * would surface an ungated patch). Equal-k holds by the conserved budget pool. Returns the winning
104
105
  * patch artifact, or throws when no candidate is delivered (fail loud, never a vacuous done).
106
+ *
107
+ * @experimental
105
108
  */
106
109
  declare function worktreeLoopRunner(options: WorktreeLoopRunnerOptions): DelegatedLoopRunner<WorktreePatchArtifact>;
107
110
  /** @experimental A fact rejected at the KB gate — surfaced, never dropped. */
@@ -134,21 +137,30 @@ interface ResearchLoopRunnerOptions {
134
137
  maxRounds?: number;
135
138
  }
136
139
  /**
137
- * @experimental `research` mode — research-in-a-loop with valid-only KB growth.
140
+ * `research` mode — research-in-a-loop with valid-only KB growth.
138
141
  *
139
142
  * Each round: research → gate every candidate (fail-closed; passage MUST be in
140
143
  * the source) → accept the clean ones → re-research the vetoed ones next round,
141
144
  * up to `maxRounds`. Vetoed facts in the final round are RETURNED (escalate,
142
145
  * never silently dropped) so the caller audits vs retries.
146
+ *
147
+ * @experimental
143
148
  */
144
149
  declare function researchLoopRunner(o: ResearchLoopRunnerOptions): DelegatedLoopRunner<ResearchLoopResult>;
145
- /** @experimental `self-improve` mode — agent-eval's one-call closed loop (held-out gated). */
150
+ /**
151
+ * `self-improve` mode — agent-eval's one-call closed improvement loop (held-out gated).
152
+ *
153
+ * @experimental
154
+ */
146
155
  declare function selfImproveLoopRunner<TScenario extends Scenario, TArtifact>(options: SelfImproveOptions<TScenario, TArtifact>): DelegatedLoopRunner<SelfImproveResult<TScenario, TArtifact>>;
147
- /** @experimental `audit` mode — analyst loop over captured trace/run data. */
156
+ /**
157
+ * `audit` mode — analyst loop over captured trace/run data.
158
+ *
159
+ * @experimental
160
+ */
148
161
  declare function auditLoopRunner<TProposal = unknown, TEdit = unknown>(options: RunAnalystLoopOpts): DelegatedLoopRunner<RunAnalystLoopResult<TProposal, TEdit>>;
149
162
 
150
163
  /**
151
- * @experimental
152
164
  *
153
165
  * `agent-runtime-loop` — the schedulable entrypoint for the configured
154
166
  * delegated loop-runner. A cron job / routine / Makefile target invokes:
@@ -160,6 +172,8 @@ declare function auditLoopRunner<TProposal = unknown, TEdit = unknown>(options:
160
172
  * export a `DelegatedLoopRegistry`, or a `() => DelegatedLoopRegistry | Promise<…>`.
161
173
  * The bin runs the selected mode, prints the `DelegatedLoopResult` as JSON, and
162
174
  * exits 0 on `ok`, 1 on a recorded failure, 2 on a usage/config error.
175
+ *
176
+ * @experimental
163
177
  */
164
178
 
165
179
  /** @experimental Parsed CLI invocation. */
@@ -176,11 +190,12 @@ interface LoopRunnerCliResult {
176
190
  error?: string;
177
191
  }
178
192
  /**
179
- * @experimental
180
193
  *
181
194
  * Pure CLI core (no process / argv / IO) so it's unit-testable: validate the
182
195
  * mode, load the registry, dispatch, map to an exit code (0 ok / 1 failed /
183
196
  * 2 usage). Exported for embedding in custom runners + tests.
197
+ *
198
+ * @experimental
184
199
  */
185
200
  declare function runLoopRunnerCli(args: LoopRunnerCliArgs): Promise<LoopRunnerCliResult>;
186
201
  /** Parse `--mode X --config Y` from an argv tail (`process.argv.slice(2)`). */
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- export { L as LoopRunnerCliArgs, e as LoopRunnerCliResult, p as parseLoopRunnerArgv, k as runLoopRunnerCli } from './loop-runner-bin-CBkLsyFg.js';
2
+ export { L as LoopRunnerCliArgs, e as LoopRunnerCliResult, p as parseLoopRunnerArgv, k as runLoopRunnerCli } from './loop-runner-bin-hQDUL8Ld.js';
3
3
  import '@tangle-network/agent-eval/campaign';
4
4
  import '@tangle-network/agent-eval/contract';
5
5
  import './types-BC3bZpH0.js';
6
6
  import '@tangle-network/agent-eval';
7
- import './kb-gate-CuzMYGYM.js';
8
- import './types-By9LXllv.js';
7
+ import './kb-gate-CwHO0vz6.js';
8
+ import './types-Driepl87.js';
9
9
  import '@tangle-network/agent-interface';
10
10
  import '@tangle-network/sandbox';
11
- import './types-BF-MEsQB.js';
12
- import './worktree-fanout-D9Z2dMS9.js';
13
- import './worktree-harness-Dx8XULW3.js';
14
- import './local-harness-DU7yV6mG.js';
11
+ import './types-ESeMOj94.js';
12
+ import './worktree-fanout-D6xR2CIA.js';
13
+ import './worktree-harness-CX_McRLp.js';
14
+ import './local-harness-sI0S_XNA.js';
15
15
  import 'node:child_process';
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  parseLoopRunnerArgv,
4
4
  runLoopRunnerCli
5
- } from "./chunk-KSGHI53L.js";
6
- import "./chunk-FNMGYYSS.js";
7
- import "./chunk-JYURIKPF.js";
8
- import "./chunk-CO2KBPRE.js";
9
- import "./chunk-SRGV56W4.js";
10
- import "./chunk-H7IBHAFT.js";
11
- import "./chunk-C2FZ6GR6.js";
5
+ } from "./chunk-UJ3ONGHR.js";
6
+ import "./chunk-SGKPNBXE.js";
7
+ import "./chunk-QDVLTRCP.js";
8
+ import "./chunk-SSA6OERV.js";
9
+ import "./chunk-UD4BHQMI.js";
10
+ import "./chunk-BZF3KQ6G.js";
11
+ import "./chunk-YPA5MLVE.js";
12
12
  import "./chunk-4J6RBI3K.js";
13
- import "./chunk-5JAUQZQA.js";
14
- import "./chunk-NBV35BR6.js";
15
- import "./chunk-WIR4HOOJ.js";
13
+ import "./chunk-7LO5GMAO.js";
14
+ import "./chunk-YEJR7IXO.js";
15
+ import "./chunk-DPEUKJRO.js";
16
16
  import "./chunk-DGUM43GV.js";
17
17
  export {
18
18
  parseLoopRunnerArgv,