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:
Agent Board
2026-07-25 14:25:37 +08:00
parent bc6f8488ee
commit 262e66b02e
137 changed files with 9018 additions and 46049 deletions
+11 -50
View File
@@ -29,43 +29,6 @@ async function readTextResponse(path, init) {
return { response, text };
}
function runtimeInputToolPlan() {
return {
kind: "tool",
context: {
deploymentId: null,
projectId: null,
workspaceId: "ws_task116",
requestId: "req_task116",
traceId: "trace_task116",
actor: {
actorType: "user",
actorId: "task116-user",
sessionId: null,
},
source: {
channel: "rust-web",
client: "task116-smoke",
},
tenantId: null,
authToken: null,
idempotencyKey: null,
validateOnly: false,
dryRun: false,
},
tool: {
tool: "mnote.knowledge_rag.query",
kind: "query",
mode: "plan",
argsJson: { query: "Rust Web islands" },
target: null,
reason: "task116 owner smoke",
refs: ["task-025"],
},
data: null,
};
}
async function checkSearchShell() {
const { response, text } = await readTextResponse("/search?workspaceId=ws_task116&q=Rust");
assert(response.headers.get("x-mnote-web-owner") === "mnote-web", "Search shell 缺少 mnote-web owner header");
@@ -75,18 +38,16 @@ async function checkSearchShell() {
return { owner: "mnote-web", shell: "search", island: "search_interaction_island" };
}
async function checkAiBridge() {
const { response, text } = await readTextResponse("/api/hermes/bridge", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify(runtimeInputToolPlan()),
});
assert(response.headers.get("x-mnote-web-owner") === "mnote-web", "AI bridge 缺少 mnote-web owner header");
assert(response.headers.get("x-mnote-ai-bridge-owner") === "rust-web-hermes", "AI bridge 缺少 rust-web-hermes owner header");
async function checkAgentTools() {
const { response, text } = await readTextResponse("/api/mnote/tools/manifest");
const payload = JSON.parse(text);
assert(payload?.contract?.schema === "mnote.ai_bridge.v1", "AI bridge 缺少 contract schema");
assert(payload?.contract?.toolEventOwner === "rust-web-hermes", "AI bridge tool event owner 未固定到 Hermes");
return { owner: "mnote-web", bridgeOwner: "rust-web-hermes", schema: payload.contract.schema };
const schema = payload?.manifest?.schemaVersion || payload?.schema || payload?.contract?.schema || "";
assert(
schema === "mnote.agent_tool_manifest.v1" || String(text).includes("mnote.agent_tool_manifest.v1"),
`tools manifest schema 不正确: ${schema || text.slice(0, 200)}`,
);
const owner = response.headers.get("x-mnote-agent-tool-owner") || payload?.owner || "";
return { owner: owner || "mnote-web-agent-tools", schema: "mnote.agent_tool_manifest.v1" };
}
async function checkMindmapShell() {
@@ -100,7 +61,7 @@ async function checkMindmapShell() {
async function main() {
const search = await checkSearchShell();
const aiBridge = await checkAiBridge();
const agentTools = await checkAgentTools();
const mindmap = await checkMindmapShell();
console.log(
JSON.stringify(
@@ -109,7 +70,7 @@ async function main() {
baseUrl: BASE_URL,
results: {
search,
aiBridge,
agentTools,
mindmap,
},
},