@mcptoolshop/accessibility-suite 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/.github/workflows/ci.yml +63 -0
  2. package/LICENSE +21 -0
  3. package/README.md +37 -0
  4. package/docs/prov-spec/.github/workflows/ci.yml +68 -0
  5. package/docs/prov-spec/CHANGELOG.md +69 -0
  6. package/docs/prov-spec/CODE_OF_CONDUCT.md +129 -0
  7. package/docs/prov-spec/CONFORMANCE_LEVELS.md +223 -0
  8. package/docs/prov-spec/CONTRIBUTING.md +145 -0
  9. package/docs/prov-spec/IMPLEMENTER_CHECKLIST.md +137 -0
  10. package/docs/prov-spec/LICENSE +21 -0
  11. package/docs/prov-spec/PRESS_RELEASE.md +74 -0
  12. package/docs/prov-spec/README.md +182 -0
  13. package/docs/prov-spec/SETUP.md +135 -0
  14. package/docs/prov-spec/WHY.md +86 -0
  15. package/docs/prov-spec/examples/artifact.example.json +14 -0
  16. package/docs/prov-spec/examples/artifact.ref.example.json +9 -0
  17. package/docs/prov-spec/examples/evidence.example.json +6 -0
  18. package/docs/prov-spec/examples/mcp.envelope.example.json +97 -0
  19. package/docs/prov-spec/examples/mcp.request.example.json +28 -0
  20. package/docs/prov-spec/examples/prov.record.example.json +35 -0
  21. package/docs/prov-spec/interop/PROOF_NODE_ENGINE.md +114 -0
  22. package/docs/prov-spec/spec/MCP_COMPATIBILITY.md +241 -0
  23. package/docs/prov-spec/spec/PROV_METHODS_CATALOG.md +142 -0
  24. package/docs/prov-spec/spec/PROV_METHODS_SPEC.md +397 -0
  25. package/docs/prov-spec/spec/methods.json +213 -0
  26. package/docs/prov-spec/spec/schemas/artifact.ref.schema.v0.1.json +58 -0
  27. package/docs/prov-spec/spec/schemas/artifact.schema.v0.1.json +61 -0
  28. package/docs/prov-spec/spec/schemas/assist.request.schema.v0.1.json +52 -0
  29. package/docs/prov-spec/spec/schemas/assist.response.schema.v0.1.json +70 -0
  30. package/docs/prov-spec/spec/schemas/cli.error.schema.v0.1.json +78 -0
  31. package/docs/prov-spec/spec/schemas/evidence.schema.v0.1.json +37 -0
  32. package/docs/prov-spec/spec/schemas/mcp.envelope.schema.v0.1.json +141 -0
  33. package/docs/prov-spec/spec/schemas/mcp.request.schema.v0.1.json +79 -0
  34. package/docs/prov-spec/spec/schemas/methods.schema.json +93 -0
  35. package/docs/prov-spec/spec/schemas/prov-capabilities.schema.json +122 -0
  36. package/docs/prov-spec/spec/schemas/prov.record.schema.v0.1.json +133 -0
  37. package/docs/prov-spec/spec/vectors/adapter.wrap.envelope_v0_1/expected.json +4 -0
  38. package/docs/prov-spec/spec/vectors/adapter.wrap.envelope_v0_1/input.json +1 -0
  39. package/docs/prov-spec/spec/vectors/adapter.wrap.envelope_v0_1/negative/double_wrapped.json +14 -0
  40. package/docs/prov-spec/spec/vectors/adapter.wrap.envelope_v0_1/negative/wrong_schema_version.json +11 -0
  41. package/docs/prov-spec/spec/vectors/engine.extract.evidence.json_pointer/expected.json +24 -0
  42. package/docs/prov-spec/spec/vectors/engine.extract.evidence.json_pointer/input.json +8 -0
  43. package/docs/prov-spec/spec/vectors/integrity.digest.sha256/expected.json +7 -0
  44. package/docs/prov-spec/spec/vectors/integrity.digest.sha256/input.json +1 -0
  45. package/docs/prov-spec/spec/vectors/integrity.digest.sha256/negative/non_hex_chars.json +16 -0
  46. package/docs/prov-spec/spec/vectors/integrity.digest.sha256/negative/uppercase_hex.json +16 -0
  47. package/docs/prov-spec/spec/vectors/integrity.digest.sha256/negative/wrong_length.json +16 -0
  48. package/docs/prov-spec/spec/vectors/method_id_syntax/negative/hyphen_separator.json +8 -0
  49. package/docs/prov-spec/spec/vectors/method_id_syntax/negative/reserved_namespace.json +8 -0
  50. package/docs/prov-spec/spec/vectors/method_id_syntax/negative/starts_with_digit.json +8 -0
  51. package/docs/prov-spec/spec/vectors/method_id_syntax/negative/uppercase.json +8 -0
  52. package/docs/prov-spec/spec/vectors/method_id_syntax/positive/valid_ids.json +18 -0
  53. package/docs/prov-spec/tools/python/prov_validator.py +428 -0
  54. package/examples/a11y-demo-site/.github/workflows/a11y-artifacts.yml +81 -0
  55. package/examples/a11y-demo-site/.github/workflows/a11y.yml +34 -0
  56. package/examples/a11y-demo-site/CODE_OF_CONDUCT.md +129 -0
  57. package/examples/a11y-demo-site/CONTRIBUTING.md +83 -0
  58. package/examples/a11y-demo-site/LICENSE +21 -0
  59. package/examples/a11y-demo-site/README.md +155 -0
  60. package/examples/a11y-demo-site/html/contact.html +15 -0
  61. package/examples/a11y-demo-site/html/index.html +20 -0
  62. package/examples/a11y-demo-site/scripts/a11y.sh +20 -0
  63. package/package.json +26 -0
  64. package/src/a11y-assist/.github/workflows/publish.yml +52 -0
  65. package/src/a11y-assist/.github/workflows/test.yml +30 -0
  66. package/src/a11y-assist/A11Y_ASSIST_TEST_COVERAGE_REQUIREMENTS.md +104 -0
  67. package/src/a11y-assist/CODE_OF_CONDUCT.md +129 -0
  68. package/src/a11y-assist/CONTRIBUTING.md +98 -0
  69. package/src/a11y-assist/ENGINE.md +363 -0
  70. package/src/a11y-assist/LICENSE +21 -0
  71. package/src/a11y-assist/PRESS_RELEASE.md +71 -0
  72. package/src/a11y-assist/QUICKSTART.md +101 -0
  73. package/src/a11y-assist/README.md +192 -0
  74. package/src/a11y-assist/RELEASE_NOTES.md +319 -0
  75. package/src/a11y-assist/a11y_assist/__init__.py +3 -0
  76. package/src/a11y-assist/a11y_assist/cli.py +599 -0
  77. package/src/a11y-assist/a11y_assist/from_cli_error.py +149 -0
  78. package/src/a11y-assist/a11y_assist/guard.py +444 -0
  79. package/src/a11y-assist/a11y_assist/ingest.py +407 -0
  80. package/src/a11y-assist/a11y_assist/methods.py +137 -0
  81. package/src/a11y-assist/a11y_assist/parse_raw.py +71 -0
  82. package/src/a11y-assist/a11y_assist/profiles/__init__.py +29 -0
  83. package/src/a11y-assist/a11y_assist/profiles/cognitive_load.py +245 -0
  84. package/src/a11y-assist/a11y_assist/profiles/cognitive_load_render.py +86 -0
  85. package/src/a11y-assist/a11y_assist/profiles/dyslexia.py +144 -0
  86. package/src/a11y-assist/a11y_assist/profiles/dyslexia_render.py +77 -0
  87. package/src/a11y-assist/a11y_assist/profiles/plain_language.py +119 -0
  88. package/src/a11y-assist/a11y_assist/profiles/plain_language_render.py +66 -0
  89. package/src/a11y-assist/a11y_assist/profiles/screen_reader.py +348 -0
  90. package/src/a11y-assist/a11y_assist/profiles/screen_reader_render.py +89 -0
  91. package/src/a11y-assist/a11y_assist/render.py +95 -0
  92. package/src/a11y-assist/a11y_assist/schemas/assist.request.schema.v0.1.json +52 -0
  93. package/src/a11y-assist/a11y_assist/schemas/assist.response.schema.v0.1.json +70 -0
  94. package/src/a11y-assist/a11y_assist/schemas/cli.error.schema.v0.1.json +78 -0
  95. package/src/a11y-assist/a11y_assist/storage.py +31 -0
  96. package/src/a11y-assist/pyproject.toml +60 -0
  97. package/src/a11y-assist/tests/__init__.py +1 -0
  98. package/src/a11y-assist/tests/fixtures/base_inputs/cli_error_high.json +18 -0
  99. package/src/a11y-assist/tests/fixtures/base_inputs/cli_error_medium.json +16 -0
  100. package/src/a11y-assist/tests/fixtures/base_inputs/raw_text_low.txt +3 -0
  101. package/src/a11y-assist/tests/fixtures/cli_error_good.json +9 -0
  102. package/src/a11y-assist/tests/fixtures/cli_error_missing_id.json +7 -0
  103. package/src/a11y-assist/tests/fixtures/cli_error_string_format.json +7 -0
  104. package/src/a11y-assist/tests/fixtures/expected/cognitive_load_high.txt +20 -0
  105. package/src/a11y-assist/tests/fixtures/expected/dyslexia_high.txt +20 -0
  106. package/src/a11y-assist/tests/fixtures/expected/lowvision_high.txt +18 -0
  107. package/src/a11y-assist/tests/fixtures/expected/plain_language_high.txt +14 -0
  108. package/src/a11y-assist/tests/fixtures/expected/screen_reader_high.txt +19 -0
  109. package/src/a11y-assist/tests/fixtures/golden_screen_reader_cli_error.txt +16 -0
  110. package/src/a11y-assist/tests/fixtures/golden_screen_reader_raw_no_id.txt +14 -0
  111. package/src/a11y-assist/tests/fixtures/golden_screen_reader_raw_with_id.txt +14 -0
  112. package/src/a11y-assist/tests/fixtures/raw_good.txt +11 -0
  113. package/src/a11y-assist/tests/fixtures/raw_no_id.txt +2 -0
  114. package/src/a11y-assist/tests/test_cognitive_load.py +469 -0
  115. package/src/a11y-assist/tests/test_dyslexia.py +337 -0
  116. package/src/a11y-assist/tests/test_explain.py +74 -0
  117. package/src/a11y-assist/tests/test_golden.py +127 -0
  118. package/src/a11y-assist/tests/test_guard.py +819 -0
  119. package/src/a11y-assist/tests/test_guard_integration.py +457 -0
  120. package/src/a11y-assist/tests/test_ingest.py +311 -0
  121. package/src/a11y-assist/tests/test_methods_metadata.py +236 -0
  122. package/src/a11y-assist/tests/test_plain_language.py +348 -0
  123. package/src/a11y-assist/tests/test_render.py +117 -0
  124. package/src/a11y-assist/tests/test_screen_reader.py +703 -0
  125. package/src/a11y-assist/tests/test_storage_last.py +61 -0
  126. package/src/a11y-assist/tests/test_triage.py +86 -0
  127. package/src/a11y-ci/.github/workflows/ci.yml +43 -0
  128. package/src/a11y-ci/.github/workflows/test.yml +30 -0
  129. package/src/a11y-ci/A11Y_CI_TEST_COVERAGE_REQUIREMENTS.md +94 -0
  130. package/src/a11y-ci/CODE_OF_CONDUCT.md +129 -0
  131. package/src/a11y-ci/CONTRIBUTING.md +142 -0
  132. package/src/a11y-ci/LICENSE +21 -0
  133. package/src/a11y-ci/README.md +105 -0
  134. package/src/a11y-ci/a11y_ci/__init__.py +3 -0
  135. package/src/a11y-ci/a11y_ci/allowlist.py +83 -0
  136. package/src/a11y-ci/a11y_ci/cli.py +145 -0
  137. package/src/a11y-ci/a11y_ci/gate.py +131 -0
  138. package/src/a11y-ci/a11y_ci/render.py +48 -0
  139. package/src/a11y-ci/a11y_ci/schemas/allowlist.schema.json +24 -0
  140. package/src/a11y-ci/a11y_ci/scorecard.py +99 -0
  141. package/src/a11y-ci/npm/package.json +35 -0
  142. package/src/a11y-ci/pyproject.toml +64 -0
  143. package/src/a11y-ci/tests/__init__.py +1 -0
  144. package/src/a11y-ci/tests/fixtures/allowlist_expired.json +10 -0
  145. package/src/a11y-ci/tests/fixtures/allowlist_ok.json +10 -0
  146. package/src/a11y-ci/tests/fixtures/baseline_ok.json +7 -0
  147. package/src/a11y-ci/tests/fixtures/current_fail.json +6 -0
  148. package/src/a11y-ci/tests/fixtures/current_ok.json +6 -0
  149. package/src/a11y-ci/tests/fixtures/current_regresses.json +7 -0
  150. package/src/a11y-ci/tests/test_gate.py +134 -0
  151. package/src/a11y-evidence-engine/.github/workflows/ci.yml +53 -0
  152. package/src/a11y-evidence-engine/CODE_OF_CONDUCT.md +129 -0
  153. package/src/a11y-evidence-engine/CONTRIBUTING.md +128 -0
  154. package/src/a11y-evidence-engine/LICENSE +21 -0
  155. package/src/a11y-evidence-engine/README.md +71 -0
  156. package/src/a11y-evidence-engine/bin/a11y-engine.js +11 -0
  157. package/src/a11y-evidence-engine/fixtures/bad/button-no-name.html +30 -0
  158. package/src/a11y-evidence-engine/fixtures/bad/img-missing-alt.html +19 -0
  159. package/src/a11y-evidence-engine/fixtures/bad/input-missing-label.html +26 -0
  160. package/src/a11y-evidence-engine/fixtures/bad/missing-lang.html +11 -0
  161. package/src/a11y-evidence-engine/fixtures/good/index.html +29 -0
  162. package/src/a11y-evidence-engine/package-lock.json +109 -0
  163. package/src/a11y-evidence-engine/package.json +45 -0
  164. package/src/a11y-evidence-engine/src/cli.js +74 -0
  165. package/src/a11y-evidence-engine/src/evidence/canonicalize.js +52 -0
  166. package/src/a11y-evidence-engine/src/evidence/json_pointer.js +34 -0
  167. package/src/a11y-evidence-engine/src/evidence/prov_emit.js +153 -0
  168. package/src/a11y-evidence-engine/src/fswalk.js +56 -0
  169. package/src/a11y-evidence-engine/src/html_parse.js +117 -0
  170. package/src/a11y-evidence-engine/src/ids.js +53 -0
  171. package/src/a11y-evidence-engine/src/rules/document_missing_lang.js +50 -0
  172. package/src/a11y-evidence-engine/src/rules/form_control_missing_label.js +105 -0
  173. package/src/a11y-evidence-engine/src/rules/img_missing_alt.js +77 -0
  174. package/src/a11y-evidence-engine/src/rules/index.js +37 -0
  175. package/src/a11y-evidence-engine/src/rules/interactive_missing_name.js +129 -0
  176. package/src/a11y-evidence-engine/src/scan.js +128 -0
  177. package/src/a11y-evidence-engine/test/scan.test.js +149 -0
  178. package/src/a11y-evidence-engine/test/vectors.test.js +200 -0
  179. package/src/a11y-lint/.github/workflows/ci.yml +46 -0
  180. package/src/a11y-lint/.github/workflows/test.yml +34 -0
  181. package/src/a11y-lint/CODE_OF_CONDUCT.md +129 -0
  182. package/src/a11y-lint/CONTRIBUTING.md +70 -0
  183. package/src/a11y-lint/GOVERNANCE.md +57 -0
  184. package/src/a11y-lint/LICENSE +21 -0
  185. package/src/a11y-lint/PRESS_RELEASE.md +50 -0
  186. package/src/a11y-lint/README.md +276 -0
  187. package/src/a11y-lint/RELEASE_NOTES.md +57 -0
  188. package/src/a11y-lint/RELEASING.md +57 -0
  189. package/src/a11y-lint/a11y_lint/__init__.py +64 -0
  190. package/src/a11y-lint/a11y_lint/cli.py +319 -0
  191. package/src/a11y-lint/a11y_lint/errors.py +252 -0
  192. package/src/a11y-lint/a11y_lint/render.py +293 -0
  193. package/src/a11y-lint/a11y_lint/report_md.py +289 -0
  194. package/src/a11y-lint/a11y_lint/scan_cli_text.py +434 -0
  195. package/src/a11y-lint/a11y_lint/schemas/cli.error.schema.v0.1.json +83 -0
  196. package/src/a11y-lint/a11y_lint/scorecard.py +244 -0
  197. package/src/a11y-lint/a11y_lint/validate.py +225 -0
  198. package/src/a11y-lint/pyproject.toml +75 -0
  199. package/src/a11y-lint/tests/__init__.py +1 -0
  200. package/src/a11y-lint/tests/test_cli.py +200 -0
  201. package/src/a11y-lint/tests/test_errors.py +188 -0
  202. package/src/a11y-lint/tests/test_render.py +202 -0
  203. package/src/a11y-lint/tests/test_report_md.py +188 -0
  204. package/src/a11y-lint/tests/test_scan_cli_text.py +290 -0
  205. package/src/a11y-lint/tests/test_scorecard.py +195 -0
  206. package/src/a11y-lint/tests/test_validate.py +257 -0
  207. package/src/a11y-mcp-tools/.github/workflows/ci.yml +53 -0
  208. package/src/a11y-mcp-tools/CODE_OF_CONDUCT.md +129 -0
  209. package/src/a11y-mcp-tools/CONTRIBUTING.md +136 -0
  210. package/src/a11y-mcp-tools/LICENSE +21 -0
  211. package/src/a11y-mcp-tools/PROV_METHODS_CATALOG.md +104 -0
  212. package/src/a11y-mcp-tools/README.md +168 -0
  213. package/src/a11y-mcp-tools/bin/cli.js +452 -0
  214. package/src/a11y-mcp-tools/bin/server.js +244 -0
  215. package/src/a11y-mcp-tools/fixtures/requests/a11y.diagnose.ok.json +27 -0
  216. package/src/a11y-mcp-tools/fixtures/requests/a11y.evidence.ok.json +25 -0
  217. package/src/a11y-mcp-tools/fixtures/responses/a11y.diagnose.ok.json +139 -0
  218. package/src/a11y-mcp-tools/fixtures/responses/a11y.diagnose.provenance_fail.json +13 -0
  219. package/src/a11y-mcp-tools/fixtures/responses/a11y.evidence.ok.json +88 -0
  220. package/src/a11y-mcp-tools/package-lock.json +189 -0
  221. package/src/a11y-mcp-tools/package.json +49 -0
  222. package/src/a11y-mcp-tools/src/envelope.js +197 -0
  223. package/src/a11y-mcp-tools/src/index.js +9 -0
  224. package/src/a11y-mcp-tools/src/schemas/artifact.js +85 -0
  225. package/src/a11y-mcp-tools/src/schemas/diagnosis.schema.v0.1.json +137 -0
  226. package/src/a11y-mcp-tools/src/schemas/envelope.schema.v0.1.json +108 -0
  227. package/src/a11y-mcp-tools/src/schemas/evidence.bundle.schema.v0.1.json +129 -0
  228. package/src/a11y-mcp-tools/src/schemas/evidence.js +97 -0
  229. package/src/a11y-mcp-tools/src/schemas/index.js +11 -0
  230. package/src/a11y-mcp-tools/src/schemas/provenance.js +140 -0
  231. package/src/a11y-mcp-tools/src/schemas/tools/a11y.diagnose.request.schema.v0.1.json +77 -0
  232. package/src/a11y-mcp-tools/src/schemas/tools/a11y.diagnose.response.schema.v0.1.json +50 -0
  233. package/src/a11y-mcp-tools/src/schemas/tools/a11y.evidence.request.schema.v0.1.json +120 -0
  234. package/src/a11y-mcp-tools/src/schemas/tools/a11y.evidence.response.schema.v0.1.json +50 -0
  235. package/src/a11y-mcp-tools/src/tools/diagnose.js +597 -0
  236. package/src/a11y-mcp-tools/src/tools/evidence.js +481 -0
  237. package/src/a11y-mcp-tools/src/tools/index.js +10 -0
  238. package/src/a11y-mcp-tools/test/contract.test.mjs +154 -0
  239. package/src/a11y-mcp-tools/test/diagnose.test.js +485 -0
  240. package/src/a11y-mcp-tools/test/evidence.test.js +183 -0
  241. package/src/a11y-mcp-tools/test/schema.test.js +327 -0
