feat: package Recall on Pi native surfaces#247
Merged
Conversation
edheltzel
force-pushed
the
fm/recall-pi-packaging-shape-p3
branch
from
July 22, 2026 20:58
1078deb to
b9d1b2d
Compare
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.
Summary
pi-mcp-adapterseparately for therecall-memoryMCP server, preserving existing user choices and safely migrating legacy shadow copies.Verified Pi surface
Verified against the installed Pi CLI
0.81.1withpi --help,pi install --help,pi list --help, andpi --no-extensions --help.Pi packages natively discover extensions, skills, prompts, and themes, but not MCP configuration.
The
--mcp-configsurface disappears under--no-extensions, confirming that MCP support in this installation comes from the separate adapter extension.The implementation follows the pinned official package, skill, and extension lifecycle contracts.
Safety and compatibility
recall install --yeswhile composing the native Pi package and the separate MCP adapter/config underneath.directToolspreferences survive refresh.Validation
bun test: 1,256 passed, 0 failed across 104 files.bun run lint: passed.bash -n install.sh update.sh uninstall.sh lib/install-lib.sh: passed.bun run test:e2e:pi-integration: passed with Pi 0.81.1, two installs, nine skills, nine direct MCP tools, lifecycle capture, and legacy-shadow cleanup.bun run test:e2e:codex-plugin: passed after extracting the shared isolation helper.The Pi E2E used disposable
HOME,PI_CODING_AGENT_DIR,RECALL_HOME, andRECALL_DB_PATHpaths.The production database
/Users/ed/.agents/Recall/recall.dbwas never opened by the test and had identical before/after metadata: size178216960, mtime1784748240001.284, inode571168746.Pi limitation
This is intentionally not a Codex-style or Claude-style all-in-one plugin bundle.
Pi has no verified manifest that installs extensions, skills, and MCP as one package, so Recall uses each native mechanism directly and lets the installer coordinate them without inventing a cross-host bundle abstraction.
The MCP adapter discovers direct tools after its initial metadata warmup; the first session can use the adapter proxy and then reload Pi for the nine direct
recall_memory_*tools.Related: #228
Issues
This PR closes nothing, deliberately - no closing keyword is used.
Re-checked against every issue in this repo (125 total, 31 open), reading acceptance criteria rather than matching titles. No open issue tracks Pi packaging, and nothing in this diff fully satisfies an existing issue. References below are keyword-free on purpose so none of them is silently closed on merge.
Base branch is
main(the repo default), so any keyword added here would fire on merge - which is why none is present.Partially addresses, but NOT closed
Partially addresses 10 lifecycle tests fail in any git worktree — the environment AGENTS.md mandates for workers has a permanently red baseline #243 (10 lifecycle tests fail in any git worktree). 10 lifecycle tests fail in any git worktree — the environment AGENTS.md mandates for workers has a permanently red baseline #243's "note 1" flags a defect independent of the worktree trigger:
_recall_jsonc_merge_mcp_entryclaims success on a write that did not happen. This PR closes one instance of that class - when the parent container is missing,jsonc-parser'smodify()cannot materialize the intermediate object, so the helper now builds the container explicitly and hard-fails on a no-op edit rather than printing success (plus a newcreates mcp.json and its parent container on a fresh installtest).10 lifecycle tests fail in any git worktree — the environment AGENTS.md mandates for workers has a permanently red baseline #243 itself is not fixed by this PR. Measured in a
node_modules-less worktree, same machine, before vs after this branch:tests/opencode-integration.test.tstests/pi-integration.test.tsmainThe worktree red baseline goes from 10 to 12 failing tests - not a regression in behavior, but two of this PR's six new
recall_configure_pi_mcptests land in the same environment-dependent family. 10 lifecycle tests fail in any git worktree — the environment AGENTS.md mandates for workers has a permanently red baseline #243 stays open and is arguably slightly louder.Related, but NOT closed
recall-*Agent Skills through the native package manifest instead of symlinks, so the one-namespace surface Migrate all Recall slash commands to Agent Skills — one namespace across Claude/Pi/omp #228 established is preserved on a new mechanism. Migrate all Recall slash commands to Agent Skills — one namespace across Claude/Pi/omp #228 is already closed; this is context, not a claim._recall_ensure_mcp_entry). This PR substantially rewrites the sibling_recall_jsonc_merge_mcp_entry-env/environmentdeep-merge,PRESERVE_KEYS, missing-container construction, no-op rejection - but none of recall doctor/installer: atomic config-write parity in _recall_ensure_mcp_entry (lib/install-lib.sh) #124's asks: still an in-placewriteFileSyncfrombun -e, no temp-sibling + rename, norealpathresolution through symlinks, no backup taken immediately before the confirmed write. recall doctor/installer: atomic config-write parity in _recall_ensure_mcp_entry (lib/install-lib.sh) #124 stays open.Considered and deliberately NOT linked
docs/architecture.mdstill documents skill canonicals at~/.agents/Recall/claude/shared/skills/(actual: top-levelshared/skills/), andFOR_PI.mdstill names only a few of the nine skills rather than enumerating them the wayFOR_CLAUDE.mddoes. Touching the file is not addressing the issue.docs/installation.mdanddocs/upgrading.md, but~/.claude/backups/recall/still appears at three sites in each (installation.md L122/L235/L278, upgrading.md L45/L84/L296). Not fixed.remove_pigainspi removefor the package registration;remove_skills_from'srm -rfandremove_slash_commands- the actual subject of harden: uninstall wipes user-authored files — ownership inferred by name/dir while install is per-file (#230 audit) #236 - are unchanged.$HOMEcollision guard, remove emptied settings file on uninstall). None of the three items is implemented; the JSONC tolerance here is the pre-existingjsonc-parserpath for OpenCode/Pi, not the~/.claude/settings.jsonreads Installer hardening (borrowed from mnemon review): JSON5-tolerant settings parsing, $HOME collision guard, remove emptied settings file on uninstall #231 targets.node_modules) - untouched; see the 10 lifecycle tests fail in any git worktree — the environment AGENTS.md mandates for workers has a permanently red baseline #243 measurement above.Attribution note
#48 was resolved by #245 (the
src/hosts/session-source.tsregistry), and the Codex packaging work also landed there. Neither is re-claimed here.