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:
@@ -3,7 +3,6 @@ const { spawn } = require("node:child_process");
|
||||
const net = require("node:net");
|
||||
const { test } = require("node:test");
|
||||
const {
|
||||
buildDefaultOpencodeCommand,
|
||||
collectStaleMnoteWebCargoPids,
|
||||
resolveBackendExecutable,
|
||||
ensurePortFree,
|
||||
@@ -11,7 +10,6 @@ const {
|
||||
isPortFree,
|
||||
resolveRuntimePlan,
|
||||
shouldStartBackend,
|
||||
shouldStartOpencode,
|
||||
stopStaleMnoteWebCargoProcesses,
|
||||
} = require("./desktop-hot.js");
|
||||
|
||||
@@ -142,10 +140,10 @@ test("默认热启动计划只使用 mnote-web 作为 3000 owner", () => {
|
||||
MNOTE_WEB_BIND: "0.0.0.0:3000",
|
||||
MNOTE_WEB_PUBLIC_BIND: "127.0.0.1:3000",
|
||||
MNOTE_KNOWLEDGE_PROVIDER: "lightrag_legacy",
|
||||
MNOTE_OPENCODE_BASE_URL: "http://127.0.0.1:4096",
|
||||
MNOTE_CONTROL_PLANE_BACKEND: "libsql-local",
|
||||
MNOTE_TURSO_LOCAL_PATH: "/mnt/Data1T/Mnote_data/control-plane/control-plane-libsql.db",
|
||||
});
|
||||
assert.equal(plan.mnoteWebEnv.MNOTE_OPENCODE_BASE_URL, undefined);
|
||||
});
|
||||
|
||||
test("热启动计划支持 libSQL local 控制面后端", () => {
|
||||
@@ -189,24 +187,6 @@ test("默认跳过 FastAPI 后端,只有显式开启时才启动", () => {
|
||||
assert.equal(shouldStartBackend({ ENABLE_BACKEND: "1", SKIP_BACKEND: "1" }), false);
|
||||
});
|
||||
|
||||
test("默认跳过 opencode,只有显式开启时才启动", () => {
|
||||
assert.equal(shouldStartOpencode({}), false);
|
||||
assert.equal(shouldStartOpencode({ ENABLE_OPENCODE: "1" }), true);
|
||||
assert.equal(shouldStartOpencode({ ENABLE_OPENCODE: "true" }), true);
|
||||
assert.equal(shouldStartOpencode({ OPENCODE_CMD: "custom-opencode" }), true);
|
||||
assert.equal(shouldStartOpencode({ ENABLE_OPENCODE: "1", SKIP_OPENCODE: "1" }), false);
|
||||
});
|
||||
|
||||
test("opencode 默认命令使用 MNote 专用运行目录", () => {
|
||||
const command = buildDefaultOpencodeCommand(18085);
|
||||
assert.match(command, /\/mnt\/Data1T\/Mnote_data\/opencode\/runtime/);
|
||||
assert.match(command, /\/mnt\/Data1T\/Mnote_data\/opencode\/home/);
|
||||
assert.match(command, /HOME=/);
|
||||
assert.match(command, /XDG_CONFIG_HOME=/);
|
||||
assert.doesNotMatch(command, /已检测到现有 opencode/);
|
||||
assert.match(command, /opencode serve --hostname=127\.0\.0\.1 --port 18085 --print-logs/);
|
||||
});
|
||||
|
||||
test("isHttpHealthy 只把 2xx HTTP health 视为可复用服务", async () => {
|
||||
const server = net.createServer((socket) => {
|
||||
socket.once("data", () => {
|
||||
|
||||
Reference in New Issue
Block a user