Migrate @mariozechner/pi-* packages to @earendil-works/pi-* (0.78.0)#3707
Conversation
The @mariozechner/* npm scope is deprecated in favor of @earendil-works/*. Updates all four packages (pi-ai, pi-agent-core, pi-coding-agent, pi-tui) from 0.70.2 to 0.78.0 across package.json files and all import statements.
…ageAttachment from trunk
📊 Performance Test ResultsComparing faeaaad vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
|
I noticed warnings about these packages when installing wp-studio, I'll give this a try |
|
I'm seeing this error [skills] skills directory not found at /private/var/folders/p3/pg75dppn2bx_09trv09g3fhr0000gn/T/AppTranslocation/B2A11343-B366-46A8-B4A1-9CDD0BF57C44/d/Studio.app/Contents/Resources/cli/skills I had fixed a similar issue on trunk, so I wonder if a rebase would fix this |
|
@youknowriad thanks for checking. I merged the trunk into the branch today, so this code should be there. I will take a look. |
|
Nevermind, I think I was not testing the right branch |
youknowriad
left a comment
There was a problem hiding this comment.
Everything seems to be working properly for me.
…e addon segfault (#3740) ## Related issues - Related to intermittent CI failures on trunk ## How AI was used in this PR Claude Code investigated the CI failure logs, identified root causes, and implemented the fixes, after thorough debugging and trying multiple different approaches. ## Proposed Changes This PR fixes two distinct Windows CI issues: **1. Flaky `certificate-manager` test** The `rejects when sudo.exec reports an error` test was intermittently failing on Windows CI. Each test called `setPlatform('linux')` individually, leaving a window where the prior test's `afterEach` (restoring the platform to `win32`) could race with the next test's async mock setup. Fixed by moving `setPlatform('linux')` into a `beforeEach` for the `trustRootCA` describe block so the platform is guaranteed to be set before any async code runs. **2. Node.js segfault on Windows CI** After the `@mariozechner/pi-*` → `@earendil-works/pi-*` 0.78.0 migration (#3707), the new packages bundle native `.node` addons (`clipboard-win32`, `win32-console-mode`). When Vitest runs tests in its default `threads` pool, these native addons are loaded into worker threads and don't clean up properly on thread exit, causing a segfault that kills the entire test process. Fixed by switching the CLI project's Vitest pool from `threads` to `forks` (`apps/cli/vitest.config.ts`). Each test file now runs in an isolated child process, so a native addon crash cannot propagate across files. The pool change also surfaced two pre-existing test issues in `export.test.ts` and `import.test.ts`: with `pool:forks`, each test file runs as a child process which has `process.send` defined. Both commands use `if (process.send)` to choose between an IPC event handler and a logger event handler — the tests expect the logger path but were silently taking the IPC path. Fixed by stubbing `process.send` to `undefined` in `beforeEach` and restoring via `vi.unstubAllGlobals()` in `afterEach`. ## Testing Instructions - `npm test -- apps/cli/lib/tests/certificate-manager.test.ts` — all 10 tests pass - `npm test -- apps/cli/commands/tests/export.test.ts apps/cli/commands/tests/import.test.ts` — all 12 tests pass ## Pre-merge Checklist - [ ] Have you checked for TypeScript, React or other console errors?
Related issues
How AI was used in this PR
Claude Code identified all affected files and performed the migration.
Proposed Changes
The
@mariozechner/*npm scope is deprecated — the upstream author has moved to@earendil-works/*. This replaces all four packages (pi-ai,pi-agent-core,pi-coding-agent,pi-tui) from0.70.2to0.78.0across allpackage.jsonfiles and import statements.The version jump includes several fixes relevant to Studio:
createAgentSession()failing withENOENTwhenpackage.jsonis missing next to the bundle entrypoint (directly affects bundled CLI)ANTHROPIC_AUTH_TOKENfor non-Anthropic providersAgentSessionretry/compaction/event settlementUsing
0.78.0rather than0.78.1(latest) because0.78.1was published June 4 and falls within the dependency cooldown window.Testing Instructions
npm run typecheckPre-merge Checklist