feat(pi): add compact memory tool chrome#370
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds compact Pi-native chrome for Engram mem_* tools to the gentle-engram Pi extension, so that memory tool calls render as short 🧠 lines with status-bar feedback while keeping full details on expansion. The implementation lives in the Engram repo (not Pi core) and routes calls through the existing Engram HTTP server.
Changes:
- Registers compact
mem_*Pi tools with TypeBox schemas inplugin/pi/index.ts, dispatching to Engram HTTP endpoints and updating the status bar instead of using notifications. - Introduces
memory-tool-chrome.jshelpers (call/result/status rendering, arg compaction, truncation) with deterministic unit tests underplugin/pi/test/. - Updates
package.jsonto add atestscript, ship the new helper/test files, and add@earendil-works/pi-tuiandtypeboxruntime deps; documents the new chrome and ownership boundary inREADME.md.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
plugin/pi/index.ts |
Wires compact mem_* Pi tools to the Engram HTTP server with TypeBox schemas, status-bar updates, and shared chrome rendering; tightens engramFetch to return null on non-OK responses. |
plugin/pi/memory-tool-chrome.js |
New helper module providing tool labels, arg compaction, result-status summarization, and call/result rendering used by both Pi and tests. |
plugin/pi/test/memory-tool-chrome.test.mjs |
Node test coverage for the chrome helpers (label coverage, arg compaction/truncation, result-status summaries, expanded vs collapsed rendering). |
plugin/pi/package.json |
Adds test script, packages the new helper and test directory, and declares @earendil-works/pi-tui and typebox as runtime dependencies. |
plugin/pi/README.md |
Documents the new compact rendering, status-bar UX, and that Pi-native tools share the HTTP path while MCP remains a separate stdio path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+142
to
+144
| const data = (await res.json()) as TResponse; | ||
| if (!res.ok) return null; | ||
| return data; |
| }, | ||
| "dependencies": { | ||
| "@earendil-works/pi-tui": "^0.74.0", | ||
| "typebox": "^1.1.38" |
…mbined # Conflicts: # plugin/pi/index.ts # plugin/pi/package.json
…ombined # Conflicts: # plugin/pi/index.ts
2 tasks
rubenqc
pushed a commit
to cloudopstudio/engram
that referenced
this pull request
May 17, 2026
* feat(pi): add compaction recovery redaction * feat(pi): add compact memory tool chrome
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked Issue
Closes #369
Related Gentle Pi tracking issue: Gentleman-Programming/gentle-pi#10
🏷️ PR Type
type:bug— Bug fixtype:feature— New featuretype:docs— Documentation onlytype:refactor— Code refactoring (no behavior change)type:chore— Maintenance, dependencies, toolingtype:breaking-change— Breaking change📝 Summary
mem_*tools ingentle-engram.🧠status lines while keeping expanded details available.📂 Changes
plugin/pi/index.tsmem_*Pi tools and routes them through the Engram HTTP server.plugin/pi/memory-tool-chrome.jsplugin/pi/test/memory-tool-chrome.test.mjsplugin/pi/package.jsonplugin/pi/README.md🧪 Test Plan
go test ./...go test -tags e2e ./internal/server/...npm test --prefix plugin/picd plugin/pi && npm pack --dry-run --json🤖 Automated Checks
These run automatically and all must pass before merge:
Closes #N/Fixes #N/Resolves #Nstatus:approvedlabeltype:*labelgo test ./...passesgo test -tags e2e ./internal/server/...passes✅ Contributor Checklist
Closes #N)type:*label to this PRgo test ./...go test -tags e2e ./internal/server/...Co-Authored-Bytrailers in commits💬 Notes for Reviewers
This intentionally lives in
gentle-engram, notgentle-picore.gentle-piremains memory-agnostic.The compact Pi-native tools use the existing Engram HTTP server path. MCP remains available separately through
pi-mcp-adapterfor flows that use MCP directly.