@gregiteen/ssss-cli 0.14.1 → 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 +43 -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/docs/ssss-spec.md +6 -3
- package/package.json +8 -1
- package/registry/core.json +2 -2
- package/schemas/bundle.schema.json +300 -0
- package/schemas/core-registry.schema.json +553 -0
- package/scripts/build-reference-bundle.mjs +9 -10
- package/scripts/check-commit-durability.mjs +1 -0
- package/scripts/check-docs-parity.mjs +38 -0
- package/scripts/cmd-new.mjs +79 -18
- package/scripts/cmd-schema.mjs +152 -0
- package/scripts/conformance-09.mjs +41 -0
- package/scripts/conformance.mjs +40 -2
- package/scripts/ssss.mjs +2 -0
- package/scripts/sync-docs.mjs +56 -0
- package/skills/ssss/SKILL.md +1 -1
- package/skills/ssss/core/SKILL.md +2 -2
- package/skills/ssss/core/references/core-registry.json +2 -2
- package/skills/ssss/core/references/ssss-spec.md +6 -3
- package/src/bundle.mjs +1 -0
- package/src/registry.mjs +9 -2
- package/src/schema-validator.mjs +315 -0
- 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,49 @@ 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
|
+
|
|
32
|
+
## [0.14.2] - 2026-11-02
|
|
33
|
+
### Added
|
|
34
|
+
- **Canonical JSON Schema Draft 2020-12 Definitions (`JSON_SCHEMA_EXPORT`)**:
|
|
35
|
+
- `schemas/core-registry.schema.json`: Formal JSON Schema Draft 2020-12 defining the full structure of `registry/core.json` and extension registries (document primitives, contract primitives, universal frontmatter, portability classes and export profiles, bundle manifest specifications, provisioning steps and relations, runtime contracts, and semantic search fields).
|
|
36
|
+
- `schemas/bundle.schema.json`: Formal JSON Schema Draft 2020-12 defining the container format for Universal Cloud Workspace (`.ucw`) transport bundles, covering `manifest`, `files`, `dependencies`, `parameters`, `provisioning`, `provenance`, and optional `branding`.
|
|
37
|
+
- `registry/core.json`: Updated `$schema` URI to point to `https://ssss.dev/schemas/core-registry.schema.json`.
|
|
38
|
+
- **Zero-Dependency Schema Validation**:
|
|
39
|
+
- `src/schema-validator.mjs`: High-performance, recursive JSON Schema Draft 2020-12 validator in pure Node ESM supporting `type` unions, `properties`, `additionalProperties`, `required`, `items`, `enum`, `pattern`, and local `$defs`/`$ref` pointers.
|
|
40
|
+
- Exported `./schema-validator` and `./schemas/*` via package exports and added `"schemas"` to npm package distribution files.
|
|
41
|
+
- **CLI Schema Inspection & Export**:
|
|
42
|
+
- `scripts/cmd-schema.mjs`: Added `ssss schema core`, `ssss schema bundle`, and `ssss schema export [--out <dir>]` subcommands to output and export canonical JSON Schemas.
|
|
43
|
+
- **Automated Conformance Sweeps**:
|
|
44
|
+
- `scripts/conformance-09.mjs`: Integrated automated schema validation checks into continuous test suites, verifying `registry/core.json` and `conformance/reference-bundle.ucw.json` against canonical schemas with negative mutation testing.
|
|
45
|
+
- **Specification and Backlog Hygiene**:
|
|
46
|
+
- `docs/ssss-spec.md`: Documented canonical JSON Schema references in §5.1 and §16.1.
|
|
47
|
+
- Resolved and closed all outstanding host deferral items in `docs/projects/DEFERRED_BACKLOG.md`.
|
|
48
|
+
|
|
49
|
+
### Behavior changes hosts should check
|
|
50
|
+
- Tools and IDEs may validate `registry/core.json` and `.ucw` bundle files directly against `schemas/core-registry.schema.json` and `schemas/bundle.schema.json`.
|
|
51
|
+
- The CLI command `ssss schema export` is now available to export canonical schema definitions for external consumption.
|
|
52
|
+
|
|
10
53
|
## [0.14.1] - 2026-11-02
|
|
11
54
|
### Added
|
|
12
55
|
- **Core primitive aliasing (`role` ↔ `security_role`, `thread` ↔ `conversation`)**:
|
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/docs/ssss-spec.md
CHANGED
|
@@ -261,8 +261,9 @@ primitive — it implements the subset its product requires — but any primitiv
|
|
|
261
261
|
| `primitive` | meta | structural | A governed, versioned definition for a namespaced SSSS primitive. |
|
|
262
262
|
|
|
263
263
|
The **Portability** column is the primitive's default portability class (§5.5); a host
|
|
264
|
-
resolves it from `registry/core.json`.
|
|
265
|
-
|
|
264
|
+
resolves it from `registry/core.json`. The canonical machine-readable registry conforms to the
|
|
265
|
+
JSON Schema (Draft 2020-12) published in `schemas/core-registry.schema.json`. Extension registries
|
|
266
|
+
assign their own primitives a class — notably `resource_bound` for things like domains and phone numbers.
|
|
266
267
|
|
|
267
268
|
### 5.2 Contract Primitives
|
|
268
269
|
|
|
@@ -1869,7 +1870,9 @@ A bundle is a JSON object with three top-level members:
|
|
|
1869
1870
|
```
|
|
1870
1871
|
|
|
1871
1872
|
`files` MUST be sorted by `path` (§16.3 order) so that two exports of the same vault state
|
|
1872
|
-
are identical and content-hashable (§16.3, `provenance.content_hash`).
|
|
1873
|
+
are identical and content-hashable (§16.3, `provenance.content_hash`). The normative JSON Schema
|
|
1874
|
+
(Draft 2020-12) for `.ucw` bundle containers is published in `schemas/bundle.schema.json` and
|
|
1875
|
+
exportable via the CLI command `ssss schema bundle`.
|
|
1873
1876
|
|
|
1874
1877
|
### 16.2 The Manifest
|
|
1875
1878
|
|
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,6 +32,12 @@
|
|
|
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": {
|
|
36
|
+
"types": "./types/schema-validator.d.ts",
|
|
37
|
+
"import": "./src/schema-validator.mjs",
|
|
38
|
+
"default": "./src/schema-validator.mjs"
|
|
39
|
+
},
|
|
40
|
+
"./schemas/*": "./schemas/*",
|
|
35
41
|
"./package.json": "./package.json"
|
|
36
42
|
},
|
|
37
43
|
"bin": {
|
|
@@ -43,6 +49,7 @@
|
|
|
43
49
|
},
|
|
44
50
|
"files": [
|
|
45
51
|
"src",
|
|
52
|
+
"schemas",
|
|
46
53
|
"types",
|
|
47
54
|
"scripts",
|
|
48
55
|
"registry",
|
package/registry/core.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://ssss.dev/registry
|
|
2
|
+
"$schema": "https://ssss.dev/schemas/core-registry.schema.json",
|
|
3
3
|
"registry": "core",
|
|
4
4
|
"spec_version": "0.9",
|
|
5
5
|
"description": "The canonical SSSS core registry and semantic application-kernel contract. Core primitives are qualified as ssss:<name>; applications define namespaced primitives through layered extension registries without copying or redefining core behavior.",
|
|
@@ -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." },
|