total-recall-brain 3.13.0 → 3.13.2
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 +91 -108
- package/bin/antigravity.mjs +81 -52
- package/bin/total-recall.mjs +32 -57
- package/extension/background.js +1 -1
- package/extension/options/options.js +9 -3
- package/extension/sidepanel/sidepanel.js +0 -2
- package/frontend/index.html +4 -3
- package/frontend/package.json +1 -0
- package/frontend/src/App.tsx +109 -152
- package/frontend/src/api.ts +605 -23
- package/frontend/src/components/BrainSelector.tsx +211 -199
- package/frontend/src/components/DocumentEditorModal.tsx +57 -0
- package/frontend/src/components/DocumentTable.tsx +47 -0
- package/frontend/src/components/Graph3D.tsx +120 -71
- package/frontend/src/components/UsageChart.tsx +3 -3
- package/frontend/src/components/brand/BrandMark.tsx +95 -0
- package/frontend/src/index.css +286 -86
- package/frontend/src/pages/ApiKeysPage.tsx +1878 -215
- package/frontend/src/pages/ChatPage.tsx +103 -45
- package/frontend/src/pages/DesignDocsPage.tsx +5 -5
- package/frontend/src/pages/FilesPage.tsx +10 -6
- package/frontend/src/pages/GraphPage.tsx +5 -3
- package/frontend/src/pages/HelpPage.tsx +2 -2
- package/frontend/src/pages/InboxPage.tsx +82 -0
- package/frontend/src/pages/InstructionsPage.tsx +1 -1
- package/frontend/src/pages/IntegrationsPage.tsx +21 -10
- package/frontend/src/pages/LoginPage.tsx +95 -77
- package/frontend/src/pages/MemoryPage.tsx +31 -8
- package/frontend/src/pages/OnboardingPage.tsx +690 -0
- package/frontend/src/pages/OpenWikiPage.tsx +412 -323
- package/frontend/src/pages/SettingsPage.tsx +825 -922
- package/frontend/src/pages/SkillsPage.tsx +272 -147
- package/frontend/src/pages/UsagePage.tsx +23 -31
- package/frontend/src/pages/VaultPage.tsx +223 -0
- package/frontend/src/types.ts +13 -0
- package/package.json +4 -4
- package/scaffold/.agent/skills/total-recall/SKILL.md +43 -4
- package/scaffold/.agent/skills/total-recall/modules/README.md +10 -0
- package/scaffold/.agent/skills/total-recall/modules/agents/README.md +5 -0
- package/scaffold/.agent/skills/total-recall/{skills/tr-cli-agents → modules/agents}/agents.yml +8 -0
- package/scaffold/.agent/skills/total-recall/modules/skill-deploy/README.md +9 -0
- package/scaffold/.agent/skills/total-recall/openwiki/README.md +10 -0
- package/scaffold/.agent/skills/total-recall/openwiki/architecture.md +5 -0
- package/scaffold/.agent/skills/total-recall/openwiki/ide.md +10 -0
- package/scaffold/.agent/skills/total-recall/openwiki/memory.md +11 -0
- package/scaffold/.agent/skills/total-recall/openwiki/secrets.md +7 -0
- package/scaffold/.agent/skills/total-recall/openwiki/skills.md +7 -0
- package/src/cli/brain.mjs +63 -5
- package/src/cli/connect.mjs +11 -19
- package/src/cli/daemon.mjs +5 -4
- package/src/cli/deploy-ui.mjs +8 -3
- package/src/cli/deploy.mjs +84 -27
- package/src/cli/ingest/index.mjs +1 -1
- package/src/cli/init.mjs +63 -34
- package/src/cli/remember.mjs +3 -3
- package/src/cli/secret.mjs +812 -0
- package/src/cli/setup.mjs +34 -7
- package/src/cli/share.mjs +2 -2
- package/src/cli/skill.mjs +396 -35
- package/src/cli/sync.mjs +4 -4
- package/src/cli/task.mjs +287 -0
- package/src/core/clarity-rewriter.mjs +5 -5
- package/src/core/config.mjs +44 -2
- package/src/core/conflict-detector.mjs +5 -5
- package/src/core/crons.mjs +54 -0
- package/src/core/daemon-loop.mjs +87 -235
- package/src/core/dream.mjs +170 -10
- package/src/core/env-import.mjs +456 -0
- package/src/core/fact-seeker.mjs +14 -14
- package/src/core/import-rules.mjs +20 -7
- package/src/core/inference-engine.mjs +3 -3
- package/src/core/migrate.mjs +14 -8
- package/src/core/okf-adapter.mjs +2 -2
- package/src/core/operation-validator.mjs +39 -331
- package/src/core/optimizer.mjs +7 -0
- package/src/core/post-mortem.mjs +2 -2
- package/src/core/project-brain.mjs +349 -0
- package/src/core/provider-catalog.mjs +296 -0
- package/src/core/quick-capture.mjs +1 -1
- package/src/core/remote-vault-sync.mjs +194 -0
- package/src/core/research-queue.mjs +7 -11
- package/src/core/runtime.mjs +33 -9
- package/src/core/scheduler.mjs +59 -5
- package/src/core/schema.mjs +14 -0
- package/src/core/search.mjs +1 -1
- package/src/core/secrets-env-export.mjs +323 -0
- package/src/core/secrets-rotate.mjs +245 -0
- package/src/core/secrets-store.mjs +645 -0
- package/src/core/semantic-index.mjs +3 -3
- package/src/core/skills-registry.mjs +1062 -0
- package/src/core/source-adapters.mjs +4 -1
- package/src/core/ssss-host-extension.mjs +94 -0
- package/src/core/ssss-kernel-bridge.mjs +530 -0
- package/src/core/surface.mjs +14 -0
- package/src/core/task-envelope.mjs +298 -0
- package/src/core/task-executors.mjs +600 -0
- package/src/core/validated-write.mjs +124 -56
- package/src/core/vault.mjs +21 -34
- package/src/core/webauthn-store.mjs +272 -0
- package/src/server/api.mjs +26 -16
- package/src/server/auth.mjs +51 -0
- package/src/server/index.mjs +3 -3
- package/src/server/keys.mjs +30 -4
- package/src/server/rest.mjs +198 -25
- package/src/server/route-manifest.json +156 -0
- package/src/server/routes/_shared.mjs +40 -1
- package/src/server/routes/docs.mjs +260 -0
- package/src/server/routes/memory.mjs +145 -32
- package/src/server/routes/research.mjs +30 -0
- package/src/server/routes/secrets.mjs +470 -0
- package/src/server/routes/share.mjs +2 -2
- package/src/server/routes/skills.mjs +452 -54
- package/src/server/routes/sync.mjs +48 -0
- package/src/server/routes/webauthn.mjs +184 -0
- package/src/server/update-route-manifest.mjs +39 -0
- package/templates/onboarding-interview.md +32 -22
- package/templates/openwiki/README.md +10 -0
- package/templates/openwiki/architecture.md +5 -0
- package/templates/openwiki/ide.md +10 -0
- package/templates/openwiki/memory.md +11 -0
- package/templates/openwiki/secrets.md +7 -0
- package/templates/openwiki/skills.md +7 -0
- package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/SKILL.md +0 -121
- package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/references/antigravity.txt +0 -20
- package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/references/claude.txt +0 -58
- package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/references/codex.txt +0 -81
- package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/references/gemini.txt +0 -44
- package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/scripts/.gitkeep +0 -0
- package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/subagents/.gitkeep +0 -0
- package/scaffold/.agent/skills/total-recall/skills/tr-research/SKILL.md +0 -338
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/SKILL.md +0 -282
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/assets/skill-template/SKILL.md +0 -20
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/evals/evals.json +0 -20
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/hooks/on-skill-add.sh +0 -14
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/hooks/on-skill-delete.sh +0 -14
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/learnings/.gitkeep +0 -0
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/references/.gitkeep +0 -0
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/scripts/.gitkeep +0 -0
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/scripts/create-skill.sh +0 -65
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/scripts/enforce-skill-optimization.mjs +0 -135
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/scripts/skill-watcher.mjs +0 -64
- package/scaffold/.agent/skills/total-recall/skills/tr-skill/subagents/audit-all-skills.md +0 -62
- package/scaffold/.agent/skills/total-recall/skills/tr-ssss/SKILL.md +0 -298
- package/scaffold/.agent/skills/total-recall/skills/tr-ssss/evals/evals.json +0 -17
- package/scaffold/.agent/skills/total-recall/skills/tr-ssss/references/CHANGELOG.md +0 -124
- package/scaffold/.agent/skills/total-recall/skills/tr-ssss/references/ssss-spec.md +0 -1325
- package/scaffold/.agent/skills/total-recall/skills/tr-ssss/scripts/validate-schema.mjs +0 -232
- package/scaffold/.agent/skills/total-recall/skills/tr-ssss/subagents/audit-ssss-node.md +0 -9
- /package/scaffold/.agent/skills/total-recall/{skills/tr-cli-agents/evals → modules/skill-deploy/scripts}/.gitkeep +0 -0
- /package/scaffold/.agent/skills/total-recall/{skills/tr-skill → modules/skill-deploy}/scripts/find-skills.mjs +0 -0
- /package/scaffold/.agent/skills/total-recall/{skills/tr-skill → modules/skill-deploy}/scripts/install-skill.mjs +0 -0
- /package/scaffold/.agent/skills/total-recall/{skills/tr-skill → modules/skill-deploy}/scripts/scan-skill.mjs +0 -0
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: tr-ssss
|
|
3
|
-
provenance: total-recall
|
|
4
|
-
description: "Use this skill to inspect, validate, write, and manage SSSS primitives, memory nodes, operation envelopes, scope overlays, projections, and VFS specifications in the Total Recall reference kernel. MANDATORY: Read this file before editing SSSS files or code."
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# SSSS — Structured Semantic Syntax System Manager
|
|
8
|
-
|
|
9
|
-
SSSS is the Markdown-first state contract for Total Recall and compatible VFS
|
|
10
|
-
hosts. Use this skill when touching memory nodes, skills, assistants, workflows,
|
|
11
|
-
models, conversations, runs, projection metadata, operation envelopes, or SSSS
|
|
12
|
-
schema/reference files.
|
|
13
|
-
|
|
14
|
-
## Ground Truth
|
|
15
|
-
|
|
16
|
-
The vendor-neutral contract is now a published package, **`@ssss/cli`** (pinned to
|
|
17
|
-
**`v0.7.0`**, spec v0.6 draft; source <https://github.com/gregiteen/ssss>), declared in
|
|
18
|
-
`package.json`. `references/ssss-spec.md` is the local mirror. The canon owns the
|
|
19
|
-
spec (§4.2 universal OKF-compatible frontmatter, §5.5 portability, §6 Operation
|
|
20
|
-
Contract incl. `event` and `delete`, §11.8 workflow runtime daemon contract, §16
|
|
21
|
-
the `.ucw` bundle format, §17 provisioning), the core
|
|
22
|
-
registry (`@ssss/cli/registry/core.json`: 14 document + 5 contract primitives),
|
|
23
|
-
the reference engine, runtime helpers, and the v1.4.0 conformance fixtures. Total
|
|
24
|
-
Recall's kernel was the engine the canon's reference implementation was harvested
|
|
25
|
-
from; keep them aligned. If this skill conflicts with the canon, correct this
|
|
26
|
-
skill unless the implementation has intentionally advanced beyond it and the
|
|
27
|
-
difference is documented here.
|
|
28
|
-
|
|
29
|
-
Current local implementation entry points:
|
|
30
|
-
|
|
31
|
-
- `src/core/schema.mjs` — implemented SSSS primitive registry (`SSSS_SCHEMAS`).
|
|
32
|
-
- `src/core/operation-validator.mjs` — §6 operation pipeline.
|
|
33
|
-
- `src/core/validated-write.mjs` — memory write adapter for the operation
|
|
34
|
-
pipeline.
|
|
35
|
-
- `src/core/total-recall-memory-validator.mjs` — schema v2 memory validator.
|
|
36
|
-
- `src/core/vault-cache.mjs` — cached vault reads and watcher invalidation.
|
|
37
|
-
- `src/core/vector-store.mjs` and `src/core/semantic-index.mjs` — canonical
|
|
38
|
-
search/index path.
|
|
39
|
-
|
|
40
|
-
## Using the `@ssss/cli` CLI
|
|
41
|
-
|
|
42
|
-
`@ssss/cli` ships a `ssss` command (available via `npx`, since it's a dependency).
|
|
43
|
-
It operates on a **vault directory** of Markdown files and `.ucw` bundles, using
|
|
44
|
-
the canon's own reference engine — separate from this kernel's `processOperation`.
|
|
45
|
-
Use it for bundle/tenant tooling and conformance; for in-kernel memory writes keep
|
|
46
|
-
using `writeNodeValidated()` / `processOperation()`. Use `@ssss/cli/runtime` when
|
|
47
|
-
building daemon, cron, webhook, event, file-change, or agent-host wake-up loops.
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
npx ssss help # list doc topics; e.g. `ssss help portability|bundle|provisioning`
|
|
51
|
-
npx ssss <command> --help # flags for any command
|
|
52
|
-
|
|
53
|
-
# Vault → bundle → vault lifecycle (§16/§17)
|
|
54
|
-
npx ssss export <vault-dir> --profile sale --out pack.ucw.json # backup | template | sale
|
|
55
|
-
npx ssss validate pack.ucw.json # schema + portability + content hash
|
|
56
|
-
npx ssss inspect pack.ucw.json --files # manifest, inventory, params, steps
|
|
57
|
-
npx ssss provision pack.ucw.json --param domain=acme.live --out plan.json # pure: params + links → envelopes
|
|
58
|
-
npx ssss import pack.ucw.json --vault ./new-vault --param domain=acme.live # idempotent replay
|
|
59
|
-
|
|
60
|
-
npx ssss conformance --engine # replay the canonical fixtures + round-trip the reference bundle
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
`export` is pure/deterministic and `template`/`sale` drop every `tenant_private`
|
|
64
|
-
file (§5.5). Note: the canon's `.ucw` bundle (§16) is distinct from §7.4's OKF
|
|
65
|
-
memory-vault `importBundle`/`exportBundle` in `repo-expert`.
|
|
66
|
-
|
|
67
|
-
## Current Contract
|
|
68
|
-
|
|
69
|
-
All agent-generated mutations must flow through the SSSS operation pipeline:
|
|
70
|
-
|
|
71
|
-
```text
|
|
72
|
-
processOperation(envelope, vaultRoot, options)
|
|
73
|
-
-> envelope validation
|
|
74
|
-
-> idempotency replay/conflict check
|
|
75
|
-
-> authorization
|
|
76
|
-
-> lease validation
|
|
77
|
-
-> deterministic schema validation
|
|
78
|
-
-> atomic commit
|
|
79
|
-
-> audit event
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Use `writeNodeValidated()` for Total Recall memory writes. Do not call raw
|
|
83
|
-
`writeNode()` or write files directly when an agent is mutating an SSSS vault.
|
|
84
|
-
|
|
85
|
-
Total Recall implements all four canonical envelope types in
|
|
86
|
-
`processOperation()`:
|
|
87
|
-
|
|
88
|
-
- `operation` — full file create/replace.
|
|
89
|
-
- `patch` — partial frontmatter/body merge.
|
|
90
|
-
- `event` — append-only JSON event payload.
|
|
91
|
-
- `delete` — remove a replace-type VFS file (SSSS spec §6.2). Refuses to delete
|
|
92
|
-
append-type documents (`conversation`, `run`), and emits an auditable deletion
|
|
93
|
-
event so history is never lost. Idempotent. For *memory* removal, still prefer
|
|
94
|
-
the CLI/API forget/archive flow over a raw `delete` envelope.
|
|
95
|
-
|
|
96
|
-
Use `dry_run: true` for preflight validation when constructing writes from model
|
|
97
|
-
output.
|
|
98
|
-
|
|
99
|
-
## Universal Frontmatter / OKF
|
|
100
|
-
|
|
101
|
-
SSSS v0.7.0 / spec v0.6 is an OKF-compatible Markdown contract. Every SSSS
|
|
102
|
-
document primitive, including skills, memory, workflows, assistants, pages,
|
|
103
|
-
models, migrations, and releases, MUST carry non-empty universal frontmatter:
|
|
104
|
-
|
|
105
|
-
- `type`
|
|
106
|
-
- `title`
|
|
107
|
-
- `description`
|
|
108
|
-
- `timestamp`
|
|
109
|
-
|
|
110
|
-
Recommended OKF-compatible fields are:
|
|
111
|
-
|
|
112
|
-
- `resource`
|
|
113
|
-
- `tags`
|
|
114
|
-
- `aliases`
|
|
115
|
-
|
|
116
|
-
Primitive-specific required fields still apply on top of the universal fields.
|
|
117
|
-
For example, a `workflow` still needs its workflow identity fields, and
|
|
118
|
-
`schema_version: 2` memory nodes still need the knowledge-graph fields below.
|
|
119
|
-
Do not "fix" OKF compatibility by weakening primitive validation; add the
|
|
120
|
-
universal metadata and keep the primitive registry strict.
|
|
121
|
-
|
|
122
|
-
## Security Contract
|
|
123
|
-
|
|
124
|
-
The reference engine now treats path and replay safety as part of the standard:
|
|
125
|
-
|
|
126
|
-
- `workspace_id`, `idempotency_key`, and `actor.role` must be safe identifiers:
|
|
127
|
-
ASCII alphanumeric start, then ASCII letters, digits, `.`, `_`, or `-`, max
|
|
128
|
-
128 characters.
|
|
129
|
-
- Operation paths must be relative vault paths. Reject empty/root paths, `.`,
|
|
130
|
-
`..`, absolute paths, backslashes, null bytes, empty segments, and directory
|
|
131
|
-
targets.
|
|
132
|
-
- `type` is immutable after creation. An operation or patch must not rewrite an
|
|
133
|
-
existing file from one primitive type to another.
|
|
134
|
-
- Append-only primitives may only preserve existing content exactly or append
|
|
135
|
-
after the existing body plus a newline. Prefix tricks are not enough.
|
|
136
|
-
- Idempotency is scoped by `workspace_id + idempotency_key + request_hash`.
|
|
137
|
-
Replaying the same effective request returns the original result; reusing the
|
|
138
|
-
same key/workspace with a different effective request is an idempotency
|
|
139
|
-
conflict and must fail.
|
|
140
|
-
- Leases fail closed. Corrupt or unreadable lease state does not authorize a
|
|
141
|
-
write, and lease storage must not expose the VFS path directly.
|
|
142
|
-
- Bundle import/export must reject unsafe or duplicate file paths, and exporters
|
|
143
|
-
must not follow symlinked vault entries into files outside the vault.
|
|
144
|
-
|
|
145
|
-
## Canonical State
|
|
146
|
-
|
|
147
|
-
The vault is source-of-truth. Derived files, embeddings, search indexes,
|
|
148
|
-
instruction shims, UI caches, and projection manifests are disposable and must be
|
|
149
|
-
rebuildable from Markdown vault state plus append-only events.
|
|
150
|
-
|
|
151
|
-
Total Recall is database-free. Do not look for Postgres or SQLite as the record of
|
|
152
|
-
truth. The internal vector store is a derived index, not canonical state.
|
|
153
|
-
|
|
154
|
-
## Scope Layers
|
|
155
|
-
|
|
156
|
-
Total Recall memory has layered vault scope:
|
|
157
|
-
|
|
158
|
-
- `global` — machine/user-level brain shared across registered projects.
|
|
159
|
-
- `project` — repository-local brain and session context.
|
|
160
|
-
|
|
161
|
-
Host applications can add product runtime scopes such as `system`, `account`, and
|
|
162
|
-
`workspace`. The UltraChat implementation proved the rule that shared system
|
|
163
|
-
skills must be inherited through an overlay, not copied into every workspace.
|
|
164
|
-
When authoring portable SSSS guidance, preserve this separation:
|
|
165
|
-
|
|
166
|
-
- system/platform primitives are hidden shared defaults;
|
|
167
|
-
- account-local primitives must not leak into workspace runtimes unless forked or
|
|
168
|
-
explicitly installed;
|
|
169
|
-
- workspace primitives can shadow shared system defaults;
|
|
170
|
-
- legacy copied system artifacts should be treated as derived cleanup targets only
|
|
171
|
-
when metadata proves they are seeded copies.
|
|
172
|
-
|
|
173
|
-
Do not flatten these layers into one directory or one effective identity in docs,
|
|
174
|
-
validators, or examples.
|
|
175
|
-
|
|
176
|
-
## Primitive Registry
|
|
177
|
-
|
|
178
|
-
`src/core/schema.mjs` is the implementation registry. `references/ssss-spec.md`
|
|
179
|
-
is the vendor-neutral baseline. When adding or changing a primitive:
|
|
180
|
-
|
|
181
|
-
1. Update `SSSS_SCHEMAS` and the relevant Zod schema.
|
|
182
|
-
2. Update the spec or this skill if the primitive is standard or host-specific
|
|
183
|
-
respectively.
|
|
184
|
-
3. Add/adjust fixtures or tests for the required fields and invalid cases.
|
|
185
|
-
4. Confirm projection behavior is declared as source, projection, or external
|
|
186
|
-
state.
|
|
187
|
-
|
|
188
|
-
The current implementation includes the core spec primitives plus host/product
|
|
189
|
-
extensions such as `personalization_profile`, `account_assistant`,
|
|
190
|
-
`account_memory`, `account_workflow`, `workspace_transfer`, CRM/CMS/commerce
|
|
191
|
-
types, telephony types, and workspace/package types. Treat those as implemented
|
|
192
|
-
host extensions unless the spec explicitly standardizes them.
|
|
193
|
-
|
|
194
|
-
## Memory Nodes
|
|
195
|
-
|
|
196
|
-
Memory files under `.agent/memory-vault/**` are `type: memory` and must satisfy
|
|
197
|
-
SSSS schema v2. Required schema v2 knowledge-graph fields are:
|
|
198
|
-
|
|
199
|
-
- `confidence`
|
|
200
|
-
- `importance`
|
|
201
|
-
- `modality`
|
|
202
|
-
- `subject`
|
|
203
|
-
- `predicate`
|
|
204
|
-
- `object`
|
|
205
|
-
- `sentiment_polarity`
|
|
206
|
-
- `sentiment_target`
|
|
207
|
-
|
|
208
|
-
Invariants additionally use `priority: absolute` and `immutable: true`.
|
|
209
|
-
|
|
210
|
-
Memory validation is owned by `TotalRecallMemoryValidator`, not by generic loose
|
|
211
|
-
frontmatter checks. No memory path may be committed with zero validation.
|
|
212
|
-
|
|
213
|
-
## Reads And Writes
|
|
214
|
-
|
|
215
|
-
- Use `vault-cache.mjs` `getNodes()` for vault reads. Do not call `loadNodes()`
|
|
216
|
-
directly in new code.
|
|
217
|
-
- Use `writeNodeValidated()` or `processOperation()` for writes.
|
|
218
|
-
- Invalidate the vault cache after successful writes.
|
|
219
|
-
- Keep append-type documents append-only. `conversation` and `run` may append
|
|
220
|
-
body records but must not rewrite prior records.
|
|
221
|
-
- Events are immutable. Do not update or delete event records.
|
|
222
|
-
- Leases must be time-bound, actor-owned, operation-linked, and recoverable.
|
|
223
|
-
- Workflow daemons, crons, webhook workers, and agent hosts must treat workflow
|
|
224
|
-
frontmatter triggers as canonical and use deterministic runtime planning
|
|
225
|
-
(`@ssss/cli/runtime`) to derive event/task/run envelopes.
|
|
226
|
-
- Bundle exporters/importers must use the canon's path, content hash,
|
|
227
|
-
portability, and provisioning validation. `template` and `sale` profiles must
|
|
228
|
-
drop every `tenant_private` primitive and reduce `resource_bound` values to
|
|
229
|
-
requirement declarations.
|
|
230
|
-
|
|
231
|
-
## Projections And Indexes
|
|
232
|
-
|
|
233
|
-
Projection manifests must mark derived artifacts as disposable and record enough
|
|
234
|
-
provenance to detect drift. A projection must have a rebuild path from vault state
|
|
235
|
-
and events or be documented as external non-projection state.
|
|
236
|
-
|
|
237
|
-
The canonical search/index stack is the Total Recall semantic index/vector store.
|
|
238
|
-
Do not introduce a second embedding or indexing path for SSSS memory unless the
|
|
239
|
-
spec and tests are updated together.
|
|
240
|
-
|
|
241
|
-
## Validation
|
|
242
|
-
|
|
243
|
-
Validate an individual SSSS Markdown file with:
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
node .agent/skills/tr-ssss/scripts/validate-schema.mjs <path-to-node.md>
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
Run focused kernel tests after changing the operation contract, schema registry,
|
|
250
|
-
validator, or vault cache:
|
|
251
|
-
|
|
252
|
-
```bash
|
|
253
|
-
npx vitest run \
|
|
254
|
-
src/core/schema.spec.mjs \
|
|
255
|
-
src/core/operation-validator.spec.mjs \
|
|
256
|
-
src/core/total-recall-memory-validator.spec.mjs \
|
|
257
|
-
src/core/vault-cache.spec.mjs \
|
|
258
|
-
src/core/ssss-conformance.bridge.spec.mjs
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
The **conformance bridge** (`src/core/ssss-conformance.bridge.spec.mjs`) runs the
|
|
262
|
-
canonical fixtures from `@ssss/cli` through this kernel's `processOperation` and
|
|
263
|
-
asserts every canonical core primitive is present in `SSSS_SCHEMAS`. It proves the
|
|
264
|
-
kernel implements the *same* standard as the SSSS reference engine and host apps.
|
|
265
|
-
If you change the operation contract or the registry, keep this green; to adopt a
|
|
266
|
-
newer standard, bump the `@ssss/cli` pin and re-run it.
|
|
267
|
-
|
|
268
|
-
## Do Not
|
|
269
|
-
|
|
270
|
-
- Do not write agent mutations directly to vault files.
|
|
271
|
-
- Do not make derived indexes or projections canonical.
|
|
272
|
-
- Do not bypass deterministic validation for model-generated changes.
|
|
273
|
-
- Do not collapse `global`/`project` or `system`/`account`/`workspace` scope
|
|
274
|
-
boundaries.
|
|
275
|
-
- Do not represent copied seeded skills as canonical system primitives.
|
|
276
|
-
- Do not delete append-type documents (`conversation`, `run`); they are immutable.
|
|
277
|
-
- Do not add host-specific required fields to the vendor-neutral spec unless they
|
|
278
|
-
are being standardized.
|
|
279
|
-
- Do not claim OKF compliance unless `type`, `title`, `description`, and
|
|
280
|
-
`timestamp` are present and non-empty.
|
|
281
|
-
- Do not replay idempotency keys without comparing `request_hash`.
|
|
282
|
-
- Do not export symlinked vault entries or accept unsafe bundle paths.
|
|
283
|
-
|
|
284
|
-
## References
|
|
285
|
-
|
|
286
|
-
| For | Read |
|
|
287
|
-
| --- | --- |
|
|
288
|
-
| Upstream canon (package) | `@ssss/cli` (`v0.7.0`, spec v0.6 draft, github:gregiteen/ssss) |
|
|
289
|
-
| Canonical core registry | `@ssss/cli/registry/core.json` |
|
|
290
|
-
| Runtime helpers | `@ssss/cli/runtime` |
|
|
291
|
-
| Conformance bridge | `src/core/ssss-conformance.bridge.spec.mjs` |
|
|
292
|
-
| SSSS standard (local mirror) | `references/ssss-spec.md` |
|
|
293
|
-
| Implemented schemas | `src/core/schema.mjs` |
|
|
294
|
-
| Operation pipeline | `src/core/operation-validator.mjs` |
|
|
295
|
-
| Validated memory writes | `src/core/validated-write.mjs` |
|
|
296
|
-
| Memory validator | `src/core/total-recall-memory-validator.mjs` |
|
|
297
|
-
| Vault cache | `src/core/vault-cache.mjs` |
|
|
298
|
-
| Total Recall SSSS v2 reference | `.agent/skills/total-recall/references/ssss-reference.md` |
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"name": "ssss-has-skill-file",
|
|
4
|
-
"assertion": "The skill directory contains a valid SKILL.md entrypoint",
|
|
5
|
-
"severity": "error"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"name": "ssss-has-spec-sheet",
|
|
9
|
-
"assertion": "The references directory contains ssss-spec.md",
|
|
10
|
-
"severity": "error"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "ssss-validates-successfully",
|
|
14
|
-
"assertion": "The validate-schema script parses frontmatter correctly",
|
|
15
|
-
"severity": "warning"
|
|
16
|
-
}
|
|
17
|
-
]
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the SSSS (Structured Semantic Syntax System) spec will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [0.7.0] - 2026-07-02
|
|
9
|
-
### Changed
|
|
10
|
-
- **BREAKING: universal frontmatter enforcement** — every SSSS document primitive
|
|
11
|
-
now requires `type`, `title`, `description`, and `timestamp`. Primitive-specific
|
|
12
|
-
required fields still apply after these universal fields.
|
|
13
|
-
- Registry `spec_version` -> `0.6`; spec header -> v0.6 draft. Reference bundle
|
|
14
|
-
metadata now targets SSSS core `0.6`.
|
|
15
|
-
- The reference engine, bundle validator, skill validator, runtime helpers,
|
|
16
|
-
scaffold output, conformance fixtures, shipped skills, and reference bundle now
|
|
17
|
-
share the universal metadata requirement.
|
|
18
|
-
|
|
19
|
-
### Added
|
|
20
|
-
- OKF compatibility guidance documenting `resource`, `tags`, and `aliases` as
|
|
21
|
-
recommended discovery enrichment fields while keeping the mandatory universal
|
|
22
|
-
metadata minimal and deterministic.
|
|
23
|
-
- Security hardening for the reference engine and CLI:
|
|
24
|
-
- VFS paths now reject absolute, root, dot-segment, empty-segment, backslash,
|
|
25
|
-
and directory targets.
|
|
26
|
-
- `workspace_id`, `idempotency_key`, and role names are constrained to safe
|
|
27
|
-
filesystem identifiers.
|
|
28
|
-
- Idempotency replay is bound to a request hash; same-key/different-payload
|
|
29
|
-
requests now fail as conflicts.
|
|
30
|
-
- Leases fail closed when unreadable and no longer derive filenames directly
|
|
31
|
-
from raw VFS paths.
|
|
32
|
-
- Bundle validation rejects unsafe and duplicate file paths, and export refuses
|
|
33
|
-
symlinked vault entries.
|
|
34
|
-
- Autolink skips symlinked Markdown targets before `--write`.
|
|
35
|
-
- Repo-local skill utility scripts avoid shell-string execution and validate
|
|
36
|
-
write-target names.
|
|
37
|
-
|
|
38
|
-
## [0.6.0] - 2026-07-02
|
|
39
|
-
### Added
|
|
40
|
-
- **Workflow Runtime & Daemon Contract (spec §11.8)** — standardizes workflow
|
|
41
|
-
trigger evaluation across daemon, cron, webhook, file-change, event, condition,
|
|
42
|
-
and manual runtimes. Workflows own `triggers[]`; external schedulers are only
|
|
43
|
-
wake-up mechanisms.
|
|
44
|
-
- **`@ssss/cli/runtime` helpers** — deterministic `planWorkflowTrigger()` and
|
|
45
|
-
`createRunEnvelope()` helpers derive `workflow_triggered` events, task
|
|
46
|
-
documents, and run documents through the Operation Contract.
|
|
47
|
-
- **Runtime conformance metadata/checks** — `conformance/fixtures.json` v1.3.0
|
|
48
|
-
declares trigger/misfire/concurrency vocabularies and proves duplicate daemon
|
|
49
|
-
ticks replay idempotently.
|
|
50
|
-
|
|
51
|
-
### Changed
|
|
52
|
-
- Registry `spec_version` -> `0.5`; spec header -> v0.5 draft. Reference bundle
|
|
53
|
-
metadata now targets SSSS core `0.5`.
|
|
54
|
-
|
|
55
|
-
## [0.5.0] - 2026-06-25
|
|
56
|
-
### Added
|
|
57
|
-
- **`ssss new <dir>` scaffolder** — bootstrap a fresh SSSS-native repo in one command:
|
|
58
|
-
a starter `vault/` of core primitives (incl. a `tenant_private` task to demonstrate
|
|
59
|
-
the sale-drop), a dependency-free conformance test (`node --test`) that replays the
|
|
60
|
-
canonical fixtures through the engine and round-trips the vault as a `sale` bundle,
|
|
61
|
-
plus `package.json` (pinned to the matching `@ssss/cli` tag), `CLAUDE.md`, `README`,
|
|
62
|
-
and `.gitignore`. Flags: `--with-total-recall` (wire the Total Recall memory OS),
|
|
63
|
-
`--install` (npm install + Total Recall init + verify), `--ref`, `--name`, `--force`,
|
|
64
|
-
`--no-git`. All shelling-out uses `execFileSync` with fixed argv (no shell). Docs:
|
|
65
|
-
`ssss help scaffold`.
|
|
66
|
-
|
|
67
|
-
## [0.4.0] - 2026-06-24
|
|
68
|
-
### Added
|
|
69
|
-
- **The `.ucw` bundle format (spec §16, registry `bundle`)** — the canonical transportable
|
|
70
|
-
package of a vault: a manifest plus path-sorted files, content-hashed for integrity. The
|
|
71
|
-
manifest declares `ssss_core_version`, `required_extensions`, `export_profile`,
|
|
72
|
-
`primitive_inventory` (registry-driven, replacing ultrachat's closed `categories` enum),
|
|
73
|
-
`provisioning[]`, `parameters[]`, and `provenance{content_hash, exporter, signature?}`.
|
|
74
|
-
Harvested from ultrachat's `WorkspaceVfsPackageService` and generalized to be portability-
|
|
75
|
-
and registry-driven.
|
|
76
|
-
- **The provisioning contract (spec §17, registry `provisioning`)** — three deterministic,
|
|
77
|
-
idempotent verbs: `export` (pure, profile-filtered), `provision` (params + link-integrity
|
|
78
|
-
+ id-remap → replayable envelope plan), `import` (engine replay, idempotent via
|
|
79
|
-
idempotency_key). Adopts ultrachat's `WorkspaceProvisioningStep.mode`/`system` and
|
|
80
|
-
`WorkspaceGraphEdge.relation` as the canonical binding/dependency vocabularies, plus
|
|
81
|
-
`installMode` composition and structural-only `migration`+`patch` upgrades.
|
|
82
|
-
- **Reference engine for bundles (`src/bundle.mjs`)** — dependency-free `exportBundle`,
|
|
83
|
-
`validateBundle`, `provisionBundle`, `importBundle` over the registry bundle schema.
|
|
84
|
-
- **Reference bundle (`conformance/reference-bundle.ucw.json`, "Festival in a Box")** — a
|
|
85
|
-
real `sale`-profile bundle, built deterministically by `scripts/build-reference-bundle.mjs`.
|
|
86
|
-
Proves the §5.5 keystone: structural + resource_bound files ship, the `tenant_private`
|
|
87
|
-
ticket record is dropped. Round-tripped (validate → provision → import → re-import) by
|
|
88
|
-
`ssss conformance --engine`; 6/6 bundle/provisioning checks pass alongside the 9 fixtures.
|
|
89
|
-
- **`language_convention` documented (spec §11.7)** — the festech-shipped, `structural`
|
|
90
|
-
presentation-overlay primitive, formally placed in the semantic layer.
|
|
91
|
-
- **CLI command surface for the full lifecycle** — `ssss export`, `validate`, `inspect`,
|
|
92
|
-
`provision`, and `import` wire the bundle/provisioning verbs to the command line, plus
|
|
93
|
-
`ssss help [topic]` serving offline docs from `docs/help/` and `ssss version`. Each
|
|
94
|
-
command has its own `--help`. Shared parsing/formatting in `scripts/lib/cli.mjs`.
|
|
95
|
-
- **Open-source packaging** — `README.md`, `LICENSE` (ISC), `.gitignore`, and
|
|
96
|
-
`package.json` metadata (`engines`, `repository`, `files`) so `@ssss/cli` is
|
|
97
|
-
publishable and the runtime-read paths (`VERSION`, `docs/help`) ship in the tarball.
|
|
98
|
-
|
|
99
|
-
### Changed
|
|
100
|
-
- Registry `spec_version` → `0.4`; spec header + §14 → v0.4. Engine exports add `./bundle`.
|
|
101
|
-
|
|
102
|
-
## [0.3.0] - 2026-06-24
|
|
103
|
-
### Added
|
|
104
|
-
- **Portability classification (spec §5.5, registry `portability`)** — every document
|
|
105
|
-
primitive now declares a portability class: `structural` (the sellable business model),
|
|
106
|
-
`tenant_private` (the operator's private data, never sold), or `resource_bound` (needs a
|
|
107
|
-
real resource bound at provision). Export profiles `backup | template | sale` are filters
|
|
108
|
-
over these classes; `template`/`sale` exports MUST drop all `tenant_private` primitives.
|
|
109
|
-
Files MAY override their type default with `x_portability`. Lifted and generalized from
|
|
110
|
-
ultrachat's ad-hoc export filter in `WorkspaceVfsPackageService`.
|
|
111
|
-
- **`delete` envelope (spec §6.2)** — promoted from festech's `SsssOperationService` into
|
|
112
|
-
the canonical Operation Contract as the fourth envelope type. Removes a replace-type file,
|
|
113
|
-
rejects append-type targets, and emits a deletion event for audit. Idempotent.
|
|
114
|
-
- **Reference engine (`src/engine.mjs`, `src/registry.mjs`, `src/frontmatter.mjs`)** — the
|
|
115
|
-
canonical, dependency-free `@ssss/cli` Operation Contract engine. Harvested from total-recall
|
|
116
|
-
(§6.3 pipeline, idempotency replay from the audit log, `buildRepair`/§9 repair blocks) and
|
|
117
|
-
festech (`delete` envelope, `resolveContainedPath` path-traversal guard, registry-driven
|
|
118
|
-
content validation). Validates content against `registry/core.json` + `registry/extensions/*`
|
|
119
|
-
with no per-type code and no Zod/YAML dependency. Runs all 9 conformance fixtures in-process
|
|
120
|
-
via `ssss conformance --engine` (now wired into `npm test`).
|
|
121
|
-
|
|
122
|
-
### Changed
|
|
123
|
-
- Registry now defines **5 contract primitives** (added `delete`); `spec_version` → `0.3`.
|
|
124
|
-
- §5.1 Document Primitives table gains a **Portability** column.
|