You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(extension): Windows hook dedupe, POSIX node preflight, stale-path prevention
Companion to the core launch-readiness PR. Four fixes for fresh installs:
- Hook dedupe matches axme-hook.cmd: the install/uninstall filter only
looked for "axme-code" in the command string, but the Windows command
is `"%USERPROFILE%\.cursor\axme-hook.cmd" hook <name> --ide cursor` —
no match. Every Cursor restart APPENDED three fresh entries (N
restarts -> N× hook fan-out per tool call) and uninstall/Reset could
never remove them; after uninstall they pointed at a deleted wrapper
and failed forever. Shared isAxmeHookEntry() now matches both shapes.
With the filter fixed, the existing rewrite-on-every-activation also
self-heals stale version-dir paths after extension updates.
- ~/.cursor/hooks.json refuse-don't-clobber: a malformed user file was
silently overwritten ("will overwrite"), destroying the user's own
hooks. Now throws an actionable error that runStep() surfaces as a
visible warning with recovery steps.
- POSIX system-Node preflight: the bundled CLI is a #!/usr/bin/env node
shim and Cursor spawns the MCP server outside the extension host —
macOS/Linux users without Node 20+ got "MCP server does not exist" in
chat with zero explanation. New activation step (soft-fail) surfaces
an actionable error with an Open-nodejs.org button; Windows reports
"bundled". New "node" StepKind in the activation report.
- Setup spawn sets AXME_SETUP_FROM_EXTENSION=1: the CLI's cursor-writers
(core PR) skip project-level .cursor/{mcp,hooks}.json when set — those
files duplicated the extension's API-registered MCP server under the
same name with a PATH-dependent command, double-fired hooks, and
embedded version-numbered extension paths that went stale on every
update (observed live: hooks pointing at 0.1.0 dir with 0.1.4
installed).
- Error texts referenced extension/bin/node-windows-x64.exe; the real
bundled path is extension/bin/node-runtime/node.exe. Fixed in
spawn-binary, mcp-register, hooks-install (incl. doc comment).
tsc clean; extension builds.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments