feat: add interactive ask-user extension

This commit is contained in:
云服务部-叶林立
2026-08-24 20:23:54 +08:00
parent e941e71ed8
commit 939139b5f3
21 changed files with 937 additions and 2 deletions
+1
View File
@@ -12,6 +12,7 @@
- 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-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.
## [0.3.6] - 2026-04-24
+1
View File
@@ -41,6 +41,7 @@ Run `/tool-search-rebuild` to remove model enrichment. Standard bundle tools imm
| `context-administration` | Context upgrade and destructive purge |
| `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 |
| `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.
@@ -14,6 +14,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.
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.
@@ -157,6 +157,15 @@ export const BUNDLE_GROUP_DEFINITIONS: BundleGroupDefinition[] = [
keywords: ["remember", "outcome", "lesson", "error", "记住", "反馈", "项目经验"],
tools: ["hippo_remember", "hippo_outcome"],
},
{
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",
@@ -31,6 +31,7 @@ test("bundle seed names are unique and cover the declared my-pi tools", () => {
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");
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", () => {