P1b: SQLite project, content-addressed assets, autosave and undo

This commit is contained in:
Emil
2026-11-01 01:19:55 +03:00
parent 4f4ee05a3a
commit 0acf11ccb0
22 changed files with 1405 additions and 32 deletions
+6
View File
@@ -146,3 +146,9 @@ Events: `pattern_step`, `pattern_face`, `face_struck`.
- The archive id is a content hash prefix (`core-` + 10 hex); the same bytes get the same id.
- The import is journaled on the session as `import_core` (journal-only; clients cannot send it as a command).
- If the file cannot be decoded or is too short, the requester receives `error` with the import id.
## P1b additions
`State` adds `project_name` (string), `can_undo` and `can_redo` (bools). Commands `undo` and `redo` take no arguments; event `history { can_undo, can_redo }` is broadcast after them.
The project is loaded by the daemon from its `--project` folder and saved after every project command or import. The protocol only exposes the project name; the path, SQLite file and assets stay server-side. There is no explicit save command: autosave is the contract. The journal is persisted, but undo history is not reconstructed on load.