@ekkos/cli 1.3.1 → 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.
- package/dist/capture/jsonl-rewriter.d.ts +1 -1
- package/dist/capture/jsonl-rewriter.js +3 -3
- package/dist/capture/transcript-repair.d.ts +2 -2
- package/dist/capture/transcript-repair.js +2 -2
- package/dist/commands/claw.d.ts +13 -0
- package/dist/commands/claw.js +253 -0
- package/dist/commands/dashboard.js +742 -118
- package/dist/commands/doctor.d.ts +3 -3
- package/dist/commands/doctor.js +6 -79
- package/dist/commands/gemini.d.ts +19 -0
- package/dist/commands/gemini.js +193 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +56 -41
- package/dist/commands/run.d.ts +0 -1
- package/dist/commands/run.js +288 -263
- package/dist/commands/scan.d.ts +21 -0
- package/dist/commands/scan.js +386 -0
- package/dist/commands/status.d.ts +4 -1
- package/dist/commands/status.js +165 -27
- package/dist/commands/swarm-dashboard.js +156 -28
- package/dist/commands/swarm.d.ts +1 -1
- package/dist/commands/swarm.js +1 -1
- package/dist/commands/test-claude.d.ts +2 -2
- package/dist/commands/test-claude.js +3 -3
- package/dist/deploy/index.d.ts +0 -2
- package/dist/deploy/index.js +0 -2
- package/dist/deploy/settings.d.ts +6 -5
- package/dist/deploy/settings.js +64 -16
- package/dist/deploy/skills.js +1 -2
- package/dist/index.js +86 -96
- package/dist/lib/usage-parser.d.ts +1 -1
- package/dist/lib/usage-parser.js +9 -6
- package/dist/local/index.d.ts +14 -0
- package/dist/local/index.js +28 -0
- package/dist/local/local-embeddings.d.ts +49 -0
- package/dist/local/local-embeddings.js +232 -0
- package/dist/local/offline-fallback.d.ts +44 -0
- package/dist/local/offline-fallback.js +159 -0
- package/dist/local/sqlite-store.d.ts +126 -0
- package/dist/local/sqlite-store.js +393 -0
- package/dist/local/sync-engine.d.ts +42 -0
- package/dist/local/sync-engine.js +223 -0
- package/dist/utils/platform.d.ts +5 -1
- package/dist/utils/platform.js +24 -4
- package/dist/utils/proxy-url.d.ts +21 -0
- package/dist/utils/proxy-url.js +34 -0
- package/dist/utils/state.d.ts +1 -1
- package/dist/utils/state.js +11 -3
- package/dist/utils/templates.js +1 -1
- package/package.json +11 -4
- package/templates/CLAUDE.md +49 -107
- package/dist/agent/daemon.d.ts +0 -130
- package/dist/agent/daemon.js +0 -606
- package/dist/agent/health-check.d.ts +0 -35
- package/dist/agent/health-check.js +0 -243
- package/dist/agent/pty-runner.d.ts +0 -53
- package/dist/agent/pty-runner.js +0 -190
- package/dist/commands/agent.d.ts +0 -50
- package/dist/commands/agent.js +0 -544
- package/dist/commands/setup-remote.d.ts +0 -20
- package/dist/commands/setup-remote.js +0 -582
- package/dist/utils/verify-remote-terminal.d.ts +0 -10
- package/dist/utils/verify-remote-terminal.js +0 -415
- package/templates/README.md +0 -378
- package/templates/claude-plugins/PHASE2_COMPLETION.md +0 -346
- package/templates/claude-plugins/PLUGIN_PROPOSALS.md +0 -1776
- package/templates/claude-plugins/README.md +0 -587
- package/templates/claude-plugins/agents/code-reviewer.json +0 -14
- package/templates/claude-plugins/agents/debug-detective.json +0 -15
- package/templates/claude-plugins/agents/git-companion.json +0 -14
- package/templates/claude-plugins/blog-manager/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/blog-manager/commands/blog.md +0 -691
- package/templates/claude-plugins/golden-loop-monitor/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/golden-loop-monitor/commands/loop-status.md +0 -434
- package/templates/claude-plugins/learning-tracker/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/learning-tracker/commands/my-patterns.md +0 -282
- package/templates/claude-plugins/memory-lens/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/memory-lens/commands/memory-search.md +0 -181
- package/templates/claude-plugins/pattern-coach/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/pattern-coach/commands/forge.md +0 -365
- package/templates/claude-plugins/project-schema-validator/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins/project-schema-validator/commands/validate-schema.md +0 -582
- package/templates/claude-plugins-admin/AGENT_TEAM_PROPOSALS.md +0 -819
- package/templates/claude-plugins-admin/README.md +0 -446
- package/templates/claude-plugins-admin/autonomous-admin-agent/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/autonomous-admin-agent/commands/agent.md +0 -595
- package/templates/claude-plugins-admin/backend-agent/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/backend-agent/commands/backend.md +0 -798
- package/templates/claude-plugins-admin/deploy-guardian/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/deploy-guardian/commands/deploy.md +0 -554
- package/templates/claude-plugins-admin/frontend-agent/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/frontend-agent/commands/frontend.md +0 -881
- package/templates/claude-plugins-admin/mcp-server-manager/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/mcp-server-manager/commands/mcp.md +0 -85
- package/templates/claude-plugins-admin/memory-system-monitor/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/memory-system-monitor/commands/memory-health.md +0 -569
- package/templates/claude-plugins-admin/qa-agent/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/qa-agent/commands/qa.md +0 -863
- package/templates/claude-plugins-admin/tech-lead-agent/.claude-plugin/plugin.json +0 -8
- package/templates/claude-plugins-admin/tech-lead-agent/commands/lead.md +0 -732
- package/templates/commands/continue.md +0 -47
- package/templates/cursor-rules/ekkos-memory.md +0 -127
- package/templates/ekkos-manifest.json +0 -223
- package/templates/helpers/json-parse.cjs +0 -101
- package/templates/hooks-node/lib/state.js +0 -187
- package/templates/hooks-node/stop.js +0 -416
- package/templates/hooks-node/user-prompt-submit.js +0 -337
- package/templates/plan-template.md +0 -306
- package/templates/rules/00-hooks-contract.mdc +0 -89
- package/templates/rules/30-ekkos-core.mdc +0 -188
- package/templates/rules/31-ekkos-messages.mdc +0 -78
- package/templates/shared/hooks-enabled.json +0 -22
- package/templates/shared/session-words.json +0 -45
- package/templates/skills/ekkOS_Deep_Recall/Skill.md +0 -282
- package/templates/skills/ekkOS_Learn/Skill.md +0 -265
- package/templates/skills/ekkOS_Memory_First/Skill.md +0 -206
- package/templates/skills/ekkOS_Plan_Assist/Skill.md +0 -302
- package/templates/skills/ekkOS_Preferences/Skill.md +0 -247
- package/templates/skills/ekkOS_Reflect/Skill.md +0 -257
- package/templates/skills/ekkOS_Safety/Skill.md +0 -265
- package/templates/skills/ekkOS_Schema/Skill.md +0 -251
- package/templates/skills/ekkOS_Summary/Skill.md +0 -257
- package/templates/spec-template.md +0 -159
- package/templates/windsurf-rules/ekkos-memory.md +0 -127
- package/templates/windsurf-skills/README.md +0 -58
- package/templates/windsurf-skills/ekkos-continue/SKILL.md +0 -81
- package/templates/windsurf-skills/ekkos-golden-loop/SKILL.md +0 -225
- package/templates/windsurf-skills/ekkos-insights/SKILL.md +0 -138
- package/templates/windsurf-skills/ekkos-recall/SKILL.md +0 -96
- package/templates/windsurf-skills/ekkos-safety/SKILL.md +0 -89
- 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
|
-
}
|