@ekkos/cli 1.1.4 → 1.1.6
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.
- package/dist/commands/init.js +19 -9
- package/dist/commands/run.js +44 -12
- package/package.json +1 -1
package/dist/commands/init.js
CHANGED
|
@@ -257,18 +257,28 @@ async function deployForClaude(apiKey, userId, options) {
|
|
|
257
257
|
catch (error) {
|
|
258
258
|
spinner.fail('MCP server configuration failed');
|
|
259
259
|
}
|
|
260
|
-
// Settings.json (hook registration)
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
(
|
|
260
|
+
// Settings.json (hook registration) — skipped on Windows (proxy-only mode)
|
|
261
|
+
if (platform_1.isWindows) {
|
|
262
|
+
spinner = (0, ora_1.default)('Hooks skipped (Windows proxy-only mode)').start();
|
|
263
|
+
spinner.info('Hooks skipped (Windows uses proxy-only mode)');
|
|
264
264
|
result.settings = true;
|
|
265
|
-
spinner.succeed('Hooks configuration');
|
|
266
265
|
}
|
|
267
|
-
|
|
268
|
-
spinner.
|
|
266
|
+
else {
|
|
267
|
+
spinner = (0, ora_1.default)('Deploying hooks configuration...').start();
|
|
268
|
+
try {
|
|
269
|
+
(0, settings_1.deployClaudeSettings)();
|
|
270
|
+
result.settings = true;
|
|
271
|
+
spinner.succeed('Hooks configuration');
|
|
272
|
+
}
|
|
273
|
+
catch (error) {
|
|
274
|
+
spinner.fail('Hooks configuration failed');
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
// Hook scripts — skipped on Windows
|
|
278
|
+
if (platform_1.isWindows) {
|
|
279
|
+
// Skip hook scripts on Windows
|
|
269
280
|
}
|
|
270
|
-
|
|
271
|
-
if (!options.skipHooks) {
|
|
281
|
+
else if (!options.skipHooks) {
|
|
272
282
|
spinner = (0, ora_1.default)('Deploying hook scripts...').start();
|
|
273
283
|
try {
|
|
274
284
|
result.hooks = (0, hooks_1.deployHooks)(apiKey);
|
package/dist/commands/run.js
CHANGED
|
@@ -639,24 +639,30 @@ function installEkkosClaudeVersion() {
|
|
|
639
639
|
* 3. npx with pinned version (fallback if install fails)
|
|
640
640
|
*/
|
|
641
641
|
function resolveClaudePath() {
|
|
642
|
-
//
|
|
642
|
+
// When 'latest', prefer system Claude (user keeps it updated via brew/npm)
|
|
643
|
+
if (PINNED_CLAUDE_VERSION === 'latest') {
|
|
644
|
+
const globalPath = resolveGlobalClaudePath();
|
|
645
|
+
if (globalPath !== 'claude' && fs.existsSync(globalPath)) {
|
|
646
|
+
return globalPath;
|
|
647
|
+
}
|
|
648
|
+
// No system Claude found — fall through to ekkOS-managed install
|
|
649
|
+
}
|
|
650
|
+
// ekkOS-managed installation (for pinned versions or no system Claude)
|
|
643
651
|
if (fs.existsSync(EKKOS_CLAUDE_BIN) && checkClaudeVersion(EKKOS_CLAUDE_BIN)) {
|
|
644
652
|
return EKKOS_CLAUDE_BIN;
|
|
645
653
|
}
|
|
646
|
-
//
|
|
654
|
+
// Auto-install to ekkOS-managed directory
|
|
647
655
|
if (installEkkosClaudeVersion()) {
|
|
648
656
|
if (fs.existsSync(EKKOS_CLAUDE_BIN)) {
|
|
649
657
|
return EKKOS_CLAUDE_BIN;
|
|
650
658
|
}
|
|
651
659
|
}
|
|
652
|
-
//
|
|
653
|
-
// This is rare - only happens if install failed
|
|
660
|
+
// Fall back to npx (rare - only if install failed)
|
|
654
661
|
return `npx:${PINNED_CLAUDE_VERSION}`;
|
|
655
662
|
}
|
|
656
663
|
/**
|
|
657
664
|
* Original resolve function for fallback to global install
|
|
658
665
|
*/
|
|
659
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
660
666
|
function resolveGlobalClaudePath() {
|
|
661
667
|
// Windows global paths
|
|
662
668
|
if (isWindows) {
|
|
@@ -895,21 +901,47 @@ async function run(options) {
|
|
|
895
901
|
console.log(chalk_1.default.yellow(' ⏭️ API proxy disabled (--no-proxy)'));
|
|
896
902
|
}
|
|
897
903
|
// ══════════════════════════════════════════════════════════════════════════
|
|
898
|
-
//
|
|
904
|
+
// WINDOWS: Disable hooks for reliability — proxy-only mode
|
|
905
|
+
// Hooks can cause PowerShell execution policy issues and hangs on Windows.
|
|
906
|
+
// The proxy handles context management; hooks aren't strictly required.
|
|
899
907
|
// ══════════════════════════════════════════════════════════════════════════
|
|
900
|
-
if (
|
|
908
|
+
if (isWindows) {
|
|
901
909
|
try {
|
|
902
|
-
const
|
|
903
|
-
if (
|
|
904
|
-
|
|
905
|
-
|
|
910
|
+
const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
|
|
911
|
+
if (fs.existsSync(settingsPath)) {
|
|
912
|
+
const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
|
|
913
|
+
if (settings.hooks) {
|
|
914
|
+
delete settings.hooks;
|
|
915
|
+
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
916
|
+
console.log(chalk_1.default.gray(' ⏭️ Hooks disabled (Windows proxy-only mode)'));
|
|
917
|
+
}
|
|
906
918
|
}
|
|
907
919
|
}
|
|
908
920
|
catch {
|
|
909
|
-
|
|
921
|
+
// Non-fatal — continue without hook cleanup
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
// ══════════════════════════════════════════════════════════════════════════
|
|
925
|
+
// DASHBOARD MODE: Launch via tmux with isolated dashboard pane (60/40)
|
|
926
|
+
// ══════════════════════════════════════════════════════════════════════════
|
|
927
|
+
if (options.dashboard) {
|
|
928
|
+
if (isWindows) {
|
|
929
|
+
console.log(chalk_1.default.yellow(' Dashboard split-pane requires tmux (not available on Windows)'));
|
|
910
930
|
console.log(chalk_1.default.gray(' Alternative: run "ekkos dashboard --latest" in a separate terminal'));
|
|
911
931
|
console.log(chalk_1.default.gray(' Continuing without dashboard...\n'));
|
|
912
932
|
}
|
|
933
|
+
else {
|
|
934
|
+
try {
|
|
935
|
+
(0, child_process_1.execSync)('command -v tmux', { encoding: 'utf-8', stdio: 'pipe' }).trim();
|
|
936
|
+
launchWithDashboard(options);
|
|
937
|
+
return;
|
|
938
|
+
}
|
|
939
|
+
catch {
|
|
940
|
+
console.log(chalk_1.default.yellow(' tmux not found. Install: brew install tmux'));
|
|
941
|
+
console.log(chalk_1.default.gray(' Alternative: run "ekkos dashboard --latest" in a separate terminal'));
|
|
942
|
+
console.log(chalk_1.default.gray(' Continuing without dashboard...\n'));
|
|
943
|
+
}
|
|
944
|
+
}
|
|
913
945
|
}
|
|
914
946
|
// Generate instance ID for this run
|
|
915
947
|
const instanceId = generateInstanceId();
|