feat: purge legacy agent hosts and land vault Chrome extension path
Retire ACP/Hermes/OpenCode surfaces and rename hermes_tools to mnote_agent_tools so Page AI stays on Pi Lab only. Add Chrome vault extension + extension token route, pre-release purge design, and soft-retire legacy smokes for the small-group production cut.
This commit is contained in:
@@ -14,7 +14,11 @@ const files = {
|
||||
runtime: path.join(repoRoot, 'rust/crates/mnote-web/browser/sidebar-page-ai-pi-lab-runtime.js'),
|
||||
legacyPageAiRuntime: path.join(repoRoot, 'rust/crates/mnote-web/browser/sidebar-page-ai-runtime.js'),
|
||||
layout: path.join(repoRoot, 'rust/crates/mnote-web/src/ssr/pages/layout.rs'),
|
||||
route: path.join(repoRoot, 'rust/crates/mnote-web/src/routes/page_ai_pi.rs'),
|
||||
// page_ai_pi 已拆为目录模块(constants.rs / runtime.rs / mod.rs)
|
||||
routeDir: path.join(repoRoot, 'rust/crates/mnote-web/src/routes/page_ai_pi'),
|
||||
routeMod: path.join(repoRoot, 'rust/crates/mnote-web/src/routes/page_ai_pi/mod.rs'),
|
||||
routeConstants: path.join(repoRoot, 'rust/crates/mnote-web/src/routes/page_ai_pi/constants.rs'),
|
||||
routeRuntime: path.join(repoRoot, 'rust/crates/mnote-web/src/routes/page_ai_pi/runtime.rs'),
|
||||
mod: path.join(repoRoot, 'rust/crates/mnote-web/src/routes/mod.rs'),
|
||||
webShell: path.join(repoRoot, 'rust/crates/mnote-web/src/routes/web_shell.rs'),
|
||||
gateway: path.join(repoRoot, 'rust/crates/mnote-web/src/routes/gateway.rs'),
|
||||
@@ -32,7 +36,12 @@ function readFile(p) {
|
||||
const runtime = readFile(files.runtime);
|
||||
const legacyPageAiRuntime = readFile(files.legacyPageAiRuntime);
|
||||
const layout = readFile(files.layout);
|
||||
const route = readFile(files.route);
|
||||
// 合并目录模块,保持后续 route.includes(...) 检查不变
|
||||
const route = [
|
||||
readFile(files.routeMod),
|
||||
readFile(files.routeConstants),
|
||||
readFile(files.routeRuntime),
|
||||
].join('\n');
|
||||
const routesMod = readFile(files.mod);
|
||||
const webShell = readFile(files.webShell);
|
||||
const gateway = readFile(files.gateway);
|
||||
@@ -159,7 +168,13 @@ const checks = [
|
||||
['runtime hides Pi Lab launcher while drawer is active', runtime.includes('piLabLauncherEl.hidden = !!piLabState.active')],
|
||||
['layout maps old floating AI slot to Pi Lab', layout.includes('data-testid="wolai-floating-ai"') && layout.includes('data-mnote-action="open-page-ai-pi-lab"') && layout.includes('{"\\u{03c0}"}')],
|
||||
['layout no longer exposes legacy Page AI/OpenHub action from floating button', !layout.includes('data-mnote-action="open-page-ai"><span')],
|
||||
['legacy Page AI opencode host requires explicit debug opt-in', legacyPageAiRuntime.includes("getItem('mnote.page_ai.opencode_host') === '1'") && !legacyPageAiRuntime.includes("getItem('mnote.page_ai.opencode_host') !== '0' : true")],
|
||||
// Wave 8:legacy page-ai runtime 已瘦身为 Pi-only stub,不再含 OpenCode host
|
||||
['legacy Page AI runtime is Pi-only stub (no OpenCode host)',
|
||||
legacyPageAiRuntime.includes('Pi Lab only')
|
||||
&& legacyPageAiRuntime.includes('openPageAiDrawer')
|
||||
&& legacyPageAiRuntime.includes('mnote:pi-lab-show')
|
||||
&& !legacyPageAiRuntime.includes('opencode_host')
|
||||
&& !legacyPageAiRuntime.includes('page-ai-opencode')],
|
||||
['runtime documents pi-web-ui evidence', runtime.includes('@earendil-works/pi-web-ui@0.75.3')],
|
||||
['runtime uses MNote-native adapter boundary', runtime.includes('MNote-native adapter')],
|
||||
|
||||
@@ -359,7 +374,8 @@ const checks = [
|
||||
!runtime.includes('sidebarPageAiRuntime')],
|
||||
['no import of main page AI runtime', !runtime.includes('import.*sidebar-page-ai')],
|
||||
|
||||
// === B2: JSONL reading constants in page_ai_pi.rs ===
|
||||
// === B2: JSONL reading constants in page_ai_pi/ ===
|
||||
["page_ai_pi module directory exists", fs.existsSync(files.routeDir) && fs.statSync(files.routeDir).isDirectory()],
|
||||
["route has PI_LAB_JSONL_MAX_FILE_BYTES constant", route.includes("PI_LAB_JSONL_MAX_FILE_BYTES")],
|
||||
["route has PI_LAB_JSONL_MAX_LINE_BYTES constant", route.includes("PI_LAB_JSONL_MAX_LINE_BYTES")],
|
||||
["route has PI_LAB_JSONL_MAX_ENTRIES constant", route.includes("PI_LAB_JSONL_MAX_ENTRIES")],
|
||||
|
||||
Reference in New Issue
Block a user