@aletheia-works/vivarium-mcp 0.0.1 → 0.1.1
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 +11 -55
- package/dist/bundled/recipes.json +36 -0
- package/dist/catalogue.d.ts.map +1 -1
- package/dist/catalogue.js +4 -14
- package/dist/catalogue.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +15 -27
- package/dist/server.js.map +1 -1
- package/dist/tools/match_error.d.ts.map +1 -1
- package/dist/tools/match_error.js +9 -29
- package/dist/tools/match_error.js.map +1 -1
- package/dist/tools/prepare_fix_candidate.d.ts +81 -0
- package/dist/tools/prepare_fix_candidate.d.ts.map +1 -0
- package/dist/tools/prepare_fix_candidate.js +194 -0
- package/dist/tools/prepare_fix_candidate.js.map +1 -0
- package/dist/tools/prepare_new_recipe.d.ts.map +1 -1
- package/dist/tools/prepare_new_recipe.js +5 -18
- package/dist/tools/prepare_new_recipe.js.map +1 -1
- package/dist/tools/verify_branch_fix.d.ts.map +1 -1
- package/dist/tools/verify_branch_fix.js +6 -16
- package/dist/tools/verify_branch_fix.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -9
- package/dist/types.js.map +1 -1
- package/package.json +6 -5
- package/src/bundled/recipes.json +36 -0
package/README.md
CHANGED
|
@@ -19,49 +19,18 @@ deployed verdict snapshots, without scraping the docs site.
|
|
|
19
19
|
| `list_recipes(layer?, project?, q?)` | Filtered list of catalogue entries. | All layers (1, 2, 3). |
|
|
20
20
|
| `get_recipe(slug)` | Full metadata for one recipe (title, project, issue, page URL, verdict snapshot URL, GitHub source URL). | All layers. |
|
|
21
21
|
| `lookup_verdict(slug)` | Layer 1 → `kind: "live"` + page URL (verdicts run in the browser). Layer 2/3 → `kind: "snapshot"` with the deployed `verdict.json` contents (verdict, exit code, image digest, stdout, stderr tail). | All layers (Layer 1 returns a stub). |
|
|
22
|
-
| `match_error(text, limit?)` | Mechanical token-overlap ranking of recipes against a pasted error message or stack trace. Synonym table + bounded fuzzy match + multi-language stopwords
|
|
22
|
+
| `match_error(text, limit?)` | Mechanical token-overlap ranking of recipes against a pasted error message or stack trace. Synonym table + bounded fuzzy match + multi-language stopwords. | All layers. |
|
|
23
23
|
| `verify_branch_fix(slug, fix_url? \| fix_source?)` | Scaffolding helper for the AI-slop verification loop. Layer 1 → Path A: a recipe-page `compare_url` with the fix pre-loaded. Layer 2/3 → Path B: a `/repro/compare` deep-link plus the `gh workflow run branch-fix-verdict.yml` command. NOT an execution engine — actual reproduction runs in the visitor's browser (Path A) or in GitHub Actions (Path B). | All layers. |
|
|
24
|
-
| `prepare_new_recipe(project, issue, title, base_image?, repo_owner?, layer?)` | Scaffolding helper that bundles every artefact an agent needs to author a new recipe: validated slug, the exact `mise run recipes:new` and `mise run recipes:verify` commands, placeholder rows for `docs/data/recipe-facets.json` and (if the project is new) `docs/data/projects.json`, a commit-subject template, and a sequenced next-steps checklist.
|
|
24
|
+
| `prepare_new_recipe(project, issue, title, base_image?, repo_owner?, layer?)` | Scaffolding helper that bundles every artefact an agent needs to author a new recipe: validated slug, the exact `mise run recipes:new` and `mise run recipes:verify` commands, placeholder rows for `docs/data/recipe-facets.json` and (if the project is new) `docs/data/projects.json`, a commit-subject template, and a sequenced next-steps checklist. NOT an execution engine — the agent's shell tool runs the returned commands. | Layer 2 has the canonical scaffolder; Layer 1/3 fall back to copying from an existing recipe. |
|
|
25
|
+
| `prepare_fix_candidate(slug, fork_url, branch, upstream_pr?, package?, purpose?)` | Scaffolding helper that registers a fix-candidate spec on an existing Layer 1 recipe so the page runs the fork branch's wheel side-by-side with the released build (per ADR-0040). Returns the `fix-candidate.json` content, the recommended commit subject + PR title, a ready-to-paste PR body (with AI-authorship disclosure tucked inside a `<details>` block), and the exact `gh` / `git` commands to fork-and-clone aletheia-works/vivarium, branch off main, drop the spec in, commit, push, and open the cross-repo PR. NOT an execution engine — the agent's shell tool runs the returned commands. | Layer 1 only (Layers 2/3 use `verify_branch_fix`). |
|
|
25
26
|
|
|
26
27
|
## Install
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
> use the local-clone path. The
|
|
32
|
-
> [`publish-mcp.yml`](https://github.com/aletheia-works/vivarium/blob/main/.github/workflows/publish-mcp.yml)
|
|
33
|
-
> workflow handles dual JSR + npm release on tag push; the snippets
|
|
34
|
-
> in the next two subsections will work once that runs for the first
|
|
35
|
-
> time.
|
|
29
|
+
The exact MCP-config file location varies by client (Claude Code:
|
|
30
|
+
`~/.claude/mcp.json`; Cline: its VS Code settings; Cursor:
|
|
31
|
+
`~/.cursor/mcp.json`).
|
|
36
32
|
|
|
37
|
-
###
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
git clone https://github.com/aletheia-works/vivarium.git
|
|
41
|
-
cd vivarium/packages/mcp-server
|
|
42
|
-
bun install
|
|
43
|
-
bun run build
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Then point your MCP client at the built entry point:
|
|
47
|
-
|
|
48
|
-
```json
|
|
49
|
-
{
|
|
50
|
-
"mcpServers": {
|
|
51
|
-
"vivarium": {
|
|
52
|
-
"command": "node",
|
|
53
|
-
"args": ["/absolute/path/to/vivarium/packages/mcp-server/dist/index.js"]
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### npm (post-publish; default for `npx`-based MCP launchers)
|
|
60
|
-
|
|
61
|
-
Once the server has been published, the configuration becomes a
|
|
62
|
-
single-line `npx` invocation. The exact MCP-config file location
|
|
63
|
-
varies by client (Claude Code: `~/.claude/mcp.json`; Cline: its VS
|
|
64
|
-
Code settings; Cursor: `~/.cursor/mcp.json`). Snippet:
|
|
33
|
+
### npm (default for `npx`-based MCP launchers)
|
|
65
34
|
|
|
66
35
|
```json
|
|
67
36
|
{
|
|
@@ -74,9 +43,7 @@ Code settings; Cursor: `~/.cursor/mcp.json`). Snippet:
|
|
|
74
43
|
}
|
|
75
44
|
```
|
|
76
45
|
|
|
77
|
-
### JSR (
|
|
78
|
-
|
|
79
|
-
For clients with native JSR support (Bun ≥ 1.1, Deno):
|
|
46
|
+
### JSR (Bun / Deno native install)
|
|
80
47
|
|
|
81
48
|
```bash
|
|
82
49
|
bunx jsr:@aletheia-works/vivarium-mcp
|
|
@@ -84,17 +51,6 @@ bunx jsr:@aletheia-works/vivarium-mcp
|
|
|
84
51
|
deno run --allow-net --allow-read jsr:@aletheia-works/vivarium-mcp
|
|
85
52
|
```
|
|
86
53
|
|
|
87
|
-
## Why dual-channel distribution
|
|
88
|
-
|
|
89
|
-
Per [ADR-0019](https://github.com/aletheia-works/vivarium) (private
|
|
90
|
-
memo), this package publishes to both registries with **JSR canonical
|
|
91
|
-
and npm fallback**. JSR contributes structural supply-chain defences
|
|
92
|
-
(no postinstall scripts, OIDC-only publish via Sigstore provenance,
|
|
93
|
-
GitHub-org-bound scope ownership, source-only publish); npm carries
|
|
94
|
-
the `npx` ergonomics most MCP launchers expect today. Both registries
|
|
95
|
-
ship with build provenance — verifiable via the public Sigstore Rekor
|
|
96
|
-
transparency log.
|
|
97
|
-
|
|
98
54
|
## Configuration
|
|
99
55
|
|
|
100
56
|
The server reads no environment variables and accepts no command-line
|
|
@@ -105,9 +61,9 @@ when the network is unavailable.
|
|
|
105
61
|
|
|
106
62
|
## Versioning
|
|
107
63
|
|
|
108
|
-
The MCP server's surface (the
|
|
109
|
-
schemas) is locked at v1
|
|
110
|
-
|
|
64
|
+
The MCP server's tool surface (the tools listed above and their input
|
|
65
|
+
schemas) is locked at v1. Optional additive changes ship as minor
|
|
66
|
+
revisions; breaking changes require a v2 release.
|
|
111
67
|
|
|
112
68
|
The recipes index format consumed by this server is locked separately
|
|
113
69
|
at `index = "v1"` — see
|
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
"index": "v1",
|
|
3
3
|
"contract": "v1",
|
|
4
4
|
"recipes": [
|
|
5
|
+
{
|
|
6
|
+
"slug": "astroid-2993",
|
|
7
|
+
"layer": 1,
|
|
8
|
+
"project": "astroid",
|
|
9
|
+
"issue": 2993,
|
|
10
|
+
"title": "pylint-dev/astroid#2993",
|
|
11
|
+
"page_url": "https://aletheia-works.github.io/vivarium/repro/astroid/2993/",
|
|
12
|
+
"source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer1_wasm/astroid-2993",
|
|
13
|
+
"language": "python",
|
|
14
|
+
"tags": [
|
|
15
|
+
"ast",
|
|
16
|
+
"type-comment",
|
|
17
|
+
"fuzzing",
|
|
18
|
+
"oss-fuzz"
|
|
19
|
+
],
|
|
20
|
+
"symptom": "memory-error-on-fuzzed-input",
|
|
21
|
+
"severity": "crash"
|
|
22
|
+
},
|
|
5
23
|
{
|
|
6
24
|
"slug": "cpython-137205",
|
|
7
25
|
"layer": 1,
|
|
@@ -20,6 +38,24 @@
|
|
|
20
38
|
"symptom": "fk-pragma-silently-dropped",
|
|
21
39
|
"severity": "spec-violation"
|
|
22
40
|
},
|
|
41
|
+
{
|
|
42
|
+
"slug": "mpmath-983",
|
|
43
|
+
"layer": 1,
|
|
44
|
+
"project": "mpmath",
|
|
45
|
+
"issue": 983,
|
|
46
|
+
"title": "mpmath/mpmath#983",
|
|
47
|
+
"page_url": "https://aletheia-works.github.io/vivarium/repro/mpmath/983/",
|
|
48
|
+
"source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer1_wasm/mpmath-983",
|
|
49
|
+
"language": "python",
|
|
50
|
+
"tags": [
|
|
51
|
+
"numerical-linear-algebra",
|
|
52
|
+
"qr-solve",
|
|
53
|
+
"householder",
|
|
54
|
+
"arbitrary-precision"
|
|
55
|
+
],
|
|
56
|
+
"symptom": "solver-asymmetry-on-nonsingular-matrix",
|
|
57
|
+
"severity": "bug"
|
|
58
|
+
},
|
|
23
59
|
{
|
|
24
60
|
"slug": "numpy-28287",
|
|
25
61
|
"layer": 1,
|
package/dist/catalogue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalogue.d.ts","sourceRoot":"","sources":["../src/catalogue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"catalogue.d.ts","sourceRoot":"","sources":["../src/catalogue.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGhE,eAAO,MAAM,SAAS,+DACwC,CAAC;AAW/D,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED,wBAAgB,eAAe,IAAI,YAAY,CAE9C;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,CAsB1D;AAED,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAYjC"}
|
package/dist/catalogue.js
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
// Catalogue fetcher
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// 1. Runtime fetch from the canonical Pages endpoint with a TTL cache
|
|
6
|
-
// so the agent always sees a catalogue recent enough to reflect a
|
|
7
|
-
// same-day recipe addition.
|
|
8
|
-
// 2. Bundled snapshot fallback for offline use, network failure, or
|
|
9
|
-
// cold start before the first successful fetch.
|
|
10
|
-
//
|
|
11
|
-
// The bundled snapshot is shipped in src/bundled/recipes.json — it is
|
|
12
|
-
// refreshed at publish time by the GHA workflow that copies the latest
|
|
13
|
-
// docs/public/api/recipes.json into the package before publish.
|
|
1
|
+
// Catalogue fetcher: 5-minute in-process TTL with a build-time bundled
|
|
2
|
+
// fallback for offline / network-failure / cold-start. The bundled
|
|
3
|
+
// snapshot is refreshed at publish time by the GHA workflow that
|
|
4
|
+
// copies docs/public/api/recipes.json into src/bundled/.
|
|
14
5
|
import bundledIndex from './bundled/recipes.json' with { type: 'json' };
|
|
15
6
|
export const INDEX_URL = 'https://aletheia-works.github.io/vivarium/api/recipes.json';
|
|
16
7
|
const TTL_MS = 5 * 60 * 1000;
|
|
17
8
|
let cache = null;
|
|
18
|
-
// Reset cache; only used by tests.
|
|
19
9
|
export function _resetCacheForTesting() {
|
|
20
10
|
cache = null;
|
|
21
11
|
}
|
package/dist/catalogue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalogue.js","sourceRoot":"","sources":["../src/catalogue.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"catalogue.js","sourceRoot":"","sources":["../src/catalogue.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,mEAAmE;AACnE,iEAAiE;AACjE,yDAAyD;AAGzD,OAAO,YAAY,MAAM,wBAAwB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAExE,MAAM,CAAC,MAAM,SAAS,GACpB,4DAA4D,CAAC;AAE/D,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAO7B,IAAI,KAAK,GAAsB,IAAI,CAAC;AAEpC,MAAM,UAAU,qBAAqB;IACnC,KAAK,GAAG,IAAI,CAAC;AACf,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,YAAuC,CAAC;AACjD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,IAAI,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,SAAS,GAAG,MAAM,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC,KAAK,CAAC;IACrB,CAAC;IAED,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,SAAS,EAAE;YACjC,OAAO,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE;SAC1C,CAAC,CAAC;QACH,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC;YACX,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAiB,CAAC;YAChD,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC/D,KAAK,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;gBACxC,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,sDAAsD;IACxD,CAAC;IAED,OAAO,eAAe,EAAE,CAAC;AAC3B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,UAAkB;IAElB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,UAAU,EAAE;YAClC,OAAO,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE;SAC1C,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC;QACzB,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAoB,CAAC;QACnD,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAChD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAgDnE,wBAAgB,YAAY,IAAI,MAAM,CAsFrC;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAI/C"}
|
package/dist/server.js
CHANGED
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
// MCP server wiring — registers the v1 tools and connects a stdio
|
|
2
|
-
// transport.
|
|
3
|
-
//
|
|
4
|
-
// Tool surface:
|
|
5
|
-
// list_recipes / get_recipe / lookup_verdict — ADR-0019 §3 (X.1, v0.1).
|
|
6
|
-
// match_error — Phase 6 X.2, mirrors the
|
|
7
|
-
// docs S.2 matcher
|
|
8
|
-
// (ADR-0025 §Neutral).
|
|
9
|
-
// verify_branch_fix — Phase 7 B3, deep-link
|
|
10
|
-
// helper for the AI-slop
|
|
11
|
-
// verification loop
|
|
12
|
-
// (ADR-0030).
|
|
13
|
-
// prepare_new_recipe — Tier 2, returns the full
|
|
14
|
-
// authoring command bundle
|
|
15
|
-
// (scaffold + verify +
|
|
16
|
-
// facets/projects rows)
|
|
17
|
-
// for a new upstream
|
|
18
|
-
// issue.
|
|
19
|
-
//
|
|
20
|
-
// See ADR-0019 §1 for the stdio-transport choice.
|
|
2
|
+
// transport. The tool surface is documented in README.md; each tool
|
|
3
|
+
// module owns its own description literal.
|
|
21
4
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
22
5
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
23
6
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
@@ -25,17 +8,18 @@ import { GET_RECIPE_TOOL, getRecipe } from './tools/get_recipe.js';
|
|
|
25
8
|
import { LIST_RECIPES_TOOL, listRecipes, } from './tools/list_recipes.js';
|
|
26
9
|
import { LOOKUP_VERDICT_TOOL, lookupVerdict, } from './tools/lookup_verdict.js';
|
|
27
10
|
import { MATCH_ERROR_TOOL, matchError, } from './tools/match_error.js';
|
|
11
|
+
import { PREPARE_FIX_CANDIDATE_TOOL, prepareFixCandidate, } from './tools/prepare_fix_candidate.js';
|
|
28
12
|
import { PREPARE_NEW_RECIPE_TOOL, prepareNewRecipe, } from './tools/prepare_new_recipe.js';
|
|
29
13
|
import { VERIFY_BRANCH_FIX_TOOL, verifyBranchFix, } from './tools/verify_branch_fix.js';
|
|
30
14
|
const SERVER_NAME = 'vivarium-mcp';
|
|
31
|
-
// Keep in sync with package.json + jsr.json.
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
// a
|
|
38
|
-
const SERVER_VERSION = '0.1.
|
|
15
|
+
// Keep in sync with package.json + jsr.json. The MCP `initialize`
|
|
16
|
+
// handshake exposes this string to clients, so unsynced values across
|
|
17
|
+
// these three files produce a confusing client experience. Bump the
|
|
18
|
+
// patch component for additive changes within v0.x (additional tools,
|
|
19
|
+
// description / surface refinements) — the project is still pre-1.0
|
|
20
|
+
// and `prepare_fix_candidate` (Phase 8 / ADR-0040) is meaningful but
|
|
21
|
+
// fully opt-in, so a minor bump would overstate the impact.
|
|
22
|
+
const SERVER_VERSION = '0.1.1';
|
|
39
23
|
export function createServer() {
|
|
40
24
|
const server = new Server({ name: SERVER_NAME, version: SERVER_VERSION }, { capabilities: { tools: {} } });
|
|
41
25
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
@@ -46,6 +30,7 @@ export function createServer() {
|
|
|
46
30
|
MATCH_ERROR_TOOL,
|
|
47
31
|
VERIFY_BRANCH_FIX_TOOL,
|
|
48
32
|
PREPARE_NEW_RECIPE_TOOL,
|
|
33
|
+
PREPARE_FIX_CANDIDATE_TOOL,
|
|
49
34
|
],
|
|
50
35
|
}));
|
|
51
36
|
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
@@ -72,6 +57,9 @@ export function createServer() {
|
|
|
72
57
|
case 'prepare_new_recipe':
|
|
73
58
|
payload = await prepareNewRecipe(args);
|
|
74
59
|
break;
|
|
60
|
+
case 'prepare_fix_candidate':
|
|
61
|
+
payload = await prepareFixCandidate(args);
|
|
62
|
+
break;
|
|
75
63
|
default:
|
|
76
64
|
return {
|
|
77
65
|
isError: true,
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,oEAAoE;AACpE,2CAA2C;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACL,iBAAiB,EACjB,WAAW,GAEZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,aAAa,GACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,gBAAgB,EAChB,UAAU,GAEX,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,GAEpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,uBAAuB,EACvB,gBAAgB,GAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sBAAsB,EACtB,eAAe,GAEhB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,GAAG,cAAc,CAAC;AACnC,kEAAkE;AAClE,sEAAsE;AACtE,oEAAoE;AACpE,sEAAsE;AACtE,oEAAoE;AACpE,qEAAqE;AACrE,4DAA4D;AAC5D,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B,MAAM,UAAU,YAAY;IAC1B,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,EAC9C,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAChC,CAAC;IAEF,MAA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;gCACZ,IAAI,EAAE,iBAAiB,IAAI,EAAE;6BAC9B;yBACF;qBACF,CAAC;YACN,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,QAAQ,IAAI,WAAW,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;qBAChF;iBACF;aACF,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;iBACvC;aACF;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match_error.d.ts","sourceRoot":"","sources":["../../src/tools/match_error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"match_error.d.ts","sourceRoot":"","sources":["../../src/tools/match_error.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,YAAY;IACpB,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IAChD,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,YAAY;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,IAAI,CAAC;IACT,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAmOD,wBAAsB,UAAU,CAC9B,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,gBAAgB,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CA8B1D;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;CAuBnB,CAAC"}
|
|
@@ -1,33 +1,13 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Server-side mirror of the docs-site error → recipe matcher.
|
|
2
2
|
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
// Phase 7 A5 (ADR-0028) extends v1 with three accuracy improvements,
|
|
12
|
-
// none of which change the weights above:
|
|
13
|
-
// 1. Adjacent-pair token expansion — "data type" also tries `datatype`,
|
|
14
|
-
// so multi-word user input can hit single-word catalogue terms.
|
|
15
|
-
// 2. Synonym groups — variants of the same concept (e.g. `dtype` ⇄
|
|
16
|
-
// `datatype`) all expand to the whole group.
|
|
17
|
-
// 3. Bounded fuzzy match — tokens of length ≥ 6 within Levenshtein
|
|
18
|
-
// distance 1 score the same as exact, so "missmatch" still hits
|
|
19
|
-
// `mismatch`.
|
|
20
|
-
// 4. Multi-language stopwords — German, Spanish, French, Chinese,
|
|
21
|
-
// Korean noise tokens drop alongside the existing English+Japanese.
|
|
22
|
-
//
|
|
23
|
-
// **CRITICAL: keep in sync with `docs/components/ErrorRecipeMatcher.tsx`.**
|
|
24
|
-
// ADR-0025 §Neutral made the docs surface the canonical implementation;
|
|
25
|
-
// X.2 lifted it server-side bit-identical, and A5 keeps both copies
|
|
26
|
-
// updated atomically. Diverging the scoring between MCP and the docs
|
|
27
|
-
// matcher would surface as agent-vs-UI disagreement on identical input.
|
|
28
|
-
//
|
|
29
|
-
// The matcher remains mechanical — no LLM, no semantic embeddings.
|
|
30
|
-
// AGENTS.md §3.3's mechanical-over-judgement rule carries through.
|
|
3
|
+
// **Keep bit-identical with `docs/components/ErrorRecipeMatcher.tsx`.**
|
|
4
|
+
// Diverging scoring between MCP and the docs matcher would surface as
|
|
5
|
+
// agent-vs-UI disagreement on identical input. The scoring is
|
|
6
|
+
// mechanical (no LLM / embeddings):
|
|
7
|
+
// symptom +5, tags +3, project/slug +2; ties → (layer asc, slug asc).
|
|
8
|
+
// On top of exact match the matcher does adjacent-pair token
|
|
9
|
+
// expansion, synonym-group lookup, and bounded (len≥6, distance≤1)
|
|
10
|
+
// fuzzy match.
|
|
31
11
|
import { getCatalogue } from '../catalogue.js';
|
|
32
12
|
const MAX_INPUT_BYTES = 16 * 1024;
|
|
33
13
|
const DEFAULT_LIMIT = 10;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match_error.js","sourceRoot":"","sources":["../../src/tools/match_error.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"match_error.js","sourceRoot":"","sources":["../../src/tools/match_error.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,8DAA8D;AAC9D,oCAAoC;AACpC,wEAAwE;AACxE,6DAA6D;AAC7D,mEAAmE;AACnE,eAAe;AAEf,OAAO,EAAE,Y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KACnB;CACO,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export interface PrepareFixCandidateArgs {
|
|
2
|
+
slug?: string;
|
|
3
|
+
fork_url?: string;
|
|
4
|
+
branch?: string;
|
|
5
|
+
upstream_pr?: string;
|
|
6
|
+
package?: string;
|
|
7
|
+
purpose?: string;
|
|
8
|
+
}
|
|
9
|
+
interface FixCandidateJson {
|
|
10
|
+
schema_version: 1;
|
|
11
|
+
package: string;
|
|
12
|
+
purpose: string;
|
|
13
|
+
source: {
|
|
14
|
+
type: 'git';
|
|
15
|
+
url: string;
|
|
16
|
+
ref: string;
|
|
17
|
+
};
|
|
18
|
+
upstream_pr?: string;
|
|
19
|
+
}
|
|
20
|
+
interface PrepareFixCandidateOk {
|
|
21
|
+
ok: true;
|
|
22
|
+
slug: string;
|
|
23
|
+
layer: 1;
|
|
24
|
+
recipe_url: string;
|
|
25
|
+
fix_candidate_path: string;
|
|
26
|
+
fix_candidate_json: FixCandidateJson;
|
|
27
|
+
branch_name: string;
|
|
28
|
+
commit_subject: string;
|
|
29
|
+
pr_title: string;
|
|
30
|
+
pr_body: string;
|
|
31
|
+
commands: string[];
|
|
32
|
+
next_steps: string[];
|
|
33
|
+
references: {
|
|
34
|
+
rules: string;
|
|
35
|
+
adr: string;
|
|
36
|
+
builder_script: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
interface PrepareFixCandidateError {
|
|
40
|
+
ok: false;
|
|
41
|
+
error: string;
|
|
42
|
+
}
|
|
43
|
+
export type PrepareFixCandidateResult = PrepareFixCandidateOk | PrepareFixCandidateError;
|
|
44
|
+
export declare function prepareFixCandidate(args: PrepareFixCandidateArgs): Promise<PrepareFixCandidateResult>;
|
|
45
|
+
export declare const PREPARE_FIX_CANDIDATE_TOOL: {
|
|
46
|
+
readonly name: "prepare_fix_candidate";
|
|
47
|
+
readonly description: "Register a fix-candidate spec on an existing Layer 1 (WASM/Pyodide) Vivarium recipe so the recipe page runs the fix branch's wheel side-by-side with the released build (per ADR-0040). SCAFFOLDING HELPER, not an execution engine — same pattern as prepare_new_recipe and verify_branch_fix. Given a recipe slug + fork repo URL + branch name, returns: the `fix-candidate.json` content the agent should write, the recommended commit subject + PR title, a ready-to-paste PR body (with the AI-authorship and ADR-0040 details tucked inside a `<details>` block), and the exact `gh` / `git` commands to fork-and-clone aletheia-works/vivarium, branch off main, drop the spec in, commit, push, and open the cross-repo PR. Use this immediately after opening an upstream fix branch (e.g. on a fork of pylint-dev/astroid) when you want Vivarium to verify the fix live in-browser without waiting for upstream merge + a PyPI release. Validates the slug against the bundled catalogue and rejects non-Layer-1 recipes (Layers 2/3 use a different verification path — see verify_branch_fix).";
|
|
48
|
+
readonly inputSchema: {
|
|
49
|
+
readonly type: "object";
|
|
50
|
+
readonly properties: {
|
|
51
|
+
readonly slug: {
|
|
52
|
+
readonly type: "string";
|
|
53
|
+
readonly description: "Existing Layer 1 recipe slug to register the fix candidate on (e.g. 'astroid-2993'). Must resolve to a Layer 1 entry in the bundled catalogue — call list_recipes if you need to discover it.";
|
|
54
|
+
};
|
|
55
|
+
readonly fork_url: {
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
readonly pattern: "^https?://github\\.com/[^/]+/[^/]+/?$";
|
|
58
|
+
readonly description: "Bare GitHub repo URL of the fork that hosts the fix branch (e.g. 'https://github.com/JamBalaya56562/astroid'). Tree / blob / pull URLs are rejected; pass the canonical clone URL.";
|
|
59
|
+
};
|
|
60
|
+
readonly branch: {
|
|
61
|
+
readonly type: "string";
|
|
62
|
+
readonly description: "Branch name on the fork that contains the fix (e.g. 'claude/fix-astroid-2993-wVitv').";
|
|
63
|
+
};
|
|
64
|
+
readonly upstream_pr: {
|
|
65
|
+
readonly type: "string";
|
|
66
|
+
readonly description: "Optional URL of the PR you opened from this fork branch (e.g. 'https://github.com/pylint-dev/astroid/pull/<n>' or the fork-side draft PR URL while the upstream PR is still in progress). Embedded in the generated fix-candidate.json and surfaced in the page UI.";
|
|
67
|
+
};
|
|
68
|
+
readonly package: {
|
|
69
|
+
readonly type: "string";
|
|
70
|
+
readonly description: "Optional pip distribution name override. Defaults to the recipe's project name (e.g. 'astroid' for the astroid-2993 recipe). Override only when the project name and the pip distribution name diverge.";
|
|
71
|
+
};
|
|
72
|
+
readonly purpose: {
|
|
73
|
+
readonly type: "string";
|
|
74
|
+
readonly description: "Optional purpose / one-liner. Defaults to 'fix-candidate verification for <project>/<project>#<issue>'.";
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
readonly required: readonly ["slug", "fork_url", "branch"];
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=prepare_fix_candidate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare_fix_candidate.d.ts","sourceRoot":"","sources":["../../src/tools/prepare_fix_candidate.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,gBAAgB;IACxB,cAAc,EAAE,CAAC,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE;QAAE,IAAI,EAAE,KAAK,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,qBAAqB;IAC7B,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,CAAC,CAAC;IACT,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AAED,UAAU,wBAAwB;IAChC,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,yBAAyB,GACjC,qBAAqB,GACrB,wBAAwB,CAAC;AA+D7B,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,yBAAyB,CAAC,CA4HpC;AAED,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC7B,CAAC"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
// Scaffolding helper for registering a fix-candidate spec on an
|
|
2
|
+
// existing Layer 1 recipe (per ADR-0040 — fix-candidate.json + CI
|
|
3
|
+
// wheel build). Returns the spec content and the gh / git command
|
|
4
|
+
// bundle the agent should run; no git or network operations happen
|
|
5
|
+
// inside the MCP server.
|
|
6
|
+
import { getCatalogue } from '../catalogue.js';
|
|
7
|
+
// Bare GitHub repo URL — `https://github.com/<owner>/<repo>` with
|
|
8
|
+
// optional trailing slash. Tree / blob / pull URLs are rejected so the
|
|
9
|
+
// generated `fix-candidate.json` always carries the canonical clone
|
|
10
|
+
// URL.
|
|
11
|
+
const GITHUB_REPO_URL_REGEX = /^https?:\/\/github\.com\/[^/]+\/[^/]+\/?$/i;
|
|
12
|
+
function recipePageUrl(entry) {
|
|
13
|
+
return entry.page_url;
|
|
14
|
+
}
|
|
15
|
+
function buildPrBody(args) {
|
|
16
|
+
const lines = [];
|
|
17
|
+
lines.push(`Register a fix-candidate spec for \`${args.slug}\` so the recipe page runs the fix branch's wheel side-by-side with the released build (per ADR-0040).`);
|
|
18
|
+
lines.push('');
|
|
19
|
+
lines.push(`- Recipe: <${args.recipeUrl}>`);
|
|
20
|
+
lines.push(`- Spec: \`${args.fixCandidatePath}\``);
|
|
21
|
+
lines.push(`- Fork: \`${args.forkUrl}@${args.branch}\``);
|
|
22
|
+
if (args.upstreamPr)
|
|
23
|
+
lines.push(`- Upstream PR: <${args.upstreamPr}>`);
|
|
24
|
+
lines.push('');
|
|
25
|
+
lines.push(`After merge, CI builds the fix-candidate wheel from the fork branch on every deploy via \`scripts/build-layer1-wheels.sh\`. The recipe page then installs both \`${args.pkg}\` from PyPI and the fork-branch wheel into the same Pyodide tab and runs the same probe against each — the bug should reproduce under the baseline and not under the fix candidate.`);
|
|
26
|
+
lines.push('');
|
|
27
|
+
lines.push('<details>');
|
|
28
|
+
lines.push('<summary>How fix-candidate verification works</summary>');
|
|
29
|
+
lines.push('');
|
|
30
|
+
lines.push("`fix-candidate.json` is a tracked one-screen JSON spec at the recipe root (introduced by ADR-0040 to keep wheel binaries out of the repo). On every push to `main`, the deploy-docs workflow:");
|
|
31
|
+
lines.push('');
|
|
32
|
+
lines.push('1. Reads each `src/layer1_wasm/<slug>/fix-candidate.json`.');
|
|
33
|
+
lines.push('2. Builds a wheel from the spec\'s fork URL + branch via `pip wheel --no-deps "<pkg> @ git+<url>@<branch>"` in a `uv` ephemeral venv.');
|
|
34
|
+
lines.push("3. Writes the wheel + a generated `manifest.json` into the recipe's `wheels/` sibling directory (gitignored).");
|
|
35
|
+
lines.push('4. Bundles the recipe directory into the Pages artefact, so the wheel is served from the same origin as the page.');
|
|
36
|
+
lines.push('');
|
|
37
|
+
lines.push('On page load, `repro.ts` fetches `./wheels/manifest.json` and `micropip.install`s the wheel URL it resolves to. Refreshing the fix candidate is a one-line edit to this spec — no binary churn.');
|
|
38
|
+
lines.push('</details>');
|
|
39
|
+
lines.push('');
|
|
40
|
+
lines.push('---');
|
|
41
|
+
lines.push('_Generated with [Claude Code](https://claude.com/claude-code)_');
|
|
42
|
+
return lines.join('\n');
|
|
43
|
+
}
|
|
44
|
+
export async function prepareFixCandidate(args) {
|
|
45
|
+
const slug = (args.slug ?? '').trim();
|
|
46
|
+
const forkUrl = (args.fork_url ?? '').trim().replace(/\/$/, '');
|
|
47
|
+
const branch = (args.branch ?? '').trim();
|
|
48
|
+
const upstreamPr = (args.upstream_pr ?? '').trim();
|
|
49
|
+
const pkgOverride = (args.package ?? '').trim();
|
|
50
|
+
const purposeOverride = (args.purpose ?? '').trim();
|
|
51
|
+
if (!slug)
|
|
52
|
+
return { ok: false, error: 'slug is required' };
|
|
53
|
+
if (!forkUrl)
|
|
54
|
+
return { ok: false, error: 'fork_url is required' };
|
|
55
|
+
if (!branch)
|
|
56
|
+
return { ok: false, error: 'branch is required' };
|
|
57
|
+
if (!GITHUB_REPO_URL_REGEX.test(forkUrl)) {
|
|
58
|
+
return {
|
|
59
|
+
ok: false,
|
|
60
|
+
error: `fork_url must be a bare GitHub repo URL like "https://github.com/<owner>/<repo>" (got "${forkUrl}"). Tree / blob / pull URLs are rejected; pass the canonical clone URL.`,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const catalogue = await getCatalogue();
|
|
64
|
+
const entry = catalogue.recipes.find((r) => r.slug === slug);
|
|
65
|
+
if (!entry) {
|
|
66
|
+
return {
|
|
67
|
+
ok: false,
|
|
68
|
+
error: `slug "${slug}" not found in the recipe catalogue. Use list_recipes to discover the slug.`,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (entry.layer !== 1) {
|
|
72
|
+
return {
|
|
73
|
+
ok: false,
|
|
74
|
+
error: `fix-candidate verification (ADR-0040) is currently only wired up for Layer 1 recipes; "${slug}" is layer ${entry.layer}. Layers 2/3 use a different verification path — see verify_branch_fix.`,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const pkg = pkgOverride || entry.project;
|
|
78
|
+
const purpose = purposeOverride ||
|
|
79
|
+
`fix-candidate verification for ${entry.project}/${entry.project}#${entry.issue}`;
|
|
80
|
+
const fixCandidateJson = {
|
|
81
|
+
schema_version: 1,
|
|
82
|
+
package: pkg,
|
|
83
|
+
purpose,
|
|
84
|
+
source: { type: 'git', url: forkUrl, ref: branch },
|
|
85
|
+
...(upstreamPr ? { upstream_pr: upstreamPr } : {}),
|
|
86
|
+
};
|
|
87
|
+
const fixCandidatePath = `src/layer1_wasm/${slug}/fix-candidate.json`;
|
|
88
|
+
const branchName = `register-fix-candidate-${slug}`;
|
|
89
|
+
const commitSubject = `feat(wasm): register fix-candidate for ${slug}`;
|
|
90
|
+
const prTitle = commitSubject;
|
|
91
|
+
const recipeUrl = recipePageUrl(entry);
|
|
92
|
+
const fixCandidateJsonStr = JSON.stringify(fixCandidateJson, null, 2);
|
|
93
|
+
const prBody = buildPrBody({
|
|
94
|
+
slug,
|
|
95
|
+
recipeUrl,
|
|
96
|
+
fixCandidatePath,
|
|
97
|
+
forkUrl,
|
|
98
|
+
branch,
|
|
99
|
+
upstreamPr,
|
|
100
|
+
pkg,
|
|
101
|
+
});
|
|
102
|
+
// Heredoc inside the single-quoted strings below (`<<'EOF'`) keeps
|
|
103
|
+
// the JSON literal byte-for-byte intact when the agent pastes the
|
|
104
|
+
// command bundle into a shell.
|
|
105
|
+
const commands = [
|
|
106
|
+
'# 1. Make sure you have a clone of aletheia-works/vivarium (fork it first if you do not have write access).',
|
|
107
|
+
'gh repo fork aletheia-works/vivarium --clone --remote=false',
|
|
108
|
+
'cd vivarium',
|
|
109
|
+
'',
|
|
110
|
+
'# 2. Branch off main.',
|
|
111
|
+
`git checkout -b ${branchName} main`,
|
|
112
|
+
'',
|
|
113
|
+
`# 3. Write ${fixCandidatePath} (the literal JSON from fix_candidate_json).`,
|
|
114
|
+
`mkdir -p "$(dirname ${fixCandidatePath})"`,
|
|
115
|
+
`cat > ${fixCandidatePath} <<'EOF'`,
|
|
116
|
+
fixCandidateJsonStr,
|
|
117
|
+
'EOF',
|
|
118
|
+
'',
|
|
119
|
+
'# 4. (Optional) Build the wheel locally to confirm the spec resolves.',
|
|
120
|
+
'mise install && mise run repro:build:wheels',
|
|
121
|
+
'',
|
|
122
|
+
'# 5. Commit + push to your fork.',
|
|
123
|
+
`git add ${fixCandidatePath}`,
|
|
124
|
+
`git commit -m '${commitSubject}'`,
|
|
125
|
+
`git push -u origin ${branchName}`,
|
|
126
|
+
'',
|
|
127
|
+
'# 6. Open the PR against aletheia-works/vivarium (paste pr_body into pr-body.md first).',
|
|
128
|
+
`gh pr create --repo aletheia-works/vivarium --base main --title '${prTitle}' --body-file pr-body.md`,
|
|
129
|
+
'',
|
|
130
|
+
'# 7. Apply the AI authorship label (replace <pr-number> with the URL the previous step prints).',
|
|
131
|
+
"# gh pr edit <pr-number> --repo aletheia-works/vivarium --add-label 'ai: generated'",
|
|
132
|
+
];
|
|
133
|
+
const nextSteps = [
|
|
134
|
+
`Confirm the fork branch builds a Pyodide-compatible wheel: \`pip wheel --no-deps "${pkg} @ git+${forkUrl}@${branch}"\` should produce a \`*-py3-none-any.whl\`. Native-extension packages need a different path (Layer 2).`,
|
|
135
|
+
'Open the PR using the commands above; the Vivarium CI will build the wheel and deploy the updated page automatically once merged.',
|
|
136
|
+
`After deploy, eyeball the recipe page at <${recipeUrl}> — the page now installs both the baseline and the fork-branch wheel and shows two output panels.`,
|
|
137
|
+
`When the upstream PR merges and a fixed release lands on PyPI, open a follow-up PR to bump the canonical pin and remove ${fixCandidatePath} (the two-variant scaffolding becomes redundant).`,
|
|
138
|
+
];
|
|
139
|
+
return {
|
|
140
|
+
ok: true,
|
|
141
|
+
slug,
|
|
142
|
+
layer: 1,
|
|
143
|
+
recipe_url: recipeUrl,
|
|
144
|
+
fix_candidate_path: fixCandidatePath,
|
|
145
|
+
fix_candidate_json: fixCandidateJson,
|
|
146
|
+
branch_name: branchName,
|
|
147
|
+
commit_subject: commitSubject,
|
|
148
|
+
pr_title: prTitle,
|
|
149
|
+
pr_body: prBody,
|
|
150
|
+
commands,
|
|
151
|
+
next_steps: nextSteps,
|
|
152
|
+
references: {
|
|
153
|
+
rules: 'https://github.com/aletheia-works/vivarium/blob/main/.claude/rules/recipe-authoring.md',
|
|
154
|
+
adr: 'ADR-0040 — _context/decisions/0040-layer1-fix-candidate-wheels-from-ci.md (private; PR #213 carries the public-facing summary)',
|
|
155
|
+
builder_script: 'https://github.com/aletheia-works/vivarium/blob/main/scripts/build-layer1-wheels.sh',
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
export const PREPARE_FIX_CANDIDATE_TOOL = {
|
|
160
|
+
name: 'prepare_fix_candidate',
|
|
161
|
+
description: "Register a fix-candidate spec on an existing Layer 1 (WASM/Pyodide) Vivarium recipe so the recipe page runs the fix branch's wheel side-by-side with the released build (per ADR-0040). SCAFFOLDING HELPER, not an execution engine — same pattern as prepare_new_recipe and verify_branch_fix. Given a recipe slug + fork repo URL + branch name, returns: the `fix-candidate.json` content the agent should write, the recommended commit subject + PR title, a ready-to-paste PR body (with the AI-authorship and ADR-0040 details tucked inside a `<details>` block), and the exact `gh` / `git` commands to fork-and-clone aletheia-works/vivarium, branch off main, drop the spec in, commit, push, and open the cross-repo PR. Use this immediately after opening an upstream fix branch (e.g. on a fork of pylint-dev/astroid) when you want Vivarium to verify the fix live in-browser without waiting for upstream merge + a PyPI release. Validates the slug against the bundled catalogue and rejects non-Layer-1 recipes (Layers 2/3 use a different verification path — see verify_branch_fix).",
|
|
162
|
+
inputSchema: {
|
|
163
|
+
type: 'object',
|
|
164
|
+
properties: {
|
|
165
|
+
slug: {
|
|
166
|
+
type: 'string',
|
|
167
|
+
description: "Existing Layer 1 recipe slug to register the fix candidate on (e.g. 'astroid-2993'). Must resolve to a Layer 1 entry in the bundled catalogue — call list_recipes if you need to discover it.",
|
|
168
|
+
},
|
|
169
|
+
fork_url: {
|
|
170
|
+
type: 'string',
|
|
171
|
+
pattern: '^https?://github\\.com/[^/]+/[^/]+/?$',
|
|
172
|
+
description: "Bare GitHub repo URL of the fork that hosts the fix branch (e.g. 'https://github.com/JamBalaya56562/astroid'). Tree / blob / pull URLs are rejected; pass the canonical clone URL.",
|
|
173
|
+
},
|
|
174
|
+
branch: {
|
|
175
|
+
type: 'string',
|
|
176
|
+
description: "Branch name on the fork that contains the fix (e.g. 'claude/fix-astroid-2993-wVitv').",
|
|
177
|
+
},
|
|
178
|
+
upstream_pr: {
|
|
179
|
+
type: 'string',
|
|
180
|
+
description: "Optional URL of the PR you opened from this fork branch (e.g. 'https://github.com/pylint-dev/astroid/pull/<n>' or the fork-side draft PR URL while the upstream PR is still in progress). Embedded in the generated fix-candidate.json and surfaced in the page UI.",
|
|
181
|
+
},
|
|
182
|
+
package: {
|
|
183
|
+
type: 'string',
|
|
184
|
+
description: "Optional pip distribution name override. Defaults to the recipe's project name (e.g. 'astroid' for the astroid-2993 recipe). Override only when the project name and the pip distribution name diverge.",
|
|
185
|
+
},
|
|
186
|
+
purpose: {
|
|
187
|
+
type: 'string',
|
|
188
|
+
description: "Optional purpose / one-liner. Defaults to 'fix-candidate verification for <project>/<project>#<issue>'.",
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
required: ['slug', 'fork_url', 'branch'],
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
//# sourceMappingURL=prepare_fix_candidate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare_fix_candidate.js","sourceRoot":"","sources":["../../src/tools/prepare_fix_candidate.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,kEAAkE;AAClE,kEAAkE;AAClE,mEAAmE;AACnE,yBAAyB;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAiD/C,kEAAkE;AAClE,uEAAuE;AACvE,o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;QACR,IAAI;QACJ,KAAK,EAAE,CAAC;QACR,UAAU,EAAE,SAAS;QACrB,kBAAkB,EAAE,gBAAgB;QACpC,kBAAkB,EAAE,gBAAgB;QACpC,WAAW,EAAE,UAAU;QACvB,cAAc,EAAE,aAAa;QAC7B,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,MAAM;QACf,QAAQ;QACR,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE;YACV,KAAK,EACH,wFAAwF;YAC1F,GAAG,EAAE,gIAAgI;YACrI,cAAc,EACZ,qFAAqF;SACxF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,+iCAA+iC;IACjjC,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,+LAA+L;aAClM;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAiB;gBACvB,OAAO,EAAE,uCAAuC;gBAChD,WAAW,EACT,oLAAoL;aACvL;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,uFAAuF;aAC1F;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,qQAAqQ;aACxQ;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,yMAAyM;aAC5M;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,yGAAyG;aAC5G;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC;KACzC;CACO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare_new_recipe.d.ts","sourceRoot":"","sources":["../../src/tools/prepare_new_recipe.ts"],"names":[],"mappings":"
|
|
1
|
+
{"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;QACd,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH;AAED,UAAU,qBAAqB;IAC7B,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,sBAAsB,GAC9B,kBAAkB,GAClB,qBAAqB,CAAC;AAuC1B,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,sBAAsB,CAAC,CAoHjC;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4C1B,CAAC"}
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// in docs/scripts/generate-recipes-index.ts would not resolve)
|
|
7
|
-
// - the exact `mise run recipes:new -- ...` and
|
|
8
|
-
// `mise run recipes:verify -- ...` commands the agent should run
|
|
9
|
-
// - placeholder rows for docs/data/recipe-facets.json (always) and
|
|
10
|
-
// docs/data/projects.json (only when the project is new), with
|
|
11
|
-
// TODO markers for the human to fill in
|
|
12
|
-
// - a commit-subject template matching the `feat(layer<N>):` /
|
|
13
|
-
// `feat(wasm):` historical scope conventions
|
|
14
|
-
// - a sequenced next-steps checklist
|
|
15
|
-
//
|
|
16
|
-
// SCAFFOLDING HELPER, NOT an execution engine — same pattern as
|
|
17
|
-
// verify_branch_fix. The MCP server returns the commands and
|
|
18
|
-
// metadata; the agent's shell tool actually invokes mise.
|
|
1
|
+
// Scaffolding helper that bundles every artefact an agent needs to
|
|
2
|
+
// author a new recipe (validated slug, scaffold + verify commands,
|
|
3
|
+
// placeholder facets / projects rows, commit-subject template, next
|
|
4
|
+
// steps). The MCP server returns the commands and metadata; the
|
|
5
|
+
// agent's shell tool actually invokes mise.
|
|
19
6
|
// Same regex as parseSlug() in docs/scripts/generate-recipes-index.ts.
|
|
20
7
|
// Single-sourced as a literal here because the MCP package is published
|
|
21
8
|
// independently and cannot import from docs/.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare_new_recipe.js","sourceRoot":"","sources":["../../src/tools/prepare_new_recipe.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"prepare_new_recipe.js","sourceRoot":"","sources":["../../src/tools/prepare_new_recipe.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,mEAAmE;AACnE,oEAAoE;AACpE,gEAAgE;AAChE,4CAA4C;AA8D5C,uEAAuE;AACvE,wEAAwE;AACxE,8CAA8C;AAC9C,MAAM,UAAU,GAAG,+CAA+C,CAAC;AAEnE,wEAAwE;AACxE,0DAA0D;AAC1D,MAAM,YAAY,GAA2B;IAC3C,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,gBAAgB;IACzB,UAAU,EAAE,sBAAsB;IAClC,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE,aAAa;IACpB,GAAG,EAAE,aAAa;IAClB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,iBAAiB;CACzB,CAAC;AAEF,oEAAoE;AACpE,sEAAsE;AACtE,mEAAmE;AACnE,SAAS,cAAc,CAAC,KAAY;IAClC,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,CAAC;YACJ,OAAO,MAAM,CAAC;QAChB,KAAK,CAAC;YACJ,OAAO,QAAQ,CAAC;QAClB,KAAK,CAAC;YACJ,OAAO,QAAQ,CAAC;IACpB,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,OAAe;IACrC,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,GAAG,OAAO,IAAI,OAAO,EAAE,CAAC;AAC1D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,IAA0B;IAE1B,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI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QACvB,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAiB;gBACvB,OAAO,EAAE,oCAAoC;gBAC7C,WAAW,EACT,qJAAqJ;aACxJ;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,SAAkB;gBACxB,OAAO,EAAE,CAAC;gBACV,WAAW,EACT,6EAA6E;aAChF;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,oJAAoJ;aACvJ;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,2JAA2J;aAC9J;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,oPAAoP;aACvP;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,SAAkB;gBACxB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACf,OAAO,EAAE,CAAC;gBACV,WAAW,EACT,wJAAwJ;aAC3J;SACF;QACD,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC;KACxC;CACO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify_branch_fix.d.ts","sourceRoot":"","sources":["../../src/tools/verify_branch_fix.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify_branch_fix.d.ts","sourceRoot":"","sources":["../../src/tools/verify_branch_fix.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,aAAa,CAAC;AAEtD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,iBAAiB;IACzB,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,UAAU,oBAAoB;IAC5B,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AA6H7E,wBAAsB,eAAe,CACnC,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,qBAAqB,CAAC,CAyFhC;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;CA2BzB,CAAC"}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// browser MCP the agent separately drives).
|
|
8
|
-
//
|
|
9
|
-
// Layer dispatch:
|
|
10
|
-
// - Layer 1 → path A. compare_url is the recipe page itself with
|
|
11
|
-
// `?fix_url=` or `?fix=<base64url>` so the visitor's browser does
|
|
12
|
-
// the run. Path A produces a verdict bundle the visitor drops on
|
|
13
|
-
// /repro/compare.
|
|
14
|
-
// - Layer 2/3 → path B. compare_url is /repro/compare with `?slug=`
|
|
15
|
-
// and `?branch_url=` placeholders; gh_command is the
|
|
16
|
-
// `branch-fix-verdict.yml` workflow_dispatch line the agent runs.
|
|
1
|
+
// Scaffolding helper for the AI-slop branch-fix verification loop.
|
|
2
|
+
// Returns deep-link URLs / commands; execution happens in the
|
|
3
|
+
// visitor's browser (Layer 1 → path A: `?fix_url=` / `?fix=<base64>`)
|
|
4
|
+
// or in GitHub Actions (Layer 2/3 → path B: a
|
|
5
|
+
// `branch-fix-verdict.yml` workflow_dispatch line). The MCP server
|
|
6
|
+
// itself runs no wasm and dispatches no jobs.
|
|
17
7
|
import { getCatalogue } from '../catalogue.js';
|
|
18
8
|
const FIX_INLINE_LIMIT_BYTES = 4 * 1024;
|
|
19
9
|
const PIPELINE_DOC_URL = 'https://aletheia-works.github.io/vivarium/spec/branch-fix-pipeline';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify_branch_fix.js","sourceRoot":"","sources":["../../src/tools/verify_branch_fix.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"verify_branch_fix.js","sourceRoot":"","sources":["../../src/tools/verify_branch_fix.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,8DAA8D;AAC9D,sEAAsE;AACtE,8CAA8C;AAC9C,mEAAmE;AACnE,8CAA8C;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA4B/C,MAAM,sBAAsB,GAAG,CAAC,GAAG,IAAI,CAAC;AAExC,MAAM,gBAAgB,GACpB,oEAAoE,CAAC;AACvE,MAAM,aAAa,GACjB,oEAAoE,CAAC;AACvE,MAAM,aAAa,GACjB,uEAAuE,CAAC;AAE1E,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,SAAS,eAAe,CAAC,IAAY;IACnC,sEAAsE;IACtE,qEAAqE;IACrE,MAAM,KAAK,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,MAAM,CAAC,IAAI,KAAK;QAAE,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACrD,oEAAoE;IACpE,aAAa;IACb,MAAM,GAAG,GACP,OAAO,IAAI,KAAK,UAAU;QACxB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QACX,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5C,OAAO,GAAG,CAAC,OAAO,C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,EAAE,QAAiB;gBACvB,WAAW,EACT,0MAA0M;aAC7M;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAiB;gBACvB,SAAS,EAAE,sBAAsB;gBACjC,WAAW,EACT,kMAAkM;aACrM;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;CACO,CAAC"}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE9B,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,EAAE,IAAI,CAAC;IACf,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG,cAAc,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,IAAI,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IAGf,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
package/dist/types.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// v1, ADR-0014, with the optional revision-2 evidence surface from
|
|
4
|
-
// ADR-0018). Kept structural and surface-only — the canonical schemas
|
|
1
|
+
// Surface-only type façade for the recipes index (v1) and the
|
|
2
|
+
// Layer 2/3 verdict snapshot (Contract v1). Canonical JSON Schemas
|
|
5
3
|
// live at:
|
|
6
|
-
//
|
|
7
4
|
// https://aletheia-works.github.io/vivarium/api/recipes.schema.json
|
|
8
5
|
// https://aletheia-works.github.io/vivarium/spec/verdict.schema.json
|
|
9
|
-
//
|
|
10
|
-
// Consumers who need runtime validation should fetch and validate against
|
|
11
|
-
// those JSON Schemas; this module's types are an ergonomic façade for
|
|
12
|
-
// the in-process tool implementations.
|
|
13
6
|
export {};
|
|
14
7
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,mEAAmE;AACnE,WAAW;AACX,sEAAsE;AACtE,uEAAuE"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aletheia-works/vivarium-mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP server exposing the Vivarium reproduction catalogue (list_recipes, get_recipe, lookup_verdict, match_error, verify_branch_fix) to AI agent clients (Claude Code, Cline, Cursor, Continue, etc.).",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "MCP server exposing the Vivarium reproduction catalogue (list_recipes, get_recipe, lookup_verdict, match_error, verify_branch_fix, prepare_new_recipe, prepare_fix_candidate) to AI agent clients (Claude Code, Cline, Cursor, Continue, etc.).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/aletheia-works/vivarium/tree/main/packages/mcp-server",
|
|
7
7
|
"bugs": {
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
"LICENSE"
|
|
26
26
|
],
|
|
27
27
|
"scripts": {
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"sync:bundled": "mkdir -p src/bundled && cp ../../docs/public/api/recipes.json src/bundled/recipes.json",
|
|
29
|
+
"build": "bun run sync:bundled && tsc",
|
|
30
|
+
"test": "bun run sync:bundled && bun test",
|
|
30
31
|
"prepublishOnly": "bun run build"
|
|
31
32
|
},
|
|
32
33
|
"dependencies": {
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
36
37
|
"@types/bun": "^1.3.13",
|
|
37
|
-
"@types/node": "^25.6.
|
|
38
|
+
"@types/node": "^25.6.2",
|
|
38
39
|
"typescript": "^6.0.3"
|
|
39
40
|
},
|
|
40
41
|
"engines": {
|
package/src/bundled/recipes.json
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
"index": "v1",
|
|
3
3
|
"contract": "v1",
|
|
4
4
|
"recipes": [
|
|
5
|
+
{
|
|
6
|
+
"slug": "astroid-2993",
|
|
7
|
+
"layer": 1,
|
|
8
|
+
"project": "astroid",
|
|
9
|
+
"issue": 2993,
|
|
10
|
+
"title": "pylint-dev/astroid#2993",
|
|
11
|
+
"page_url": "https://aletheia-works.github.io/vivarium/repro/astroid/2993/",
|
|
12
|
+
"source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer1_wasm/astroid-2993",
|
|
13
|
+
"language": "python",
|
|
14
|
+
"tags": [
|
|
15
|
+
"ast",
|
|
16
|
+
"type-comment",
|
|
17
|
+
"fuzzing",
|
|
18
|
+
"oss-fuzz"
|
|
19
|
+
],
|
|
20
|
+
"symptom": "memory-error-on-fuzzed-input",
|
|
21
|
+
"severity": "crash"
|
|
22
|
+
},
|
|
5
23
|
{
|
|
6
24
|
"slug": "cpython-137205",
|
|
7
25
|
"layer": 1,
|
|
@@ -20,6 +38,24 @@
|
|
|
20
38
|
"symptom": "fk-pragma-silently-dropped",
|
|
21
39
|
"severity": "spec-violation"
|
|
22
40
|
},
|
|
41
|
+
{
|
|
42
|
+
"slug": "mpmath-983",
|
|
43
|
+
"layer": 1,
|
|
44
|
+
"project": "mpmath",
|
|
45
|
+
"issue": 983,
|
|
46
|
+
"title": "mpmath/mpmath#983",
|
|
47
|
+
"page_url": "https://aletheia-works.github.io/vivarium/repro/mpmath/983/",
|
|
48
|
+
"source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer1_wasm/mpmath-983",
|
|
49
|
+
"language": "python",
|
|
50
|
+
"tags": [
|
|
51
|
+
"numerical-linear-algebra",
|
|
52
|
+
"qr-solve",
|
|
53
|
+
"householder",
|
|
54
|
+
"arbitrary-precision"
|
|
55
|
+
],
|
|
56
|
+
"symptom": "solver-asymmetry-on-nonsingular-matrix",
|
|
57
|
+
"severity": "bug"
|
|
58
|
+
},
|
|
23
59
|
{
|
|
24
60
|
"slug": "numpy-28287",
|
|
25
61
|
"layer": 1,
|