/** * Cursor-specific hook install + wiring step, split out of * `agent-pack-installer.harness.ts` (SMI-5893 Wave 8a — 500-line file gate). * * @module @skillsmith/core/install/agent-pack-installer.cursor-hooks */ import type { AgentPackArtifact } from '../services/agent-pack/index.js'; import type { HarnessInstallCtx } from './agent-pack-installer.harness.js'; import type { HarnessInstallReport } from './agent-pack-installer.types.js'; /** * Install + wire SessionStart/SessionEnd hook scripts for Cursor. * * Deliberately NOT folded into `installJsonHooks` (claude-code): Cursor's * `hooks.json` is structurally different from Claude's, not just * differently-keyed (SMI-5893 Wave 8a, correcting a false Claude-compatible * claim). Confirmed 2026-08 against three independent fetches of * cursor.com/docs/hooks — the file is `{ "version": 1, "hooks": {...} }`, * with `hooks.sessionStart`/`hooks.sessionEnd` arrays of direct * `{ "command": "" }` entries. No `matcher`/`type` wrapper, unlike * Claude's `{ matcher: '', hooks: [{ type: 'command', command }] }` — reusing * that shape here would emit schema-invalid entries Cursor can't parse. * Reuses the same generic array-merge engine (`mergeJsonArrayEntry`) as * claude-code, with its own entry-value builder (`cursorHookEntry`) / * ownership predicate (`cursorHookEntryCommand`) and the * `ensureTopLevelDefaults` option to add the required `"version": 1` * sibling. */ export declare function installCursorHooks(startArtifact: AgentPackArtifact | undefined, endArtifact: AgentPackArtifact | undefined, ctx: HarnessInstallCtx, report: HarnessInstallReport): void; //# sourceMappingURL=agent-pack-installer.cursor-hooks.d.ts.map