@gregiteen/ssss-cli 0.14.2 → 0.14.3

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.
@@ -1,24 +1,52 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://ssss.dev/schemas/core-registry.schema.json",
4
- "title": "SSSS Core Registry Schema",
4
+ "title": "SSSS Core and Extension Registry Schema",
5
5
  "description": "JSON Schema for SSSS core and extension registries (spec §5).",
6
6
  "type": "object",
7
7
  "required": [
8
8
  "registry",
9
- "spec_version",
10
- "description",
11
9
  "document_primitives"
12
10
  ],
11
+ "if": {
12
+ "properties": { "registry": { "const": "core" } },
13
+ "required": ["registry"]
14
+ },
15
+ "then": {
16
+ "required": ["spec_version", "description"]
17
+ },
18
+ "additionalProperties": false,
13
19
  "properties": {
14
20
  "$schema": {
15
- "type": "string"
21
+ "type": "string",
22
+ "minLength": 1
16
23
  },
17
24
  "registry": {
18
- "type": "string"
25
+ "type": "string",
26
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
27
+ },
28
+ "extends": {
29
+ "type": "string",
30
+ "enum": ["core", "ssss"]
31
+ },
32
+ "version": {
33
+ "type": "string",
34
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$"
35
+ },
36
+ "requires": {
37
+ "type": "object",
38
+ "propertyNames": {
39
+ "type": "string",
40
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
41
+ },
42
+ "additionalProperties": {
43
+ "type": "string",
44
+ "minLength": 1
45
+ }
19
46
  },
20
47
  "spec_version": {
21
- "type": "string"
48
+ "type": "string",
49
+ "minLength": 1
22
50
  },
23
51
  "description": {
24
52
  "type": "string"
@@ -28,12 +56,20 @@
28
56
  },
29
57
  "document_primitives": {
30
58
  "type": "object",
59
+ "propertyNames": {
60
+ "type": "string",
61
+ "pattern": "^(?:[a-z][a-z0-9_-]{0,63}:)?[a-z][a-z0-9_-]{0,127}$"
62
+ },
31
63
  "additionalProperties": {
32
64
  "$ref": "#/$defs/primitiveDefinition"
33
65
  }
34
66
  },
35
67
  "contract_primitives": {
36
68
  "type": "object",
69
+ "propertyNames": {
70
+ "type": "string",
71
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
72
+ },
37
73
  "additionalProperties": {
38
74
  "$ref": "#/$defs/contractPrimitive"
39
75
  }
@@ -41,18 +77,22 @@
41
77
  "universal_frontmatter": {
42
78
  "type": "object",
43
79
  "required": ["required"],
80
+ "additionalProperties": false,
44
81
  "properties": {
45
82
  "required": {
46
83
  "type": "array",
47
- "items": { "type": "string" }
84
+ "items": { "type": "string", "minLength": 1 },
85
+ "uniqueItems": true
48
86
  },
49
87
  "recommended_okf": {
50
88
  "type": "array",
51
- "items": { "type": "string" }
89
+ "items": { "type": "string", "minLength": 1 },
90
+ "uniqueItems": true
52
91
  },
53
92
  "recommended_semantic": {
54
93
  "type": "array",
55
- "items": { "type": "string" }
94
+ "items": { "type": "string", "minLength": 1 },
95
+ "uniqueItems": true
56
96
  },
57
97
  "spec_ref": {
58
98
  "type": "string"
@@ -62,6 +102,7 @@
62
102
  "portability": {
63
103
  "type": "object",
64
104
  "required": ["classes", "export_profiles"],
105
+ "additionalProperties": false,
65
106
  "properties": {
66
107
  "description": { "type": "string" },
67
108
  "classes": {
@@ -73,14 +114,17 @@
73
114
  "additionalProperties": {
74
115
  "type": "object",
75
116
  "required": ["includes"],
117
+ "additionalProperties": false,
76
118
  "properties": {
77
119
  "includes": {
78
120
  "type": "array",
79
- "items": { "type": "string" }
121
+ "items": { "type": "string", "minLength": 1 },
122
+ "uniqueItems": true
80
123
  },
81
124
  "excludes": {
82
125
  "type": "array",
83
- "items": { "type": "string" }
126
+ "items": { "type": "string", "minLength": 1 },
127
+ "uniqueItems": true
84
128
  },
85
129
  "resource_bound": { "type": "string" },
86
130
  "note": { "type": "string" }
@@ -99,46 +143,56 @@
99
143
  "manifest_required_fields",
100
144
  "provenance_required_fields"
101
145
  ],
146
+ "additionalProperties": false,
102
147
  "properties": {
103
148
  "description": { "type": "string" },
104
149
  "container": { "type": "string" },
105
150
  "structure": {
106
151
  "type": "array",
107
- "items": { "type": "string" }
152
+ "items": { "type": "string", "minLength": 1 },
153
+ "uniqueItems": true
108
154
  },
109
155
  "file_sort": { "type": "string" },
110
156
  "manifest_required_fields": {
111
157
  "type": "array",
112
- "items": { "type": "string" }
158
+ "items": { "type": "string", "minLength": 1 },
159
+ "uniqueItems": true
113
160
  },
114
161
  "manifest_optional_fields": {
115
162
  "type": "array",
116
- "items": { "type": "string" }
163
+ "items": { "type": "string", "minLength": 1 },
164
+ "uniqueItems": true
117
165
  },
118
166
  "provenance_required_fields": {
119
167
  "type": "array",
120
- "items": { "type": "string" }
168
+ "items": { "type": "string", "minLength": 1 },
169
+ "uniqueItems": true
121
170
  },
122
171
  "provenance_optional_fields": {
123
172
  "type": "array",
124
- "items": { "type": "string" }
173
+ "items": { "type": "string", "minLength": 1 },
174
+ "uniqueItems": true
125
175
  },
126
176
  "content_hash": { "type": "string" },
127
177
  "parameter_fields": {
128
178
  "type": "object",
129
179
  "required": ["required"],
180
+ "additionalProperties": false,
130
181
  "properties": {
131
182
  "required": {
132
183
  "type": "array",
133
- "items": { "type": "string" }
184
+ "items": { "type": "string", "minLength": 1 },
185
+ "uniqueItems": true
134
186
  },
135
187
  "optional": {
136
188
  "type": "array",
137
- "items": { "type": "string" }
189
+ "items": { "type": "string", "minLength": 1 },
190
+ "uniqueItems": true
138
191
  },
139
192
  "source_enum": {
140
193
  "type": "array",
141
- "items": { "type": "string" }
194
+ "items": { "type": "string", "minLength": 1 },
195
+ "uniqueItems": true
142
196
  },
143
197
  "note": { "type": "string" }
144
198
  }
@@ -155,6 +209,7 @@
155
209
  "system_enum",
156
210
  "mode_enum"
157
211
  ],
212
+ "additionalProperties": false,
158
213
  "properties": {
159
214
  "description": { "type": "string" },
160
215
  "verbs": {
@@ -163,27 +218,33 @@
163
218
  },
164
219
  "step_required_fields": {
165
220
  "type": "array",
166
- "items": { "type": "string" }
221
+ "items": { "type": "string", "minLength": 1 },
222
+ "uniqueItems": true
167
223
  },
168
224
  "step_optional_fields": {
169
225
  "type": "array",
170
- "items": { "type": "string" }
226
+ "items": { "type": "string", "minLength": 1 },
227
+ "uniqueItems": true
171
228
  },
172
229
  "system_enum": {
173
230
  "type": "array",
174
- "items": { "type": "string" }
231
+ "items": { "type": "string", "minLength": 1 },
232
+ "uniqueItems": true
175
233
  },
176
234
  "mode_enum": {
177
235
  "type": "array",
178
- "items": { "type": "string" }
236
+ "items": { "type": "string", "minLength": 1 },
237
+ "uniqueItems": true
179
238
  },
180
239
  "edge_relations": {
181
240
  "type": "array",
182
- "items": { "type": "string" }
241
+ "items": { "type": "string", "minLength": 1 },
242
+ "uniqueItems": true
183
243
  },
184
244
  "install_modes": {
185
245
  "type": "array",
186
- "items": { "type": "string" }
246
+ "items": { "type": "string", "minLength": 1 },
247
+ "uniqueItems": true
187
248
  },
188
249
  "id_remap": { "type": "string" },
189
250
  "upgrade": { "type": "string" },
@@ -201,27 +262,33 @@
201
262
  "run_statuses",
202
263
  "idempotency_basis"
203
264
  ],
265
+ "additionalProperties": false,
204
266
  "properties": {
205
267
  "description": { "type": "string" },
206
268
  "trigger_types": {
207
269
  "type": "array",
208
- "items": { "type": "string" }
270
+ "items": { "type": "string", "minLength": 1 },
271
+ "uniqueItems": true
209
272
  },
210
273
  "misfire_policies": {
211
274
  "type": "array",
212
- "items": { "type": "string" }
275
+ "items": { "type": "string", "minLength": 1 },
276
+ "uniqueItems": true
213
277
  },
214
278
  "concurrency_policies": {
215
279
  "type": "array",
216
- "items": { "type": "string" }
280
+ "items": { "type": "string", "minLength": 1 },
281
+ "uniqueItems": true
217
282
  },
218
283
  "task_instantiation_fields": {
219
284
  "type": "array",
220
- "items": { "type": "string" }
285
+ "items": { "type": "string", "minLength": 1 },
286
+ "uniqueItems": true
221
287
  },
222
288
  "run_statuses": {
223
289
  "type": "array",
224
- "items": { "type": "string" }
290
+ "items": { "type": "string", "minLength": 1 },
291
+ "uniqueItems": true
225
292
  },
226
293
  "idempotency_basis": { "type": "string" },
227
294
  "spec_ref": { "type": "string" }
@@ -238,34 +305,40 @@
238
305
  "language_pattern",
239
306
  "safe_default"
240
307
  ],
308
+ "additionalProperties": false,
241
309
  "properties": {
242
- "version": { "type": "integer" },
310
+ "version": { "type": "integer", "minimum": 1 },
243
311
  "identity_fields": {
244
312
  "type": "array",
245
- "items": { "type": "string" }
313
+ "items": { "type": "string", "minLength": 1 },
314
+ "uniqueItems": true
246
315
  },
247
316
  "surface_fields": {
248
317
  "type": "array",
249
- "items": { "type": "string" }
318
+ "items": { "type": "string", "minLength": 1 },
319
+ "uniqueItems": true
250
320
  },
251
321
  "relation_fields": {
252
322
  "type": "array",
253
- "items": { "type": "string" }
323
+ "items": { "type": "string", "minLength": 1 },
324
+ "uniqueItems": true
254
325
  },
255
326
  "renderable_fields": {
256
327
  "type": "array",
257
- "items": { "type": "string" }
328
+ "items": { "type": "string", "minLength": 1 },
329
+ "uniqueItems": true
258
330
  },
259
- "language_pattern": { "type": "string" },
260
- "safe_default": { "type": "string" },
331
+ "language_pattern": { "type": "string", "minLength": 1 },
332
+ "safe_default": { "type": "string", "minLength": 1 },
261
333
  "spec_ref": { "type": "string" }
262
334
  }
263
335
  },
264
336
  "reserved_keys": {
265
337
  "type": "array",
266
- "items": { "type": "string" }
338
+ "items": { "type": "string", "minLength": 1 },
339
+ "uniqueItems": true
267
340
  },
268
- "host_field_prefix": { "type": "string" },
341
+ "host_field_prefix": { "type": "string", "minLength": 1 },
269
342
  "spec_ref_reserved": { "type": "string" }
270
343
  },
271
344
  "$defs": {
@@ -277,13 +350,18 @@
277
350
  "portability",
278
351
  "required_fields"
279
352
  ],
353
+ "additionalProperties": false,
280
354
  "properties": {
281
355
  "family": {
282
- "type": "string"
356
+ "type": "string",
357
+ "minLength": 1
283
358
  },
284
359
  "canonical_filename": {
285
360
  "type": ["string", "null"]
286
361
  },
362
+ "canonical_path": {
363
+ "type": ["string", "null"]
364
+ },
287
365
  "filename_convention": {
288
366
  "type": "string"
289
367
  },
@@ -296,61 +374,99 @@
296
374
  },
297
375
  "required_fields": {
298
376
  "type": "array",
299
- "items": { "type": "string" }
377
+ "items": { "type": "string", "minLength": 1 },
378
+ "uniqueItems": true
379
+ },
380
+ "optional_fields": {
381
+ "type": "array",
382
+ "items": { "type": "string", "minLength": 1 },
383
+ "uniqueItems": true
300
384
  },
301
385
  "required_when": {
302
386
  "type": "object",
387
+ "propertyNames": {
388
+ "type": "string",
389
+ "pattern": "^[A-Za-z_][A-Za-z0-9_-]*==.+$"
390
+ },
303
391
  "additionalProperties": {
304
392
  "type": "array",
305
- "items": { "type": "string" }
393
+ "items": { "type": "string", "minLength": 1 },
394
+ "uniqueItems": true
306
395
  }
307
396
  },
308
397
  "enums": {
309
398
  "type": "object",
399
+ "propertyNames": {
400
+ "type": "string",
401
+ "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$"
402
+ },
310
403
  "additionalProperties": {
311
404
  "type": "array",
312
- "items": { "type": "string" }
405
+ "items": { "type": "string", "minLength": 1 },
406
+ "uniqueItems": true
313
407
  }
314
408
  },
315
409
  "patterns": {
316
410
  "type": "object",
411
+ "propertyNames": {
412
+ "type": "string",
413
+ "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$"
414
+ },
317
415
  "additionalProperties": {
318
- "type": "string"
416
+ "type": "string",
417
+ "minLength": 1
319
418
  }
320
419
  },
321
420
  "immutable_fields": {
322
421
  "type": "array",
323
- "items": { "type": "string" }
422
+ "items": { "type": "string", "minLength": 1 },
423
+ "uniqueItems": true
324
424
  },
325
425
  "references": {
326
426
  "type": "object",
427
+ "propertyNames": {
428
+ "type": "string",
429
+ "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$"
430
+ },
327
431
  "additionalProperties": {
328
432
  "type": "object",
433
+ "additionalProperties": false,
329
434
  "properties": {
330
435
  "allowed_types": {
331
436
  "type": "array",
332
- "items": { "type": "string" }
437
+ "items": { "type": "string", "minLength": 1 },
438
+ "uniqueItems": true
333
439
  },
334
440
  "disallowed_types": {
335
441
  "type": "array",
336
- "items": { "type": "string" }
442
+ "items": { "type": "string", "minLength": 1 },
443
+ "uniqueItems": true
337
444
  },
338
445
  "allowed_portability": {
339
446
  "type": "array",
340
- "items": { "type": "string" }
447
+ "items": {
448
+ "type": "string",
449
+ "enum": ["structural", "tenant_private", "resource_bound"]
450
+ },
451
+ "uniqueItems": true
341
452
  },
342
453
  "must_exist": {
343
454
  "type": "boolean"
344
455
  },
345
456
  "hash_field": {
346
- "type": "string"
457
+ "type": "string",
458
+ "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$"
347
459
  }
348
460
  }
349
461
  }
350
462
  },
351
463
  "aliases": {
352
464
  "type": "array",
353
- "items": { "type": "string" }
465
+ "items": {
466
+ "type": "string",
467
+ "pattern": "^(?:[a-z][a-z0-9_-]{0,63}:)?[a-z][a-z0-9_-]{0,127}$"
468
+ },
469
+ "uniqueItems": true
354
470
  },
355
471
  "deprecated": {
356
472
  "type": "boolean"
@@ -360,14 +476,64 @@
360
476
  },
361
477
  "resource": {
362
478
  "type": "object",
479
+ "additionalProperties": false,
363
480
  "properties": {
364
481
  "kind": { "type": "string" },
482
+ "binds": {
483
+ "type": "array",
484
+ "items": { "type": "string", "minLength": 1 },
485
+ "uniqueItems": true
486
+ },
365
487
  "provision_relation": { "type": "string" }
366
488
  }
367
489
  },
490
+ "notes": {
491
+ "type": "string"
492
+ },
493
+ "description": {
494
+ "type": "string"
495
+ },
496
+ "projection_strategy": {
497
+ "type": "string"
498
+ },
368
499
  "scopes": {
369
500
  "type": "array",
370
- "items": { "type": "string" }
501
+ "items": {
502
+ "type": "string",
503
+ "enum": ["system", "account", "workspace", "user"]
504
+ },
505
+ "uniqueItems": true
506
+ },
507
+ "capabilities": {
508
+ "type": "object",
509
+ "additionalProperties": {
510
+ "type": "array",
511
+ "items": { "type": "string", "minLength": 1 },
512
+ "uniqueItems": true
513
+ }
514
+ },
515
+ "events": {
516
+ "type": "array"
517
+ },
518
+ "projections": {
519
+ "type": "array"
520
+ },
521
+ "ui": {
522
+ "type": "object"
523
+ },
524
+ "migrations": {
525
+ "type": "array"
526
+ },
527
+ "primitive_version": {
528
+ "type": "integer",
529
+ "minimum": 1
530
+ },
531
+ "primitive_revision": {
532
+ "type": "integer",
533
+ "minimum": 1
534
+ },
535
+ "authored_language": {
536
+ "type": ["string", "null"]
371
537
  },
372
538
  "spec_ref": {
373
539
  "type": "string"
@@ -377,9 +543,10 @@
377
543
  "contractPrimitive": {
378
544
  "type": "object",
379
545
  "required": ["purpose", "spec_ref"],
546
+ "additionalProperties": false,
380
547
  "properties": {
381
- "purpose": { "type": "string" },
382
- "spec_ref": { "type": "string" }
548
+ "purpose": { "type": "string", "minLength": 1 },
549
+ "spec_ref": { "type": "string", "minLength": 1 }
383
550
  }
384
551
  }
385
552
  }
@@ -84,20 +84,19 @@ permissions:
84
84
  - "write:task"
85
85
  ---
86
86
  Full access to all festival operations.`,
87
- // resource_bound — declares "this business needs a domain"; the SELLER's domain never ships
88
- 'domains/festival.md':
87
+ // resource_bound — declares "this business needs an external domain resource"; the SELLER's bound value never ships
88
+ 'resources/domain.md':
89
89
  `---
90
- type: domain
90
+ type: resource
91
91
  title: Festival Domain Requirement
92
92
  description: Domain resource requirement that the buyer binds during provisioning.
93
93
  timestamp: 2026-07-02T00:00:00Z
94
- domain_name: REQUIREMENT
95
- registrar: REQUIREMENT
96
- status: required
97
- payment_status: unbound
98
- x_portability: resource_bound
94
+ name: Festival Domain
95
+ kind: domain
96
+ status: pending
97
+ binds: festival.example
99
98
  ---
100
- This festival needs a domain. The buyer binds their own at provision (owns_domain).`,
99
+ This festival needs a domain. The buyer binds their own at provision.`,
101
100
  // tenant_private — operator's ticket record; MUST be dropped from a sale bundle
102
101
  'tasks/ticket-4821.md':
103
102
  `---
@@ -138,7 +137,7 @@ try {
138
137
  description: 'A complete music-festival operation as a tradeable SSSS bundle.',
139
138
  version: '1.0.0',
140
139
  exporter: `${PACKAGE.name}@${PACKAGE.version}`,
141
- requiredExtensions: ['festech'],
140
+ requiredExtensions: [],
142
141
  parameters: [
143
142
  { key: 'business_name', label: 'Festival name', type: 'string', scope: 'workspace', source: 'user', required: true },
144
143
  { key: 'domain', label: 'Domain to bind', type: 'string', scope: 'workspace', source: 'user', required: true, description: 'Satisfies the resource_bound domain requirement (owns_domain).' },
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Fail-closed documentation parity gate.
4
+ * Verifies all CLI commands and topics are documented.
5
+ */
6
+ import fs from 'node:fs';
7
+ import path from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+
10
+ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
11
+ const SCRIPTS_DIR = path.join(ROOT, 'scripts');
12
+ const OVERVIEW_FILE = path.join(ROOT, 'docs', 'help', 'overview.md');
13
+
14
+ const commands = fs.readdirSync(SCRIPTS_DIR)
15
+ .filter((f) => f.startsWith('cmd-') && f.endsWith('.mjs'))
16
+ .map((f) => f.replace(/^cmd-/, '').replace(/\.mjs$/, ''))
17
+ .sort();
18
+
19
+ if (!fs.existsSync(OVERVIEW_FILE)) {
20
+ console.error('docs/help/overview.md missing!');
21
+ process.exit(1);
22
+ }
23
+
24
+ const overview = fs.readFileSync(OVERVIEW_FILE, 'utf8');
25
+ const missing = [];
26
+
27
+ for (const cmd of commands) {
28
+ if (!overview.includes(`\`${cmd}\``)) {
29
+ missing.push(cmd);
30
+ }
31
+ }
32
+
33
+ if (missing.length > 0) {
34
+ console.error(`Documentation parity failure: commands missing from docs/help/overview.md: ${missing.join(', ')}`);
35
+ process.exit(1);
36
+ }
37
+
38
+ console.log(`ok: documentation parity verified for all ${commands.length} commands.`);