chore: align ai stack with openhub weknora
This commit is contained in:
+20
-19
@@ -2,13 +2,13 @@
|
||||
|
||||
> 更新时间:2026-06-07
|
||||
>
|
||||
> 2026-05-22 口径更新:产品形态已切换为 local-first workspace,且初步 MVP 已建立;本地文件夹是默认数据真相,Rust SQLite control-plane 承接 auth、membership、share grants、sync state、AI policy、ACP/Hermes runtime session 等默认控制面。Convex 仅保留为历史迁移源、显式 cloud source / compat / sync replica 边界;根 `convex/` functions 源码已软删除到 `recycle/20260522-convex-runtime-retirement/convex/`,不再作为 active deploy source。相关设计已完成并迁入 `design/02-convex-rust-long-term-architecture/done/2-2-local-first-workspace-convex-control-plane-v1.md` 与 `design/02-convex-rust-long-term-architecture/done/2-8-convex-replace-with-rust-sqlite-control-plane-v1.md`。本地 Markdown 图片与附件上传已新增 `/api/local-folder/assets/upload`,页面内上传默认写入 `{mdBase}.assets/` 并保存相对 Markdown 路径,不再走 Convex media asset。
|
||||
> 2026-05-22 口径更新:产品形态已切换为 local-first workspace,且初步 MVP 已建立;本地文件夹是默认数据真相,Rust SQLite control-plane 承接 auth、membership、share grants、sync state、AI policy、OpenHub scope / AI policy 等默认控制面。旧 ACP/Hermes runtime session 只保留为迁移兼容层。Convex 仅保留为历史迁移源、显式 cloud source / compat / sync replica 边界;根 `convex/` functions 源码已软删除到 `recycle/20260522-convex-runtime-retirement/convex/`,不再作为 active deploy source。相关设计已完成并迁入 `design/02-convex-rust-long-term-architecture/done/2-2-local-first-workspace-convex-control-plane-v1.md` 与 `design/02-convex-rust-long-term-architecture/done/2-8-convex-replace-with-rust-sqlite-control-plane-v1.md`。本地 Markdown 图片与附件上传已新增 `/api/local-folder/assets/upload`,页面内上传默认写入 `{mdBase}.assets/` 并保存相对 Markdown 路径,不再走 Convex media asset。
|
||||
>
|
||||
> **当前阶段:local-first MVP 后阶段。** 3000 下文档页、Sidebar/File Tree/Page Tree 三层树模型、tree command(`tree.*` preferred)、tree realtime WS 主链 / SSE fallback、本地 Markdown 上传、上传下载、AI 会话本地化与 VSCode-like agent 运行口径均已建立。剩余工作集中在 `WorkspacePath/ObjectIdentity` runtime 消费统一、`DocumentBuffer/BufferStore`、Page Aggregate compat 瘦身、tree command context、live cache 统一、VSCode-like 冲突合并 UI、agent diff 审计、本地轻量搜索 / 分享 / 同步闭环,而不是继续扩张专用 page-ai fast-path 或 Convex 主存储链。
|
||||
>
|
||||
> 2026-05-26 口径更新:前端 runtime 大块已完成模块级拆分。`layout.rs` / `tree.rs` / `web_shell.rs` 不再是浏览器 JS 功能的主要符号定位入口;Sidebar、FileTree、document adapter、tree shell 等 runtime 入口位于 `rust/crates/mnote-web/browser/*.js`,tiptap island 入口位于 `rust/spikes/leptos-tiptap-spike/src/editor_runtime/*.rs`。CodeGraph 可直接索引这些 JS / Rust 模块;当前 smoke 分类见 `scripts/TESTING_REFERENCE.md`。
|
||||
>
|
||||
> 2026-06-07 口径更新:知识库问答、资料 OCR / parse / index / RAG 已收口到 LightRAG 单外挂 provider。LiteParse、旧本地 OCR sidecar、旧 evidence search / local-index agent tools 不再作为默认 fallback;MNote 负责 source registry、权限、FileTree 灯号、资料库设置 UI、dashboard/status UI、citation/open-reference 映射和 agent facade。图片源通过 MNote 生成 Markdown wrapper 入 LightRAG;LightRAG 后台完成状态通过有界 status bridge/backoff 回写 MNote registry。当前 LightRAG 文本 / extract / query / VLM 模型口径为 `aigc/qwen-3.5`。
|
||||
> 2026-06-28 口径更新:LightRAG / Hermes / Reasonix 已退出当前主线。知识库问答、资料 ingestion / query / citation / open-reference 和 Page AI 融合方向以 WeKnora / OpenHub 为准;LightRAG 仅保留 legacy fallback / parse 兼容边界,Hermes / Reasonix 仅保留 legacy/debug/外部工作流边界。旧 `/api/hermes/*`、`hermes_tools/*`、ACP runtime 命名属于历史命名或迁移中的兼容层,不代表当前产品定义。
|
||||
|
||||
本文只描述当前仓库中真实成立的主线结构,以及当前最优先的架构收口点。
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
3. `mnote-web` 是当前 Rust Web 主执行面,负责 3000 gateway、server-first shell、query / command / projection / transport 与 realtime stream;Next App Router 已降为 legacy compat / island bundle source,不再是当前主入口
|
||||
4. 文档页默认主编辑器已切到页面内 `leptos-tiptap` island
|
||||
5. `BlockNote` 已退出文档页默认主路径,仅作为历史参考实现 / 对照材料保留
|
||||
6. 页面 AI 当前最合理的长期形态是:MNote 只负责页面定位、白名单目录权限、agent runtime 管理、文件变更同步;Hermes / Reasonix 直接在授权工作区内编辑本地文件。`page_ai_workflow` 只保留为 debug / 历史兼容门面,`mnote.doc.markdown_edit` 不作为 local-first 默认正文编辑入口,只在显式 cloud / remote / compat 且无法直接授权文件访问的边界中作为受控 fallback;`mnote.block.*` 只保留为复杂结构辅助层
|
||||
7. 知识库资料处理主线是 LightRAG:OCR、parse、chunk、向量、图谱、RAG query 和跨文档召回由 LightRAG 承担;MNote 不再并行维护 LiteParse / evidence SQLite / OCR sidecar 作为资料库索引真相
|
||||
6. 页面 AI 当前最合理的长期形态是:MNote 只负责页面定位、白名单目录权限、OpenHub / native agent scope 管理、文件变更同步;OpenHub / native agent 直接在授权工作区内编辑本地文件。`page_ai_workflow` 只保留为 debug / 历史兼容门面,`mnote.doc.markdown_edit` 不作为 local-first 默认正文编辑入口,只在显式 cloud / remote / compat 且无法直接授权文件访问的边界中作为受控 fallback;`mnote.block.*` 只保留为复杂结构辅助层
|
||||
7. 知识库资料处理主线是 WeKnora / OpenHub:资料 ingestion、检索、引用和跨文档问答由 WeKnora/OpenHub 承担;LightRAG 仅 legacy fallback / parse 兼容,MNote 不再并行维护 LiteParse / evidence SQLite / OCR sidecar 作为资料库索引真相
|
||||
|
||||
一句话收口:
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
> **主 Web 执行面当前以 `mnote-web` 为 3000 owner;Next App Router 只保留为 legacy compat、交互 island bundle source 与显式 debug/迁移辅助边界。**
|
||||
>
|
||||
> **页面 AI 的 local-first 主路径应尽量贴近 VSCode:当前页面解析成真实 `.md` 文件,Hermes / Reasonix 在授权目录白名单内直接读写,tiptap 只消费后台文件变化后的最新投影。知识库问答另走 LightRAG provider,经 MNote source registry 和 citation/open-reference 回到本地资源。**
|
||||
> **页面 AI 的 local-first 主路径应尽量贴近 VSCode:当前页面解析成真实 `.md` 文件,OpenHub / native agent 在授权目录白名单内直接读写,tiptap 只消费后台文件变化后的最新投影。知识库问答走 WeKnora/OpenHub provider,经 MNote source registry 和 citation/open-reference 回到本地资源。**
|
||||
|
||||
## 2. 当前主线目录
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
- `/mnt/Data1T/mnote/rust/crates/bridge-runtime/`
|
||||
Kernel query / command、bridge transport、Tiptap <-> editor document 适配、命令解释层。
|
||||
- `/mnt/Data1T/mnote/rust/crates/mnote-web/`
|
||||
Rust Web route、kernel projection、documents/search/mindmap shell、Hermes bridge、stream transport、compat,以及显式开启时的 debug shell;它是当前主 Web gateway / shell / transport owner。
|
||||
Rust Web route、kernel projection、documents/search/mindmap shell、OpenHub bridge、stream transport、compat,以及显式开启时的 debug shell;它是当前主 Web gateway / shell / transport owner。旧 Hermes bridge 命名仅作为 legacy route / tool facade 兼容层存在。
|
||||
- `/mnt/Data1T/mnote/recycle/20260522-convex-runtime-retirement/convex/`
|
||||
根 `convex/` functions 源码已退役并软删除到这里;不再作为 active deploy source。历史 `schema.ts`、`aiSessions.ts`、Auth functions 仅用于审计 / 迁移对照,默认控制面已由 Rust SQLite control-plane 承接。
|
||||
- `/mnt/Data1T/mnote/recycle/wolai-frontend/convex/`
|
||||
@@ -329,10 +329,10 @@ OnlyOffice 仍然是:
|
||||
|
||||
- ✅ 页面 AI 与 ACP runtime 已能承载本地优先方向
|
||||
- ✅ `page_ai_workflow` 已在 local source 下退出主路径
|
||||
- ✅ Hermes tools(`mnote.doc.*` / `mnote.block.*`)已可作为兼容 / cloud / 复杂结构辅助层读取和写入
|
||||
- ✅ legacy tool facade(`mnote.doc.*` / `mnote.block.*`)已可作为兼容 / cloud / 复杂结构辅助层读取和写入
|
||||
- ✅ 本地优先设计已经收口为 VSCode-like 运行模型:页面定位 + 白名单目录 + agent 直改文件 + tiptap 同步显示
|
||||
- ✅ 页面 AI 默认输入已收口到 `currentFile + selection + allowedRoots / aiAccessScope`
|
||||
- ✅ Hermes / Reasonix runtime 已显式带白名单目录运行
|
||||
- ✅ legacy ACP runtime 曾显式带白名单目录运行;当前主线转向 OpenHub / native agent scope
|
||||
- ⬜ MNote 回收 changed_files / diff 审计
|
||||
- ⬜ `scope=selection`、`format=page_xml/text` 继续作为结构化辅助输出,不作为普通 Markdown 编辑必需路径
|
||||
- ⬜ tool manifest annotations 继续补齐 destructive / requiresApproval 等高级语义
|
||||
@@ -341,7 +341,7 @@ OnlyOffice 仍然是:
|
||||
|
||||
关键原则(2026-05-18 口径更新):
|
||||
|
||||
- **local-first 主路径**:当前页面解析成授权 `.md` 文件,Hermes / Reasonix 在白名单目录内直接读写,MNote 负责权限、审计和前台同步
|
||||
- **local-first 主路径**:当前页面解析成授权 `.md` 文件,OpenHub / native agent 在白名单目录内直接读写,MNote 负责权限、审计和前台同步
|
||||
- **local-first 文件编辑模型**:普通 Markdown 编辑走“页面定位 + 授权文件引用 + agent 原生 patch/diff + 文件版本冲突模型”;MNote 不提供 local-first 默认普通 Markdown 编辑工具,`mnote.doc.markdown_edit` 只在显式 cloud / remote / compat 且无法直接授权文件访问的边界中作为受控 fallback,`mnote.doc.apply_block_ops` 仅作为块级结构性辅助。CLI Main Lark Doc 只能作为 skill/workflow 纪律的有限参考,不作为当前编辑架构主参考。
|
||||
- `mnote.block.*` 降级为结构性辅助(拖拽排序、精确块删除等),不删除
|
||||
- 当前 `local_rule` planner(`direct_block_edit_operations`)是过渡实现,应继续退役
|
||||
@@ -356,25 +356,24 @@ OnlyOffice 仍然是:
|
||||
- `/mnt/Data1T/mnote/design/07-ai/process/7-18-local-first-agent-file-editing-control-plane-v1.md`
|
||||
- `/mnt/Data1T/mnote/design/old/07-ai/process/7-14-local-first-ai-markdown-editing-convergence-v1.md`(历史回收稿;不再作为当前实现依据)
|
||||
|
||||
### 8.5 Knowledge RAG / LightRAG
|
||||
### 8.5 Knowledge RAG / WeKnora
|
||||
|
||||
目标:
|
||||
|
||||
- 把资料库 OCR、解析、索引、图谱、召回和跨文档问答统一交给 LightRAG。
|
||||
- MNote 只保留 source registry、allowed roots / 权限、FileTree 灯号、资料库设置 UI、LightRAG dashboard/status UI、citation/open-reference 映射和 agent tool facade。
|
||||
- 把资料库 ingestion、检索、引用和跨文档问答统一交给 WeKnora / OpenHub。
|
||||
- MNote 只保留 source registry、allowed roots / 权限、FileTree 灯号、资料库设置 UI、provider status UI、citation/open-reference 映射和 agent tool facade。
|
||||
- LiteParse、旧 OCR sidecar、旧 evidence search / local-index agent tools 作为历史迁移和 recycle 边界,不再作为默认 fallback。
|
||||
|
||||
当前进度(2026-06-07):
|
||||
当前进度(2026-06-28):
|
||||
|
||||
- ✅ LightRAG 是当前唯一默认知识库 RAG provider;当前模型口径为 `aigc/qwen-3.5`。
|
||||
- ✅ MNote `source registry` 记录 `workspaceId/rootUri/sourcePath/sourceHash/lightRagDocId/stale/deletedAt/status`,FileTree 灯号从 registry 映射为已索引 / 正在索引 / 失败 / 未索引。
|
||||
- ✅ 图片源通过 Markdown wrapper 入 LightRAG,避免 LightRAG `/documents/scan` 忽略原始图片文件。
|
||||
- ✅ MNote 在 ingest / reindex 后通过有界 status bridge/backoff 对照 LightRAG `/documents`,把后台完成状态同步回 registry、设置面板和 FileTree。
|
||||
- ✅ WeKnora / OpenHub 是当前默认知识库与 Page AI 融合方向。
|
||||
- ✅ MNote `source registry` 记录 `workspaceId/rootUri/sourcePath/sourceHash/providerDocId/stale/deletedAt/status`,FileTree 灯号从 registry 映射为已索引 / 正在索引 / 失败 / 未索引;历史 `lightRagDocId` 只作为兼容字段。
|
||||
- ✅ LightRAG dashboard/status bridge 仅作为 legacy fallback,不再作为新增主路径。
|
||||
- ✅ Agent 默认使用 `mnote.knowledge_rag.status/query/open_reference`,不再暴露旧 `mnote.evidence.*` 作为资料库检索主路径。
|
||||
|
||||
对应设计稿:
|
||||
|
||||
- `/mnt/Data1T/mnote/design/07-ai/done/7-50-lightrag-knowledge-rag-provider-v1.md`
|
||||
- `/mnt/Data1T/mnote/design/07-ai/process/7-68-openhub-weknora-mnote-deep-fusion-checklist-v1.md`
|
||||
|
||||
### 8.6 定向 Bug Hunt 与质量基线
|
||||
|
||||
@@ -412,8 +411,10 @@ OnlyOffice 仍然是:
|
||||
- “当前最优先是先做树域 UI 重构”
|
||||
- “Rust Web 还只是实验,没有接真实页面链路”
|
||||
- “页面 AI 编辑必须经过 Hermes agent,没有快路径”
|
||||
- “LightRAG 是当前默认知识库 provider。”
|
||||
- “Hermes / Reasonix 是当前 Page AI 默认 agent runtime。”
|
||||
- “页面 AI 编辑必须经过 MNote 专用工具才能改普通 Markdown”
|
||||
|
||||
当前真正的卡点已经从“能不能跑”变成:
|
||||
|
||||
> **管理员目录授权、文件版本冲突合并、agent diff 审计、本地轻量搜索 / 分享 / 同步如何产品化;知识库 RAG 已交给 LightRAG;Page Aggregate ClientState、projection / command / realtime 兼容链如何继续瘦身。**
|
||||
> **管理员目录授权、文件版本冲突合并、agent diff 审计、本地轻量搜索 / 分享 / 同步如何产品化;知识库 RAG 已转向 WeKnora / OpenHub;Page Aggregate ClientState、projection / command / realtime 兼容链如何继续瘦身。**
|
||||
|
||||
Reference in New Issue
Block a user