@johpaz/hive 1.7.3 → 1.7.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/README.md +316 -56
- package/dist/hive.js +42 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,13 +17,47 @@ Hive es un Gateway de IA Orquestado — un Enjambre de Agentes Especializados qu
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
+
## Por dentro
|
|
21
|
+
|
|
22
|
+
51.937 líneas de TypeScript. Sin frameworks de agentes. Sin LangChain. Sin abstracciones intermedias. Todo construido desde cero sobre Bun + SQLite.
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Language files blank comment code
|
|
26
|
+
─────────────────────────────────────────────────────
|
|
27
|
+
TypeScript 434 7671 2683 51937 ← motor, gateway, canales, UI
|
|
28
|
+
Markdown 45 2225 0 8233
|
|
29
|
+
JSON 15 5 0 575
|
|
30
|
+
CSS 1 141 29 450
|
|
31
|
+
YAML 2 35 11 197
|
|
32
|
+
Shell 2 14 5 61
|
|
33
|
+
Dockerfile 1 19 10 38
|
|
34
|
+
─────────────────────────────────────────────────────
|
|
35
|
+
TOTAL 504 10119 2741 61546
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
La imagen Docker pesa ~120 MB. El bundle npm pesa ~12 MB. El binario standalone ~50 MB. Todo el runtime cabe en una Raspberry Pi Zero 2W con 512 MB de RAM.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
20
42
|
## Instalación
|
|
21
43
|
|
|
44
|
+
### Prerequisito — Bun
|
|
45
|
+
|
|
46
|
+
Hive requiere [Bun](https://bun.sh) como runtime para las opciones de binario y npm. Docker no lo requiere.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
curl -fsSL https://bun.sh/install | bash
|
|
50
|
+
source ~/.bashrc # o reinicia la terminal
|
|
51
|
+
bun --version # verifica que quedó instalado
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
22
56
|
Elige la opción que mejor se adapte a tu caso:
|
|
23
57
|
|
|
24
58
|
| | Docker | Binario | npm / bun |
|
|
25
59
|
|---|---|---|---|
|
|
26
|
-
| Requiere | Docker |
|
|
60
|
+
| Requiere | Docker | Bun | Bun |
|
|
27
61
|
| Setup | 1 comando | descarga + ejecuta | `bun install -g @johpaz/hive` |
|
|
28
62
|
| Actualizar | `docker compose pull` | descarga nueva versión | `bun install -g @johpaz/hive` |
|
|
29
63
|
| Ideal para | Raspberry Pi, VPS, laptop vieja, VM | uso personal, USB | desarrolladores |
|
|
@@ -80,7 +114,7 @@ docker run -d \
|
|
|
80
114
|
-v hive-data:/root/.hive \
|
|
81
115
|
--name hive \
|
|
82
116
|
--restart unless-stopped \
|
|
83
|
-
johpaz/hive:
|
|
117
|
+
johpaz/hive:1.7.8
|
|
84
118
|
```
|
|
85
119
|
|
|
86
120
|
**Variables de entorno disponibles:**
|
|
@@ -109,59 +143,274 @@ docker compose logs -f hive
|
|
|
109
143
|
|
|
110
144
|
---
|
|
111
145
|
|
|
146
|
+
#### Docker portable — USB o disco externo
|
|
147
|
+
|
|
148
|
+
Docker también puede viajar en una USB. La clave es exportar la imagen como archivo `.tar` y montar el volumen de datos desde la USB en vez de un volumen gestionado por Docker.
|
|
149
|
+
|
|
150
|
+
**Paso 1 — Exportar la imagen a un archivo**
|
|
151
|
+
|
|
152
|
+
En el equipo donde tienes conexión a internet:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Descargar la imagen si no la tienes
|
|
156
|
+
docker pull johpaz/hive:1.7.8
|
|
157
|
+
|
|
158
|
+
# Exportar a archivo tar (cabe en cualquier USB de 512 MB+)
|
|
159
|
+
docker save johpaz/hive:1.7.8 -o /media/usb/hive-image.tar
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Paso 2 — Crear la estructura en la USB**
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
/usb/
|
|
166
|
+
├── hive-image.tar ← imagen Docker exportada (~120 MB)
|
|
167
|
+
├── docker-compose.yml ← archivo de configuración
|
|
168
|
+
└── datos/ ← directorio de datos de Hive (se crea al primer arranque)
|
|
169
|
+
└── hive.db
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Crea el `docker-compose.yml` en la USB con el volumen apuntando a la USB:
|
|
173
|
+
|
|
174
|
+
```yaml
|
|
175
|
+
services:
|
|
176
|
+
hive:
|
|
177
|
+
image: johpaz/hive:1.7.8
|
|
178
|
+
ports:
|
|
179
|
+
- "18790:18790"
|
|
180
|
+
volumes:
|
|
181
|
+
- ./datos:/root/.hive
|
|
182
|
+
restart: unless-stopped
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
> La clave es `./datos:/root/.hive` — monta la carpeta `datos/` relativa al `docker-compose.yml`, que está en la USB. Así los datos viajan con la USB, no quedan en el equipo.
|
|
186
|
+
|
|
187
|
+
**Paso 3 — Cargar y ejecutar en cualquier equipo con Docker**
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# 1. Cargar la imagen desde el archivo (sin internet)
|
|
191
|
+
docker load -i /media/usb/hive-image.tar
|
|
192
|
+
|
|
193
|
+
# 2. Ir al directorio de la USB
|
|
194
|
+
cd /media/usb
|
|
195
|
+
|
|
196
|
+
# 3. Levantar
|
|
197
|
+
docker compose up -d
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Abre `http://localhost:18790` en el navegador. Si es la primera vez en ese equipo, muestra el wizard de setup. Si la USB ya tiene datos, carga tu agente directamente.
|
|
201
|
+
|
|
202
|
+
**Detener y llevar la USB a otro equipo:**
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Detener el contenedor
|
|
206
|
+
docker compose down
|
|
207
|
+
|
|
208
|
+
# En el otro equipo, volver al Paso 3
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
> **Nota para Windows:** Docker Desktop usa rutas como `D:\` para la USB. Ajusta el volumen en el `docker-compose.yml` a la letra de tu unidad:
|
|
212
|
+
> ```yaml
|
|
213
|
+
> volumes:
|
|
214
|
+
> - D:\datos:/root/.hive
|
|
215
|
+
> ```
|
|
216
|
+
|
|
217
|
+
**Backup de los datos del contenedor:**
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Copiar la BD desde la USB a tu máquina
|
|
221
|
+
cp /media/usb/datos/hive.db ~/backup-hive-$(date +%Y%m%d).db
|
|
222
|
+
|
|
223
|
+
# Restaurar
|
|
224
|
+
cp ~/backup-hive-20260312.db /media/usb/datos/hive.db
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Actualizar la imagen en la USB:**
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
# En un equipo con internet
|
|
231
|
+
docker pull johpaz/hive:latest
|
|
232
|
+
docker save johpaz/hive:latest -o /media/usb/hive-image.tar
|
|
233
|
+
|
|
234
|
+
# Actualizar el tag en docker-compose.yml
|
|
235
|
+
# Luego en cualquier equipo:
|
|
236
|
+
docker load -i /media/usb/hive-image.tar
|
|
237
|
+
docker compose up -d
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
112
242
|
### Opción 2 — Binario standalone (Sin dependencias)
|
|
113
243
|
|
|
114
244
|
Descarga un ejecutable único para tu plataforma. No requiere Node, Bun ni Docker. Al ejecutarlo, **el navegador se abre automáticamente** en `/setup` (primera vez) o en el dashboard.
|
|
115
245
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
246
|
+
#### Dónde descargar
|
|
247
|
+
|
|
248
|
+
**Desde la web** — [hiveagents.io](https://www.hiveagents.io/#installation)
|
|
249
|
+
La página detecta tu sistema operativo automáticamente y muestra el botón de descarga correcto. También puedes seleccionar otra plataforma desde el selector.
|
|
250
|
+
|
|
251
|
+
**Desde GitHub Releases** — [github.com/johpaz/hive/releases/latest](https://github.com/johpaz/hive/releases/latest)
|
|
252
|
+
Descarga manual de cualquier plataforma o versión específica.
|
|
253
|
+
|
|
254
|
+
| Plataforma | Archivo | Descarga directa |
|
|
255
|
+
|------------|---------|------------------|
|
|
256
|
+
| Linux x64 | `hive-v1.7.8-linux-x64` | [Descargar](https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.8-linux-x64) |
|
|
257
|
+
| Linux ARM64 (Raspberry Pi, etc.) | `hive-v1.7.8-linux-arm64` | [Descargar](https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.8-linux-arm64) |
|
|
258
|
+
| macOS Apple Silicon (M1/M2/M3/M4) | `hive-v1.7.8-macos-arm64` | [Descargar](https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.8-macos-arm64) |
|
|
259
|
+
| macOS Intel | `hive-v1.7.8-macos-x64` | [Descargar](https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.8-macos-x64) |
|
|
260
|
+
| Windows x64 | `hive-v1.7.8-windows-x64.exe` | [Descargar](https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.8-windows-x64.exe) |
|
|
261
|
+
|
|
262
|
+
> Los links anteriores siempre apuntan a la última versión publicada. Si necesitas una versión específica, visita la [página de releases](https://github.com/johpaz/hive/releases).
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
#### Linux x64 / ARM64
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
# 1. Descargar el binario (reemplaza "linux-x64" por "linux-arm64" si es ARM)
|
|
270
|
+
curl -L -o hive https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.8-linux-x64
|
|
271
|
+
|
|
272
|
+
# 2. Dar permisos de ejecución
|
|
273
|
+
chmod +x hive
|
|
274
|
+
|
|
275
|
+
# 3. Descargar la UI web
|
|
276
|
+
curl -L https://github.com/johpaz/hive/releases/latest/download/ui-dist.tar.gz \
|
|
277
|
+
| tar -xz --one-top-level=ui-dist
|
|
278
|
+
|
|
279
|
+
# 4. Colocar la UI donde Hive la espera
|
|
280
|
+
mkdir -p ~/.hive/ui
|
|
281
|
+
cp -r ui-dist/* ~/.hive/ui/
|
|
282
|
+
|
|
283
|
+
# 5. Ejecutar
|
|
284
|
+
./hive start
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
El gateway levanta en `http://localhost:18790`. El navegador se abre automáticamente.
|
|
288
|
+
|
|
289
|
+
**Agregar al PATH (opcional)** para ejecutar `hive` desde cualquier directorio:
|
|
123
290
|
|
|
124
|
-
|
|
291
|
+
```bash
|
|
292
|
+
sudo mv hive /usr/local/bin/hive
|
|
293
|
+
hive start
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
#### macOS — Apple Silicon (M1/M2/M3/M4)
|
|
125
299
|
|
|
126
300
|
```bash
|
|
127
|
-
# 1. Descargar
|
|
128
|
-
curl -L -o hive https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.
|
|
301
|
+
# 1. Descargar
|
|
302
|
+
curl -L -o hive https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.8-macos-arm64
|
|
303
|
+
|
|
304
|
+
# 2. Dar permisos de ejecución
|
|
129
305
|
chmod +x hive
|
|
130
306
|
|
|
131
|
-
#
|
|
132
|
-
|
|
133
|
-
|
|
307
|
+
# 3. Quitar la cuarentena de Gatekeeper (necesario en todos los binarios descargados)
|
|
308
|
+
xattr -d com.apple.quarantine hive
|
|
309
|
+
|
|
310
|
+
# 4. Descargar la UI
|
|
311
|
+
curl -L https://github.com/johpaz/hive/releases/latest/download/ui-dist.tar.gz \
|
|
312
|
+
| tar -xz --one-top-level=ui-dist
|
|
313
|
+
mkdir -p ~/.hive/ui && cp -r ui-dist/* ~/.hive/ui/
|
|
134
314
|
|
|
135
|
-
#
|
|
315
|
+
# 5. Ejecutar
|
|
136
316
|
./hive start
|
|
137
317
|
```
|
|
138
318
|
|
|
139
|
-
|
|
319
|
+
> **¿Por qué el paso `xattr`?** macOS bloquea binarios descargados de internet que no tienen firma de Apple. El comando `xattr -d com.apple.quarantine` elimina esa restricción. Si lo omites, verás el error: _"hive no se puede abrir porque Apple no puede comprobar que no contiene software malicioso"_.
|
|
320
|
+
>
|
|
321
|
+
> Alternativa: en Finder, haz clic derecho sobre el archivo → **Abrir** → **Abrir** de nuevo en el diálogo. Esto también lo desbloquea.
|
|
322
|
+
|
|
323
|
+
**Agregar al PATH:**
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
sudo mv hive /usr/local/bin/hive
|
|
327
|
+
hive start
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
#### macOS — Intel
|
|
333
|
+
|
|
334
|
+
Igual que Apple Silicon pero descarga `macos-x64`:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
curl -L -o hive https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.8-macos-x64
|
|
338
|
+
chmod +x hive
|
|
339
|
+
xattr -d com.apple.quarantine hive
|
|
340
|
+
curl -L https://github.com/johpaz/hive/releases/latest/download/ui-dist.tar.gz \
|
|
341
|
+
| tar -xz --one-top-level=ui-dist
|
|
342
|
+
mkdir -p ~/.hive/ui && cp -r ui-dist/* ~/.hive/ui/
|
|
343
|
+
./hive start
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
#### Windows x64
|
|
349
|
+
|
|
350
|
+
**Paso 1 — Descargar el binario**
|
|
351
|
+
|
|
352
|
+
Descarga [`hive-v1.7.8-windows-x64.exe`](https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.8-windows-x64.exe) desde GitHub o desde [hiveagents.io](https://www.hiveagents.io/#installation).
|
|
353
|
+
|
|
354
|
+
**Paso 2 — Windows SmartScreen**
|
|
355
|
+
|
|
356
|
+
Al ejecutar por primera vez, Windows puede mostrar _"Windows protegió tu PC"_. Es normal para binarios sin firma de código.
|
|
357
|
+
|
|
358
|
+
1. Haz clic en **"Más información"**
|
|
359
|
+
2. Luego en **"Ejecutar de todas formas"**
|
|
360
|
+
|
|
361
|
+
**Paso 3 — Descargar la UI**
|
|
362
|
+
|
|
363
|
+
Descarga [`ui-dist.tar.gz`](https://github.com/johpaz/hive/releases/latest/download/ui-dist.tar.gz) y extrae su contenido en:
|
|
364
|
+
|
|
365
|
+
```
|
|
366
|
+
C:\Users\TU_USUARIO\.hive\ui\
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
Puedes usar [7-Zip](https://www.7-zip.org/) o WSL para extraer el `.tar.gz`. Con PowerShell 5+:
|
|
370
|
+
|
|
371
|
+
```powershell
|
|
372
|
+
# Crear la carpeta de destino
|
|
373
|
+
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.hive\ui"
|
|
374
|
+
|
|
375
|
+
# Extraer (requiere PowerShell 5+ o Windows 11)
|
|
376
|
+
tar -xzf ui-dist.tar.gz -C "$env:USERPROFILE\.hive\ui"
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
**Paso 4 — Ejecutar**
|
|
380
|
+
|
|
381
|
+
```powershell
|
|
382
|
+
.\hive-v1.7.8-windows-x64.exe start
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
El navegador se abre automáticamente en `http://localhost:18790`.
|
|
386
|
+
|
|
387
|
+
**Agregar al PATH (opcional):**
|
|
140
388
|
|
|
141
389
|
```powershell
|
|
142
|
-
#
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
390
|
+
# Mover a una carpeta ya en el PATH, por ejemplo:
|
|
391
|
+
Move-Item .\hive-v1.7.8-windows-x64.exe C:\Windows\System32\hive.exe
|
|
392
|
+
|
|
393
|
+
# Luego ejecutar desde cualquier lugar:
|
|
394
|
+
hive start
|
|
146
395
|
```
|
|
147
396
|
|
|
148
|
-
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
#### ¿Dónde se guardan los datos?
|
|
149
400
|
|
|
150
|
-
Todos los datos (base de datos, configuración, logs) se guardan en `~/.hive
|
|
401
|
+
Todos los datos (base de datos, configuración, logs) se guardan en `~/.hive/`:
|
|
151
402
|
|
|
152
403
|
```
|
|
153
|
-
~/.hive/
|
|
404
|
+
~/.hive/ # Windows: C:\Users\TU_USUARIO\.hive\
|
|
154
405
|
├── data/
|
|
155
|
-
│ └── hive.db ←
|
|
406
|
+
│ └── hive.db ← SQLite (agentes, conversaciones, config)
|
|
156
407
|
├── ui/ ← archivos de la interfaz web
|
|
157
408
|
├── logs/
|
|
158
409
|
│ └── gateway.log
|
|
159
410
|
└── gateway.pid
|
|
160
411
|
```
|
|
161
412
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
**Variables de entorno:**
|
|
413
|
+
**Variables de entorno disponibles:**
|
|
165
414
|
|
|
166
415
|
| Variable | Default | Descripción |
|
|
167
416
|
|----------|---------|-------------|
|
|
@@ -172,7 +421,7 @@ La UI se sirve desde `~/.hive/ui/`. Puedes apuntar a una ruta alternativa con la
|
|
|
172
421
|
|
|
173
422
|
---
|
|
174
423
|
|
|
175
|
-
|
|
424
|
+
#### Uso portable — USB o disco externo
|
|
176
425
|
|
|
177
426
|
El binario standalone es ideal para llevarlo en una USB. Tu agente viaja contigo con toda su memoria, historial y configuración.
|
|
178
427
|
|
|
@@ -181,69 +430,53 @@ El binario standalone es ideal para llevarlo en una USB. Tu agente viaja contigo
|
|
|
181
430
|
```
|
|
182
431
|
/usb/
|
|
183
432
|
├── hive ← binario ejecutable
|
|
184
|
-
├── ui/ ← archivos de la
|
|
433
|
+
├── ui/ ← archivos de la UI (extraídos de ui-dist.tar.gz)
|
|
185
434
|
└── datos/ ← directorio de datos (se crea automáticamente)
|
|
186
435
|
├── data/hive.db
|
|
187
436
|
└── ...
|
|
188
437
|
```
|
|
189
438
|
|
|
190
|
-
**Preparar la USB
|
|
439
|
+
**Preparar la USB:**
|
|
191
440
|
|
|
192
441
|
```bash
|
|
193
|
-
|
|
194
|
-
cp hive-v1.7.2-linux-x64 /media/usb/hive
|
|
442
|
+
cp hive-v1.7.8-linux-x64 /media/usb/hive
|
|
195
443
|
chmod +x /media/usb/hive
|
|
196
|
-
|
|
197
|
-
# Copiar UI
|
|
198
444
|
cp -r ui-dist/* /media/usb/ui/
|
|
199
445
|
|
|
200
|
-
# (Opcional)
|
|
446
|
+
# (Opcional) llevar los datos existentes
|
|
201
447
|
cp -r ~/.hive/data /media/usb/datos/
|
|
202
448
|
```
|
|
203
449
|
|
|
204
|
-
**Ejecutar
|
|
450
|
+
**Ejecutar desde la USB:**
|
|
205
451
|
|
|
206
452
|
```bash
|
|
453
|
+
# Linux
|
|
207
454
|
HIVE_HOME=/media/usb/datos HIVE_UI_DIR=/media/usb/ui /media/usb/hive start
|
|
208
|
-
```
|
|
209
455
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
**En macOS:**
|
|
213
|
-
|
|
214
|
-
```bash
|
|
456
|
+
# macOS
|
|
215
457
|
HIVE_HOME=/Volumes/USB/datos HIVE_UI_DIR=/Volumes/USB/ui /Volumes/USB/hive start
|
|
216
458
|
```
|
|
217
459
|
|
|
218
460
|
**Backup de datos:**
|
|
219
461
|
|
|
220
462
|
```bash
|
|
221
|
-
# Hacer backup de la BD
|
|
222
463
|
cp ~/.hive/data/hive.db ~/backup-hive-$(date +%Y%m%d).db
|
|
223
|
-
|
|
224
|
-
# Restaurar
|
|
225
|
-
cp ~/backup-hive-20260310.db ~/.hive/data/hive.db
|
|
226
464
|
```
|
|
227
465
|
|
|
228
466
|
---
|
|
229
467
|
|
|
230
|
-
### Opción 3 —
|
|
468
|
+
### Opción 3 — bun (Para desarrolladores)
|
|
231
469
|
|
|
232
|
-
>
|
|
233
|
-
> ```bash
|
|
234
|
-
> curl -fsSL https://bun.sh/install | bash
|
|
235
|
-
> ```
|
|
470
|
+
> Requiere Bun instalado — ver prerequisito al inicio de esta sección.
|
|
236
471
|
|
|
237
472
|
**Instalación global:**
|
|
238
473
|
|
|
239
474
|
```bash
|
|
240
|
-
# Con bun (recomendado)
|
|
241
475
|
bun install -g @johpaz/hive
|
|
242
|
-
|
|
243
|
-
# Con npm
|
|
244
|
-
npm install -g @johpaz/hive
|
|
245
476
|
```
|
|
246
477
|
|
|
478
|
+
> Si instalas con `npm install -g @johpaz/hive` también funciona, pero igualmente necesitas Bun instalado — el CLI lo usa como runtime.
|
|
479
|
+
|
|
247
480
|
**Iniciar:**
|
|
248
481
|
|
|
249
482
|
```bash
|
|
@@ -282,6 +515,33 @@ bun install
|
|
|
282
515
|
bun run dev
|
|
283
516
|
```
|
|
284
517
|
|
|
518
|
+
**Migrar datos a otro equipo (portable):**
|
|
519
|
+
|
|
520
|
+
El ejecutable de Hive queda instalado globalmente en el sistema, pero **todos los datos viven en `~/.hive/`** — agentes, conversaciones, configuración, API keys. Para llevarlos a otro equipo basta con copiar esa carpeta:
|
|
521
|
+
|
|
522
|
+
```bash
|
|
523
|
+
# En el equipo origen — comprimir los datos
|
|
524
|
+
tar -czf hive-datos.tar.gz -C ~ .hive
|
|
525
|
+
|
|
526
|
+
# Copiar a USB, disco externo o transferir por red
|
|
527
|
+
cp hive-datos.tar.gz /media/usb/
|
|
528
|
+
|
|
529
|
+
# En el equipo destino — instalar Hive y restaurar datos
|
|
530
|
+
bun install -g @johpaz/hive
|
|
531
|
+
tar -xzf /media/usb/hive-datos.tar.gz -C ~
|
|
532
|
+
|
|
533
|
+
# Arrancar — carga tu agente con toda su memoria
|
|
534
|
+
hive start
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
> La carpeta `.hive` contiene la BD SQLite (`data/hive.db`), la UI web (`ui/`) y los logs. No contiene el binario de Hive — ese se reinstala con `bun install -g`.
|
|
538
|
+
|
|
539
|
+
**Backup rápido solo de la BD:**
|
|
540
|
+
|
|
541
|
+
```bash
|
|
542
|
+
cp ~/.hive/data/hive.db ~/backup-hive-$(date +%Y%m%d).db
|
|
543
|
+
```
|
|
544
|
+
|
|
285
545
|
---
|
|
286
546
|
|
|
287
547
|
## Los Cuatro Pilares
|
package/dist/hive.js
CHANGED
|
@@ -6,39 +6,60 @@ var __defProp = Object.defineProperty;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
function __accessProp(key) {
|
|
10
|
+
return this[key];
|
|
11
|
+
}
|
|
12
|
+
var __toESMCache_node;
|
|
13
|
+
var __toESMCache_esm;
|
|
9
14
|
var __toESM = (mod2, isNodeMode, target) => {
|
|
15
|
+
var canCache = mod2 != null && typeof mod2 === "object";
|
|
16
|
+
if (canCache) {
|
|
17
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
18
|
+
var cached = cache.get(mod2);
|
|
19
|
+
if (cached)
|
|
20
|
+
return cached;
|
|
21
|
+
}
|
|
10
22
|
target = mod2 != null ? __create(__getProtoOf(mod2)) : {};
|
|
11
23
|
const to = isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target;
|
|
12
24
|
for (let key of __getOwnPropNames(mod2))
|
|
13
25
|
if (!__hasOwnProp.call(to, key))
|
|
14
26
|
__defProp(to, key, {
|
|
15
|
-
get: (
|
|
27
|
+
get: __accessProp.bind(mod2, key),
|
|
16
28
|
enumerable: true
|
|
17
29
|
});
|
|
30
|
+
if (canCache)
|
|
31
|
+
cache.set(mod2, to);
|
|
18
32
|
return to;
|
|
19
33
|
};
|
|
20
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
21
34
|
var __toCommonJS = (from) => {
|
|
22
|
-
var entry = __moduleCache.get(from), desc;
|
|
35
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
23
36
|
if (entry)
|
|
24
37
|
return entry;
|
|
25
38
|
entry = __defProp({}, "__esModule", { value: true });
|
|
26
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
40
|
+
for (var key of __getOwnPropNames(from))
|
|
41
|
+
if (!__hasOwnProp.call(entry, key))
|
|
42
|
+
__defProp(entry, key, {
|
|
43
|
+
get: __accessProp.bind(from, key),
|
|
44
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
45
|
+
});
|
|
46
|
+
}
|
|
31
47
|
__moduleCache.set(from, entry);
|
|
32
48
|
return entry;
|
|
33
49
|
};
|
|
50
|
+
var __moduleCache;
|
|
34
51
|
var __commonJS = (cb, mod2) => () => (mod2 || cb((mod2 = { exports: {} }).exports, mod2), mod2.exports);
|
|
52
|
+
var __returnValue = (v) => v;
|
|
53
|
+
function __exportSetter(name, newValue) {
|
|
54
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
55
|
+
}
|
|
35
56
|
var __export = (target, all) => {
|
|
36
57
|
for (var name in all)
|
|
37
58
|
__defProp(target, name, {
|
|
38
59
|
get: all[name],
|
|
39
60
|
enumerable: true,
|
|
40
61
|
configurable: true,
|
|
41
|
-
set: (
|
|
62
|
+
set: __exportSetter.bind(all, name)
|
|
42
63
|
});
|
|
43
64
|
};
|
|
44
65
|
var __esm = (fn2, res) => () => (fn2 && (res = fn2(fn2 = 0)), res);
|
|
@@ -19523,7 +19544,7 @@ class SkillLoader {
|
|
|
19523
19544
|
this.cache.clear();
|
|
19524
19545
|
}
|
|
19525
19546
|
}
|
|
19526
|
-
var __dirname = "/home/
|
|
19547
|
+
var __dirname = "/home/runner/work/hive/hive/packages/skills/src";
|
|
19527
19548
|
var init_loader2 = __esm(() => {
|
|
19528
19549
|
init_js_yaml();
|
|
19529
19550
|
});
|
|
@@ -66863,6 +66884,7 @@ var init_canvas = __esm(() => {
|
|
|
66863
66884
|
type: "object",
|
|
66864
66885
|
properties: {
|
|
66865
66886
|
title: { type: "string", description: "Card title" },
|
|
66887
|
+
content: { type: "string", description: "Card content (Markdown supported)" },
|
|
66866
66888
|
items: {
|
|
66867
66889
|
type: "array",
|
|
66868
66890
|
description: "List of key-value items",
|
|
@@ -66875,11 +66897,12 @@ var init_canvas = __esm(() => {
|
|
|
66875
66897
|
}
|
|
66876
66898
|
}
|
|
66877
66899
|
},
|
|
66878
|
-
required: ["title"
|
|
66900
|
+
required: ["title"]
|
|
66879
66901
|
},
|
|
66880
66902
|
execute: async (params) => {
|
|
66881
66903
|
const title = params.title;
|
|
66882
|
-
const
|
|
66904
|
+
const content = params.content;
|
|
66905
|
+
const items = params.items || [];
|
|
66883
66906
|
try {
|
|
66884
66907
|
const id = `card_${Date.now()}`;
|
|
66885
66908
|
emitCanvas("canvas:render", {
|
|
@@ -66888,8 +66911,8 @@ var init_canvas = __esm(() => {
|
|
|
66888
66911
|
type: "card",
|
|
66889
66912
|
props: {
|
|
66890
66913
|
title,
|
|
66891
|
-
children: items.map((item) => `**${item.label}:** ${item.value}`).join(`
|
|
66892
|
-
`),
|
|
66914
|
+
children: content ?? (items.length > 0 ? items.map((item) => `**${item.label}:** ${item.value}`).join(`
|
|
66915
|
+
`) : ""),
|
|
66893
66916
|
items
|
|
66894
66917
|
},
|
|
66895
66918
|
position: { x: 0, y: 0 },
|
|
@@ -103420,7 +103443,7 @@ var require_ClientVoiceManager = __commonJS((exports2, module2) => {
|
|
|
103420
103443
|
|
|
103421
103444
|
// node_modules/.bun/@discordjs+ws@1.2.3/node_modules/@discordjs/ws/dist/index.js
|
|
103422
103445
|
var require_dist11 = __commonJS((exports2, module2) => {
|
|
103423
|
-
var __dirname = "/home/
|
|
103446
|
+
var __dirname = "/home/runner/work/hive/hive/node_modules/.bun/@discordjs+ws@1.2.3/node_modules/@discordjs/ws/dist";
|
|
103424
103447
|
var __create2 = Object.create;
|
|
103425
103448
|
var __defProp3 = Object.defineProperty;
|
|
103426
103449
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -238674,7 +238697,7 @@ var require_indexes = __commonJS((exports2, module2) => {
|
|
|
238674
238697
|
|
|
238675
238698
|
// node_modules/.bun/thread-stream@3.1.0/node_modules/thread-stream/index.js
|
|
238676
238699
|
var require_thread_stream = __commonJS((exports2, module2) => {
|
|
238677
|
-
var __dirname = "/home/
|
|
238700
|
+
var __dirname = "/home/runner/work/hive/hive/node_modules/.bun/thread-stream@3.1.0/node_modules/thread-stream";
|
|
238678
238701
|
var { version: version3 } = require_package5();
|
|
238679
238702
|
var { EventEmitter: EventEmitter6 } = __require("events");
|
|
238680
238703
|
var { Worker } = __require("worker_threads");
|
|
@@ -239095,7 +239118,7 @@ var require_thread_stream = __commonJS((exports2, module2) => {
|
|
|
239095
239118
|
|
|
239096
239119
|
// node_modules/.bun/pino@9.14.0/node_modules/pino/lib/transport.js
|
|
239097
239120
|
var require_transport = __commonJS((exports2, module2) => {
|
|
239098
|
-
var __dirname = "/home/
|
|
239121
|
+
var __dirname = "/home/runner/work/hive/hive/node_modules/.bun/pino@9.14.0/node_modules/pino/lib";
|
|
239099
239122
|
var { createRequire } = __require("module");
|
|
239100
239123
|
var getCallers = require_caller();
|
|
239101
239124
|
var { join: join12, isAbsolute: isAbsolute2, sep } = __require("path");
|
|
@@ -313020,7 +313043,7 @@ async function start(flags) {
|
|
|
313020
313043
|
\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2551
|
|
313021
313044
|
\u2551 \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u2551
|
|
313022
313045
|
\u2551 \u2551
|
|
313023
|
-
\u2551 Personal Swarm AI Gateway \u2014 v1.7.
|
|
313046
|
+
\u2551 Personal Swarm AI Gateway \u2014 v1.7.8 \u2551
|
|
313024
313047
|
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
313025
313048
|
`);
|
|
313026
313049
|
}
|
|
@@ -314957,7 +314980,7 @@ async function executeAsync(gatewayUrl, payload, spinner) {
|
|
|
314957
314980
|
}
|
|
314958
314981
|
|
|
314959
314982
|
// packages/cli/src/index.ts
|
|
314960
|
-
var VERSION4 = "1.7.
|
|
314983
|
+
var VERSION4 = "1.7.8";
|
|
314961
314984
|
var HELP = `
|
|
314962
314985
|
\uD83D\uDC1D Hive \u2014 Personal Swarm AI Gateway v${VERSION4}
|
|
314963
314986
|
|