@medicine-wheel/developer-repository-mapping 0.27.10 → 0.27.12

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,256 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://unpkg.com/@medicine-wheel/developer-repository-mapping/schema/repository-capabilities.v1.schema.json",
4
+ "title": "A repository's own capability file, .miadi/capabilities.jsonl, format version 1",
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 1 writer writes. A reader of version 1 also reads a file of a later version and skips what it does not know; a writer of version 1 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
+ "const": 1,
40
+ "description": "This schema validates version 1, what a version 1 writer writes. A reader of version 1 also reads a later version and skips what it does not know (capabilities.spec.md); a writer of version 1 refuses to rewrite it."
41
+ },
42
+ "repository": {
43
+ "type": "string",
44
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}/(?![^/]*\\.git$)[A-Za-z0-9][A-Za-z0-9._-]{0,99}$",
45
+ "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."
46
+ }
47
+ }
48
+ },
49
+ "row": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": [
53
+ "kind",
54
+ "name",
55
+ "address",
56
+ "status",
57
+ "statedBy",
58
+ "statedAt",
59
+ "grounding",
60
+ "revision"
61
+ ],
62
+ "properties": {
63
+ "kind": {
64
+ "enum": [
65
+ "package",
66
+ "cli",
67
+ "skill"
68
+ ]
69
+ },
70
+ "name": {
71
+ "allOf": [
72
+ {
73
+ "$ref": "#/$defs/printable"
74
+ },
75
+ {
76
+ "minLength": 1,
77
+ "maxLength": 214,
78
+ "pattern": "[A-Za-z0-9]"
79
+ }
80
+ ]
81
+ },
82
+ "address": {
83
+ "allOf": [
84
+ {
85
+ "$ref": "#/$defs/printable"
86
+ },
87
+ {
88
+ "minLength": 1,
89
+ "maxLength": 600
90
+ }
91
+ ],
92
+ "description": "miadi-capability://<header repository>/<kind>/<name>. A reader computes it and warns when a row says otherwise."
93
+ },
94
+ "statement": {
95
+ "allOf": [
96
+ {
97
+ "$ref": "#/$defs/printable"
98
+ },
99
+ {
100
+ "minLength": 1,
101
+ "maxLength": 1200
102
+ }
103
+ ],
104
+ "description": "What the files, or a person, say it is: at most 55 words."
105
+ },
106
+ "status": {
107
+ "enum": [
108
+ "clear",
109
+ "unclear",
110
+ "needs-resolution",
111
+ "undefinable"
112
+ ]
113
+ },
114
+ "package": {
115
+ "allOf": [
116
+ {
117
+ "$ref": "#/$defs/printable"
118
+ },
119
+ {
120
+ "minLength": 1,
121
+ "maxLength": 214
122
+ }
123
+ ],
124
+ "description": "For a CLI: the package that ships it."
125
+ },
126
+ "realizes": {
127
+ "type": "array",
128
+ "minItems": 1,
129
+ "maxItems": 32,
130
+ "items": {
131
+ "type": "object",
132
+ "additionalProperties": false,
133
+ "required": [
134
+ "capability",
135
+ "statedBy",
136
+ "statedAt"
137
+ ],
138
+ "properties": {
139
+ "capability": {
140
+ "type": "string",
141
+ "pattern": "^capability:[a-z0-9]+(?:-[a-z0-9]+)*$"
142
+ },
143
+ "statedBy": {
144
+ "allOf": [
145
+ {
146
+ "$ref": "#/$defs/printable"
147
+ },
148
+ {
149
+ "minLength": 1,
150
+ "maxLength": 200,
151
+ "not": {
152
+ "const": "mw-repomap scan"
153
+ }
154
+ }
155
+ ]
156
+ },
157
+ "statedAt": {
158
+ "$ref": "#/$defs/timestamp"
159
+ }
160
+ }
161
+ },
162
+ "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."
163
+ },
164
+ "statedBy": {
165
+ "allOf": [
166
+ {
167
+ "$ref": "#/$defs/printable"
168
+ },
169
+ {
170
+ "minLength": 1,
171
+ "maxLength": 200
172
+ }
173
+ ],
174
+ "description": "\"mw-repomap scan\" for a row the scan wrote; any other name is a person's, and a rescan keeps its words."
175
+ },
176
+ "statedAt": {
177
+ "$ref": "#/$defs/timestamp"
178
+ },
179
+ "grounding": {
180
+ "type": "array",
181
+ "minItems": 1,
182
+ "items": {
183
+ "allOf": [
184
+ {
185
+ "$ref": "#/$defs/printable"
186
+ },
187
+ {
188
+ "minLength": 1,
189
+ "maxLength": 1024
190
+ }
191
+ ]
192
+ },
193
+ "description": "The files that say so, relative to the repository. A reader adds the commit it read: owner/name@commit:path."
194
+ },
195
+ "revision": {
196
+ "enum": [
197
+ "pending",
198
+ "revised",
199
+ "affirmed"
200
+ ]
201
+ },
202
+ "revisedBy": {
203
+ "allOf": [
204
+ {
205
+ "$ref": "#/$defs/printable"
206
+ },
207
+ {
208
+ "minLength": 1,
209
+ "maxLength": 200
210
+ }
211
+ ]
212
+ },
213
+ "revisedAt": {
214
+ "$ref": "#/$defs/timestamp"
215
+ }
216
+ },
217
+ "allOf": [
218
+ {
219
+ "if": {
220
+ "properties": {
221
+ "status": {
222
+ "enum": [
223
+ "clear",
224
+ "unclear"
225
+ ]
226
+ }
227
+ }
228
+ },
229
+ "then": {
230
+ "required": [
231
+ "statement"
232
+ ]
233
+ }
234
+ },
235
+ {
236
+ "if": {
237
+ "properties": {
238
+ "revision": {
239
+ "enum": [
240
+ "revised",
241
+ "affirmed"
242
+ ]
243
+ }
244
+ }
245
+ },
246
+ "then": {
247
+ "required": [
248
+ "revisedBy",
249
+ "revisedAt"
250
+ ]
251
+ }
252
+ }
253
+ ]
254
+ }
255
+ }
256
+ }