Skip to content

Commit c2b195a

Browse files
fix: correct install paths for both Claude Code and Cursor targets (#18)
- Fix Cursor agents target: .agents/ → .cursor/agents/ - Fix Cursor hooks: add script copying + use $CURSOR_PROJECT_DIR paths - Fix Claude hooks: prevent hooks/hooks/ double nesting - Fix CHANGELOG markdownlint
1 parent dbd6b29 commit c2b195a

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [1.2.0](https://github.com/jiten-singh-shahi/salesforce-claude-code/compare/scc-universal-v1.1.0...scc-universal-v1.2.0) (2026-04-03)
99

10-
1110
### Features
1211

1312
* hooks adapter, cross-harness compatibility, and install fixes ([#16](https://github.com/jiten-singh-shahi/salesforce-claude-code/issues/16)) ([a80c81d](https://github.com/jiten-singh-shahi/salesforce-claude-code/commit/a80c81d1e8f708141760135d10a58cfca09a4990))

manifests/install-modules.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"agents/sf-review-agent.md",
1313
"agents/sf-bugfix-agent.md"
1414
],
15-
"targets": { "claude": ".claude/agents/", "cursor": ".agents/" }
15+
"targets": { "claude": ".claude/agents/", "cursor": ".cursor/agents/" }
1616
},
1717
{
1818
"paths": [
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"paths": ["scripts/hooks/"],
28-
"targets": { "claude": ".claude/", "cursor": null },
28+
"targets": { "claude": ".claude/", "cursor": ".cursor/" },
2929
"installType": "hooks",
3030
"hooksSource": "hooks/hooks.json"
3131
}
@@ -44,7 +44,7 @@
4444
"paths": [
4545
"agents/sf-apex-agent.md"
4646
],
47-
"targets": { "claude": ".claude/agents/", "cursor": ".agents/" }
47+
"targets": { "claude": ".claude/agents/", "cursor": ".cursor/agents/" }
4848
},
4949
{
5050
"paths": [
@@ -72,7 +72,7 @@
7272
"pathGroups": [
7373
{
7474
"paths": ["agents/sf-lwc-agent.md"],
75-
"targets": { "claude": ".claude/agents/", "cursor": ".agents/" }
75+
"targets": { "claude": ".claude/agents/", "cursor": ".cursor/agents/" }
7676
},
7777
{
7878
"paths": [
@@ -103,7 +103,7 @@
103103
"agents/loop-operator.md",
104104
"agents/refactor-cleaner.md"
105105
],
106-
"targets": { "claude": ".claude/agents/", "cursor": ".agents/" }
106+
"targets": { "claude": ".claude/agents/", "cursor": ".cursor/agents/" }
107107
},
108108
{
109109
"paths": [
@@ -194,7 +194,7 @@
194194
"agents/sf-aura-reviewer.md",
195195
"agents/sf-admin-agent.md"
196196
],
197-
"targets": { "claude": ".claude/agents/", "cursor": ".agents/" }
197+
"targets": { "claude": ".claude/agents/", "cursor": ".cursor/agents/" }
198198
},
199199
{
200200
"paths": [

scripts/lib/install-executor.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,17 @@ function installHooks(group, pluginRoot, targetName, projectRoot, moduleName, dr
318318
const cursorHooksPath = path.join(projectRoot, '.cursor', 'hooks.json');
319319
const cursorHooks = transformHooks(hooksJson);
320320

321+
// Remap adapter paths from scripts/hooks/ to .cursor/hooks/
322+
// (adapter outputs plugin-relative paths, but install copies to .cursor/hooks/)
323+
for (const hooks of Object.values(cursorHooks.hooks)) {
324+
for (const hook of hooks) {
325+
if (hook.command) {
326+
hook.command = hook.command.replace(/\bnode scripts\/hooks\//g, 'node "$CURSOR_PROJECT_DIR"/.cursor/hooks/');
327+
hook.command = hook.command.replace(/\bbash scripts\/hooks\//g, 'bash "$CURSOR_PROJECT_DIR"/.cursor/hooks/');
328+
}
329+
}
330+
}
331+
321332
if (dryRun) {
322333
const hookCount = Object.values(cursorHooks.hooks).reduce((sum, arr) => sum + arr.length, 0);
323334
console.log(` [dry-run] Would generate .cursor/hooks.json (${hookCount} hooks)`);

0 commit comments

Comments
 (0)