@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.
- package/CHANGELOG.md +22 -0
- package/README.md +19 -11
- package/VERSION +1 -1
- package/conformance/reference-bundle.ucw.json +19 -32
- package/docs/help/bundle.md +1 -1
- package/docs/help/overview.md +5 -8
- package/docs/help/schema.md +40 -0
- package/package.json +6 -2
- package/registry/core.json +1 -1
- package/schemas/bundle.schema.json +67 -26
- package/schemas/core-registry.schema.json +220 -53
- package/scripts/build-reference-bundle.mjs +9 -10
- package/scripts/check-docs-parity.mjs +38 -0
- package/scripts/cmd-new.mjs +79 -18
- package/scripts/cmd-schema.mjs +104 -14
- package/scripts/conformance-09.mjs +13 -0
- package/scripts/conformance.mjs +40 -2
- package/scripts/sync-docs.mjs +56 -0
- package/skills/ssss/core/references/core-registry.json +1 -1
- package/src/bundle.mjs +1 -0
- package/src/registry.mjs +9 -2
- package/src/schema-validator.mjs +218 -37
- package/types/kernel.d.ts +1 -0
- package/types/schema-validator.d.ts +24 -0
- package/registry/extensions/defaults.json +0 -5
- package/registry/extensions/festech.json +0 -1115
- package/registry/extensions/field-crm.json +0 -1018
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.14.3] - 2026-11-03
|
|
11
|
+
### Added
|
|
12
|
+
- **Fail-Closed JSON Schema Validation & Validator Hardening (`SCHEMA_VALIDATION_HARDENING`)**:
|
|
13
|
+
- `src/schema-validator.mjs`: Upgraded to Draft 2020-12 specification with sibling `$ref` evaluation alongside keywords, cycle detection, `propertyNames`, `uniqueItems`, `minItems`, `maxItems`, `minLength`, `maxLength`, `minimum`, `maximum`, `const`, `allOf`, `anyOf`, `oneOf`, and `if`/`then`/`else` conditional branches.
|
|
14
|
+
- Exported convenience schema validation utilities: `getCoreRegistrySchema()`, `getBundleSchema()`, `validateRegistryAgainstSchema()`, and `validateBundleAgainstSchema()`.
|
|
15
|
+
- `schemas/core-registry.schema.json` & `schemas/bundle.schema.json`: Enforced `"additionalProperties": false` across all objects with strict `propertyNames` pattern matching, SHA-256 digest patterns, and integer minimum constraints. Conditional requirements enforce `spec_version` and `description` only for core registries.
|
|
16
|
+
- **CLI `ssss schema validate`**:
|
|
17
|
+
- `scripts/cmd-schema.mjs`: Added `ssss schema validate <file> [--type core|bundle] [--schema <path>] [--json] [--quiet]` with automatic format detection.
|
|
18
|
+
- **App-Local Extension Scaffolding & Isolation**:
|
|
19
|
+
- `scripts/cmd-new.mjs`: Added `--extension <name>` option to scaffold app-specific primitive extensions directly into `registry/extensions/<name>.json`, with isolated generated tests and strict name validation.
|
|
20
|
+
- `src/registry.mjs`: `loadRegistries()` supports app repositories carrying only `registry/extensions/`, automatically composing with the package core registry.
|
|
21
|
+
- Decoupled proprietary app extensions (`festech.json`, `field-crm.json`, `defaults.json`) from `registry/extensions/` to maintain a 100% vendor-neutral standard.
|
|
22
|
+
- Updated canonical reference bundle ([`conformance/reference-bundle.ucw.json`](file:///Users/gregoryiteen/github/ssss/conformance/reference-bundle.ucw.json)) to use standard core `resource` primitive.
|
|
23
|
+
- **Documentation Parity & OpenWiki Sync in Release Pipeline**:
|
|
24
|
+
- `scripts/sync-docs.mjs` and `scripts/check-docs-parity.mjs`: Automatically synchronize CLI command lists, help topics, and primitive counts into `docs/help/overview.md` and enforce 100% doc parity.
|
|
25
|
+
- Initialized and ingested canonical knowledge graph hubs into `openwiki/`.
|
|
26
|
+
- `skills/push/scripts/preflight-release.mjs`: Two-phase preflight release pipeline running quality gates first, followed by OpenWiki refresh and doc parity checks.
|
|
27
|
+
|
|
28
|
+
### Behavior changes hosts should check
|
|
29
|
+
- Custom application extensions should reside in the application repository's own `registry/extensions/` directory rather than being contributed to core SSSS.
|
|
30
|
+
- Running `ssss schema validate <file>` allows CI pipelines and hosts to validate registries and `.ucw` bundles against the standard fail-closed JSON Schemas.
|
|
31
|
+
|
|
10
32
|
## [0.14.2] - 2026-11-02
|
|
11
33
|
### Added
|
|
12
34
|
- **Canonical JSON Schema Draft 2020-12 Definitions (`JSON_SCHEMA_EXPORT`)**:
|
package/README.md
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
|
|
10
10
|
SSSS is a vendor-neutral standard and reference implementation for portable AI memory and state. It defines:
|
|
11
11
|
|
|
12
|
-
- **Document primitives** — typed Markdown files with YAML frontmatter (`workflow`, `rule`, `
|
|
12
|
+
- **Document primitives** — typed Markdown files with YAML frontmatter (`workflow`, `rule`, `role`, `assistant`, …), validated against a registry, not hand-written code.
|
|
13
13
|
- **The Operation Contract** (§6) — four envelope types (`operation` / `patch` / `event` / `delete`) for mutating a vault, with idempotency replay and audit.
|
|
14
|
-
- **The Workflow Runtime Contract** (§11.8) — workflows
|
|
14
|
+
- **The Workflow Runtime Contract** (§11.8) — workflows and standalone triggers derive idempotent event/task/run envelopes from the vault.
|
|
15
15
|
- **Multilingual semantic runtime** (§11.9) — deterministic lexical evidence, injected multilingual embeddings, and runtime rendering with symbolic controls fixed.
|
|
16
16
|
- **Portability classification** (§5.5) — the keystone: every primitive is `structural`, `tenant_private`, or `resource_bound`, so a vault can be *sold* or *shared* without leaking private data.
|
|
17
|
-
- **The `.ucw` bundle format** (§16) and **provisioning contract** (§17) — package a vault, then `export → provision → import` it into a fresh environment, deterministically.
|
|
17
|
+
- **The `.ucw` bundle format** (§16) and **provisioning contract** (§17) — package a vault, then `export → provision → import → upgrade` it into a fresh environment, deterministically.
|
|
18
18
|
|
|
19
19
|
This package, `@gregiteen/ssss-cli`, is **dependency-free**: a host needs neither Zod nor a YAML library to be conformant. The reference engine *is* the validator.
|
|
20
20
|
|
|
@@ -61,16 +61,17 @@ ssss import bundle.ucw.json --vault ./new-tenant \
|
|
|
61
61
|
|
|
62
62
|
## 0.9 application kernel
|
|
63
63
|
|
|
64
|
-
SSSS 0.9 provides a shared mutation kernel and host adapter contracts for any system using SSSS:
|
|
64
|
+
SSSS 0.9 provides a shared mutation kernel, canonical JSON Schemas, and host adapter contracts for any system using SSSS:
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
ssss primitive create --namespace acme --name "New Item" --language en
|
|
68
68
|
ssss registry compose --extension ./acme-extension.json
|
|
69
|
+
ssss schema validate registry/core.json
|
|
69
70
|
ssss adapter conformance
|
|
70
71
|
ssss migrate 0.8-to-0.9 ./vault
|
|
71
72
|
```
|
|
72
73
|
|
|
73
|
-
Library subpaths: `@gregiteen/ssss-cli/kernel`, `/vfs`, `/identity`, `/leases`, `/events`, `/projections`, `/semantic`, `/ui
|
|
74
|
+
Library subpaths: `@gregiteen/ssss-cli/kernel`, `/vfs`, `/identity`, `/authorization`, `/leases`, `/idempotency`, `/intents`, `/events`, `/projections`, `/semantic`, `/ui`, `/http`, `/guard`, `/schema-validator`, `/schemas/*`.
|
|
74
75
|
|
|
75
76
|
## Commands
|
|
76
77
|
|
|
@@ -79,6 +80,7 @@ Library subpaths: `@gregiteen/ssss-cli/kernel`, `/vfs`, `/identity`, `/leases`,
|
|
|
79
80
|
| `ssss new <dir>` | Scaffold a new SSSS project (`--install`). |
|
|
80
81
|
| `ssss primitive <verb>` | Create, validate, inspect, or migrate primitive definitions. |
|
|
81
82
|
| `ssss registry <verb>` | Compose, lock, or verify an effective registry. |
|
|
83
|
+
| `ssss schema <verb>` | Output, export, or validate against Draft 2020-12 JSON Schemas (`core`, `bundle`, `export`, `validate`). |
|
|
82
84
|
| `ssss adapter conformance` | Run machine-readable VFS/lease/idempotency contract suites. |
|
|
83
85
|
| `ssss migrate 0.8-to-0.9` | Dry-run migration diagnostics with backup manifest. |
|
|
84
86
|
| `ssss export <vault>` | Package a vault into a `.ucw` bundle (§16). Pure & deterministic. |
|
|
@@ -86,10 +88,13 @@ Library subpaths: `@gregiteen/ssss-cli/kernel`, `/vfs`, `/identity`, `/leases`,
|
|
|
86
88
|
| `ssss inspect <bundle>` | Human-readable summary (manifest, inventory, params, steps). |
|
|
87
89
|
| `ssss provision <bundle>` | Plan an install: params + link integrity → envelopes (§17). |
|
|
88
90
|
| `ssss import <bundle>` | Replay a bundle/plan into a vault via the engine (idempotent). |
|
|
91
|
+
| `ssss upgrade <bundle>` | Upgrade an installed vault to a new bundle version via structural patches (§17.4). |
|
|
92
|
+
| `ssss serve [options]` | Start the reference HTTP server for operations (§6.8). |
|
|
93
|
+
| `ssss bridge [options]` | Execute operations over stdin/stdout JSON (§6.8). |
|
|
89
94
|
| `ssss semantic <vault>` | Build or query a deterministic, privacy-safe semantic index (§11.9). |
|
|
90
95
|
| `ssss autolink [dir]` | Generate OKF wiki-links across a vault. |
|
|
91
96
|
| `ssss conformance` | Run the canonical conformance suite (§12). |
|
|
92
|
-
| `ssss help [topic]` | Local docs: `runtime`, `portability`, `bundle`, `provisioning`, `leases`, … |
|
|
97
|
+
| `ssss help [topic]` | Local docs: `runtime`, `portability`, `bundle`, `provisioning`, `schema`, `leases`, … |
|
|
93
98
|
|
|
94
99
|
Run `ssss <command> --help` for flags, or `ssss help <topic>` for concepts.
|
|
95
100
|
|
|
@@ -97,7 +102,7 @@ Run `ssss <command> --help` for flags, or `ssss help <topic>` for concepts.
|
|
|
97
102
|
|
|
98
103
|
| Class | Meaning | In a `sale` export? |
|
|
99
104
|
|-------|---------|---------------------|
|
|
100
|
-
| `structural` | The sellable business model (`workflow`, `rule`, `
|
|
105
|
+
| `structural` | The sellable business model (`workflow`, `rule`, `role`, …). | ✅ shipped |
|
|
101
106
|
| `resource_bound` | Needs a real resource bound at provision (`domain`, `phone_number`). | ✅ shipped (as a parameter/step) |
|
|
102
107
|
| `tenant_private` | The operator's private data (`task`, customer records). | ❌ **dropped** |
|
|
103
108
|
|
|
@@ -110,7 +115,7 @@ A host MUST NOT claim SSSS conformance without passing the suite in `conformance
|
|
|
110
115
|
```bash
|
|
111
116
|
ssss conformance # structural + registry validation
|
|
112
117
|
ssss conformance --engine # + replay all fixtures + round-trip the reference bundle
|
|
113
|
-
npm test # == ssss conformance --engine
|
|
118
|
+
npm test # == ssss conformance --engine + event/frontmatter/durability suites
|
|
114
119
|
```
|
|
115
120
|
|
|
116
121
|
## Repository layout
|
|
@@ -118,13 +123,16 @@ npm test # == ssss conformance --engine
|
|
|
118
123
|
```
|
|
119
124
|
docs/ssss-spec.md The normative specification (v0.9).
|
|
120
125
|
docs/help/ Topic docs surfaced by `ssss help`.
|
|
121
|
-
registry/core.json
|
|
122
|
-
registry/extensions/
|
|
126
|
+
registry/core.json 20 document + 5 contract primitives; semantic, bundle & provisioning rules.
|
|
127
|
+
registry/extensions/ Empty in this package; apps keep their own `registry/extensions/<app>.json` (`ssss new --extension`).
|
|
128
|
+
schemas/ Draft 2020-12 JSON Schemas (`core-registry.schema.json`, `bundle.schema.json`).
|
|
129
|
+
src/kernel.mjs Shared 0.9 mutation kernel (`kernel.execute`).
|
|
123
130
|
src/engine.mjs Operation Contract engine (§6).
|
|
124
131
|
src/runtime.mjs Workflow trigger → event/task/run envelope planning (§11.8).
|
|
125
132
|
src/semantic.mjs Multilingual semantic retrieval + runtime rendering (§11.9).
|
|
126
|
-
src/bundle.mjs export / validate / provision / import (§16–§17).
|
|
133
|
+
src/bundle.mjs export / validate / provision / import / upgrade (§16–§17).
|
|
127
134
|
src/registry.mjs Registry-driven type + portability resolution.
|
|
135
|
+
src/schema-validator.mjs Zero-dependency Draft 2020-12 JSON Schema validator.
|
|
128
136
|
src/frontmatter.mjs Zero-dependency YAML frontmatter.
|
|
129
137
|
scripts/ssss.mjs The `ssss` CLI dispatcher.
|
|
130
138
|
conformance/ Canonical fixtures + reference bundle.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.14.
|
|
1
|
+
0.14.3
|
|
@@ -5,14 +5,12 @@
|
|
|
5
5
|
"version": "1.0.0",
|
|
6
6
|
"exported_at": "1970-01-01T00:00:00.000Z",
|
|
7
7
|
"ssss_core_version": "0.9",
|
|
8
|
-
"required_extensions": [
|
|
9
|
-
"festech"
|
|
10
|
-
],
|
|
8
|
+
"required_extensions": [],
|
|
11
9
|
"export_profile": "sale",
|
|
12
10
|
"primitive_inventory": {
|
|
13
11
|
"assistant": 1,
|
|
14
|
-
"domain": 1,
|
|
15
12
|
"page": 1,
|
|
13
|
+
"resource": 1,
|
|
16
14
|
"security_role": 1,
|
|
17
15
|
"rule": 1,
|
|
18
16
|
"workflow": 1
|
|
@@ -20,18 +18,16 @@
|
|
|
20
18
|
"dependencies": {
|
|
21
19
|
"primitives": [
|
|
22
20
|
"assistant",
|
|
23
|
-
"domain",
|
|
24
21
|
"page",
|
|
22
|
+
"resource",
|
|
25
23
|
"rule",
|
|
26
24
|
"security_role",
|
|
27
25
|
"workflow"
|
|
28
26
|
],
|
|
29
|
-
"extensions": [
|
|
30
|
-
"festech"
|
|
31
|
-
],
|
|
27
|
+
"extensions": [],
|
|
32
28
|
"migrations": [],
|
|
33
29
|
"integrity": {
|
|
34
|
-
"content_hash": "sha256:
|
|
30
|
+
"content_hash": "sha256:d6a75528fe31895ef026e5e8ec9d0eb0ec31a731315bbdd859f79a7af3b119f8",
|
|
35
31
|
"ssss_core_version": "0.9"
|
|
36
32
|
}
|
|
37
33
|
},
|
|
@@ -59,12 +55,12 @@
|
|
|
59
55
|
"required": false
|
|
60
56
|
},
|
|
61
57
|
{
|
|
62
|
-
"id": "bind-
|
|
63
|
-
"label": "Bind
|
|
64
|
-
"system": "
|
|
58
|
+
"id": "bind-resource",
|
|
59
|
+
"label": "Bind resource",
|
|
60
|
+
"system": "accounts",
|
|
65
61
|
"mode": "provision",
|
|
66
62
|
"required": true,
|
|
67
|
-
"notes": "
|
|
63
|
+
"notes": "resource_bound requirement"
|
|
68
64
|
}
|
|
69
65
|
],
|
|
70
66
|
"parameters": [
|
|
@@ -92,21 +88,12 @@
|
|
|
92
88
|
"scope": "workspace",
|
|
93
89
|
"source": "user",
|
|
94
90
|
"required": false
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"key": "domain_registrar",
|
|
98
|
-
"label": "domain registrar",
|
|
99
|
-
"type": "string",
|
|
100
|
-
"scope": "workspace",
|
|
101
|
-
"source": "user",
|
|
102
|
-
"required": false,
|
|
103
|
-
"description": "Satisfies the domain resource requirement field 'registrar'."
|
|
104
91
|
}
|
|
105
92
|
],
|
|
106
93
|
"file_count": 14,
|
|
107
94
|
"provenance": {
|
|
108
|
-
"content_hash": "sha256:
|
|
109
|
-
"exporter": "@gregiteen/ssss-cli@0.14.
|
|
95
|
+
"content_hash": "sha256:d6a75528fe31895ef026e5e8ec9d0eb0ec31a731315bbdd859f79a7af3b119f8",
|
|
96
|
+
"exporter": "@gregiteen/ssss-cli@0.14.3"
|
|
110
97
|
}
|
|
111
98
|
},
|
|
112
99
|
"files": [
|
|
@@ -118,14 +105,6 @@
|
|
|
118
105
|
"path": "assistants/index.md",
|
|
119
106
|
"content": "# Index — assistants\n\n- [Festival Concierge](./concierge.md)\n"
|
|
120
107
|
},
|
|
121
|
-
{
|
|
122
|
-
"path": "domains/festival.md",
|
|
123
|
-
"content": "---\ntype: domain\ntitle: Festival Domain Requirement\ndescription: Domain resource requirement that the buyer binds during provisioning.\ntimestamp: \"2026-07-02T00:00:00Z\"\ndomain_name: REQUIREMENT\nregistrar: REQUIREMENT\nstatus: required\npayment_status: unbound\nx_portability: resource_bound\n---\nThis festival needs a domain. The buyer binds their own at provision (owns_domain)."
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"path": "domains/index.md",
|
|
127
|
-
"content": "# Index — domains\n\n- [Festival Domain Requirement](./festival.md)\n"
|
|
128
|
-
},
|
|
129
108
|
{
|
|
130
109
|
"path": "pages/index.md",
|
|
131
110
|
"content": "# Index — pages\n\n- [Lineup](./lineup.md)\n"
|
|
@@ -134,6 +113,14 @@
|
|
|
134
113
|
"path": "pages/lineup.md",
|
|
135
114
|
"content": "---\ntype: page\ntitle: Lineup\ndescription: Public-facing festival lineup page.\ntimestamp: 2026-07-02T00:00:00Z\nslug: lineup\nname: Lineup\nsandbox_entry: lineup/index.html\n---\nThe festival lineup page."
|
|
136
115
|
},
|
|
116
|
+
{
|
|
117
|
+
"path": "resources/domain.md",
|
|
118
|
+
"content": "---\ntype: resource\ntitle: Festival Domain Requirement\ndescription: Domain resource requirement that the buyer binds during provisioning.\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: Festival Domain\nkind: domain\nstatus: pending\nbinds: REQUIREMENT\nx_portability: resource_bound\n---\nThis festival needs a domain. The buyer binds their own at provision."
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"path": "resources/index.md",
|
|
122
|
+
"content": "# Index — resources\n\n- [Festival Domain Requirement](./domain.md)\n"
|
|
123
|
+
},
|
|
137
124
|
{
|
|
138
125
|
"path": "roles/admin/ROLE.md",
|
|
139
126
|
"content": "---\ntype: security_role\ntitle: Administrator Role\ndescription: Security role with full festival operations write access.\ntimestamp: 2026-07-02T00:00:00Z\nname: Administrator\npermissions:\n - \"write:assistant\"\n - \"write:workflow\"\n - \"write:rule\"\n - \"write:domain\"\n - \"write:page\"\n - \"write:security_role\"\n - \"write:task\"\n---\nFull access to all festival operations."
|
package/docs/help/bundle.md
CHANGED
|
@@ -14,7 +14,7 @@ integrity. The container file is conventionally named `*.ucw.json`.
|
|
|
14
14
|
"version": "0.1.0",
|
|
15
15
|
"exported_at": "1970-01-01T00:00:00.000Z", // frozen → deterministic export
|
|
16
16
|
"ssss_core_version": "0.7",
|
|
17
|
-
"required_extensions": ["
|
|
17
|
+
"required_extensions": ["acme"],
|
|
18
18
|
"export_profile": "sale", // backup | template | sale
|
|
19
19
|
"primitive_inventory": { "workflow": 1, "page": 1, "rule": 1, "assistant": 1, "domain": 1 },
|
|
20
20
|
"provisioning": [ /* steps, see `ssss help provisioning` */ ],
|
package/docs/help/overview.md
CHANGED
|
@@ -13,13 +13,14 @@ kernel, a registry-driven validator, multilingual semantic adapters, and the
|
|
|
13
13
|
| Piece | Where | What it is |
|
|
14
14
|
|-------|-------|------------|
|
|
15
15
|
| Spec | `docs/ssss-spec.md` | The normative standard. |
|
|
16
|
-
| Core registry | `registry/core.json` |
|
|
16
|
+
| Core registry | `registry/core.json` | 20 document primitives + 5 contract primitives; semantic (§11.9), bundle (§16), and provisioning (§17) rules. |
|
|
17
|
+
| JSON Schemas | `schemas/` | Draft 2020-12 schemas (`core-registry.schema.json`, `bundle.schema.json`) + `src/schema-validator.mjs`. |
|
|
17
18
|
| Kernel | `src/kernel.mjs` | Shared 0.9 mutation authority (`kernel.execute`) used by hosts and the reference engine. |
|
|
18
19
|
| Engine | `src/engine.mjs` | Compatibility façade over the kernel for the §6 Operation Contract. |
|
|
19
20
|
| Runtime | `src/runtime.mjs` | The §11.8 workflow trigger → event/task/run envelope planner. |
|
|
20
21
|
| Semantic | `src/semantic.mjs` | Lexical evidence, multilingual embeddings, privacy filters, and runtime rendering (§11.9). |
|
|
21
22
|
| Adapters | `src/vfs.mjs`, `leases.mjs`, `events.mjs`, … | Host-injectable storage/security/projection contracts. |
|
|
22
|
-
| Bundle | `src/bundle.mjs` | export / validate / provision / import (§16–§17). |
|
|
23
|
+
| Bundle | `src/bundle.mjs` | export / validate / provision / import / upgrade (§16–§17). |
|
|
23
24
|
| Conformance | `conformance/` | Fixtures every host must pass. |
|
|
24
25
|
|
|
25
26
|
## The lifecycle
|
|
@@ -32,10 +33,6 @@ vault ──export──▶ .ucw bundle ──provision──▶ envelope plan
|
|
|
32
33
|
## Commands
|
|
33
34
|
|
|
34
35
|
Run `ssss help <topic>` for any of:
|
|
35
|
-
`
|
|
36
|
-
`export`, `provision`, `import`, `conformance`, `autolink`, `leases`,
|
|
37
|
-
`concurrency`.
|
|
36
|
+
`autolink`, `bundle`, `concurrency`, `conformance`, `export`, `import`, `leases`, `overview`, `portability`, `provision`, `provisioning`, `roles`, `runtime`, `scaffold`, `schema`, `semantic`.
|
|
38
37
|
|
|
39
|
-
Run `ssss <command> --help` for: `export`, `
|
|
40
|
-
`import`, `semantic`, `primitive`, `registry`, `adapter`, `migrate`,
|
|
41
|
-
`autolink`, `conformance`.
|
|
38
|
+
Run `ssss <command> --help` for: `adapter`, `bridge`, `export`, `help`, `import`, `inspect`, `migrate`, `new`, `primitive`, `provision`, `registry`, `schema`, `semantic`, `serve`, `upgrade`, `validate`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# JSON Schemas (Draft 2020-12, spec §5 / §16)
|
|
2
|
+
|
|
3
|
+
Canonical Draft 2020-12 JSON Schemas for SSSS core/extension registries and `.ucw` transport bundles.
|
|
4
|
+
|
|
5
|
+
## Shipped schema files
|
|
6
|
+
|
|
7
|
+
| Schema | Path / Subpath export | Governs |
|
|
8
|
+
|--------|-----------------------|---------|
|
|
9
|
+
| Core & Extension Registry | `@gregiteen/ssss-cli/schemas/core-registry.schema.json` | `registry/core.json`, `registry/extensions/*.json`, and runtime extension registries (§5). |
|
|
10
|
+
| `.ucw` Bundle | `@gregiteen/ssss-cli/schemas/bundle.schema.json` | `.ucw` transport bundle containers and manifests (§16). |
|
|
11
|
+
|
|
12
|
+
Both schemas enforce `"additionalProperties": false` on structured objects so unknown or misspelled properties fail closed.
|
|
13
|
+
|
|
14
|
+
## CLI commands
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
ssss schema core # Print the core/extension registry schema
|
|
18
|
+
ssss schema bundle --out ./bundle.schema.json # Write the bundle schema to a file
|
|
19
|
+
ssss schema export --out ./schemas # Copy both schemas into a directory
|
|
20
|
+
ssss schema validate registry/core.json # Validate a registry or bundle JSON file
|
|
21
|
+
ssss schema validate festival.ucw.json --type bundle # Explicit schema kind
|
|
22
|
+
ssss schema validate custom.json --json # Machine-readable validation report
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Programmatic API (`@gregiteen/ssss-cli/schema-validator`)
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import {
|
|
29
|
+
getCoreRegistrySchema,
|
|
30
|
+
getBundleSchema,
|
|
31
|
+
validateRegistryAgainstSchema,
|
|
32
|
+
validateBundleAgainstSchema,
|
|
33
|
+
validateJsonSchema,
|
|
34
|
+
} from '@gregiteen/ssss-cli/schema-validator';
|
|
35
|
+
|
|
36
|
+
const { valid, errors } = validateRegistryAgainstSchema(myExtensionRegistry);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Commands: `ssss schema`, `ssss registry`, `ssss validate`.
|
|
40
|
+
See also: `ssss help bundle`, `ssss help overview`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gregiteen/ssss-cli",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
4
4
|
"description": "CLI tools and the reference engine for the Structured Semantic Syntax System",
|
|
5
5
|
"main": "src/engine.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -32,7 +32,11 @@
|
|
|
32
32
|
"./conformance/fixtures.json": "./conformance/fixtures.json",
|
|
33
33
|
"./conformance/reference-bundle.ucw.json": "./conformance/reference-bundle.ucw.json",
|
|
34
34
|
"./registry/core.json": "./registry/core.json",
|
|
35
|
-
"./schema-validator":
|
|
35
|
+
"./schema-validator": {
|
|
36
|
+
"types": "./types/schema-validator.d.ts",
|
|
37
|
+
"import": "./src/schema-validator.mjs",
|
|
38
|
+
"default": "./src/schema-validator.mjs"
|
|
39
|
+
},
|
|
36
40
|
"./schemas/*": "./schemas/*",
|
|
37
41
|
"./package.json": "./package.json"
|
|
38
42
|
},
|
package/registry/core.json
CHANGED
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
"classes": {
|
|
270
270
|
"structural": "The reusable business model — sellable and templatable. Carries no operator- or customer-specific data. Examples: workflow, assistant, page, skill, model, rule, memory, migration, release.",
|
|
271
271
|
"tenant_private": "The operator's private operational data — customers, transcripts, runtime work. NEVER leaves the workspace in a template or sale bundle; included only in an encrypted backup. Examples: conversation, run, task, conflict, and (via extension) profile / CRM contact / deal.",
|
|
272
|
-
"resource_bound": "Requires a real external resource bound at provision time (a domain, phone number, mailbox, API connection). NEVER ships the seller's resource value; ships only a requirement declaration the buyer satisfies. Defined by extension registries (e.g.
|
|
272
|
+
"resource_bound": "Requires a real external resource bound at provision time (a domain, phone number, mailbox, API connection). NEVER ships the seller's resource value; ships only a requirement declaration the buyer satisfies. Defined by extension registries (e.g. a domain, phone_number, or integration_connection primitive)."
|
|
273
273
|
},
|
|
274
274
|
"export_profiles": {
|
|
275
275
|
"backup": { "includes": ["structural", "tenant_private", "resource_bound"], "note": "Complete fidelity copy. tenant_private MUST be encrypted at rest." },
|
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
"manifest",
|
|
9
9
|
"files"
|
|
10
10
|
],
|
|
11
|
+
"additionalProperties": false,
|
|
11
12
|
"properties": {
|
|
13
|
+
"$schema": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
12
17
|
"manifest": {
|
|
13
18
|
"$ref": "#/$defs/bundleManifest"
|
|
14
19
|
},
|
|
@@ -29,9 +34,11 @@
|
|
|
29
34
|
"path",
|
|
30
35
|
"content"
|
|
31
36
|
],
|
|
37
|
+
"additionalProperties": false,
|
|
32
38
|
"properties": {
|
|
33
39
|
"path": {
|
|
34
|
-
"type": "string"
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1
|
|
35
42
|
},
|
|
36
43
|
"content": {
|
|
37
44
|
"type": "string"
|
|
@@ -53,27 +60,34 @@
|
|
|
53
60
|
"file_count",
|
|
54
61
|
"provenance"
|
|
55
62
|
],
|
|
63
|
+
"additionalProperties": false,
|
|
56
64
|
"properties": {
|
|
57
65
|
"name": {
|
|
58
|
-
"type": "string"
|
|
66
|
+
"type": "string",
|
|
67
|
+
"minLength": 1
|
|
59
68
|
},
|
|
60
69
|
"description": {
|
|
61
70
|
"type": "string"
|
|
62
71
|
},
|
|
63
72
|
"version": {
|
|
64
|
-
"type": "string"
|
|
73
|
+
"type": "string",
|
|
74
|
+
"minLength": 1
|
|
65
75
|
},
|
|
66
76
|
"exported_at": {
|
|
67
|
-
"type": "string"
|
|
77
|
+
"type": "string",
|
|
78
|
+
"minLength": 1
|
|
68
79
|
},
|
|
69
80
|
"ssss_core_version": {
|
|
70
|
-
"type": "string"
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1
|
|
71
83
|
},
|
|
72
84
|
"required_extensions": {
|
|
73
85
|
"type": "array",
|
|
74
86
|
"items": {
|
|
75
|
-
"type": "string"
|
|
76
|
-
|
|
87
|
+
"type": "string",
|
|
88
|
+
"minLength": 1
|
|
89
|
+
},
|
|
90
|
+
"uniqueItems": true
|
|
77
91
|
},
|
|
78
92
|
"export_profile": {
|
|
79
93
|
"type": "string",
|
|
@@ -82,38 +96,51 @@
|
|
|
82
96
|
"primitive_inventory": {
|
|
83
97
|
"type": "object",
|
|
84
98
|
"additionalProperties": {
|
|
85
|
-
"type": "integer"
|
|
99
|
+
"type": "integer",
|
|
100
|
+
"minimum": 0
|
|
86
101
|
}
|
|
87
102
|
},
|
|
88
103
|
"dependencies": {
|
|
89
104
|
"type": "object",
|
|
105
|
+
"additionalProperties": false,
|
|
90
106
|
"properties": {
|
|
91
107
|
"primitives": {
|
|
92
108
|
"type": "array",
|
|
93
|
-
"items": { "type": "string" }
|
|
109
|
+
"items": { "type": "string", "minLength": 1 },
|
|
110
|
+
"uniqueItems": true
|
|
94
111
|
},
|
|
95
112
|
"extensions": {
|
|
96
113
|
"type": "array",
|
|
97
|
-
"items": { "type": "string" }
|
|
114
|
+
"items": { "type": "string", "minLength": 1 },
|
|
115
|
+
"uniqueItems": true
|
|
98
116
|
},
|
|
99
117
|
"migrations": {
|
|
100
118
|
"type": "array",
|
|
101
|
-
"items": { "type": "string" }
|
|
119
|
+
"items": { "type": "string", "minLength": 1 },
|
|
120
|
+
"uniqueItems": true
|
|
102
121
|
},
|
|
103
122
|
"integrity": {
|
|
104
123
|
"type": "object",
|
|
124
|
+
"additionalProperties": false,
|
|
105
125
|
"properties": {
|
|
106
|
-
"content_hash": {
|
|
107
|
-
|
|
126
|
+
"content_hash": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
129
|
+
},
|
|
130
|
+
"ssss_core_version": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"minLength": 1
|
|
133
|
+
}
|
|
108
134
|
}
|
|
109
135
|
},
|
|
110
136
|
"bundles": {
|
|
111
137
|
"type": "array",
|
|
112
138
|
"items": {
|
|
113
139
|
"type": "object",
|
|
140
|
+
"additionalProperties": false,
|
|
114
141
|
"properties": {
|
|
115
|
-
"id": { "type": "string" },
|
|
116
|
-
"name": { "type": "string" },
|
|
142
|
+
"id": { "type": "string", "minLength": 1 },
|
|
143
|
+
"name": { "type": "string", "minLength": 1 },
|
|
117
144
|
"version": { "type": "string" },
|
|
118
145
|
"installMode": {
|
|
119
146
|
"type": "string",
|
|
@@ -137,7 +164,8 @@
|
|
|
137
164
|
}
|
|
138
165
|
},
|
|
139
166
|
"file_count": {
|
|
140
|
-
"type": "integer"
|
|
167
|
+
"type": "integer",
|
|
168
|
+
"minimum": 0
|
|
141
169
|
},
|
|
142
170
|
"provenance": {
|
|
143
171
|
"type": "object",
|
|
@@ -145,20 +173,25 @@
|
|
|
145
173
|
"content_hash",
|
|
146
174
|
"exporter"
|
|
147
175
|
],
|
|
176
|
+
"additionalProperties": false,
|
|
148
177
|
"properties": {
|
|
149
178
|
"content_hash": {
|
|
150
|
-
"type": "string"
|
|
179
|
+
"type": "string",
|
|
180
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
151
181
|
},
|
|
152
182
|
"exporter": {
|
|
153
|
-
"type": "string"
|
|
183
|
+
"type": "string",
|
|
184
|
+
"minLength": 1
|
|
154
185
|
},
|
|
155
186
|
"signature": {
|
|
156
|
-
"type": "string"
|
|
187
|
+
"type": "string",
|
|
188
|
+
"minLength": 1
|
|
157
189
|
}
|
|
158
190
|
}
|
|
159
191
|
},
|
|
160
192
|
"source_workspace_id": {
|
|
161
|
-
"type": "string"
|
|
193
|
+
"type": "string",
|
|
194
|
+
"minLength": 1
|
|
162
195
|
},
|
|
163
196
|
"branding": {
|
|
164
197
|
"type": "object"
|
|
@@ -174,12 +207,15 @@
|
|
|
174
207
|
"mode",
|
|
175
208
|
"required"
|
|
176
209
|
],
|
|
210
|
+
"additionalProperties": false,
|
|
177
211
|
"properties": {
|
|
178
212
|
"id": {
|
|
179
|
-
"type": "string"
|
|
213
|
+
"type": "string",
|
|
214
|
+
"minLength": 1
|
|
180
215
|
},
|
|
181
216
|
"label": {
|
|
182
|
-
"type": "string"
|
|
217
|
+
"type": "string",
|
|
218
|
+
"minLength": 1
|
|
183
219
|
},
|
|
184
220
|
"system": {
|
|
185
221
|
"type": "string",
|
|
@@ -223,18 +259,23 @@
|
|
|
223
259
|
"scope",
|
|
224
260
|
"source"
|
|
225
261
|
],
|
|
262
|
+
"additionalProperties": false,
|
|
226
263
|
"properties": {
|
|
227
264
|
"key": {
|
|
228
|
-
"type": "string"
|
|
265
|
+
"type": "string",
|
|
266
|
+
"minLength": 1
|
|
229
267
|
},
|
|
230
268
|
"label": {
|
|
231
|
-
"type": "string"
|
|
269
|
+
"type": "string",
|
|
270
|
+
"minLength": 1
|
|
232
271
|
},
|
|
233
272
|
"type": {
|
|
234
|
-
"type": "string"
|
|
273
|
+
"type": "string",
|
|
274
|
+
"minLength": 1
|
|
235
275
|
},
|
|
236
276
|
"scope": {
|
|
237
|
-
"type": "string"
|
|
277
|
+
"type": "string",
|
|
278
|
+
"minLength": 1
|
|
238
279
|
},
|
|
239
280
|
"source": {
|
|
240
281
|
"type": "string",
|