@ekkos/cli 1.3.2 → 1.3.5

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.
Files changed (119) hide show
  1. package/dist/capture/jsonl-rewriter.d.ts +1 -1
  2. package/dist/capture/jsonl-rewriter.js +3 -3
  3. package/dist/capture/transcript-repair.d.ts +2 -2
  4. package/dist/capture/transcript-repair.js +2 -2
  5. package/dist/commands/claw.d.ts +13 -0
  6. package/dist/commands/claw.js +253 -0
  7. package/dist/commands/dashboard.js +617 -83
  8. package/dist/commands/doctor.d.ts +3 -3
  9. package/dist/commands/doctor.js +6 -79
  10. package/dist/commands/gemini.d.ts +19 -0
  11. package/dist/commands/gemini.js +193 -0
  12. package/dist/commands/init.js +2 -25
  13. package/dist/commands/run.d.ts +0 -1
  14. package/dist/commands/run.js +147 -241
  15. package/dist/commands/scan.d.ts +21 -0
  16. package/dist/commands/scan.js +386 -0
  17. package/dist/commands/swarm-dashboard.js +156 -28
  18. package/dist/commands/swarm.d.ts +1 -1
  19. package/dist/commands/swarm.js +1 -1
  20. package/dist/commands/test-claude.d.ts +2 -2
  21. package/dist/commands/test-claude.js +3 -3
  22. package/dist/deploy/index.d.ts +0 -2
  23. package/dist/deploy/index.js +0 -2
  24. package/dist/deploy/settings.d.ts +2 -2
  25. package/dist/deploy/settings.js +42 -4
  26. package/dist/deploy/skills.js +1 -2
  27. package/dist/index.js +79 -19
  28. package/dist/lib/usage-parser.js +4 -3
  29. package/dist/utils/proxy-url.d.ts +12 -1
  30. package/dist/utils/proxy-url.js +16 -1
  31. package/dist/utils/templates.js +1 -1
  32. package/package.json +4 -6
  33. package/templates/CLAUDE.md +49 -107
  34. package/dist/agent/daemon.d.ts +0 -130
  35. package/dist/agent/daemon.js +0 -606
  36. package/dist/agent/health-check.d.ts +0 -35
  37. package/dist/agent/health-check.js +0 -243
  38. package/dist/agent/pty-runner.d.ts +0 -53
  39. package/dist/agent/pty-runner.js +0 -190
  40. package/dist/commands/agent.d.ts +0 -50
  41. package/dist/commands/agent.js +0 -544
  42. package/dist/commands/setup-remote.d.ts +0 -20
  43. package/dist/commands/setup-remote.js +0 -582
  44. package/dist/commands/synk.d.ts +0 -7
  45. package/dist/commands/synk.js +0 -339
  46. package/dist/synk/api.d.ts +0 -22
  47. package/dist/synk/api.js +0 -133
  48. package/dist/synk/auth.d.ts +0 -7
  49. package/dist/synk/auth.js +0 -30
  50. package/dist/synk/config.d.ts +0 -18
  51. package/dist/synk/config.js +0 -37
  52. package/dist/synk/daemon/control-client.d.ts +0 -11
  53. package/dist/synk/daemon/control-client.js +0 -101
  54. package/dist/synk/daemon/control-server.d.ts +0 -24
  55. package/dist/synk/daemon/control-server.js +0 -91
  56. package/dist/synk/daemon/run.d.ts +0 -14
  57. package/dist/synk/daemon/run.js +0 -338
  58. package/dist/synk/encryption.d.ts +0 -17
  59. package/dist/synk/encryption.js +0 -133
  60. package/dist/synk/index.d.ts +0 -13
  61. package/dist/synk/index.js +0 -36
  62. package/dist/synk/machine-client.d.ts +0 -42
  63. package/dist/synk/machine-client.js +0 -218
  64. package/dist/synk/persistence.d.ts +0 -51
  65. package/dist/synk/persistence.js +0 -211
  66. package/dist/synk/qr.d.ts +0 -5
  67. package/dist/synk/qr.js +0 -33
  68. package/dist/synk/session-bridge.d.ts +0 -58
  69. package/dist/synk/session-bridge.js +0 -171
  70. package/dist/synk/session-client.d.ts +0 -46
  71. package/dist/synk/session-client.js +0 -240
  72. package/dist/synk/types.d.ts +0 -574
  73. package/dist/synk/types.js +0 -74
  74. package/dist/utils/verify-remote-terminal.d.ts +0 -10
  75. package/dist/utils/verify-remote-terminal.js +0 -415
  76. package/templates/README.md +0 -378
  77. package/templates/claude-plugins/PHASE2_COMPLETION.md +0 -346
  78. package/templates/claude-plugins/PLUGIN_PROPOSALS.md +0 -1776
  79. package/templates/claude-plugins/README.md +0 -587
  80. package/templates/claude-plugins/agents/code-reviewer.json +0 -14
  81. package/templates/claude-plugins/agents/debug-detective.json +0 -15
  82. package/templates/claude-plugins/agents/git-companion.json +0 -14
  83. package/templates/claude-plugins/blog-manager/.claude-plugin/plugin.json +0 -8
  84. package/templates/claude-plugins/blog-manager/commands/blog.md +0 -691
  85. package/templates/claude-plugins/golden-loop-monitor/.claude-plugin/plugin.json +0 -8
  86. package/templates/claude-plugins/golden-loop-monitor/commands/loop-status.md +0 -434
  87. package/templates/claude-plugins/learning-tracker/.claude-plugin/plugin.json +0 -8
  88. package/templates/claude-plugins/learning-tracker/commands/my-patterns.md +0 -282
  89. package/templates/claude-plugins/memory-lens/.claude-plugin/plugin.json +0 -8
  90. package/templates/claude-plugins/memory-lens/commands/memory-search.md +0 -181
  91. package/templates/claude-plugins/pattern-coach/.claude-plugin/plugin.json +0 -8
  92. package/templates/claude-plugins/pattern-coach/commands/forge.md +0 -365
  93. package/templates/claude-plugins/project-schema-validator/.claude-plugin/plugin.json +0 -8
  94. package/templates/claude-plugins/project-schema-validator/commands/validate-schema.md +0 -582
  95. package/templates/commands/continue.md +0 -47
  96. package/templates/cursor-rules/ekkos-memory.md +0 -127
  97. package/templates/ekkos-manifest.json +0 -223
  98. package/templates/helpers/json-parse.cjs +0 -101
  99. package/templates/plan-template.md +0 -306
  100. package/templates/shared/hooks-enabled.json +0 -22
  101. package/templates/shared/session-words.json +0 -45
  102. package/templates/skills/ekkOS_Deep_Recall/Skill.md +0 -282
  103. package/templates/skills/ekkOS_Learn/Skill.md +0 -265
  104. package/templates/skills/ekkOS_Memory_First/Skill.md +0 -206
  105. package/templates/skills/ekkOS_Plan_Assist/Skill.md +0 -302
  106. package/templates/skills/ekkOS_Preferences/Skill.md +0 -247
  107. package/templates/skills/ekkOS_Reflect/Skill.md +0 -257
  108. package/templates/skills/ekkOS_Safety/Skill.md +0 -265
  109. package/templates/skills/ekkOS_Schema/Skill.md +0 -251
  110. package/templates/skills/ekkOS_Summary/Skill.md +0 -257
  111. package/templates/spec-template.md +0 -159
  112. package/templates/windsurf-rules/ekkos-memory.md +0 -127
  113. package/templates/windsurf-skills/README.md +0 -58
  114. package/templates/windsurf-skills/ekkos-continue/SKILL.md +0 -81
  115. package/templates/windsurf-skills/ekkos-golden-loop/SKILL.md +0 -225
  116. package/templates/windsurf-skills/ekkos-insights/SKILL.md +0 -138
  117. package/templates/windsurf-skills/ekkos-recall/SKILL.md +0 -96
  118. package/templates/windsurf-skills/ekkos-safety/SKILL.md +0 -89
  119. package/templates/windsurf-skills/ekkos-vault/SKILL.md +0 -86
