@aletheia-works/vivarium-mcp 0.0.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.
Files changed (45) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +118 -0
  3. package/dist/bundled/recipes.json +217 -0
  4. package/dist/catalogue.d.ts +7 -0
  5. package/dist/catalogue.d.ts.map +1 -0
  6. package/dist/catalogue.js +63 -0
  7. package/dist/catalogue.js.map +1 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +18 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/server.d.ts +4 -0
  13. package/dist/server.d.ts.map +1 -0
  14. package/dist/server.js +114 -0
  15. package/dist/server.js.map +1 -0
  16. package/dist/tools/get_recipe.d.ts +28 -0
  17. package/dist/tools/get_recipe.d.ts.map +1 -0
  18. package/dist/tools/get_recipe.js +29 -0
  19. package/dist/tools/get_recipe.js.map +1 -0
  20. package/dist/tools/list_recipes.d.ts +34 -0
  21. package/dist/tools/list_recipes.d.ts.map +1 -0
  22. package/dist/tools/list_recipes.js +43 -0
  23. package/dist/tools/list_recipes.js.map +1 -0
  24. package/dist/tools/lookup_verdict.d.ts +39 -0
  25. package/dist/tools/lookup_verdict.d.ts.map +1 -0
  26. package/dist/tools/lookup_verdict.js +60 -0
  27. package/dist/tools/lookup_verdict.js.map +1 -0
  28. package/dist/tools/match_error.d.ts +62 -0
  29. package/dist/tools/match_error.d.ts.map +1 -0
  30. package/dist/tools/match_error.js +282 -0
  31. package/dist/tools/match_error.js.map +1 -0
  32. package/dist/tools/prepare_new_recipe.d.ts +92 -0
  33. package/dist/tools/prepare_new_recipe.d.ts.map +1 -0
  34. package/dist/tools/prepare_new_recipe.js +193 -0
  35. package/dist/tools/prepare_new_recipe.js.map +1 -0
  36. package/dist/tools/verify_branch_fix.d.ts +49 -0
  37. package/dist/tools/verify_branch_fix.d.ts.map +1 -0
  38. package/dist/tools/verify_branch_fix.js +207 -0
  39. package/dist/tools/verify_branch_fix.js.map +1 -0
  40. package/dist/types.d.ts +32 -0
  41. package/dist/types.d.ts.map +1 -0
  42. package/dist/types.js +14 -0
  43. package/dist/types.js.map +1 -0
  44. package/package.json +56 -0
  45. package/src/bundled/recipes.json +217 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
