v0.2.1cerebra2026-06-11

Phase 5 Steps 1+2 — cognitive runtime schema + session management

Migration009 (sessions/wm/tower tables), slot constants, PHASE_5_EVENT_TYPES, new_session(), vault lockfile, and `cerebra session` CLI commands.

v0.2.12026-06-11
  • ·Migration009: sessions, working_memory_items, truth_tower_items — all FKs ON DELETE RESTRICT; tier/t1_citation_id CHECK constraint enforces T1=NULL / T2=NOT NULL citation invariant
  • ·_constants.py: SLOT_CAPACITIES (34 total, 10 slot types), TOWER_CAPACITIES (T1=10, T2=5), SYNTHETIC_ITEM_DEFAULT_SALIENCE=0.8
  • ·event.py: PHASE_5_EVENT_TYPES (16 event types), ALL_KNOWN_EVENT_TYPES union
  • ·working_memory.py: new_session(), get_active_session(), close_session() — closes prior active session on new open; emits WorkingMemoryCreated
  • ·lockfile.py: vault_lock via fcntl.flock LOCK_EX|LOCK_NB; stale-PID reclaim; exits 2 on live contention
  • ·cli/main.py: `cerebra session show` (text + JSON, read-only) + `cerebra session reset` (lockfile-guarded)