merge: feature/capability-enablement-impact-plan; renumber chat_summaries to 00058

Absorb stalled capability fixes and avoid goose out-of-order on schema 57 DBs by shipping chat_summaries as 00058.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
weichen
2026-09-20 10:38:12 +00:00
co-authored by Cursor
50 changed files with 2574 additions and 182 deletions
@@ -0,0 +1,24 @@
-- +goose Up
-- 滚动摘要的持久化位置。此前 INSERT 指向不存在的 chat_summaries,失败被吞掉并退回进程内存。
-- 授权可见集 digest、模型版本留空,直到语义摘要 shadow 生产化时写入;REPLACE 仍不接线。
CREATE TABLE IF NOT EXISTS chat_summaries (
session_id TEXT PRIMARY KEY,
narrative TEXT NOT NULL DEFAULT '',
facts JSONB NOT NULL DEFAULT '{}'::jsonb,
open_questions JSONB NOT NULL DEFAULT '[]'::jsonb,
covered_count INT NOT NULL DEFAULT 0,
covered_until TIMESTAMPTZ,
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
source TEXT NOT NULL DEFAULT 'deterministic',
visibility_digest TEXT NOT NULL DEFAULT '',
from_message_id BIGINT,
to_message_id BIGINT,
previous_revision INT NOT NULL DEFAULT 0,
revision INT NOT NULL DEFAULT 1,
protocol_version TEXT NOT NULL DEFAULT '',
model_version TEXT NOT NULL DEFAULT ''
);
-- +goose Down
DROP TABLE IF EXISTS chat_summaries;