@gregiteen/ssss-cli 0.8.0 → 0.9.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.
- package/README.md +11 -12
- package/VERSION +1 -1
- package/conformance/README.md +1 -1
- package/conformance/fixtures.json +4 -48
- package/conformance/reference-bundle.ucw.json +4 -21
- package/docs/help/bundle.md +2 -2
- package/docs/help/overview.md +4 -4
- package/docs/help/semantic.md +5 -4
- package/docs/ssss-spec.md +32 -77
- package/package.json +22 -3
- package/registry/core.json +21 -28
- package/scripts/build-reference-bundle.mjs +0 -20
- package/scripts/cmd-adapter.mjs +29 -0
- package/scripts/cmd-import.mjs +1 -1
- package/scripts/cmd-migrate.mjs +26 -0
- package/scripts/cmd-new.mjs +5 -5
- package/scripts/cmd-primitive.mjs +48 -0
- package/scripts/cmd-registry.mjs +25 -0
- package/scripts/cmd-semantic.mjs +6 -8
- package/scripts/conformance-09.mjs +199 -0
- package/scripts/conformance.mjs +106 -186
- package/scripts/ssss.mjs +8 -2
- package/skills/ssss/SKILL.md +11 -15
- package/skills/ssss/evals/evals.json +3 -3
- package/skills/ssss/references/contract-reference.md +7 -8
- package/skills/ssss/scripts/validate-schema.mjs +1 -44
- package/src/authorization.mjs +61 -0
- package/src/bundle.mjs +4 -4
- package/src/engine.mjs +101 -503
- package/src/events.mjs +90 -0
- package/src/guard.mjs +32 -0
- package/src/http.mjs +26 -0
- package/src/idempotency.mjs +55 -0
- package/src/kernel.mjs +260 -0
- package/src/leases.mjs +125 -0
- package/src/primitive.mjs +227 -0
- package/src/projections.mjs +62 -0
- package/src/registry.mjs +190 -39
- package/src/semantic.mjs +124 -316
- package/src/ui.mjs +100 -0
- package/src/validator.mjs +87 -0
- package/src/vfs.mjs +203 -0
- package/types/kernel.d.ts +48 -0
- package/docs/help/localization.md +0 -43
- package/scripts/cmd-localize.mjs +0 -44
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
> Turn a running business into a single tradeable file — *a festival in a box.*
|
|
5
5
|
|
|
6
6
|
[](conformance/)
|
|
7
|
-
[](docs/ssss-spec.md)
|
|
8
8
|
[](docs/ssss-spec.md)
|
|
9
9
|
|
|
10
10
|
SSSS is the vendor-neutral standard and reference implementation shared by
|
|
@@ -16,8 +16,8 @@ SSSS is the vendor-neutral standard and reference implementation shared by
|
|
|
16
16
|
`event` / `delete`) for mutating a vault, with idempotency replay and audit.
|
|
17
17
|
- **The Workflow Runtime Contract** (§11.8) — workflows own triggers; daemons,
|
|
18
18
|
crons, and webhooks derive idempotent event/task/run envelopes from the vault.
|
|
19
|
-
- **
|
|
20
|
-
|
|
19
|
+
- **Multilingual semantic runtime** (§11.9) — deterministic lexical evidence,
|
|
20
|
+
injected multilingual embeddings, and runtime rendering with symbolic controls fixed.
|
|
21
21
|
- **Portability classification** (§5.5) — the keystone: every primitive is
|
|
22
22
|
`structural`, `tenant_private`, or `resource_bound`, so a vault can be *sold*
|
|
23
23
|
without leaking the operator's private data.
|
|
@@ -80,7 +80,6 @@ ssss import festival.ucw.json --vault ./new-tenant \
|
|
|
80
80
|
| `ssss provision <bundle>` | Plan an install: params + link integrity → envelopes (§17). |
|
|
81
81
|
| `ssss import <bundle>` | Replay a bundle/plan into a vault via the engine (idempotent). |
|
|
82
82
|
| `ssss semantic <vault>` | Build or query a deterministic, privacy-safe semantic index (§11.9). |
|
|
83
|
-
| `ssss localize <vault>` | Materialize approved translations as a derived projection outside the vault. |
|
|
84
83
|
| `ssss autolink [dir]` | Generate OKF wiki-links across a vault. |
|
|
85
84
|
| `ssss conformance` | Run the canonical conformance suite (§12). |
|
|
86
85
|
| `ssss help [topic]` | Local docs: `runtime`, `portability`, `bundle`, `provisioning`, `leases`, … |
|
|
@@ -93,7 +92,7 @@ Run `ssss <command> --help` for flags, or `ssss help <topic>` for concepts.
|
|
|
93
92
|
import { createEngine } from '@gregiteen/ssss-cli/engine';
|
|
94
93
|
import { exportBundle, validateBundle, provisionBundle, importBundle } from '@gregiteen/ssss-cli/bundle';
|
|
95
94
|
import { planWorkflowTrigger } from '@gregiteen/ssss-cli/runtime';
|
|
96
|
-
import { buildSemanticIndex, searchSemanticIndex,
|
|
95
|
+
import { buildSemanticIndex, searchSemanticIndex, renderSemanticRecord } from '@gregiteen/ssss-cli/semantic';
|
|
97
96
|
|
|
98
97
|
const bundle = exportBundle('./my-vault', { profile: 'sale', name: 'Festival in a Box' });
|
|
99
98
|
const { valid, errors } = validateBundle(bundle);
|
|
@@ -119,9 +118,9 @@ const runtimePlan = planWorkflowTrigger({
|
|
|
119
118
|
scheduledFor: '2026-07-02T14:00:00.000Z',
|
|
120
119
|
});
|
|
121
120
|
|
|
122
|
-
const index = buildSemanticIndex('./my-vault'
|
|
121
|
+
const index = buildSemanticIndex('./my-vault');
|
|
123
122
|
const matches = searchSemanticIndex(index, 'política de reembolsos');
|
|
124
|
-
|
|
123
|
+
const rendered = await renderSemanticRecord(matches[0].document, { language: 'es', render: renderer });
|
|
125
124
|
```
|
|
126
125
|
|
|
127
126
|
Exports: `@gregiteen/ssss-cli` / `@gregiteen/ssss-cli/engine` (Operation Contract engine),
|
|
@@ -129,9 +128,9 @@ Exports: `@gregiteen/ssss-cli` / `@gregiteen/ssss-cli/engine` (Operation Contrac
|
|
|
129
128
|
`@gregiteen/ssss-cli/runtime`, `@gregiteen/ssss-cli/semantic`,
|
|
130
129
|
`@gregiteen/ssss-cli/frontmatter`.
|
|
131
130
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
Canonical content is authored once in any language. Multilingual embedding and render
|
|
132
|
+
adapters handle cross-language retrieval and presentation at runtime; primitive IDs,
|
|
133
|
+
field IDs, enum codes, permissions, paths, hashes, and relations never change.
|
|
135
134
|
|
|
136
135
|
## Portability — why a vault is safe to sell
|
|
137
136
|
|
|
@@ -158,13 +157,13 @@ npm test # == ssss conformance --engine
|
|
|
158
157
|
## Repository layout
|
|
159
158
|
|
|
160
159
|
```
|
|
161
|
-
docs/ssss-spec.md The normative specification (v0.
|
|
160
|
+
docs/ssss-spec.md The normative specification (v0.9 draft).
|
|
162
161
|
docs/help/ Topic docs surfaced by `ssss help`.
|
|
163
162
|
registry/core.json 15 document + 5 contract primitives; semantic, bundle & provisioning schemas.
|
|
164
163
|
registry/extensions/ Application extension registries (e.g. festech).
|
|
165
164
|
src/engine.mjs Operation Contract engine (§6).
|
|
166
165
|
src/runtime.mjs Workflow trigger → event/task/run envelope planning (§11.8).
|
|
167
|
-
src/semantic.mjs
|
|
166
|
+
src/semantic.mjs Multilingual semantic retrieval + runtime rendering (§11.9).
|
|
168
167
|
src/bundle.mjs export / validate / provision / import (§16–§17).
|
|
169
168
|
src/registry.mjs Registry-driven type + portability resolution.
|
|
170
169
|
src/frontmatter.mjs Zero-dependency YAML frontmatter.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.9.0
|
package/conformance/README.md
CHANGED
|
@@ -33,7 +33,7 @@ The runner validates that the fixture file is well-formed and that every
|
|
|
33
33
|
`expected_response` is internally consistent with the envelope rules. With
|
|
34
34
|
`--engine`, it replays every fixture through the reference engine (`src/engine.mjs`),
|
|
35
35
|
checks workflow runtime planning (`src/runtime.mjs`, spec §11.8), extension-registry
|
|
36
|
-
collision/schema/symlink safety
|
|
36
|
+
collision/schema/symlink safety and multilingual semantic retrieval/rendering (`src/semantic.mjs`,
|
|
37
37
|
§11.9), runs regression coverage for patch serialization and leases (§6/§7), and
|
|
38
38
|
round-trips the
|
|
39
39
|
reference bundle (validate → provision → import → re-import, spec §16/§17)
|
|
@@ -747,66 +747,22 @@
|
|
|
747
747
|
},
|
|
748
748
|
{
|
|
749
749
|
"id": "fixture-024",
|
|
750
|
-
"name": "
|
|
751
|
-
"description": "
|
|
750
|
+
"name": "Multilingual source — valid Spanish structural rule",
|
|
751
|
+
"description": "Natural-language fields may be authored in any language while symbolic controls remain stable.",
|
|
752
752
|
"request": {
|
|
753
753
|
"type": "operation",
|
|
754
754
|
"idempotency_key": "35353535-3535-3535-3535-353535353535",
|
|
755
755
|
"path": "rules/translatable-refund-rule.md",
|
|
756
756
|
"workspace_id": "TEST_WORKSPACE_ID",
|
|
757
757
|
"actor": { "role": "system" },
|
|
758
|
-
"content": "---\ntype: rule\ntitle: \"
|
|
759
|
-
"intent": "Conformance fixture: create a structural
|
|
758
|
+
"content": "---\ntype: rule\ntitle: \"Política de reembolsos\"\ndescription: \"Explica cuándo están disponibles los reembolsos.\"\ntimestamp: \"2026-07-10T00:00:00Z\"\nname: refund-policy\nlanguage: es\n---\nLos reembolsos están disponibles antes de la fecha límite.",
|
|
759
|
+
"intent": "Conformance fixture: create a non-English structural source"
|
|
760
760
|
},
|
|
761
761
|
"expected_response": {
|
|
762
762
|
"success": true,
|
|
763
763
|
"type": "operation",
|
|
764
764
|
"validation": { "valid": true, "type": "rule", "errors": [] }
|
|
765
765
|
}
|
|
766
|
-
},
|
|
767
|
-
{
|
|
768
|
-
"id": "fixture-025",
|
|
769
|
-
"name": "Translation overlay — valid hash-bound Spanish projection",
|
|
770
|
-
"description": "A translation overlay with a safe source path, exact source hash, valid locale, and approved translatable fields must validate.",
|
|
771
|
-
"preconditions": ["fixture-024 must be committed first"],
|
|
772
|
-
"request": {
|
|
773
|
-
"type": "operation",
|
|
774
|
-
"idempotency_key": "36363636-3636-3636-3636-363636363636",
|
|
775
|
-
"path": "translations/es/rules/translatable-refund-rule.md",
|
|
776
|
-
"workspace_id": "TEST_WORKSPACE_ID",
|
|
777
|
-
"actor": { "role": "system" },
|
|
778
|
-
"content": "---\ntype: translation\ntitle: \"Spanish Refund Rule Translation\"\ndescription: \"Approved Spanish translation overlay conformance fixture.\"\ntimestamp: \"2026-07-10T00:00:00Z\"\ntranslation_id: translatable-refund-rule-es\nsource_path: rules/translatable-refund-rule.md\nsource_hash: sha256:bc61f36adc3aa1fa2c4da7a48841cb16bc56df0ec052f70d4ee8514a98dc6e62\nlocale: es\nstatus: approved\ntranslated_fields: [title, body]\ntranslated_title: Regla de reembolsos traducible\n---\nLos reembolsos están disponibles antes de la fecha límite.",
|
|
779
|
-
"intent": "Conformance fixture: valid translation primitive"
|
|
780
|
-
},
|
|
781
|
-
"expected_response": {
|
|
782
|
-
"success": true,
|
|
783
|
-
"type": "operation",
|
|
784
|
-
"validation": { "valid": true, "type": "translation", "errors": [] }
|
|
785
|
-
}
|
|
786
|
-
},
|
|
787
|
-
{
|
|
788
|
-
"id": "fixture-026",
|
|
789
|
-
"name": "Translation overlay — invalid locale is denied",
|
|
790
|
-
"description": "Registry pattern enforcement rejects non-BCP47 locale syntax before an invalid overlay can enter the vault.",
|
|
791
|
-
"preconditions": ["fixture-024 must be committed first"],
|
|
792
|
-
"request": {
|
|
793
|
-
"type": "operation",
|
|
794
|
-
"idempotency_key": "37373737-3737-3737-3737-373737373737",
|
|
795
|
-
"path": "translations/invalid/rules/translatable-refund-rule.md",
|
|
796
|
-
"workspace_id": "TEST_WORKSPACE_ID",
|
|
797
|
-
"actor": { "role": "system" },
|
|
798
|
-
"content": "---\ntype: translation\ntitle: \"Invalid Locale Translation\"\ndescription: \"Translation fixture that must be rejected.\"\ntimestamp: \"2026-07-10T00:00:00Z\"\ntranslation_id: invalid-locale-translation\nsource_path: rules/translatable-refund-rule.md\nsource_hash: sha256:bc61f36adc3aa1fa2c4da7a48841cb16bc56df0ec052f70d4ee8514a98dc6e62\nlocale: not_a_locale\nstatus: approved\ntranslated_fields: [title]\ntranslated_title: Invalid\n---\nInvalid.",
|
|
799
|
-
"intent": "Conformance fixture: invalid translation locale"
|
|
800
|
-
},
|
|
801
|
-
"expected_response": {
|
|
802
|
-
"success": false,
|
|
803
|
-
"validation": {
|
|
804
|
-
"valid": false,
|
|
805
|
-
"type": "translation",
|
|
806
|
-
"errors": ["Invalid format for field 'locale' on type 'translation'."]
|
|
807
|
-
}
|
|
808
|
-
},
|
|
809
|
-
"expected_http_status": 422
|
|
810
766
|
}
|
|
811
767
|
],
|
|
812
768
|
"error_codes": {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "A complete music-festival operation as a tradeable SSSS bundle.",
|
|
5
5
|
"version": "1.0.0",
|
|
6
6
|
"exported_at": "1970-01-01T00:00:00.000Z",
|
|
7
|
-
"ssss_core_version": "0.
|
|
7
|
+
"ssss_core_version": "0.9",
|
|
8
8
|
"required_extensions": [
|
|
9
9
|
"festech"
|
|
10
10
|
],
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"page": 1,
|
|
16
16
|
"security_role": 1,
|
|
17
17
|
"rule": 1,
|
|
18
|
-
"translation": 1,
|
|
19
18
|
"workflow": 1
|
|
20
19
|
},
|
|
21
20
|
"provisioning": [
|
|
@@ -86,10 +85,10 @@
|
|
|
86
85
|
"description": "Satisfies the domain resource requirement field 'registrar'."
|
|
87
86
|
}
|
|
88
87
|
],
|
|
89
|
-
"file_count":
|
|
88
|
+
"file_count": 14,
|
|
90
89
|
"provenance": {
|
|
91
|
-
"content_hash": "sha256:
|
|
92
|
-
"exporter": "@gregiteen/ssss-cli@0.
|
|
90
|
+
"content_hash": "sha256:7febd673938a3dc04c068e0bf08097a9783c09e612606d2df9a4db8dcb8907f5",
|
|
91
|
+
"exporter": "@gregiteen/ssss-cli@0.9.0"
|
|
93
92
|
}
|
|
94
93
|
},
|
|
95
94
|
"files": [
|
|
@@ -141,22 +140,6 @@
|
|
|
141
140
|
"path": "tasks/index.md",
|
|
142
141
|
"content": "# Index — tasks\n\n- [Ticket 4821 Seat Change](./ticket-4821.md)\n"
|
|
143
142
|
},
|
|
144
|
-
{
|
|
145
|
-
"path": "translations/es/index.md",
|
|
146
|
-
"content": "# Index — translations/es\n\n- [rules/](./rules/index.md)\n"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"path": "translations/es/rules/index.md",
|
|
150
|
-
"content": "# Index — translations/es/rules\n\n- [Spanish Refund Policy Translation](./refund-policy.md)\n"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"path": "translations/es/rules/refund-policy.md",
|
|
154
|
-
"content": "---\ntype: translation\ntitle: Spanish Refund Policy Translation\ndescription: Approved Spanish presentation overlay for the festival refund policy.\ntimestamp: 2026-07-10T00:00:00Z\ntranslation_id: refund-policy-es\nsource_path: rules/refund-policy.md\nsource_hash: sha256:a5f97ef9e2cc143d397f87a96c7fc20f4a3cd0515835c2ab659c9ac6db0d07e3\nlocale: es\nstatus: approved\ntranslated_fields: [title, description, body]\ntranslated_title: Política de reembolsos\ntranslated_description: Explica cuándo están disponibles los reembolsos para asistentes.\n---\nLos reembolsos están disponibles hasta catorce días antes del evento."
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"path": "translations/index.md",
|
|
158
|
-
"content": "# Index — translations\n\n- [es/](./es/index.md)\n"
|
|
159
|
-
},
|
|
160
143
|
{
|
|
161
144
|
"path": "workflows/box-office.md",
|
|
162
145
|
"content": "---\ntype: workflow\ntitle: Box Office\ndescription: Ticket-sales workflow for a music festival.\ntimestamp: 2026-07-02T00:00:00Z\nname: Box Office\nslug: box-office\n---\nSell tickets, then hand the buyer to [[concierge]] for questions."
|
package/docs/help/bundle.md
CHANGED
|
@@ -37,8 +37,8 @@ be silently edited. `primitive_inventory` is registry-driven (a count per `type`
|
|
|
37
37
|
not a closed category enum.
|
|
38
38
|
|
|
39
39
|
Bundle validation also applies registry patterns and document-reference rules.
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
Primitive, extension, and migration dependencies must resolve against the effective
|
|
41
|
+
registry before any file is committed.
|
|
42
42
|
|
|
43
43
|
## Parameters
|
|
44
44
|
|
package/docs/help/overview.md
CHANGED
|
@@ -5,7 +5,7 @@ and mutation contract for AI-agent state. A vault is a directory of Markdown fil
|
|
|
5
5
|
with YAML frontmatter; every file declares a `type` defined in the registry.
|
|
6
6
|
|
|
7
7
|
`@gregiteen/ssss-cli` is the reference implementation: a dependency-free Operation Contract
|
|
8
|
-
|
|
8
|
+
kernel, a registry-driven validator, multilingual semantic adapters, and the
|
|
9
9
|
`.ucw` bundle/provisioning tooling.
|
|
10
10
|
|
|
11
11
|
## The pieces
|
|
@@ -16,7 +16,7 @@ engine, a registry-driven validator, semantic/localization projections, and the
|
|
|
16
16
|
| Core registry | `registry/core.json` | The 15 document primitives + 5 contract primitives, plus semantic (§11.9), bundle (§16), and provisioning (§17) contracts. |
|
|
17
17
|
| Engine | `src/engine.mjs` | The §6 Operation Contract pipeline (operation/patch/event/delete). |
|
|
18
18
|
| Runtime | `src/runtime.mjs` | The §11.8 workflow trigger → event/task/run envelope planner. |
|
|
19
|
-
| Semantic | `src/semantic.mjs` |
|
|
19
|
+
| Semantic | `src/semantic.mjs` | Lexical evidence, multilingual embeddings, privacy filters, and runtime rendering (§11.9). |
|
|
20
20
|
| Bundle | `src/bundle.mjs` | export / validate / provision / import (§16–§17). |
|
|
21
21
|
| Conformance | `conformance/` | Fixtures every host must pass. |
|
|
22
22
|
|
|
@@ -30,8 +30,8 @@ vault ──export──▶ .ucw bundle ──provision──▶ envelope plan
|
|
|
30
30
|
## Commands
|
|
31
31
|
|
|
32
32
|
Run `ssss help <topic>` for any of:
|
|
33
|
-
`runtime`, `semantic`, `
|
|
33
|
+
`runtime`, `semantic`, `portability`, `bundle`, `provisioning`,
|
|
34
34
|
`export`, `provision`, `import`, `conformance`, `autolink`.
|
|
35
35
|
|
|
36
36
|
Run `ssss <command> --help` for: `export`, `validate`, `inspect`, `provision`,
|
|
37
|
-
`import`, `semantic`, `
|
|
37
|
+
`import`, `semantic`, `autolink`, `conformance`.
|
package/docs/help/semantic.md
CHANGED
|
@@ -6,8 +6,8 @@ Markdown. The projection is disposable: the vault remains the only source of tru
|
|
|
6
6
|
```bash
|
|
7
7
|
ssss semantic ./vault
|
|
8
8
|
ssss semantic ./vault --query "refund policy" --limit 5
|
|
9
|
-
ssss semantic ./vault --
|
|
10
|
-
ssss semantic ./vault --
|
|
9
|
+
ssss semantic ./vault --query "política de reembolsos"
|
|
10
|
+
ssss semantic ./vault --out ./derived/semantic.json
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Records include stable identity, source path and hash, type, portability, surface
|
|
@@ -30,8 +30,9 @@ Symlinked vault entries and unsafe paths fail closed.
|
|
|
30
30
|
```js
|
|
31
31
|
import { buildSemanticIndex, searchSemanticIndex } from '@gregiteen/ssss-cli/semantic';
|
|
32
32
|
|
|
33
|
-
const index = buildSemanticIndex('./vault'
|
|
33
|
+
const index = buildSemanticIndex('./vault');
|
|
34
34
|
const results = searchSemanticIndex(index, 'reembolsos', { limit: 10 });
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Hosts may inject a multilingual embedding adapter and runtime renderer. Presentation
|
|
38
|
+
may change language and formatting, but never symbolic controls or authorization.
|
package/docs/ssss-spec.md
CHANGED
|
@@ -31,9 +31,9 @@ SSSS additionally defines the **Operation Contract**: a single, validated, idemp
|
|
|
31
31
|
envelope through which all agent-generated mutations must flow. This makes
|
|
32
32
|
AI-generated state changes deterministic, replayable, conflict-safe, and auditable.
|
|
33
33
|
|
|
34
|
-
Its semantic
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
Its semantic runtime turns the same canonical files into a deterministic searchable
|
|
35
|
+
graph, while multilingual embedding and render adapters localize presentation without
|
|
36
|
+
mutating symbolic control fields or private operational data.
|
|
37
37
|
|
|
38
38
|
Any tool, IDE, agent framework, daemon, or CLI that can read Markdown can
|
|
39
39
|
interoperate with an SSSS vault. The only thing that distinguishes a memory engine,
|
|
@@ -195,7 +195,7 @@ primitive — it implements the subset its product requires — but any primitiv
|
|
|
195
195
|
| `page` | capability | structural | A VFS-native sandboxed custom workspace page. |
|
|
196
196
|
| `migration` | meta | structural | An SSSS schema migration state record. |
|
|
197
197
|
| `release` | meta | structural | An SSSS system schema version release record. |
|
|
198
|
-
| `
|
|
198
|
+
| `primitive` | meta | structural | A governed, versioned definition for a namespaced SSSS primitive. |
|
|
199
199
|
|
|
200
200
|
The **Portability** column is the primitive's default portability class (§5.5); a host
|
|
201
201
|
resolves it from `registry/core.json`. Extension registries assign their own primitives a
|
|
@@ -217,7 +217,7 @@ Document primitives are either:
|
|
|
217
217
|
|
|
218
218
|
- **Replace-type** — the whole file represents current state; a write replaces it
|
|
219
219
|
entirely (`memory`, `skill`, `assistant`, `workflow`, `model`, `task`,
|
|
220
|
-
`conflict`, `
|
|
220
|
+
`conflict`, `primitive`).
|
|
221
221
|
- **Append-type** — the file is an ordered, append-only log; writes add records to
|
|
222
222
|
the body and MUST NOT rewrite prior records (`conversation`, `run`).
|
|
223
223
|
|
|
@@ -561,48 +561,13 @@ released_at: 2026-05-16T12:00:00Z
|
|
|
561
561
|
---
|
|
562
562
|
```
|
|
563
563
|
|
|
564
|
-
#### `
|
|
564
|
+
#### `primitive`
|
|
565
565
|
|
|
566
|
-
A
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
REQUIRED: `type`, `translation_id`, `source_path`, `source_hash`, `locale`, `status`
|
|
572
|
-
(`draft|reviewed|approved`), and `translated_fields` (a subset of
|
|
573
|
-
`title|description|body`). OPTIONAL: `translated_title`, `translated_description`,
|
|
574
|
-
`translator`, `reviewed_at`. The Markdown body is the translated body when
|
|
575
|
-
`translated_fields` includes `body`.
|
|
576
|
-
|
|
577
|
-
`translation_id`, `source_path`, and `locale` are immutable after creation.
|
|
578
|
-
`source_path` MUST be a safe, vault-relative path to an existing `structural`
|
|
579
|
-
document whose type is not `translation`. `source_hash` MUST equal the source's
|
|
580
|
-
current SHA-256 content hash, written as `sha256:<64 lowercase hex characters>`.
|
|
581
|
-
A stale, missing, private, resource-bound, recursive, traversing, or symlinked source
|
|
582
|
-
MUST be rejected.
|
|
583
|
-
|
|
584
|
-
```markdown
|
|
585
|
-
---
|
|
586
|
-
type: translation
|
|
587
|
-
title: "Política de reembolsos — español"
|
|
588
|
-
description: "Traducción al español de la política de reembolsos."
|
|
589
|
-
timestamp: 2026-07-10T00:00:00Z
|
|
590
|
-
translation_id: refund-policy-es
|
|
591
|
-
source_path: rules/refund-policy.md
|
|
592
|
-
source_hash: sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
|
593
|
-
locale: es
|
|
594
|
-
status: approved
|
|
595
|
-
translated_fields: [title, description, body]
|
|
596
|
-
translated_title: "Política de reembolsos"
|
|
597
|
-
translated_description: "Reglas de reembolso para compradores."
|
|
598
|
-
---
|
|
599
|
-
|
|
600
|
-
Los reembolsos están disponibles dentro de los treinta días.
|
|
601
|
-
```
|
|
602
|
-
|
|
603
|
-
Draft and reviewed translations MAY be stored and previewed, but only approved,
|
|
604
|
-
hash-current overlays are applied by default to canonical localized projections
|
|
605
|
-
(§11.9).
|
|
566
|
+
A governed definition for a namespaced primitive that can be authored in any human
|
|
567
|
+
language without changing the core registry. REQUIRED: `type`, `primitive_id`,
|
|
568
|
+
`namespace`, `version`, `name`, `mutation`, `portability`, `scopes`, and `fields`.
|
|
569
|
+
Stable primitive, field, enum, capability, and action identifiers are symbolic and
|
|
570
|
+
language-independent. Labels and descriptions are multilingual presentation data.
|
|
606
571
|
|
|
607
572
|
### 5.5 Portability Classification
|
|
608
573
|
|
|
@@ -1106,10 +1071,10 @@ for planning a workflow trigger into a `workflow_triggered` event envelope and a
|
|
|
1106
1071
|
task `operation` envelope. Hosts MAY implement their own daemon, but SHOULD pass the
|
|
1107
1072
|
runtime conformance checks to prove the same source-of-truth and idempotency rules.
|
|
1108
1073
|
|
|
1109
|
-
### 11.9 Semantic
|
|
1074
|
+
### 11.9 Multilingual Semantic Runtime Contract
|
|
1110
1075
|
|
|
1111
1076
|
The semantic layer is a **derived projection** over validated vault documents. It
|
|
1112
|
-
MUST be deterministic for the same vault bytes, registry set,
|
|
1077
|
+
MUST be deterministic for the same vault bytes, registry set, adapter identity, and projection
|
|
1113
1078
|
options. It MUST NOT become a second source of truth.
|
|
1114
1079
|
|
|
1115
1080
|
Each projected record SHOULD expose a stable identity, source path and content hash,
|
|
@@ -1121,29 +1086,20 @@ available as a dependency-free interoperability baseline.
|
|
|
1121
1086
|
|
|
1122
1087
|
The safe default projection contains only `structural` documents. It MUST exclude
|
|
1123
1088
|
`tenant_private` and `resource_bound` documents unless the caller explicitly enables
|
|
1124
|
-
private indexing in an authorized context.
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
paths, ids, enums, status, permissions, portability, relations, and every other
|
|
1139
|
-
symbolic field from the source. Stale hashes, duplicate overlays, traversal, symlink
|
|
1140
|
-
targets, recursive translations, and translations of non-structural sources MUST
|
|
1141
|
-
fail closed.
|
|
1142
|
-
|
|
1143
|
-
A materialized locale is a disposable projection, not a translated vault. It MUST be
|
|
1144
|
-
written outside the source vault to a new or empty non-symlinked directory, preserve
|
|
1145
|
-
source-relative paths, and include enough projection metadata to identify its locale
|
|
1146
|
-
and source hashes. It may be deleted and rebuilt at any time.
|
|
1089
|
+
private indexing in an authorized context. Language selection MUST NOT widen scope or
|
|
1090
|
+
implicitly disclose conversations, runs, tasks, credentials, customer data, or bound
|
|
1091
|
+
resource values.
|
|
1092
|
+
|
|
1093
|
+
A host MAY inject a multilingual embedding adapter. Every enriched record MUST carry
|
|
1094
|
+
the embedding model identity and vector dimension. Search SHOULD report lexical and
|
|
1095
|
+
semantic evidence separately before computing a hybrid score.
|
|
1096
|
+
|
|
1097
|
+
A host MAY inject an LLM render adapter at presentation time. The render request MUST
|
|
1098
|
+
carry an invariant-control block. Rendering MAY change natural-language title,
|
|
1099
|
+
description, body, formatting, dates, and units, but MUST NOT change primitive IDs,
|
|
1100
|
+
field IDs, enum codes, actions, permissions, paths, versions, hashes, or relations.
|
|
1101
|
+
Canonical documents are authored once in any language; SSSS 0.9 neither requires nor
|
|
1102
|
+
materializes translation documents or localized vault trees.
|
|
1147
1103
|
|
|
1148
1104
|
---
|
|
1149
1105
|
|
|
@@ -1161,8 +1117,8 @@ Fixtures are distributed as a JSON document carrying:
|
|
|
1161
1117
|
- `runtime_contract` — trigger vocabulary and daemon idempotency rules (§11.8).
|
|
1162
1118
|
- registry-extension checks — schema shape, regex validity, symlink rejection, and
|
|
1163
1119
|
core/sibling collision rejection.
|
|
1164
|
-
- semantic
|
|
1165
|
-
edges,
|
|
1120
|
+
- multilingual semantic checks — deterministic indexing, privacy defaults, graph
|
|
1121
|
+
edges, embedding provenance, cross-language retrieval, and invariant rendering
|
|
1166
1122
|
(§11.9).
|
|
1167
1123
|
- `fixtures[]` — each with a `request`, an `expected_response`, and an
|
|
1168
1124
|
OPTIONAL `expected_http_status`.
|
|
@@ -1172,7 +1128,7 @@ The conformance fixture set is the shared test contract between all SSSS
|
|
|
1172
1128
|
implementations. A host MUST NOT claim SSSS conformance without passing the current
|
|
1173
1129
|
fixture set. Hosts implementing workflow daemons SHOULD also run the reference
|
|
1174
1130
|
runtime checks exposed by `@gregiteen/ssss-cli/runtime`. Hosts exposing semantic
|
|
1175
|
-
search or
|
|
1131
|
+
search or runtime rendering MUST also pass the §11.9 checks.
|
|
1176
1132
|
|
|
1177
1133
|
---
|
|
1178
1134
|
|
|
@@ -1200,7 +1156,7 @@ opaque ID as the slug and keep the human-readable label in `title` / `name`.
|
|
|
1200
1156
|
This document is versioned independently of any host and of the conformance
|
|
1201
1157
|
fixture set.
|
|
1202
1158
|
|
|
1203
|
-
- The spec version is stated in the document header (currently **v0.
|
|
1159
|
+
- The spec version is stated in the document header (currently **v0.9 — Draft**).
|
|
1204
1160
|
- Breaking changes to the file format, the type registry, or the Operation
|
|
1205
1161
|
Contract increment the spec version.
|
|
1206
1162
|
- Until **v1.0**, any version MAY introduce breaking changes.
|
|
@@ -1417,8 +1373,7 @@ cannot resolve a link MUST fail the provision rather than emit a dangling refere
|
|
|
1417
1373
|
|
|
1418
1374
|
The following frontmatter keys are reserved by this spec across all primitives and
|
|
1419
1375
|
MUST NOT be repurposed by hosts: `type`, `slug`, `schema_version`, `status`,
|
|
1420
|
-
`feedback`, `confidence`, `semantic_id`, `relations`,
|
|
1421
|
-
`source_path`, `source_hash`, and `translated_fields`.
|
|
1376
|
+
`feedback`, `confidence`, `semantic_id`, `relations`, and `language`.
|
|
1422
1377
|
|
|
1423
1378
|
Hosts adding their own frontmatter fields SHOULD prefix them `x_` to remain
|
|
1424
1379
|
forward-compatible with future spec revisions.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gregiteen/ssss-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "CLI tools and the reference engine for the Structured Semantic Syntax System",
|
|
5
5
|
"main": "src/engine.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -11,6 +11,23 @@
|
|
|
11
11
|
"./frontmatter": "./src/frontmatter.mjs",
|
|
12
12
|
"./bundle": "./src/bundle.mjs",
|
|
13
13
|
"./semantic": "./src/semantic.mjs",
|
|
14
|
+
"./primitive": "./src/primitive.mjs",
|
|
15
|
+
"./validator": "./src/validator.mjs",
|
|
16
|
+
"./kernel": {
|
|
17
|
+
"types": "./types/kernel.d.ts",
|
|
18
|
+
"import": "./src/kernel.mjs",
|
|
19
|
+
"default": "./src/kernel.mjs"
|
|
20
|
+
},
|
|
21
|
+
"./vfs": "./src/vfs.mjs",
|
|
22
|
+
"./identity": "./src/authorization.mjs",
|
|
23
|
+
"./authorization": "./src/authorization.mjs",
|
|
24
|
+
"./leases": "./src/leases.mjs",
|
|
25
|
+
"./idempotency": "./src/idempotency.mjs",
|
|
26
|
+
"./events": "./src/events.mjs",
|
|
27
|
+
"./projections": "./src/projections.mjs",
|
|
28
|
+
"./ui": "./src/ui.mjs",
|
|
29
|
+
"./http": "./src/http.mjs",
|
|
30
|
+
"./guard": "./src/guard.mjs",
|
|
14
31
|
"./conformance/fixtures.json": "./conformance/fixtures.json",
|
|
15
32
|
"./conformance/reference-bundle.ucw.json": "./conformance/reference-bundle.ucw.json",
|
|
16
33
|
"./registry/core.json": "./registry/core.json",
|
|
@@ -25,6 +42,7 @@
|
|
|
25
42
|
},
|
|
26
43
|
"files": [
|
|
27
44
|
"src",
|
|
45
|
+
"types",
|
|
28
46
|
"scripts",
|
|
29
47
|
"registry",
|
|
30
48
|
"conformance",
|
|
@@ -50,8 +68,9 @@
|
|
|
50
68
|
"ucw",
|
|
51
69
|
"provisioning",
|
|
52
70
|
"semantic-search",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
71
|
+
"multilingual",
|
|
72
|
+
"generative-ui",
|
|
73
|
+
"application-kernel"
|
|
55
74
|
],
|
|
56
75
|
"author": "Greg Iteen",
|
|
57
76
|
"license": "ISC",
|
package/registry/core.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://ssss.dev/registry/v1",
|
|
3
3
|
"registry": "core",
|
|
4
|
-
"spec_version": "0.
|
|
5
|
-
"description": "The canonical SSSS core
|
|
4
|
+
"spec_version": "0.9",
|
|
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.",
|
|
6
6
|
"conformance": "A host is core-conformant for a primitive if a file of that type validates exactly when all required_fields are present and non-empty, and (for append_only types) writes only append.",
|
|
7
7
|
|
|
8
8
|
"document_primitives": {
|
|
@@ -137,33 +137,26 @@
|
|
|
137
137
|
"required_fields": ["type", "release_id", "version", "schema_version", "summary", "released_at"],
|
|
138
138
|
"spec_ref": "§5.4 release"
|
|
139
139
|
},
|
|
140
|
-
"
|
|
141
|
-
"family": "
|
|
142
|
-
"canonical_path": "
|
|
140
|
+
"primitive": {
|
|
141
|
+
"family": "meta",
|
|
142
|
+
"canonical_path": "primitives/<namespace>/<id>.md",
|
|
143
143
|
"append_only": false,
|
|
144
144
|
"portability": "structural",
|
|
145
|
-
"required_fields": ["type", "
|
|
146
|
-
"optional_fields": ["
|
|
147
|
-
"immutable_fields": ["
|
|
145
|
+
"required_fields": ["type", "primitive_id", "namespace", "version", "name", "mutation", "portability", "scopes", "fields"],
|
|
146
|
+
"optional_fields": ["language", "aliases", "path_template", "capabilities", "events", "projections", "ui", "migrations", "requires"],
|
|
147
|
+
"immutable_fields": ["primitive_id", "namespace"],
|
|
148
148
|
"enums": {
|
|
149
|
-
"
|
|
150
|
-
"
|
|
149
|
+
"mutation": ["replace", "append"],
|
|
150
|
+
"portability": ["structural", "tenant_private", "resource_bound"],
|
|
151
|
+
"scopes": ["system", "account", "workspace", "user"]
|
|
151
152
|
},
|
|
152
153
|
"patterns": {
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
},
|
|
157
|
-
"references": {
|
|
158
|
-
"source_path": {
|
|
159
|
-
"must_exist": true,
|
|
160
|
-
"disallowed_types": ["translation"],
|
|
161
|
-
"allowed_portability": ["structural"],
|
|
162
|
-
"hash_field": "source_hash"
|
|
163
|
-
}
|
|
154
|
+
"primitive_id": "^[a-z][a-z0-9_-]{0,63}:[a-z][a-z0-9_-]{0,127}$",
|
|
155
|
+
"namespace": "^[a-z][a-z0-9_-]{0,63}$",
|
|
156
|
+
"language": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
|
|
164
157
|
},
|
|
165
|
-
"notes": "A
|
|
166
|
-
"spec_ref": "§5.4
|
|
158
|
+
"notes": "A governed, versioned definition for a repository, extension, workspace, or user primitive. Natural-language labels may use any language; stable field, enum, capability, and action identifiers are never translated.",
|
|
159
|
+
"spec_ref": "§5.4 primitive"
|
|
167
160
|
}
|
|
168
161
|
},
|
|
169
162
|
|
|
@@ -178,7 +171,7 @@
|
|
|
178
171
|
"universal_frontmatter": {
|
|
179
172
|
"required": ["type", "title", "description", "timestamp"],
|
|
180
173
|
"recommended_okf": ["resource", "tags", "aliases"],
|
|
181
|
-
"recommended_semantic": ["semantic_id", "resource", "tags", "aliases", "relations", "
|
|
174
|
+
"recommended_semantic": ["semantic_id", "resource", "tags", "aliases", "relations", "language"],
|
|
182
175
|
"spec_ref": "§4.2"
|
|
183
176
|
},
|
|
184
177
|
|
|
@@ -253,13 +246,13 @@
|
|
|
253
246
|
"identity_fields": ["semantic_id", "resource", "type", "path"],
|
|
254
247
|
"surface_fields": ["title", "description", "name", "slug", "aliases", "tags"],
|
|
255
248
|
"relation_fields": ["relations", "wiki_links", "markdown_links"],
|
|
256
|
-
"
|
|
257
|
-
"
|
|
258
|
-
"safe_default": "Semantic
|
|
249
|
+
"renderable_fields": ["title", "description", "body"],
|
|
250
|
+
"language_pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$",
|
|
251
|
+
"safe_default": "Semantic adapters exclude tenant_private and resource_bound documents unless an authorized context explicitly includes them. Runtime rendering never changes symbolic controls.",
|
|
259
252
|
"spec_ref": "§11.9"
|
|
260
253
|
},
|
|
261
254
|
|
|
262
|
-
"reserved_keys": ["type", "slug", "schema_version", "status", "feedback", "confidence", "semantic_id", "
|
|
255
|
+
"reserved_keys": ["type", "slug", "schema_version", "status", "feedback", "confidence", "semantic_id", "language", "relations"],
|
|
263
256
|
"host_field_prefix": "x_",
|
|
264
257
|
"spec_ref_reserved": "Appendix A"
|
|
265
258
|
}
|