@tangle-network/agent-runtime 0.79.2 → 0.79.3
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/dist/agent.js +2 -2
- package/dist/{chunk-2DS6T46I.js → chunk-63MHOCIE.js} +3 -3
- package/dist/{chunk-75V2XXYJ.js → chunk-AG335EXG.js} +2 -2
- package/dist/chunk-AG335EXG.js.map +1 -0
- package/dist/{chunk-TSDKBFZP.js → chunk-KRULXIWS.js} +411 -110
- package/dist/chunk-KRULXIWS.js.map +1 -0
- package/dist/{chunk-SONQUREI.js → chunk-PVPFDTO3.js} +2 -2
- package/dist/{coordination-BoEPhGas.d.ts → coordination-DCmljYDf.d.ts} +29 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/intelligence.d.ts +1 -1
- package/dist/{loop-runner-bin-DCr5OMe5.d.ts → loop-runner-bin-C4X0FZ2Z.d.ts} +1 -1
- package/dist/loop-runner-bin.d.ts +3 -3
- package/dist/loop-runner-bin.js +3 -3
- package/dist/loops.d.ts +48 -9
- package/dist/loops.js +2 -2
- package/dist/mcp/bin.js +1 -1
- package/dist/mcp/index.d.ts +5 -5
- package/dist/mcp/index.js +3 -3
- package/dist/{router-client-CMAWGv1h.d.ts → router-client-Ak2IGuXq.d.ts} +33 -1
- package/dist/{worktree-fanout-CtQrRDME.d.ts → worktree-fanout-CXGzHET4.d.ts} +4 -73
- package/dist/{worktree-CpptK3oF.d.ts → worktree-harness-Bmho9SH0.d.ts} +73 -1
- package/package.json +1 -1
- package/dist/chunk-75V2XXYJ.js.map +0 -1
- package/dist/chunk-TSDKBFZP.js.map +0 -1
- /package/dist/{chunk-2DS6T46I.js.map → chunk-63MHOCIE.js.map} +0 -0
- /package/dist/{chunk-SONQUREI.js.map → chunk-PVPFDTO3.js.map} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { a as Executor } from './types-C1sozrte.js';
|
|
2
|
+
import { L as LocalHarness } from './local-harness-DU7yV6mG.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @experimental
|
|
@@ -122,4 +123,75 @@ declare function captureWorktreeDiff(options: DiffOptions): Promise<DiffResult>;
|
|
|
122
123
|
/** @experimental */
|
|
123
124
|
declare function removeWorktree(options: RemoveWorktreeOptions): Promise<void>;
|
|
124
125
|
|
|
125
|
-
|
|
126
|
+
/**
|
|
127
|
+
* @experimental
|
|
128
|
+
*
|
|
129
|
+
* The ONE worktree-harness execution core. The physical act — run a supervisor-authored
|
|
130
|
+
* `AgentProfile` on a local coding-harness CLI (claude / codex / opencode) against a fresh git
|
|
131
|
+
* worktree off `repoRoot`, capture the diff, derive the test/typecheck PASS signals, then clean
|
|
132
|
+
* up — lives here ONCE. Two executors adapt it to two ports without re-implementing it:
|
|
133
|
+
* - `createWorktreeCliExecutor` — the `Scope`/`Supervisor` leaf `Executor`.
|
|
134
|
+
* - `createInProcessExecutor` — the `runLoop` `SandboxClient` / coder-delegate path.
|
|
135
|
+
*
|
|
136
|
+
* §1.5 by construction: the authored `profile.prompt.systemPrompt` + `profile.model.default`
|
|
137
|
+
* reach the harness through `harnessInvocation` HERE, so neither port can drop them — the exact
|
|
138
|
+
* bug that existed while the in-process path called `runLocalHarness` with only the task prompt.
|
|
139
|
+
*
|
|
140
|
+
* Lifecycle: `createWorktree` → `harnessInvocation` + `runLocalHarness` → `captureWorktreeDiff`
|
|
141
|
+
* (BEFORE checks, so the patch is the harness's output, not polluted by files a test run writes)
|
|
142
|
+
* → the configured test/typecheck commands in the live worktree → return the result + a `cleanup`
|
|
143
|
+
* the caller invokes at its own teardown point. A throw cleans up before propagating, so a failed
|
|
144
|
+
* run never leaks a worktree.
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
/** Outcome of one verification command run in the worktree (test or typecheck). */
|
|
148
|
+
interface WorktreeCommandResult {
|
|
149
|
+
/** The shell command line that was run. */
|
|
150
|
+
command: string;
|
|
151
|
+
/** Did the command exit 0? The PASS signal a deliverable gate / coder output reads. */
|
|
152
|
+
passed: boolean;
|
|
153
|
+
/** OS exit code, or `null` when killed before exit. */
|
|
154
|
+
exitCode: number | null;
|
|
155
|
+
/** Combined stdout+stderr (capped) — surfaced in traces for diagnosis. */
|
|
156
|
+
output: string;
|
|
157
|
+
}
|
|
158
|
+
/** The canonical result of one worktree-harness run, projected by each port to its own shape. */
|
|
159
|
+
interface WorktreeHarnessResult {
|
|
160
|
+
/** The branch the worktree was cut on (`delegate/<runId>`). */
|
|
161
|
+
branch: string;
|
|
162
|
+
/** `git diff` of the worktree against its base — the unified patch the harness produced. */
|
|
163
|
+
patch: string;
|
|
164
|
+
/** Shortstat-derived change counts. */
|
|
165
|
+
stats: {
|
|
166
|
+
filesChanged: number;
|
|
167
|
+
insertions: number;
|
|
168
|
+
deletions: number;
|
|
169
|
+
};
|
|
170
|
+
/** The harness subprocess outcome. */
|
|
171
|
+
harness: {
|
|
172
|
+
name: LocalHarness | 'bridge';
|
|
173
|
+
exitCode: number | null;
|
|
174
|
+
timedOut: boolean;
|
|
175
|
+
killedBySignal: NodeJS.Signals | null;
|
|
176
|
+
durationMs: number;
|
|
177
|
+
stdout: string;
|
|
178
|
+
stderr: string;
|
|
179
|
+
};
|
|
180
|
+
/** Verification signals derived in the live worktree (present only when commands were given). */
|
|
181
|
+
checks?: {
|
|
182
|
+
tests?: WorktreeCommandResult;
|
|
183
|
+
typecheck?: WorktreeCommandResult;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/** The single shell-command-in-worktree runner seam (replaces the per-executor copies). */
|
|
187
|
+
type WorktreeCheckRunner = (opts: {
|
|
188
|
+
command: string;
|
|
189
|
+
cwd: string;
|
|
190
|
+
timeoutMs: number;
|
|
191
|
+
signal?: AbortSignal;
|
|
192
|
+
}) => Promise<{
|
|
193
|
+
exitCode: number | null;
|
|
194
|
+
output: string;
|
|
195
|
+
}>;
|
|
196
|
+
|
|
197
|
+
export { type CreateWorktreeOptions as C, type DeliverableSpec as D, type GitRunner as G, type RemoveWorktreeOptions as R, type WorktreeHarnessResult as W, type WorktreeCheckRunner as a, type DiffOptions as b, type DiffResult as c, type WorktreeHandle as d, captureWorktreeDiff as e, createWorktree as f, type WorktreeCommandResult as g, gateOnDeliverable as h, removeWorktree as r };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-runtime",
|
|
3
|
-
"version": "0.79.
|
|
3
|
+
"version": "0.79.3",
|
|
4
4
|
"description": "Shared task-lifecycle skeleton for agents: a recursive loop kernel for chat turns, one-shot tasks, and multi-attempt loops, with trace capture and eval-gated self-improvement. Domain behavior lives in adapters; scoring and ship-gates in @tangle-network/agent-eval.",
|
|
5
5
|
"homepage": "https://github.com/tangle-network/agent-runtime#readme",
|
|
6
6
|
"repository": {
|