@@ -0,0 +1,86 @@
1
+ # Why prov-spec exists
2
+
3
+ ## The problem
4
+
5
+ Provenance is everywhere. Every pipeline, every tool, every system generates some form of "where did this come from?" metadata. Build systems track inputs. ML pipelines record hyperparameters. Data workflows log transformations.
6
+
7
+ But it's informal, implicit, unverifiable. Strings without contracts. Field names that vary by vendor. Hashes computed over undefined bytes. Claims you can't check without running the original system. This doesn't scale. When provenance is tied to a specific tool, it dies with that tool.
8
+
9
+ ## What went wrong historically
10
+
11
+ Provenance has been tied to:
12
+
13
+ - **Frameworks** — you need the framework to verify the provenance
14
+ - **SDKs** — you need the SDK to parse the records
15
+ - **Vendors** — you need the vendor's system to trust the claims
16
+
17
+ This creates a problem: verification becomes impossible without "the original system." If your audit happens five years later, or in a different language, or after the vendor pivots — you're stuck.
18
+
19
+ The result is that most provenance is write-only. Systems generate it, but nothing consumes it reliably. It exists for compliance theater, not actual verification.
20
+
21
+ ## The core idea
22
+
23
+ **Provenance should be verifiable without trusting the producer.**
24
+
25
+ That's the thesis. Everything in prov-spec hangs off this single requirement.
26
+
27
+ If I can't verify your provenance claim using only:
28
+ - the record you gave me
29
+ - a specification I can read
30
+ - inputs I can obtain
31
+
32
+ ...then your provenance is not provenance. It's a story.
33
+
34
+ ## What prov-spec standardizes
35
+
36
+ - **Method identity** — stable, namespaced IDs that mean the same thing everywhere
37
+ - **Semantics** — what a method ID *commits to* when claimed
38
+ - **Canonical bytes** — exactly what gets hashed, no ambiguity
39
+ - **Validation behavior** — test vectors that define correct output
40
+
41
+ ## What prov-spec refuses to standardize
42
+
43
+ - **Storage** — where you keep records is your problem
44
+ - **Transport** — how you send records is your problem
45
+ - **UI** — how you display records is your problem
46
+ - **Policy** — who trusts what is your problem
47
+
48
+ This restraint is a feature. Every additional thing a spec standardizes is another thing that can break, another thing that creates lock-in, another thing that prevents adoption.
49
+
50
+ prov-spec is deliberately minimal. It standardizes the verification surface and nothing else.
51
+
52
+ ## Why method IDs are the unit of interoperability
53
+
54
+ A method ID like `integrity.digest.sha256` is not a function call. It's a *contract*.
55
+
56
+ When a provenance record claims `integrity.digest.sha256`, it's saying:
57
+
58
+ > "I computed a SHA-256 hash. The hash is over canonical JSON bytes. The bytes were computed using the canonicalization rules in the spec. The hex is lowercase. You can verify this yourself."
59
+
60
+ That contract survives:
61
+ - Rewrites of the producing system
62
+ - Ports to different languages
63
+ - Years of bit-rot
64
+ - Changes in organizational ownership
65
+
66
+ Method IDs are portable truth. Combined with test vectors, they become *executable* portable truth.
67
+
68
+ ## What success looks like
69
+
70
+ Multiple engines, different languages, same vectors, same answers.
71
+
72
+ A Python tool produces a provenance record. A Rust verifier checks it. A Node.js dashboard displays it. A Go auditor validates the chain. None of them share code. All of them agree on what the record means.
73
+
74
+ That's the goal. Not "everyone uses our SDK." Not "everyone adopts our framework." Just: everyone agrees on what the words mean, and can prove it.
75
+
76
+ ## Non-goals
77
+
78
+ prov-spec is **not a framework**. There's no runtime, no library you must import, no service you must call.
79
+
80
+ prov-spec is **not a governance body**. We don't certify implementations, don't issue compliance badges, don't arbitrate disputes.
81
+
82
+ prov-spec is **not an endorsement mechanism**. A valid provenance record doesn't mean the content is good, true, or trustworthy. It means the record is well-formed and the claims are verifiable.
83
+
84
+ ## Closing
85
+
86
+ prov-spec exists so provenance can outlive the systems that generate it.
@@ -0,0 +1,14 @@
1
+ {
2
+ "schema_version": "artifact.v0.1",
3
+ "artifact_id": "clierr-01",
4
+ "media_type": "application/json",
5
+ "locator": "file:/tmp/cli_error.json",
6
+ "digest": {
7
+ "alg": "sha256",
8
+ "value": "9f2c6a0e0f76c9d6d8b1c2f9a88d7b6c1e7f0f0b3f4a9b6c2d1a9e7c0b1f2a3c"
9
+ },
10
+ "labels": {
11
+ "role": "cli_error_json",
12
+ "schema": "cli.error.v0.1"
13
+ }
14
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "schema_version": "artifact.ref.v0.1",
3
+ "locator": "file:/tmp/cli_error.json",
4
+ "media_type": "application/json",
5
+ "labels": {
6
+ "role": "cli_error_json",
7
+ "schema": "cli.error.v0.1"
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "schema_version": "evidence.v0.1",
3
+ "field": "plan[0]",
4
+ "source": "artifact:clierr-01#json:/fix/0",
5
+ "method": "engine.extract.evidence.json_pointer"
6
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "schema_version": "mcp.envelope.v0.1",
3
+ "result": {
4
+ "schema_version": "assist.response.v0.1",
5
+ "anchored_id": "PAYROLL.EXPORT.SFTP.AUTH",
6
+ "confidence": "High",
7
+ "safest_next_step": "Confirm the credential method used for SFTP.",
8
+ "plan": [
9
+ "Verify the username and password or the SSH key.",
10
+ "Re-run the export in dry run mode.",
11
+ "Retry the upload."
12
+ ],
13
+ "next_safe_commands": [
14
+ "payroll export --batch 2026-01-26 --dry-run"
15
+ ],
16
+ "notes": [
17
+ "This assistance is additive. Original output was not modified."
18
+ ],
19
+ "methods_applied": [
20
+ "engine.normalize.from_cli_error_v0_1",
21
+ "profile.screen_reader.apply",
22
+ "guard.validate_profile_transform"
23
+ ],
24
+ "evidence": [
25
+ {
26
+ "field": "anchored_id",
27
+ "source": "artifact:clierr-01#json:/id"
28
+ },
29
+ {
30
+ "field": "safest_next_step",
31
+ "source": "artifact:clierr-01#json:/why/0"
32
+ }
33
+ ]
34
+ },
35
+ "provenance": {
36
+ "schema_version": "prov.record.v0.1",
37
+ "run_id": "9a1c2e9f-5c3f-4a3a-9d5e-1d2b4b6f9c10",
38
+ "tool": {
39
+ "name": "a11y-assist",
40
+ "version": "v0.3.1",
41
+ "adapter": "cli"
42
+ },
43
+ "inputs": [
44
+ {
45
+ "schema_version": "artifact.v0.1",
46
+ "artifact_id": "clierr-01",
47
+ "media_type": "application/json",
48
+ "locator": "file:/tmp/cli_error.json",
49
+ "digest": {
50
+ "alg": "sha256",
51
+ "value": "9f2c6a0e0f76c9d6d8b1c2f9a88d7b6c1e7f0f0b3f4a9b6c2d1a9e7c0b1f2a3c"
52
+ },
53
+ "labels": {
54
+ "role": "cli_error_json",
55
+ "schema": "cli.error.v0.1"
56
+ }
57
+ }
58
+ ],
59
+ "outputs": [
60
+ {
61
+ "schema_version": "artifact.v0.1",
62
+ "artifact_id": "assist-01",
63
+ "media_type": "application/json",
64
+ "digest": {
65
+ "alg": "sha256",
66
+ "value": "3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d3c2b"
67
+ },
68
+ "labels": {
69
+ "role": "assist_response_json",
70
+ "schema": "assist.response.v0.1",
71
+ "profile": "screen-reader"
72
+ }
73
+ }
74
+ ],
75
+ "methods": [
76
+ "engine.normalize.from_cli_error_v0_1",
77
+ "profile.screen_reader.apply",
78
+ "guard.validate_profile_transform"
79
+ ],
80
+ "evidence": [
81
+ {
82
+ "schema_version": "evidence.v0.1",
83
+ "field": "safest_next_step",
84
+ "source": "artifact:clierr-01#json:/why/0"
85
+ }
86
+ ],
87
+ "parents": []
88
+ },
89
+ "meta": {
90
+ "adapter": "cli",
91
+ "request_id": "req-abc123",
92
+ "duration_ms": 42,
93
+ "schema_hints": {
94
+ "result": "assist.response.v0.1"
95
+ }
96
+ }
97
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "schema_version": "mcp.request.v0.1",
3
+ "request_id": "req-001",
4
+ "tool": {
5
+ "name": "a11y-assist.explain",
6
+ "version": "v0.3.1"
7
+ },
8
+ "params": {
9
+ "profile": "screen-reader",
10
+ "_meta": {
11
+ "capture_provenance": true,
12
+ "capture_artifacts": true
13
+ }
14
+ },
15
+ "artifacts": [
16
+ {
17
+ "schema_version": "artifact.ref.v0.1",
18
+ "locator": "file:/tmp/cli_error.json",
19
+ "media_type": "application/json",
20
+ "labels": {
21
+ "role": "cli_error_json"
22
+ }
23
+ }
24
+ ],
25
+ "preferences": {
26
+ "deterministic": true
27
+ }
28
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "schema_version": "prov.record.v0.1",
3
+ "run_id": "9a1c2e9f-5c3f-4a3a-9d5e-1d2b4b6f9c10",
4
+ "tool": {
5
+ "name": "a11y-assist",
6
+ "version": "v0.3.1",
7
+ "adapter": "cli"
8
+ },
9
+ "inputs": [
10
+ {
11
+ "schema_version": "artifact.v0.1",
12
+ "artifact_id": "clierr-01",
13
+ "media_type": "application/json"
14
+ }
15
+ ],
16
+ "outputs": [
17
+ {
18
+ "schema_version": "artifact.v0.1",
19
+ "artifact_id": "assist-01",
20
+ "media_type": "application/json"
21
+ }
22
+ ],
23
+ "methods": [
24
+ "engine.normalize.from_cli_error_v0_1",
25
+ "guard.validate_profile_transform"
26
+ ],
27
+ "evidence": [
28
+ {
29
+ "schema_version": "evidence.v0.1",
30
+ "field": "safest_next_step",
31
+ "source": "artifact:clierr-01#json:/why/0"
32
+ }
33
+ ],
34
+ "parents": []
35
+ }
@@ -0,0 +1,114 @@
1
+ # Interop Proof: Node.js Engine
2
+
3
+ **Date:** 2025-01-26
4
+ **Spec Version:** 0.1.0
5
+ **Engine:** prov-engine-js v0.1.0
6
+
7
+ This document provides evidence that prov-spec vectors can be validated by an independent, non-Python implementation.
8
+
9
+ ---
10
+
11
+ ## Engine Details
12
+
13
+ | Property | Value |
14
+ |----------|-------|
15
+ | Name | prov-engine-js |
16
+ | Version | 0.1.0 |
17
+ | Language | JavaScript (Node.js 18+) |
18
+ | Dependencies | None (built-ins only) |
19
+ | Repository | https://github.com/prov-spec/prov-engine-js |
20
+
21
+ ## Implemented Methods
22
+
23
+ - `integrity.digest.sha256`
24
+ - `adapter.wrap.envelope_v0_1`
25
+
26
+ ## Vector Results
27
+
28
+ ### integrity.digest.sha256
29
+
30
+ ```
31
+ $ node prov-engine.js check-vector spec/vectors/integrity.digest.sha256
32
+ PASS: integrity.digest.sha256 vector
33
+ ```
34
+
35
+ **Input:**
36
+ ```json
37
+ {"key": "value", "number": 42, "nested": {"a": 1, "b": 2}}
38
+ ```
39
+
40
+ **Output:**
41
+ ```json
42
+ {
43
+ "canonical_form": "{\"key\":\"value\",\"nested\":{\"a\":1,\"b\":2},\"number\":42}",
44
+ "digest": {
45
+ "alg": "sha256",
46
+ "value": "54fb66ce0aa908012dc9c432d77d16df95a3d5033a557d1c14cfc6d82a63ae34"
47
+ }
48
+ }
49
+ ```
50
+
51
+ **Verification:** Output matches `spec/vectors/integrity.digest.sha256/expected.json` exactly.
52
+
53
+ ---
54
+
55
+ ### adapter.wrap.envelope_v0_1
56
+
57
+ ```
58
+ $ node prov-engine.js check-vector spec/vectors/adapter.wrap.envelope_v0_1
59
+ PASS: adapter.wrap.envelope_v0_1 vector
60
+ ```
61
+
62
+ **Input:**
63
+ ```json
64
+ {"ok": true, "count": 3, "message": "Operation completed"}
65
+ ```
66
+
67
+ **Output:**
68
+ ```json
69
+ {
70
+ "schema_version": "mcp.envelope.v0.1",
71
+ "result": {"ok": true, "count": 3, "message": "Operation completed"}
72
+ }
73
+ ```
74
+
75
+ **Verification:** Output matches `spec/vectors/adapter.wrap.envelope_v0_1/expected.json` exactly.
76
+
77
+ ---
78
+
79
+ ## Capability Manifest
80
+
81
+ ```json
82
+ {
83
+ "schema": "prov-capabilities@v0.1",
84
+ "engine": {
85
+ "name": "prov-engine-js",
86
+ "version": "0.1.0",
87
+ "vendor": "prov-spec",
88
+ "license": "MIT"
89
+ },
90
+ "implements": [
91
+ "adapter.wrap.envelope_v0_1",
92
+ "integrity.digest.sha256"
93
+ ],
94
+ "conformance_level": "fully-conformant",
95
+ "constraints": {
96
+ "canonicalization": "jcs-subset",
97
+ "supported_digest_algorithms": ["sha256"]
98
+ }
99
+ }
100
+ ```
101
+
102
+ ---
103
+
104
+ ## Conclusion
105
+
106
+ The Node.js engine:
107
+
108
+ 1. Passes all applicable prov-spec vectors
109
+ 2. Produces byte-identical output to the Python reference
110
+ 3. Implements canonicalization per PROV_METHODS_SPEC.md Section 6
111
+ 4. Has zero dependencies beyond Node.js built-ins
112
+ 5. Shares no code with the Python reference implementation
113
+
114
+ This constitutes proof of language-neutral interoperability.
@@ -0,0 +1,241 @@
1
+ # MCP Envelope Compatibility Policy v0.1
2
+
3
+ **Status:** Normative (v0.3.1+)
4
+
5
+ This document defines how adapters wrap legacy tool outputs into `mcp.envelope.v0.1` safely.
6
+
7
+ ---
8
+
9
+ ## How to adopt (minimal)
10
+
11
+ You can adopt the MCP envelope and provenance system incrementally.
12
+
13
+ ### If you already return JSON
14
+ Wrap your tool output in `mcp.envelope.v0.1`:
15
+
16
+ ```json
17
+ {
18
+ "schema_version": "mcp.envelope.v0.1",
19
+ "result": { "your": "existing json payload" },
20
+ "provenance": null
21
+ }
22
+ ```
23
+
24
+ Your existing payload remains unchanged and unconstrained.
25
+
26
+ ### If you return text output
27
+ Wrap it as a string result:
28
+
29
+ ```json
30
+ {
31
+ "schema_version": "mcp.envelope.v0.1",
32
+ "result": "your existing text output",
33
+ "provenance": null
34
+ }
35
+ ```
36
+
37
+ ### If you want provenance (recommended for audits)
38
+ Attach a `prov.record.v0.1` record with:
39
+ - input artifacts (`inputs[]`)
40
+ - output artifacts (`outputs[]`)
41
+ - applied method IDs (`methods[]`)
42
+ - optional evidence anchors (`evidence[]`)
43
+ - optional lineage (`parents[]`)
44
+
45
+ ```json
46
+ {
47
+ "schema_version": "mcp.envelope.v0.1",
48
+ "result": { "..." : "..." },
49
+ "provenance": {
50
+ "schema_version": "prov.record.v0.1",
51
+ "run_id": "uuid",
52
+ "tool": { "name": "your-tool", "version": "vX.Y.Z", "adapter": "mcp" },
53
+ "inputs": [],
54
+ "outputs": [],
55
+ "methods": [],
56
+ "evidence": [],
57
+ "parents": []
58
+ }
59
+ }
60
+ ```
61
+
62
+ ---
63
+
64
+ ## 1. What Counts as "Legacy"
65
+
66
+ Anything that returns a payload that is **not** already an `mcp.envelope.v0.1` object:
67
+
68
+ - Plain string output
69
+ - Raw JSON object result
70
+ - Arrays, numbers, booleans
71
+ - Tool-specific response objects (e.g., `assist.response.v0.1`)
72
+
73
+ ---
74
+
75
+ ## 2. Wrapping Rule
76
+
77
+ Adapters **MAY** wrap legacy results into:
78
+
79
+ ```json
80
+ {
81
+ "schema_version": "mcp.envelope.v0.1",
82
+ "result": <original_payload>,
83
+ "provenance": null
84
+ }
85
+ ```
86
+
87
+ This is always safe and preserves meaning.
88
+
89
+ ---
90
+
91
+ ## 3. Results with Existing schema_version
92
+
93
+ If the legacy payload is an object with its own `schema_version` (e.g., `assist.response.v0.1`), keep it intact as `result`:
94
+
95
+ ```json
96
+ {
97
+ "schema_version": "mcp.envelope.v0.1",
98
+ "result": { "schema_version": "assist.response.v0.1", ... },
99
+ "provenance": null
100
+ }
101
+ ```
102
+
103
+ **Do not** rename fields. **Do not** reformat. **Do not** "upgrade" schemas.
104
+
105
+ ---
106
+
107
+ ## 4. Error Handling
108
+
109
+ If a tool fails and the adapter can only observe:
110
+ - An exception
111
+ - A non-zero exit code
112
+ - stderr text
113
+
114
+ Then wrap:
115
+ - `result`: `null` (or original partial output if available)
116
+ - `errors[]`: At least one entry describing the failure
117
+
118
+ ### Example
119
+
120
+ ```json
121
+ {
122
+ "schema_version": "mcp.envelope.v0.1",
123
+ "result": null,
124
+ "errors": [
125
+ {
126
+ "code": "ADAPTER.EXECUTION.FAILED",
127
+ "message": "Tool execution failed with exit code 2.",
128
+ "details": { "exit_code": 2 }
129
+ }
130
+ ],
131
+ "provenance": null
132
+ }
133
+ ```
134
+
135
+ If the tool itself provides structured errors, prefer those codes.
136
+
137
+ ---
138
+
139
+ ## 5. Provenance Attachment (Opt-in)
140
+
141
+ Adapters **SHOULD** only attach provenance when:
142
+
143
+ 1. They can compute reliable artifact digests and sources, **AND**
144
+ 2. It won't require network calls unless the caller opted in
145
+
146
+ Otherwise, set `provenance: null`.
147
+
148
+ ### Opt-in Convention
149
+
150
+ Use `params._meta` for provenance control:
151
+
152
+ | Field | Type | Default | Description |
153
+ |-------|------|---------|-------------|
154
+ | `capture_provenance` | boolean | `false` | Attach `prov.record.v0.1` to envelope |
155
+ | `capture_artifacts` | boolean | `false` | Compute digests for input/output artifacts |
156
+ | `provenance_mode` | string | `"minimal"` | `"minimal"` or `"full"` |
157
+
158
+ ---
159
+
160
+ ## 6. Determinism Preference
161
+
162
+ If `mcp.request.preferences.deterministic` is `true` (default):
163
+
164
+ - Adapters **SHOULD** omit timestamps
165
+ - Adapters **SHOULD** avoid network calls
166
+ - Tools **MAY** downgrade behavior (e.g., skip enrichment)
167
+
168
+ ---
169
+
170
+ ## 7. Pass-through Rule (No Double-wrap)
171
+
172
+ If a tool already returns `mcp.envelope.v0.1`, adapters **MUST** return it unchanged.
173
+
174
+ **No nesting.**
175
+
176
+ ---
177
+
178
+ ## 8. Forward Compatibility Rule
179
+
180
+ Consumers must treat unknown top-level envelope fields as invalid (since `additionalProperties: false`), so:
181
+
182
+ - Add new envelope fields only with a **major version bump**, OR
183
+ - Create `mcp.envelope.v0.2` when adding top-level fields
184
+
185
+ Within `result`, anything goes.
186
+
187
+ ---
188
+
189
+ ## 9. Examples
190
+
191
+ ### 9.1 Legacy JSON Result
192
+
193
+ **Input:**
194
+ ```json
195
+ { "ok": true, "count": 3 }
196
+ ```
197
+
198
+ **Wrapped:**
199
+ ```json
200
+ {
201
+ "schema_version": "mcp.envelope.v0.1",
202
+ "result": { "ok": true, "count": 3 }
203
+ }
204
+ ```
205
+
206
+ ### 9.2 Legacy String
207
+
208
+ **Input:**
209
+ ```
210
+ "done"
211
+ ```
212
+
213
+ **Wrapped:**
214
+ ```json
215
+ {
216
+ "schema_version": "mcp.envelope.v0.1",
217
+ "result": "done"
218
+ }
219
+ ```
220
+
221
+ ### 9.3 Tool Already Returns Envelope
222
+
223
+ **Input:**
224
+ ```json
225
+ {
226
+ "schema_version": "mcp.envelope.v0.1",
227
+ "result": { ... },
228
+ "provenance": { ... }
229
+ }
230
+ ```
231
+
232
+ **Output:** Return unchanged.
233
+
234
+ ---
235
+
236
+ ## 10. References
237
+
238
+ - `mcp.envelope.schema.v0.1.json`: Envelope schema
239
+ - `mcp.request.schema.v0.1.json`: Request schema
240
+ - `prov.record.schema.v0.1.json`: Provenance record schema
241
+ - `artifact.ref.schema.v0.1.json`: Artifact reference schema