@tangle-network/agent-runtime 0.95.0 → 0.97.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 +64 -15
- package/dist/activation-B0ZD7nfX.d.ts +63 -0
- package/dist/agent.d.ts +5 -169
- package/dist/agent.js +8 -229
- package/dist/agent.js.map +1 -1
- package/dist/analyst-loop.d.ts +6 -9
- package/dist/analyst-loop.js +1 -2
- package/dist/candidate-execution/index.js +6 -7
- package/dist/chunk-3XKSBI2U.js +474 -0
- package/dist/chunk-3XKSBI2U.js.map +1 -0
- package/dist/{chunk-6YBA64Z2.js → chunk-6XKPVJAZ.js} +5 -18
- package/dist/chunk-6XKPVJAZ.js.map +1 -0
- package/dist/{chunk-MKGRLDWB.js → chunk-BLQIYRVR.js} +17 -2
- package/dist/chunk-BLQIYRVR.js.map +1 -0
- package/dist/{chunk-QDSOD7RC.js → chunk-FD2MBMOH.js} +13 -101
- package/dist/chunk-FD2MBMOH.js.map +1 -0
- package/dist/{chunk-YLUOTX6U.js → chunk-FXF2OL34.js} +7 -7
- package/dist/{chunk-EP6RVHMX.js → chunk-HZDEXTSL.js} +848 -2
- package/dist/chunk-HZDEXTSL.js.map +1 -0
- package/dist/chunk-PSOCBNM3.js +2069 -0
- package/dist/chunk-PSOCBNM3.js.map +1 -0
- package/dist/{chunk-BPGXIKK7.js → chunk-SGQ4YIQW.js} +4 -4
- package/dist/{chunk-IADLKE7I.js → chunk-UQ6PNNXM.js} +5 -7
- package/dist/{chunk-IADLKE7I.js.map → chunk-UQ6PNNXM.js.map} +1 -1
- package/dist/{chunk-Z5I642SY.js → chunk-WYC2XJF2.js} +2 -2
- package/dist/{chunk-ZEYAT33L.js → chunk-Y3SRWZMP.js} +2 -2
- package/dist/{chunk-WTZ37EQY.js → chunk-YOLKCWRV.js} +197 -90
- package/dist/chunk-YOLKCWRV.js.map +1 -0
- package/dist/conversation.js +0 -1
- package/dist/environment-provider.js +0 -1
- package/dist/{agentic-generator-hCaQRAes.d.ts → improve-g75IE2Cx.d.ts} +152 -3
- package/dist/{improvement-adapter-BieWeK5J.d.ts → improvement-adapter-HAZz-7vK.d.ts} +8 -31
- package/dist/index.d.ts +41 -11
- package/dist/index.js +180 -51
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +16 -9
- package/dist/intelligence.js +13 -8
- package/dist/intelligence.js.map +1 -1
- package/dist/knowledge.d.ts +30 -13
- package/dist/knowledge.js +11 -10
- package/dist/{loop-runner-bin-BIQldFS8.d.ts → loop-runner-bin-Cn1N2rRo.d.ts} +1 -1
- package/dist/loop-runner-bin.d.ts +2 -2
- package/dist/loop-runner-bin.js +6 -8
- package/dist/loops.d.ts +1 -1
- package/dist/loops.js +4 -6
- package/dist/mcp/bin.js +3 -5
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.js +10 -12
- package/dist/mcp/index.js.map +1 -1
- package/dist/platform.js +0 -2
- package/dist/platform.js.map +1 -1
- package/dist/primeintellect/index.js +0 -1
- package/dist/primeintellect/index.js.map +1 -1
- package/dist/profiles.js +0 -1
- package/dist/profiles.js.map +1 -1
- package/dist/{types-BC3bZpH0.d.ts → types-CmYCMbFT.d.ts} +12 -54
- package/package.json +8 -13
- package/skills/build-with-agent-runtime/SKILL.md +122 -213
- package/dist/chunk-6O73TRHW.js +0 -142
- package/dist/chunk-6O73TRHW.js.map +0 -1
- package/dist/chunk-6YBA64Z2.js.map +0 -1
- package/dist/chunk-AP7CPGMZ.js +0 -334
- package/dist/chunk-AP7CPGMZ.js.map +0 -1
- package/dist/chunk-DGUM43GV.js +0 -11
- package/dist/chunk-DGUM43GV.js.map +0 -1
- package/dist/chunk-DHCHL6OG.js +0 -625
- package/dist/chunk-DHCHL6OG.js.map +0 -1
- package/dist/chunk-EP6RVHMX.js.map +0 -1
- package/dist/chunk-G55QE4IQ.js +0 -1137
- package/dist/chunk-G55QE4IQ.js.map +0 -1
- package/dist/chunk-ISTDY47H.js +0 -849
- package/dist/chunk-ISTDY47H.js.map +0 -1
- package/dist/chunk-MKGRLDWB.js.map +0 -1
- package/dist/chunk-QDSOD7RC.js.map +0 -1
- package/dist/chunk-WTZ37EQY.js.map +0 -1
- package/dist/generator-YkAQrOoD.d.ts +0 -382
- package/dist/improve-B-UYaEH5.d.ts +0 -172
- package/dist/lifecycle.d.ts +0 -870
- package/dist/lifecycle.js +0 -981
- package/dist/lifecycle.js.map +0 -1
- package/dist/mcp-serve-verifier-Bs_n0xPc.d.ts +0 -34
- package/skills/agent-runtime-adoption/SKILL.md +0 -246
- /package/dist/{chunk-YLUOTX6U.js.map → chunk-FXF2OL34.js.map} +0 -0
- /package/dist/{chunk-BPGXIKK7.js.map → chunk-SGQ4YIQW.js.map} +0 -0
- /package/dist/{chunk-Z5I642SY.js.map → chunk-WYC2XJF2.js.map} +0 -0
- /package/dist/{chunk-ZEYAT33L.js.map → chunk-Y3SRWZMP.js.map} +0 -0
|
@@ -1,217 +1,126 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: build-with-agent-runtime
|
|
3
|
-
description: Use before
|
|
3
|
+
description: Use before adding an agent loop, benchmark, optimizer, trace wrapper, or candidate activation path. Find and compose the existing Runtime, Eval, Knowledge, and Interface primitives.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- `
|
|
127
|
-
budget pool breaks equal-compute claims).
|
|
128
|
-
- a per-step cost/token tally over events **≈** `createWaterfallCollector` (the
|
|
129
|
-
sum of spans IS the billed run cost; a parallel tally drifts).
|
|
130
|
-
- your own bootstrap loop / PRNG per gate **≈** `pairedLift` / `promotionGate`
|
|
131
|
-
(seeded, identical run-to-run; never report a point lift without `low/high/pairs`).
|
|
132
|
-
- a per-product `HARNESSES` / `HarnessBackend` list + a metadata-harness reader
|
|
133
|
-
**≈** `CODING_HARNESSES` + `expandProfileAxes` (the one canonical harness list;
|
|
134
|
-
vendor-locked harnesses SNAP to their native model via `HARNESS_NATIVE_MODEL`,
|
|
135
|
-
never dropped) and the
|
|
136
|
-
`AgentProfileCell` stamped by `runProfileMatrix`, pivoted via
|
|
137
|
-
`groupRunsByAgentProfileCell` — never bake the harness into the model id so the
|
|
138
|
-
same model can run under multiple harnesses.
|
|
139
|
-
- a per-product leaderboard CLI (flag parsing + run-dir management + axis
|
|
140
|
-
expansion + a `runProfileMatrix` call + export/markdown) **≈**
|
|
141
|
-
`defineLeaderboard` (0.84+; it owns that whole frame — FRESH default run-dir,
|
|
142
|
-
standard `--backend`/`--harnesses`/`--models`/`--cases`/`--shots`/`--reps`
|
|
143
|
-
flags, `toBenchmarkAdapter()`; the product writes ~150-250 domain lines).
|
|
144
|
-
- a backend factory / `if (backend === 'router') ... else ...` branch or a
|
|
145
|
-
hand-faked box around a non-box executor **≈** `resolveSandboxClient`
|
|
146
|
-
(harness-in-box: `'sandbox' | 'bridge' | 'router'`) or `resolveAgentBackend`
|
|
147
|
-
(in-process: `'router' | 'tcloud' | 'cli-bridge' | 'sandbox'`) — grep the
|
|
148
|
-
substrate first; `inlineSandboxClient` and the bridge executor exist.
|
|
149
|
-
- a per-provider stream→event mapper for a single agent turn **≈**
|
|
150
|
-
`streamAgentTurn` + `collectAgentTurn` (0.85+; one `RuntimeStreamEvent`
|
|
151
|
-
contract over box / executor / chat, guaranteed terminal result+usage).
|
|
152
|
-
|
|
153
|
-
## End-to-end recipe
|
|
154
|
-
|
|
155
|
-
`docs/canonical-api.md` §4 is the real composition — copy it from there, don't
|
|
156
|
-
re-derive: **define a genome → run driver⟷worker via the reactive substrate over
|
|
157
|
-
a multi-turn `AgenticSurface` → measure with `runBenchmark` → optimize a prompt
|
|
158
|
-
surface with `selfImprove` → certify on a frozen holdout with the gate.** For the
|
|
159
|
-
multi-generation flywheel, replace the measure/certify steps with one
|
|
160
|
-
`runStrategyEvolution(...)` and read `report.verdict` (NOT `report.trajectory`)
|
|
161
|
-
as the evidence. For a sandbox coding rollout judged by an external deterministic
|
|
162
|
-
checker, use the bench-gate path: `resolveAdapter(...)` to pick the benchmark,
|
|
163
|
-
then `openSandboxRun(client, { agentRun: sandboxAgentRun({ profile }), ... },
|
|
164
|
-
deliverable)` per task, A/B-ing a blind arm against an `llmAnalyst`-steered arm
|
|
165
|
-
at equal compute (both helpers live in `bench/src/sandbox-run.ts`; the blind arm
|
|
166
|
-
is the mandatory equal-compute control). See `bench/src/commit0-gate.mts` /
|
|
167
|
-
`gate.ts` for the live shape.
|
|
168
|
-
|
|
169
|
-
## Two substrates — pick one, don't invent a third
|
|
170
|
-
|
|
171
|
-
Both implement the same recursive-decision atom over the one `Executor` port and
|
|
172
|
-
share `defaultSelectWinner`. **Reactive** (`Supervisor`/`Scope` + personify
|
|
173
|
-
combinators: `runPersonified`/`runAgentic`/`runBenchmark`) — prefer for NEW
|
|
174
|
-
recursive work; equal-k by construction. **Round-synchronous** (`runLoop` driven
|
|
175
|
-
by a caller-supplied `Driver`, plus the bench gates over `openSandboxRun`) —
|
|
176
|
-
sandbox coding rollouts against external benchmarks. The full when-which map is
|
|
177
|
-
`docs/canonical-api.md` §6.
|
|
178
|
-
|
|
179
|
-
## Observe / ship with the Intelligence SDK
|
|
180
|
-
|
|
181
|
-
One hook wraps any agent with send + receive + billing boundary:
|
|
182
|
-
`withIntelligence(agent, { project, target, effort })`, `effort ∈
|
|
183
|
-
off|eco|standard|thorough|max` (`'off'` is the provable passthrough floor —
|
|
184
|
-
intelligence spend clamped to 0). It SENDs a typed `RunRecord` and RECEIVEs the
|
|
185
|
-
certified profile, building on `createOtelExporter` + `buildLoopOtelSpans` —
|
|
186
|
-
don't hand-roll a trace-wrapper, a second receive path, or effort/tier config.
|
|
187
|
-
Verify the live subpath against `src/intelligence/with-intelligence.ts`.
|
|
188
|
-
|
|
189
|
-
Two operational facts every consumer must know:
|
|
190
|
-
|
|
191
|
-
- **Send is a silent no-op without a tenant apiKey.** The export leg only ships
|
|
192
|
-
when an `apiKey` (or `TANGLE_API_KEY`) is present — the ingest requires the
|
|
193
|
-
tenant Bearer. One `baseUrl` (`TANGLE_INTELLIGENCE_URL`, default
|
|
194
|
-
`https://intelligence.tangle.tools`) drives both the OTLP send (`/v1/otlp`)
|
|
195
|
-
and the receive pull. The client's `doctor().exportConfigured` is the check
|
|
196
|
-
that a send will actually land.
|
|
197
|
-
- **Delivery pulls the certified profile from the plane.** `pullCertified` /
|
|
198
|
-
`withIntelligence` hit
|
|
199
|
-
`GET {baseUrl}/v1/profiles/:target/composed` with `Bearer TANGLE_API_KEY`;
|
|
200
|
-
the pull deserializes the typed `agentProfileDiffs` (surfaced as PROPOSALS,
|
|
201
|
-
never auto-applied) alongside the certified prompt. `withIntelligence` folds
|
|
202
|
-
the certified prompt onto the base surface, refreshes at most every 5 minutes,
|
|
203
|
-
and is fail-closed — a failed pull runs the agent on its base surface.
|
|
204
|
-
|
|
205
|
-
## Final check
|
|
206
|
-
|
|
207
|
-
- Picked a primitive from the decision table, not a hand-rolled parallel?
|
|
208
|
-
- Genome is ONE `AgentProfile`/`AgentSurfaces` surface, not split skill/tool/prompt knobs?
|
|
209
|
-
- Equal compute preserved (budget pool, or `arms[0]` control) — no `Promise.all` zoo?
|
|
210
|
-
- Selector ≠ judge: no judge score feeding a driver/another judge; holdout score write-only?
|
|
211
|
-
- Any win certified on a FROZEN holdout via a gate, never on the training composite?
|
|
212
|
-
- Map fixed in the same turn if source disagreed with `docs/canonical-api.md`?
|
|
213
|
-
|
|
214
|
-
See `_common.md` for shared conventions (frontmatter, fail-loud, no AI attribution).
|
|
215
|
-
|
|
216
|
-
Next: build the genome/loop/optimizer against `docs/canonical-api.md` §3–§4; if a
|
|
217
|
-
strategy beats incumbent on the holdout gate, `/ship` it.
|
|
6
|
+
# Build with agent-runtime
|
|
7
|
+
|
|
8
|
+
Use this skill before writing product-local agent infrastructure.
|
|
9
|
+
The goal is one portable agent definition, one execution path, one measurement system, and one reviewed activation path.
|
|
10
|
+
|
|
11
|
+
## Read first
|
|
12
|
+
|
|
13
|
+
1. Read `docs/canonical-api.md` for the current decision table.
|
|
14
|
+
2. Check exports in `src/index.ts`, `src/runtime/index.ts`, `src/improvement/index.ts`, `src/intelligence/index.ts`, and `src/knowledge/index.ts`.
|
|
15
|
+
3. Read the nearest runnable example.
|
|
16
|
+
4. Treat source as authoritative when docs disagree, then correct the stale doc in the same change.
|
|
17
|
+
|
|
18
|
+
## Ownership
|
|
19
|
+
|
|
20
|
+
| Concern | Owner |
|
|
21
|
+
|---|---|
|
|
22
|
+
| Portable prompt, skills, tools, MCP, hooks, subagents, model hints | `AgentProfile` from `@tangle-network/agent-interface` |
|
|
23
|
+
| Agent execution, supervision, budgets, streaming, candidate execution | `@tangle-network/agent-runtime` |
|
|
24
|
+
| Tasks, graders, search, paired statistics, cost and latency comparison | `@tangle-network/agent-eval` |
|
|
25
|
+
| Sources, retrieval, citations, freshness, memory adapters, knowledge promotion | `@tangle-network/agent-knowledge` |
|
|
26
|
+
| Product records, permissions, funding, UI, and atomic storage writes | The consuming product |
|
|
27
|
+
|
|
28
|
+
Do not move shared measurement into Runtime or product code.
|
|
29
|
+
Do not move product storage transactions into a provider-neutral package.
|
|
30
|
+
|
|
31
|
+
## Choose the entry point
|
|
32
|
+
|
|
33
|
+
| Need | Use |
|
|
34
|
+
|---|---|
|
|
35
|
+
| One product chat turn | `handleChatTurn(...)` |
|
|
36
|
+
| One normalized streamed agent turn | `streamAgentTurn(...)` and `collectAgentTurn(...)` |
|
|
37
|
+
| One task or multi-turn loop | `runAgentTask(...)`, `runAgentTaskStream(...)`, or `runLoop(...)` |
|
|
38
|
+
| Supervisor and workers | `supervise(...)` or `superviseSurface(...)` |
|
|
39
|
+
| Parallel work with a shared budget | `fanout(...)` |
|
|
40
|
+
| Fixed composition | `pipeline(...)`, `panel(...)`, or `verify(...)` |
|
|
41
|
+
| Product benchmark | `defineLeaderboard(...)` |
|
|
42
|
+
| Profile matrix | `expandProfileAxes(...)` and `runProfileMatrix(...)` from agent-eval |
|
|
43
|
+
| Search one agent surface | `improve(...)` |
|
|
44
|
+
| Analyze traces through a measured proposal | `proposeAgentImprovement(...)` |
|
|
45
|
+
| Review and authorize an exact proposal | `reviewAgentImprovementProposal(...)` and `createAgentImprovementActivation(...)` |
|
|
46
|
+
| Apply or restore an approved candidate | `executeAgentImprovementActivation(...)` with a product transaction |
|
|
47
|
+
| Build a knowledge candidate | `runKnowledgeImprovementJob(...)` |
|
|
48
|
+
| Apply a knowledge candidate | `createKnowledgeImprovementActivationExecutor(...)` through the same activation path |
|
|
49
|
+
| Observe and pull approved changes on a live agent | `withIntelligence(...)` |
|
|
50
|
+
|
|
51
|
+
## Improvement flow
|
|
52
|
+
|
|
53
|
+
`improve(profile, findings, options)` searches one surface and returns a detached winner.
|
|
54
|
+
It never changes a profile, document, repository, memory store, or knowledge base.
|
|
55
|
+
|
|
56
|
+
Supported profile surfaces are prompt, one named inline skill, tools, MCP, hooks, subagents, whole profile, and curated memory in `profile.resources.instructions`.
|
|
57
|
+
Code uses isolated worktrees and returns a sealed patch candidate.
|
|
58
|
+
Knowledge uses `runKnowledgeImprovementJob(...)` and returns paired snapshots.
|
|
59
|
+
|
|
60
|
+
Use `proposeAgentImprovement(...)` for a production proposal.
|
|
61
|
+
It performs these steps in order:
|
|
62
|
+
|
|
63
|
+
1. Analyze completed traces.
|
|
64
|
+
2. Search for a candidate on development tasks.
|
|
65
|
+
3. Freeze the baseline and winner into one exact experiment.
|
|
66
|
+
4. Reject the experiment if its candidate differs from the search winner.
|
|
67
|
+
5. Run baseline and candidate on the same held-back tasks.
|
|
68
|
+
6. Produce findings, confidence intervals, quality, cost, latency, and a decision.
|
|
69
|
+
|
|
70
|
+
After a person or tenant policy approves the proposal, call `createAgentImprovementActivation(...)` with target identities, funding owner, authority, intent, and expiry.
|
|
71
|
+
Runtime derives the expected current digests from the measured experiment.
|
|
72
|
+
Call `executeAgentImprovementActivation(...)` with one product-owned transaction that compares current state, writes every target atomically, and stores the result under the activation digest.
|
|
73
|
+
Pass a read-only reconciliation function so retries can distinguish committed, uncommitted, and uncertain outcomes.
|
|
74
|
+
|
|
75
|
+
Never apply a change from analyst confidence alone.
|
|
76
|
+
Never measure one candidate and apply another.
|
|
77
|
+
Never let search code write live state.
|
|
78
|
+
Never treat a lost response as a failed write without reconciling it.
|
|
79
|
+
|
|
80
|
+
## Surface rules
|
|
81
|
+
|
|
82
|
+
- Prompt changes `profile.prompt` only.
|
|
83
|
+
- Skill optimization selects one inline skill by `skills.resourceName`; profile resources must fail closed.
|
|
84
|
+
- Curated memory changes `profile.resources.instructions`; retrieval stores and memory databases belong in the knowledge flow.
|
|
85
|
+
- Tools, MCP, hooks, subagents, and whole-profile changes require an explicit proposer because Runtime cannot invent domain capabilities safely.
|
|
86
|
+
- Code candidates must come from the Runtime worktree path so patch identity and cleanup stay intact.
|
|
87
|
+
- Workflow and policy files are code surfaces; parameter sweeps come from agent-eval.
|
|
88
|
+
- Knowledge candidates remain detached until the shared activation path applies or restores their frozen snapshots.
|
|
89
|
+
|
|
90
|
+
## Product integration
|
|
91
|
+
|
|
92
|
+
The product supplies only the pieces that vary by deployment:
|
|
93
|
+
|
|
94
|
+
- How traces and current profiles are loaded.
|
|
95
|
+
- How exact candidate execution is placed on compute.
|
|
96
|
+
- How proposal, review, activation, and result records are persisted.
|
|
97
|
+
- How a target is changed atomically.
|
|
98
|
+
- Who may approve, reject, request changes, fund, apply, or restore.
|
|
99
|
+
- How those records and actions appear in the UI or API.
|
|
100
|
+
|
|
101
|
+
The product must not recreate candidate hashing, paired comparison, confidence intervals, review binding, expiry, retry identity, or result validation.
|
|
102
|
+
|
|
103
|
+
## Do not duplicate
|
|
104
|
+
|
|
105
|
+
- Do not write a provider-specific profile wrapper; extend `AgentProfile` and its materializer.
|
|
106
|
+
- Do not write a second optimizer loop; compose Eval proposers through `improve(...)`.
|
|
107
|
+
- Do not write a second candidate catalog; persist the immutable proposal records.
|
|
108
|
+
- Do not let an analyst or adapter commit, push, open a pull request, or edit a live store.
|
|
109
|
+
- Do not hand-roll SSE parsing, usage totals, profile matrices, bootstrap statistics, sandbox acquisition, or worktree cleanup.
|
|
110
|
+
- Do not add a product-local approval format for knowledge, code, or profile changes.
|
|
111
|
+
|
|
112
|
+
## Finish
|
|
113
|
+
|
|
114
|
+
- The same agent definition runs in product and measurement paths.
|
|
115
|
+
- The held-back tasks were not visible during search.
|
|
116
|
+
- Candidate identity is checked before execution and again before activation.
|
|
117
|
+
- Quality, cost, latency, sample count, and uncertainty are retained.
|
|
118
|
+
- Rejection and request-changes are first-class outcomes.
|
|
119
|
+
- Activation is authorized, expiring, idempotent, and reconcilable.
|
|
120
|
+
- No customer write, message, trigger, or billing occurs in read-only proof mode.
|
|
121
|
+
- Public examples, package exports, generated API docs, type checks, tests, build, and package verification pass.
|
|
122
|
+
|
|
123
|
+
## Then consider
|
|
124
|
+
|
|
125
|
+
- Use `critical-audit` when the change introduces or alters a public contract.
|
|
126
|
+
- Use `verify` before publishing or adopting the package in a product.
|
package/dist/chunk-6O73TRHW.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
// src/improvement/build-prompts.ts
|
|
2
|
-
function findingLines(findings) {
|
|
3
|
-
return findings.map((f) => {
|
|
4
|
-
const where = f.subject ? ` [${f.subject}]` : "";
|
|
5
|
-
const action = f.recommended_action ? ` \u2192 ${f.recommended_action}` : "";
|
|
6
|
-
return `- (${f.severity})${where} ${f.claim}${action}`;
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
function toolBuildPrompt(args) {
|
|
10
|
-
return [
|
|
11
|
-
"You are building a new TOOL for this codebase to address the gaps below.",
|
|
12
|
-
"Write the tool as a small, self-contained module PLUS tests that exercise it.",
|
|
13
|
-
"The tool must compile and its tests must pass \u2014 they will be run automatically;",
|
|
14
|
-
"if verification fails you will get the error and another attempt. Do not commit;",
|
|
15
|
-
"leave the changes in the working tree.",
|
|
16
|
-
"",
|
|
17
|
-
"Gaps the tool should close:",
|
|
18
|
-
...findingLines(args.findings)
|
|
19
|
-
].join("\n");
|
|
20
|
-
}
|
|
21
|
-
function mcpBuildPrompt(args) {
|
|
22
|
-
return [
|
|
23
|
-
"You are building a new MCP SERVER (Model Context Protocol) that exposes",
|
|
24
|
-
"tool(s) addressing the gaps below, so any harness can mount it.",
|
|
25
|
-
"Requirements that WILL be checked by booting the server:",
|
|
26
|
-
"- it starts over stdio and answers the MCP `initialize` handshake,",
|
|
27
|
-
"- `tools/list` returns at least one tool with a valid input schema.",
|
|
28
|
-
"Newline-delimited JSON-RPC 2.0, protocol version 2024-11-05. Include a start",
|
|
29
|
-
"command (e.g. a package.json `start` script or a clear entrypoint). If the",
|
|
30
|
-
"boot-and-probe fails you will get the error and another attempt. Do not",
|
|
31
|
-
"commit; leave the changes in the working tree.",
|
|
32
|
-
"",
|
|
33
|
-
"Capabilities the server should provide:",
|
|
34
|
-
...findingLines(args.findings)
|
|
35
|
-
].join("\n");
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// src/improvement/mcp-serve-verifier.ts
|
|
39
|
-
import { spawn } from "child_process";
|
|
40
|
-
import { createInterface } from "readline";
|
|
41
|
-
var PROTOCOL_VERSION = "2024-11-05";
|
|
42
|
-
function mcpServeVerifier(spec) {
|
|
43
|
-
const timeoutMs = spec.timeoutMs ?? 3e4;
|
|
44
|
-
const minTools = spec.minTools ?? 1;
|
|
45
|
-
return (worktreePath) => new Promise((resolve, reject) => {
|
|
46
|
-
const child = spawn(spec.command, spec.args ?? [], {
|
|
47
|
-
cwd: worktreePath,
|
|
48
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
49
|
-
env: { ...process.env, ...spec.env }
|
|
50
|
-
});
|
|
51
|
-
const stderr = [];
|
|
52
|
-
let settled = false;
|
|
53
|
-
let nextId = 1;
|
|
54
|
-
const initId = nextId++;
|
|
55
|
-
let listId = -1;
|
|
56
|
-
const settle = (fn) => {
|
|
57
|
-
if (settled) return;
|
|
58
|
-
settled = true;
|
|
59
|
-
clearTimeout(timer);
|
|
60
|
-
rl.close();
|
|
61
|
-
child.kill("SIGKILL");
|
|
62
|
-
fn();
|
|
63
|
-
};
|
|
64
|
-
const withStderr = (msg) => stderr.length > 0 ? `${msg}
|
|
65
|
-
stderr:
|
|
66
|
-
${stderr.join("").slice(-2e3)}` : msg;
|
|
67
|
-
const pass = () => settle(() => resolve({ ok: true }));
|
|
68
|
-
const failCandidate = (msg) => settle(() => resolve({ ok: false, feedback: withStderr(msg) }));
|
|
69
|
-
const setupFault = (err) => settle(() => reject(err));
|
|
70
|
-
const failStdin = (err) => failCandidate(`writing to MCP server stdin failed: ${err.message}`);
|
|
71
|
-
const send = (msg) => {
|
|
72
|
-
try {
|
|
73
|
-
child.stdin.write(`${JSON.stringify(msg)}
|
|
74
|
-
`);
|
|
75
|
-
return true;
|
|
76
|
-
} catch (err) {
|
|
77
|
-
failStdin(err);
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
child.on("error", (err) => {
|
|
82
|
-
const code = err.code;
|
|
83
|
-
setupFault(
|
|
84
|
-
code === "ENOENT" ? new Error(
|
|
85
|
-
`mcpServeVerifier: '${spec.command}' not found in PATH (setup bug, not a failed candidate)`
|
|
86
|
-
) : new Error(`mcpServeVerifier: '${spec.command}' failed to spawn: ${err.message}`)
|
|
87
|
-
);
|
|
88
|
-
});
|
|
89
|
-
child.on("exit", (code, signal) => {
|
|
90
|
-
failCandidate(`MCP server exited (code ${code}, signal ${signal}) before serving`);
|
|
91
|
-
});
|
|
92
|
-
child.stdin.on("error", failStdin);
|
|
93
|
-
child.stderr.on("data", (d) => stderr.push(String(d)));
|
|
94
|
-
const rl = createInterface({ input: child.stdout });
|
|
95
|
-
rl.on("line", (line) => {
|
|
96
|
-
let msg;
|
|
97
|
-
try {
|
|
98
|
-
msg = JSON.parse(line);
|
|
99
|
-
} catch {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
if (!msg || typeof msg !== "object") return;
|
|
103
|
-
if (msg.id === initId) {
|
|
104
|
-
if (msg.error) return failCandidate(`initialize errored: ${JSON.stringify(msg.error)}`);
|
|
105
|
-
if (!send({ jsonrpc: "2.0", method: "notifications/initialized" })) return;
|
|
106
|
-
listId = nextId++;
|
|
107
|
-
send({ jsonrpc: "2.0", id: listId, method: "tools/list" });
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
if (msg.id === listId) {
|
|
111
|
-
if (msg.error) return failCandidate(`tools/list errored: ${JSON.stringify(msg.error)}`);
|
|
112
|
-
const tools = msg.result?.tools;
|
|
113
|
-
if (!Array.isArray(tools)) return failCandidate("tools/list result has no tools array");
|
|
114
|
-
if (tools.length < minTools) {
|
|
115
|
-
return failCandidate(`tools/list returned ${tools.length} tool(s), need >= ${minTools}`);
|
|
116
|
-
}
|
|
117
|
-
return pass();
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
const timer = setTimeout(
|
|
121
|
-
() => failCandidate(`MCP server did not complete the handshake within ${timeoutMs}ms`),
|
|
122
|
-
timeoutMs
|
|
123
|
-
);
|
|
124
|
-
send({
|
|
125
|
-
jsonrpc: "2.0",
|
|
126
|
-
id: initId,
|
|
127
|
-
method: "initialize",
|
|
128
|
-
params: {
|
|
129
|
-
protocolVersion: PROTOCOL_VERSION,
|
|
130
|
-
capabilities: {},
|
|
131
|
-
clientInfo: { name: "agent-runtime-mcp-verify", version: "0" }
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export {
|
|
138
|
-
toolBuildPrompt,
|
|
139
|
-
mcpBuildPrompt,
|
|
140
|
-
mcpServeVerifier
|
|
141
|
-
};
|
|
142
|
-
//# sourceMappingURL=chunk-6O73TRHW.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/improvement/build-prompts.ts","../src/improvement/mcp-serve-verifier.ts"],"sourcesContent":["/**\n * Build-prompt starting points for the two buildable artifact types. There is\n * NO `toolGenerator`/`mcpGenerator` wrapper — the factory is `agenticGenerator`\n * + a verifier (docs/artifact-lifecycle-frontier.md), so a tool or an MCP\n * server is built by composing the pieces directly:\n *\n * // a tool:\n * agenticGenerator({ buildPrompt: toolBuildPrompt, verify: commandVerifier('pnpm', ['test']) })\n * // an MCP server:\n * agenticGenerator({ buildPrompt: mcpBuildPrompt, verify: mcpServeVerifier({ command: 'node', args: ['server.mjs'] }) })\n *\n * These are the only type-specific bit (the phrasing that points the agent at a\n * tool vs. an MCP); the worktree, resume-on-failure loop, and improvement-loop\n * wrapper are shared. MCP is the load-bearing target — it is how a harness\n * acquires tools; raw tools matter where we control the loader.\n */\n\nimport type { AnalystFinding } from '@tangle-network/agent-eval'\n\ntype FindingsArg = { report: unknown; findings: AnalystFinding[] }\n\nfunction findingLines(findings: AnalystFinding[]): string[] {\n return findings.map((f) => {\n const where = f.subject ? ` [${f.subject}]` : ''\n const action = f.recommended_action ? ` → ${f.recommended_action}` : ''\n return `- (${f.severity})${where} ${f.claim}${action}`\n })\n}\n\n/** Build the starting instruction for a coder agent tasked with implementing a new tool. */\nexport function toolBuildPrompt(args: FindingsArg): string {\n return [\n 'You are building a new TOOL for this codebase to address the gaps below.',\n 'Write the tool as a small, self-contained module PLUS tests that exercise it.',\n 'The tool must compile and its tests must pass — they will be run automatically;',\n 'if verification fails you will get the error and another attempt. Do not commit;',\n 'leave the changes in the working tree.',\n '',\n 'Gaps the tool should close:',\n ...findingLines(args.findings),\n ].join('\\n')\n}\n\n/** Build the starting instruction for a coder agent tasked with implementing a new MCP server. */\nexport function mcpBuildPrompt(args: FindingsArg): string {\n return [\n 'You are building a new MCP SERVER (Model Context Protocol) that exposes',\n 'tool(s) addressing the gaps below, so any harness can mount it.',\n 'Requirements that WILL be checked by booting the server:',\n '- it starts over stdio and answers the MCP `initialize` handshake,',\n '- `tools/list` returns at least one tool with a valid input schema.',\n 'Newline-delimited JSON-RPC 2.0, protocol version 2024-11-05. Include a start',\n 'command (e.g. a package.json `start` script or a clear entrypoint). If the',\n 'boot-and-probe fails you will get the error and another attempt. Do not',\n 'commit; leave the changes in the working tree.',\n '',\n 'Capabilities the server should provide:',\n ...findingLines(args.findings),\n ].join('\\n')\n}\n","/**\n * `mcpServeVerifier` — the intrinsic verifier for a built MCP server: the\n * boot-and-probe checker named in docs/artifact-lifecycle-frontier.md. A\n * generated MCP server is only a candidate if it actually *serves* — so this\n * boots it over stdio (the default local MCP transport) and runs the real\n * handshake: `initialize` → `notifications/initialized` → `tools/list`, and\n * asserts the server answers with at least `minTools` tools.\n *\n * Outcomes follow the `Verifier` contract: a server that fails to start, exits\n * early, errors the handshake, times out, or exposes no tools is a FAILED\n * candidate (`{ok:false}`, fed back into the next generation shot); a missing\n * start binary or spawn fault THROWS (a setup bug, never a silent fallback).\n *\n * Protocol matches the runtime's own stdio MCP server (src/mcp/server.ts):\n * newline-delimited JSON-RPC 2.0, protocol version 2024-11-05.\n */\n\nimport { spawn } from 'node:child_process'\nimport { createInterface } from 'node:readline'\nimport type { Verifier, VerifyResult } from './agentic-generator'\n\nconst PROTOCOL_VERSION = '2024-11-05'\n\nexport interface McpServeSpec {\n /** Command that starts the built MCP server in the worktree (stdio transport). */\n command: string\n args?: string[]\n /** Extra env for the server process (merged over `process.env`). */\n env?: Record<string, string>\n /** Handshake timeout (ms). Default 30s. */\n timeoutMs?: number\n /** Minimum tools the server must expose to pass. Default 1. */\n minTools?: number\n}\n\ninterface JsonRpcResponse {\n jsonrpc?: string\n id?: number | string | null\n result?: unknown\n error?: { code: number; message: string }\n}\n\n/** Build a `Verifier` that boots a generated MCP server over stdio and checks it exposes tools. */\nexport function mcpServeVerifier(spec: McpServeSpec): Verifier {\n const timeoutMs = spec.timeoutMs ?? 30_000\n const minTools = spec.minTools ?? 1\n\n return (worktreePath: string): Promise<VerifyResult> =>\n new Promise<VerifyResult>((resolve, reject) => {\n const child = spawn(spec.command, spec.args ?? [], {\n cwd: worktreePath,\n stdio: ['pipe', 'pipe', 'pipe'],\n env: { ...process.env, ...spec.env },\n })\n\n const stderr: string[] = []\n let settled = false\n let nextId = 1\n const initId = nextId++\n let listId = -1\n\n const settle = (fn: () => void) => {\n if (settled) return\n settled = true\n clearTimeout(timer)\n rl.close()\n child.kill('SIGKILL')\n fn()\n }\n const withStderr = (msg: string) =>\n stderr.length > 0 ? `${msg}\\nstderr:\\n${stderr.join('').slice(-2000)}` : msg\n const pass = () => settle(() => resolve({ ok: true }))\n const failCandidate = (msg: string) =>\n settle(() => resolve({ ok: false, feedback: withStderr(msg) }))\n const setupFault = (err: Error) => settle(() => reject(err))\n const failStdin = (err: Error) =>\n failCandidate(`writing to MCP server stdin failed: ${err.message}`)\n\n const send = (msg: Record<string, unknown>): boolean => {\n try {\n child.stdin.write(`${JSON.stringify(msg)}\\n`)\n return true\n } catch (err) {\n // EPIPE: the server died mid-handshake — a failed candidate, not a fault.\n failStdin(err as Error)\n return false\n }\n }\n\n child.on('error', (err) => {\n const code = (err as NodeJS.ErrnoException).code\n setupFault(\n code === 'ENOENT'\n ? new Error(\n `mcpServeVerifier: '${spec.command}' not found in PATH (setup bug, not a failed candidate)`,\n )\n : new Error(`mcpServeVerifier: '${spec.command}' failed to spawn: ${err.message}`),\n )\n })\n child.on('exit', (code, signal) => {\n // An exit before the handshake completes is a failed candidate (the\n // server crashed on boot); after we settle, our own SIGKILL fires here.\n failCandidate(`MCP server exited (code ${code}, signal ${signal}) before serving`)\n })\n // Pipe failures normally arrive asynchronously, outside send()'s try/catch.\n child.stdin.on('error', failStdin)\n child.stderr.on('data', (d) => stderr.push(String(d)))\n\n const rl = createInterface({ input: child.stdout })\n rl.on('line', (line) => {\n let msg: JsonRpcResponse | undefined\n try {\n msg = JSON.parse(line) as JsonRpcResponse\n } catch {\n return // servers log to stdout too; skip non-JSON lines\n }\n if (!msg || typeof msg !== 'object') return\n\n if (msg.id === initId) {\n if (msg.error) return failCandidate(`initialize errored: ${JSON.stringify(msg.error)}`)\n if (!send({ jsonrpc: '2.0', method: 'notifications/initialized' })) return\n listId = nextId++\n send({ jsonrpc: '2.0', id: listId, method: 'tools/list' })\n return\n }\n if (msg.id === listId) {\n if (msg.error) return failCandidate(`tools/list errored: ${JSON.stringify(msg.error)}`)\n const tools = (msg.result as { tools?: unknown[] } | undefined)?.tools\n if (!Array.isArray(tools)) return failCandidate('tools/list result has no tools array')\n if (tools.length < minTools) {\n return failCandidate(`tools/list returned ${tools.length} tool(s), need >= ${minTools}`)\n }\n return pass()\n }\n })\n\n const timer = setTimeout(\n () => failCandidate(`MCP server did not complete the handshake within ${timeoutMs}ms`),\n timeoutMs,\n )\n\n send({\n jsonrpc: '2.0',\n id: initId,\n method: 'initialize',\n params: {\n protocolVersion: PROTOCOL_VERSION,\n capabilities: {},\n clientInfo: { name: 'agent-runtime-mcp-verify', version: '0' },\n },\n })\n })\n}\n"],"mappings":";AAqBA,SAAS,aAAa,UAAsC;AAC1D,SAAO,SAAS,IAAI,CAAC,MAAM;AACzB,UAAM,QAAQ,EAAE,UAAU,KAAK,EAAE,OAAO,MAAM;AAC9C,UAAM,SAAS,EAAE,qBAAqB,WAAM,EAAE,kBAAkB,KAAK;AACrE,WAAO,MAAM,EAAE,QAAQ,IAAI,KAAK,IAAI,EAAE,KAAK,GAAG,MAAM;AAAA,EACtD,CAAC;AACH;AAGO,SAAS,gBAAgB,MAA2B;AACzD,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG,aAAa,KAAK,QAAQ;AAAA,EAC/B,EAAE,KAAK,IAAI;AACb;AAGO,SAAS,eAAe,MAA2B;AACxD,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA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