@ekkos/cli 1.0.9 → 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,34 +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
- // Use CLAUDE_HOOKS_DIR (path.join-based) to get correct OS separators.
13
- // Do NOT use template literals with HOME_DIR they produce mixed separators
14
- // on Windows (C:\Users\name/.claude/hooks) which causes "path not found".
15
- const hooksDir = platform_1.CLAUDE_HOOKS_DIR;
13
+ // Use path.join (via CLAUDE_HOOKS_DIR) so OS-correct separators are used.
14
+ // JSON.stringify handles backslash-escaping automaticallydo NOT pre-escape.
16
15
  if (platform_1.isWindows) {
17
- const ps1Dir = hooksDir.replace(/\\/g, '\\\\'); // escape backslashes for JSON string
18
16
  return {
19
17
  UserPromptSubmit: [
20
- { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${ps1Dir}\\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')}"` }] }
21
19
  ],
22
20
  Stop: [
23
- { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${ps1Dir}\\stop.ps1"` }] }
21
+ { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${(0, path_1.join)(platform_1.CLAUDE_HOOKS_DIR, 'stop.ps1')}"` }] }
24
22
  ],
25
23
  };
26
24
  }
27
- // Unix uses bash
25
+ // Unix: forward slashes, no quoting needed
28
26
  return {
29
27
  UserPromptSubmit: [
30
- { 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')}` }] }
31
29
  ],
32
30
  Stop: [
33
- { 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')}` }] }
34
32
  ],
35
33
  };
36
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekkos/cli",
3
- "version": "1.0.9",
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": {