feat: add pi lab ai management integration

This commit is contained in:
Agent Board
2026-07-04 21:47:42 +08:00
parent 36d027a4a1
commit c8472bb898
62 changed files with 15077 additions and 443 deletions
+12
View File
@@ -5,6 +5,7 @@ const { test } = require("node:test");
const {
buildDefaultOpencodeCommand,
buildDefaultOpenHubCommand,
collectStaleMnoteWebCargoPids,
resolveBackendExecutable,
ensurePortFree,
isHttpHealthy,
@@ -13,6 +14,7 @@ const {
resolveRuntimePlan,
shouldStartBackend,
shouldStartOpenHub,
stopStaleMnoteWebCargoProcesses,
} = require("./desktop-hot.js");
function findFreePort() {
@@ -120,6 +122,16 @@ test("ensurePortFree 在非 Windows 平台能释放后端监听进程", async (t
await waitForExit(child);
});
test("陈旧 mnote-web cargo 清理不会匹配当前测试进程", async () => {
if (process.platform === "win32") {
return;
}
const pids = collectStaleMnoteWebCargoPids();
assert.ok(Array.isArray(pids));
assert.equal(pids.includes(process.pid), false);
await stopStaleMnoteWebCargoProcesses();
});
test("默认热启动计划只使用 mnote-web 作为 3000 owner", () => {
const plan = resolveRuntimePlan({
FRONTEND_PORT: "3000",