@@ -32,7 +32,7 @@ export interface SwarmLaunchOptions {
32
32
  * - Uses tmux WINDOWS (not panes) — compatible with Python Queen discovery
33
33
  * - Window 0: Swarm Dashboard (blessed TUI showing all workers)
34
34
  * - Windows 1-N: Workers running `ekkos run -b` (proxy + infinite context)
35
- * - Each worker gets full ekkOS stack: proxy, hooks, ccDNA, context eviction
35
+ * - Each worker gets full ekkOS stack: proxy, hooks, context eviction
36
36
  *
37
37
  * Flow:
38
38
  * 1. Decompose task via Gemini Flash (free, fast)
@@ -194,7 +194,7 @@ function findPythonPath(swarmDir) {
194
194
  * - Uses tmux WINDOWS (not panes) — compatible with Python Queen discovery
195
195
  * - Window 0: Swarm Dashboard (blessed TUI showing all workers)
196
196
  * - Windows 1-N: Workers running `ekkos run -b` (proxy + infinite context)
197
- * - Each worker gets full ekkOS stack: proxy, hooks, ccDNA, context eviction
197
+ * - Each worker gets full ekkOS stack: proxy, hooks, context eviction
198
198
  *
199
199
  * Flow:
200
200
  * 1. Decompose task via Gemini Flash (free, fast)
@@ -2,11 +2,11 @@
2
2
  * ekkos test-claude — Bare proxy test (no CLI wrapper)
3
3
  *
4
4
  * Launches vanilla Claude Code with ONLY the proxy URL set.
5
- * No ccDNA, no PTY wrapper, no injection, no context management.
5
+ * No PTY wrapper, no injection, no context management.
6
6
  *
7
7
  * Purpose: Isolate whether fast context growth is caused by:
8
8
  * A) The proxy (IPC, injections, tool compression)
9
- * B) The ekkos CLI wrapper (ccDNA, PTY, run.ts logic)
9
+ * B) The ekkos CLI wrapper (PTY, run.ts logic)
10
10
  */
