Fix optionalDependencies version sync — 2.10.4 shipped with engine packages pinned to 2.10.2 (the broken version), so users never got the fixed binaries. Closes#276.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rename all platform packages from @gsd/engine-* to @gsd-build/engine-*
to match the npm org. Remove the darwin-arm64 binary from git and
native/addon from files — production binaries come exclusively from
CI-published platform packages.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add the esbuild/swc pattern for distributing platform-specific native
binaries via npm optional dependencies. Each supported platform gets its
own @gsd/engine-{platform} package containing just the .node binary.
- 5 platform package stubs (darwin-arm64, darwin-x64, linux-x64-gnu,
linux-arm64-gnu, win32-x64-msvc) with os/cpu filters
- Rewritten native loader: tries npm package first, then local build
- Version sync script keeps platform packages in lock-step with root
- GitHub Actions workflow for cross-platform build + publish on tag push
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The native .node binary was excluded from npm pack due to native/.gitignore
ignoring addon/. Add native/.npmignore (overrides .gitignore for npm) and
include native/addon in the files whitelist. Also improve the error message
in the native loader to list supported platforms and link to issues.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gsd/native shipped raw .ts files in node_modules, which Node.js
refuses to import (ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING on
Node 22/24, ERR_UNKNOWN_FILE_EXTENSION on Node 20). Add tsc build
step, point exports at dist/, and add to bundleDependencies.
Closes#248
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: scaffold Rust native engine with grep module (napi-rs)
Adds a Rust N-API addon architecture inspired by Oh My Pi's pi-natives.
The grep module wraps ripgrep's core crates (grep-regex, grep-searcher,
grep-matcher) and exposes `search()` and `grep()` to Node.js via napi-rs.
Includes:
- Cargo workspace at native/ with engine (cdylib) and grep (lib) crates
- Build script (native/scripts/build.js) producing platform-tagged .node files
- TypeScript wrapper package (@gsd/native) with types and loader
- 6 Rust unit tests + 9 Node.js integration tests (all passing)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: audit fixes for rust native engine PR
- Fix repository URL to gsd-build/gsd-2
- Remove dead add_custom_ignore_filename("") call
- Unify error model: search() now returns Result<> (throws) matching grep()
- Remove error field from NapiSearchResult and SearchResult types
- Use t.after() in integration tests for reliable temp dir cleanup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fsevents 2.3.2 lacks prebuilt binaries for Node 25, causing node-gyp
build failures on install. Bumping to 2.3.3 which ships compatible
prebuilds while preserving the optionalDependency hoisting that fixes
Linux installs (#182).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fsevents is a macOS-only native module that comes as a transitive
optional dependency of playwright. On Linux, npm tries to build it
via node-gyp which fails fatally, breaking 'npm install -g gsd-pi'.
Adding fsevents as an explicit optionalDependency at the root level
ensures npm gracefully skips it on non-macOS platforms. This is the
standard pattern used by vite, webpack, and chokidar.
Tasks:
- chore(M002/S06): auto-commit after complete-slice
- chore(M002/S06): auto-commit after complete-slice
- chore(M002/S06/T02): auto-commit after execute-task
- chore(M002/S06/T02): auto-commit after execute-task
- chore(M002/S06/T01): auto-commit after execute-task
- chore(M002/S06/T01): auto-commit after execute-task
- chore(M002/S06): auto-commit after plan-slice
- chore: update state for S06 execution
- docs(S06): add slice plan
Branch: gsd/M002/S06
Workspace packages (@gsd/pi-agent-core, @gsd/pi-ai, @gsd/pi-coding-agent,
@gsd/pi-tui) are included in the published tarball via the "files" field but
are not resolvable by Node because npm does not recreate workspace symlinks
when installing from the registry. This causes "ERR_MODULE_NOT_FOUND: Cannot
find package '@gsd/pi-coding-agent'" on fresh installs.
Add workspace packages to both "dependencies" and "bundleDependencies" so npm
packs them into node_modules/ within the tarball and installs them correctly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Vendor all 4 Pi packages (tui, ai, agent-core, coding-agent) from
pi-mono v0.57.1 as @gsd/* workspace packages under packages/. This
replaces the compiled npm dependency (@mariozechner/pi-coding-agent)
and patch-package workflow, giving direct source access for
modifications.
- Copy Pi source from pi-mono v0.57.1 into packages/
- Create workspace package.json + tsconfig.json for each package
- Rename ~240 imports from @mariozechner/pi-* to @gsd/pi-*
- Apply existing patches as source edits (setModel persist, VT input)
- Remove @mariozechner/pi-coding-agent dep and patch-package
- Update build pipeline to build packages in dependency order
- Add pi-upstream git remote for future selective syncing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Prevent duplicate Brave tool entries when toggling providers repeatedly
by filtering already-active tools before re-adding (BUG-1)
- Remove single quotes from test glob patterns in package.json so Windows
shell expands them correctly (BUG-2)
- Fix test mock fire() to call all handlers instead of short-circuiting
on first match, matching real framework behavior (BUG-3)
- Suppress "Native Anthropic web search active" notification on session
restore (source: "restore") to reduce UX noise (BUG-4)
- Add regression tests for all 4 bugs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: branded postinstall with @clack/prompts
Replace raw ANSI ASCII art dump with structured, branded installer
flow using @clack/prompts and picocolors:
- Branded intro header with product name and version
- Animated spinners during patch and Playwright install steps
- Subprocess output captured (no more raw npm/Playwright noise)
- Boxed summary note with status indicators (✓/⚠)
- Clean outro with next-step instructions
- Graceful fallback to minimal output if clack unavailable
- All output routed to stderr for npm lifecycle visibility
- Async subprocess execution (not execSync) so spinners animate
* fix: restore ASCII banner alongside clack postinstall UI
The branded ASCII art banner is a key differentiator. Keep it as the
first thing users see, then follow with clack spinner steps for the
setup progress. Fallback path also simplified since the banner already
shows the version.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Child processes (Git Bash/MSYS2) strip the ENABLE_VIRTUAL_TERMINAL_INPUT
flag from the shared stdin console handle, corrupting terminal input.
Re-enable the flag after every child process exits in bash.js, bg-shell,
and cache FFI handles in pi-tui for cheap repeated calls.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pkg/package.json had a hardcoded version (0.1.0) that never got updated.
Since gsd-pi sets PI_PACKAGE_DIR=pkg/, pi's config.js reads VERSION from
pkg/package.json. The update check compares this stale version against npm
registry and always shows 'Update Available' even when the user is already
on the latest release.
Fix:
- Update pkg/package.json to current pi-coding-agent version (0.57.1)
- Add sync-pkg-version.cjs script that reads the installed pi-coding-agent
version and writes it into pkg/package.json
- Run the sync script in prepublishOnly so the version stays correct on
every publish