Changeset 0.28.0 (#172)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
-- Chat Switchboard — 008 Memory
|
||||
-- ==========================================
|
||||
-- Long-term memory across conversations, extraction tracking.
|
||||
-- ICD §9 (Memory)
|
||||
-- Consolidated v0.28.0: adds last_compacted_at + decay_rate.
|
||||
-- ==========================================
|
||||
|
||||
-- =========================================
|
||||
@@ -21,6 +21,11 @@ CREATE TABLE IF NOT EXISTS memories (
|
||||
status TEXT NOT NULL DEFAULT 'active'
|
||||
CHECK (status IN ('active', 'pending_review', 'archived')),
|
||||
embedding vector(3072),
|
||||
|
||||
-- Compaction support (v0.28.0)
|
||||
last_compacted_at TIMESTAMPTZ,
|
||||
decay_rate REAL NOT NULL DEFAULT 0.0,
|
||||
|
||||
created_at TIMESTAMPTZ DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ DEFAULT now()
|
||||
);
|
||||
@@ -47,6 +52,8 @@ COMMENT ON TABLE memories IS 'Long-term memory facts persisted across conversati
|
||||
COMMENT ON COLUMN memories.scope IS 'user = personal facts; persona = shared; persona_user = per-user within a persona';
|
||||
COMMENT ON COLUMN memories.owner_id IS 'user_id for user scope, persona_id for persona/persona_user scopes';
|
||||
COMMENT ON COLUMN memories.confidence IS '0.0-1.0 confidence score — higher = more certain';
|
||||
COMMENT ON COLUMN memories.last_compacted_at IS 'Last time this memory was evaluated by the compaction process';
|
||||
COMMENT ON COLUMN memories.decay_rate IS 'Rate at which confidence decreases over time (0.0 = no decay)';
|
||||
|
||||
CREATE OR REPLACE FUNCTION update_memories_updated_at()
|
||||
RETURNS TRIGGER AS $$
|
||||
@@ -63,7 +70,7 @@ CREATE TRIGGER trg_memories_updated_at
|
||||
|
||||
|
||||
-- =========================================
|
||||
-- MEMORY EXTRACTION LOG (v0.18.0 Phase 2)
|
||||
-- MEMORY EXTRACTION LOG
|
||||
-- =========================================
|
||||
|
||||
CREATE TABLE IF NOT EXISTS memory_extraction_log (
|
||||
|
||||
Reference in New Issue
Block a user