-- ~/.hermes/steev/schema.sql
CREATE TABLE IF NOT EXISTS briefings (
    id         TEXT PRIMARY KEY,
    date       TEXT NOT NULL,
    digest     TEXT,            -- full rendered briefing text
    created_at TEXT NOT NULL DEFAULT (datetime('now'))
);

CREATE TABLE IF NOT EXISTS inbox_items (
    id         TEXT PRIMARY KEY,
    source     TEXT,            -- email | message | slack
    subject    TEXT,
    sender     TEXT,
    category   TEXT,            -- fyi | action | business | personal | noise
    priority   TEXT,            -- high | normal | low
    status     TEXT DEFAULT 'new', -- new | triaged | delegated | done
    notes      TEXT,            -- triage notes or delegation brief
    created_at TEXT NOT NULL DEFAULT (datetime('now')),
    updated_at TEXT NOT NULL DEFAULT (datetime('now'))
);

CREATE TABLE IF NOT EXISTS agent_runtime (
    key   TEXT PRIMARY KEY,
    value TEXT
);
