fix(harness): declare remaining pi-mcp-adapter peer deps (pi-ai, pi-tui) - #42
Merged
Conversation
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.
1 task
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
Follow-up to #41 (typebox).
pi-mcp-adapter'speerDependenciesare@earendil-works/pi-ai,@earendil-works/pi-tui,typebox,zod— peers must be provided top-level by the host. #41 fixedtypebox; this adds the two@earendil-workspeers (pluspi-agent-core), whichpi-coding-agentpins exactly and npm nested under it, leaving nothing at top level. So the pi harness still threwCannot find module '@earendil-works/pi-ai'frompi-mcp-adapter/sampling-handler.tsthe moment it loaded the MCP adapter — every pi run failed in ~1s with an empty diff.Declaring
pi-ai,pi-agent-core,pi-tui(matchingpi-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
pi-ai+pi-tuiimport OK and are top-level in the lockfileSEAM_WIZARD_HARNESS=pi npm run eval(not in CI); theFailures:section now shows the exact reason if anything else surfaces.Root cause note
This traces to #38 dropping
pi-ai/pi-agent-core/pi-tuias "transitive" — they'repi-mcp-adapterpeers that must be hoisted. CI never caught it because the eval (the only runtime exercise of pi) doesn't run in CI.Security & Compliance