- 将 3000 主入口继续收口到 mnote-web,补齐 /favicon.ico、/api/auth、session alias、AI run 等 Rust Web 路由边界。 - 更新登录页与 Convex Auth 代理,支持测试账号快速登录写入真实 Convex Auth cookie。 - 推进页面设置、Wolai 对齐、Phase 7 AI kernel/CLI-first 设计文档与相关 smoke 脚本。 - 更新 leptos-tiptap 生成资产、mnote-cli/bridge-runtime、前端依赖和 dev/prod 启动脚本。
41 lines
2.2 KiB
Markdown
41 lines
2.2 KiB
Markdown
# 3-11 [process] Rust Web Legacy Next Retirement Gates v1
|
||
|
||
## 目标
|
||
|
||
将 Next App Router 从 3000 默认主链降级为显式 legacy/debug/internal 兼容边界。默认首页、文档页、搜索页、导图页、tree SSE 与 AI bridge host 均由 `mnote-web` 承接;长期 agent 执行面收口到 `mnote-cli`。
|
||
|
||
## 当前 owner
|
||
|
||
- `/`:Rust Web `gateway::root_entry`,owner `mnote-web`。
|
||
- `/documents/{document_id}`:Rust Web `web_shell::document_page_shell`,Page Aggregate owner `rust-kernel`。
|
||
- `/search`:Rust Web `search::shell`,Search projection owner `rust-kernel`。
|
||
- `/mindmap/{doc_id}/{mindmap_id}`:Rust Web `mindmap_shell::mindmap_object_shell`,Mindmap projection owner `rust-kernel`。
|
||
- `/api/tree/events`:Rust Web SSE,stream owner `rust-web`。
|
||
- `/api/hermes/bridge`:Rust Web 兼容 AI bridge;仅作为过渡边界,不是长期 agent 执行面。
|
||
- `/api/compat/next/*`:legacy compat boundary,仅用于迁移期兼容与调试。
|
||
|
||
## Gate
|
||
|
||
- `MNOTE_WEB_ENABLE_LEGACY_NEXT_COMPAT` 默认关闭;只有显式设置为 `1/true/yes` 才允许 fallback proxy。
|
||
- 默认主路径不得返回 `x-mnote-legacy-upstream: next-app-router`。
|
||
- 导图、搜索、文档页 contract 不得再把 `next-app-router` 声明为主 runtime。
|
||
- `/api/ai-agent/run` 当前仍保留兼容 route,但长期应降为 `mnote-cli` host / adapter,结构化写入必须经 Rust runtime,外置 agent 不得拥有第二执行面。
|
||
|
||
## 删除条件
|
||
|
||
- 删除 `/api/compat/next/sidebar`:Sidebar、workspace shell、file tree smoke 均证明 Rust projection 可覆盖默认入口。
|
||
- 删除 `/api/compat/next/ai-agent/run`:AI 面板默认请求统一 CLI host,legacy 调用方清零;Hermes 仅保留为可插拔外置 agent。
|
||
- 删除 fallback proxy:`task117` 默认关闭 legacy compat 后覆盖首页、文档页、搜索页、导图页与 tree SSE。
|
||
|
||
## 验收命令
|
||
|
||
```bash
|
||
cd /mnt/Data1T/mnote/rust
|
||
cargo test -p mnote-web gateway
|
||
cargo test -p mnote-web legacy_next
|
||
|
||
cd /mnt/Data1T/mnote
|
||
MNOTE_UI_BASE_URL=http://127.0.0.1:3000 node scripts/task117-next-retirement-guard.js
|
||
rg -n "legacy_next|compat/next|next-app-router|fallback proxy" rust/crates/mnote-web wolai-frontend design
|
||
```
|