@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
@@ -1,415 +0,0 @@
1
- "use strict";
2
- /**
3
- * Remote Terminal Verification Script
4
- *
5
- * Systematically verifies that all remote terminal components are properly configured
6
- * and working correctly. Run this after setup-remote to validate the installation.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || (function () {
25
- var ownKeys = function(o) {
26
- ownKeys = Object.getOwnPropertyNames || function (o) {
27
- var ar = [];
28
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
- return ar;
30
- };
31
- return ownKeys(o);
32
- };
33
- return function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- })();
41
- var __importDefault = (this && this.__importDefault) || function (mod) {
42
- return (mod && mod.__esModule) ? mod : { "default": mod };
43
- };
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.verifyRemoteTerminal = verifyRemoteTerminal;
46
- const fs = __importStar(require("fs"));
47
- const path = __importStar(require("path"));
48
- const os = __importStar(require("os"));
49
- const child_process_1 = require("child_process");
50
- const chalk_1 = __importDefault(require("chalk"));
51
- const EKKOS_DIR = path.join(os.homedir(), '.ekkos');
52
- const results = [];
53
- /**
54
- * Test 1: Device configuration file exists
55
- */
56
- function testDeviceConfig() {
57
- const devicePath = path.join(EKKOS_DIR, 'device.json');
58
- if (fs.existsSync(devicePath)) {
59
- try {
60
- const data = JSON.parse(fs.readFileSync(devicePath, 'utf-8'));
61
- if (data.deviceId && data.deviceToken && data.deviceName) {
62
- results.push({
63
- name: 'Device Configuration',
64
- status: 'pass',
65
- message: 'Device config found and valid',
66
- details: `Device: ${data.deviceName} (${data.deviceId.slice(0, 8)}...)`,
67
- });
68
- }
69
- else {
70
- results.push({
71
- name: 'Device Configuration',
72
- status: 'fail',
73
- message: 'Device config exists but is incomplete',
74
- });
75
- }
76
- }
77
- catch (err) {
78
- results.push({
79
- name: 'Device Configuration',
80
- status: 'fail',
81
- message: 'Device config is invalid JSON',
82
- });
83
- }
84
- }
85
- else {
86
- results.push({
87
- name: 'Device Configuration',
88
- status: 'fail',
89
- message: 'Device not configured - run ekkos setup-remote',
90
- });
91
- }
92
- }
93
- /**
94
- * Test 2: Service is installed
95
- */
96
- function testServiceInstalled() {
97
- const platform = os.platform();
98
- try {
99
- if (platform === 'darwin') {
100
- // macOS: check launchctl
101
- const output = (0, child_process_1.execSync)('launchctl list | grep dev.ekkos.agent || true', {
102
- encoding: 'utf-8',
103
- });
104
- if (output.includes('dev.ekkos.agent')) {
105
- results.push({
106
- name: 'Service Installation',
107
- status: 'pass',
108
- message: 'Service is installed on macOS',
109
- });
110
- }
111
- else {
112
- results.push({
113
- name: 'Service Installation',
114
- status: 'fail',
115
- message: 'Service not found - run ekkos agent start',
116
- });
117
- }
118
- }
119
- else if (platform === 'win32') {
120
- // Windows: check scheduled task
121
- const output = (0, child_process_1.execSync)('schtasks /query /tn "ekkOS Agent" 2>nul || echo NOT_FOUND', {
122
- encoding: 'utf-8',
123
- stdio: ['pipe', 'pipe', 'pipe'],
124
- });
125
- if (!output.includes('NOT_FOUND')) {
126
- results.push({
127
- name: 'Service Installation',
128
- status: 'pass',
129
- message: 'Service is installed on Windows',
130
- });
131
- }
132
- else {
133
- results.push({
134
- name: 'Service Installation',
135
- status: 'fail',
136
- message: 'Service not found - run ekkos agent start',
137
- });
138
- }
139
- }
140
- else if (platform === 'linux') {
141
- // Linux: check systemd
142
- const output = (0, child_process_1.execSync)('systemctl --user is-active ekkos-agent 2>/dev/null || echo INACTIVE', {
143
- encoding: 'utf-8',
144
- });
145
- if (output.includes('active')) {
146
- results.push({
147
- name: 'Service Installation',
148
- status: 'pass',
149
- message: 'Service is installed on Linux',
150
- });
151
- }
152
- else {
153
- results.push({
154
- name: 'Service Installation',
155
- status: 'fail',
156
- message: 'Service not active - run ekkos agent start',
157
- });
158
- }
159
- }
160
- }
161
- catch (err) {
162
- results.push({
163
- name: 'Service Installation',
164
- status: 'fail',
165
- message: 'Failed to check service status',
166
- details: String(err).slice(0, 100),
167
- });
168
- }
169
- }
170
- /**
171
- * Test 3: Service is running
172
- */
173
- function testServiceRunning() {
174
- const pidPath = path.join(EKKOS_DIR, 'agent.pid');
175
- if (!fs.existsSync(pidPath)) {
176
- results.push({
177
- name: 'Service Running',
178
- status: 'fail',
179
- message: 'No PID file - service may not have started',
180
- });
181
- return;
182
- }
183
- try {
184
- const pid = parseInt(fs.readFileSync(pidPath, 'utf-8').trim());
185
- (0, child_process_1.execSync)(`kill -0 ${pid} 2>/dev/null`);
186
- results.push({
187
- name: 'Service Running',
188
- status: 'pass',
189
- message: `Process running (PID ${pid})`,
190
- });
191
- }
192
- catch {
193
- results.push({
194
- name: 'Service Running',
195
- status: 'fail',
196
- message: 'PID file exists but process is not running - restart with ekkos agent restart',
197
- });
198
- }
199
- }
200
- /**
201
- * Test 4: Logs are being written
202
- */
203
- function testLogsWriting() {
204
- const logPath = path.join(EKKOS_DIR, 'agent.log');
205
- if (!fs.existsSync(logPath)) {
206
- results.push({
207
- name: 'Log Output',
208
- status: 'warn',
209
- message: 'No logs yet - service may not have started or run long enough',
210
- });
211
- return;
212
- }
213
- try {
214
- const stats = fs.statSync(logPath);
215
- const lastModified = Date.now() - stats.mtime.getTime();
216
- const fiveMinutes = 5 * 60 * 1000;
217
- if (lastModified < fiveMinutes) {
218
- results.push({
219
- name: 'Log Output',
220
- status: 'pass',
221
- message: `Logs updating (last write ${Math.round(lastModified / 1000)}s ago)`,
222
- });
223
- }
224
- else {
225
- results.push({
226
- name: 'Log Output',
227
- status: 'warn',
228
- message: `No logs written for ${Math.round(lastModified / 1000 / 60)}m - check for errors`,
229
- });
230
- }
231
- }
232
- catch (err) {
233
- results.push({
234
- name: 'Log Output',
235
- status: 'fail',
236
- message: 'Failed to read log file',
237
- });
238
- }
239
- }
240
- /**
241
- * Test 5: Network connectivity to relay
242
- */
243
- async function testNetworkConnectivity() {
244
- try {
245
- const RELAY_URL = 'wss://ekkos-relay-production.up.railway.app';
246
- const controller = new AbortController();
247
- const timeout = setTimeout(() => controller.abort(), 5000);
248
- const response = await fetch(`${RELAY_URL}/api/v1/health`, {
249
- signal: controller.signal,
250
- });
251
- clearTimeout(timeout);
252
- if (response.ok) {
253
- results.push({
254
- name: 'Network Connectivity',
255
- status: 'pass',
256
- message: 'Relay server is reachable',
257
- });
258
- }
259
- else {
260
- results.push({
261
- name: 'Network Connectivity',
262
- status: 'warn',
263
- message: `Relay server returned ${response.status}`,
264
- });
265
- }
266
- }
267
- catch (err) {
268
- if (err.name === 'AbortError') {
269
- results.push({
270
- name: 'Network Connectivity',
271
- status: 'fail',
272
- message: 'Timeout connecting to relay (>5s) - check internet connection',
273
- });
274
- }
275
- else {
276
- results.push({
277
- name: 'Network Connectivity',
278
- status: 'fail',
279
- message: `Cannot reach relay server: ${err.message}`,
280
- });
281
- }
282
- }
283
- }
284
- /**
285
- * Test 6: WebSocket connection from daemon
286
- */
287
- function testDaemonConnection() {
288
- const logPath = path.join(EKKOS_DIR, 'agent.log');
289
- if (!fs.existsSync(logPath)) {
290
- results.push({
291
- name: 'Daemon WebSocket',
292
- status: 'warn',
293
- message: 'Cannot check - no logs yet',
294
- });
295
- return;
296
- }
297
- try {
298
- const content = fs.readFileSync(logPath, 'utf-8');
299
- const lines = content.split('\n');
300
- const lastLines = lines.slice(-50);
301
- const hasConnected = lastLines.some(l => l.includes('Connected to relay server'));
302
- const hasRegistered = lastLines.some(l => l.includes('Registered with relay'));
303
- const hasError = lastLines.some(l => l.includes('WebSocket error'));
304
- const hasDisconnected = lastLines.some(l => l.includes('Disconnected'));
305
- if (hasConnected && hasRegistered && !hasError) {
306
- results.push({
307
- name: 'Daemon WebSocket',
308
- status: 'pass',
309
- message: 'Daemon connected and registered with relay',
310
- });
311
- }
312
- else if (hasDisconnected && !hasConnected) {
313
- results.push({
314
- name: 'Daemon WebSocket',
315
- status: 'warn',
316
- message: 'Daemon disconnected - reconnecting, check again in 30s',
317
- });
318
- }
319
- else if (hasError) {
320
- results.push({
321
- name: 'Daemon WebSocket',
322
- status: 'fail',
323
- message: 'Daemon has WebSocket errors - check network and firewall',
324
- details: lastLines
325
- .filter(l => l.includes('error'))
326
- .slice(-1)[0],
327
- });
328
- }
329
- else {
330
- results.push({
331
- name: 'Daemon WebSocket',
332
- status: 'warn',
333
- message: 'Unknown connection state - run ekkos agent logs -f to monitor',
334
- });
335
- }
336
- }
337
- catch (err) {
338
- results.push({
339
- name: 'Daemon WebSocket',
340
- status: 'fail',
341
- message: 'Failed to read logs',
342
- });
343
- }
344
- }
345
- /**
346
- * Print verification results
347
- */
348
- function printResults() {
349
- console.log('');
350
- console.log(chalk_1.default.cyan.bold(' Remote Terminal Verification'));
351
- console.log('');
352
- let passed = 0;
353
- let warned = 0;
354
- let failed = 0;
355
- for (const result of results) {
356
- let icon = '';
357
- let color = chalk_1.default.gray;
358
- if (result.status === 'pass') {
359
- icon = chalk_1.default.green('✓');
360
- color = chalk_1.default.green;
361
- passed++;
362
- }
363
- else if (result.status === 'warn') {
364
- icon = chalk_1.default.yellow('⚠');
365
- color = chalk_1.default.yellow;
366
- warned++;
367
- }
368
- else {
369
- icon = chalk_1.default.red('✗');
370
- color = chalk_1.default.red;
371
- failed++;
372
- }
373
- console.log(` ${icon} ${color(result.name)}`);
374
- console.log(` ${result.message}`);
375
- if (result.details) {
376
- console.log(` ${chalk_1.default.gray(result.details.slice(0, 80))}`);
377
- }
378
- }
379
- console.log('');
380
- console.log(chalk_1.default.gray(` Results: ${chalk_1.default.green(`${passed} pass`)}, ${chalk_1.default.yellow(`${warned} warn`)}, ${chalk_1.default.red(`${failed} fail`)}`));
381
- console.log('');
382
- // Overall status
383
- if (failed === 0) {
384
- if (warned === 0) {
385
- console.log(chalk_1.default.green(' ✓ All checks passed!'));
386
- }
387
- else {
388
- console.log(chalk_1.default.yellow(' ⚠ Most checks passed, but review warnings above.'));
389
- }
390
- }
391
- else {
392
- console.log(chalk_1.default.red(' ✗ Some checks failed. See above for fixes.'));
393
- }
394
- console.log('');
395
- // Next steps
396
- if (failed > 0) {
397
- console.log(chalk_1.default.cyan(' Next steps:'));
398
- console.log(' 1. Review failed checks above');
399
- console.log(' 2. Run suggested commands');
400
- console.log(' 3. Wait 30s and run this verification again');
401
- console.log('');
402
- }
403
- }
404
- /**
405
- * Run all verification tests
406
- */
407
- async function verifyRemoteTerminal() {
408
- testDeviceConfig();
409
- testServiceInstalled();
410
- testServiceRunning();
411
- testLogsWriting();
412
- await testNetworkConnectivity();
413
- testDaemonConnection();
414
- printResults();
415
- }