Merge branch 'main' of bitbucket.org:siakitem/my-pi

# Conflicts:
#	AGENTS.md
#	README.md
#	package-lock.json
#	package.json
#	pi-tool-search/CHANGELOG.md
#	pi-tool-search/README.md
#	pi-tool-search/docs/dynamic-tool-loading.md
#	pi-tool-search/extensions/bundle-groups.ts
#	pi-tool-search/test/bundle-groups.test.ts
This commit is contained in:
叶林立
2026-08-26 10:59:34 +08:00
102 changed files with 8994 additions and 54 deletions
+3
View File
@@ -12,6 +12,9 @@
- Added checked-in authoritative groups for every tool exposed by the standard my-pi bundle, eliminating first-use model generation and user caching unless unrecognized third-party tools are present.
- 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 the enabled bundle's `Agent`, `get_subagent_result`, and `steer_subagent` tools to a checked-in `subagents` orchestration group.
- 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; the connection workflow now requires sequential `ssh_connect` to succeed before dependent tools.
- Added sequential `ssh_cd` to the authoritative remote-shell workflow and direct the model to wait for a successful workspace change before dependent remote calls, avoiding both the unknown-tools fallback and cwd races.
- Added the authoritative `user-interaction` group for the maintained `ask_user_question` TUI tool.
## [0.3.6] - 2026-04-24
+5
View File
@@ -27,6 +27,10 @@ Run `/tool-search-rebuild` to remove model enrichment. Standard bundle tools imm
| Group | Bundle tools |
|---|---|
| `filesystem-navigation` | `ls`, `multi_grep` |
| `ssh-connection` | `ssh_connect` |
| `ssh-remote-files` | `ssh_read`, `ssh_write`, `ssh_edit` |
| `ssh-remote-search` | `ssh_find`, `ssh_grep` |
| `ssh-remote-shell` | `ssh_cd`, `ssh_bash` |
| `code-intelligence` | CodeGraph and all LSP tools |
| `web-tavily` | Tavily search/fetch |
| `web-exa` | Exa search/advanced/fetch |
@@ -38,6 +42,7 @@ 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 |
| `subagents` | Launch agents, collect background results, and steer running agents |
| `user-interaction` | `ask_user_question` model-initiated TUI questions |
| `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.
@@ -13,6 +13,8 @@
9. `turn_start` notices tool or grouping-configuration changes by hash, resets stale dynamic groups, and reconstructs the checked-in/hybrid catalog.
The standard bundle assigns the official Hippo Pi extension's five `hippo_*` tools to recall and management groups, and assigns `Agent`, `get_subagent_result`, and `steer_subagent` to the `subagents` orchestration group. `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: sequential 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 sequential reviewed workspace changes plus reviewed command execution live in `ssh-remote-shell`. The workflows tell the model to call `ssh_connect` or `ssh_cd` separately and wait for success before issuing remote calls that depend on the new connection or cwd.
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.
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.
@@ -31,6 +31,42 @@ export const BUNDLE_GROUP_DEFINITIONS: BundleGroupDefinition[] = [
keywords: ["files", "directory", "list", "multi grep", "目录", "文件", "多模式搜索"],
tools: ["ls", "multi_grep"],
},
{
id: "ssh-connection",
title: "SSH connection",
summary: "Connect sequentially to an explicitly imported SSH host through the reviewed agent tool flow.",
useWhen: ["The user names a remote server as part of a concrete task and no matching SSH2 connection is active; call ssh_connect separately and wait for success before dependent remote tools"],
avoidWhen: ["The task is local, the server was not explicitly named, or the host has not been imported"],
keywords: ["ssh", "connect", "server", "host", "remote", "连接服务器", "远程主机", "SSH"],
tools: ["ssh_connect"],
},
{
id: "ssh-remote-files",
title: "SSH remote files",
summary: "Read, write, and edit files in the currently connected remote SSH workspace.",
useWhen: ["You need explicit file operations on an active SSH target rather than the local workspace"],
avoidWhen: ["A remote shell command is required, or the files are local"],
keywords: ["ssh", "remote", "read", "write", "edit", "远程", "文件", "SSH"],
tools: ["ssh_read", "ssh_write", "ssh_edit"],
},
{
id: "ssh-remote-search",
title: "SSH remote search",
summary: "Run bounded adaptive filename and content searches on the active SSH target.",
useWhen: ["You need to locate remote files or literals before reading or operating on them"],
avoidWhen: ["The search belongs to the local workspace, or a known remote path can be read directly"],
keywords: ["ssh", "remote", "find", "grep", "search", "远程搜索", "文件查找", "SSH"],
tools: ["ssh_find", "ssh_grep"],
},
{
id: "ssh-remote-shell",
title: "SSH remote workspace shell",
summary: "Change the active remote cwd as a separate reviewed step, or run a reviewed shell command in that workspace.",
useWhen: ["You need to change the active remote workspace or run builds, tests, Git, or other shell operations there; call ssh_cd separately and wait for success before dependent remote calls"],
avoidWhen: ["Structured remote file tools are sufficient, or the operation should run locally"],
keywords: ["ssh", "remote", "bash", "cd", "cwd", "workspace", "build", "test", "git", "远程命令", "工作目录", "SSH"],
tools: ["ssh_cd", "ssh_bash"],
},
{
id: "code-intelligence",
title: "Code intelligence",
@@ -130,6 +166,15 @@ export const BUNDLE_GROUP_DEFINITIONS: BundleGroupDefinition[] = [
keywords: ["subagent", "agent", "delegate", "background", "steer", "子代理", "委派", "后台"],
tools: ["Agent", "get_subagent_result", "steer_subagent"],
},
{
id: "user-interaction",
title: "Interactive user questions",
summary: "Pause the agent and collect one or more structured decisions from the user in the TUI.",
useWhen: ["A missing requirement, preference, confirmation, or choice must come directly from the user before continuing"],
avoidWhen: ["The user's direct messages already provide the answer, or the task can proceed without another decision"],
keywords: ["ask", "question", "clarify", "choice", "preference", "提问", "澄清", "选择", "确认"],
tools: ["ask_user_question"],
},
{
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 === "Agent")?.primaryGroup, "subagents");
assert.equal(result.catalog.tools.find((card) => card.name === "get_subagent_result")?.primaryGroup, "subagents");
assert.equal(result.catalog.tools.find((card) => card.name === "steer_subagent")?.primaryGroup, "subagents");
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");
});
test("user overrides take priority and unknown tools retain deterministic fallback groups", () => {