feat: vendor official hippo memory extension

This commit is contained in:
云服务部-叶林立
2026-08-19 21:07:23 +08:00
parent 9b2ec36a2d
commit 3cdcc3510b
21 changed files with 975 additions and 106 deletions
+1
View File
@@ -10,6 +10,7 @@
- Added deterministic no-model fallback grouping, private manifest-hash caching, exact group overrides, lazy `/tool-search-rebuild`, and nested model usage accounting.
- 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.
## [0.3.6] - 2026-04-24
+2 -3
View File
@@ -35,9 +35,8 @@ Run `/tool-search-rebuild` to remove model enrichment. Standard bundle tools imm
| `context-knowledge` | Context indexing, searching, and web-doc ingestion |
| `context-observability` | Context stats, doctor, and Insight |
| `context-administration` | Context upgrade and destructive purge |
| `memory-recall` | Memory/session search and condensed-output recovery |
| `memory-management` | Durable memory add/replace/remove |
| `skill-management` | Pi-native skill management |
| `memory-recall` | Official Hippo recall/context/status and condensed-output recovery |
| `memory-management` | Official Hippo remember/outcome tools |
| `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.
@@ -12,6 +12,8 @@
8. Group load and member execution update an in-session LRU counter. Loading past `maxActiveGroups` or `maxDynamicTools` removes the least-recently-used dynamic groups.
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.
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.
A model cannot call a schema it had not received in an already-generated assistant response. `tool_search` therefore returns normally, and the next model request sees the activated group's complete schemas. No provider payload rewriting, proxy dispatch, hidden steer message, old package alias, or duplicate Pi runtime is used.
+11 -20
View File
@@ -105,30 +105,21 @@ export const BUNDLE_GROUP_DEFINITIONS: BundleGroupDefinition[] = [
},
{
id: "memory-recall",
title: "Memory and session recall",
summary: "Search durable memories, prior sessions, or recover pruned tool-call output.",
useWhen: ["Past decisions, preferences, failures, conversations, or condensed outputs may answer the question"],
title: "Official Hippo memory recall",
summary: "Recall project memories, inspect Hippo status/context, or recover pruned tool-call output.",
useWhen: ["Past project lessons, errors, decisions, or condensed outputs may answer the question"],
avoidWhen: ["The required evidence is already in the current visible context"],
keywords: ["memory", "session", "history", "recover", "记忆", "历史会话", "恢复输出"],
tools: ["memory_search", "session_search", "context_tree_query"],
keywords: ["memory", "recall", "context", "status", "recover", "记忆", "召回", "恢复输出"],
tools: ["hippo_recall", "hippo_context", "hippo_status", "context_tree_query"],
},
{
id: "memory-management",
title: "Memory management",
summary: "Add, replace, or remove durable user, project, global, or failure memories.",
useWhen: ["A stable preference, correction, environment fact, convention, or durable lesson should change"],
avoidWhen: ["The information is temporary task progress"],
keywords: ["remember", "add memory", "replace memory", "forget", "记住", "更新记忆", "删除记忆"],
tools: ["memory_add", "memory_replace", "memory_remove"],
},
{
id: "skill-management",
title: "Procedural skill management",
summary: "Create, inspect, patch, update, or remove reusable Pi-native procedural skills.",
useWhen: ["A reusable workflow or non-obvious procedure should persist across sessions"],
avoidWhen: ["Saving one-off task state or a generic summary"],
keywords: ["skill", "procedure", "workflow", "技能", "流程", "工作流"],
tools: ["skill_manage"],
title: "Official Hippo memory management",
summary: "Store durable project lessons or report whether recalled Hippo memories were useful.",
useWhen: ["A non-obvious project lesson, error, or decision should persist, or recalled memories need feedback"],
avoidWhen: ["The information is temporary task progress or derivable from the repository"],
keywords: ["remember", "outcome", "lesson", "error", "记住", "反馈", "项目经验"],
tools: ["hippo_remember", "hippo_outcome"],
},
{
id: "mcp-management",
@@ -27,6 +27,8 @@ test("bundle seed names are unique and cover the declared my-pi tools", () => {
assert.equal(result.catalog.tools.length, names.length);
assert.equal(result.catalog.tools.find((card) => card.name === "ctx_purge")?.primaryGroup, "context-administration");
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");
});
test("user overrides take priority and unknown tools retain deterministic fallback groups", () => {