feat: stabilize page AI ACP runtimes

实现并稳定页面 AI 的 ACP Hermes / ACP Reasonix 运行路径。

主要内容:

- 分离 profile 与 acpRuntime,ACP Hermes 按所选 Hermes profile 启动并注入 provider key。

- 修复 Reasonix ACP wrapper 的 API key 读取、ToolRegistry 注册、LoopEvent role 映射和 reasoning/final 分流。

- 修复 ACP agent_thought_chunk 被 untagged enum 误解析为 message.delta 的问题,补充 thought 相关单测。

- 补充页面 AI 浏览器验证 skill 证据到 7-15 设计稿,并记录严格验收标准。

- 同步提交当前仓库中已存在的 rust-web / Hermes tools / SSE / bug 文档相关改动。

验证:

- node --check scripts/reasonix-acp-wrapper.mjs

- cargo test -p mnote-web acp -- --nocapture

- 页面 AI ACP 浏览器验证:tmp/page-ai-acp-browser-UAYwyM/
This commit is contained in:
lix-2026
2026-05-17 20:11:39 +08:00
parent 2ea559beaa
commit bb2f190f50
19 changed files with 1307 additions and 451 deletions
@@ -1088,15 +1088,15 @@ mod tests {
idempotency_key: None,
source: json!({}),
payload_json: "{}".into(),
args_json: json!({
"id": "doc_1",
"streamDeltaHint": {"family": "tree", "kind": "remove_document"},
"domainEventHint": {"eventType": "tree.node.archived"},
"domainEventPlan": {"eventType": "tree.node.archived"},
"domainEventPlans": [{"eventType": "tree.node.archived"}],
"commandProtocol": {"family": "tree"},
}),
};
args_json: json!({
"id": "doc_1",
"streamDeltaHint": {"family": "tree", "kind": "remove_document"},
"domainEventHint": {"eventType": "tree.node.archived"},
"domainEventPlan": {"eventType": "tree.node.archived"},
"domainEventPlans": [{"eventType": "tree.node.archived"}],
"commandProtocol": {"family": "tree"},
}),
};
let args = convex_command_args_for_plan(&plan);