package/README.md ADDED
@@ -0,0 +1,118 @@
1
+ # `@aletheia-works/vivarium-mcp`
2
+
3
+ [Model Context Protocol](https://modelcontextprotocol.io) server that
4
+ exposes the [Vivarium](https://github.com/aletheia-works/vivarium)
5
+ reproduction catalogue to AI agent clients (Claude Code, Cline, Cursor,
6
+ Continue, etc.).
7
+
8
+ Vivarium is the universal bug-reproduction platform of the
9
+ [`aletheia-works`](https://github.com/aletheia-works) organisation —
10
+ "reproduce any bug, in any language, any environment, at any scale."
11
+ This package is the agent-callable surface that lets AI tools
12
+ *discover* what reproductions exist, look up their metadata, and read
13
+ deployed verdict snapshots, without scraping the docs site.
14
+
15
+ ## Tools
16
+
17
+ | Tool | Returns | Layer coverage |
18
+ |---|---|---|
19
+ | `list_recipes(layer?, project?, q?)` | Filtered list of catalogue entries. | All layers (1, 2, 3). |
20
+ | `get_recipe(slug)` | Full metadata for one recipe (title, project, issue, page URL, verdict snapshot URL, GitHub source URL). | All layers. |
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 (Phase 7 A5). | All layers. |
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. Validates the slug against the `docs/scripts/generate-recipes-index.ts` parser regex at call time. 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
+
26
+ ## Install
27
+
28
+ > **Status (2026-05-06)**: not yet published to a registry. The
29
+ > `mcp-server-v0.1.0` tag has not been pushed, so the `npx` and
30
+ > `bunx jsr:` snippets below would 404 today. Until the first publish,
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.
36
+
37
+ ### Local clone (works today)
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:
65
+
66
+ ```json
67
+ {
68
+ "mcpServers": {
69
+ "vivarium": {
70
+ "command": "npx",
71
+ "args": ["-y", "@aletheia-works/vivarium-mcp@latest"]
72
+ }
73
+ }
74
+ }
75
+ ```
76
+
77
+ ### JSR (post-publish; Deno / Bun-native install)
78
+
79
+ For clients with native JSR support (Bun ≥ 1.1, Deno):
80
+
81
+ ```bash
82
+ bunx jsr:@aletheia-works/vivarium-mcp
83
+ # or
84
+ deno run --allow-net --allow-read jsr:@aletheia-works/vivarium-mcp
85
+ ```
86
+
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
+ ## Configuration
99
+
100
+ The server reads no environment variables and accepts no command-line
101
+ flags in v1. It fetches the catalogue index from
102
+ <https://aletheia-works.github.io/vivarium/api/recipes.json> with a
103
+ 5-minute in-process TTL, falling back to a build-time bundled snapshot
104
+ when the network is unavailable.
105
+
106
+ ## Versioning
107
+
108
+ The MCP server's surface (the three tools above and their input
109
+ schemas) is locked at v1 by ADR-0019. Optional additive changes ship
110
+ as minor revisions; breaking changes require a v2 design ADR.
111
+
112
+ The recipes index format consumed by this server is locked separately
113
+ at `index = "v1"` — see
114
+ <https://aletheia-works.github.io/vivarium/spec/recipes-index-v1>.
115
+
116
+ ## License
117
+
118
+ Apache-2.0 — see [LICENSE](./LICENSE).
@@ -0,0 +1,217 @@
1
+ {
2
+ "index": "v1",
3
+ "contract": "v1",
4
+ "recipes": [
5
+ {
6
+ "slug": "cpython-137205",
7
+ "layer": 1,
8
+ "project": "cpython",
9
+ "issue": 137205,
10
+ "title": "python/cpython#137205",
11
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/cpython/137205/",
12
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer1_wasm/cpython-137205",
13
+ "language": "python",
14
+ "tags": [
15
+ "sqlite3",
16
+ "pragma",
17
+ "foreign-keys",
18
+ "autocommit"
19
+ ],
20
+ "symptom": "fk-pragma-silently-dropped",
21
+ "severity": "spec-violation"
22
+ },
23
+ {
24
+ "slug": "numpy-28287",
25
+ "layer": 1,
26
+ "project": "numpy",
27
+ "issue": 28287,
28
+ "title": "numpy/numpy#28287",
29
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/numpy/28287/",
30
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer1_wasm/numpy-28287",
31
+ "language": "python",
32
+ "tags": [
33
+ "timedelta64",
34
+ "comparison",
35
+ "datetime-units"
36
+ ],
37
+ "symptom": "ordering-non-transitive",
38
+ "severity": "bug"
39
+ },
40
+ {
41
+ "slug": "pandas-56679",
42
+ "layer": 1,
43
+ "project": "pandas",
44
+ "issue": 56679,
45
+ "title": "pandas-dev/pandas#56679",
46
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/pandas/56679/",
47
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer1_wasm/pandas-56679",
48
+ "language": "python",
49
+ "tags": [
50
+ "empty-series",
51
+ "empty-dataframe",
52
+ "type-inference"
53
+ ],
54
+ "symptom": "dtype-mismatch",
55
+ "severity": "regression"
56
+ },
57
+ {
58
+ "slug": "php-12167",
59
+ "layer": 1,
60
+ "project": "php",
61
+ "issue": 12167,
62
+ "title": "php/php-src#12167",
63
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/php/12167/",
64
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer1_wasm/php-12167",
65
+ "language": "php",
66
+ "tags": [
67
+ "json_encode",
68
+ "recursion-depth"
69
+ ],
70
+ "symptom": "json-encode-recursion",
71
+ "severity": "bug"
72
+ },
73
+ {
74
+ "slug": "regex-779",
75
+ "layer": 1,
76
+ "project": "regex",
77
+ "issue": 779,
78
+ "title": "rust-lang/regex#779",
79
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/regex/779/",
80
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer1_wasm/regex-779",
81
+ "language": "rust",
82
+ "tags": [
83
+ "regex",
84
+ "wasm32-wasip1"
85
+ ],
86
+ "symptom": "regex-engine-edge-case",
87
+ "severity": "bug"
88
+ },
89
+ {
90
+ "slug": "ruby-21709",
91
+ "layer": 1,
92
+ "project": "ruby",
93
+ "issue": 21709,
94
+ "title": "ruby/ruby#21709",
95
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/ruby/21709/",
96
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer1_wasm/ruby-21709",
97
+ "language": "ruby",
98
+ "tags": [
99
+ "string",
100
+ "unicode",
101
+ "combining-diacritics"
102
+ ],
103
+ "symptom": "unicode-normalize-nfd",
104
+ "severity": "bug"
105
+ },
106
+ {
107
+ "slug": "bash-local-shadows-exit",
108
+ "layer": 2,
109
+ "project": "bash",
110
+ "issue": 0,
111
+ "title": "bash `local` shadows command-substitution exit code",
112
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/bash/local-shadows-exit/",
113
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer2_docker/bash-local-shadows-exit",
114
+ "language": "shell",
115
+ "tags": [
116
+ "bash",
117
+ "command-substitution",
118
+ "exit-code"
119
+ ],
120
+ "symptom": "local-shadows-exit-status",
121
+ "severity": "footgun",
122
+ "verdict_url": "https://aletheia-works.github.io/vivarium/repro/bash/local-shadows-exit/verdict.json"
123
+ },
124
+ {
125
+ "slug": "find-xargs-whitespace",
126
+ "layer": 2,
127
+ "project": "find",
128
+ "issue": 0,
129
+ "title": "`find … | xargs cmd` is unsafe for whitespace in filenames",
130
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/find/xargs-whitespace/",
131
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer2_docker/find-xargs-whitespace",
132
+ "language": "shell",
133
+ "tags": [
134
+ "find",
135
+ "xargs",
136
+ "whitespace",
137
+ "filenames"
138
+ ],
139
+ "symptom": "whitespace-unsafe-pipeline",
140
+ "severity": "footgun",
141
+ "verdict_url": "https://aletheia-works.github.io/vivarium/repro/find/xargs-whitespace/verdict.json"
142
+ },
143
+ {
144
+ "slug": "flock-is-advisory",
145
+ "layer": 2,
146
+ "project": "flock",
147
+ "issue": 0,
148
+ "title": "`flock(2)` is advisory only",
149
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/flock/is-advisory/",
150
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer2_docker/flock-is-advisory",
151
+ "language": "shell",
152
+ "tags": [
153
+ "flock",
154
+ "filesystem",
155
+ "concurrency"
156
+ ],
157
+ "symptom": "advisory-lock-bypass",
158
+ "severity": "spec-violation",
159
+ "verdict_url": "https://aletheia-works.github.io/vivarium/repro/flock/is-advisory/verdict.json"
160
+ },
161
+ {
162
+ "slug": "node-63041",
163
+ "layer": 2,
164
+ "project": "node",
165
+ "issue": 63041,
166
+ "title": "Node.js `Intl.DateTimeFormat` drops month with `calendar: 'iso8601'`",
167
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/node/63041/",
168
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer2_docker/node-63041",
169
+ "language": "javascript",
170
+ "tags": [
171
+ "intl",
172
+ "datetimeformat",
173
+ "iso8601-calendar",
174
+ "icu"
175
+ ],
176
+ "symptom": "intl-month-dropped",
177
+ "severity": "regression",
178
+ "verdict_url": "https://aletheia-works.github.io/vivarium/repro/node/63041/verdict.json"
179
+ },
180
+ {
181
+ "slug": "postgres-lost-update",
182
+ "layer": 2,
183
+ "project": "postgres",
184
+ "issue": 0,
185
+ "title": "PostgreSQL lost update under READ COMMITTED",
186
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/postgres/lost-update/",
187
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer2_docker/postgres-lost-update",
188
+ "language": "sql",
189
+ "tags": [
190
+ "postgresql",
191
+ "isolation-level",
192
+ "concurrency"
193
+ ],
194
+ "symptom": "lost-update-read-committed",
195
+ "severity": "datarace",
196
+ "verdict_url": "https://aletheia-works.github.io/vivarium/repro/postgres/lost-update/verdict.json"
197
+ },
198
+ {
199
+ "slug": "lost-update",
200
+ "layer": 3,
201
+ "project": "pthread",
202
+ "issue": 0,
203
+ "title": "pthread lost-update data race (canonical)",
204
+ "page_url": "https://aletheia-works.github.io/vivarium/repro/pthread/lost-update/",
205
+ "source_url": "https://github.com/aletheia-works/vivarium/tree/main/src/layer3_thirdway/lost-update",
206
+ "language": "c",
207
+ "tags": [
208
+ "pthread",
209
+ "rr-replay",
210
+ "deterministic"
211
+ ],
212
+ "symptom": "lost-update-data-race",
213
+ "severity": "datarace",
214
+ "verdict_url": "https://aletheia-works.github.io/vivarium/repro/pthread/lost-update/verdict.json"
215
+ }
216
+ ]
217
+ }
@@ -0,0 +1,7 @@
1
+ import type { RecipesIndex, VerdictSnapshot } from './types.js';
2
+ export declare const INDEX_URL = "https://aletheia-works.github.io/vivarium/api/recipes.json";
3
+ export declare function _resetCacheForTesting(): void;
4
+ export declare function getBundledIndex(): RecipesIndex;
5
+ export declare function getCatalogue(): Promise<RecipesIndex>;
6
+ export declare function fetchVerdictSnapshot(verdictUrl: string): Promise<VerdictSnapshot | null>;
7
+ //# sourceMappingURL=catalogue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalogue.d.ts","sourceRoot":"","sources":["../src/catalogue.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGhE,eAAO,MAAM,SAAS,+DACwC,CAAC;AAY/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"}
@@ -0,0 +1,63 @@
1
+ // Catalogue fetcher with a 5-minute in-process TTL and a build-time
2
+ // bundled fallback. See ADR-0019 §4 for the data-source decision.
3
+ //
4
+ // Two modes:
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.
14
+ import bundledIndex from './bundled/recipes.json' with { type: 'json' };
15
+ export const INDEX_URL = 'https://aletheia-works.github.io/vivarium/api/recipes.json';
16
+ const TTL_MS = 5 * 60 * 1000;
17
+ let cache = null;
18
+ // Reset cache; only used by tests.
19
+ export function _resetCacheForTesting() {
20
+ cache = null;
21
+ }
22
+ export function getBundledIndex() {
23
+ return bundledIndex;
24
+ }
25
+ export async function getCatalogue() {
26
+ const now = Date.now();
27
+ if (cache && now - cache.fetchedAt < TTL_MS) {
28
+ return cache.index;
29
+ }
30
+ try {
31
+ const res = await fetch(INDEX_URL, {
32
+ headers: { 'accept': 'application/json' },
33
+ });
34
+ if (res.ok) {
35
+ const data = (await res.json());
36
+ if (data && data.index === 'v1' && Array.isArray(data.recipes)) {
37
+ cache = { index: data, fetchedAt: now };
38
+ return data;
39
+ }
40
+ }
41
+ }
42
+ catch {
43
+ // Network failure → fall through to bundled fallback.
44
+ }
45
+ return getBundledIndex();
46
+ }
47
+ export async function fetchVerdictSnapshot(verdictUrl) {
48
+ try {
49
+ const res = await fetch(verdictUrl, {
50
+ headers: { 'accept': 'application/json' },
51
+ });
52
+ if (!res.ok)
53
+ return null;
54
+ const data = (await res.json());
55
+ if (data && data.contract === 'v1')
56
+ return data;
57
+ return null;
58
+ }
59
+ catch {
60
+ return null;
61
+ }
62
+ }
63
+ //# sourceMappingURL=catalogue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalogue.js","sourceRoot":"","sources":["../src/catalogue.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,kEAAkE;AAClE,EAAE;AACF,aAAa;AACb,wEAAwE;AACxE,uEAAuE;AACvE,iCAAiC;AACjC,sEAAsE;AACtE,qDAAqD;AACrD,EAAE;AACF,sEAAsE;AACtE,uEAAuE;AACvE,gEAAgE;AAGhE,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,mCAAmC;AACnC,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"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ //
3
+ // Vivarium MCP server — stdio entrypoint.
4
+ //
5
+ // Spawned by an MCP client (Claude Code, Cline, Cursor, Continue, …)
6
+ // via `npx -y @aletheia-works/vivarium-mcp` or the equivalent JSR
7
+ // invocation. Speaks the MCP protocol over stdin / stdout.
8
+ //
9
+ // See packages/mcp-server/README.md for client configuration snippets
10
+ // and ADR-0019 (private memo) for the design rationale.
11
+ import { runServer } from './server.js';
12
+ runServer().catch((err) => {
13
+ // The MCP transport itself uses stdout, so all human-visible
14
+ // diagnostics go to stderr.
15
+ console.error('vivarium-mcp: fatal:', err);
16
+ process.exit(1);
17
+ });
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,EAAE;AACF,0CAA0C;AAC1C,EAAE;AACF,qEAAqE;AACrE,kEAAkE;AAClE,2DAA2D;AAC3D,EAAE;AACF,sEAAsE;AACtE,wDAAwD;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IACjC,6DAA6D;IAC7D,4BAA4B;IAC5B,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;IAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ export declare function createServer(): Server;
3
+ export declare function runServer(): Promise<void>;
4
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AA2CnE,wBAAgB,YAAY,IAAI,MAAM,CAgFrC;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAI/C"}