@johpaz/hive 1.7.7 → 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.
Files changed (3) hide show
  1. package/README.md +277 -46
  2. package/dist/hive.js +8 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -114,7 +114,7 @@ docker run -d \
114
114
  -v hive-data:/root/.hive \
115
115
  --name hive \
116
116
  --restart unless-stopped \
117
- johpaz/hive:1.7.7
117
+ johpaz/hive:1.7.8
118
118
  ```
119
119
 
120
120
  **Variables de entorno disponibles:**
@@ -143,59 +143,274 @@ docker compose logs -f hive
143
143
 
144
144
  ---
145
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
+
146
242
  ### Opción 2 — Binario standalone (Sin dependencias)
147
243
 
148
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.
149
245
 
150
- | Plataforma | Descarga |
151
- |------------|----------|
152
- | Linux x64 | [hive-v1.7.7-linux-x64](https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.7-linux-x64) |
153
- | Linux ARM64 | [hive-v1.7.7-linux-arm64](https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.7-linux-arm64) |
154
- | macOS Intel | [hive-v1.7.7-macos-x64](https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.7-macos-x64) |
155
- | macOS Apple Silicon | [hive-v1.7.7-macos-arm64](https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.7-macos-arm64) |
156
- | Windows x64 | [hive-v1.7.7-windows-x64.exe](https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.7-windows-x64.exe) |
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:
290
+
291
+ ```bash
292
+ sudo mv hive /usr/local/bin/hive
293
+ hive start
294
+ ```
295
+
296
+ ---
157
297
 
158
- **Instalación en Linux / macOS:**
298
+ #### macOS Apple Silicon (M1/M2/M3/M4)
159
299
 
160
300
  ```bash
161
- # 1. Descargar binario (ajusta la URL a tu plataforma)
162
- curl -L -o hive https://github.com/johpaz/hive/releases/latest/download/hive-v1.7.7-linux-x64
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
163
305
  chmod +x hive
164
306
 
