Skip to content

feat(pi): add compact memory tool chrome#370

Merged
Alan-TheGentleman merged 5 commits into
mainfrom
feat/pi-memory-tool-chrome
May 14, 2026
Merged

feat(pi): add compact memory tool chrome#370
Alan-TheGentleman merged 5 commits into
mainfrom
feat/pi-memory-tool-chrome

Conversation

@Alan-TheGentleman
Copy link
Copy Markdown
Collaborator

🔗 Linked Issue

Closes #369

Related Gentle Pi tracking issue: Gentleman-Programming/gentle-pi#10


🏷️ PR Type

  • type:bug — Bug fix
  • type:feature — New feature
  • type:docs — Documentation only
  • type:refactor — Code refactoring (no behavior change)
  • type:chore — Maintenance, dependencies, tooling
  • type:breaking-change — Breaking change

📝 Summary

  • Adds compact Pi-native chrome for Engram mem_* tools in gentle-engram.
  • Renders collapsed memory calls/results as short 🧠 status lines while keeping expanded details available.
  • Uses status bar feedback for normal memory progress/results instead of notifications.

📂 Changes

File Change
plugin/pi/index.ts Registers compact mem_* Pi tools and routes them through the Engram HTTP server.
plugin/pi/memory-tool-chrome.js Adds compact call/result/status helper functions.
plugin/pi/test/memory-tool-chrome.test.mjs Covers chrome helper behavior.
plugin/pi/package.json Adds test script, helper file to package contents, and runtime deps for TUI/TypeBox imports.
plugin/pi/README.md Documents compact rendering and companion-package boundary.

🧪 Test Plan

  • Unit tests pass locally: go test ./...
  • E2E tests pass locally: go test -tags e2e ./internal/server/...
  • Plugin tests pass locally: npm test --prefix plugin/pi
  • Package contents verified: cd plugin/pi && npm pack --dry-run --json

🤖 Automated Checks

These run automatically and all must pass before merge:

Check What it verifies Status
Check Issue Reference PR body contains Closes #N / Fixes #N / Resolves #N
Check Issue Has status:approved Linked issue has status:approved label
Check PR Has type:* PR has exactly one type:* label
Unit Tests go test ./... passes
E2E Tests go test -tags e2e ./internal/server/... passes

✅ Contributor Checklist

  • I linked an approved issue above (Closes #N)
  • I added exactly one type:* label to this PR
  • I ran unit tests locally: go test ./...
  • I ran e2e tests locally: go test -tags e2e ./internal/server/...
  • Docs updated (if behavior changed)
  • Commits follow conventional commits format
  • No Co-Authored-By trailers in commits

💬 Notes for Reviewers

This intentionally lives in gentle-engram, not gentle-pi core. gentle-pi remains memory-agnostic.

The compact Pi-native tools use the existing Engram HTTP server path. MCP remains available separately through pi-mcp-adapter for flows that use MCP directly.

Copilot AI review requested due to automatic review settings May 14, 2026 08:42
@Alan-TheGentleman Alan-TheGentleman added the type:feature New feature label May 14, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in plugin/pi/index.ts, dispatching to Engram HTTP endpoints and updating the status bar instead of using notifications.
  • Introduces memory-tool-chrome.js helpers (call/result/status rendering, arg compaction, truncation) with deterministic unit tests under plugin/pi/test/.
  • Updates package.json to add a test script, ship the new helper/test files, and add @earendil-works/pi-tui and typebox runtime deps; documents the new chrome and ownership boundary in README.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 thread plugin/pi/index.ts
Comment on lines +142 to +144
const data = (await res.json()) as TResponse;
if (!res.ok) return null;
return data;
Comment thread plugin/pi/package.json
},
"dependencies": {
"@earendil-works/pi-tui": "^0.74.0",
"typebox": "^1.1.38"
…mbined

# Conflicts:
#	plugin/pi/index.ts
#	plugin/pi/package.json
@Alan-TheGentleman Alan-TheGentleman merged commit 91ac21b into main May 14, 2026
5 checks passed
@Alan-TheGentleman Alan-TheGentleman deleted the feat/pi-memory-tool-chrome branch May 14, 2026 08:50
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(pi): add compact Engram memory tool chrome

2 participants