helix-assistant-cli 0.2.7 → 0.2.8
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/client/agent-client.d.ts +1 -0
- package/dist/client/agent-client.js +3 -0
- package/dist/commands/diagnostics.d.ts +4 -0
- package/dist/commands/diagnostics.js +47 -0
- package/dist/ui/autocomplete.js +3 -0
- package/dist/ui/repl.js +10 -0
- package/package.json +1 -1
- package/src/client/agent-client.ts +4 -0
- package/src/commands/diagnostics.ts +38 -0
- package/src/ui/autocomplete.ts +3 -0
- package/src/ui/repl.ts +13 -0
|
@@ -42,6 +42,7 @@ export declare class AgentClient extends EventEmitter {
|
|
|
42
42
|
getProviders(): Promise<ProviderSummary[]>;
|
|
43
43
|
getModels(requirements?: Record<string, unknown>): Promise<ModelSummary[]>;
|
|
44
44
|
getSettings(): Promise<HelixSettings>;
|
|
45
|
+
getCapabilities(): Promise<Record<string, unknown>>;
|
|
45
46
|
saveSettings(settings: Partial<HelixSettings>): Promise<HelixSettings>;
|
|
46
47
|
validateKey(provider: string, slot: number, key: string): Promise<string>;
|
|
47
48
|
getSkills(): Promise<SkillSummary[]>;
|
|
@@ -265,6 +265,9 @@ class AgentClient extends events_1.EventEmitter {
|
|
|
265
265
|
async getSettings() {
|
|
266
266
|
return this.request('GET_SETTINGS', {});
|
|
267
267
|
}
|
|
268
|
+
async getCapabilities() {
|
|
269
|
+
return this.request('GET_CAPABILITIES', {});
|
|
270
|
+
}
|
|
268
271
|
async saveSettings(settings) {
|
|
269
272
|
return this.request('SAVE_SETTINGS', { settings });
|
|
270
273
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentClient } from '../client/agent-client';
|
|
2
|
+
export declare function handleProviders(client: AgentClient): Promise<void>;
|
|
3
|
+
export declare function handleCapabilities(client: AgentClient): Promise<void>;
|
|
4
|
+
export declare function handleSettings(client: AgentClient): Promise<void>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleProviders = handleProviders;
|
|
4
|
+
exports.handleCapabilities = handleCapabilities;
|
|
5
|
+
exports.handleSettings = handleSettings;
|
|
6
|
+
const colors_1 = require("../ui/colors");
|
|
7
|
+
async function handleProviders(client) {
|
|
8
|
+
try {
|
|
9
|
+
const providers = await client.getProviders();
|
|
10
|
+
console.log(`\n${(0, colors_1.BOLD)('🧠 Proveedores configurados:')}\n`);
|
|
11
|
+
for (const provider of providers) {
|
|
12
|
+
const state = provider.configured ? (0, colors_1.GREEN)('configurado') : (0, colors_1.GRAY)('sin clave');
|
|
13
|
+
console.log(` ${(0, colors_1.CYAN)(provider.name || provider.id)} [${state}] ${(0, colors_1.DIM)(`${provider.models_available} modelos`)}`);
|
|
14
|
+
for (const key of provider.keys || []) {
|
|
15
|
+
console.log(` ${(0, colors_1.DIM)(`slot ${key.slot}:`)} ${key.configured ? (0, colors_1.GREEN)(key.health) : (0, colors_1.GRAY)('vacío')} ${key.masked || ''}`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
console.log('');
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
console.log((0, colors_1.RED)(` Error consultando proveedores: ${err.message}\n`));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async function handleCapabilities(client) {
|
|
25
|
+
try {
|
|
26
|
+
const caps = await client.getCapabilities();
|
|
27
|
+
console.log(`\n${(0, colors_1.BOLD)('⚙ Capacidades activas:')}\n`);
|
|
28
|
+
for (const [key, value] of Object.entries(caps)) {
|
|
29
|
+
const rendered = typeof value === 'boolean' ? (value ? (0, colors_1.GREEN)('activo') : (0, colors_1.YELLOW)('inactivo')) : (0, colors_1.CYAN)(String(value));
|
|
30
|
+
console.log(` ${(0, colors_1.DIM)(key.padEnd(24))} ${rendered}`);
|
|
31
|
+
}
|
|
32
|
+
console.log('');
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
console.log((0, colors_1.RED)(` Error consultando capacidades: ${err.message}\n`));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async function handleSettings(client) {
|
|
39
|
+
try {
|
|
40
|
+
const settings = await client.getSettings();
|
|
41
|
+
const safe = Object.fromEntries(Object.entries(settings).filter(([key]) => !/key|token|secret|password|auth/i.test(key)));
|
|
42
|
+
console.log(`\n${(0, colors_1.BOLD)('📋 Configuración efectiva (sin secretos):')}\n${JSON.stringify(safe, null, 2)}\n`);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
console.log((0, colors_1.RED)(` Error consultando configuración: ${err.message}\n`));
|
|
46
|
+
}
|
|
47
|
+
}
|
package/dist/ui/autocomplete.js
CHANGED
|
@@ -19,6 +19,9 @@ exports.SLASH_COMMANDS = [
|
|
|
19
19
|
{ command: '/tasks', description: 'Ver tareas activas y recientes del agente' },
|
|
20
20
|
{ command: '/models', description: 'Listar modelos disponibles de proveedores configurados' },
|
|
21
21
|
{ command: '/status', description: 'Mostrar resumen del estado del sistema' },
|
|
22
|
+
{ command: '/providers', description: 'Ver proveedores configurados y salud de sus claves' },
|
|
23
|
+
{ command: '/capabilities', description: 'Ver capacidades activas: sandbox, subagentes, voz y browser' },
|
|
24
|
+
{ command: '/settings', description: 'Ver configuración efectiva sin exponer secretos' },
|
|
22
25
|
{ command: '/clear', description: 'Limpiar pantalla y restaurar el banner de HELIX' },
|
|
23
26
|
{ command: '/stop', description: 'Parada de emergencia de todas las tareas activas' },
|
|
24
27
|
{ command: '/help', description: 'Mostrar ayuda de comandos y atajos' },
|
package/dist/ui/repl.js
CHANGED
|
@@ -17,6 +17,7 @@ const mcp_1 = require("../commands/mcp");
|
|
|
17
17
|
const mic_1 = require("../commands/mic");
|
|
18
18
|
const browser_1 = require("../commands/browser");
|
|
19
19
|
const markdown_1 = require("./markdown");
|
|
20
|
+
const diagnostics_1 = require("../commands/diagnostics");
|
|
20
21
|
class HelixRepl {
|
|
21
22
|
options;
|
|
22
23
|
rl = null;
|
|
@@ -351,6 +352,15 @@ class HelixRepl {
|
|
|
351
352
|
case '/status':
|
|
352
353
|
await this._handleStatus();
|
|
353
354
|
break;
|
|
355
|
+
case '/providers':
|
|
356
|
+
await (0, diagnostics_1.handleProviders)(this.client);
|
|
357
|
+
break;
|
|
358
|
+
case '/capabilities':
|
|
359
|
+
await (0, diagnostics_1.handleCapabilities)(this.client);
|
|
360
|
+
break;
|
|
361
|
+
case '/settings':
|
|
362
|
+
await (0, diagnostics_1.handleSettings)(this.client);
|
|
363
|
+
break;
|
|
354
364
|
case '/stop':
|
|
355
365
|
console.log((0, colors_1.RED_BOLD)('\n[PARADA DE EMERGENCIA]: Cancelando todas las tareas activas...'));
|
|
356
366
|
this.client.emergencyStop();
|
package/package.json
CHANGED
|
@@ -319,6 +319,10 @@ export class AgentClient extends EventEmitter {
|
|
|
319
319
|
return this.request<HelixSettings>('GET_SETTINGS', {});
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
+
public async getCapabilities(): Promise<Record<string, unknown>> {
|
|
323
|
+
return this.request<Record<string, unknown>>('GET_CAPABILITIES', {});
|
|
324
|
+
}
|
|
325
|
+
|
|
322
326
|
public async saveSettings(settings: Partial<HelixSettings>): Promise<HelixSettings> {
|
|
323
327
|
return this.request<HelixSettings>('SAVE_SETTINGS', { settings });
|
|
324
328
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import type { AgentClient } from '../client/agent-client';
|
|
3
|
+
import { BOLD, CYAN, DIM, GREEN, GRAY, RED, YELLOW } from '../ui/colors';
|
|
4
|
+
|
|
5
|
+
export async function handleProviders(client: AgentClient): Promise<void> {
|
|
6
|
+
try {
|
|
7
|
+
const providers = await client.getProviders();
|
|
8
|
+
console.log(`\n${BOLD('🧠 Proveedores configurados:')}\n`);
|
|
9
|
+
for (const provider of providers) {
|
|
10
|
+
const state = provider.configured ? GREEN('configurado') : GRAY('sin clave');
|
|
11
|
+
console.log(` ${CYAN(provider.name || provider.id)} [${state}] ${DIM(`${provider.models_available} modelos`)}`);
|
|
12
|
+
for (const key of provider.keys || []) {
|
|
13
|
+
console.log(` ${DIM(`slot ${key.slot}:`)} ${key.configured ? GREEN(key.health) : GRAY('vacío')} ${key.masked || ''}`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
console.log('');
|
|
17
|
+
} catch (err) { console.log(RED(` Error consultando proveedores: ${(err as Error).message}\n`)); }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export async function handleCapabilities(client: AgentClient): Promise<void> {
|
|
21
|
+
try {
|
|
22
|
+
const caps = await client.getCapabilities();
|
|
23
|
+
console.log(`\n${BOLD('⚙ Capacidades activas:')}\n`);
|
|
24
|
+
for (const [key, value] of Object.entries(caps)) {
|
|
25
|
+
const rendered = typeof value === 'boolean' ? (value ? GREEN('activo') : YELLOW('inactivo')) : CYAN(String(value));
|
|
26
|
+
console.log(` ${DIM(key.padEnd(24))} ${rendered}`);
|
|
27
|
+
}
|
|
28
|
+
console.log('');
|
|
29
|
+
} catch (err) { console.log(RED(` Error consultando capacidades: ${(err as Error).message}\n`)); }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export async function handleSettings(client: AgentClient): Promise<void> {
|
|
33
|
+
try {
|
|
34
|
+
const settings = await client.getSettings();
|
|
35
|
+
const safe = Object.fromEntries(Object.entries(settings).filter(([key]) => !/key|token|secret|password|auth/i.test(key)));
|
|
36
|
+
console.log(`\n${BOLD('📋 Configuración efectiva (sin secretos):')}\n${JSON.stringify(safe, null, 2)}\n`);
|
|
37
|
+
} catch (err) { console.log(RED(` Error consultando configuración: ${(err as Error).message}\n`)); }
|
|
38
|
+
}
|
package/src/ui/autocomplete.ts
CHANGED
|
@@ -21,6 +21,9 @@ export const SLASH_COMMANDS: CommandDefinition[] = [
|
|
|
21
21
|
{ command: '/tasks', description: 'Ver tareas activas y recientes del agente' },
|
|
22
22
|
{ command: '/models', description: 'Listar modelos disponibles de proveedores configurados' },
|
|
23
23
|
{ command: '/status', description: 'Mostrar resumen del estado del sistema' },
|
|
24
|
+
{ command: '/providers', description: 'Ver proveedores configurados y salud de sus claves' },
|
|
25
|
+
{ command: '/capabilities', description: 'Ver capacidades activas: sandbox, subagentes, voz y browser' },
|
|
26
|
+
{ command: '/settings', description: 'Ver configuración efectiva sin exponer secretos' },
|
|
24
27
|
{ command: '/clear', description: 'Limpiar pantalla y restaurar el banner de HELIX' },
|
|
25
28
|
{ command: '/stop', description: 'Parada de emergencia de todas las tareas activas' },
|
|
26
29
|
{ command: '/help', description: 'Mostrar ayuda de comandos y atajos' },
|
package/src/ui/repl.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { handleMicrophoneCommand } from '../commands/mic';
|
|
|
26
26
|
import { handleBrowserCommand } from '../commands/browser';
|
|
27
27
|
import type { ConfirmationRequest } from '../client/types';
|
|
28
28
|
import { formatTerminalMarkdown } from './markdown';
|
|
29
|
+
import { handleCapabilities, handleProviders, handleSettings } from '../commands/diagnostics';
|
|
29
30
|
|
|
30
31
|
export interface ReplOptions {
|
|
31
32
|
wsUrl: string;
|
|
@@ -397,6 +398,18 @@ export class HelixRepl {
|
|
|
397
398
|
await this._handleStatus();
|
|
398
399
|
break;
|
|
399
400
|
|
|
401
|
+
case '/providers':
|
|
402
|
+
await handleProviders(this.client);
|
|
403
|
+
break;
|
|
404
|
+
|
|
405
|
+
case '/capabilities':
|
|
406
|
+
await handleCapabilities(this.client);
|
|
407
|
+
break;
|
|
408
|
+
|
|
409
|
+
case '/settings':
|
|
410
|
+
await handleSettings(this.client);
|
|
411
|
+
break;
|
|
412
|
+
|
|
400
413
|
case '/stop':
|
|
401
414
|
console.log(RED_BOLD('\n[PARADA DE EMERGENCIA]: Cancelando todas las tareas activas...'));
|
|
402
415
|
this.client.emergencyStop();
|