@johpaz/hive 1.1.4 → 1.1.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/package.json +5 -5
- package/packages/cli/dist/commands/agent-run.d.ts +1 -0
- package/packages/cli/dist/commands/agent-run.js +178 -0
- package/packages/cli/dist/commands/agents.d.ts +1 -0
- package/packages/cli/dist/commands/agents.js +372 -0
- package/packages/cli/dist/commands/chat.d.ts +1 -0
- package/packages/cli/dist/commands/chat.js +152 -0
- package/packages/cli/dist/commands/config.d.ts +1 -0
- package/packages/cli/dist/commands/config.js +49 -0
- package/packages/cli/dist/commands/cron.d.ts +1 -0
- package/packages/cli/dist/commands/cron.js +166 -0
- package/packages/cli/dist/commands/dev.d.ts +1 -0
- package/packages/cli/dist/commands/dev.js +120 -0
- package/packages/cli/dist/commands/doctor.d.ts +1 -0
- package/packages/cli/dist/commands/doctor.js +161 -0
- package/packages/cli/dist/commands/gateway.d.ts +4 -0
- package/packages/cli/dist/commands/gateway.js +444 -0
- package/packages/cli/dist/commands/logs.d.ts +1 -0
- package/packages/cli/dist/commands/logs.js +87 -0
- package/packages/cli/dist/commands/mcp.d.ts +1 -0
- package/packages/cli/dist/commands/mcp.js +175 -0
- package/packages/cli/dist/commands/message.d.ts +1 -0
- package/packages/cli/dist/commands/message.js +65 -0
- package/packages/cli/dist/commands/onboard.d.ts +1 -0
- package/packages/cli/dist/commands/onboard.js +1715 -0
- package/packages/cli/dist/commands/security.d.ts +1 -0
- package/packages/cli/dist/commands/security.js +155 -0
- package/packages/cli/dist/commands/service.d.ts +1 -0
- package/packages/cli/dist/commands/service.js +77 -0
- package/packages/cli/dist/commands/sessions.d.ts +1 -0
- package/packages/cli/dist/commands/sessions.js +132 -0
- package/packages/cli/dist/commands/skills.d.ts +1 -0
- package/packages/cli/dist/commands/skills.js +190 -0
- package/packages/cli/dist/commands/update.d.ts +1 -0
- package/packages/cli/dist/commands/update.js +27 -0
- package/packages/cli/dist/hive-binary +0 -0
- package/packages/cli/dist/index.d.ts +2 -0
- package/packages/cli/dist/index.js +184 -0
- package/packages/cli/dist/utils/token.d.ts +1 -0
- package/packages/cli/dist/utils/token.js +8 -0
- package/packages/cli/package.json +3 -1
- package/packages/core/package.json +9 -1
- package/packages/core/src/config/loader.d.ts +298 -0
- package/packages/core/src/config/loader.js +513 -0
- package/packages/core/src/storage/schema.d.ts +3 -0
- package/packages/core/src/storage/schema.js +541 -0
- package/packages/core/src/storage/sqlite.d.ts +51 -0
- package/packages/core/src/storage/sqlite.js +350 -0
- package/packages/core/src/utils/logger.d.ts +84 -0
- package/packages/core/src/utils/logger.js +352 -0
- package/packages/cli/src/commands/agent-run.ts +0 -168
- package/packages/cli/src/commands/agents.ts +0 -398
- package/packages/cli/src/commands/chat.ts +0 -142
- package/packages/cli/src/commands/config.ts +0 -50
- package/packages/cli/src/commands/cron.ts +0 -161
- package/packages/cli/src/commands/dev.ts +0 -95
- package/packages/cli/src/commands/doctor.ts +0 -133
- package/packages/cli/src/commands/gateway.ts +0 -443
- package/packages/cli/src/commands/logs.ts +0 -57
- package/packages/cli/src/commands/mcp.ts +0 -175
- package/packages/cli/src/commands/message.ts +0 -77
- package/packages/cli/src/commands/onboard.ts +0 -1868
- package/packages/cli/src/commands/security.ts +0 -144
- package/packages/cli/src/commands/service.ts +0 -50
- package/packages/cli/src/commands/sessions.ts +0 -116
- package/packages/cli/src/commands/skills.ts +0 -187
- package/packages/cli/src/commands/update.ts +0 -25
- package/packages/cli/src/index.ts +0 -185
- package/packages/cli/src/utils/token.ts +0 -6
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { onboard } from "./commands/onboard";
|
|
2
|
-
import { start, stop, status, reload } from "./commands/gateway";
|
|
3
|
-
import { dev } from "./commands/dev";
|
|
4
|
-
import { agents } from "./commands/agents";
|
|
5
|
-
import { mcp } from "./commands/mcp";
|
|
6
|
-
import { skills } from "./commands/skills";
|
|
7
|
-
import { config } from "./commands/config";
|
|
8
|
-
import { logs } from "./commands/logs";
|
|
9
|
-
import { chat } from "./commands/chat";
|
|
10
|
-
import { sessions } from "./commands/sessions";
|
|
11
|
-
import { cron } from "./commands/cron";
|
|
12
|
-
import { doctor } from "./commands/doctor";
|
|
13
|
-
import { securityAudit } from "./commands/security";
|
|
14
|
-
import { installService } from "./commands/service";
|
|
15
|
-
import { update } from "./commands/update";
|
|
16
|
-
import { message } from "./commands/message";
|
|
17
|
-
import { agent } from "./commands/agent-run";
|
|
18
|
-
|
|
19
|
-
const VERSION = "1.1.0";
|
|
20
|
-
|
|
21
|
-
const HELP = `
|
|
22
|
-
🐝 Hive — Personal Swarm AI Gateway v${VERSION}
|
|
23
|
-
|
|
24
|
-
Usage: hive <command> [subcommand] [options]
|
|
25
|
-
|
|
26
|
-
Commands:
|
|
27
|
-
onboard Wizard de configuración inicial
|
|
28
|
-
dev Modo desarrollo (onboard + start)
|
|
29
|
-
start [--daemon] Arrancar el Gateway
|
|
30
|
-
stop Detener el Gateway
|
|
31
|
-
reload Recargar config sin reiniciar
|
|
32
|
-
status Estado del Gateway y agentes
|
|
33
|
-
chat [--agent <id>] Chat directo en terminal
|
|
34
|
-
logs [--follow] [--level] Ver logs del Gateway
|
|
35
|
-
|
|
36
|
-
message send --to <id> --content <text>
|
|
37
|
-
Enviar mensaje por canal
|
|
38
|
-
agent run --message <text> Ejecutar agente con mensaje
|
|
39
|
-
|
|
40
|
-
agents add <id> Crear nuevo agente
|
|
41
|
-
agents list [--bindings] Listar agentes
|
|
42
|
-
agents remove <id> Eliminar agente
|
|
43
|
-
|
|
44
|
-
mcp list Listar servidores MCP
|
|
45
|
-
mcp add Añadir servidor MCP
|
|
46
|
-
mcp test <nombre> Verificar servidor MCP
|
|
47
|
-
mcp tools <nombre> Listar tools de un servidor
|
|
48
|
-
mcp remove <nombre> Eliminar servidor MCP
|
|
49
|
-
|
|
50
|
-
skills list Listar skills instaladas
|
|
51
|
-
skills search <query> Buscar skills
|
|
52
|
-
skills install <slug> Instalar skill
|
|
53
|
-
skills remove <nombre> Eliminar skill
|
|
54
|
-
skills update Actualizar skills
|
|
55
|
-
|
|
56
|
-
config get <key> Leer valor de config
|
|
57
|
-
config set <key> <value> Escribir valor de config
|
|
58
|
-
config show Mostrar config completa
|
|
59
|
-
|
|
60
|
-
sessions list Listar sesiones
|
|
61
|
-
sessions view <id> Ver transcripción
|
|
62
|
-
sessions prune Eliminar sesiones inactivas
|
|
63
|
-
|
|
64
|
-
cron list Listar cron jobs
|
|
65
|
-
cron add Añadir cron job
|
|
66
|
-
cron remove <id> Eliminar cron job
|
|
67
|
-
cron logs Ver logs de cron
|
|
68
|
-
|
|
69
|
-
doctor Diagnóstico y auto-reparación
|
|
70
|
-
security audit Auditoría de seguridad
|
|
71
|
-
install-service Instalar servicio systemd
|
|
72
|
-
update Actualizar Hive
|
|
73
|
-
|
|
74
|
-
Options:
|
|
75
|
-
--help, -h Mostrar ayuda
|
|
76
|
-
--version, -v Mostrar versión
|
|
77
|
-
|
|
78
|
-
Examples:
|
|
79
|
-
hive onboard Configurar Hive por primera vez
|
|
80
|
-
hive start Arrancar el Gateway
|
|
81
|
-
hive chat Chatear con el agente en terminal
|
|
82
|
-
hive message send --to 123 --content "Hola"
|
|
83
|
-
hive agent run --message "Analiza README.md" --wait
|
|
84
|
-
hive agents add work Crear agente "work"
|
|
85
|
-
hive mcp add Añadir servidor MCP
|
|
86
|
-
hive doctor Diagnosticar problemas
|
|
87
|
-
|
|
88
|
-
Documentation:
|
|
89
|
-
English: https://github.com/johpaz/hive/docs
|
|
90
|
-
Español: https://github.com/johpaz/hive/docs/es
|
|
91
|
-
`;
|
|
92
|
-
|
|
93
|
-
async function main(): Promise<void> {
|
|
94
|
-
const args = process.argv.slice(2);
|
|
95
|
-
const command = args[0];
|
|
96
|
-
const subcommand = args[1];
|
|
97
|
-
const flags = args.filter((a) => a.startsWith("--"));
|
|
98
|
-
|
|
99
|
-
switch (command) {
|
|
100
|
-
case "onboard":
|
|
101
|
-
await onboard();
|
|
102
|
-
break;
|
|
103
|
-
case "dev":
|
|
104
|
-
await dev();
|
|
105
|
-
break;
|
|
106
|
-
case "start":
|
|
107
|
-
await start(flags);
|
|
108
|
-
break;
|
|
109
|
-
case "stop":
|
|
110
|
-
await stop();
|
|
111
|
-
break;
|
|
112
|
-
case "reload":
|
|
113
|
-
await reload();
|
|
114
|
-
break;
|
|
115
|
-
case "status":
|
|
116
|
-
await status(flags);
|
|
117
|
-
break;
|
|
118
|
-
case "chat":
|
|
119
|
-
await chat(flags);
|
|
120
|
-
break;
|
|
121
|
-
case "logs":
|
|
122
|
-
await logs(flags);
|
|
123
|
-
break;
|
|
124
|
-
case "message":
|
|
125
|
-
await message(subcommand, args.slice(2));
|
|
126
|
-
break;
|
|
127
|
-
case "agent":
|
|
128
|
-
await agent(subcommand, args.slice(2));
|
|
129
|
-
break;
|
|
130
|
-
case "agents":
|
|
131
|
-
await agents(subcommand, args.slice(2));
|
|
132
|
-
break;
|
|
133
|
-
case "mcp":
|
|
134
|
-
await mcp(subcommand, args.slice(2));
|
|
135
|
-
break;
|
|
136
|
-
case "skills":
|
|
137
|
-
await skills(subcommand, args.slice(2));
|
|
138
|
-
break;
|
|
139
|
-
case "config":
|
|
140
|
-
await config(subcommand, args.slice(2));
|
|
141
|
-
break;
|
|
142
|
-
case "sessions":
|
|
143
|
-
await sessions(subcommand, args.slice(2));
|
|
144
|
-
break;
|
|
145
|
-
case "cron":
|
|
146
|
-
await cron(subcommand, args.slice(2));
|
|
147
|
-
break;
|
|
148
|
-
case "doctor":
|
|
149
|
-
await doctor();
|
|
150
|
-
break;
|
|
151
|
-
case "security":
|
|
152
|
-
if (subcommand === "audit") {
|
|
153
|
-
await securityAudit();
|
|
154
|
-
} else {
|
|
155
|
-
console.log("Usage: hive security audit");
|
|
156
|
-
}
|
|
157
|
-
break;
|
|
158
|
-
case "install-service":
|
|
159
|
-
await installService();
|
|
160
|
-
break;
|
|
161
|
-
case "update":
|
|
162
|
-
await update();
|
|
163
|
-
break;
|
|
164
|
-
case "--version":
|
|
165
|
-
case "-v":
|
|
166
|
-
case "version":
|
|
167
|
-
console.log(`Hive v${VERSION}`);
|
|
168
|
-
break;
|
|
169
|
-
case "--help":
|
|
170
|
-
case "-h":
|
|
171
|
-
case "help":
|
|
172
|
-
case undefined:
|
|
173
|
-
console.log(HELP);
|
|
174
|
-
break;
|
|
175
|
-
default:
|
|
176
|
-
console.error(`❌ Comando desconocido: "${command}"\n`);
|
|
177
|
-
console.log(HELP);
|
|
178
|
-
process.exit(1);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
main().catch((error) => {
|
|
183
|
-
console.error("Fatal error:", error.message);
|
|
184
|
-
process.exit(1);
|
|
185
|
-
});
|