chore: align sqlite control plane architecture

- replace default Convex control-plane wording with Rust SQLite control-plane across architecture, AGENTS, Reasonix, and design docs

- retire root Convex functions source and deploy script into recycle while keeping explicit cloud/compat/sync-replica boundaries

- add control-plane migration guard/docs and keep CodeGraph refreshed after the SQLite control-plane cutover
This commit is contained in:
lix-2026
2026-05-22 17:45:22 +08:00
parent 531e845600
commit 47e224d419
79 changed files with 7634 additions and 2600 deletions
@@ -40,7 +40,7 @@
不同 `WorkspaceSource` 使用不同 substrate
- `local_folder`:本地文件系统、watcher、rescan、命令执行结果。
- `convex_workspace`Convex 持久化、mutation / query、实时订阅、对象存储协作。
- `convex_workspace`显式 cloud / compat source 的 Convex 持久化、mutation / query、实时订阅、对象存储协作。
Convex 在这里是可选云端 / 协作 source 的 substrate,而不是所有工作区的默认 substrate:
@@ -281,7 +281,7 @@ Rust Web 负责:
- [x] WS handler 用 `tokio::select!` 订阅 `stream_delta_tx` broadcast channelmutation 后推送 delta 给所有客户端。
- [x] 2026-05-17 commit `57ec8322`SSE pollMs=1000 polling 替换为 WebSocket push + SSE fallback。Convex idle 查询从 17/min 降至 0/min。
- [x] legacy React 侧已有 `useSidebarTreeStream``EventSource` consumer,并有协议 / delta 单测(SSE fallback 仍在用)。
- [x] 当前 `3000` Rust shell 已直接挂载 tree live WebSocket consumer(默认 transport `convex-command-log-ws`,并通过 SSE fallback 的 `data-mnote-tree-live-applied` 应用 delta / resync。
- [x] 当前 `3000` Rust shell 已直接挂载 tree live WebSocket consumer;旧 `convex-command-log-ws` 命名只代表历史 transport 标签,默认 live cache 不再要求 Convex backend,并通过 SSE fallback 的 `data-mnote-tree-live-applied` 应用 delta / resync。
- [x] `task112` / `task120` / `task123` 已覆盖 `/api/tree/events` snapshot、delta / resync 与 stream owner 可用性。
- [x] `task165` 已验证双 pane 不重复建立第二条 tree live stream。
- [x] 2026-05-16 复核确认 workspace snapshot 同时携带 `data.dataset.kernel_sidebar_projection``data.dataset.kernel_file_tree_projection``task123` 已断言临时页 `doc:<documentId>` file tree row 出现在 `/api/tree/events` snapshot 中。
@@ -29,7 +29,7 @@
- `3000` 保持唯一公开入口,不新增长期公开端口。
- `mnote-web` 成为主 gateway、主 SSR shell、主 API transport、主 realtime transport 的 owner。
- Next App Router 只能保留为内部 compat,负责尚未迁完的 legacy 页面或 React island bundle,不再新增长期业务语义。
- Convex 保留为 storage / realtime substrate,不因为主 Web Rust 化而先拆
- Convex 保留为历史迁移源、显式 cloud source / compat / sync replica 边界;主 Web Rust 化后默认 storage / realtime / control-plane 不再依赖 Convex
- 页面、树、搜索、AI、Mindmap 的事实源继续向 Rust kernel / Page Aggregate / projection contract 收口。
- `BlockNote` 保留为 fallback / 对照链,不作为主执行面迁移的阻塞项。
@@ -299,7 +299,7 @@
> 2026-05-14 口径更新:
> - 本阶段原先把页面 AI 继续收口为 `mnote-cli host / client`,现在已被 `design/07-ai/done/7-3-page-ai-hermes-panel-and-mnote-plugin-v1.md` 覆盖。
> - 新长期方向是:页面 AI 面板使用 Leptos 实现 Hermes 页面内客户端;Hermes session/message/tool event/usage/model 是 AI 会话真相mnote 通过 Hermes skill/plugin 暴露页面、树、artifact、edge 等业务能力。
> - 新长期方向是:页面 AI 面板使用 Leptos 实现 ACP/Hermes 页面内客户端;产品层运行态索引、权限和审计默认落 SQLite control-planemnote 通过 Hermes skill/plugin 暴露页面、树、artifact、edge 等业务能力。Hermes/Reasonix runtime 的内部 session/message/tool event/usage/model 不等同于 MNote 产品层会话真相。
> - `mnote-cli` 只能作为 plugin 内部适配器或调试入口,不能再被写成页面 AI 唯一长期执行面。
> - `design/07-ai/done/7-4-page-ai-hermes-panel-execution-checklist-v1.md` 已把页面 AI 主链推进到 Hermes session/run/events,并完成 `mnote.page.get`、正文写入、标题/页面设置、artifact、legacy guard、持久化审计和正式 `3000` smoke 矩阵;本节后续只跟踪 Rust Web 侧长期边界,不再保留旧 `/api/ai-agent/run` 待办作为当前状态。
@@ -421,7 +421,7 @@ Leptos Islands 很适合承接下面这类长期目标:
归位:
- 面板只保留 Hermes chat/session/run/tool event 的页面内子集 UI 与当前页面上下文桥接
- Hermes 持有 session / message / usage / model 真相
- ACP/Hermes runtime 持有执行层 session / message / usage / model;MNote 产品层运行态索引、权限和审计默认由 SQLite control-plane 持有
- mnote 通过 Hermes skill/plugin 暴露页面、树、artifact、edge 工具,最终执行回到 Rust runtime / kernel
- 面板按页面需要懒挂载成单独 island