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

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,233 @@
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. A reader of version 1 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]*$"
18
+ },
19
+ "timestamp": {
20
+ "type": "string",
21
+ "format": "date-time"
22
+ },
23
+ "header": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": [
27
+ "schema",
28
+ "version",
29
+ "repository"
30
+ ],
31
+ "properties": {
32
+ "schema": {
33
+ "const": "medicine-wheel/repository-capabilities"
34
+ },
35
+ "version": {
36
+ "type": "integer",
37
+ "minimum": 1,
38
+ "description": "1 for this schema. A reader of version 1 reads a higher one and skips what it does not know."
39
+ },
40
+ "repository": {
41
+ "type": "string",
42
+ "minLength": 1,
43
+ "maxLength": 200,
44
+ "description": "owner/name, as the repository was known when the file was written. A fork keeps it until someone adopts the file with --repository."
45
+ }
46
+ }
47
+ },
48
+ "row": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": [
52
+ "kind",
53
+ "name",
54
+ "address",
55
+ "status",
56
+ "statedBy",
57
+ "statedAt",
58
+ "grounding",
59
+ "revision"
60
+ ],
61
+ "properties": {
62
+ "kind": {
63
+ "enum": [
64
+ "package",
65
+ "cli",
66
+ "skill"
67
+ ]
68
+ },
69
+ "name": {
70
+ "allOf": [
71
+ {
72
+ "$ref": "#/$defs/printable"
73
+ },
74
+ {
75
+ "minLength": 1,
76
+ "maxLength": 214,
77
+ "pattern": "[A-Za-z0-9]"
78
+ }
79
+ ]
80
+ },
81
+ "address": {
82
+ "allOf": [
83
+ {
84
+ "$ref": "#/$defs/printable"
85
+ },
86
+ {
87
+ "maxLength": 600
88
+ }
89
+ ],
90
+ "description": "miadi-capability://<header repository>/<kind>/<name>. A reader computes it and warns when a row says otherwise."
91
+ },
92
+ "statement": {
93
+ "allOf": [
94
+ {
95
+ "$ref": "#/$defs/printable"
96
+ },
97
+ {
98
+ "minLength": 1,
99
+ "maxLength": 1200
100
+ }
101
+ ],
102
+ "description": "What the files, or a person, say it is: at most 55 words."
103
+ },
104
+ "status": {
105
+ "enum": [
106
+ "clear",
107
+ "unclear",
108
+ "needs-resolution",
109
+ "undefinable"
110
+ ]
111
+ },
112
+ "package": {
113
+ "allOf": [
114
+ {
115
+ "$ref": "#/$defs/printable"
116
+ },
117
+ {
118
+ "minLength": 1,
119
+ "maxLength": 214
120
+ }
121
+ ],
122
+ "description": "For a CLI: the package that ships it."
123
+ },
124
+ "realizes": {
125
+ "type": "array",
126
+ "minItems": 1,
127
+ "maxItems": 32,
128
+ "items": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "capability",
133
+ "statedBy",
134
+ "statedAt"
135
+ ],
136
+ "properties": {
137
+ "capability": {
138
+ "type": "string",
139
+ "pattern": "^capability:[a-z0-9]+(?:-[a-z0-9]+)*$"
140
+ },
141
+ "statedBy": {
142
+ "allOf": [
143
+ {
144
+ "$ref": "#/$defs/printable"
145
+ },
146
+ {
147
+ "minLength": 1,
148
+ "maxLength": 200,
149
+ "not": {
150
+ "const": "mw-repomap scan"
151
+ }
152
+ }
153
+ ]
154
+ },
155
+ "statedAt": {
156
+ "$ref": "#/$defs/timestamp"
157
+ }
158
+ }
159
+ },
160
+ "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."
161
+ },
162
+ "statedBy": {
163
+ "type": "string",
164
+ "minLength": 1,
165
+ "description": "\"mw-repomap scan\" for a row the scan wrote; any other name is a person's, and a rescan keeps its words."
166
+ },
167
+ "statedAt": {
168
+ "$ref": "#/$defs/timestamp"
169
+ },
170
+ "grounding": {
171
+ "type": "array",
172
+ "minItems": 1,
173
+ "items": {
174
+ "type": "string",
175
+ "minLength": 1
176
+ },
177
+ "description": "The files that say so, relative to the repository. A reader adds the commit it read: owner/name@commit:path."
178
+ },
179
+ "revision": {
180
+ "enum": [
181
+ "pending",
182
+ "revised",
183
+ "affirmed"
184
+ ]
185
+ },
186
+ "revisedBy": {
187
+ "type": "string",
188
+ "minLength": 1
189
+ },
190
+ "revisedAt": {
191
+ "$ref": "#/$defs/timestamp"
192
+ }
193
+ },
194
+ "allOf": [
195
+ {
196
+ "if": {
197
+ "properties": {
198
+ "status": {
199
+ "enum": [
200
+ "clear",
201
+ "unclear"
202
+ ]
203
+ }
204
+ }
205
+ },
206
+ "then": {
207
+ "required": [
208
+ "statement"
209
+ ]
210
+ }
211
+ },
212
+ {
213
+ "if": {
214
+ "properties": {
215
+ "revision": {
216
+ "enum": [
217
+ "revised",
218
+ "affirmed"
219
+ ]
220
+ }
221
+ }
222
+ },
223
+ "then": {
224
+ "required": [
225
+ "revisedBy",
226
+ "revisedAt"
227
+ ]
228
+ }
229
+ }
230
+ ]
231
+ }
232
+ }
233
+ }