@aletheia-works/vivarium-mcp 0.1.1 → 0.1.4
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 +1 -1
- package/dist/bundled/recipes.json +0 -18
- package/dist/catalogue.js +1 -1
- package/dist/catalogue.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +13 -3
- package/dist/server.js.map +1 -1
- package/dist/tools/match_error.d.ts +1 -1
- package/dist/tools/match_error.d.ts.map +1 -1
- package/dist/tools/match_error.js +5 -20
- package/dist/tools/match_error.js.map +1 -1
- package/dist/tools/prepare_fix_candidate.d.ts +6 -7
- package/dist/tools/prepare_fix_candidate.d.ts.map +1 -1
- package/dist/tools/prepare_fix_candidate.js +15 -14
- package/dist/tools/prepare_fix_candidate.js.map +1 -1
- package/dist/tools/prepare_new_recipe.d.ts +4 -2
- package/dist/tools/prepare_new_recipe.d.ts.map +1 -1
- package/dist/tools/prepare_new_recipe.js +25 -8
- package/dist/tools/prepare_new_recipe.js.map +1 -1
- package/dist/tools/search_upstream_issues.d.ts +100 -0
- package/dist/tools/search_upstream_issues.d.ts.map +1 -0
- package/dist/tools/search_upstream_issues.js +239 -0
- package/dist/tools/search_upstream_issues.js.map +1 -0
- package/dist/tools/verify_and_report_fix.d.ts +63 -0
- package/dist/tools/verify_and_report_fix.d.ts.map +1 -0
- package/dist/tools/verify_and_report_fix.js +216 -0
- package/dist/tools/verify_and_report_fix.js.map +1 -0
- package/dist/tools/verify_branch_fix.d.ts.map +1 -1
- package/dist/tools/verify_branch_fix.js +3 -9
- package/dist/tools/verify_branch_fix.js.map +1 -1
- package/dist/types.d.ts +30 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -2
- package/dist/types.js.map +1 -1
- package/package.json +3 -3
- package/src/bundled/recipes.json +0 -18
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ deployed verdict snapshots, without scraping the docs site.
|
|
|
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
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/
|
|
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/site/_data/recipe-facets.json` and (if the project is new) `docs/site/_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
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`). |
|
|
26
26
|
|
|
27
27
|
## Install
|
|
@@ -2,24 +2,6 @@
|
|
|
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
|
-
},
|
|
23
5
|
{
|
|
24
6
|
"slug": "cpython-137205",
|
|
25
7
|
"layer": 1,
|
package/dist/catalogue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Catalogue fetcher: 5-minute in-process TTL with a build-time bundled
|
|
2
2
|
// fallback for offline / network-failure / cold-start. The bundled
|
|
3
3
|
// snapshot is refreshed at publish time by the GHA workflow that
|
|
4
|
-
// copies docs/public/api/recipes.json into src/bundled/.
|
|
4
|
+
// copies docs/site/public/api/recipes.json into src/bundled/.
|
|
5
5
|
import bundledIndex from './bundled/recipes.json' with { type: 'json' };
|
|
6
6
|
export const INDEX_URL = 'https://aletheia-works.github.io/vivarium/api/recipes.json';
|
|
7
7
|
const TTL_MS = 5 * 60 * 1000;
|
package/dist/catalogue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalogue.js","sourceRoot":"","sources":["../src/catalogue.ts"],"names":[],"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AAI,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":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AA0DnE,wBAAgB,YAAY,IAAI,MAAM,CAkGrC;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAI/C"}
|
package/dist/server.js
CHANGED
|
@@ -10,6 +10,8 @@ import { LOOKUP_VERDICT_TOOL, lookupVerdict, } from './tools/lookup_verdict.js';
|
|
|
10
10
|
import { MATCH_ERROR_TOOL, matchError, } from './tools/match_error.js';
|
|
11
11
|
import { PREPARE_FIX_CANDIDATE_TOOL, prepareFixCandidate, } from './tools/prepare_fix_candidate.js';
|
|
12
12
|
import { PREPARE_NEW_RECIPE_TOOL, prepareNewRecipe, } from './tools/prepare_new_recipe.js';
|
|
13
|
+
import { SEARCH_UPSTREAM_ISSUES_TOOL, searchUpstreamIssues, } from './tools/search_upstream_issues.js';
|
|
14
|
+
import { VERIFY_AND_REPORT_FIX_TOOL, verifyAndReportFix, } from './tools/verify_and_report_fix.js';
|
|
13
15
|
import { VERIFY_BRANCH_FIX_TOOL, verifyBranchFix, } from './tools/verify_branch_fix.js';
|
|
14
16
|
const SERVER_NAME = 'vivarium-mcp';
|
|
15
17
|
// Keep in sync with package.json + jsr.json. The MCP `initialize`
|
|
@@ -17,9 +19,9 @@ const SERVER_NAME = 'vivarium-mcp';
|
|
|
17
19
|
// these three files produce a confusing client experience. Bump the
|
|
18
20
|
// patch component for additive changes within v0.x (additional tools,
|
|
19
21
|
// description / surface refinements) — the project is still pre-1.0
|
|
20
|
-
// and `prepare_fix_candidate`
|
|
21
|
-
//
|
|
22
|
-
const SERVER_VERSION = '0.1.
|
|
22
|
+
// and `prepare_fix_candidate` is meaningful but fully opt-in, so a minor
|
|
23
|
+
// bump would overstate the impact.
|
|
24
|
+
const SERVER_VERSION = '0.1.4';
|
|
23
25
|
export function createServer() {
|
|
24
26
|
const server = new Server({ name: SERVER_NAME, version: SERVER_VERSION }, { capabilities: { tools: {} } });
|
|
25
27
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
@@ -28,7 +30,9 @@ export function createServer() {
|
|
|
28
30
|
GET_RECIPE_TOOL,
|
|
29
31
|
LOOKUP_VERDICT_TOOL,
|
|
30
32
|
MATCH_ERROR_TOOL,
|
|
33
|
+
SEARCH_UPSTREAM_ISSUES_TOOL,
|
|
31
34
|
VERIFY_BRANCH_FIX_TOOL,
|
|
35
|
+
VERIFY_AND_REPORT_FIX_TOOL,
|
|
32
36
|
PREPARE_NEW_RECIPE_TOOL,
|
|
33
37
|
PREPARE_FIX_CANDIDATE_TOOL,
|
|
34
38
|
],
|
|
@@ -51,9 +55,15 @@ export function createServer() {
|
|
|
51
55
|
case 'match_error':
|
|
52
56
|
payload = await matchError(args);
|
|
53
57
|
break;
|
|
58
|
+
case 'search_upstream_issues':
|
|
59
|
+
payload = await searchUpstreamIssues(args);
|
|
60
|
+
break;
|
|
54
61
|
case 'verify_branch_fix':
|
|
55
62
|
payload = await verifyBranchFix(args);
|
|
56
63
|
break;
|
|
64
|
+
case 'verify_and_report_fix':
|
|
65
|
+
payload = await verifyAndReportFix(args);
|
|
66
|
+
break;
|
|
57
67
|
case 'prepare_new_recipe':
|
|
58
68
|
payload = await prepareNewRecipe(args);
|
|
59
69
|
break;
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,cAA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AAG,MAAM,kBAAkB,CAChC,IAAyC,CAC1C,CAAC;oBACF,MAAM;gBACR,KAAK,oBAAoB;oBACvB,OAAO,GAAG,MAAM,gBAAgB,CAC9B,IAAuC,CACxC,CAAC;oBACF,MAAM;gBACR,KAAK,uBAAuB;oBAC1B,OAAO,GAAG,MAAM,mBAAmB,CACjC,IAA0C,CAC3C,CAAC;oBACF,MAAM;gBACR;oBACE,OAAO;wBACL,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE;4BACP;gCACE,IAAI,EAAE,MAAM;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"}
|
|
@@ -39,7 +39,7 @@ export declare function matchError(args: MatchErrorArgs): Promise<MatchErrorResu
|
|
|
39
39
|
}>;
|
|
40
40
|
export declare const MATCH_ERROR_TOOL: {
|
|
41
41
|
readonly name: "match_error";
|
|
42
|
-
readonly description: "Find Vivarium recipes that match a pasted error message or stack trace by mechanical token overlap (no LLM). The text is tokenised, lowercase-compared against each recipe's symptom (weight 5 per segment), tags (3), project (2), and slug (2).
|
|
42
|
+
readonly description: "Find Vivarium recipes that match a pasted error message or stack trace by mechanical token overlap (no LLM). The text is tokenised, lowercase-compared against each recipe's symptom (weight 5 per segment), tags (3), project (2), and slug (2). Matching includes adjacent-pair tokens (so 'data type' can hit `dtype`), a small synonym table (e.g. dtype⇄datatype, segfault⇄sigsegv), and bounded Levenshtein-1 fuzzy matching for tokens of length >= 6. Stopword set covers English, Japanese, German, Spanish, French, Chinese, and Korean noise tokens. Recipes with score > 0 are returned in descending score order; ties broken by (layer asc, slug asc). Each matched token reports its `via` (`synonym` or `fuzzy` when non-exact) and the original `input` that triggered it, so agents can render the provenance. Pair with `get_recipe` to drill into a specific result, or `list_recipes` for unfiltered browsing.";
|
|
43
43
|
readonly inputSchema: {
|
|
44
44
|
readonly type: "object";
|
|
45
45
|
readonly properties: {
|
|
@@ -1 +1 @@
|
|
|
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,EAA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-side mirror of the docs-site error → recipe matcher.
|
|
2
2
|
//
|
|
3
|
-
// **Keep bit-identical with `docs/
|
|
3
|
+
// **Keep bit-identical with `docs/site/_components/ErrorRecipeMatcher.tsx`.**
|
|
4
4
|
// Diverging scoring between MCP and the docs matcher would surface as
|
|
5
5
|
// agent-vs-UI disagreement on identical input. The scoring is
|
|
6
6
|
// mechanical (no LLM / embeddings):
|
|
@@ -12,12 +12,7 @@ import { getCatalogue } from '../catalogue.js';
|
|
|
12
12
|
const MAX_INPUT_BYTES = 16 * 1024;
|
|
13
13
|
const DEFAULT_LIMIT = 10;
|
|
14
14
|
const MAX_LIMIT = 50;
|
|
15
|
-
//
|
|
16
|
-
// lexical coverage of any single language — it's dropping the
|
|
17
|
-
// frequent noise tokens that would never sit in a recipe overlay.
|
|
18
|
-
// Anything that sneaks through scores 0 against the catalogue
|
|
19
|
-
// anyway; the worst case is wasted comparison cycles, not wrong
|
|
20
|
-
// matches.
|
|
15
|
+
// Drop frequent noise tokens; anything unknown still scores 0 against the catalogue.
|
|
21
16
|
const STOPWORDS = new Set([
|
|
22
17
|
// English
|
|
23
18
|
'the', 'and', 'for', 'with', 'from', 'that', 'this', 'have',
|
|
@@ -41,14 +36,7 @@ const STOPWORDS = new Set([
|
|
|
41
36
|
// Korean (common particles + error words)
|
|
42
37
|
'오류', '예외', '실패', '스택',
|
|
43
38
|
]);
|
|
44
|
-
//
|
|
45
|
-
// user's input expands the input set to include all members.
|
|
46
|
-
// Variants are stored hyphen-stripped (lowercase, alphanumeric)
|
|
47
|
-
// to match the kebab-segmented catalogue tokens.
|
|
48
|
-
//
|
|
49
|
-
// Conservative on purpose — false-positive pressure rises with
|
|
50
|
-
// table size. Add a group only when there's an unambiguous mapping
|
|
51
|
-
// between a user-input shape and a catalogue overlay token.
|
|
39
|
+
// Variants are stored hyphen-stripped to match the kebab-segmented catalogue tokens.
|
|
52
40
|
const SYNONYM_GROUPS = [
|
|
53
41
|
['dtype', 'datatype'],
|
|
54
42
|
['nullptr', 'nullpointer', 'nilptr', 'nullpointerexception'],
|
|
@@ -70,10 +58,7 @@ const SYNONYM_MAP = (() => {
|
|
|
70
58
|
}
|
|
71
59
|
return m;
|
|
72
60
|
})();
|
|
73
|
-
//
|
|
74
|
-
// ≥ FUZZY_MIN_LEN; only Levenshtein distance ≤ 1 is accepted (single
|
|
75
|
-
// insert / delete / substitute). Same weight as exact, but the
|
|
76
|
-
// MatchedToken records `via: 'fuzzy'` for client-side rendering.
|
|
61
|
+
// Only Levenshtein distance <= 1 is accepted, and only for longer tokens.
|
|
77
62
|
const FUZZY_MIN_LEN = 6;
|
|
78
63
|
function withinDistance1(a, b) {
|
|
79
64
|
if (a === b)
|
|
@@ -240,7 +225,7 @@ export async function matchError(args) {
|
|
|
240
225
|
}
|
|
241
226
|
export const MATCH_ERROR_TOOL = {
|
|
242
227
|
name: 'match_error',
|
|
243
|
-
description: "Find Vivarium recipes that match a pasted error message or stack trace by mechanical token overlap (no LLM). The text is tokenised, lowercase-compared against each recipe's symptom (weight 5 per segment), tags (3), project (2), and slug (2).
|
|
228
|
+
description: "Find Vivarium recipes that match a pasted error message or stack trace by mechanical token overlap (no LLM). The text is tokenised, lowercase-compared against each recipe's symptom (weight 5 per segment), tags (3), project (2), and slug (2). Matching includes adjacent-pair tokens (so 'data type' can hit `dtype`), a small synonym table (e.g. dtype⇄datatype, segfault⇄sigsegv), and bounded Levenshtein-1 fuzzy matching for tokens of length >= 6. Stopword set covers English, Japanese, German, Spanish, French, Chinese, and Korean noise tokens. Recipes with score > 0 are returned in descending score order; ties broken by (layer asc, slug asc). Each matched token reports its `via` (`synonym` or `fuzzy` when non-exact) and the original `input` that triggered it, so agents can render the provenance. Pair with `get_recipe` to drill into a specific result, or `list_recipes` for unfiltered browsing.",
|
|
244
229
|
inputSchema: {
|
|
245
230
|
type: 'object',
|
|
246
231
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match_error.js","sourceRoot":"","sources":["../../src/tools/match_error.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"match_error.js","sourceRoot":"","sources":["../../src/tools/match_error.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,8EAA8E;AAC9E,sEAAsE;AACtE,8DAA8D;AAC9D,oCAAoC;AACpC,wEAAwE;AACxE,6DAA6D;AAC7D,mEAAmE;AACnE,eAAe;AAEf,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAyC/C,MAAM,eAAe,GAAG,EAAE,GAAG,IAAI,CAAC;AAClC,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB,qFAAqF;AACrF,MAAM,SAAS,GAAwB,IAAI,GAAG,CAAC;IAC7C,UAAU;IACV,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAC3D,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;IACxD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO;IAC5D,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAC9D,WAAW;IACX,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAC9C,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM;IACzB,SAAS;IACT,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ;IACzD,UAAU,EAAE,aAAa;IACzB,UAAU;IACV,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE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EAAE,EAAE;gBACX,WAAW,EACT,oEAAoE;aACvE;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;CACO,CAAC"}
|
|
@@ -32,7 +32,6 @@ interface PrepareFixCandidateOk {
|
|
|
32
32
|
next_steps: string[];
|
|
33
33
|
references: {
|
|
34
34
|
rules: string;
|
|
35
|
-
adr: string;
|
|
36
35
|
builder_script: string;
|
|
37
36
|
};
|
|
38
37
|
}
|
|
@@ -44,30 +43,30 @@ export type PrepareFixCandidateResult = PrepareFixCandidateOk | PrepareFixCandid
|
|
|
44
43
|
export declare function prepareFixCandidate(args: PrepareFixCandidateArgs): Promise<PrepareFixCandidateResult>;
|
|
45
44
|
export declare const PREPARE_FIX_CANDIDATE_TOOL: {
|
|
46
45
|
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
|
|
46
|
+
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. 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 fix-candidate spec 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 mpmath/mpmath) 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
47
|
readonly inputSchema: {
|
|
49
48
|
readonly type: "object";
|
|
50
49
|
readonly properties: {
|
|
51
50
|
readonly slug: {
|
|
52
51
|
readonly type: "string";
|
|
53
|
-
readonly description: "Existing Layer 1 recipe slug to register the fix candidate on (e.g. '
|
|
52
|
+
readonly description: "Existing Layer 1 recipe slug to register the fix candidate on (e.g. 'mpmath-983'). Must resolve to a Layer 1 entry in the bundled catalogue — call list_recipes if you need to discover it.";
|
|
54
53
|
};
|
|
55
54
|
readonly fork_url: {
|
|
56
55
|
readonly type: "string";
|
|
57
56
|
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/
|
|
57
|
+
readonly description: "Bare GitHub repo URL of the fork that hosts the fix branch (e.g. 'https://github.com/JamBalaya56562/mpmath'). Tree / blob / pull URLs are rejected; pass the canonical clone URL.";
|
|
59
58
|
};
|
|
60
59
|
readonly branch: {
|
|
61
60
|
readonly type: "string";
|
|
62
|
-
readonly description: "Branch name on the fork that contains the fix (e.g. 'claude/fix-
|
|
61
|
+
readonly description: "Branch name on the fork that contains the fix (e.g. 'claude/fix-mpmath-983-aBcDe').";
|
|
63
62
|
};
|
|
64
63
|
readonly upstream_pr: {
|
|
65
64
|
readonly type: "string";
|
|
66
|
-
readonly description: "Optional URL of the PR you opened from this fork branch (e.g. 'https://github.com/
|
|
65
|
+
readonly description: "Optional URL of the PR you opened from this fork branch (e.g. 'https://github.com/mpmath/mpmath/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
66
|
};
|
|
68
67
|
readonly package: {
|
|
69
68
|
readonly type: "string";
|
|
70
|
-
readonly description: "Optional pip distribution name override. Defaults to the recipe's project name (e.g. '
|
|
69
|
+
readonly description: "Optional pip distribution name override. Defaults to the recipe's project name (e.g. 'mpmath' for the mpmath-983 recipe). Override only when the project name and the pip distribution name diverge.";
|
|
71
70
|
};
|
|
72
71
|
readonly purpose: {
|
|
73
72
|
readonly type: "string";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare_fix_candidate.d.ts","sourceRoot":"","sources":["../../src/tools/prepare_fix_candidate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prepare_fix_candidate.d.ts","sourceRoot":"","sources":["../../src/tools/prepare_fix_candidate.ts"],"names":[],"mappings":"AAWA,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,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,CA2HpC;AAED,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC7B,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Scaffolding helper for registering a fix-candidate spec on an
|
|
2
|
-
// existing Layer 1 recipe
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
2
|
+
// existing Layer 1 recipe — writes a `fix-candidate.json` next to
|
|
3
|
+
// the recipe, and the CI deploy-docs workflow turns the linked fix
|
|
4
|
+
// branch into a wheel built on the runner so the recipe page can run
|
|
5
|
+
// it side-by-side with the released build. Returns the spec content
|
|
6
|
+
// and the gh / git command bundle the agent should run; no git or
|
|
7
|
+
// network operations happen inside the MCP server.
|
|
6
8
|
import { getCatalogue } from '../catalogue.js';
|
|
7
9
|
// Bare GitHub repo URL — `https://github.com/<owner>/<repo>` with
|
|
8
10
|
// optional trailing slash. Tree / blob / pull URLs are rejected so the
|
|
@@ -14,7 +16,7 @@ function recipePageUrl(entry) {
|
|
|
14
16
|
}
|
|
15
17
|
function buildPrBody(args) {
|
|
16
18
|
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
|
|
19
|
+
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.`);
|
|
18
20
|
lines.push('');
|
|
19
21
|
lines.push(`- Recipe: <${args.recipeUrl}>`);
|
|
20
22
|
lines.push(`- Spec: \`${args.fixCandidatePath}\``);
|
|
@@ -27,7 +29,7 @@ function buildPrBody(args) {
|
|
|
27
29
|
lines.push('<details>');
|
|
28
30
|
lines.push('<summary>How fix-candidate verification works</summary>');
|
|
29
31
|
lines.push('');
|
|
30
|
-
lines.push("`fix-candidate.json` is a tracked one-screen JSON spec at the recipe root
|
|
32
|
+
lines.push("`fix-candidate.json` is a tracked one-screen JSON spec at the recipe root; it keeps wheel binaries out of the repo while still letting the recipe page run the fix branch live. On every push to `main`, the deploy-docs workflow:");
|
|
31
33
|
lines.push('');
|
|
32
34
|
lines.push('1. Reads each `src/layer1_wasm/<slug>/fix-candidate.json`.');
|
|
33
35
|
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.');
|
|
@@ -71,7 +73,7 @@ export async function prepareFixCandidate(args) {
|
|
|
71
73
|
if (entry.layer !== 1) {
|
|
72
74
|
return {
|
|
73
75
|
ok: false,
|
|
74
|
-
error: `fix-candidate verification
|
|
76
|
+
error: `fix-candidate verification 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
77
|
};
|
|
76
78
|
}
|
|
77
79
|
const pkg = pkgOverride || entry.project;
|
|
@@ -151,37 +153,36 @@ export async function prepareFixCandidate(args) {
|
|
|
151
153
|
next_steps: nextSteps,
|
|
152
154
|
references: {
|
|
153
155
|
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
156
|
builder_script: 'https://github.com/aletheia-works/vivarium/blob/main/scripts/build-layer1-wheels.sh',
|
|
156
157
|
},
|
|
157
158
|
};
|
|
158
159
|
}
|
|
159
160
|
export const PREPARE_FIX_CANDIDATE_TOOL = {
|
|
160
161
|
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
|
|
162
|
+
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. 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 fix-candidate spec 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 mpmath/mpmath) 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
163
|
inputSchema: {
|
|
163
164
|
type: 'object',
|
|
164
165
|
properties: {
|
|
165
166
|
slug: {
|
|
166
167
|
type: 'string',
|
|
167
|
-
description: "Existing Layer 1 recipe slug to register the fix candidate on (e.g. '
|
|
168
|
+
description: "Existing Layer 1 recipe slug to register the fix candidate on (e.g. 'mpmath-983'). Must resolve to a Layer 1 entry in the bundled catalogue — call list_recipes if you need to discover it.",
|
|
168
169
|
},
|
|
169
170
|
fork_url: {
|
|
170
171
|
type: 'string',
|
|
171
172
|
pattern: '^https?://github\\.com/[^/]+/[^/]+/?$',
|
|
172
|
-
description: "Bare GitHub repo URL of the fork that hosts the fix branch (e.g. 'https://github.com/JamBalaya56562/
|
|
173
|
+
description: "Bare GitHub repo URL of the fork that hosts the fix branch (e.g. 'https://github.com/JamBalaya56562/mpmath'). Tree / blob / pull URLs are rejected; pass the canonical clone URL.",
|
|
173
174
|
},
|
|
174
175
|
branch: {
|
|
175
176
|
type: 'string',
|
|
176
|
-
description: "Branch name on the fork that contains the fix (e.g. 'claude/fix-
|
|
177
|
+
description: "Branch name on the fork that contains the fix (e.g. 'claude/fix-mpmath-983-aBcDe').",
|
|
177
178
|
},
|
|
178
179
|
upstream_pr: {
|
|
179
180
|
type: 'string',
|
|
180
|
-
description: "Optional URL of the PR you opened from this fork branch (e.g. 'https://github.com/
|
|
181
|
+
description: "Optional URL of the PR you opened from this fork branch (e.g. 'https://github.com/mpmath/mpmath/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
|
},
|
|
182
183
|
package: {
|
|
183
184
|
type: 'string',
|
|
184
|
-
description: "Optional pip distribution name override. Defaults to the recipe's project name (e.g. '
|
|
185
|
+
description: "Optional pip distribution name override. Defaults to the recipe's project name (e.g. 'mpmath' for the mpmath-983 recipe). Override only when the project name and the pip distribution name diverge.",
|
|
185
186
|
},
|
|
186
187
|
purpose: {
|
|
187
188
|
type: 'string',
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"prepare_fix_candidate.js","sourceRoot":"","sources":["../../src/tools/prepare_fix_candidate.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,kEAAkE;AAClE,mEAAmE;AACnE,qEAAqE;AACrE,oEAAoE;AACpE,kEAAkE;AAClE,mDAAmD;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAgD/C,kEAAkE;AAClE,uEAAuE;AACvE,oEAAoE;AACpE,OAAO;AACP,MAAM,qBAAqB,GAAG,4CAA4C,CAAC;AAE3E,SAAS,aAAa,CAAC,KAAkB;IACvC,OAAO,KAAK,CAAC,QAAQ,CAAC;AACxB,CAAC;AAED,SAAS,WAAW,CAAC,IAQpB;IACC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CACR,uCAAuC,IAAI,CAAC,IAAI,yFAAyF,C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V,KAAK,EACH,wFAAwF;YAC1F,cAAc,EACZ,qFAAqF;SACxF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,qiCAAqiC;IACviC,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,6LAA6L;aAChM;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAiB;gBACvB,OAAO,EAAE,uCAAuC;gBAChD,WAAW,EACT,mLAAmL;aACtL;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,qFAAqF;aACxF;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,gQAAgQ;aACnQ;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAiB;gBACvB,WAAW,EACT,sMAAsM;aACzM;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,4 +1,4 @@
|
|
|
1
|
-
import type { Layer } from '../types.js';
|
|
1
|
+
import type { Layer, RoundtripState } from '../types.js';
|
|
2
2
|
export interface PrepareNewRecipeArgs {
|
|
3
3
|
project?: string;
|
|
4
4
|
issue?: number;
|
|
@@ -43,6 +43,8 @@ interface PrepareNewRecipeOk {
|
|
|
43
43
|
layer_readme: string;
|
|
44
44
|
selection_policy: string;
|
|
45
45
|
};
|
|
46
|
+
roundtrip_init: RoundtripState;
|
|
47
|
+
roundtrip_path: string;
|
|
46
48
|
}
|
|
47
49
|
interface PrepareNewRecipeError {
|
|
48
50
|
ok: false;
|
|
@@ -52,7 +54,7 @@ export type PrepareNewRecipeResult = PrepareNewRecipeOk | PrepareNewRecipeError;
|
|
|
52
54
|
export declare function prepareNewRecipe(args: PrepareNewRecipeArgs): Promise<PrepareNewRecipeResult>;
|
|
53
55
|
export declare const PREPARE_NEW_RECIPE_TOOL: {
|
|
54
56
|
readonly name: "prepare_new_recipe";
|
|
55
|
-
readonly description: "Prepare everything an AI agent needs to author a new Vivarium recipe for a given upstream project + issue. SCAFFOLDING HELPER, not an execution engine — returns the exact `mise run recipes:new` and `mise run recipes:verify` commands the agent should run, plus placeholder rows for docs/
|
|
57
|
+
readonly description: "Prepare everything an AI agent needs to author a new Vivarium recipe for a given upstream project + issue. SCAFFOLDING HELPER, not an execution engine — returns the exact `mise run recipes:new` and `mise run recipes:verify` commands the agent should run, plus placeholder rows for docs/site/_data/recipe-facets.json and (if the project is new) docs/site/_data/projects.json, plus a commit-subject template and a sequenced next-steps checklist. Validates the slug at call time against the same regex `docs/scripts/generate-recipes-index.ts` uses, so unparseable slugs are rejected before any work begins. Use this immediately after picking an issue from `gh search`; pair with `match_error` / `list_recipes` if you need to confirm no existing recipe already covers the bug.";
|
|
56
58
|
readonly inputSchema: {
|
|
57
59
|
readonly type: "object";
|
|
58
60
|
readonly properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare_new_recipe.d.ts","sourceRoot":"","sources":["../../src/tools/prepare_new_recipe.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"prepare_new_recipe.d.ts","sourceRoot":"","sources":["../../src/tools/prepare_new_recipe.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAA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AC;AA8C1B,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,sBAAsB,CAAC,CAgIjC;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4C1B,CAAC"}
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
// Single-sourced as a literal here because the MCP package is published
|
|
8
8
|
// independently and cannot import from docs/.
|
|
9
9
|
const SLUG_REGEX = /^([a-z][a-z0-9]*(?:-[a-z][a-z0-9]*)*?)-(\d+)$/;
|
|
10
|
+
// Mirror of LAYER_DIRNAME in verify_and_report_fix — keep in sync.
|
|
11
|
+
const LAYER_DIRNAME = {
|
|
12
|
+
1: 'layer1_wasm',
|
|
13
|
+
2: 'layer2_docker',
|
|
14
|
+
3: 'layer3_thirdway',
|
|
15
|
+
};
|
|
10
16
|
// Default upstream owner/repo for common projects, mirroring the lookup
|
|
11
17
|
// in docs/scripts/new-recipe.ts. Override via repo_owner.
|
|
12
18
|
const DEFAULT_REPO = {
|
|
@@ -96,7 +102,7 @@ export async function prepareNewRecipe(args) {
|
|
|
96
102
|
homepage: '',
|
|
97
103
|
github: `https://github.com/${ownerRepo}`,
|
|
98
104
|
},
|
|
99
|
-
note: `Only add this row to docs/
|
|
105
|
+
note: `Only add this row to docs/site/_data/projects.json if "${project}" is a new project (i.e. no existing recipe under src/layer*_*/${project}-*/).`,
|
|
100
106
|
};
|
|
101
107
|
const commitSubject = `feat(${commitScopeFor(layer)}): ${slug} reproduction (...)`;
|
|
102
108
|
const nextSteps = layer === 2
|
|
@@ -106,21 +112,30 @@ export async function prepareNewRecipe(args) {
|
|
|
106
112
|
`Edit src/layer2_docker/${slug}/repro.sh — replace the TODO stub with the real probe.`,
|
|
107
113
|
`Edit src/layer2_docker/${slug}/README.md — fill in bug description, verdict contract, references.`,
|
|
108
114
|
`Edit src/layer2_docker/${slug}/index.html — fill in the lede.`,
|
|
109
|
-
`Add the recipe_facets_row to docs/
|
|
110
|
-
`If "${project}" is a new project, add the projects_row to docs/
|
|
115
|
+
`Add the recipe_facets_row to docs/site/_data/recipe-facets.json with real values.`,
|
|
116
|
+
`If "${project}" is a new project, add the projects_row to docs/site/_data/projects.json.`,
|
|
111
117
|
`Run: ${verifyCommand} (this regenerates indices, runs lint, runs the docker build/run, and the rspress build).`,
|
|
112
118
|
`Commit with subject: ${commitSubject}`,
|
|
113
119
|
`Submit the PR.`,
|
|
114
120
|
]
|
|
115
121
|
: [
|
|
116
122
|
`Copy from an existing recipe under src/layer${layer}_*/ — the canonical authoring reference.`,
|
|
117
|
-
`Add the recipe_facets_row to docs/
|
|
118
|
-
`If "${project}" is a new project, add the projects_row to docs/
|
|
119
|
-
`Run: cd docs && mise exec -- bun run generate
|
|
123
|
+
`Add the recipe_facets_row to docs/site/_data/recipe-facets.json with real values.`,
|
|
124
|
+
`If "${project}" is a new project, add the projects_row to docs/site/_data/projects.json.`,
|
|
125
|
+
`Run: cd docs && mise exec -- bun run generate`,
|
|
120
126
|
`Validate locally per the layer's README + the .claude/rules/recipe-authoring.md checklist.`,
|
|
121
127
|
`Commit with subject: ${commitSubject}`,
|
|
122
128
|
`Submit the PR.`,
|
|
123
129
|
];
|
|
130
|
+
const roundtripInit = {
|
|
131
|
+
schema_version: 1,
|
|
132
|
+
slug,
|
|
133
|
+
upstream_issue: upstreamIssueUrl,
|
|
134
|
+
status: 'draft',
|
|
135
|
+
updated_at: new Date().toISOString(),
|
|
136
|
+
notes: ['scaffolded from upstream issue'],
|
|
137
|
+
};
|
|
138
|
+
const roundtripPath = `src/${LAYER_DIRNAME[layer]}/${slug}/roundtrip.json`;
|
|
124
139
|
return {
|
|
125
140
|
ok: true,
|
|
126
141
|
slug,
|
|
@@ -135,13 +150,15 @@ export async function prepareNewRecipe(args) {
|
|
|
135
150
|
references: {
|
|
136
151
|
rules: 'https://github.com/aletheia-works/vivarium/blob/main/.claude/rules/recipe-authoring.md',
|
|
137
152
|
layer_readme: `https://github.com/aletheia-works/vivarium/blob/main/src/layer${layer}_${layer === 1 ? 'wasm' : layer === 2 ? 'docker' : 'thirdway'}/README.md`,
|
|
138
|
-
selection_policy: '
|
|
153
|
+
selection_policy: 'caller-defined — issue selection criteria vary by user workflow and are not enforced by the MCP server beyond the slug regex',
|
|
139
154
|
},
|
|
155
|
+
roundtrip_init: roundtripInit,
|
|
156
|
+
roundtrip_path: roundtripPath,
|
|
140
157
|
};
|
|
141
158
|
}
|
|
142
159
|
export const PREPARE_NEW_RECIPE_TOOL = {
|
|
143
160
|
name: 'prepare_new_recipe',
|
|
144
|
-
description: "Prepare everything an AI agent needs to author a new Vivarium recipe for a given upstream project + issue. SCAFFOLDING HELPER, not an execution engine — returns the exact `mise run recipes:new` and `mise run recipes:verify` commands the agent should run, plus placeholder rows for docs/
|
|
161
|
+
description: "Prepare everything an AI agent needs to author a new Vivarium recipe for a given upstream project + issue. SCAFFOLDING HELPER, not an execution engine — returns the exact `mise run recipes:new` and `mise run recipes:verify` commands the agent should run, plus placeholder rows for docs/site/_data/recipe-facets.json and (if the project is new) docs/site/_data/projects.json, plus a commit-subject template and a sequenced next-steps checklist. Validates the slug at call time against the same regex `docs/scripts/generate-recipes-index.ts` uses, so unparseable slugs are rejected before any work begins. Use this immediately after picking an issue from `gh search`; pair with `match_error` / `list_recipes` if you need to confirm no existing recipe already covers the bug.",
|
|
145
162
|
inputSchema: {
|
|
146
163
|
type: 'object',
|
|
147
164
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"file":"prepare_new_recipe.js","sourceRoot":"","sources":["../../src/tools/prepare_new_recipe.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,mEAAmE;AACnE,oEAAoE;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