@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.
- package/README.md +4 -0
- package/dist/agent.d.ts +5 -3
- package/dist/agent.js +7 -7
- package/dist/agent.js.map +1 -1
- package/dist/analyst-loop.d.ts +3 -2
- package/dist/analyst-loop.js +2 -2
- package/dist/{chunk-35WXYO26.js → chunk-4WXGK6GV.js} +2 -2
- package/dist/chunk-4WXGK6GV.js.map +1 -0
- package/dist/{chunk-UZ5SODU7.js → chunk-5IBQAPVB.js} +1 -1
- package/dist/chunk-5IBQAPVB.js.map +1 -0
- package/dist/{chunk-5JAUQZQA.js → chunk-7LO5GMAO.js} +1 -1
- package/dist/chunk-7LO5GMAO.js.map +1 -0
- package/dist/{chunk-H7IBHAFT.js → chunk-BZF3KQ6G.js} +1 -1
- package/dist/chunk-BZF3KQ6G.js.map +1 -0
- package/dist/{chunk-WIR4HOOJ.js → chunk-DPEUKJRO.js} +1 -1
- package/dist/chunk-DPEUKJRO.js.map +1 -0
- package/dist/{chunk-EAGRBFQF.js → chunk-J3N6GODQ.js} +2 -2
- package/dist/chunk-J3N6GODQ.js.map +1 -0
- package/dist/{chunk-GRAGM4MC.js → chunk-NURIQBJQ.js} +1 -1
- package/dist/chunk-NURIQBJQ.js.map +1 -0
- package/dist/{chunk-D6GIWPKD.js → chunk-QDVLTRCP.js} +51 -4
- package/dist/chunk-QDVLTRCP.js.map +1 -0
- package/dist/{chunk-FNMGYYSS.js → chunk-SGKPNBXE.js} +1 -1
- package/dist/chunk-SGKPNBXE.js.map +1 -0
- package/dist/{chunk-VHJDS6OR.js → chunk-SSA6OERV.js} +6 -6
- package/dist/chunk-SSA6OERV.js.map +1 -0
- package/dist/{chunk-BPS254IE.js → chunk-UD4BHQMI.js} +2 -2
- package/dist/{chunk-BPS254IE.js.map → chunk-UD4BHQMI.js.map} +1 -1
- package/dist/{chunk-OUGNIHDZ.js → chunk-UJ3ONGHR.js} +6 -6
- package/dist/chunk-UJ3ONGHR.js.map +1 -0
- package/dist/{chunk-LWGVVP2C.js → chunk-VNOOH22O.js} +2 -2
- package/dist/chunk-VNOOH22O.js.map +1 -0
- package/dist/{chunk-NBV35BR6.js → chunk-YEJR7IXO.js} +1 -1
- package/dist/chunk-YEJR7IXO.js.map +1 -0
- package/dist/{chunk-C2FZ6GR6.js → chunk-YPA5MLVE.js} +2 -2
- package/dist/chunk-YPA5MLVE.js.map +1 -0
- package/dist/{coordination-BI9tpcmF.d.ts → coordination-CuDLO8wj.d.ts} +53 -32
- package/dist/environment-provider.d.ts +2 -2
- package/dist/environment-provider.js +1 -1
- package/dist/{improvement-adapter-CioiEE2z.d.ts → improvement-adapter-CDR8QNVM.d.ts} +3 -0
- package/dist/index.d.ts +163 -49
- package/dist/index.js +43 -13
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +14 -8
- package/dist/intelligence.js +1 -1
- package/dist/intelligence.js.map +1 -1
- package/dist/{kb-gate-CuzMYGYM.d.ts → kb-gate-CwHO0vz6.d.ts} +4 -2
- package/dist/lifecycle.d.ts +2 -2
- package/dist/lifecycle.js +3 -3
- package/dist/{local-harness-DU7yV6mG.d.ts → local-harness-sI0S_XNA.d.ts} +2 -1
- package/dist/{loop-runner-bin-CBkLsyFg.d.ts → loop-runner-bin-hQDUL8Ld.d.ts} +28 -13
- package/dist/loop-runner-bin.d.ts +7 -7
- package/dist/loop-runner-bin.js +10 -10
- package/dist/loops.d.ts +153 -46
- package/dist/loops.js +9 -7
- package/dist/mcp/bin.js +8 -8
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +44 -38
- package/dist/mcp/index.js +11 -11
- package/dist/mcp/index.js.map +1 -1
- package/dist/{mcp-serve-verifier-BvMAV_8U.d.ts → mcp-serve-verifier-FL7-ZEb_.d.ts} +8 -3
- package/dist/{openai-tools-B-3v06BE.d.ts → openai-tools-BnrOmGjN.d.ts} +7 -4
- package/dist/platform.d.ts +4 -0
- package/dist/platform.js.map +1 -1
- package/dist/profiles.d.ts +36 -23
- package/dist/profiles.js +2 -2
- package/dist/profiles.js.map +1 -1
- package/dist/{router-client-D6Ocf4jG.d.ts → router-client-r8y_VFVM.d.ts} +1 -0
- package/dist/{substrate-rNj6TDc3.d.ts → substrate-DO2GHNg2.d.ts} +5 -3
- package/dist/{types-By9LXllv.d.ts → types-Driepl87.d.ts} +3 -2
- package/dist/{types-BF-MEsQB.d.ts → types-ESeMOj94.d.ts} +26 -11
- package/dist/{worktree-fanout-D9Z2dMS9.d.ts → worktree-fanout-D6xR2CIA.d.ts} +16 -10
- package/dist/{worktree-harness-Dx8XULW3.d.ts → worktree-harness-CX_McRLp.d.ts} +11 -8
- package/package.json +1 -1
- package/dist/chunk-35WXYO26.js.map +0 -1
- package/dist/chunk-5JAUQZQA.js.map +0 -1
- package/dist/chunk-C2FZ6GR6.js.map +0 -1
- package/dist/chunk-D6GIWPKD.js.map +0 -1
- package/dist/chunk-EAGRBFQF.js.map +0 -1
- package/dist/chunk-FNMGYYSS.js.map +0 -1
- package/dist/chunk-GRAGM4MC.js.map +0 -1
- package/dist/chunk-H7IBHAFT.js.map +0 -1
- package/dist/chunk-LWGVVP2C.js.map +0 -1
- package/dist/chunk-NBV35BR6.js.map +0 -1
- package/dist/chunk-OUGNIHDZ.js.map +0 -1
- package/dist/chunk-UZ5SODU7.js.map +0 -1
- package/dist/chunk-VHJDS6OR.js.map +0 -1
- 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-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-VNOOH22O.js";
|
|
8
|
+
import "./chunk-7LO5GMAO.js";
|
|
9
9
|
import {
|
|
10
10
|
ValidationError
|
|
11
|
-
} from "./chunk-
|
|
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-
|
|
5
|
-
import { B as Budget } from './types-
|
|
6
|
-
import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions, b as WorktreePatchArtifact } from './worktree-fanout-
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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-
|
|
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-
|
|
8
|
-
import './types-
|
|
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-
|
|
12
|
-
import './worktree-fanout-
|
|
13
|
-
import './worktree-harness-
|
|
14
|
-
import './local-harness-
|
|
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';
|
package/dist/loop-runner-bin.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
parseLoopRunnerArgv,
|
|
4
4
|
runLoopRunnerCli
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
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-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
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,
|