@openplanr/protocol 0.18.0 → 0.19.0

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,357 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.25.0/command-catalog.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "command-catalog",
6
+ "version": "1.25.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "required": [
11
+ "kind",
12
+ "schemaVersion",
13
+ "protocolVersion",
14
+ "documentVersion",
15
+ "digestAlgorithm",
16
+ "canonicalization",
17
+ "binaries",
18
+ "inventory",
19
+ "commands",
20
+ "negativeContracts"
21
+ ],
22
+ "properties": {
23
+ "kind": {
24
+ "const": "command-catalog"
25
+ },
26
+ "schemaVersion": {
27
+ "const": "1.0.0"
28
+ },
29
+ "protocolVersion": {
30
+ "const": "1.25.0"
31
+ },
32
+ "documentVersion": {
33
+ "$ref": "#/$defs/semver"
34
+ },
35
+ "digestAlgorithm": {
36
+ "const": "sha256"
37
+ },
38
+ "canonicalization": {
39
+ "const": "rfc8785"
40
+ },
41
+ "binaries": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": [
47
+ "id",
48
+ "lifecycle",
49
+ "aliasOf"
50
+ ],
51
+ "properties": {
52
+ "id": {
53
+ "$ref": "#/$defs/identifier"
54
+ },
55
+ "lifecycle": {
56
+ "enum": [
57
+ "canonical",
58
+ "exact-alias",
59
+ "deprecated-exact-alias"
60
+ ]
61
+ },
62
+ "aliasOf": {
63
+ "anyOf": [
64
+ {
65
+ "type": "string",
66
+ "pattern": "^[a-z][a-z0-9-]*$"
67
+ },
68
+ {
69
+ "type": "null"
70
+ }
71
+ ]
72
+ }
73
+ }
74
+ },
75
+ "minItems": 3,
76
+ "maxItems": 3
77
+ },
78
+ "inventory": {
79
+ "type": "object",
80
+ "additionalProperties": false,
81
+ "required": [
82
+ "rootCommandModules",
83
+ "rootCommandSlugs",
84
+ "pipelineMachineLeaves",
85
+ "pipelineMachineGrammar",
86
+ "frozenClaudeDocuments",
87
+ "frozenClaudeSlugs"
88
+ ],
89
+ "properties": {
90
+ "rootCommandModules": {
91
+ "const": 39
92
+ },
93
+ "rootCommandSlugs": {
94
+ "type": "array",
95
+ "items": {
96
+ "$ref": "#/$defs/identifier"
97
+ },
98
+ "minItems": 39,
99
+ "maxItems": 39,
100
+ "uniqueItems": true
101
+ },
102
+ "pipelineMachineLeaves": {
103
+ "const": 31
104
+ },
105
+ "pipelineMachineGrammar": {
106
+ "type": "array",
107
+ "items": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "maxLength": 128
113
+ },
114
+ "minItems": 1,
115
+ "maxItems": 8
116
+ },
117
+ "minItems": 31,
118
+ "maxItems": 31
119
+ },
120
+ "frozenClaudeDocuments": {
121
+ "const": 8
122
+ },
123
+ "frozenClaudeSlugs": {
124
+ "type": "array",
125
+ "items": {
126
+ "$ref": "#/$defs/identifier"
127
+ },
128
+ "minItems": 8,
129
+ "maxItems": 8,
130
+ "uniqueItems": true
131
+ }
132
+ }
133
+ },
134
+ "commands": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": [
140
+ "commandId",
141
+ "surface",
142
+ "argv",
143
+ "lifecycle",
144
+ "ownerPackage",
145
+ "source",
146
+ "authorityClass",
147
+ "machineJson",
148
+ "outputContracts",
149
+ "skillId",
150
+ "aliases",
151
+ "testRefs"
152
+ ],
153
+ "properties": {
154
+ "commandId": {
155
+ "$ref": "#/$defs/identifier"
156
+ },
157
+ "surface": {
158
+ "enum": [
159
+ "cli-root",
160
+ "cli-leaf",
161
+ "pipeline-machine",
162
+ "frozen-host-alias"
163
+ ]
164
+ },
165
+ "argv": {
166
+ "type": "array",
167
+ "items": {
168
+ "type": "string",
169
+ "minLength": 1,
170
+ "maxLength": 128
171
+ },
172
+ "minItems": 1,
173
+ "maxItems": 16
174
+ },
175
+ "lifecycle": {
176
+ "enum": [
177
+ "active",
178
+ "compatibility-alias",
179
+ "deprecated"
180
+ ]
181
+ },
182
+ "ownerPackage": {
183
+ "$ref": "#/$defs/nonBlankText"
184
+ },
185
+ "source": {
186
+ "$ref": "#/$defs/sourceRef"
187
+ },
188
+ "authorityClass": {
189
+ "$ref": "#/$defs/identifier"
190
+ },
191
+ "machineJson": {
192
+ "type": "boolean"
193
+ },
194
+ "outputContracts": {
195
+ "type": "array",
196
+ "items": {
197
+ "$ref": "#/$defs/contractRef"
198
+ },
199
+ "minItems": 0,
200
+ "maxItems": 32
201
+ },
202
+ "skillId": {
203
+ "anyOf": [
204
+ {
205
+ "$ref": "#/$defs/skillId"
206
+ },
207
+ {
208
+ "type": "null"
209
+ }
210
+ ]
211
+ },
212
+ "aliases": {
213
+ "type": "array",
214
+ "items": {
215
+ "type": "array",
216
+ "items": {
217
+ "type": "string",
218
+ "minLength": 1
219
+ },
220
+ "minItems": 1,
221
+ "maxItems": 16
222
+ },
223
+ "minItems": 0,
224
+ "maxItems": 32
225
+ },
226
+ "testRefs": {
227
+ "type": "array",
228
+ "items": {
229
+ "$ref": "#/$defs/relativePath"
230
+ },
231
+ "minItems": 1,
232
+ "maxItems": 64,
233
+ "uniqueItems": true
234
+ }
235
+ }
236
+ },
237
+ "minItems": 1,
238
+ "maxItems": 512
239
+ },
240
+ "negativeContracts": {
241
+ "type": "array",
242
+ "items": {
243
+ "type": "object",
244
+ "additionalProperties": false,
245
+ "required": [
246
+ "negativeContractId",
247
+ "forbiddenArgvPrefix",
248
+ "forbiddenPaths",
249
+ "reason",
250
+ "testRefs"
251
+ ],
252
+ "properties": {
253
+ "negativeContractId": {
254
+ "$ref": "#/$defs/identifier"
255
+ },
256
+ "forbiddenArgvPrefix": {
257
+ "type": "array",
258
+ "items": {
259
+ "type": "string",
260
+ "minLength": 1
261
+ },
262
+ "minItems": 1,
263
+ "maxItems": 16
264
+ },
265
+ "forbiddenPaths": {
266
+ "type": "array",
267
+ "items": {
268
+ "$ref": "#/$defs/relativePath"
269
+ },
270
+ "minItems": 0,
271
+ "maxItems": 64,
272
+ "uniqueItems": true
273
+ },
274
+ "reason": {
275
+ "$ref": "#/$defs/nonBlankText"
276
+ },
277
+ "testRefs": {
278
+ "type": "array",
279
+ "items": {
280
+ "$ref": "#/$defs/relativePath"
281
+ },
282
+ "minItems": 1,
283
+ "maxItems": 64,
284
+ "uniqueItems": true
285
+ }
286
+ }
287
+ },
288
+ "minItems": 1,
289
+ "maxItems": 64
290
+ }
291
+ },
292
+ "$defs": {
293
+ "contractRef": {
294
+ "type": "object",
295
+ "additionalProperties": false,
296
+ "required": [
297
+ "id",
298
+ "version"
299
+ ],
300
+ "properties": {
301
+ "id": {
302
+ "$ref": "#/$defs/identifier"
303
+ },
304
+ "version": {
305
+ "$ref": "#/$defs/semver"
306
+ }
307
+ }
308
+ },
309
+ "digest": {
310
+ "type": "string",
311
+ "pattern": "^sha256:[0-9a-f]{64}$"
312
+ },
313
+ "identifier": {
314
+ "type": "string",
315
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
316
+ "minLength": 1,
317
+ "maxLength": 128
318
+ },
319
+ "nonBlankText": {
320
+ "type": "string",
321
+ "minLength": 1,
322
+ "maxLength": 16384,
323
+ "pattern": ".*\\S.*"
324
+ },
325
+ "relativePath": {
326
+ "type": "string",
327
+ "minLength": 1,
328
+ "maxLength": 1024,
329
+ "pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//).+$"
330
+ },
331
+ "semver": {
332
+ "type": "string",
333
+ "pattern": "^(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"
334
+ },
335
+ "skillId": {
336
+ "type": "string",
337
+ "pattern": "^planr-[a-z0-9]+(?:-[a-z0-9]+)*$",
338
+ "maxLength": 128
339
+ },
340
+ "sourceRef": {
341
+ "type": "object",
342
+ "additionalProperties": false,
343
+ "required": [
344
+ "path",
345
+ "digest"
346
+ ],
347
+ "properties": {
348
+ "path": {
349
+ "$ref": "#/$defs/relativePath"
350
+ },
351
+ "digest": {
352
+ "$ref": "#/$defs/digest"
353
+ }
354
+ }
355
+ }
356
+ }
357
+ }
@@ -0,0 +1,352 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.25.0/skill-catalog.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "skill-catalog",
6
+ "version": "1.25.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "required": [
11
+ "kind",
12
+ "schemaVersion",
13
+ "protocolVersion",
14
+ "documentVersion",
15
+ "digestAlgorithm",
16
+ "canonicalization",
17
+ "matchingPolicyVersion",
18
+ "skills",
19
+ "compatibilityAliases"
20
+ ],
21
+ "properties": {
22
+ "kind": {
23
+ "const": "skill-catalog"
24
+ },
25
+ "schemaVersion": {
26
+ "const": "1.0.0"
27
+ },
28
+ "protocolVersion": {
29
+ "const": "1.25.0"
30
+ },
31
+ "documentVersion": {
32
+ "$ref": "#/$defs/semver"
33
+ },
34
+ "digestAlgorithm": {
35
+ "const": "sha256"
36
+ },
37
+ "canonicalization": {
38
+ "const": "rfc8785"
39
+ },
40
+ "matchingPolicyVersion": {
41
+ "$ref": "#/$defs/semver"
42
+ },
43
+ "skills": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": [
49
+ "skillId",
50
+ "skillVersion",
51
+ "description",
52
+ "lifecycle",
53
+ "authorityClass",
54
+ "source",
55
+ "sourceDigest",
56
+ "triggerPolicy",
57
+ "contracts",
58
+ "cliRequirements",
59
+ "ruleIds",
60
+ "contributionManifestRefs",
61
+ "hosts",
62
+ "testRefs",
63
+ "certificationRefs"
64
+ ],
65
+ "properties": {
66
+ "skillId": {
67
+ "$ref": "#/$defs/skillId"
68
+ },
69
+ "skillVersion": {
70
+ "$ref": "#/$defs/semver"
71
+ },
72
+ "description": {
73
+ "$ref": "#/$defs/nonBlankText"
74
+ },
75
+ "lifecycle": {
76
+ "enum": [
77
+ "active",
78
+ "deprecated",
79
+ "retired"
80
+ ]
81
+ },
82
+ "authorityClass": {
83
+ "$ref": "#/$defs/identifier"
84
+ },
85
+ "source": {
86
+ "$ref": "#/$defs/relativePath"
87
+ },
88
+ "sourceDigest": {
89
+ "$ref": "#/$defs/digest"
90
+ },
91
+ "triggerPolicy": {
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "required": [
95
+ "include",
96
+ "exclude",
97
+ "deferTo"
98
+ ],
99
+ "properties": {
100
+ "include": {
101
+ "type": "array",
102
+ "items": {
103
+ "$ref": "#/$defs/nonBlankText"
104
+ },
105
+ "minItems": 1,
106
+ "maxItems": 64,
107
+ "uniqueItems": true
108
+ },
109
+ "exclude": {
110
+ "type": "array",
111
+ "items": {
112
+ "$ref": "#/$defs/nonBlankText"
113
+ },
114
+ "minItems": 1,
115
+ "maxItems": 64,
116
+ "uniqueItems": true
117
+ },
118
+ "deferTo": {
119
+ "type": "array",
120
+ "items": {
121
+ "$ref": "#/$defs/skillId"
122
+ },
123
+ "minItems": 0,
124
+ "maxItems": 32,
125
+ "uniqueItems": true
126
+ }
127
+ }
128
+ },
129
+ "contracts": {
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": [
133
+ "inputs",
134
+ "outputs"
135
+ ],
136
+ "properties": {
137
+ "inputs": {
138
+ "type": "array",
139
+ "items": {
140
+ "$ref": "#/$defs/contractRef"
141
+ },
142
+ "minItems": 0,
143
+ "maxItems": 32
144
+ },
145
+ "outputs": {
146
+ "type": "array",
147
+ "items": {
148
+ "$ref": "#/$defs/contractRef"
149
+ },
150
+ "minItems": 1,
151
+ "maxItems": 32
152
+ }
153
+ }
154
+ },
155
+ "cliRequirements": {
156
+ "type": "array",
157
+ "items": {
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "required": [
161
+ "commandId",
162
+ "argv",
163
+ "requiredOptions"
164
+ ],
165
+ "properties": {
166
+ "commandId": {
167
+ "$ref": "#/$defs/identifier"
168
+ },
169
+ "argv": {
170
+ "type": "array",
171
+ "items": {
172
+ "type": "string",
173
+ "minLength": 1
174
+ },
175
+ "minItems": 1,
176
+ "maxItems": 16
177
+ },
178
+ "requiredOptions": {
179
+ "type": "array",
180
+ "items": {
181
+ "type": "string",
182
+ "pattern": "^--[a-z0-9-]+$"
183
+ },
184
+ "minItems": 0,
185
+ "maxItems": 32,
186
+ "uniqueItems": true
187
+ }
188
+ }
189
+ },
190
+ "minItems": 0,
191
+ "maxItems": 64
192
+ },
193
+ "ruleIds": {
194
+ "type": "array",
195
+ "items": {
196
+ "$ref": "#/$defs/ruleId"
197
+ },
198
+ "minItems": 1,
199
+ "maxItems": 10,
200
+ "uniqueItems": true
201
+ },
202
+ "contributionManifestRefs": {
203
+ "type": "array",
204
+ "items": {
205
+ "$ref": "#/$defs/relativePath"
206
+ },
207
+ "minItems": 1,
208
+ "maxItems": 64,
209
+ "uniqueItems": true
210
+ },
211
+ "hosts": {
212
+ "type": "array",
213
+ "items": {
214
+ "type": "object",
215
+ "additionalProperties": false,
216
+ "required": [
217
+ "host",
218
+ "entrypoint",
219
+ "path"
220
+ ],
221
+ "properties": {
222
+ "host": {
223
+ "enum": [
224
+ "claude-code",
225
+ "codex",
226
+ "cursor"
227
+ ]
228
+ },
229
+ "entrypoint": {
230
+ "$ref": "#/$defs/nonBlankText"
231
+ },
232
+ "path": {
233
+ "$ref": "#/$defs/relativePath"
234
+ }
235
+ }
236
+ },
237
+ "minItems": 1,
238
+ "maxItems": 8
239
+ },
240
+ "testRefs": {
241
+ "type": "array",
242
+ "items": {
243
+ "$ref": "#/$defs/relativePath"
244
+ },
245
+ "minItems": 1,
246
+ "maxItems": 64,
247
+ "uniqueItems": true
248
+ },
249
+ "certificationRefs": {
250
+ "type": "array",
251
+ "items": {
252
+ "$ref": "#/$defs/relativePath"
253
+ },
254
+ "minItems": 1,
255
+ "maxItems": 64,
256
+ "uniqueItems": true
257
+ }
258
+ }
259
+ },
260
+ "minItems": 1,
261
+ "maxItems": 256
262
+ },
263
+ "compatibilityAliases": {
264
+ "type": "array",
265
+ "items": {
266
+ "type": "object",
267
+ "additionalProperties": false,
268
+ "required": [
269
+ "aliasId",
270
+ "canonicalSkillId",
271
+ "lifecycle",
272
+ "generatedPaths"
273
+ ],
274
+ "properties": {
275
+ "aliasId": {
276
+ "$ref": "#/$defs/identifier"
277
+ },
278
+ "canonicalSkillId": {
279
+ "$ref": "#/$defs/skillId"
280
+ },
281
+ "lifecycle": {
282
+ "const": "deprecated"
283
+ },
284
+ "generatedPaths": {
285
+ "type": "array",
286
+ "items": {
287
+ "$ref": "#/$defs/relativePath"
288
+ },
289
+ "minItems": 1,
290
+ "maxItems": 16,
291
+ "uniqueItems": true
292
+ }
293
+ }
294
+ },
295
+ "minItems": 0,
296
+ "maxItems": 64
297
+ }
298
+ },
299
+ "$defs": {
300
+ "contractRef": {
301
+ "type": "object",
302
+ "additionalProperties": false,
303
+ "required": [
304
+ "id",
305
+ "version"
306
+ ],
307
+ "properties": {
308
+ "id": {
309
+ "$ref": "#/$defs/identifier"
310
+ },
311
+ "version": {
312
+ "$ref": "#/$defs/semver"
313
+ }
314
+ }
315
+ },
316
+ "digest": {
317
+ "type": "string",
318
+ "pattern": "^sha256:[0-9a-f]{64}$"
319
+ },
320
+ "identifier": {
321
+ "type": "string",
322
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
323
+ "minLength": 1,
324
+ "maxLength": 128
325
+ },
326
+ "nonBlankText": {
327
+ "type": "string",
328
+ "minLength": 1,
329
+ "maxLength": 16384,
330
+ "pattern": ".*\\S.*"
331
+ },
332
+ "relativePath": {
333
+ "type": "string",
334
+ "minLength": 1,
335
+ "maxLength": 1024,
336
+ "pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//).+$"
337
+ },
338
+ "ruleId": {
339
+ "type": "string",
340
+ "pattern": "^R(?:[1-9]|[1-9][0-9]+)$"
341
+ },
342
+ "semver": {
343
+ "type": "string",
344
+ "pattern": "^(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"
345
+ },
346
+ "skillId": {
347
+ "type": "string",
348
+ "pattern": "^planr-[a-z0-9]+(?:-[a-z0-9]+)*$",
349
+ "maxLength": 128
350
+ }
351
+ }
352
+ }
@@ -1,3 +1,5 @@
1
+ /** Protocol version of the command and skill catalogs, which carry no whole-document digest. */
2
+ export declare const CATALOG_PROTOCOL_VERSION: '1.25.0';
1
3
  export declare const PROTOCOL_V15_CONTRACTS: Readonly<Record<string, string>>;
2
4
  export declare const PROTOCOL_V16_CONTRACTS: Readonly<Record<string, string>>;
3
5
  export declare const PROTOCOL_V17_CONTRACTS: Readonly<Record<string, string>>;