Files
WhispAssist/src-tauri/migrations/0003_ai_mcp.sql
T

28 lines
1.2 KiB
SQL

-- WhispAssist external-AI + MCP schema (Phase 10 / ADR-0011).
-- Forward-only migration. Mirrors docs/03-data-model.md.
PRAGMA foreign_keys = ON;
-- Feature briefs distilled from a meeting for coding-agent handoff (FR-MCP-4).
-- The JSON body lives in the meeting's briefs/ folder; this table indexes it for the MCP tools.
CREATE TABLE feature_briefs (
id TEXT PRIMARY KEY,
meeting_id TEXT NOT NULL REFERENCES meetings(id) ON DELETE CASCADE,
title TEXT NOT NULL,
target_repo TEXT,
path TEXT NOT NULL, -- briefs/<id>.json
exposed INTEGER NOT NULL DEFAULT 0, -- visible to the MCP server? (scope control, FR-MCP-3)
created_at INTEGER NOT NULL
);
-- Audit of what an MCP client (agent) read (FR-MCP-5).
CREATE TABLE mcp_access_log (
id TEXT PRIMARY KEY,
at INTEGER NOT NULL,
tool TEXT NOT NULL, -- e.g. get_feature_brief
meeting_id TEXT, -- subject, if any
client TEXT -- client-reported name, if provided
);
CREATE INDEX idx_briefs_meeting ON feature_briefs(meeting_id);
CREATE INDEX idx_mcplog_at ON mcp_access_log(at DESC);