@ekkos/cli 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,30 +3,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deployClaudeSettings = deployClaudeSettings;
4
4
  exports.areHooksConfigured = areHooksConfigured;
5
5
  const fs_1 = require("fs");
6
+ const path_1 = require("path");
6
7
  const platform_1 = require("../utils/platform");
7
8
  /**
8
9
  * Generate the hooks configuration for Claude Code settings.json
9
10
  * Uses the new format required by Claude Code 2.1.40+
10
11
  */
11
12
  function generateHooksConfig() {
12
- const hooksDir = `${platform_1.HOME_DIR}/.claude/hooks`;
13
+ // Use path.join (via CLAUDE_HOOKS_DIR) so OS-correct separators are used.
14
+ // JSON.stringify handles backslash-escaping automatically — do NOT pre-escape.
13
15
  if (platform_1.isWindows) {
14
16
  return {
15
17
  UserPromptSubmit: [
16
- { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${hooksDir}/user-prompt-submit.ps1"` }] }
18
+ { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${(0, path_1.join)(platform_1.CLAUDE_HOOKS_DIR, 'user-prompt-submit.ps1')}"` }] }
17
19
  ],
18
20
  Stop: [
19
- { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${hooksDir}/stop.ps1"` }] }
21
+ { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${(0, path_1.join)(platform_1.CLAUDE_HOOKS_DIR, 'stop.ps1')}"` }] }
20
22
  ],
21
23
  };
22
24
  }
23
- // Unix uses bash
25
+ // Unix: forward slashes, no quoting needed
24
26
  return {
25
27
  UserPromptSubmit: [
26
- { hooks: [{ type: 'command', command: `bash ${hooksDir}/user-prompt-submit.sh` }] }
28
+ { hooks: [{ type: 'command', command: `bash ${(0, path_1.join)(platform_1.CLAUDE_HOOKS_DIR, 'user-prompt-submit.sh')}` }] }
27
29
  ],
28
30
  Stop: [
29
- { hooks: [{ type: 'command', command: `bash ${hooksDir}/stop.sh` }] }
31
+ { hooks: [{ type: 'command', command: `bash ${(0, path_1.join)(platform_1.CLAUDE_HOOKS_DIR, 'stop.sh')}` }] }
30
32
  ],
31
33
  };
32
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekkos/cli",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Setup ekkOS memory for AI coding assistants (Claude Code, Cursor, Windsurf)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {