@ekkos/cli 1.0.10 → 1.0.12

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.
@@ -301,7 +301,9 @@ function resolveJsonlPath(sessionName, createdAfterMs) {
301
301
  * This prevents picking up old sessions that are still being modified.
302
302
  */
303
303
  function findLatestJsonl(projectPath, createdAfterMs) {
304
- const encoded = projectPath.replace(/\//g, '-');
304
+ // Claude encodes project paths by replacing ALL separators (/ and \) with -.
305
+ // On Windows projectPath uses backslashes, so we must normalize both.
306
+ const encoded = projectPath.replace(/[\\/]/g, '-');
305
307
  const projectDir = path.join(os.homedir(), '.claude', 'projects', encoded);
306
308
  if (!fs.existsSync(projectDir))
307
309
  return null;
@@ -840,15 +840,18 @@ function launchWithDashboardWindows(options) {
840
840
  fs.writeFileSync(markerPath, `${launchTime}\n${cwd}`);
841
841
  }
842
842
  catch { }
843
- const runCommand = `node "${ekkosCmd}" ${runArgs.join(' ')}`;
844
- const dashCommand = `node "${ekkosCmd}" dashboard --wait-for-new --refresh 2000`;
843
+ // Use single-quoted inner args so backslashes in Windows paths survive PowerShell expansion.
844
+ // The wt command runs each pane as: powershell -NoExit -Command "& 'node' 'C:\path\ekkos' ..."
845
+ const ekkosCmdEscaped = ekkosCmd.replace(/'/g, "''"); // escape single quotes in path
846
+ const runPsCmd = `& node '${ekkosCmdEscaped}' ${runArgs.join(' ')}`;
847
+ const dashPsCmd = `& node '${ekkosCmdEscaped}' dashboard --wait-for-new --refresh 2000`;
845
848
  // Windows Terminal split pane command:
846
849
  // wt --window 0 split-pane -V --size 0.4 --title "ekkOS Dashboard" powershell -NoExit -Command "..."
847
850
  // If no WT window exists yet, open a new one with two panes
848
851
  const wtCmd = [
849
852
  'wt',
850
- `new-tab --title "ekkOS" powershell -NoExit -Command "${runCommand}"`,
851
- `; split-pane -V --size 0.4 --title "ekkOS Dashboard" powershell -NoExit -Command "${dashCommand}"`
853
+ `new-tab --title "ekkOS" powershell -NoExit -Command "${runPsCmd}"`,
854
+ `; split-pane -V --size 0.4 --title "ekkOS Dashboard" powershell -NoExit -Command "${dashPsCmd}"`
852
855
  ].join(' ');
853
856
  try {
854
857
  (0, child_process_1.execSync)(wtCmd, { stdio: 'inherit', shell: true });
@@ -12,13 +12,18 @@ const platform_1 = require("../utils/platform");
12
12
  function generateHooksConfig() {
13
13
  // Use path.join (via CLAUDE_HOOKS_DIR) so OS-correct separators are used.
14
14
  // JSON.stringify handles backslash-escaping automatically — do NOT pre-escape.
15
+ //
16
+ // IMPORTANT: Do NOT use `-File` on Windows — Claude Code has a known bug where
17
+ // it fails to canonicalize absolute script paths, producing "system cannot find
18
+ // the specified path". Use `-Command "& 'path'"` instead, which bypasses it.
19
+ // See: https://github.com/anthropics/claude-code/issues/12874
15
20
  if (platform_1.isWindows) {
16
21
  return {
17
22
  UserPromptSubmit: [
18
- { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${(0, path_1.join)(platform_1.CLAUDE_HOOKS_DIR, 'user-prompt-submit.ps1')}"` }] }
23
+ { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -Command "& '${(0, path_1.join)(platform_1.CLAUDE_HOOKS_DIR, 'user-prompt-submit.ps1')}'"` }] }
19
24
  ],
20
25
  Stop: [
21
- { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${(0, path_1.join)(platform_1.CLAUDE_HOOKS_DIR, 'stop.ps1')}"` }] }
26
+ { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -Command "& '${(0, path_1.join)(platform_1.CLAUDE_HOOKS_DIR, 'stop.ps1')}'"` }] }
22
27
  ],
23
28
  };
24
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekkos/cli",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "Setup ekkOS memory for AI coding assistants (Claude Code, Cursor, Windsurf)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {