Skip to content

fix(harness): declare remaining pi-mcp-adapter peer deps (pi-ai, pi-tui) - #42

Merged
itelo merged 2 commits into
mainfrom
itelo/pi-peer-deps
Aug 21, 2026
Merged

fix(harness): declare remaining pi-mcp-adapter peer deps (pi-ai, pi-tui)#42
itelo merged 2 commits into
mainfrom
itelo/pi-peer-deps

Conversation

@itelo

@itelo itelo commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #41 (typebox). pi-mcp-adapter's peerDependencies are @earendil-works/pi-ai, @earendil-works/pi-tui, typebox, zod — peers must be provided top-level by the host. #41 fixed typebox; this adds the two @earendil-works peers (plus pi-agent-core), which pi-coding-agent pins exactly and npm nested under it, leaving nothing at top level. So the pi harness still threw Cannot find module '@earendil-works/pi-ai' from pi-mcp-adapter/sampling-handler.ts the moment it loaded the MCP adapter — every pi run failed in ~1s with an empty diff.

Declaring pi-ai, pi-agent-core, pi-tui (matching pi-coding-agent's 0.79.x) as direct deps hoists them top-level — mirroring how the PostHog wizard declares its pi packages. With #41 + this, the pi harness resolves its whole peer set.

Testing

  • typecheck / eslint / prettier / test (145) pass
  • pi-ai + pi-tui import OK and are top-level in the lockfile
  • Full runtime pi validation is via SEAM_WIZARD_HARNESS=pi npm run eval (not in CI); the Failures: section now shows the exact reason if anything else surfaces.

Root cause note

This traces to #38 dropping pi-ai/pi-agent-core/pi-tui as "transitive" — they're pi-mcp-adapter peers that must be hoisted. CI never caught it because the eval (the only runtime exercise of pi) doesn't run in CI.

Security & Compliance

  • No security impact

Follow-up to the typebox fix. pi-mcp-adapter's peerDependencies also include
@earendil-works/pi-ai and @earendil-works/pi-tui, which it resolves from its own
dir. pi-coding-agent pins them exactly and npm nested them under it, so they were
not at top level and the pi harness threw `Cannot find module '@earendil-works/
pi-ai'` the moment it loaded the MCP adapter. Declare pi-ai, pi-agent-core, and
pi-tui (matching pi-coding-agent's 0.79.x) as direct deps so they hoist to
top-level — mirroring how the PostHog wizard declares them. With this + typebox,
the pi harness resolves its whole peer set.
@itelo
itelo requested a review from razor-x as a code owner August 21, 2026 14:55
@itelo
itelo merged commit 4f2921b into main Aug 21, 2026
11 checks passed
@itelo
itelo deleted the itelo/pi-peer-deps branch August 21, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants