@markdown-ai/cli 1.0.0-rc.2
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/HOW-TO-USE.md +386 -0
- package/README.md +18 -0
- package/dist/cli.js +11297 -0
- package/dist/conformance/README.md +36 -0
- package/dist/conformance/invalid/11-name-uppercase.mda +8 -0
- package/dist/conformance/invalid/12-description-over-1024.mda +8 -0
- package/dist/conformance/invalid/13-skill-output-mda-extended-toplevel.md +10 -0
- package/dist/conformance/invalid/14-signature-without-integrity.mda +14 -0
- package/dist/conformance/invalid/15-version-range-compound.mda +13 -0
- package/dist/conformance/invalid/16-agents-md-allowed-tools-toplevel.md +8 -0
- package/dist/conformance/invalid/17-mcp-server-md-missing-name.md +7 -0
- package/dist/conformance/invalid/18-integrity-bad-digest-length.mda +11 -0
- package/dist/conformance/invalid/19-signature-digest-mismatch.mda +17 -0
- package/dist/conformance/invalid/24-unterminated-frontmatter.mda +7 -0
- package/dist/conformance/invalid/25-invalid-utf8.mda +8 -0
- package/dist/conformance/invalid/26-skill-md-body-only.md +3 -0
- package/dist/conformance/invalid/28-trust-policy-issuer-only.json +12 -0
- package/dist/conformance/invalid/29-sigstore-signature-without-rekor.mda +15 -0
- package/dist/conformance/invalid/30-did-web-signature-with-rekor.mda +17 -0
- package/dist/conformance/invalid/31-payload-type-jcs-suffix.mda +18 -0
- package/dist/conformance/invalid/32-trust-policy-sigstore-without-rekor.json +10 -0
- package/dist/conformance/invalid/33-trust-policy-sigstore-empty-rekor.json +11 -0
- package/dist/conformance/invalid/34-trust-policy-sigstore-rekor-disabled.json +14 -0
- package/dist/conformance/invalid/37-trusted-runtime-missing-integrity.mda +11 -0
- package/dist/conformance/invalid/38-trusted-runtime-missing-signature.mda +14 -0
- package/dist/conformance/invalid/39-trusted-runtime-duplicate-did-web-signature.mda +25 -0
- package/dist/conformance/invalid/40-trusted-runtime-untrusted-did-web-signer.mda +20 -0
- package/dist/conformance/invalid/41-trust-policy-did-web-with-rekor.json +12 -0
- package/dist/conformance/invalid/44-trusted-runtime-untrusted-sigstore-subject.mda +23 -0
- package/dist/conformance/invalid/45-runtime-policy-version-2.json +9 -0
- package/dist/conformance/manifest.yaml +376 -0
- package/dist/conformance/valid/01-frontmatter-minimal.mda +8 -0
- package/dist/conformance/valid/03-relationships-with-mirror.mda +20 -0
- package/dist/conformance/valid/04-depends-on-and-requires.mda +21 -0
- package/dist/conformance/valid/05-integrity-sha256.mda +14 -0
- package/dist/conformance/valid/06-sigstore-signed.mda +22 -0
- package/dist/conformance/valid/07-did-web-signed.mda +20 -0
- package/dist/conformance/valid/08-agents-md-frontmatter-free.md +9 -0
- package/dist/conformance/valid/09-agents-md-with-frontmatter.md +12 -0
- package/dist/conformance/valid/20-bom-prefixed.mda +8 -0
- package/dist/conformance/valid/21-crlf-line-endings.mda +8 -0
- package/dist/conformance/valid/22-body-with-horizontal-rule.mda +16 -0
- package/dist/conformance/valid/23-empty-body.mda +4 -0
- package/dist/conformance/valid/27-trust-policy-github-actions.json +13 -0
- package/dist/conformance/valid/35-trust-policy-did-web.json +9 -0
- package/dist/conformance/valid/36-trust-policy-did-web-two-signatures.json +14 -0
- package/dist/conformance/valid/42-trust-policy-human-sigstore.json +13 -0
- package/dist/conformance/valid/43-trusted-runtime-sigstore-signed.mda +23 -0
- package/dist/schemas/_defs/depends-on.schema.json +18 -0
- package/dist/schemas/_defs/description.schema.json +9 -0
- package/dist/schemas/_defs/integrity.schema.json +34 -0
- package/dist/schemas/_defs/iso8601.schema.json +8 -0
- package/dist/schemas/_defs/mda-extended.schema.json +43 -0
- package/dist/schemas/_defs/mda-keys.schema.json +34 -0
- package/dist/schemas/_defs/metadata-namespaces.schema.json +48 -0
- package/dist/schemas/_defs/name.schema.json +10 -0
- package/dist/schemas/_defs/requires.schema.json +13 -0
- package/dist/schemas/_defs/signature.schema.json +72 -0
- package/dist/schemas/_defs/version-range.schema.json +8 -0
- package/dist/schemas/frontmatter-agents-md.schema.json +24 -0
- package/dist/schemas/frontmatter-mcp-server-md.schema.json +25 -0
- package/dist/schemas/frontmatter-skill-md.schema.json +26 -0
- package/dist/schemas/frontmatter-source.schema.json +37 -0
- package/dist/schemas/mda-trust-policy.schema.json +113 -0
- package/dist/schemas/relationship-footnote.schema.json +45 -0
- package/package.json +42 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
# MDA conformance manifest
|
|
2
|
+
# Binds each fixture to spec rules and expected verdict.
|
|
3
|
+
# Schema: see conformance/README.md.
|
|
4
|
+
|
|
5
|
+
version: 1
|
|
6
|
+
spec: v1.0
|
|
7
|
+
|
|
8
|
+
fixtures:
|
|
9
|
+
# ─── valid (source-side acceptance) ───────────────────────────────────────
|
|
10
|
+
- id: "01-frontmatter-minimal"
|
|
11
|
+
path: valid/01-frontmatter-minimal.mda
|
|
12
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
13
|
+
verdict: accept
|
|
14
|
+
rules: [§02-2.1, §02-2.2]
|
|
15
|
+
description: Minimal valid source — only `name` and `description`.
|
|
16
|
+
|
|
17
|
+
- id: "03-relationships-with-mirror"
|
|
18
|
+
path: valid/03-relationships-with-mirror.mda
|
|
19
|
+
against:
|
|
20
|
+
- schemas/frontmatter-source.schema.json
|
|
21
|
+
- schemas/relationship-footnote.schema.json
|
|
22
|
+
verdict: accept
|
|
23
|
+
rules: [§03-2, §03-4]
|
|
24
|
+
description: Source with footnote relationships AND a metadata.mda.relationships mirror (mirror is optional in source but encouraged).
|
|
25
|
+
|
|
26
|
+
- id: "04-depends-on-and-requires"
|
|
27
|
+
path: valid/04-depends-on-and-requires.mda
|
|
28
|
+
against:
|
|
29
|
+
- schemas/frontmatter-source.schema.json
|
|
30
|
+
- schemas/_defs/depends-on.schema.json
|
|
31
|
+
- schemas/_defs/version-range.schema.json
|
|
32
|
+
- schemas/_defs/requires.schema.json
|
|
33
|
+
verdict: accept
|
|
34
|
+
rules: [§03-3, §03-3.2, §10-2]
|
|
35
|
+
description: Source declaring metadata.mda.depends-on (with caret range and digest pinning) and metadata.mda.requires (with standard keys).
|
|
36
|
+
|
|
37
|
+
- id: "05-integrity-sha256"
|
|
38
|
+
path: valid/05-integrity-sha256.mda
|
|
39
|
+
against:
|
|
40
|
+
- schemas/frontmatter-source.schema.json
|
|
41
|
+
- schemas/_defs/integrity.schema.json
|
|
42
|
+
verdict: accept
|
|
43
|
+
rules: [§02-2.7, §08-2]
|
|
44
|
+
description: Source declaring a top-level integrity field with a valid sha256 digest shape.
|
|
45
|
+
|
|
46
|
+
- id: "06-sigstore-signed"
|
|
47
|
+
path: valid/06-sigstore-signed.mda
|
|
48
|
+
against:
|
|
49
|
+
- schemas/frontmatter-source.schema.json
|
|
50
|
+
- schemas/_defs/integrity.schema.json
|
|
51
|
+
- schemas/_defs/signature.schema.json
|
|
52
|
+
semantic-checks: [signature-digest-equality]
|
|
53
|
+
verdict: accept
|
|
54
|
+
rules: [§02-2.8, §09-2, §09-4]
|
|
55
|
+
description: Source declaring a Sigstore-OIDC signature; payload-digest matches integrity.digest; rekor coordinates present.
|
|
56
|
+
|
|
57
|
+
- id: "07-did-web-signed"
|
|
58
|
+
path: valid/07-did-web-signed.mda
|
|
59
|
+
against:
|
|
60
|
+
- schemas/frontmatter-source.schema.json
|
|
61
|
+
- schemas/_defs/integrity.schema.json
|
|
62
|
+
- schemas/_defs/signature.schema.json
|
|
63
|
+
semantic-checks: [signature-digest-equality]
|
|
64
|
+
verdict: accept
|
|
65
|
+
rules: [§09-2, §09-5]
|
|
66
|
+
description: Source declaring a did:web signature for the air-gap signing path; no rekor coordinates required.
|
|
67
|
+
|
|
68
|
+
- id: "08-agents-md-frontmatter-free"
|
|
69
|
+
path: valid/08-agents-md-frontmatter-free.md
|
|
70
|
+
against: [schemas/frontmatter-agents-md.schema.json]
|
|
71
|
+
verdict: accept
|
|
72
|
+
rules: [§06-targets/agents-md §06-3]
|
|
73
|
+
description: Pure-Markdown AGENTS.md with no frontmatter; conformant per the optional-frontmatter rule.
|
|
74
|
+
|
|
75
|
+
- id: "09-agents-md-with-frontmatter"
|
|
76
|
+
path: valid/09-agents-md-with-frontmatter.md
|
|
77
|
+
against: [schemas/frontmatter-agents-md.schema.json]
|
|
78
|
+
verdict: accept
|
|
79
|
+
rules: [§06-targets/agents-md §06-3.1, §06-targets/agents-md §06-3.2]
|
|
80
|
+
description: AGENTS.md with optional frontmatter; MDA-extended fields nested under metadata.mda.*.
|
|
81
|
+
|
|
82
|
+
# ─── valid (§02-1.1 frontmatter extraction algorithm) ─────────────────────
|
|
83
|
+
- id: "20-bom-prefixed"
|
|
84
|
+
path: valid/20-bom-prefixed.mda
|
|
85
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
86
|
+
extraction-expected: ok
|
|
87
|
+
verdict: accept
|
|
88
|
+
rules: [§02-1.1 step 1]
|
|
89
|
+
description: File begins with UTF-8 BOM (0xEF 0xBB 0xBF); extractor MUST strip the BOM in step 1 and parse normally.
|
|
90
|
+
|
|
91
|
+
- id: "21-crlf-line-endings"
|
|
92
|
+
path: valid/21-crlf-line-endings.mda
|
|
93
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
94
|
+
extraction-expected: ok
|
|
95
|
+
verdict: accept
|
|
96
|
+
rules: [§02-1.1 step 3]
|
|
97
|
+
description: File uses CRLF line terminators throughout; extractor MUST normalize CRLF to LF in step 3 before scanning for the closing fence.
|
|
98
|
+
|
|
99
|
+
- id: "22-body-with-horizontal-rule"
|
|
100
|
+
path: valid/22-body-with-horizontal-rule.mda
|
|
101
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
102
|
+
extraction-expected: ok
|
|
103
|
+
verdict: accept
|
|
104
|
+
rules: [§02-1.1 step 5, §02-1.1 step 6]
|
|
105
|
+
description: Body contains Markdown horizontal rules (`---`); the FIRST `---` line after the opening fence is the closing fence — later `---` lines remain in the body.
|
|
106
|
+
|
|
107
|
+
- id: "23-empty-body"
|
|
108
|
+
path: valid/23-empty-body.mda
|
|
109
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
110
|
+
extraction-expected: ok
|
|
111
|
+
verdict: accept
|
|
112
|
+
rules: [§02-1.1 step 7, §08-3.3]
|
|
113
|
+
description: Frontmatter-only source with an empty body string after the closing fence; the empty body is conformant and §08-3.3 emits no terminating newline.
|
|
114
|
+
|
|
115
|
+
- id: "27-trust-policy-github-actions"
|
|
116
|
+
path: valid/27-trust-policy-github-actions.json
|
|
117
|
+
against: [schemas/mda-trust-policy.schema.json]
|
|
118
|
+
verdict: accept
|
|
119
|
+
rules: [§13-4]
|
|
120
|
+
description: Trusted runtime policy that pins both GitHub Actions issuer and repository/tag subject and configures Rekor by URL.
|
|
121
|
+
|
|
122
|
+
- id: "35-trust-policy-did-web"
|
|
123
|
+
path: valid/35-trust-policy-did-web.json
|
|
124
|
+
against: [schemas/mda-trust-policy.schema.json]
|
|
125
|
+
verdict: accept
|
|
126
|
+
rules: [§13-4]
|
|
127
|
+
description: Minimal did:web trust policy; no Rekor block is needed for non-Sigstore signers.
|
|
128
|
+
|
|
129
|
+
- id: "36-trust-policy-did-web-two-signatures"
|
|
130
|
+
path: valid/36-trust-policy-did-web-two-signatures.json
|
|
131
|
+
against: [schemas/mda-trust-policy.schema.json]
|
|
132
|
+
verdict: accept
|
|
133
|
+
rules: [§13-4]
|
|
134
|
+
description: did:web trust policy requiring two distinct trusted signer identities.
|
|
135
|
+
|
|
136
|
+
- id: "42-trust-policy-human-sigstore"
|
|
137
|
+
path: valid/42-trust-policy-human-sigstore.json
|
|
138
|
+
against: [schemas/mda-trust-policy.schema.json]
|
|
139
|
+
verdict: accept
|
|
140
|
+
rules: [§13-4]
|
|
141
|
+
description: Trusted runtime policy that pins a human Sigstore OIDC issuer and subject and configures Rekor by URL.
|
|
142
|
+
|
|
143
|
+
- id: "43-trusted-runtime-sigstore-signed"
|
|
144
|
+
path: valid/43-trusted-runtime-sigstore-signed.mda
|
|
145
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
146
|
+
semantic-checks: [signature-digest-equality, trusted-runtime-policy]
|
|
147
|
+
runtime-policy: valid/42-trust-policy-human-sigstore.json
|
|
148
|
+
verified-identities:
|
|
149
|
+
- signature-index: 0
|
|
150
|
+
type: sigstore-oidc
|
|
151
|
+
issuer: "https://accounts.google.com"
|
|
152
|
+
subject: "maintainer@example.com"
|
|
153
|
+
verdict: accept
|
|
154
|
+
rules: [§13-2, §13-4]
|
|
155
|
+
description: A Sigstore signature whose verified OIDC identity matches the trust policy MUST satisfy trusted-runtime policy matching.
|
|
156
|
+
|
|
157
|
+
# ─── invalid (§02-1.1 frontmatter extraction algorithm) ───────────────────
|
|
158
|
+
- id: "24-unterminated-frontmatter"
|
|
159
|
+
path: invalid/24-unterminated-frontmatter.mda
|
|
160
|
+
extraction-expected: unterminated-frontmatter
|
|
161
|
+
verdict: reject
|
|
162
|
+
rules: [§02-1.1 step 5]
|
|
163
|
+
description: Opening `---` fence at offset 0 with no matching closing `---` line; extractor MUST refuse with `unterminated-frontmatter`.
|
|
164
|
+
|
|
165
|
+
- id: "25-invalid-utf8"
|
|
166
|
+
path: invalid/25-invalid-utf8.mda
|
|
167
|
+
extraction-expected: invalid-encoding
|
|
168
|
+
verdict: reject
|
|
169
|
+
rules: [§02-1.1 step 2]
|
|
170
|
+
description: File contains a stray 0xFF byte that is not a valid UTF-8 continuation; extractor MUST refuse with `invalid-encoding` before YAML parsing.
|
|
171
|
+
|
|
172
|
+
- id: "26-skill-md-body-only"
|
|
173
|
+
path: invalid/26-skill-md-body-only.md
|
|
174
|
+
against: [schemas/frontmatter-skill-md.schema.json]
|
|
175
|
+
extraction-expected: no-frontmatter
|
|
176
|
+
verdict: reject
|
|
177
|
+
rules: [§02-1.1 step 4, §06-targets/skill-md]
|
|
178
|
+
description: SKILL.md without an opening `---` fence; §02-1.1 step 4 says only AGENTS.md tolerates body-only — SKILL.md MUST refuse (`missing-required-frontmatter`).
|
|
179
|
+
|
|
180
|
+
# ─── invalid (source-side rejection) ──────────────────────────────────────
|
|
181
|
+
- id: "11-name-uppercase"
|
|
182
|
+
path: invalid/11-name-uppercase.mda
|
|
183
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
184
|
+
verdict: reject
|
|
185
|
+
rules: [§02-2.1]
|
|
186
|
+
description: name field contains uppercase letters; violates kebab-case identifier shape.
|
|
187
|
+
|
|
188
|
+
- id: "12-description-over-1024"
|
|
189
|
+
path: invalid/12-description-over-1024.mda
|
|
190
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
191
|
+
verdict: reject
|
|
192
|
+
rules: [§02-2.2]
|
|
193
|
+
description: description field exceeds 1024 chars.
|
|
194
|
+
|
|
195
|
+
- id: "14-signature-without-integrity"
|
|
196
|
+
path: invalid/14-signature-without-integrity.mda
|
|
197
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
198
|
+
verdict: reject
|
|
199
|
+
rules: [§02-2.8, §09-2]
|
|
200
|
+
description: signatures[] present but integrity is missing; dependentRequired clause forces integrity.
|
|
201
|
+
|
|
202
|
+
- id: "15-version-range-compound"
|
|
203
|
+
path: invalid/15-version-range-compound.mda
|
|
204
|
+
against:
|
|
205
|
+
- schemas/frontmatter-source.schema.json
|
|
206
|
+
- schemas/_defs/version-range.schema.json
|
|
207
|
+
verdict: reject
|
|
208
|
+
rules: [§03-3.2]
|
|
209
|
+
description: depends-on entry uses a compound version-range; v1.0 admits only exact and caret ranges.
|
|
210
|
+
|
|
211
|
+
- id: "18-integrity-bad-digest-length"
|
|
212
|
+
path: invalid/18-integrity-bad-digest-length.mda
|
|
213
|
+
against:
|
|
214
|
+
- schemas/frontmatter-source.schema.json
|
|
215
|
+
- schemas/_defs/integrity.schema.json
|
|
216
|
+
verdict: reject
|
|
217
|
+
rules: [§08-2]
|
|
218
|
+
description: integrity.algorithm is sha256 but digest length does not match (6 hex chars vs required 64).
|
|
219
|
+
|
|
220
|
+
- id: "19-signature-digest-mismatch"
|
|
221
|
+
path: invalid/19-signature-digest-mismatch.mda
|
|
222
|
+
against:
|
|
223
|
+
- schemas/frontmatter-source.schema.json
|
|
224
|
+
- schemas/_defs/integrity.schema.json
|
|
225
|
+
- schemas/_defs/signature.schema.json
|
|
226
|
+
semantic-checks: [signature-digest-equality]
|
|
227
|
+
verdict: reject
|
|
228
|
+
rules: [§09-2]
|
|
229
|
+
description: integrity.digest and signatures[0].payload-digest are both well-formed but unequal; the cross-field rule MUST reject.
|
|
230
|
+
|
|
231
|
+
- id: "28-trust-policy-issuer-only"
|
|
232
|
+
path: invalid/28-trust-policy-issuer-only.json
|
|
233
|
+
against: [schemas/mda-trust-policy.schema.json]
|
|
234
|
+
verdict: reject
|
|
235
|
+
rules: [§13-4]
|
|
236
|
+
description: Sigstore trust policy gives an issuer without a subject; issuer-only trust is too broad and MUST reject.
|
|
237
|
+
|
|
238
|
+
- id: "32-trust-policy-sigstore-without-rekor"
|
|
239
|
+
path: invalid/32-trust-policy-sigstore-without-rekor.json
|
|
240
|
+
against: [schemas/mda-trust-policy.schema.json]
|
|
241
|
+
verdict: reject
|
|
242
|
+
rules: [§13-4]
|
|
243
|
+
description: Sigstore trust policy MUST configure Rekor verification.
|
|
244
|
+
|
|
245
|
+
- id: "33-trust-policy-sigstore-empty-rekor"
|
|
246
|
+
path: invalid/33-trust-policy-sigstore-empty-rekor.json
|
|
247
|
+
against: [schemas/mda-trust-policy.schema.json]
|
|
248
|
+
verdict: reject
|
|
249
|
+
rules: [§13-4]
|
|
250
|
+
description: Sigstore trust policy Rekor configuration MUST include a log URL.
|
|
251
|
+
|
|
252
|
+
- id: "34-trust-policy-sigstore-rekor-disabled"
|
|
253
|
+
path: invalid/34-trust-policy-sigstore-rekor-disabled.json
|
|
254
|
+
against: [schemas/mda-trust-policy.schema.json]
|
|
255
|
+
verdict: reject
|
|
256
|
+
rules: [§13-4]
|
|
257
|
+
description: Sigstore trust policy has no Rekor disable flag; unknown `rekor.required` MUST reject.
|
|
258
|
+
|
|
259
|
+
- id: "41-trust-policy-did-web-with-rekor"
|
|
260
|
+
path: invalid/41-trust-policy-did-web-with-rekor.json
|
|
261
|
+
against: [schemas/mda-trust-policy.schema.json]
|
|
262
|
+
verdict: reject
|
|
263
|
+
rules: [§13-4]
|
|
264
|
+
description: did:web-only trust policies MUST NOT include a Rekor block because Rekor applies only to Sigstore signers.
|
|
265
|
+
|
|
266
|
+
- id: "29-sigstore-signature-without-rekor"
|
|
267
|
+
path: invalid/29-sigstore-signature-without-rekor.mda
|
|
268
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
269
|
+
verdict: reject
|
|
270
|
+
rules: [§09-2, §09-4]
|
|
271
|
+
description: Sigstore OIDC signatures MUST include Rekor log coordinates.
|
|
272
|
+
|
|
273
|
+
- id: "30-did-web-signature-with-rekor"
|
|
274
|
+
path: invalid/30-did-web-signature-with-rekor.mda
|
|
275
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
276
|
+
verdict: reject
|
|
277
|
+
rules: [§09-2, §09-5]
|
|
278
|
+
description: did:web signatures MUST NOT include Sigstore-only Rekor log coordinates.
|
|
279
|
+
|
|
280
|
+
- id: "31-payload-type-jcs-suffix"
|
|
281
|
+
path: invalid/31-payload-type-jcs-suffix.mda
|
|
282
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
283
|
+
verdict: reject
|
|
284
|
+
rules: [§09-3.1]
|
|
285
|
+
description: Vendor DSSE payload types use +json; +jcs+json is not an accepted structured suffix.
|
|
286
|
+
|
|
287
|
+
# ─── invalid (trusted-runtime semantic rejection) ────────────────────────
|
|
288
|
+
- id: "37-trusted-runtime-missing-integrity"
|
|
289
|
+
path: invalid/37-trusted-runtime-missing-integrity.mda
|
|
290
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
291
|
+
semantic-checks: [trusted-runtime-policy]
|
|
292
|
+
runtime-policy: valid/35-trust-policy-did-web.json
|
|
293
|
+
expected-error: missing-required-integrity
|
|
294
|
+
verdict: reject
|
|
295
|
+
rules: [§13-2]
|
|
296
|
+
description: Schema-valid source without integrity MUST reject under trusted-runtime.
|
|
297
|
+
|
|
298
|
+
- id: "38-trusted-runtime-missing-signature"
|
|
299
|
+
path: invalid/38-trusted-runtime-missing-signature.mda
|
|
300
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
301
|
+
semantic-checks: [trusted-runtime-policy]
|
|
302
|
+
runtime-policy: valid/35-trust-policy-did-web.json
|
|
303
|
+
expected-error: missing-required-signature
|
|
304
|
+
verdict: reject
|
|
305
|
+
rules: [§13-2]
|
|
306
|
+
description: Integrity-only source MUST reject under trusted-runtime because no signature is present.
|
|
307
|
+
|
|
308
|
+
- id: "39-trusted-runtime-duplicate-did-web-signature"
|
|
309
|
+
path: invalid/39-trusted-runtime-duplicate-did-web-signature.mda
|
|
310
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
311
|
+
semantic-checks: [signature-digest-equality, trusted-runtime-policy]
|
|
312
|
+
runtime-policy: valid/36-trust-policy-did-web-two-signatures.json
|
|
313
|
+
expected-error: insufficient-trusted-signatures
|
|
314
|
+
verdict: reject
|
|
315
|
+
rules: [§13-2, §13-4]
|
|
316
|
+
description: Two signature entries from the same did:web identity count as one trusted signer identity.
|
|
317
|
+
|
|
318
|
+
- id: "40-trusted-runtime-untrusted-did-web-signer"
|
|
319
|
+
path: invalid/40-trusted-runtime-untrusted-did-web-signer.mda
|
|
320
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
321
|
+
semantic-checks: [signature-digest-equality, trusted-runtime-policy]
|
|
322
|
+
runtime-policy: valid/35-trust-policy-did-web.json
|
|
323
|
+
expected-error: no-trusted-signature
|
|
324
|
+
verdict: reject
|
|
325
|
+
rules: [§13-2, §13-4]
|
|
326
|
+
description: A signed artifact whose signer is outside the trust policy MUST reject.
|
|
327
|
+
|
|
328
|
+
- id: "44-trusted-runtime-untrusted-sigstore-subject"
|
|
329
|
+
path: invalid/44-trusted-runtime-untrusted-sigstore-subject.mda
|
|
330
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
331
|
+
semantic-checks: [signature-digest-equality, trusted-runtime-policy]
|
|
332
|
+
runtime-policy: valid/42-trust-policy-human-sigstore.json
|
|
333
|
+
verified-identities:
|
|
334
|
+
- signature-index: 0
|
|
335
|
+
type: sigstore-oidc
|
|
336
|
+
issuer: "https://accounts.google.com"
|
|
337
|
+
subject: "attacker@example.com"
|
|
338
|
+
expected-error: no-trusted-signature
|
|
339
|
+
verdict: reject
|
|
340
|
+
rules: [§13-2, §13-4]
|
|
341
|
+
description: A Sigstore signature with a trusted issuer but untrusted verified subject MUST reject.
|
|
342
|
+
|
|
343
|
+
- id: "45-trusted-runtime-malformed-policy"
|
|
344
|
+
path: valid/07-did-web-signed.mda
|
|
345
|
+
against: [schemas/frontmatter-source.schema.json]
|
|
346
|
+
semantic-checks: [signature-digest-equality, trusted-runtime-policy]
|
|
347
|
+
runtime-policy: invalid/45-runtime-policy-version-2.json
|
|
348
|
+
expected-error: trust-policy-violation
|
|
349
|
+
verdict: reject
|
|
350
|
+
rules: [§13-4]
|
|
351
|
+
description: A runtime policy that would match semantically but fails the trust-policy schema MUST reject before policy matching.
|
|
352
|
+
|
|
353
|
+
# ─── invalid (output-side rejection — compiled .md against target schema) ─
|
|
354
|
+
- id: "13-skill-output-mda-extended-toplevel"
|
|
355
|
+
path: invalid/13-skill-output-mda-extended-toplevel.md
|
|
356
|
+
against: [schemas/frontmatter-skill-md.schema.json]
|
|
357
|
+
verdict: reject
|
|
358
|
+
rules: [§06-targets/skill-md §06-3.3]
|
|
359
|
+
description: Compiled SKILL.md keeps `doc-id` at top level; must nest under metadata.mda.
|
|
360
|
+
|
|
361
|
+
- id: "16-agents-md-allowed-tools-toplevel"
|
|
362
|
+
path: invalid/16-agents-md-allowed-tools-toplevel.md
|
|
363
|
+
against: [schemas/frontmatter-agents-md.schema.json]
|
|
364
|
+
verdict: reject
|
|
365
|
+
rules: [§06-targets/agents-md §06-3.2]
|
|
366
|
+
description: AGENTS.md output places allowed-tools at the top level; the target forbids it (must nest under vendor namespace).
|
|
367
|
+
|
|
368
|
+
- id: "17-mcp-server-md-missing-name"
|
|
369
|
+
path: invalid/17-mcp-server-md-missing-name.md
|
|
370
|
+
against: [schemas/frontmatter-mcp-server-md.schema.json]
|
|
371
|
+
verdict: reject
|
|
372
|
+
rules: [§06-targets/mcp-server-md §06-3.1]
|
|
373
|
+
description: MCP-SERVER.md output omits the required top-level `name` field.
|
|
374
|
+
|
|
375
|
+
# NOTE: future fixtures will exercise compile flows (compile/) once the
|
|
376
|
+
# reference compiler emits canonical bytes (§08) end-to-end.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: relationships-example
|
|
3
|
+
description: Source carrying both footnote relationships and a metadata.mda.relationships mirror. Use as a fixture for relationship-graph validation.
|
|
4
|
+
metadata:
|
|
5
|
+
mda:
|
|
6
|
+
relationships:
|
|
7
|
+
- rel-type: parent
|
|
8
|
+
doc-id: 11111111-1111-1111-1111-111111111111
|
|
9
|
+
rel-desc: Conceptual parent document
|
|
10
|
+
- rel-type: cites
|
|
11
|
+
doc-id: 22222222-2222-2222-2222-222222222222
|
|
12
|
+
rel-desc: External citation
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Relationships
|
|
16
|
+
|
|
17
|
+
This document references its parent[^p] and cites an external work[^c].
|
|
18
|
+
|
|
19
|
+
[^p]: {"rel-type": "parent", "doc-id": "11111111-1111-1111-1111-111111111111", "rel-desc": "Conceptual parent document"}
|
|
20
|
+
[^c]: {"rel-type": "cites", "doc-id": "22222222-2222-2222-2222-222222222222", "rel-desc": "External citation"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: depends-on-example
|
|
3
|
+
description: Source declaring runtime dependencies via metadata.mda.depends-on and capability declarations via metadata.mda.requires. Use as a fixture for §03-3 and §10.
|
|
4
|
+
metadata:
|
|
5
|
+
mda:
|
|
6
|
+
version: "1.2.0"
|
|
7
|
+
depends-on:
|
|
8
|
+
- name: pdf-tools
|
|
9
|
+
version-range: "^1.2.0"
|
|
10
|
+
digest: "sha256:a4f9c0d2e8b3a16e9c01b8f3d2a5c7b14e9f8a3d6c2b1e7f0a8d4c3b9e2f1a05"
|
|
11
|
+
- name: web-fetch
|
|
12
|
+
version-range: "1.0.3"
|
|
13
|
+
requires:
|
|
14
|
+
runtime: ["python>=3.11"]
|
|
15
|
+
tools: ["Read", "Bash(jq:*)"]
|
|
16
|
+
network: none
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Depends-on and requires
|
|
20
|
+
|
|
21
|
+
This document exercises the runtime-graph (`depends-on`) and capability-declaration (`requires`) MDA-extended fields.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: integrity-example
|
|
3
|
+
description: Source declaring an integrity field with a valid sha256 digest shape. The digest value here is illustrative; canonical-byte computation is exercised in compile fixtures.
|
|
4
|
+
integrity:
|
|
5
|
+
algorithm: sha256
|
|
6
|
+
digest: "sha256:a4f9c0d2e8b3a16e9c01b8f3d2a5c7b14e9f8a3d6c2b1e7f0a8d4c3b9e2f1a05"
|
|
7
|
+
metadata:
|
|
8
|
+
mda:
|
|
9
|
+
version: "1.0.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Integrity
|
|
13
|
+
|
|
14
|
+
This fixture asserts that the source schema accepts a top-level `integrity` field with the proper shape.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sigstore-signed-example
|
|
3
|
+
description: Source declaring an integrity anchor and a single Sigstore-OIDC signature. Signature bytes here are illustrative; cryptographic verification is exercised in the reference implementation.
|
|
4
|
+
integrity:
|
|
5
|
+
algorithm: sha256
|
|
6
|
+
digest: "sha256:a4f9c0d2e8b3a16e9c01b8f3d2a5c7b14e9f8a3d6c2b1e7f0a8d4c3b9e2f1a05"
|
|
7
|
+
signatures:
|
|
8
|
+
- signer: "sigstore-oidc:https://accounts.google.com"
|
|
9
|
+
key-id: "fulcio:9c4e7b2f1a05c3b9e2d6c2b1e7f0a8d4c3b9e2f1a05c3b9e2d6c2b1e7f0a8d4c"
|
|
10
|
+
payload-digest: "sha256:a4f9c0d2e8b3a16e9c01b8f3d2a5c7b14e9f8a3d6c2b1e7f0a8d4c3b9e2f1a05"
|
|
11
|
+
algorithm: ecdsa-p256
|
|
12
|
+
signature: "MEUCIQDkXILLUSTRATIVESIGNATUREBYTESFORFIXTUREPURPOSESONLY=="
|
|
13
|
+
rekor-log-id: "c0d23b6c4f200000000000000000000000000000000000000000000000000000"
|
|
14
|
+
rekor-log-index: 87654321
|
|
15
|
+
metadata:
|
|
16
|
+
mda:
|
|
17
|
+
version: "1.0.0"
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Sigstore-signed
|
|
21
|
+
|
|
22
|
+
This fixture asserts that the source schema accepts a top-level `signatures[]` array using the Sigstore OIDC default and that `payload-digest` matches `integrity.digest`.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: did-web-signed-example
|
|
3
|
+
description: Source declaring an integrity anchor and a single did:web signature for the air-gap signing path. Signature bytes here are illustrative.
|
|
4
|
+
integrity:
|
|
5
|
+
algorithm: sha256
|
|
6
|
+
digest: "sha256:a4f9c0d2e8b3a16e9c01b8f3d2a5c7b14e9f8a3d6c2b1e7f0a8d4c3b9e2f1a05"
|
|
7
|
+
signatures:
|
|
8
|
+
- signer: "did-web:tools.example.com"
|
|
9
|
+
key-id: "ed25519-9c4e7b"
|
|
10
|
+
payload-digest: "sha256:a4f9c0d2e8b3a16e9c01b8f3d2a5c7b14e9f8a3d6c2b1e7f0a8d4c3b9e2f1a05"
|
|
11
|
+
algorithm: ed25519
|
|
12
|
+
signature: "BASE64ILLUSTRATIVE=="
|
|
13
|
+
metadata:
|
|
14
|
+
mda:
|
|
15
|
+
version: "1.0.0"
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# did:web signed
|
|
19
|
+
|
|
20
|
+
This fixture asserts that the source schema accepts a `did-web:` signer with no Rekor coordinates required.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Agent instructions
|
|
2
|
+
|
|
3
|
+
This is a frontmatter-free `AGENTS.md` file. Per §06-targets/agents-md, frontmatter is OPTIONAL: a pure-Markdown AGENTS.md with a non-empty body is conformant.
|
|
4
|
+
|
|
5
|
+
## Conventions
|
|
6
|
+
|
|
7
|
+
- Use 2-space indentation.
|
|
8
|
+
- Run `pnpm test` before pushing.
|
|
9
|
+
- Keep PR titles under 70 characters.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Repository-wide agent instructions covering coding conventions, test discipline, and the deterministic vs judgment split.
|
|
3
|
+
metadata:
|
|
4
|
+
mda:
|
|
5
|
+
doc-id: 99999999-9999-9999-9999-999999999999
|
|
6
|
+
version: "1.0.0"
|
|
7
|
+
tags: [agents, conventions]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Agent instructions
|
|
11
|
+
|
|
12
|
+
This `AGENTS.md` carries optional frontmatter. The MDA-extended fields (`doc-id`, `version`, `tags`) live under `metadata.mda.*`.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bom-prefixed-skill
|
|
3
|
+
description: Frontmatter parses correctly when the file starts with a UTF-8 BOM. Use to validate §02-1.1 step 1 BOM stripping.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# BOM-prefixed source
|
|
7
|
+
|
|
8
|
+
This fixture begins with a UTF-8 BOM (0xEF 0xBB 0xBF) before the opening `---`. A conforming extractor strips the BOM in step 1 and proceeds normally; the frontmatter and body are otherwise standard.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: crlf-source
|
|
3
|
+
description: Frontmatter parses when the file uses CRLF line endings. Use to validate §02-1.1 step 3 line-ending normalization.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CRLF source
|
|
7
|
+
|
|
8
|
+
This fixture is encoded with CRLF (`\r\n`) line terminators throughout. A conforming extractor normalizes them to LF before applying the closing-fence scan.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: body-with-hr
|
|
3
|
+
description: Body containing Markdown `---` horizontal rules does not confuse the closing-fence scan. Use to validate §02-1.1 step 6.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Body with horizontal rules
|
|
7
|
+
|
|
8
|
+
The first `---` line below this paragraph is a Markdown horizontal rule, not a frontmatter close — the closing fence has already been consumed.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
This paragraph follows the first horizontal rule.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
And another rule. A naive backwards scan would mistake one of these for the closing frontmatter fence; §02-1.1 step 6 forbids that strategy.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"trustedSigners": [
|
|
4
|
+
{
|
|
5
|
+
"type": "sigstore-oidc",
|
|
6
|
+
"issuer": "https://token.actions.githubusercontent.com",
|
|
7
|
+
"subject": "repo:sno-ai/llmix:ref:refs/tags/v2.0.0"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"rekor": {
|
|
11
|
+
"url": "https://rekor.sigstore.dev"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trusted-runtime-sigstore-signed
|
|
3
|
+
description: Schema-valid Sigstore-signed source whose verified OIDC identity matches the runtime trust policy.
|
|
4
|
+
integrity:
|
|
5
|
+
algorithm: sha256
|
|
6
|
+
digest: "sha256:a4f9c0d2e8b3a16e9c01b8f3d2a5c7b14e9f8a3d6c2b1e7f0a8d4c3b9e2f1a05"
|
|
7
|
+
signatures:
|
|
8
|
+
- signer: "sigstore-oidc:https://accounts.google.com"
|
|
9
|
+
key-id: "fulcio:9c4e7b2f1a05c3b9e2d6c2b1e7f0a8d4c3b9e2f1a05c3b9e2d6c2b1e7f0a8d4c"
|
|
10
|
+
payload-digest: "sha256:a4f9c0d2e8b3a16e9c01b8f3d2a5c7b14e9f8a3d6c2b1e7f0a8d4c3b9e2f1a05"
|
|
11
|
+
algorithm: ecdsa-p256
|
|
12
|
+
signature: "MEUCIQDkXILLUSTRATIVESIGNATUREBYTESFORFIXTUREPURPOSESONLY=="
|
|
13
|
+
rekor-log-id: "c0d23b6c4f200000000000000000000000000000000000000000000000000000"
|
|
14
|
+
rekor-log-index: 87654321
|
|
15
|
+
metadata:
|
|
16
|
+
mda:
|
|
17
|
+
version: "1.0.0"
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Sigstore trusted runtime
|
|
21
|
+
|
|
22
|
+
The manifest supplies the verified OIDC issuer and subject that a real verifier
|
|
23
|
+
would derive from Rekor and Fulcio before applying the trust policy.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mda.sno.dev/spec/v1.0/schemas/_defs/depends-on.schema.json",
|
|
4
|
+
"title": "MDA depends-on entry",
|
|
5
|
+
"description": "One entry in metadata.mda.depends-on[]. Declares a runtime dependency on another MDA artifact. See spec §03-3.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["name", "version-range"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": { "$ref": "name.schema.json" },
|
|
10
|
+
"version-range": { "$ref": "version-range.schema.json" },
|
|
11
|
+
"digest": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Optional content digest pin in <algorithm>:<lowercase-hex> form. Hex length MUST match the algorithm. Resolved artifact's integrity.digest MUST match byte-for-byte.",
|
|
14
|
+
"pattern": "^(sha256:[0-9a-f]{64}|sha384:[0-9a-f]{96}|sha512:[0-9a-f]{128})$"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": false
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mda.sno.dev/spec/v1.0/schemas/_defs/description.schema.json",
|
|
4
|
+
"title": "MDA description string",
|
|
5
|
+
"description": "Non-empty short prose, ≤1024 chars. Should describe what the artifact does AND when to use it.",
|
|
6
|
+
"type": "string",
|
|
7
|
+
"minLength": 1,
|
|
8
|
+
"maxLength": 1024
|
|
9
|
+
}
|