11
11
  export interface TestClaudeOptions {
12
12
  noProxy?: boolean;
@@ -3,11 +3,11 @@
3
3
  * ekkos test-claude — Bare proxy test (no CLI wrapper)
4
4
  *
5
5
  * Launches vanilla Claude Code with ONLY the proxy URL set.
6
- * No ccDNA, no PTY wrapper, no injection, no context management.
6
+ * No PTY wrapper, no injection, no context management.
7
7
  *
8
8
  * Purpose: Isolate whether fast context growth is caused by:
9
9
  * A) The proxy (IPC, injections, tool compression)
10
- * B) The ekkos CLI wrapper (ccDNA, PTY, run.ts logic)
10
+ * B) The ekkos CLI wrapper (PTY, run.ts logic)
11
11
  */
12
12
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
13
13
  if (k2 === undefined) k2 = k;
@@ -59,7 +59,7 @@ async function testClaude(options) {
59
59
  console.log(chalk_1.default.cyan('\n ekkOS test-claude — Bare Proxy Test'));
60
60
  console.log(chalk_1.default.gray(' ══════════════════════════════════'));
61
61
  console.log(chalk_1.default.green(' Proxy: ') + (options.noProxy ? chalk_1.default.yellow('NO') : chalk_1.default.green('YES')));
62
- console.log(chalk_1.default.green(' CLI: ') + chalk_1.default.yellow('NO (no ccDNA, no PTY, no inject)'));
62
+ console.log(chalk_1.default.green(' CLI: ') + chalk_1.default.yellow('NO (no PTY, no inject)'));
63
63
  console.log(chalk_1.default.green(' Hooks: ') + (options.noHooks ? chalk_1.default.yellow('NO (disabled)') : chalk_1.default.gray('YES (same .claude/hooks/)')));
64
64
  console.log('');
65
65
  // Resolve Claude path
@@ -2,6 +2,4 @@ export * from './mcp';
2
2
  export * from './settings';
3
3
  export * from './hooks';
4
4
  export * from './skills';
5
- export * from './agents';
6
- export * from './plugins';
7
5
  export * from './instructions';
@@ -19,6 +19,4 @@ __exportStar(require("./mcp"), exports);
19
19
  __exportStar(require("./settings"), exports);
20
20
  __exportStar(require("./hooks"), exports);
21
21
  __exportStar(require("./skills"), exports);
22
- __exportStar(require("./agents"), exports);
23
- __exportStar(require("./plugins"), exports);
24
22
  __exportStar(require("./instructions"), exports);
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Claude Code settings.json management for ekkOS.
3
3
  * - Disables Claude's built-in auto-memory (ekkOS replaces it with 11-layer memory)
4
- * - Cleans up any legacy hooks entries
4
+ * - Registers ekkOS hooks in correct Claude Code format (PascalCase events, { type, command } objects)
5
5
  */
6
6
  /**
7
- * Deploy Claude Code settings.json — disables auto-memory and cleans up legacy hooks.
7
+ * Deploy Claude Code settings.json — disables auto-memory and configures hooks.
8
8
  * ekkOS provides its own memory system via MCP, so Claude's built-in auto-memory
9
9
  * is redundant and wastes ~1K tokens/turn on duplicate context.
10
10
  */
@@ -2,15 +2,17 @@
2
2
  /**
3
3
  * Claude Code settings.json management for ekkOS.
4
4
  * - Disables Claude's built-in auto-memory (ekkOS replaces it with 11-layer memory)
5
- * - Cleans up any legacy hooks entries
5
+ * - Registers ekkOS hooks in correct Claude Code format (PascalCase events, { type, command } objects)
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.deployClaudeSettings = deployClaudeSettings;
9
9
  exports.areHooksConfigured = areHooksConfigured;
10
10
  const fs_1 = require("fs");
11
+ const path_1 = require("path");
12
+ const os_1 = require("os");
11
13
  const platform_1 = require("../utils/platform");
12
14
  /**
13
- * Deploy Claude Code settings.json — disables auto-memory and cleans up legacy hooks.
15
+ * Deploy Claude Code settings.json — disables auto-memory and configures hooks.
14
16
  * ekkOS provides its own memory system via MCP, so Claude's built-in auto-memory
15
17
  * is redundant and wastes ~1K tokens/turn on duplicate context.
16
18
  */
@@ -35,8 +37,44 @@ function deployClaudeSettings() {
35
37
  settings.autoMemoryEnabled = false;
36
38
  changed = true;
37
39
  }
38
- // Remove any previously-installed ekkOS hooks entries
39
- if ('hooks' in settings) {
40
+ // Build correct hooks config pointing to ~/.claude/hooks/ scripts.
41
+ // Claude Code requires PascalCase event names and { type, command } objects.
42
+ const hooksDir = (0, path_1.join)((0, os_1.homedir)(), '.claude', 'hooks');
43
+ const isWindows = process.platform === 'win32';
44
+ const ext = isWindows ? '.ps1' : '.sh';
45
+ const hookMapping = [
46
+ { event: 'SessionStart', script: `session-start${ext}` },
47
+ { event: 'UserPromptSubmit', script: `user-prompt-submit${ext}` },
48
+ { event: 'Stop', script: `stop${ext}` },
49
+ ];
50
+ // Only register hooks for scripts that actually exist on disk
51
+ const newHooks = {};
52
+ for (const { event, script } of hookMapping) {
53
+ const scriptPath = (0, path_1.join)(hooksDir, script);
54
+ if ((0, fs_1.existsSync)(scriptPath)) {
55
+ newHooks[event] = [
56
+ {
57
+ matcher: '',
58
+ hooks: [
59
+ {
60
+ type: 'command',
61
+ command: scriptPath,
62
+ },
63
+ ],
64
+ },
65
+ ];
66
+ }
67
+ }
68
+ // Replace hooks if they differ from expected (fixes wrong format + adds missing)
69
+ const existingHooks = settings.hooks;
70
+ if (Object.keys(newHooks).length > 0) {
71
+ if (JSON.stringify(existingHooks) !== JSON.stringify(newHooks)) {
72
+ settings.hooks = newHooks;
73
+ changed = true;
74
+ }
75
+ }
76
+ else if (existingHooks) {
77
+ // No hook scripts on disk — remove stale hooks entry
40
78
  delete settings.hooks;
41
79
  changed = true;
42
80
  }
@@ -39,8 +39,7 @@ function areSkillsDeployed() {
39
39
  if (!(0, fs_1.existsSync)(platform_1.CLAUDE_SKILLS_DIR))
40
40
  return false;
41
41
  const deployed = (0, fs_1.readdirSync)(platform_1.CLAUDE_SKILLS_DIR);
42
- // Check for at least some core skills
43
- return deployed.length >= 5;
42
+ return deployed.length >= 1;
44
43
  }
45
44
  /**
46
45
  * Count deployed skills
package/dist/index.js CHANGED
@@ -42,9 +42,11 @@ const init_1 = require("./commands/init");
42
42
  const test_1 = require("./commands/test");
43
43
  const status_1 = require("./commands/status");
44
44
  const run_1 = require("./commands/run");
45
+ const gemini_1 = require("./commands/gemini");
45
46
  const test_claude_1 = require("./commands/test-claude");
46
47
  const doctor_1 = require("./commands/doctor");
47
48
  const stream_1 = require("./commands/stream");
49
+ const claw_1 = require("./commands/claw");
48
50
  // DEPRECATED: Hooks removed in hookless architecture migration
49
51
  // hooksInstall, hooksVerify, hooksStatus no longer called — `hooks` command prints a deprecation notice.
50
52
  const state_1 = require("./utils/state");
@@ -53,7 +55,7 @@ const dashboard_1 = require("./commands/dashboard");
53
55
  const swarm_1 = require("./commands/swarm");
54
56
  const swarm_dashboard_1 = require("./commands/swarm-dashboard");
55
57
  const swarm_setup_1 = require("./commands/swarm-setup");
56
- const synk_1 = require("./commands/synk");
58
+ const scan_1 = require("./commands/scan");
57
59
  const chalk_1 = __importDefault(require("chalk"));
58
60
  const fs = __importStar(require("fs"));
59
61
  const path = __importStar(require("path"));
@@ -75,10 +77,13 @@ commander_1.program
75
77
  chalk_1.default.cyan.bold('Examples:'),
76
78
  ` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos')} ${chalk_1.default.gray('Start Claude Code with ekkOS memory (default: run)')}`,
77
79
  ` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos init')} ${chalk_1.default.gray('First-time setup — authenticate + configure your IDE')}`,
80
+ ` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos scan')} ${chalk_1.default.gray('Scan repo structure and seed system registry')}`,
81
+ ` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos scan --compile')} ${chalk_1.default.gray('Scan, seed, and trigger compile pass')}`,
78
82
  ` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos run --dashboard')} ${chalk_1.default.gray('Launch with live usage dashboard (tmux split)')}`,
79
83
  ` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos run -b')} ${chalk_1.default.gray('Launch with bypass permissions mode')}`,
80
84
  ` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos doctor --fix')} ${chalk_1.default.gray('Check and auto-fix system prerequisites')}`,
81
85
  ` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos usage daily')} ${chalk_1.default.gray("View today's token usage and costs")}`,
86
+ ` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos gemini')} ${chalk_1.default.gray('Launch Gemini CLI with ekkOS memory proxy')}`,
82
87
  ` ${chalk_1.default.gray('$')} ${chalk_1.default.white('ekkos swarm launch -t "build X"')} ${chalk_1.default.gray('Launch parallel workers on a task')}`,
83
88
  '',
84
89
  chalk_1.default.gray(' Run ') + chalk_1.default.white('ekkos <command> --help') + chalk_1.default.gray(' for detailed options on any command.'),
@@ -148,6 +153,7 @@ commander_1.program
148
153
  icon: '▸',
149
154
  commands: [
150
155
  { name: 'init', desc: 'Authenticate and configure your IDE (Claude, Cursor, Windsurf)' },
156
+ { name: 'scan', desc: 'Scan repo structure and seed ekkOS system registry' },
151
157
  { name: 'status', desc: 'Show memory status and installation info' },
152
158
  { name: 'test', desc: 'Test connection to ekkOS memory API' },
153
159
  { name: 'doctor', desc: 'Check system prerequisites (Node, PTY, Claude, MCP)' },
@@ -157,9 +163,10 @@ commander_1.program
157
163
  title: 'Running',
158
164
  icon: '▸',
159
165
  commands: [
160
- { name: 'run', desc: 'Launch Claude Code with ekkOS memory + auto-continue', note: 'default' },
161
- { name: 'test-claude', desc: 'Launch Claude with proxy only (no ccDNA/PTY) for debugging' },
166
+ { name: 'run', desc: 'Launch Claude Code with ekkOS memory', note: 'default' },
167
+ { name: 'test-claude', desc: 'Launch Claude with proxy only (no PTY) for debugging' },
162
168
  { name: 'sessions', desc: 'List active Claude Code sessions' },
169
+ { name: 'claw', desc: 'OpenClaw integration status and upgrade controls' },
163
170
  ],
164
171
  },
165
172
  {
@@ -172,13 +179,6 @@ commander_1.program
172
179
  { name: 'hooks', desc: '[DEPRECATED] Hooks no longer needed — use `ekkos run`' },
173
180
  ],
174
181
  },
175
- {
176
- title: 'Synk (Remote Session Sync)',
177
- icon: '▸',
178
- commands: [
179
- { name: 'synk', desc: 'Remote session sync — control Claude Code from anywhere' },
180
- ],
181
- },
182
182
  {
183
183
  title: 'Swarm (Multi-Agent)',
184
184
  icon: '▸',
@@ -226,6 +226,20 @@ commander_1.program
226
226
  .option('--skip-hooks', '[DEPRECATED] Hooks are no longer deployed; this flag is a no-op')
227
227
  .option('--skip-skills', 'Skip skills deployment')
228
228
  .action(init_1.init);
229
+ // Scan command — discover repo systems and seed registry
230
+ commander_1.program
231
+ .command('scan')
232
+ .description('Scan repo structure, discover systems, and seed ekkOS registry')
233
+ .option('-c, --compile', 'Trigger a compile pass after seeding')
234
+ .option('-n, --dry-run', 'Show discovered systems without seeding')
235
+ .option('-p, --path <path>', 'Path to scan (default: current directory)')
236
+ .action((options) => {
237
+ (0, scan_1.scan)({
238
+ compile: options.compile,
239
+ dryRun: options.dryRun,
240
+ path: options.path,
241
+ });
242
+ });
229
243
  // Status command
230
244
  commander_1.program
231
245
  .command('status')
@@ -235,22 +249,59 @@ commander_1.program
235
249
  .action((options) => {
236
250
  (0, status_1.status)({ watch: options.watch, json: options.json });
237
251
  });
252
+ // OpenClaw integration commands
253
+ const clawCmd = commander_1.program
254
+ .command('claw')
255
+ .description('Manage OpenClaw + ekkOS integration');
256
+ clawCmd
257
+ .command('status')
258
+ .description('Show OpenClaw runtime + ekkOS proxy integration status')
259
+ .option('-j, --json', 'Output machine-readable JSON')
260
+ .option('--proxy-url <url>', 'Expected ekkOS proxy URL (default: https://proxy.ekkos.dev)')
261
+ .option('--model <model>', 'Expected primary OpenClaw model (default: ekkos-proxy/claude-sonnet-4-6)')
262
+ .option('--workspace <path>', 'Expected OpenClaw workspace path')
263
+ .action((options) => {
264
+ (0, claw_1.clawStatus)({
265
+ json: options.json,
266
+ proxyUrl: options.proxyUrl,
267
+ model: options.model,
268
+ workspace: options.workspace,
269
+ });
270
+ });
271
+ clawCmd
272
+ .command('upgrade')
273
+ .description('Apply foundation config upgrades for OpenClaw -> ekkOS proxy routing')
274
+ .option('--apply', 'Write changes to ~/.openclaw/openclaw.json (otherwise dry run)')
275
+ .option('--force', 'Reserved for future migration modes')
276
+ .option('-j, --json', 'Output machine-readable JSON')
277
+ .option('--proxy-url <url>', 'Target ekkOS proxy URL')
278
+ .option('--model <model>', 'Target primary OpenClaw model')
279
+ .option('--workspace <path>', 'Expected OpenClaw workspace path for status verification')
280
+ .action((options) => {
281
+ (0, claw_1.clawUpgrade)({
282
+ apply: options.apply,
283
+ force: options.force,
284
+ json: options.json,
285
+ proxyUrl: options.proxyUrl,
286
+ model: options.model,
287
+ workspace: options.workspace,
288
+ });
289
+ });
238
290
  // Test command
239
291
  commander_1.program
240
292
  .command('test')
241
293
  .description('Test connection to ekkOS memory')
242
294
  .action(test_1.test);
243
- // Run command - launches Claude with auto-continue wrapper
295
+ // Run command - launches Claude Code with ekkOS proxy
244
296
  commander_1.program
245
297
  .command('run')
246
- .description('Launch Claude Code with auto-continue (auto /clear + /continue when context is high)')
298
+ .description('Launch Claude Code with ekkOS memory proxy (IPC compression + pattern injection)')
247
299
  .option('-s, --session <name>', 'Session name to restore on clear')
248
300
  .option('-b, --bypass', 'Enable bypass permissions mode (dangerously skip all permission checks)')
249
301
  .option('-v, --verbose', 'Show debug output')
250
302
  .option('-d, --doctor', 'Run diagnostics before starting')
251
303
  .option('-r, --research', 'Auto-run research agent on startup (scans arXiv for new AI papers)')
252
304
  .option('--skip-inject', 'Monitor-only mode (detect context wall but print instructions instead of auto-inject)')
253
- .option('--skip-dna', 'Skip ccDNA injection (bypass Claude Code patching)')
254
305
  .option('--skip-proxy', 'Skip API proxy (use direct Anthropic API, disables seamless context eviction)')
255
306
  .option('--dashboard', 'Launch with live usage dashboard in an isolated 60/40 tmux split (requires tmux)')
256
307
  .option('--add-dir <dirs...>', 'Additional directories Claude Code can access (outside working directory)')
@@ -262,16 +313,29 @@ commander_1.program
262
313
  doctor: options.doctor,
263
314
  noInject: options.skipInject,
264
315
  research: options.research,
265
- noDna: options.skipDna,
266
316
  noProxy: options.skipProxy,
267
317
  dashboard: options.dashboard,
268
318
  addDirs: options.addDir,
269
319
  });
270
320
  });
321
+ // Gemini CLI — launch Gemini with ekkOS proxy
322
+ commander_1.program
323
+ .command('gemini')
324
+ .description('Launch Gemini CLI with ekkOS memory proxy (IPC compression + pattern injection)')
325
+ .option('-s, --session <name>', 'Session name')
326
+ .option('-v, --verbose', 'Show debug output')
327
+ .option('--skip-proxy', 'Skip API proxy (use direct Gemini API)')
328
+ .action((options) => {
329
+ (0, gemini_1.gemini)({
330
+ session: options.session,
331
+ verbose: options.verbose,
332
+ noProxy: options.skipProxy,
333
+ });
334
+ });
271
335
  // Test Claude — bare proxy test (no CLI wrapper)
272
336
  commander_1.program
273
337
  .command('test-claude')
274
- .description('Launch Claude Code with proxy only (no ccDNA, no PTY, no injections) for debugging')
338
+ .description('Launch Claude Code with proxy only (no PTY, no injections) for debugging')
275
339
  .option('--no-proxy', 'Skip proxy too (completely vanilla Claude)')
276
340
  .option('--no-hooks', 'Temporarily disable all hooks during test')
277
341
  .option('-v, --verbose', 'Show debug output')
@@ -384,10 +448,6 @@ commander_1.program
384
448
  key: options.key
385
449
  });
386
450
  });
387
- // ============================================================================
388
- // SYNK COMMANDS (Remote Session Sync)
389
- // ============================================================================
390
- (0, synk_1.registerSynkCommands)(commander_1.program);
391
451
  // Swarm command - manage Q-learning routing
392
452
  const swarmCmd = commander_1.program
393
453
  .command('swarm')
@@ -50,11 +50,12 @@ const os = __importStar(require("os"));
50
50
  const path = __importStar(require("path"));
51
51
  // ── Anthropic model pricing per 1M tokens ──────────────────────────────────
52
52
  const MODEL_PRICING = {
53
- 'claude-opus-4-6': { input: 15, output: 75, cacheWrite: 18.75, cacheRead: 1.50 },
54
- 'claude-opus-4-5-20250620': { input: 15, output: 75, cacheWrite: 18.75, cacheRead: 1.50 },
53
+ 'claude-opus-4-6': { input: 5, output: 25, cacheWrite: 6.25, cacheRead: 0.50 },
54
+ 'claude-opus-4-5-20250620': { input: 5, output: 25, cacheWrite: 6.25, cacheRead: 0.50 },
55
+ 'claude-sonnet-4-6': { input: 3, output: 15, cacheWrite: 3.75, cacheRead: 0.30 },
55
56
  'claude-sonnet-4-5-20250929': { input: 3, output: 15, cacheWrite: 3.75, cacheRead: 0.30 },
56
57
  'claude-sonnet-4-5-20250514': { input: 3, output: 15, cacheWrite: 3.75, cacheRead: 0.30 },
57
- 'claude-haiku-4-5-20251001': { input: 0.80, output: 4, cacheWrite: 1.00, cacheRead: 0.08 },
58
+ 'claude-haiku-4-5-20251001': { input: 1, output: 5, cacheWrite: 1.25, cacheRead: 0.10 },
58
59
  };
59
60
  function getModelPricing(modelId) {
60
61
  if (MODEL_PRICING[modelId])
@@ -1,10 +1,21 @@
1
1
  /**
2
2
  * Shared proxy URL builder for ekkOS proxy integration
3
- * Used by: commands/run.ts, commands/test-claude.ts, synk/daemon/run.ts
3
+ * Used by: commands/run.ts, commands/test-claude.ts, commands/gemini.ts
4
4
  */
5
5
  export declare const EKKOS_PROXY_URL: string;
6
6
  /**
7
7
  * Build a fully-qualified proxy URL with user/session binding params.
8
8
  * Format: https://proxy.ekkos.dev/proxy/{userId}/{sessionName}?project={base64(cwd)}&sid={sessionId}&tz={tz}
9
+ *
10
+ * Used by Claude (Anthropic SDK handles query params correctly).
9
11
  */
10
12
  export declare function buildProxyUrl(userId: string, sessionName: string, projectPath: string, sessionId: string): string;
13
+ /**
14
+ * Build a proxy URL without query params — metadata encoded in path segments.
15
+ * Format: https://proxy.ekkos.dev/gproxy/{userId}/{sessionName}/{sid}/{project64}
16
+ *
17
+ * Required for Gemini: @google/genai SDK concatenates baseUrl + path with string
18
+ * joining, so query params in the base URL get corrupted. This variant keeps the
19
+ * base URL clean so the SDK can append /v1beta1/... correctly.
20
+ */
21
+ export declare function buildGeminiProxyUrl(userId: string, sessionName: string, projectPath: string, sessionId: string): string;
@@ -1,19 +1,34 @@
1
1
  "use strict";
2
2
  /**
3
3
  * Shared proxy URL builder for ekkOS proxy integration
4
- * Used by: commands/run.ts, commands/test-claude.ts, synk/daemon/run.ts
4
+ * Used by: commands/run.ts, commands/test-claude.ts, commands/gemini.ts
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.EKKOS_PROXY_URL = void 0;
8
8
  exports.buildProxyUrl = buildProxyUrl;
9
+ exports.buildGeminiProxyUrl = buildGeminiProxyUrl;
9
10
  // eslint-disable-next-line no-restricted-syntax -- Config URL, not API key
10
11
  exports.EKKOS_PROXY_URL = process.env.EKKOS_PROXY_URL || 'https://proxy.ekkos.dev';
11
12
  /**
12
13
  * Build a fully-qualified proxy URL with user/session binding params.
13
14
  * Format: https://proxy.ekkos.dev/proxy/{userId}/{sessionName}?project={base64(cwd)}&sid={sessionId}&tz={tz}
15
+ *
16
+ * Used by Claude (Anthropic SDK handles query params correctly).
14
17
  */
15
18
  function buildProxyUrl(userId, sessionName, projectPath, sessionId) {
16
19
  const projectPathEncoded = Buffer.from(projectPath).toString('base64url');
17
20
  const userTz = Intl.DateTimeFormat().resolvedOptions().timeZone;
18
21
  return `${exports.EKKOS_PROXY_URL}/proxy/${encodeURIComponent(userId)}/${encodeURIComponent(sessionName)}?project=${projectPathEncoded}&sid=${encodeURIComponent(sessionId)}&tz=${encodeURIComponent(userTz)}`;
19
22
  }
23
+ /**
24
+ * Build a proxy URL without query params — metadata encoded in path segments.
25
+ * Format: https://proxy.ekkos.dev/gproxy/{userId}/{sessionName}/{sid}/{project64}
26
+ *
27
+ * Required for Gemini: @google/genai SDK concatenates baseUrl + path with string
28
+ * joining, so query params in the base URL get corrupted. This variant keeps the
29
+ * base URL clean so the SDK can append /v1beta1/... correctly.
30
+ */
31
+ function buildGeminiProxyUrl(userId, sessionName, projectPath, sessionId) {
32
+ const projectPathEncoded = Buffer.from(projectPath).toString('base64url');
33
+ return `${exports.EKKOS_PROXY_URL}/gproxy/${encodeURIComponent(userId)}/${encodeURIComponent(sessionName)}/${encodeURIComponent(sessionId)}/${projectPathEncoded}`;
34
+ }
@@ -21,7 +21,7 @@ function getTemplatePath(...paths) {
21
21
  * Check if templates exist
22
22
  */
23
23
  function templatesExist() {
24
- return (0, fs_1.existsSync)(TEMPLATES_DIR) && (0, fs_1.existsSync)(getTemplatePath('hooks'));
24
+ return (0, fs_1.existsSync)(TEMPLATES_DIR) && (0, fs_1.existsSync)(getTemplatePath('CLAUDE.md'));
25
25
  }
26
26
  /**
27
27
  * Read a template file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekkos/cli",
3
- "version": "1.3.2",
3
+ "version": "1.3.5",
4
4
  "description": "Setup ekkOS memory for AI coding assistants (Claude Code, Cursor, Windsurf)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "author": "ekkOS",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@ekkos/synk-wire": "workspace:*",
31
+ "@ekkos/prometheus": "workspace:*",
32
32
  "@supabase/supabase-js": "^2.39.8",
33
33
  "axios": "^1.7.0",
34
34
  "blessed": "^0.1.81",
@@ -56,9 +56,7 @@
56
56
  },
57
57
  "files": [
58
58
  "dist",
59
- "templates",
60
- "!templates/claude-plugins-admin",
61
- "!templates/hooks-node",
62
- "!templates/rules"
59
+ "templates/CLAUDE.md",
60
+ "templates/skills"
63
61
  ]
64
62
  }