docs: align runtime architecture guidance
This commit is contained in:
+15
-8
@@ -1,6 +1,6 @@
|
||||
# 当前完整架构
|
||||
|
||||
> 更新时间:2026-05-22
|
||||
> 更新时间:2026-05-26
|
||||
>
|
||||
> 范围:`/mnt/Data1T/mnote` 当前可见实现、local-first MVP 后阶段主线口径、历史退役边界和后续功能缺口。
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
- `mnote-web` 是当前 3000 owner;Next / React 前端已退入 `recycle/`,只作为历史参考或 island bundle source。
|
||||
- 文档页默认编辑 host 是页面内 `leptos-tiptap` island。
|
||||
- 前端 runtime 已完成第一轮模块级拆分:浏览器 JS 功能默认从 `rust/crates/mnote-web/browser/*.js` 定位,tiptap island 行为默认从 `rust/spikes/leptos-tiptap-spike/src/editor_runtime/*.rs` 定位;`layout.rs` / `tree.rs` / `web_shell.rs` 主要保留 SSR/bootstrap/route/asset 注入职责,不再作为大型 raw string 功能入口。
|
||||
- local source 正文保存主入口已收口到带文件版本的 `page.body.write` / `/api/page-body/write`;`/api/documents/save` 只作为 compat adapter。
|
||||
- 文件 watcher 发现 agent / 外部编辑器写入后,clean editor 自动刷新,dirty editor 进入冲突态,不静默覆盖。
|
||||
|
||||
@@ -71,6 +72,8 @@
|
||||
- 本地上传链路已避免 Convex media asset,落盘相对 Markdown 链接。
|
||||
- 本地 AI 会话已区分 private / shared / cloud,并在 UI 上显示来源。
|
||||
- Convex guard 已阻止 active 路径重新引入未标注的 Convex documents / media / aiSessions 默认主存储口径,并拦截根 `convex/` functions 源码回流默认控制面。
|
||||
- Runtime 可维护收口已完成:`document-editor-adapter-runtime.js`、`sidebar-tree-runtime.js`、`tree-shell-runtime.js` 与 `leptos-tiptap-spike/src/lib.rs` 已拆到模块级,`mnote-web --lib`、`leptos-tiptap-spike --lib`、格式化、diff check 与 CodeGraph pending 0 已作为 `design/10-review/done/16-*` 的验收记录。
|
||||
- 当前 smoke 分类与默认基线以 `scripts/TESTING_REFERENCE.md` 为准;默认入口是 `3000 Rust SSR + leptos-tiptap island + local-first workspace + SQLite control-plane auth`。
|
||||
|
||||
## 4. MVP 后阶段功能缺口
|
||||
|
||||
@@ -94,32 +97,36 @@
|
||||
- 把 local-folder watcher、projection refresh、WS/SSE snapshot/delta/resync 收进同一 live cache。
|
||||
- 减少 polling 或重复补偿链。
|
||||
|
||||
6. **管理员目录授权 UI / API**
|
||||
6. **Runtime owner 剩余专项**
|
||||
- `design/03-rust-web/process/3-23-sidebar-local-folder-resource-runtime-followup-v1.md` 继续承接 local folder / resource 编排中仍适合拆出的稳定 helper。
|
||||
- `design/07-ai/process/7-38-page-ai-sidebar-runtime-owner-split-v1.md` 继续承接 Page AI sidebar runtime owner 细化。
|
||||
|
||||
7. **管理员目录授权 UI / API**
|
||||
- 需要把 `access-policy.json` 和当前 auth actor、admin grant、read/write/share 权限做成可管理界面。
|
||||
- 管理员可授权任意 canonical 目录;普通用户只能访问自己的受管 my-space 或被授权目录。
|
||||
|
||||
7. **VSCode-like 冲突处理 UI**
|
||||
8. **VSCode-like 冲突处理 UI**
|
||||
- 当前已有 clean/dirty watcher 行为和冲突态 smoke。
|
||||
- 还需要做可用的“接受磁盘版本 / 保留当前版本 / 打开 diff 合并”交互。
|
||||
|
||||
8. **agent 写入审计**
|
||||
9. **agent 写入审计**
|
||||
- local-first agent 应回收 changed files、diff summary、tool/run id、actor、workspace root、permission level。
|
||||
- audit 默认本地落盘,同步开启时再上报控制面。
|
||||
|
||||
9. **本地全文搜索、引用和索引**
|
||||
10. **本地全文搜索、引用和索引**
|
||||
- 本地 `.md` workspace 需要独立索引:全文搜索、反链、页面引用、资源引用、标签。
|
||||
- 不能依赖 Convex search 才能搜索本地工作区。
|
||||
|
||||
10. **分享与同步闭环**
|
||||
11. **分享与同步闭环**
|
||||
- 需要把 share grants、shared workspace cache、shared AI session、只读/可写权限和冲突处理连成产品级闭环。
|
||||
- share grant 是产品层共享授权,local access grant 是本机目录授权;显式分享不能自动扩大本机 filesystem root 权限。
|
||||
- 控制面不可用时不得扩大本地缓存权限。
|
||||
|
||||
11. **插件资源模型**
|
||||
12. **插件资源模型**
|
||||
- simplemindmap / office 应作为 Resource Tree 对象打开和保存。
|
||||
- Markdown 中只保留链接或嵌入引用,不把复杂对象强塞进普通正文块。
|
||||
|
||||
12. **旧 Convex 数据迁移产品化**
|
||||
13. **旧 Convex 数据迁移产品化**
|
||||
- 当前已有 fixture/offline 导出脚本。
|
||||
- 后续需要真实 Convex workspace 导出入口、迁移进度、冲突报告、回滚/备份策略。
|
||||
- 根 `convex/` functions 源码已软删除到 `recycle/20260522-convex-runtime-retirement/convex/`,只作为审计和迁移对照素材。
|
||||
|
||||
Reference in New Issue
Block a user