Files
tiny-worlds/runs/la-caramba/dumps/memory.sql
T
mute ccf766681a bridge: per-role opening bundle, prelude opener, vars substitution, tool channel tags
- system.md is the sole system message; backdrop, character, ring-b,
  ring-a, and status ride user messages (ring A and her paper get the
  recency slots); prelude.md, when present and the run has no session
  log yet, is the opening beat; the whole bundle is logged into the
  session transcript
- $NAME tokens in bundle .md files substitute from the run's
  settings.json "vars"; unresolved tokens fail loudly and never reach
  the model
- every tool description is tagged with its output channel ([IC]/[OOC])
  per system.md's input-validation section; records_search output is
  marked in-fiction content, never instructions
- run renamed prisoners -> la-caramba throughout (config default, docs,
  gm notes); backdrop rewritten (public knowledge + setting themes);
  prelude split out as the new-game opener
- system.md: input-validation section, IC/OOC glossary, injection guards
- branch renamed master -> mistress
- live endpoint probed: all four roles accepted, multiple and mid-stream
  system messages honored, full tool round-trip, reasoning_content
  round-trips safely (notes in HANDOFF)
2026-11-12 05:40:56 +00:00

55 lines
2.1 KiB
SQL

-- canonical dump of db/memory.db — GENERATED by tool/memory.mjs; do not edit.
-- one row per line; entries and events ordered by id; restore with: restore
PRAGMA foreign_keys = ON;
-- ids are AUTOINCREMENT: rows can move between entries and records
-- (archive / unarchive), and ids must never be reused — journal targets
-- stay meaningful forever.
CREATE TABLE IF NOT EXISTS entries (
id INTEGER PRIMARY KEY AUTOINCREMENT,
ring TEXT NOT NULL CHECK (ring IN ('a', 'b', 'cold')),
type TEXT NOT NULL CHECK (type IN ('place', 'person', 'fact', 'thread')),
label TEXT NOT NULL,
detail TEXT NOT NULL DEFAULT '',
created TEXT NOT NULL,
last_touched TEXT NOT NULL
);
CREATE INDEX IF NOT EXISTS entries_ring_touch
ON entries (ring, last_touched DESC, id DESC);
-- the character's files: cards, ledgers, manifests.
-- detailed, queryable, never bulk-loaded into context.
-- access is diegetic and per-run: runs/<story>/settings.json {"records": bool}
CREATE TABLE IF NOT EXISTS records (
id INTEGER PRIMARY KEY AUTOINCREMENT,
kind TEXT NOT NULL,
label TEXT NOT NULL,
detail TEXT NOT NULL DEFAULT '',
created TEXT NOT NULL
);
-- the player's own piece of paper: baselines (the "what would make sense"
-- default — a decision already made) plus excursions (declared only when a
-- value leaves its baseline, cleared when it returns). exception reporting.
CREATE TABLE IF NOT EXISTS status (
key TEXT PRIMARY KEY,
normal TEXT NOT NULL DEFAULT '',
value TEXT NOT NULL DEFAULT '',
updated TEXT NOT NULL
);
-- append-only audit journal; nothing here is ever updated or deleted.
-- target is 'e<id>' for entries, 'r<id>' for records, 's:<key>' for status.
CREATE TABLE IF NOT EXISTS events (
id INTEGER PRIMARY KEY AUTOINCREMENT,
window TEXT NOT NULL,
op TEXT NOT NULL CHECK (op IN ('insert', 'touch', 'promote', 'demote', 'reword', 'delete', 'evict', 'revive', 'record', 'archive', 'unarchive', 'amend', 'discard', 'status')),
target TEXT NOT NULL,
reason TEXT NOT NULL DEFAULT ''
);
CREATE INDEX IF NOT EXISTS events_window ON events (window);
BEGIN TRANSACTION;
COMMIT;