feat: add pure ssh2 remote operations

This commit is contained in:
云服务部-叶林立
2026-08-21 19:51:43 +08:00
parent d3bf562189
commit 0ac50eb581
62 changed files with 3701 additions and 47 deletions
+1
View File
@@ -11,6 +11,7 @@
- Added limits for active groups, generated group size, and total dynamic tools, plus current-host catalog/config/LRU tests.
- 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 authoritative `ssh-remote-files`, `ssh-remote-search`, and `ssh-remote-shell` groups for the maintained `pi-ssh` tools, keeping bounded discovery, structured file operations, and reviewed shell execution separate.
## [0.3.6] - 2026-04-24
+3
View File
@@ -27,6 +27,9 @@ Run `/tool-search-rebuild` to remove model enrichment. Standard bundle tools imm
| Group | Bundle tools |
|---|---|
| `filesystem-navigation` | `ls`, `multi_grep` |
| `ssh-remote-files` | `ssh_read`, `ssh_write`, `ssh_edit` |
| `ssh-remote-search` | `ssh_find`, `ssh_grep` |
| `ssh-remote-shell` | `ssh_bash` |
| `code-intelligence` | CodeGraph and all LSP tools |
| `web-tavily` | Tavily search/fetch |
| `web-exa` | Exa search/advanced/fetch |
@@ -13,6 +13,7 @@
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. `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: 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`.
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,33 @@ export const BUNDLE_GROUP_DEFINITIONS: BundleGroupDefinition[] = [
keywords: ["files", "directory", "list", "multi grep", "目录", "文件", "多模式搜索"],
tools: ["ls", "multi_grep"],
},
{
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 shell",
summary: "Run a reviewed shell command in the currently connected remote SSH workspace.",
useWhen: ["You need builds, tests, Git, or other shell operations on an active SSH target"],
avoidWhen: ["Structured remote file tools are sufficient, or the command should run locally"],
keywords: ["ssh", "remote", "bash", "build", "test", "git", "远程命令", "SSH"],
tools: ["ssh_bash"],
},
{
id: "code-intelligence",
title: "Code intelligence",
@@ -29,6 +29,8 @@ test("bundle seed names are unique and cover the declared my-pi tools", () => {
assert.equal(result.catalog.tools.find((card) => card.name === "tavily_web_fetch")?.primaryGroup, "web-tavily");
assert.equal(result.catalog.tools.find((card) => card.name === "hippo_recall")?.primaryGroup, "memory-recall");
assert.equal(result.catalog.tools.find((card) => card.name === "hippo_remember")?.primaryGroup, "memory-management");
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");
});
test("user overrides take priority and unknown tools retain deterministic fallback groups", () => {