165
- # 2. Descargar la UI
166
- curl -L https://github.com/johpaz/hive/releases/latest/download/ui-dist.tar.gz | tar -xz
167
- mkdir -p ~/.hive/ui && mv ui-dist/* ~/.hive/ui/
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/
314
+
315
+ # 5. Ejecutar
316
+ ./hive start
317
+ ```
318
+
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
168
333
 
169
- # 3. Ejecutar el navegador se abre automáticamente
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/
170
343
  ./hive start
171
344
  ```
172
345
 
173
- **Instalación en Windows:**
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**
174
380
 
175
381
  ```powershell
176
- # 1. Descargar hive-v1.7.7-windows-x64.exe desde el link de arriba
177
- # 2. Descargar ui-dist.tar.gz y extraer en %USERPROFILE%\.hive\ui\
178
- # 3. Ejecutar
179
- .\hive-v1.7.7-windows-x64.exe start
382
+ .\hive-v1.7.8-windows-x64.exe start
180
383
  ```
181
384
 
182
- **¿Dónde se guardan los datos?**
385
+ El navegador se abre automáticamente en `http://localhost:18790`.
183
386
 
184
- Todos los datos (base de datos, configuración, logs) se guardan en `~/.hive/` por defecto:
387
+ **Agregar al PATH (opcional):**
388
+
389
+ ```powershell
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
395
+ ```
396
+
397
+ ---
398
+
399
+ #### ¿Dónde se guardan los datos?
400
+
401
+ Todos los datos (base de datos, configuración, logs) se guardan en `~/.hive/`:
185
402
 
186
403
  ```
187
- ~/.hive/
404
+ ~/.hive/ # Windows: C:\Users\TU_USUARIO\.hive\
188
405
  ├── data/
189
- │ └── hive.db ← base de datos SQLite (agentes, conversaciones, config)
406
+ │ └── hive.db ← SQLite (agentes, conversaciones, config)
190
407
  ├── ui/ ← archivos de la interfaz web
191
408
  ├── logs/
192
409
  │ └── gateway.log
193
410
  └── gateway.pid
194
411
  ```
195
412
 
196
- La UI se sirve desde `~/.hive/ui/`. Puedes apuntar a una ruta alternativa con la variable `HIVE_UI_DIR`.
197
-
198
- **Variables de entorno:**
413
+ **Variables de entorno disponibles:**
199
414
 
200
415
  | Variable | Default | Descripción |
201
416
  |----------|---------|-------------|
@@ -206,7 +421,7 @@ La UI se sirve desde `~/.hive/ui/`. Puedes apuntar a una ruta alternativa con la
206
421
 
207
422
  ---
208
423
 
209
- ### Uso portable — USB o disco externo
424
+ #### Uso portable — USB o disco externo
210
425
 
211
426
  El binario standalone es ideal para llevarlo en una USB. Tu agente viaja contigo con toda su memoria, historial y configuración.
212
427
 
@@ -215,48 +430,37 @@ El binario standalone es ideal para llevarlo en una USB. Tu agente viaja contigo
215
430
  ```
216
431
  /usb/
217
432
  ├── hive ← binario ejecutable
218
- ├── ui/ ← archivos de la interfaz web (copiar de ui-dist/)
433
+ ├── ui/ ← archivos de la UI (extraídos de ui-dist.tar.gz)
219
434
  └── datos/ ← directorio de datos (se crea automáticamente)
220
435
  ├── data/hive.db
221
436
  └── ...
222
437
  ```
223
438
 
224
- **Preparar la USB (desde tu máquina):**
439
+ **Preparar la USB:**
225
440
 
226
441
  ```bash
227
- # Copiar binario
228
- cp hive-v1.7.7-linux-x64 /media/usb/hive
442
+ cp hive-v1.7.8-linux-x64 /media/usb/hive
229
443
  chmod +x /media/usb/hive
230
-
231
- # Copiar UI
232
444
  cp -r ui-dist/* /media/usb/ui/
233
445
 
234
- # (Opcional) Copiar datos existentes
446
+ # (Opcional) llevar los datos existentes
235
447
  cp -r ~/.hive/data /media/usb/datos/
236
448
  ```
237
449
 
238
- **Ejecutar en cualquier equipo Linux:**
450
+ **Ejecutar desde la USB:**
239
451
 
240
452
  ```bash
453
+ # Linux
241
454
  HIVE_HOME=/media/usb/datos HIVE_UI_DIR=/media/usb/ui /media/usb/hive start
242
- ```
243
455
 
244
- El navegador se abre automáticamente. Si es la primera vez en ese equipo, muestra el wizard de setup. Si ya tienes datos en la USB, carga tu agente directamente.
245
-
246
- **En macOS:**
247
-
248
- ```bash
456
+ # macOS
249
457
  HIVE_HOME=/Volumes/USB/datos HIVE_UI_DIR=/Volumes/USB/ui /Volumes/USB/hive start
250
458
  ```
251
459
 
252
460
  **Backup de datos:**
253
461
 
254
462
  ```bash
255
- # Hacer backup de la BD
256
463
  cp ~/.hive/data/hive.db ~/backup-hive-$(date +%Y%m%d).db
257
-
258
- # Restaurar
259
- cp ~/backup-hive-20260310.db ~/.hive/data/hive.db
260
464
  ```
261
465
 
262
466
  ---
@@ -311,6 +515,33 @@ bun install
311
515
  bun run dev
312
516
  ```
313
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
+
314
545
  ---
315
546
 
316
547
  ## Los Cuatro Pilares
package/dist/hive.js CHANGED
@@ -66884,6 +66884,7 @@ var init_canvas = __esm(() => {
66884
66884
  type: "object",
66885
66885
  properties: {
66886
66886
  title: { type: "string", description: "Card title" },
66887
+ content: { type: "string", description: "Card content (Markdown supported)" },
66887
66888
  items: {
66888
66889
  type: "array",
66889
66890
  description: "List of key-value items",
@@ -66896,11 +66897,12 @@ var init_canvas = __esm(() => {
66896
66897
  }
66897
66898
  }
66898
66899
  },
66899
- required: ["title", "items"]
66900
+ required: ["title"]
66900
66901
  },
66901
66902
  execute: async (params) => {
66902
66903
  const title = params.title;
66903
- const items = params.items;
66904
+ const content = params.content;
66905
+ const items = params.items || [];
66904
66906
  try {
66905
66907
  const id = `card_${Date.now()}`;
66906
66908
  emitCanvas("canvas:render", {
@@ -66909,8 +66911,8 @@ var init_canvas = __esm(() => {
66909
66911
  type: "card",
66910
66912
  props: {
66911
66913
  title,
66912
- children: items.map((item) => `**${item.label}:** ${item.value}`).join(`
66913
- `),
66914
+ children: content ?? (items.length > 0 ? items.map((item) => `**${item.label}:** ${item.value}`).join(`
66915
+ `) : ""),
66914
66916
  items
66915
66917
  },
66916
66918
  position: { x: 0, y: 0 },
@@ -313041,7 +313043,7 @@ async function start(flags) {
313041
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
313042
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
313043
313045
  \u2551 \u2551
313044
- \u2551 Personal Swarm AI Gateway \u2014 v1.7.7 \u2551
313046
+ \u2551 Personal Swarm AI Gateway \u2014 v1.7.8 \u2551
313045
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
313046
313048
  `);
313047
313049
  }
@@ -314978,7 +314980,7 @@ async function executeAsync(gatewayUrl, payload, spinner) {
314978
314980
  }
314979
314981
 
314980
314982
  // packages/cli/src/index.ts
314981
- var VERSION4 = "1.7.7";
314983
+ var VERSION4 = "1.7.8";
314982
314984
  var HELP = `
314983
314985
  \uD83D\uDC1D Hive \u2014 Personal Swarm AI Gateway v${VERSION4}
314984
314986
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johpaz/hive",
3
- "version": "1.7.7",
3
+ "version": "1.7.8",
4
4
  "description": "Tu colmena de agentes IA. Local-first. Multi-canal. Open source. Construido desde Colombia para el mundo.",
5
5
  "private": false,
6
6
  "bin": {