收口 Rust Web 入口与 AI 写入链

- 将 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 启动脚本。
This commit is contained in:
lix-2026
2026-05-06 21:44:20 +08:00
parent 98b6360595
commit e8ba12e461
86 changed files with 8872 additions and 1716 deletions
@@ -264,13 +264,13 @@ describe("extractCurrentPageTitleFromSlashToolResult", () => {
describe("DocumentAiAgentPanel.runtime island contract", () => {
it("AI bridge runtime 固定为 Rust Web/Hermes owned island", () => {
it("AI bridge runtime 固定为 mnote-cli host/client 主路径", () => {
expect(DOCUMENT_AI_BRIDGE_ISLAND_CONTRACT).toMatchObject({
shellOwner: "mnote-web",
bridgeOwner: "rust-web-hermes",
runtimeRole: "react_interaction_island",
runEndpoint: "/api/hermes/bridge",
legacyCompatEndpoint: "/api/ai-agent/run",
bridgeOwner: "mnote-cli",
runtimeRole: "mnote_cli_host_client",
runEndpoint: "/api/ai-agent/run",
legacyCompatEndpoint: null,
});
});
});
@@ -29,10 +29,10 @@ const OLLAMA_QWEN3_30B = "qwen3:30b-a3b-instruct-2507-q4_K_M";
export const DOCUMENT_AI_BRIDGE_ISLAND_CONTRACT = {
shellOwner: "mnote-web",
bridgeOwner: "rust-web-hermes",
runtimeRole: "react_interaction_island",
runEndpoint: "/api/hermes/bridge",
legacyCompatEndpoint: "/api/ai-agent/run",
bridgeOwner: "mnote-cli",
runtimeRole: "mnote_cli_host_client",
runEndpoint: "/api/ai-agent/run",
legacyCompatEndpoint: null,
} as const;
const extractCodexMode = (text: string): CodexMode => {
@@ -149,10 +149,10 @@ export function buildTreeShellDomFiletreeSelection(activeDocumentId?: string | n
focusedRowId: null as string | null,
};
}
const documentRowId = `doc:${documentId}`;
const indexRowId = `index:${documentId}`;
return {
selectedRowIds: [documentRowId, `index:${documentId}`],
anchorRowId: documentRowId,
focusedRowId: documentRowId,
selectedRowIds: [indexRowId],
anchorRowId: indexRowId,
focusedRowId: indexRowId,
};
}
@@ -512,7 +512,8 @@ describe("tree-shell-iframe-host", () => {
expect(iframe?.getAttribute("srcdoc")).toContain('"expandedIds":["doc_a"]');
expect(iframe?.getAttribute("srcdoc")).toContain("const rendererExpandedIds = normalizeStringArray(rendererInput.expandedIds);");
expect(iframe?.getAttribute("srcdoc")).toContain('"filetreeSelection"');
expect(iframe?.getAttribute("srcdoc")).toContain('"selectedRowIds":["doc:doc_a","index:doc_a"]');
expect(iframe?.getAttribute("srcdoc")).toContain('"selectedRowIds":["index:doc_a"]');
expect(iframe?.getAttribute("srcdoc")).toContain('"focusedRowId":"index:doc_a"');
expect(iframe?.getAttribute("srcdoc")).toContain('"contractName":"rust_filetree_selection_reducer_v1"');
expect(iframe?.getAttribute("srcdoc")).toContain('"contractName":"rust_tree_shell_runtime_artifact_v1"');
expect(iframe?.getAttribute("srcdoc")).toContain('"family":"rust_family"');
@@ -849,10 +849,10 @@ const LOCAL_TREE_SHELL_TEMPLATE = `<!doctype html>
let selectedFileTreeRowIds = new Set(
rendererSelectedFileTreeRowIds.length > 0
? rendererSelectedFileTreeRowIds
: currentActiveDocumentId ? [\`doc:\${currentActiveDocumentId}\`, \`index:\${currentActiveDocumentId}\`] : [],
: currentActiveDocumentId ? [\`index:\${currentActiveDocumentId}\`] : [],
);
let fileTreeAnchorRowId = rendererAnchorRowId || (currentActiveDocumentId ? \`doc:\${currentActiveDocumentId}\` : null);
let fileTreeFocusedRowId = rendererFocusedRowId || (currentActiveDocumentId ? \`doc:\${currentActiveDocumentId}\` : null);
let fileTreeAnchorRowId = rendererAnchorRowId || (currentActiveDocumentId ? \`index:\${currentActiveDocumentId}\` : null);
let fileTreeFocusedRowId = rendererFocusedRowId || (currentActiveDocumentId ? \`index:\${currentActiveDocumentId}\` : null);
let visibleFileTreeRowIds = [];
const focusRowElement = (nodeId) => {