pub const SQLITE_SCHEMA_SQL: &str = "CREATE TABLE IF NOT EXISTS mcp_write_receipts (
scope TEXT NOT NULL,
operation TEXT NOT NULL,
idempotency_key TEXT NOT NULL,
status TEXT NOT NULL CHECK (status IN ('in_progress', 'succeeded')),
claim_token TEXT,
input_hash TEXT NOT NULL,
receipt_json TEXT,
created_at_ms INTEGER NOT NULL,
completed_at_ms INTEGER,
lease_expires_at_ms INTEGER,
expires_at_ms INTEGER,
retain_until_ms INTEGER,
PRIMARY KEY (scope, operation, idempotency_key)
);
CREATE INDEX IF NOT EXISTS mcp_write_receipts_expires_at_idx ON mcp_write_receipts(expires_at_ms);";