@ekkos/cli 1.0.14 → 1.0.15

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.
@@ -844,20 +844,27 @@ function launchWithDashboardWindows(options) {
844
844
  fs.writeFileSync(markerPath, `${launchTime}\n${cwd}`);
845
845
  }
846
846
  catch { }
847
- // Use single-quoted inner args so backslashes in Windows paths survive PowerShell expansion.
848
- // The wt command runs each pane as: powershell -NoExit -Command "& 'node' 'C:\path\ekkos' ..."
849
- const ekkosCmdEscaped = ekkosCmd.replace(/'/g, "''"); // escape single quotes in path
847
+ // Use -EncodedCommand (UTF-16LE Base64) to pass PowerShell scripts to wt panes.
848
+ // This completely avoids nested quote hell: cmd.exe sees no " inside the wt command string,
849
+ // and PowerShell decodes the base64 itself, preserving backslashes and special chars exactly.
850
+ const ekkosCmdEscaped = ekkosCmd.replace(/'/g, "''");
850
851
  const cwdEscaped = cwd.replace(/'/g, "''");
852
+ function toPsEncoded(script) {
853
+ // PowerShell -EncodedCommand expects UTF-16LE Base64
854
+ return Buffer.from(script, 'utf16le').toString('base64');
855
+ }
851
856
  // cd to original CWD first so ekkos run --kickstart registers the correct projectPath
852
- const runPsCmd = `Set-Location '${cwdEscaped}'; & node '${ekkosCmdEscaped}' ${runArgs.join(' ')}`;
853
- const dashPsCmd = `& node '${ekkosCmdEscaped}' dashboard --wait-for-new --refresh 2000`;
854
- // Windows Terminal split pane command:
855
- // wt new-tab --startingDirectory "..." powershell -NoExit -Command "..."
856
- // Passing --startingDirectory ensures both panes inherit the correct project CWD.
857
+ const runScript = `Set-Location '${cwdEscaped}'; & node '${ekkosCmdEscaped}' ${runArgs.join(' ')}`;
858
+ const dashScript = `& node '${ekkosCmdEscaped}' dashboard --wait-for-new --refresh 2000`;
859
+ const runEncoded = toPsEncoded(runScript);
860
+ const dashEncoded = toPsEncoded(dashScript);
861
+ // Windows Terminal split pane command.
862
+ // No nested double-quotes in the PowerShell portion — only the WT --title/--startingDirectory
863
+ // values need quoting, which cmd.exe handles cleanly.
857
864
  const wtCmd = [
858
865
  'wt',
859
- `new-tab --startingDirectory "${cwd}" --title "ekkOS" powershell -NoExit -Command "${runPsCmd}"`,
860
- `; split-pane -V --size 0.4 --title "ekkOS Dashboard" powershell -NoExit -Command "${dashPsCmd}"`
866
+ `new-tab --startingDirectory "${cwd}" --title ekkOS powershell -NoExit -EncodedCommand ${runEncoded}`,
867
+ `; split-pane -V --size 0.4 --title Dashboard powershell -NoExit -EncodedCommand ${dashEncoded}`
861
868
  ].join(' ');
862
869
  try {
863
870
  (0, child_process_1.execSync)(wtCmd, { stdio: 'inherit', shell: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekkos/cli",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Setup ekkOS memory for AI coding assistants (Claude Code, Cursor, Windsurf)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {