/** * Cursor-specific MCP registration step for `sklx agent install` * (SMI-6279 Wave 9). * * Split out of `agent-pack-installer.harness.ts`'s generic `installMcpConfig` * — mirrors the existing `agent-pack-installer.cursor-hooks.ts` split * (SMI-5893 Wave 8a) for the same reason: Cursor's on-disk shape/resolution * needs diverge structurally from the other 6 MCP-capable harnesses, so * folding cursor-only logic into the shared function would either bloat it * past the 500-line gate or force every other harness through cursor-only * branches it doesn't need. * * Two independent, confirmed-broken things this fixes (GH#2368 V3 repro — * see the SMI-6266 Wave 9 plan doc): * 1. `buildAgentMcpEntryValue()` wrote the `npx`/`args` form into Cursor's * `mcp.json` — the exact shape two live UAT passes proved ENOENTs * inside Cursor's bundled Node (GH#2368 C-01) — and never set * `SKILLSMITH_CLIENT`, so re-running `agent install` (the very * remediation `formatUpdateNotification()` tells a user to run) * silently rewrote the SAME broken entry, even after the website docs * snippet was corrected (SMI-5893 Wave 11). {@link installCursorMcpConfig} * now writes `buildCursorMcpEntryValue()` instead — resolved binary * path (or the documented paste-here placeholder) plus * `SKILLSMITH_CLIENT=cursor`. * 2. The installer wrote its entry under the JSON key `skillsmith`, while * the website/CLI-template docs snippet (which users are told to * hand-paste) uses the package-scoped key `@skillsmith/mcp-server` — a * user who did both ended up with TWO different server entries * coexisting in the same file, neither ever recognized as "the * other's" by the installer's own conflict-detection (which matches * purely on key). {@link installCursorMcpConfig} now writes under * `CURSOR_MCP_ENTRY_KEY` (`'@skillsmith/mcp-server'`) so a docs-paste * and an `agent install` reconcile as ONE entry, and * {@link stripStaleLegacyMcpKey} removes a pre-fix install's stale * `'skillsmith'`-keyed entry (mirroring the cursor-hooks legacy-key * cleanup precedent) so a re-install doesn't leave both keys present. * * Scoped to Cursor ONLY — `mergeJsonMcpEntry`'s default `entryKey` * (`'skillsmith'`) and `buildAgentMcpEntryValue()`'s `npx` form are * UNCHANGED for claude-code/copilot/windsurf/opencode/codex/hermes; nothing * in this module is reachable from any other harness's install path. * * @module @skillsmith/core/install/agent-pack-installer.cursor-mcp */ import type { HarnessInstallCtx } from './agent-pack-installer.harness.js'; import type { HarnessInstallReport } from './agent-pack-installer.types.js'; /** * Merge Cursor's `skillsmith` MCP server registration into `~/.cursor/mcp.json` * under {@link CURSOR_MCP_ENTRY_KEY}, then clean up a stale legacy-keyed * entry from a pre-SMI-6279 install (see module header). */ export declare function installCursorMcpConfig(ctx: HarnessInstallCtx, report: HarnessInstallReport): void; //# sourceMappingURL=agent-pack-installer.cursor-mcp.d.ts.map