@johpaz/hive-sdk 0.0.17 → 0.0.18

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.
@@ -53,7 +53,7 @@ export const browserTypeTool: Tool = {
53
53
  log.warn("Browser not available");
54
54
  return {
55
55
  ok: false,
56
- error: "Browser automation not available. Install Chrome/Chromium.",
56
+ error: "Browser automation not available. Install agent-browser.",
57
57
  };
58
58
  }
59
59
 
@@ -61,7 +61,7 @@ export const browserTypeTool: Tool = {
61
61
 
62
62
  try {
63
63
  const view = await browserService.getView();
64
- if (!view) return { ok: false, error: "Browser automation not available. Install Chrome/Chromium." };
64
+ if (!view) return { ok: false, error: "Browser automation not available. Install agent-browser." };
65
65
 
66
66
  if (url) {
67
67
  await view.navigate(url);
@@ -54,7 +54,7 @@ export const browserWaitTool: Tool = {
54
54
  log.warn("Browser not available");
55
55
  return {
56
56
  ok: false,
57
- error: "Browser automation not available. Install Chrome/Chromium.",
57
+ error: "Browser automation not available. Install agent-browser.",
58
58
  };
59
59
  }
60
60
 
@@ -69,7 +69,7 @@ export const browserWaitTool: Tool = {
69
69
 
70
70
  try {
71
71
  const view = await browserService.getView();
72
- if (!view) return { ok: false, error: "Browser automation not available. Install Chrome/Chromium." };
72
+ if (!view) return { ok: false, error: "Browser automation not available. Install agent-browser." };
73
73
 
74
74
  if (url) {
75
75
  await view.navigate(url);
@@ -7,6 +7,7 @@
7
7
  import type { Tool } from "../types.ts";
8
8
  import { webSearchTool } from "./web-search.ts";
9
9
  import { webFetchTool } from "./web-fetch.ts";
10
+ import { apiRequestTool } from "./api-request.ts";
10
11
  import { browserNavigateTool } from "./browser-navigate.ts";
11
12
  import { browserScreenshotTool } from "./browser-screenshot.ts";
12
13
  import { browserClickTool } from "./browser-click.ts";
@@ -19,6 +20,7 @@ export function createTools(): Tool[] {
19
20
  return [
20
21
  webSearchTool,
21
22
  webFetchTool,
23
+ apiRequestTool,
22
24
  browserNavigateTool,
23
25
  browserScreenshotTool,
24
26
  browserClickTool,
@@ -31,6 +33,7 @@ export function createTools(): Tool[] {
31
33
 
32
34
  export * from "./web-search.ts";
33
35
  export * from "./web-fetch.ts";
36
+ export * from "./api-request.ts";
34
37
  export * from "./browser-navigate.ts";
35
38
  export * from "./browser-screenshot.ts";
36
39
  export * from "./browser-click.ts";
package/CHANGELOG.md DELETED
@@ -1,72 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [0.0.17] - 2026-05-28
9
-
10
- ### Changed
11
- - **CLI bin renombrado**: `hive` → `hives` para evitar conflicto con `@johpaz/hive-agents` (harness original)
12
- - Marca actualizada: removidas referencias a "Anomaly Co." — ahora consistente con `johpaz` / `tuprofedeia`
13
- - `.npmignore` creado para paquete limpio
14
- - `.github/CODEOWNERS` actualizado
15
-
16
- ## [0.0.16] - 2026-05-28
17
-
18
- ### Added
19
- - **Bun Workers individuales**: `createWorker()`, `WorkerPool`, `agent.worker.ts`
20
- - Workers especializados con system prompt propio
21
- - Ejecución en threads aislados via `Bun.Worker`
22
- - Comunicación via `postMessage`/`onmessage`
23
- - **Gateway simplificado**: HTTP/WebSocket server con `Bun.serve()`
24
- - Endpoints: `/status`, `/chat`, `/ws`
25
- - Streaming de respuestas en tiempo real
26
- - **Channels**: Telegram, Discord, WhatsApp, Slack, Webchat
27
- - **Tool Runtime**: Ejecución paralela de tools via Bun Workers
28
- - **CLI mejorado**:
29
- - `hive create-app <name>` — Generar app harness completa
30
- - `hive add-tool <name>` — Generar boilerplate de tool
31
- - `hive add-skill <name>` — Generar boilerplate de skill
32
- - `hive add-worker <name>` — Generar Bun Worker
33
- - **Template hive-app**: Proyecto harness completo con Docker, config, gateway
34
- - **Tests del harness**: 39 tests pasando en 12 archivos
35
- - Workers, Gateway, Channels, Canvas, Scheduler, Storage, Swarm, Tool Runtime
36
-
37
- ### Changed
38
- - API pública expandida: exports de gateway, channels, canvas, scheduler, tool-runtime, workers
39
- - `package.json`: versión 0.0.16, descripción actualizada, bin `hive`
40
- - Documentación actualizada en `docs/`
41
-
42
- ## [0.0.10] - 2026-05-02
43
-
44
- ### Added
45
- - DAG Scheduler with parallel worker execution
46
- - Tool selector with FTS5 full-text search
47
- - Skill selector with semantic triggers
48
- - Context compiler for agent execution
49
- - Canvas (ACE) real-time visualization
50
- - Multi-channel support (Slack, Discord, Telegram, WhatsApp)
51
- - AgentBus for inter-agent communication
52
- - SQLite storage with FTS5 built-in
53
- - 130+ passing tests
54
-
55
- ### Performance
56
- - 3x faster than LangChain (Bun runtime)
57
- - Parallel DAG execution (15x faster than sequential)
58
- - Streaming TTFT benchmarks
59
- - Worker metrics (12 tasks/sec throughput)
60
-
61
- ### Documentation
62
- - Complete API documentation in docs/
63
- - README comparison with LangChain
64
- - Benchmark documentation
65
-
66
- ## [0.0.9] - 2026-01-01
67
-
68
- ### Added
69
- - Initial release
70
- - Agent execution with LLM providers
71
- - Basic tool and skill system
72
- - Gateway server
package/docs/README.md DELETED
@@ -1,161 +0,0 @@
1
- # Documentación — Hive SDK
2
-
3
- > **Agent Harness SDK** — Build, deploy, and scale AI agent applications with multi-channel support, Bun Workers, and swarm orchestration.
4
-
5
- ## Documentos
6
-
7
- | Documento | Descripción |
8
- |-----------|-------------|
9
- | [API-AGENTS.md](API-AGENTS.md) | createAgent, AgentLoop, Tool/Skill Selector, LLM Providers |
10
- | [API-DAG-SCHEDULER.md](API-DAG-SCHEDULER.md) | DAGScheduler, TaskGraph, TaskNode, Estrategias, Presets |
11
- | [API-WORKERS-EVENTS.md](API-WORKERS-EVENTS.md) | **Bun Workers**, createWorker, WorkerPool, AgentBus, EventBus, Canvas |
12
- | [API-TOOLS-SKILLS-CHANNELS.md](API-TOOLS-SKILLS-CHANNELS.md) | Tools, Skills, MCP, **Gateway**, **Channels**, **Tool Runtime**, Storage |
13
- | [API-CONTEXT-COMPILER.md](API-CONTEXT-COMPILER.md) | Context Compiler, Message History, Scratchpad, EthicsGuard, ACE |
14
- | [TEMPLATE-HIVE-APP.md](TEMPLATE-HIVE-APP.md) | **Template hive-app** — estructura, opciones, personalización |
15
- | [HIVE-HARNESS.md](../docs/HIVE-HARNESS.md) | Posicionamiento de producto: Hive como Agent Harness |
16
-
17
- ## Instalación
18
-
19
- ```bash
20
- # Instalar globalmente para el CLI
21
- bun install -g @johpaz/hive-sdk
22
-
23
- # O en un proyecto
24
- bun add @johpaz/hive-sdk
25
- ```
26
-
27
- ## CLI Commands
28
-
29
- ```bash
30
- hives init <name> # Inicializar proyecto agente
31
- hives create-app <name> # Crear aplicación harness completa
32
- hives add-tool <name> # Añadir tool
33
- hives add-skill <name> # Añadir skill
34
- hives add-worker <name> # Añadir Bun Worker
35
- hives run # Ejecutar agente
36
- hives test # Test tools/skills
37
- hives trace # Ver logs de ejecución
38
- ```
39
-
40
- ## Inicio Rápido
41
-
42
- ### 1. Crear una app harness completa
43
-
44
- ```bash
45
- hives create-app my-hive
46
- cd my-hive
47
- bun install
48
- cp .env.example .env
49
- bun run dev
50
- ```
51
-
52
- ### 2. Crear un agente simple
53
-
54
- ```typescript
55
- import { createAgent, defineTool } from "@johpaz/hive-sdk";
56
-
57
- const tool = defineTool({
58
- name: "saludar",
59
- description: "Saluda a alguien",
60
- execute: async (args: { nombre: string }) => `¡Hola ${args.nombre}!`,
61
- });
62
-
63
- const agent = await createAgent({
64
- name: "asistente",
65
- provider: "openai",
66
- model: "gpt-4o-mini",
67
- tools: [tool],
68
- });
69
-
70
- const respuesta = await agent.run("Saluda a Juan");
71
- console.log(respuesta);
72
- ```
73
-
74
- ### 3. Crear un worker especializado
75
-
76
- ```typescript
77
- import { createWorker } from "@johpaz/hive-sdk";
78
-
79
- const researcher = createWorker({
80
- name: "researcher",
81
- systemPrompt: "You are a research specialist. Provide concise, factual summaries.",
82
- });
83
-
84
- const result = await researcher.run("Research quantum computing advances");
85
- console.log(result);
86
- researcher.terminate();
87
- ```
88
-
89
- ### 4. Ejecutar workers en paralelo
90
-
91
- ```typescript
92
- import { WorkerPool } from "@johpaz/hive-sdk";
93
-
94
- const pool = new WorkerPool({ maxWorkers: 4 });
95
-
96
- const tasks = [
97
- { id: "t1", message: "Summarize article A" },
98
- { id: "t2", message: "Summarize article B" },
99
- { id: "t3", message: "Summarize article C" },
100
- ];
101
-
102
- const results = await pool.executeBatch(tasks);
103
- console.log(results);
104
- pool.shutdown();
105
- ```
106
-
107
- ### 5. Gateway HTTP/WebSocket
108
-
109
- ```typescript
110
- import { startGateway } from "@johpaz/hive-sdk";
111
-
112
- const server = await startGateway({
113
- host: "127.0.0.1",
114
- port: 18790,
115
- agentId: "coordinator",
116
- });
117
-
118
- console.log(`Gateway at http://127.0.0.1:18790`);
119
- ```
120
-
121
- ## Variables de Entorno
122
-
123
- ```bash
124
- HIVE_DATA_DIR=./data # Directorio de datos SQLite
125
- HIVE_HOST=127.0.0.1 # Gateway host
126
- HIVE_PORT=18790 # Gateway port
127
- OPENAI_API_KEY=sk-... # OpenAI
128
- ANTHROPIC_API_KEY=sk-ant-... # Anthropic
129
- GOOGLE_API_KEY=... # Gemini
130
- LOG_LEVEL=info # debug | info | warn | error
131
- ```
132
-
133
- ## Tests
134
-
135
- ```bash
136
- # Todos los tests (paralelo)
137
- bun test
138
-
139
- # Tests con timeout extendido
140
- bun test --timeout 60000
141
- ```
142
-
143
- ## Changelog
144
-
145
- ### v0.0.17
146
- - **Bun Workers individuales**: `createWorker()`, `WorkerPool`, `agent.worker.ts`
147
- - **Gateway simplificado**: HTTP/WebSocket server con `Bun.serve()`
148
- - **Channels**: Telegram, Discord, WhatsApp, Slack, Webchat
149
- - **Tool Runtime**: Ejecución paralela de tools vía Bun Workers
150
- - **CLI mejorado**: `hives create-app`, `hives add-tool`, `hives add-skill`, `hives add-worker`
151
- - **Template hive-app**: Proyecto harness completo con Docker
152
- - **39 tests pasando** en 12 archivos
153
-
154
- ### v0.0.15
155
- - Core de agentes con Context Engineering, FTS5, ACE
156
- - DAGScheduler con ejecución paralela
157
- - API pública: `createAgent`, `defineTool`, `defineSkill`
158
-
159
- ---
160
-
161
- *Documentación Hive SDK v0.0.17*