@medicine-wheel/developer-repository-mapping 0.27.14 → 0.27.15

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.
@@ -0,0 +1,398 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://unpkg.com/@medicine-wheel/developer-repository-mapping/schema/repository-capabilities.v2.schema.json",
4
+ "title": "A repository's own capability file, .miadi/capabilities.jsonl, format version 2",
5
+ "description": "One JSON value per line (JSON Lines). The first line is the header; every other line is one capability the repository provides. This schema validates one line. It validates what a version 2 writer writes: version 2 adds what a capability achieves, its stage, its specifications and its issues, and a version 2 writer writes version 1 in the header when no row holds them. A reader reads a file of a later version and skips what it does not know; a writer refuses to rewrite it. The rule a statement keeps, at most 55 words, is checked by @medicine-wheel/capabilities, not here. Spec: rispecs/developer-suite/repository-mapping/capabilities.spec.md in jgwill/medicine-wheel.",
6
+ "oneOf": [
7
+ {
8
+ "$ref": "#/$defs/header"
9
+ },
10
+ {
11
+ "$ref": "#/$defs/row"
12
+ }
13
+ ],
14
+ "$defs": {
15
+ "printable": {
16
+ "type": "string",
17
+ "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f\\u061c\\u200e\\u200f\\u2028\\u2029\\u202a-\\u202e\\u2066-\\u2069]*$",
18
+ "description": "No control character, bidirectional control, or line or paragraph separator. Lengths are counted in code points."
19
+ },
20
+ "timestamp": {
21
+ "type": "string",
22
+ "format": "date-time",
23
+ "pattern": "T\\d{2}:\\d{2}:\\d{2}",
24
+ "description": "RFC 3339, with its seconds and its offset."
25
+ },
26
+ "header": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": [
30
+ "schema",
31
+ "version",
32
+ "repository"
33
+ ],
34
+ "properties": {
35
+ "schema": {
36
+ "const": "medicine-wheel/repository-capabilities"
37
+ },
38
+ "version": {
39
+ "enum": [
40
+ 1,
41
+ 2
42
+ ],
43
+ "description": "2 when a row holds achieves, stage, specifications or issues, else 1, so a file that uses none of them stays what a version 1 writer wrote. A reader of version 1 reads a version 2 file and skips what it does not know (capabilities.spec.md); a writer of version 1 refuses to rewrite it."
44
+ },
45
+ "repository": {
46
+ "type": "string",
47
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}/(?![^/]*\\.git$)[A-Za-z0-9][A-Za-z0-9._-]{0,99}$",
48
+ "description": "owner/name, as an address names it, as the repository was known when the file was written. A fork keeps it until someone adopts the file with --repository."
49
+ }
50
+ }
51
+ },
52
+ "row": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": [
56
+ "kind",
57
+ "name",
58
+ "address",
59
+ "status",
60
+ "statedBy",
61
+ "statedAt",
62
+ "grounding",
63
+ "revision"
64
+ ],
65
+ "properties": {
66
+ "kind": {
67
+ "enum": [
68
+ "package",
69
+ "cli",
70
+ "skill",
71
+ "decision"
72
+ ]
73
+ },
74
+ "name": {
75
+ "allOf": [
76
+ {
77
+ "$ref": "#/$defs/printable"
78
+ },
79
+ {
80
+ "minLength": 1,
81
+ "maxLength": 214,
82
+ "pattern": "[A-Za-z0-9]"
83
+ }
84
+ ]
85
+ },
86
+ "address": {
87
+ "allOf": [
88
+ {
89
+ "$ref": "#/$defs/printable"
90
+ },
91
+ {
92
+ "minLength": 1,
93
+ "maxLength": 600
94
+ }
95
+ ],
96
+ "description": "miadi-capability://<header repository>/<kind>/<name>. A reader computes it and warns when a row says otherwise."
97
+ },
98
+ "statement": {
99
+ "allOf": [
100
+ {
101
+ "$ref": "#/$defs/printable"
102
+ },
103
+ {
104
+ "minLength": 1,
105
+ "maxLength": 1200
106
+ }
107
+ ],
108
+ "description": "What the files, or a person, say it is: at most 55 words."
109
+ },
110
+ "status": {
111
+ "enum": [
112
+ "clear",
113
+ "unclear",
114
+ "needs-resolution",
115
+ "undefinable"
116
+ ]
117
+ },
118
+ "package": {
119
+ "allOf": [
120
+ {
121
+ "$ref": "#/$defs/printable"
122
+ },
123
+ {
124
+ "minLength": 1,
125
+ "maxLength": 214
126
+ }
127
+ ],
128
+ "description": "For a CLI: the package that ships it."
129
+ },
130
+ "realizes": {
131
+ "type": "array",
132
+ "minItems": 1,
133
+ "maxItems": 32,
134
+ "items": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": [
138
+ "capability",
139
+ "statedBy",
140
+ "statedAt"
141
+ ],
142
+ "properties": {
143
+ "capability": {
144
+ "type": "string",
145
+ "pattern": "^capability:[a-z0-9]+(?:-[a-z0-9]+)*$"
146
+ },
147
+ "statedBy": {
148
+ "allOf": [
149
+ {
150
+ "$ref": "#/$defs/printable"
151
+ },
152
+ {
153
+ "minLength": 1,
154
+ "maxLength": 200,
155
+ "not": {
156
+ "const": "mw-repomap scan"
157
+ }
158
+ }
159
+ ]
160
+ },
161
+ "statedAt": {
162
+ "$ref": "#/$defs/timestamp"
163
+ }
164
+ }
165
+ },
166
+ "description": "The platform capabilities this one serves (capabilities.spec.md), each with who said so and when. Said by a person or an agent, never by the scan, and kept by every rescan."
167
+ },
168
+ "achieves": {
169
+ "type": "object",
170
+ "additionalProperties": false,
171
+ "required": [
172
+ "statement",
173
+ "statedBy",
174
+ "statedAt"
175
+ ],
176
+ "description": "Version 2. What the capability achieves for someone, at most 55 words, and who said it. Kept through every rescan.",
177
+ "properties": {
178
+ "statement": {
179
+ "allOf": [
180
+ {
181
+ "$ref": "#/$defs/printable"
182
+ },
183
+ {
184
+ "minLength": 1,
185
+ "maxLength": 1200
186
+ }
187
+ ]
188
+ },
189
+ "statedBy": {
190
+ "allOf": [
191
+ {
192
+ "$ref": "#/$defs/printable"
193
+ },
194
+ {
195
+ "minLength": 1,
196
+ "maxLength": 200,
197
+ "not": {
198
+ "const": "mw-repomap scan"
199
+ }
200
+ }
201
+ ],
202
+ "description": "A person or an agent: what a capability achieves is never the scan's to say."
203
+ },
204
+ "statedAt": {
205
+ "$ref": "#/$defs/timestamp"
206
+ }
207
+ }
208
+ },
209
+ "stage": {
210
+ "type": "object",
211
+ "additionalProperties": false,
212
+ "required": [
213
+ "stage",
214
+ "statedBy",
215
+ "statedAt",
216
+ "grounding"
217
+ ],
218
+ "description": "Version 2. Where the capability stands in its life, who said so, when, and from what. A reader reads a row at stage specified or retired even when the commit provides no such thing. Kept through every rescan.",
219
+ "properties": {
220
+ "stage": {
221
+ "enum": [
222
+ "specified",
223
+ "prototype",
224
+ "implementation",
225
+ "released",
226
+ "retired"
227
+ ]
228
+ },
229
+ "statedBy": {
230
+ "allOf": [
231
+ {
232
+ "$ref": "#/$defs/printable"
233
+ },
234
+ {
235
+ "minLength": 1,
236
+ "maxLength": 200,
237
+ "not": {
238
+ "const": "mw-repomap scan"
239
+ }
240
+ }
241
+ ],
242
+ "description": "A person or an agent: where a capability stands is never the scan's to say."
243
+ },
244
+ "statedAt": {
245
+ "$ref": "#/$defs/timestamp"
246
+ },
247
+ "grounding": {
248
+ "type": "array",
249
+ "minItems": 1,
250
+ "maxItems": 32,
251
+ "items": {
252
+ "allOf": [
253
+ {
254
+ "$ref": "#/$defs/printable"
255
+ },
256
+ {
257
+ "minLength": 1,
258
+ "maxLength": 1024
259
+ }
260
+ ]
261
+ },
262
+ "description": "What shows the stage: a specification, a commit, npm:<package>@<version>, owner/repo#n."
263
+ }
264
+ }
265
+ },
266
+ "specifications": {
267
+ "type": "array",
268
+ "minItems": 1,
269
+ "maxItems": 32,
270
+ "description": "Version 2. Its specifications: a path in this repository (a reader opens it as rise://<owner>/<name>/<path>), a rise:// address, or an https:// URL. Kept through every rescan.",
271
+ "items": {
272
+ "allOf": [
273
+ {
274
+ "$ref": "#/$defs/printable"
275
+ },
276
+ {
277
+ "minLength": 1,
278
+ "maxLength": 1024
279
+ },
280
+ {
281
+ "anyOf": [
282
+ {
283
+ "pattern": "^rise://[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*/\\S+$"
284
+ },
285
+ {
286
+ "pattern": "^https://\\S+$"
287
+ },
288
+ {
289
+ "pattern": "^(?![A-Za-z][A-Za-z0-9+.-]*:)(?!/)(?!(?:.*/)?\\.\\.(?:/|$))\\S+$"
290
+ }
291
+ ]
292
+ }
293
+ ]
294
+ }
295
+ },
296
+ "issues": {
297
+ "type": "array",
298
+ "minItems": 1,
299
+ "maxItems": 32,
300
+ "description": "Version 2. The issues that track it, owner/repo#n. Kept through every rescan.",
301
+ "items": {
302
+ "type": "string",
303
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*#[1-9][0-9]*$"
304
+ }
305
+ },
306
+ "statedBy": {
307
+ "allOf": [
308
+ {
309
+ "$ref": "#/$defs/printable"
310
+ },
311
+ {
312
+ "minLength": 1,
313
+ "maxLength": 200
314
+ }
315
+ ],
316
+ "description": "\"mw-repomap scan\" for a row the scan wrote; any other name is a person's, and a rescan keeps its words."
317
+ },
318
+ "statedAt": {
319
+ "$ref": "#/$defs/timestamp"
320
+ },
321
+ "grounding": {
322
+ "type": "array",
323
+ "minItems": 1,
324
+ "items": {
325
+ "allOf": [
326
+ {
327
+ "$ref": "#/$defs/printable"
328
+ },
329
+ {
330
+ "minLength": 1,
331
+ "maxLength": 1024
332
+ }
333
+ ]
334
+ },
335
+ "description": "The files that say so, relative to the repository. A reader adds the commit it read: owner/name@commit:path."
336
+ },
337
+ "revision": {
338
+ "enum": [
339
+ "pending",
340
+ "revised",
341
+ "affirmed"
342
+ ]
343
+ },
344
+ "revisedBy": {
345
+ "allOf": [
346
+ {
347
+ "$ref": "#/$defs/printable"
348
+ },
349
+ {
350
+ "minLength": 1,
351
+ "maxLength": 200
352
+ }
353
+ ]
354
+ },
355
+ "revisedAt": {
356
+ "$ref": "#/$defs/timestamp"
357
+ }
358
+ },
359
+ "allOf": [
360
+ {
361
+ "if": {
362
+ "properties": {
363
+ "status": {
364
+ "enum": [
365
+ "clear",
366
+ "unclear"
367
+ ]
368
+ }
369
+ }
370
+ },
371
+ "then": {
372
+ "required": [
373
+ "statement"
374
+ ]
375
+ }
376
+ },
377
+ {
378
+ "if": {
379
+ "properties": {
380
+ "revision": {
381
+ "enum": [
382
+ "revised",
383
+ "affirmed"
384
+ ]
385
+ }
386
+ }
387
+ },
388
+ "then": {
389
+ "required": [
390
+ "revisedBy",
391
+ "revisedAt"
392
+ ]
393
+ }
394
+ }
395
+ ]
396
+ }
397
+ }
398
+ }