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

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,514 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://unpkg.com/@medicine-wheel/developer-repository-mapping/schema/repository-capabilities.v3.schema.json",
4
+ "title": "A repository's own capability file, .miadi/capabilities.jsonl, format version 3",
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 3 writer writes: version 2 adds what a capability achieves, its stage, its specifications and its issues; version 3 adds the app kind, where a capability is hosted and the episodes that hold it (jgwill/medicine-wheel#177). A writer puts the lowest version its rows need in the header. 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
+ 3
43
+ ],
44
+ "description": "3 when a row is an app or holds hosting or episodes; else 2 when a row holds achieves, stage, specifications or issues; else 1. A file that uses none of them stays what an older writer wrote. A reader of an older version reads a newer file and skips what it does not know (capabilities.spec.md); a writer of an older version refuses to rewrite it."
45
+ },
46
+ "repository": {
47
+ "type": "string",
48
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}/(?![^/]*\\.git$)[A-Za-z0-9][A-Za-z0-9._-]{0,99}$",
49
+ "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."
50
+ }
51
+ }
52
+ },
53
+ "row": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": [
57
+ "kind",
58
+ "name",
59
+ "address",
60
+ "status",
61
+ "statedBy",
62
+ "statedAt",
63
+ "grounding",
64
+ "revision"
65
+ ],
66
+ "properties": {
67
+ "kind": {
68
+ "enum": [
69
+ "package",
70
+ "cli",
71
+ "skill",
72
+ "decision",
73
+ "app"
74
+ ],
75
+ "description": "app (version 3): an application a person opens or a service calls, named by the package.json in a folder a person names; its grounding holds that package.json."
76
+ },
77
+ "name": {
78
+ "allOf": [
79
+ {
80
+ "$ref": "#/$defs/printable"
81
+ },
82
+ {
83
+ "minLength": 1,
84
+ "maxLength": 214,
85
+ "pattern": "[A-Za-z0-9]"
86
+ }
87
+ ]
88
+ },
89
+ "address": {
90
+ "allOf": [
91
+ {
92
+ "$ref": "#/$defs/printable"
93
+ },
94
+ {
95
+ "minLength": 1,
96
+ "maxLength": 600
97
+ }
98
+ ],
99
+ "description": "miadi-capability://<header repository>/<kind>/<name>. A reader computes it and warns when a row says otherwise."
100
+ },
101
+ "statement": {
102
+ "allOf": [
103
+ {
104
+ "$ref": "#/$defs/printable"
105
+ },
106
+ {
107
+ "minLength": 1,
108
+ "maxLength": 1200
109
+ }
110
+ ],
111
+ "description": "What the files, or a person, say it is: at most 55 words."
112
+ },
113
+ "status": {
114
+ "enum": [
115
+ "clear",
116
+ "unclear",
117
+ "needs-resolution",
118
+ "undefinable"
119
+ ]
120
+ },
121
+ "package": {
122
+ "allOf": [
123
+ {
124
+ "$ref": "#/$defs/printable"
125
+ },
126
+ {
127
+ "minLength": 1,
128
+ "maxLength": 214
129
+ }
130
+ ],
131
+ "description": "For a CLI: the package that ships it."
132
+ },
133
+ "realizes": {
134
+ "type": "array",
135
+ "minItems": 1,
136
+ "maxItems": 32,
137
+ "items": {
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": [
141
+ "capability",
142
+ "statedBy",
143
+ "statedAt"
144
+ ],
145
+ "properties": {
146
+ "capability": {
147
+ "type": "string",
148
+ "pattern": "^capability:[a-z0-9]+(?:-[a-z0-9]+)*$"
149
+ },
150
+ "statedBy": {
151
+ "allOf": [
152
+ {
153
+ "$ref": "#/$defs/printable"
154
+ },
155
+ {
156
+ "minLength": 1,
157
+ "maxLength": 200,
158
+ "not": {
159
+ "const": "mw-repomap scan"
160
+ }
161
+ }
162
+ ]
163
+ },
164
+ "statedAt": {
165
+ "$ref": "#/$defs/timestamp"
166
+ }
167
+ }
168
+ },
169
+ "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."
170
+ },
171
+ "achieves": {
172
+ "type": "object",
173
+ "additionalProperties": false,
174
+ "required": [
175
+ "statement",
176
+ "statedBy",
177
+ "statedAt"
178
+ ],
179
+ "description": "Version 2. What the capability achieves for someone, at most 55 words, and who said it. Kept through every rescan.",
180
+ "properties": {
181
+ "statement": {
182
+ "allOf": [
183
+ {
184
+ "$ref": "#/$defs/printable"
185
+ },
186
+ {
187
+ "minLength": 1,
188
+ "maxLength": 1200
189
+ }
190
+ ]
191
+ },
192
+ "statedBy": {
193
+ "allOf": [
194
+ {
195
+ "$ref": "#/$defs/printable"
196
+ },
197
+ {
198
+ "minLength": 1,
199
+ "maxLength": 200,
200
+ "not": {
201
+ "const": "mw-repomap scan"
202
+ }
203
+ }
204
+ ],
205
+ "description": "A person or an agent: what a capability achieves is never the scan's to say."
206
+ },
207
+ "statedAt": {
208
+ "$ref": "#/$defs/timestamp"
209
+ }
210
+ }
211
+ },
212
+ "stage": {
213
+ "type": "object",
214
+ "additionalProperties": false,
215
+ "required": [
216
+ "stage",
217
+ "statedBy",
218
+ "statedAt",
219
+ "grounding"
220
+ ],
221
+ "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.",
222
+ "properties": {
223
+ "stage": {
224
+ "enum": [
225
+ "specified",
226
+ "prototype",
227
+ "implementation",
228
+ "released",
229
+ "retired"
230
+ ]
231
+ },
232
+ "statedBy": {
233
+ "allOf": [
234
+ {
235
+ "$ref": "#/$defs/printable"
236
+ },
237
+ {
238
+ "minLength": 1,
239
+ "maxLength": 200,
240
+ "not": {
241
+ "const": "mw-repomap scan"
242
+ }
243
+ }
244
+ ],
245
+ "description": "A person or an agent: where a capability stands is never the scan's to say."
246
+ },
247
+ "statedAt": {
248
+ "$ref": "#/$defs/timestamp"
249
+ },
250
+ "grounding": {
251
+ "type": "array",
252
+ "minItems": 1,
253
+ "maxItems": 32,
254
+ "items": {
255
+ "allOf": [
256
+ {
257
+ "$ref": "#/$defs/printable"
258
+ },
259
+ {
260
+ "minLength": 1,
261
+ "maxLength": 1024
262
+ }
263
+ ]
264
+ },
265
+ "description": "What shows the stage: a specification, a commit, npm:<package>@<version>, owner/repo#n."
266
+ }
267
+ }
268
+ },
269
+ "specifications": {
270
+ "type": "array",
271
+ "minItems": 1,
272
+ "maxItems": 32,
273
+ "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.",
274
+ "items": {
275
+ "allOf": [
276
+ {
277
+ "$ref": "#/$defs/printable"
278
+ },
279
+ {
280
+ "minLength": 1,
281
+ "maxLength": 1024
282
+ },
283
+ {
284
+ "anyOf": [
285
+ {
286
+ "pattern": "^rise://[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*/\\S+$"
287
+ },
288
+ {
289
+ "pattern": "^https://\\S+$"
290
+ },
291
+ {
292
+ "pattern": "^(?![A-Za-z][A-Za-z0-9+.-]*:)(?!/)(?!(?:.*/)?\\.\\.(?:/|$))\\S+$"
293
+ }
294
+ ]
295
+ }
296
+ ]
297
+ }
298
+ },
299
+ "issues": {
300
+ "type": "array",
301
+ "minItems": 1,
302
+ "maxItems": 32,
303
+ "description": "Version 2. The issues that track it, owner/repo#n. Kept through every rescan.",
304
+ "items": {
305
+ "type": "string",
306
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*#[1-9][0-9]*$"
307
+ }
308
+ },
309
+ "hosting": {
310
+ "type": "object",
311
+ "additionalProperties": false,
312
+ "required": [
313
+ "deployedBy",
314
+ "statedBy",
315
+ "statedAt",
316
+ "grounding"
317
+ ],
318
+ "description": "Version 3. Where the capability runs, who deploys it, where its code is written when not in this repository, and how a change reaches it, with who said so, when and from what. Kept through every rescan.",
319
+ "properties": {
320
+ "urls": {
321
+ "type": "array",
322
+ "minItems": 1,
323
+ "maxItems": 8,
324
+ "description": "Where people open it or services call it.",
325
+ "items": {
326
+ "allOf": [
327
+ {
328
+ "$ref": "#/$defs/printable"
329
+ },
330
+ {
331
+ "minLength": 1,
332
+ "maxLength": 1024
333
+ },
334
+ {
335
+ "pattern": "^https?://\\S+$"
336
+ }
337
+ ]
338
+ }
339
+ },
340
+ "deployedBy": {
341
+ "allOf": [
342
+ {
343
+ "$ref": "#/$defs/printable"
344
+ },
345
+ {
346
+ "minLength": 1,
347
+ "maxLength": 200
348
+ }
349
+ ],
350
+ "description": "Who or what deploys it: 'v0, on Vercel', 'npm publish from this repository'."
351
+ },
352
+ "authoredIn": {
353
+ "allOf": [
354
+ {
355
+ "$ref": "#/$defs/printable"
356
+ },
357
+ {
358
+ "minLength": 1,
359
+ "maxLength": 200
360
+ }
361
+ ],
362
+ "description": "Where its code is written when that is not this repository: the copy here is replaced at the next import."
363
+ },
364
+ "change": {
365
+ "allOf": [
366
+ {
367
+ "$ref": "#/$defs/printable"
368
+ },
369
+ {
370
+ "minLength": 1,
371
+ "maxLength": 1200
372
+ }
373
+ ],
374
+ "description": "How a change reaches it: at most 55 words."
375
+ },
376
+ "statedBy": {
377
+ "allOf": [
378
+ {
379
+ "$ref": "#/$defs/printable"
380
+ },
381
+ {
382
+ "minLength": 1,
383
+ "maxLength": 200,
384
+ "not": {
385
+ "const": "mw-repomap scan"
386
+ }
387
+ }
388
+ ],
389
+ "description": "A person or an agent: where a capability is hosted is never the scan's to say."
390
+ },
391
+ "statedAt": {
392
+ "$ref": "#/$defs/timestamp"
393
+ },
394
+ "grounding": {
395
+ "type": "array",
396
+ "minItems": 1,
397
+ "maxItems": 32,
398
+ "items": {
399
+ "allOf": [
400
+ {
401
+ "$ref": "#/$defs/printable"
402
+ },
403
+ {
404
+ "minLength": 1,
405
+ "maxLength": 1024
406
+ }
407
+ ]
408
+ }
409
+ }
410
+ }
411
+ },
412
+ "episodes": {
413
+ "type": "array",
414
+ "minItems": 1,
415
+ "maxItems": 32,
416
+ "description": "Version 3. The chronicle episodes that hold it, miadi-chronicle://<n>. Kept through every rescan.",
417
+ "items": {
418
+ "type": "string",
419
+ "pattern": "^miadi-chronicle:(?://)?[A-Za-z0-9][A-Za-z0-9._-]{0,199}$"
420
+ }
421
+ },
422
+ "statedBy": {
423
+ "allOf": [
424
+ {
425
+ "$ref": "#/$defs/printable"
426
+ },
427
+ {
428
+ "minLength": 1,
429
+ "maxLength": 200
430
+ }
431
+ ],
432
+ "description": "\"mw-repomap scan\" for a row the scan wrote; any other name is a person's, and a rescan keeps its words."
433
+ },
434
+ "statedAt": {
435
+ "$ref": "#/$defs/timestamp"
436
+ },
437
+ "grounding": {
438
+ "type": "array",
439
+ "minItems": 1,
440
+ "items": {
441
+ "allOf": [
442
+ {
443
+ "$ref": "#/$defs/printable"
444
+ },
445
+ {
446
+ "minLength": 1,
447
+ "maxLength": 1024
448
+ }
449
+ ]
450
+ },
451
+ "description": "The files that say so, relative to the repository. A reader adds the commit it read: owner/name@commit:path."
452
+ },
453
+ "revision": {
454
+ "enum": [
455
+ "pending",
456
+ "revised",
457
+ "affirmed"
458
+ ]
459
+ },
460
+ "revisedBy": {
461
+ "allOf": [
462
+ {
463
+ "$ref": "#/$defs/printable"
464
+ },
465
+ {
466
+ "minLength": 1,
467
+ "maxLength": 200
468
+ }
469
+ ]
470
+ },
471
+ "revisedAt": {
472
+ "$ref": "#/$defs/timestamp"
473
+ }
474
+ },
475
+ "allOf": [
476
+ {
477
+ "if": {
478
+ "properties": {
479
+ "status": {
480
+ "enum": [
481
+ "clear",
482
+ "unclear"
483
+ ]
484
+ }
485
+ }
486
+ },
487
+ "then": {
488
+ "required": [
489
+ "statement"
490
+ ]
491
+ }
492
+ },
493
+ {
494
+ "if": {
495
+ "properties": {
496
+ "revision": {
497
+ "enum": [
498
+ "revised",
499
+ "affirmed"
500
+ ]
501
+ }
502
+ }
503
+ },
504
+ "then": {
505
+ "required": [
506
+ "revisedBy",
507
+ "revisedAt"
508
+ ]
509
+ }
510
+ }
511
+ ]
512
+ }
513
+ }
514
+ }