feat: integrate pi-chrome with tool search

This commit is contained in:
云服务部-叶林立
2026-08-26 10:46:47 +08:00
parent 939139b5f3
commit b658e52367
10 changed files with 77 additions and 4 deletions
+1
View File
@@ -13,6 +13,7 @@
- Replaced the Hermes and third-party Hippo assignments with the five tools exposed by the official Hippo Pi extension, grouped into recall and management workflows.
- Added authoritative `ssh-connection`, `ssh-remote-files`, `ssh-remote-search`, and `ssh-remote-shell` groups for the maintained `pi-ssh` tools, keeping reviewed connection, bounded discovery, structured file operations, and reviewed shell execution separate.
- Added the authoritative `user-interaction` group for the maintained `ask_user_question` TUI tool.
- Added authoritative `chrome-navigation`, `chrome-interaction`, and `chrome-debugging` groups for all 21 tools registered by the pinned `pi-chrome` bridge after explicit session authorization.
## [0.3.6] - 2026-04-24
+3
View File
@@ -42,6 +42,9 @@ Run `/tool-search-rebuild` to remove model enrichment. Standard bundle tools imm
| `memory-recall` | Official Hippo recall/context/status and condensed-output recovery |
| `memory-management` | Official Hippo remember/outcome tools |
| `user-interaction` | `ask_user_question` model-initiated TUI questions |
| `chrome-navigation` | Chrome bridge setup, tabs, navigation, snapshots/find/inspect, waits, and screenshots |
| `chrome-interaction` | Chrome click/type/fill/key/hover/drag/tap/scroll input |
| `chrome-debugging` | Chrome page evaluation, console/network diagnostics, response retrieval, and file upload |
| `mcp-management` | Shared MCP adapter management |
Pinned tools are removed from these dynamic groups at runtime. For example, the default-pinned `codegraph_explore` and `lsp_diagnostics` do not consume the `code-intelligence` group budget.
@@ -15,6 +15,7 @@
The standard bundle assigns the official Hippo Pi extension's five `hippo_*` tools to recall and management groups. `context_tree_query` remains in `memory-recall` because it recovers condensed tool output; retired Hermes names and third-party `tff-memory_*` names are not seeded.
The maintained `pi-ssh` tools are also split by workflow: reviewed agent-controlled connection lives in `ssh-connection`, structured `ssh_read`/`ssh_write`/`ssh_edit` file operations live in `ssh-remote-files`, bounded `ssh_find`/`ssh_grep` discovery lives in `ssh-remote-search`, and the reviewed `ssh_bash` command surface stays isolated in `ssh-remote-shell`.
The maintained `ask_user_question` tool has its own `user-interaction` group so the model can load the complete interactive schema only when a missing decision or preference must come from the user.
The pinned `pi-chrome` bridge registers its 21 `chrome_*` tools only after explicit per-session authorization. Once registered, catalog refresh assigns them to `chrome-navigation`, `chrome-interaction`, and `chrome-debugging`; revocation still remains enforced inside every upstream tool execution even if a schema is later reactivated by Tool Search.
A purely additive first load receives Pi's native dynamic-tool result propagation. A replacement that evicts one group while adding another is intentionally non-additive; current Pi detects the removal and uses its safe next-request fallback instead of attaching an invalid additive-only hint.
@@ -166,6 +166,33 @@ export const BUNDLE_GROUP_DEFINITIONS: BundleGroupDefinition[] = [
keywords: ["ask", "question", "clarify", "choice", "preference", "提问", "澄清", "选择", "确认"],
tools: ["ask_user_question"],
},
{
id: "chrome-navigation",
title: "Chrome navigation and inspection",
summary: "Connect to the authorized Chrome bridge, manage tabs, navigate, inspect page structure, wait for state, and capture screenshots.",
useWhen: ["You need to inspect or navigate the user's existing signed-in Chrome profile after explicit /chrome authorization"],
avoidWhen: ["A normal web search or HTTP page fetch is sufficient, or Chrome has not been explicitly authorized"],
keywords: ["chrome", "browser", "tab", "navigate", "snapshot", "inspect", "screenshot", "浏览器", "标签页", "网页操作"],
tools: ["chrome_launch", "chrome_tab", "chrome_navigate", "chrome_snapshot", "chrome_find", "chrome_inspect", "chrome_wait_for", "chrome_screenshot"],
},
{
id: "chrome-interaction",
title: "Chrome page interaction",
summary: "Interact with an authorized Chrome page using real pointer, keyboard, touch, form, drag, and scroll input.",
useWhen: ["You must click, type, fill, press keys, hover, drag, tap, or scroll in the user's authorized Chrome session"],
avoidWhen: ["Page observation is enough, or the action is irreversible and the user has not approved it"],
keywords: ["chrome", "browser", "click", "type", "fill", "drag", "scroll", "点击", "输入", "滚动", "浏览器交互"],
tools: ["chrome_click", "chrome_type", "chrome_fill", "chrome_key", "chrome_hover", "chrome_drag", "chrome_tap", "chrome_scroll"],
},
{
id: "chrome-debugging",
title: "Chrome diagnostics and upload",
summary: "Evaluate page JavaScript, inspect captured console/network activity, retrieve response bodies, or attach local files.",
useWhen: ["Debugging the authorized Chrome page, examining fetch/XHR behavior, evaluating page state, or uploading an explicitly named local file"],
avoidWhen: ["Navigation, DOM inspection, or ordinary page interaction tools are sufficient"],
keywords: ["chrome", "browser", "console", "network", "javascript", "upload", "调试", "网络请求", "文件上传"],
tools: ["chrome_evaluate", "chrome_list_console_messages", "chrome_list_network_requests", "chrome_get_network_request", "chrome_upload_file"],
},
{
id: "mcp-management",
title: "MCP management",
@@ -32,6 +32,9 @@ test("bundle seed names are unique and cover the declared my-pi tools", () => {
assert.equal(result.catalog.tools.find((card) => card.name === "ssh_find")?.primaryGroup, "ssh-remote-search");
assert.equal(result.catalog.tools.find((card) => card.name === "ssh_grep")?.primaryGroup, "ssh-remote-search");
assert.equal(result.catalog.tools.find((card) => card.name === "ask_user_question")?.primaryGroup, "user-interaction");
assert.equal(result.catalog.tools.find((card) => card.name === "chrome_snapshot")?.primaryGroup, "chrome-navigation");
assert.equal(result.catalog.tools.find((card) => card.name === "chrome_click")?.primaryGroup, "chrome-interaction");
assert.equal(result.catalog.tools.find((card) => card.name === "chrome_list_network_requests")?.primaryGroup, "chrome-debugging");
});
test("user overrides take priority and unknown tools retain deterministic fallback groups", () => {