@johpaz/hive-sdk 0.1.6 → 0.3.0
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/CHANGELOG.md +441 -0
- package/README.md +21 -3
- package/package.json +27 -5
- package/packages/core/src/agent/acceptance-checks.ts +9 -9
- package/packages/core/src/agent/agent-catalog.ts +82 -25
- package/packages/core/src/agent/agent-loop.ts +115 -26
- package/packages/core/src/agent/capability-search.ts +2 -2
- package/packages/core/src/agent/catalog-selector.ts +4 -4
- package/packages/core/src/agent/compaction.ts +30 -10
- package/packages/core/src/agent/context-compiler.ts +63 -36
- package/packages/core/src/agent/conversation-store.ts +167 -9
- package/packages/core/src/agent/curator.ts +16 -7
- package/packages/core/src/agent/delegation-runtime.ts +5 -5
- package/packages/core/src/agent/goal-runner.ts +9 -9
- package/packages/core/src/agent/index.ts +1 -0
- package/packages/core/src/agent/llm-client.ts +98 -37
- package/packages/core/src/agent/llm-providers/anthropic.ts +4 -4
- package/packages/core/src/agent/llm-providers/deepseek.ts +1 -1
- package/packages/core/src/agent/llm-providers/gemini.ts +4 -4
- package/packages/core/src/agent/llm-providers/groq.ts +1 -1
- package/packages/core/src/agent/llm-providers/hiveagents.ts +3 -3
- package/packages/core/src/agent/llm-providers/interface.ts +2 -2
- package/packages/core/src/agent/llm-providers/kimi.ts +1 -1
- package/packages/core/src/agent/llm-providers/minimax.ts +1 -1
- package/packages/core/src/agent/llm-providers/mistral.ts +1 -1
- package/packages/core/src/agent/llm-providers/modelscope.ts +1 -1
- package/packages/core/src/agent/llm-providers/nvidia.ts +40 -1
- package/packages/core/src/agent/llm-providers/ollama.ts +4 -4
- package/packages/core/src/agent/llm-providers/openai-compat-base.ts +47 -7
- package/packages/core/src/agent/llm-providers/openai.ts +1 -1
- package/packages/core/src/agent/llm-providers/opencode-go.ts +1 -1
- package/packages/core/src/agent/llm-providers/openrouter.ts +1 -1
- package/packages/core/src/agent/llm-providers/qwen.ts +1 -1
- package/packages/core/src/agent/llm-providers/z-ai.ts +1 -1
- package/packages/core/src/agent/mcp-result-normalizer.ts +192 -0
- package/packages/core/src/agent/playbook-selector.ts +22 -7
- package/packages/core/src/agent/prompt-builder.ts +5 -5
- package/packages/core/src/agent/proof-packet.ts +5 -5
- package/packages/core/src/agent/providers/index.ts +39 -4
- package/packages/core/src/agent/realtime-providers/gemini-live.ts +238 -0
- package/packages/core/src/agent/realtime-providers/index.ts +29 -0
- package/packages/core/src/agent/realtime-providers/interface.ts +108 -0
- package/packages/core/src/agent/reflector.ts +38 -15
- package/packages/core/src/agent/run-store.ts +8 -8
- package/packages/core/src/agent/service.ts +10 -10
- package/packages/core/src/agent/skill-selector.ts +6 -6
- package/packages/core/src/agent/thread-id.ts +71 -0
- package/packages/core/src/agent/thread-store.ts +293 -0
- package/packages/core/src/agent/tool-selector.ts +9 -5
- package/packages/core/src/agent/tracer.ts +5 -5
- package/packages/core/src/api/createAgent.ts +67 -2
- package/packages/core/src/artifacts/index.ts +15 -0
- package/packages/core/src/artifacts/store.ts +161 -5
- package/packages/core/src/canvas/emitter.ts +2 -2
- package/packages/core/src/canvas/index.ts +9 -0
- package/packages/core/src/channels/telegram.ts +1 -1
- package/packages/core/src/channels/webchat.ts +1 -1
- package/packages/core/src/config/loader.ts +14 -5
- package/packages/core/src/ethics/EthicsGuard.ts +7 -1
- package/packages/core/src/events/agent-bus.ts +3 -3
- package/packages/core/src/events/channel-narration.ts +3 -3
- package/packages/core/src/events/event-bus.ts +1 -1
- package/packages/core/src/events/index.ts +18 -0
- package/packages/core/src/events/narration.ts +3 -3
- package/packages/core/src/events/tool-narration.ts +4 -0
- package/packages/core/src/gateway/channel-notify.ts +103 -6
- package/packages/core/src/gateway/delegation-groups.ts +4 -4
- package/packages/core/src/gateway/durable-queue.ts +18 -6
- package/packages/core/src/gateway/index.ts +3 -0
- package/packages/core/src/gateway/job-store.ts +11 -5
- package/packages/core/src/gateway/notification-inbox.ts +2 -2
- package/packages/core/src/gateway/server.ts +2 -2
- package/packages/core/src/harness/executors.ts +493 -0
- package/packages/core/src/harness/index.ts +12 -2
- package/packages/core/src/hooks/index.ts +203 -0
- package/packages/core/src/images/index.ts +161 -0
- package/packages/core/src/index.ts +1 -0
- package/packages/core/src/mcp/MCPClient.ts +3 -3
- package/packages/core/src/mcp/hot-reload.ts +5 -5
- package/packages/core/src/mcp/tool-sync.ts +5 -5
- package/packages/core/src/mcp/transports/index.ts +2 -2
- package/packages/core/src/mcp/transports/sse.ts +1 -1
- package/packages/core/src/models/index.ts +36 -0
- package/packages/core/src/multimodal/index.ts +2 -2
- package/packages/core/src/multimodal/vision-service.ts +51 -19
- package/packages/core/src/plugins/loader.ts +4 -1
- package/packages/core/src/resilience/circuit-breaker.ts +16 -5
- package/packages/core/src/resilience/index.ts +13 -0
- package/packages/core/src/resilience/retry.ts +1 -1
- package/packages/core/src/scheduler/CronScheduler.ts +54 -27
- package/packages/core/src/scheduler/cron/expression.ts +165 -0
- package/packages/core/src/scheduler/cron/index.ts +10 -0
- package/packages/core/src/scheduler/cron/job.ts +339 -0
- package/packages/core/src/scheduler/cron/next-run.ts +121 -0
- package/packages/core/src/scheduler/cron/zoned-time.ts +138 -0
- package/packages/core/src/scheduler/index.ts +21 -3
- package/packages/core/src/scheduler/integration.ts +25 -14
- package/packages/core/src/scheduler/types.ts +3 -18
- package/packages/core/src/services/agents.ts +268 -0
- package/packages/core/src/services/cron.ts +257 -0
- package/packages/core/src/services/endpoints.ts +289 -0
- package/packages/core/src/services/ethics.ts +107 -0
- package/packages/core/src/services/images.ts +212 -0
- package/packages/core/src/services/index.ts +112 -0
- package/packages/core/src/services/mcp.ts +201 -0
- package/packages/core/src/services/memory.ts +133 -0
- package/packages/core/src/services/models.ts +179 -0
- package/packages/core/src/services/providers.ts +152 -0
- package/packages/core/src/services/setup.ts +222 -0
- package/packages/core/src/services/skills.ts +241 -0
- package/packages/core/src/services/swarms.ts +307 -0
- package/packages/core/src/services/tools.ts +106 -0
- package/packages/core/src/sessions/index.ts +268 -0
- package/packages/core/src/sessions/resolve.ts +108 -0
- package/packages/core/src/skills/SkillLoader.ts +8 -1
- package/packages/core/src/skills/bundled/artifacts/artifact_reader/SKILL.md +105 -0
- package/packages/core/src/skills/bundled/cron_manager/SKILL.md +21 -11
- package/packages/core/src/skills/bundled/images/image_editor/SKILL.md +120 -0
- package/packages/core/src/skills/bundled/web/browser_automate/SKILL.md +12 -3
- package/packages/core/src/skills/bundled/web/browser_scrape/SKILL.md +22 -7
- package/packages/core/src/skills/bundled-data.generated.ts +110 -12
- package/packages/core/src/storage/bootstrap.ts +107 -12
- package/packages/core/src/storage/causal-events.ts +1 -1
- package/packages/core/src/storage/collections.ts +138 -2
- package/packages/core/src/storage/crypto.ts +35 -4
- package/packages/core/src/storage/hive.ts +1 -1
- package/packages/core/src/storage/hivedb.ts +10 -1
- package/packages/core/src/storage/index.ts +2 -1
- package/packages/core/src/storage/onboarding.ts +61 -45
- package/packages/core/src/storage/reconcile.ts +11 -6
- package/packages/core/src/storage/seed.ts +191 -23
- package/packages/core/src/storage/usage.ts +3 -3
- package/packages/core/src/swarm/AgentExecutor.ts +2 -2
- package/packages/core/src/swarm/Coordinator.ts +8 -8
- package/packages/core/src/swarm/EventBridge.ts +2 -2
- package/packages/core/src/swarm/RoleSwarm.ts +234 -0
- package/packages/core/src/swarm/TaskGraph.ts +2 -2
- package/packages/core/src/swarm/index.ts +7 -0
- package/packages/core/src/swarm/presets/HiveLearnPreset.ts +2 -2
- package/packages/core/src/swarm/presets/ResearchPreset.ts +2 -2
- package/packages/core/src/swarm/strategies/ParallelStrategy.ts +1 -1
- package/packages/core/src/swarm/strategies/PriorityStrategy.ts +3 -3
- package/packages/core/src/swarm/types.ts +3 -18
- package/packages/core/src/tool-runtime/embedded-worker.generated.ts +21 -0
- package/packages/core/src/tool-runtime/index.ts +129 -14
- package/packages/core/src/tools/ToolExecutor.ts +7 -3
- package/packages/core/src/tools/agents/index.ts +18 -60
- package/packages/core/src/tools/cli/index.ts +55 -0
- package/packages/core/src/tools/core/index.ts +52 -4
- package/packages/core/src/tools/cron/index.ts +8 -8
- package/packages/core/src/tools/images/index.ts +130 -0
- package/packages/core/src/tools/index.ts +14 -1
- package/packages/core/src/tools/office/office-escribir-xlsx.ts +2 -1
- package/packages/core/src/tools/office/office-leer-xlsx.ts +2 -1
- package/packages/core/src/tools/office/xlsx-loader.ts +19 -0
- package/packages/core/src/tools/web/artifact-inspect.ts +2 -2
- package/packages/core/src/tools/web/artifact-read.ts +162 -0
- package/packages/core/src/tools/web/browser-backend.ts +141 -44
- package/packages/core/src/tools/web/browser-click.ts +2 -2
- package/packages/core/src/tools/web/browser-extract.ts +2 -2
- package/packages/core/src/tools/web/browser-navigate.ts +2 -2
- package/packages/core/src/tools/web/browser-screenshot.ts +12 -5
- package/packages/core/src/tools/web/browser-script.ts +2 -2
- package/packages/core/src/tools/web/browser-service.ts +63 -384
- package/packages/core/src/tools/web/browser-session.ts +125 -0
- package/packages/core/src/tools/web/browser-type.ts +2 -2
- package/packages/core/src/tools/web/browser-wait.ts +2 -2
- package/packages/core/src/tools/web/computer-use.ts +553 -0
- package/packages/core/src/tools/web/index.ts +8 -1
- package/packages/core/src/tools/web/webview-backend.ts +460 -21
- package/packages/core/src/utils/index.ts +1 -0
- package/packages/core/src/utils/logger.ts +12 -4
- package/packages/core/src/utils/redact-binary.ts +17 -0
- package/packages/core/src/utils/toon.ts +1 -1
- package/packages/core/src/voice/index.ts +6 -6
- package/bun.lock +0 -859
- package/bunfig.toml +0 -9
- package/docs/API-AGENTS.md +0 -367
- package/docs/API-CONTEXT-COMPILER.md +0 -249
- package/docs/API-DAG-SCHEDULER.md +0 -273
- package/docs/API-TOOLS-SKILLS-CHANNELS.md +0 -446
- package/docs/API-WORKERS-EVENTS.md +0 -299
- package/docs/HIVE-HARNESS.md +0 -113
- package/docs/INDEX.md +0 -190
- package/docs/TEMPLATE-HIVE-APP.md +0 -360
- package/packages/cli/package.json +0 -17
- package/packages/cli/src/commands/create-app.test.ts +0 -180
- package/packages/core/package.json +0 -70
- package/packages/core/src/api/createAgent.test.ts +0 -160
- package/packages/core/src/canvas/canvas.test.ts +0 -36
- package/packages/core/src/channels/channels.test.ts +0 -18
- package/packages/core/src/ethics/EthicsGuard.test.ts +0 -108
- package/packages/core/src/gateway/gateway.test.ts +0 -38
- package/packages/core/src/memory/Scratchpad.test.ts +0 -68
- package/packages/core/src/scheduler/scheduler.test.ts +0 -15
- package/packages/core/src/skills/skills.test.ts +0 -62
- package/packages/core/src/swarm/swarm.test.ts +0 -24
- package/packages/core/src/tool-runtime/tool-runtime.test.ts +0 -99
- package/packages/core/src/tools/ToolRegistry.test.ts +0 -98
- package/packages/core/src/tools/api/api-request.test.ts +0 -164
- package/packages/core/src/tools/web/browser-service.test.ts +0 -83
- package/packages/core/src/workers/workers.test.ts +0 -41
- package/scripts/bump-version.ts +0 -248
- package/scripts/generate-skill-bundle.ts +0 -108
- package/test/acceptance-checks.test.ts +0 -403
- package/test/agent-loop-terminal-synthesis.test.ts +0 -32
- package/test/browser-backend.test.ts +0 -308
- package/test/catalog-agents-stay-enabled.test.ts +0 -117
- package/test/causal-events.test.ts +0 -117
- package/test/compaction.test.ts +0 -105
- package/test/context-compiler.test.ts +0 -269
- package/test/curator.test.ts +0 -130
- package/test/durable-queue.test.ts +0 -114
- package/test/harness-barrel.test.ts +0 -64
- package/test/hive-helpers.test.ts +0 -130
- package/test/hivedb-search.test.ts +0 -189
- package/test/internal-turns.test.ts +0 -166
- package/test/job-idempotency.test.ts +0 -68
- package/test/job-retry-backoff.test.ts +0 -184
- package/test/job-store.test.ts +0 -381
- package/test/llm-retry.test.ts +0 -97
- package/test/memory-perf.test.ts +0 -774
- package/test/minimal-loadout.test.ts +0 -78
- package/test/model-catalog.test.ts +0 -105
- package/test/preload.ts +0 -12
- package/test/reflector.test.ts +0 -320
- package/test/retention-cap.test.ts +0 -91
- package/test/retired-capabilities-pruned.test.ts +0 -192
- package/test/run-store.test.ts +0 -355
- package/test/scratchpad.test.ts +0 -74
- package/test/secrets-durability.test.ts +0 -119
- package/test/seed-model-reseed.test.ts +0 -155
- package/test/setup-agent-seed.test.ts +0 -264
- package/test/tool-inventory.test.ts +0 -65
- package/test/tool-runtime.test.ts +0 -258
- package/test/tool-selector-runtime-tools.test.ts +0 -117
- package/test/toon.test.ts +0 -429
- package/tsconfig.json +0 -42
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
# API Reference — DAG Scheduler
|
|
2
|
-
|
|
3
|
-
## Índice
|
|
4
|
-
|
|
5
|
-
1. [Arquitectura](#arquitectura)
|
|
6
|
-
2. [TaskNode](#tasknode)
|
|
7
|
-
3. [TaskGraph](#taskgraph)
|
|
8
|
-
4. [DAGScheduler](#dagscheduler)
|
|
9
|
-
5. [Estrategias](#estrategias)
|
|
10
|
-
6. [Presets](#presets)
|
|
11
|
-
7. [EventBridge](#eventbridge)
|
|
12
|
-
8. [Errores Comunes](#errores-comunes)
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Arquitectura
|
|
17
|
-
|
|
18
|
-
El DAG Scheduler orquesta la ejecución de grafos acíclicos dirigidos (DAG) de tareas.
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
TaskNode → TaskGraph → DAGScheduler
|
|
22
|
-
│
|
|
23
|
-
┌──────────────┼──────────────┐
|
|
24
|
-
▼ ▼ ▼
|
|
25
|
-
Worker 1 Worker 2 Worker 3
|
|
26
|
-
(agente) (agente) (agente)
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## TaskNode
|
|
32
|
-
|
|
33
|
-
Representa una tarea individual en el grafo.
|
|
34
|
-
|
|
35
|
-
### TaskNodeConfig
|
|
36
|
-
|
|
37
|
-
```typescript
|
|
38
|
-
import { TaskNode } from "@johpaz/hive-sdk";
|
|
39
|
-
|
|
40
|
-
interface TaskNodeConfig {
|
|
41
|
-
id: string;
|
|
42
|
-
agentId: string;
|
|
43
|
-
name?: string;
|
|
44
|
-
taskDescription: string;
|
|
45
|
-
deps: string[];
|
|
46
|
-
priority?: number;
|
|
47
|
-
timeout?: number;
|
|
48
|
-
maxRetries?: number;
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Estados
|
|
53
|
-
|
|
54
|
-
```typescript
|
|
55
|
-
type NodeStatus = "PENDING" | "READY" | "RUNNING" | "COMPLETED" | "FAILED";
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Ejemplo
|
|
59
|
-
|
|
60
|
-
```typescript
|
|
61
|
-
const node = new TaskNode({
|
|
62
|
-
id: "fetch-data",
|
|
63
|
-
agentId: "fetcher",
|
|
64
|
-
taskDescription: "Obtener datos de API",
|
|
65
|
-
deps: [],
|
|
66
|
-
});
|
|
67
|
-
node.markRunning();
|
|
68
|
-
// ... ejecutar ...
|
|
69
|
-
node.markCompleted("datos obtenidos");
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## TaskGraph
|
|
75
|
-
|
|
76
|
-
Grafo acíclico dirigido de tareas.
|
|
77
|
-
|
|
78
|
-
```typescript
|
|
79
|
-
import { TaskGraph } from "@johpaz/hive-sdk";
|
|
80
|
-
|
|
81
|
-
const graph = new TaskGraph([
|
|
82
|
-
{ id: "a", agentId: "worker", taskDescription: "Tarea A", deps: [] },
|
|
83
|
-
{ id: "b", agentId: "worker", taskDescription: "Tarea B", deps: ["a"] },
|
|
84
|
-
{ id: "c", agentId: "worker", taskDescription: "Tarea C", deps: ["a"] },
|
|
85
|
-
{ id: "d", agentId: "worker", taskDescription: "Tarea D", deps: ["b", "c"] },
|
|
86
|
-
]);
|
|
87
|
-
|
|
88
|
-
// Nodos listos para ejecutar (sin deps pendientes)
|
|
89
|
-
const ready = graph.getReadyNodes();
|
|
90
|
-
|
|
91
|
-
// IDs de nodos completados
|
|
92
|
-
const completed = graph.getCompletedIds();
|
|
93
|
-
|
|
94
|
-
// Nodos recién listos tras completar uno
|
|
95
|
-
const newlyReady = graph.getNewlyReadyIds(new Set(["a"]));
|
|
96
|
-
|
|
97
|
-
// Resultados de dependencias
|
|
98
|
-
const depResults = graph.getDepResults("d");
|
|
99
|
-
|
|
100
|
-
// Progreso
|
|
101
|
-
const progress = graph.getProgress();
|
|
102
|
-
// { total: 4, completed: 1, running: 0, failed: 0, pending: 3, percentComplete: 25 }
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## DAGScheduler
|
|
108
|
-
|
|
109
|
-
Orquestador principal de la ejecución.
|
|
110
|
-
|
|
111
|
-
```typescript
|
|
112
|
-
import { DAGScheduler, TaskGraph } from "@johpaz/hive-sdk";
|
|
113
|
-
|
|
114
|
-
const graph = new TaskGraph([
|
|
115
|
-
{ id: "fetch", agentId: "fetcher", taskDescription: "Fetch data", deps: [] },
|
|
116
|
-
{ id: "process", agentId: "processor", taskDescription: "Process", deps: ["fetch"] },
|
|
117
|
-
{ id: "save", agentId: "saver", taskDescription: "Save", deps: ["process"] },
|
|
118
|
-
]);
|
|
119
|
-
|
|
120
|
-
const scheduler = new DAGScheduler({
|
|
121
|
-
maxConcurrentWorkers: 2,
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
const result = await scheduler.execute(graph);
|
|
125
|
-
|
|
126
|
-
console.log(`Success: ${result.success}`);
|
|
127
|
-
console.log(`Duration: ${result.totalDurationMs}ms`);
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### DAGResult
|
|
131
|
-
|
|
132
|
-
```typescript
|
|
133
|
-
interface DAGResult {
|
|
134
|
-
swarmId: string;
|
|
135
|
-
totalDurationMs: number;
|
|
136
|
-
completed: NodeSummary[];
|
|
137
|
-
failed: NodeSummary[];
|
|
138
|
-
success: boolean;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
interface NodeSummary {
|
|
142
|
-
id: string;
|
|
143
|
-
name: string;
|
|
144
|
-
status: "COMPLETED" | "FAILED";
|
|
145
|
-
durationMs: number;
|
|
146
|
-
result?: string;
|
|
147
|
-
error?: string;
|
|
148
|
-
retries: number;
|
|
149
|
-
}
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### Control
|
|
153
|
-
|
|
154
|
-
```typescript
|
|
155
|
-
scheduler.abort(); // Abortar ejecución en curso
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## Estrategias
|
|
161
|
-
|
|
162
|
-
### ParallelStrategy (FIFO)
|
|
163
|
-
|
|
164
|
-
```typescript
|
|
165
|
-
import { ParallelStrategy } from "@johpaz/hive-sdk";
|
|
166
|
-
|
|
167
|
-
const strategy = new ParallelStrategy(); // Orden de llegada
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### PriorityStrategy
|
|
171
|
-
|
|
172
|
-
```typescript
|
|
173
|
-
import { PriorityStrategy } from "@johpaz/hive-sdk";
|
|
174
|
-
|
|
175
|
-
const strategy = new PriorityStrategy(); // Por prioridad + path crítico
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### Custom Strategy
|
|
179
|
-
|
|
180
|
-
```typescript
|
|
181
|
-
import type { ExecutionStrategy } from "@johpaz/hive-sdk";
|
|
182
|
-
|
|
183
|
-
const myStrategy: ExecutionStrategy = {
|
|
184
|
-
initialize(nodes) { /* precomputar */ },
|
|
185
|
-
pick(nodes) { return nodes[0]; }, // FIFO
|
|
186
|
-
};
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## Presets
|
|
192
|
-
|
|
193
|
-
Grafos predefinidos.
|
|
194
|
-
|
|
195
|
-
### ResearchPreset
|
|
196
|
-
|
|
197
|
-
```typescript
|
|
198
|
-
import { createResearchGraph } from "@hive/core/swarm/presets";
|
|
199
|
-
|
|
200
|
-
const graph = createResearchGraph({
|
|
201
|
-
agents: { researcher: "researcher-id", writer: "writer-id" },
|
|
202
|
-
query: "Análisis de mercado",
|
|
203
|
-
});
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
### HiveLearnPreset
|
|
207
|
-
|
|
208
|
-
```typescript
|
|
209
|
-
import { createHiveLearnGraph } from "@hive/core/swarm/presets";
|
|
210
|
-
|
|
211
|
-
const graph = createHiveLearnGraph({
|
|
212
|
-
agents: { teacher: "teacher-id", student: "student-id" },
|
|
213
|
-
topic: "Machine Learning",
|
|
214
|
-
});
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
## EventBridge
|
|
220
|
-
|
|
221
|
-
Puente de eventos entre el scheduler y el resto del sistema.
|
|
222
|
-
|
|
223
|
-
```typescript
|
|
224
|
-
import { EventBridge } from "@johpaz/hive-sdk";
|
|
225
|
-
|
|
226
|
-
const bridge = new EventBridge("swarm-123", "project-1", "coordinator-1");
|
|
227
|
-
|
|
228
|
-
bridge.onTaskCompleted = (node, progress) => {
|
|
229
|
-
console.log(`${node.name}: ${progress.percentComplete}%`);
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
bridge.onSwarmCompleted = (result) => {
|
|
233
|
-
console.log(`Swarm completed. Success: ${result.success}`);
|
|
234
|
-
};
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
## IAgentExecutor
|
|
240
|
-
|
|
241
|
-
```typescript
|
|
242
|
-
import type { IAgentExecutor } from "@johpaz/hive-sdk";
|
|
243
|
-
|
|
244
|
-
const myExecutor: IAgentExecutor = {
|
|
245
|
-
async execute(node, depResults, threadId) {
|
|
246
|
-
const context = Object.values(depResults).join("\n");
|
|
247
|
-
return await myCustomFunction(node.taskDescription, context);
|
|
248
|
-
},
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
const result = await scheduler.execute(graph, { executor: myExecutor });
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
---
|
|
255
|
-
|
|
256
|
-
## Errores Comunes
|
|
257
|
-
|
|
258
|
-
### Cyclic dependency detected
|
|
259
|
-
|
|
260
|
-
```typescript
|
|
261
|
-
// ❌ Ciclo: a→b→a
|
|
262
|
-
[{ id: "a", deps: ["b"] }, { id: "b", deps: ["a"] }];
|
|
263
|
-
|
|
264
|
-
// ✅ Sin ciclo
|
|
265
|
-
[{ id: "a", deps: [] }, { id: "b", deps: ["a"] }];
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
### Task timeout
|
|
269
|
-
|
|
270
|
-
```typescript
|
|
271
|
-
// Configurar timeout razonable
|
|
272
|
-
const config = { id: "task", agentId: "w", taskDescription: "...", deps: [], timeout: 30000 };
|
|
273
|
-
```
|
|
@@ -1,446 +0,0 @@
|
|
|
1
|
-
# API Reference — Tools, Skills, MCP, Gateway, Channels y Storage
|
|
2
|
-
|
|
3
|
-
## Índice
|
|
4
|
-
|
|
5
|
-
1. [Tools](#tools)
|
|
6
|
-
2. [Skills](#skills)
|
|
7
|
-
3. [MCP](#mcp)
|
|
8
|
-
4. [Gateway](#gateway)
|
|
9
|
-
5. [Channels](#channels)
|
|
10
|
-
6. [Tool Runtime](#tool-runtime)
|
|
11
|
-
7. [Canvas](#canvas)
|
|
12
|
-
8. [Storage](#storage)
|
|
13
|
-
9. [Config](#config)
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Tools
|
|
18
|
-
|
|
19
|
-
### defineTool
|
|
20
|
-
|
|
21
|
-
Función para definir herramientas que el agente puede invocar.
|
|
22
|
-
|
|
23
|
-
```typescript
|
|
24
|
-
import { defineTool } from "@johpaz/hive-sdk";
|
|
25
|
-
|
|
26
|
-
const tool = defineTool({
|
|
27
|
-
name: "saludar",
|
|
28
|
-
description: "Saluda a alguien por su nombre",
|
|
29
|
-
execute: async (args: { nombre: string }) => {
|
|
30
|
-
return { mensaje: `¡Hola ${args.nombre}!` };
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### ToolRegistry
|
|
36
|
-
|
|
37
|
-
Registro central de herramientas.
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
import { ToolRegistry, defineTool } from "@johpaz/hive-sdk";
|
|
41
|
-
|
|
42
|
-
const reg = new ToolRegistry();
|
|
43
|
-
|
|
44
|
-
reg.register(defineTool({ name: "t1", description: "...", execute: async () => ({}) }));
|
|
45
|
-
|
|
46
|
-
reg.has("t1"); // true
|
|
47
|
-
reg.get("t1"); // ToolDefinition
|
|
48
|
-
reg.list(); // ToolDefinition[]
|
|
49
|
-
reg.getByCategory("web"); // Filtrar por categoría
|
|
50
|
-
reg.getNames(); // ["t1"]
|
|
51
|
-
reg.size(); // 1
|
|
52
|
-
reg.merge(otherRegistry);
|
|
53
|
-
reg.clear();
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### ToolExecutor
|
|
57
|
-
|
|
58
|
-
Ejecutor de herramientas con validación Zod.
|
|
59
|
-
|
|
60
|
-
```typescript
|
|
61
|
-
import { ToolRegistry, ToolExecutor, defineTool } from "@johpaz/hive-sdk";
|
|
62
|
-
|
|
63
|
-
const reg = new ToolRegistry();
|
|
64
|
-
reg.register(defineTool({
|
|
65
|
-
name: "echo",
|
|
66
|
-
description: "Echo",
|
|
67
|
-
execute: async (args) => args,
|
|
68
|
-
}));
|
|
69
|
-
|
|
70
|
-
const exec = new ToolExecutor(reg);
|
|
71
|
-
const result = await exec.execute("echo", { msg: "hola" });
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Tool Selection (BM25)
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
import { selectTools, CORE_TOOL_CATALOG } from "@johpaz/hive-sdk";
|
|
78
|
-
|
|
79
|
-
const tools = selectTools("Buscar archivos en el proyecto");
|
|
80
|
-
const webTools = tools.filter(t => t.category === "web");
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Built-in Web + API Tools
|
|
84
|
-
|
|
85
|
-
El SDK expone herramientas web/browser listas para usar:
|
|
86
|
-
|
|
87
|
-
```typescript
|
|
88
|
-
import {
|
|
89
|
-
webSearchTool,
|
|
90
|
-
webFetchTool,
|
|
91
|
-
apiRequestTool,
|
|
92
|
-
browserNavigateTool,
|
|
93
|
-
browserScreenshotTool,
|
|
94
|
-
browserClickTool,
|
|
95
|
-
browserTypeTool,
|
|
96
|
-
browserExtractTool,
|
|
97
|
-
browserScriptTool,
|
|
98
|
-
browserWaitTool,
|
|
99
|
-
} from "@johpaz/hive-sdk";
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
#### Browser automation (agent-browser)
|
|
103
|
-
|
|
104
|
-
Las herramientas `browser_*` usan [`agent-browser`](https://www.npmjs.com/package/agent-browser), un CLI Rust que gestiona Chrome/Chromium internamente vía CDP. En el primer uso se instala automáticamente en `~/.hive/agent-browser` y se descarga Chrome si es necesario.
|
|
105
|
-
|
|
106
|
-
```typescript
|
|
107
|
-
import { initializeBrowserService, getBrowserService } from "@johpaz/hive-sdk";
|
|
108
|
-
|
|
109
|
-
const browserService = initializeBrowserService(config);
|
|
110
|
-
await browserService.start();
|
|
111
|
-
|
|
112
|
-
const view = await browserService.getView();
|
|
113
|
-
await view.navigate("https://example.com");
|
|
114
|
-
const snapshot = await view.snapshot({ compact: true, depth: 3 });
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
#### api_request
|
|
118
|
-
|
|
119
|
-
Conecta APIs REST con autenticación y métodos HTTP:
|
|
120
|
-
|
|
121
|
-
```typescript
|
|
122
|
-
const result = await apiRequestTool.execute({
|
|
123
|
-
method: "POST",
|
|
124
|
-
url: "https://api.example.com/items",
|
|
125
|
-
headers: {
|
|
126
|
-
"Content-Type": "application/json",
|
|
127
|
-
Authorization: `Bearer ${process.env.API_TOKEN}`,
|
|
128
|
-
},
|
|
129
|
-
body: JSON.stringify({ name: "example" }),
|
|
130
|
-
query_params: { verbose: "1" },
|
|
131
|
-
timeout_ms: 30000,
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
// → { ok, status, statusText, headers, body, contentType, url }
|
|
135
|
-
// `body` viene parseado si la respuesta es JSON, y como string si no.
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Nunca lanza: un fallo de red o un método inválido vuelven como
|
|
139
|
-
`{ ok: false, error }`. No tiene helpers de autenticación — la credencial va
|
|
140
|
-
como un header más.
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Skills
|
|
145
|
-
|
|
146
|
-
### defineSkill
|
|
147
|
-
|
|
148
|
-
```typescript
|
|
149
|
-
import { defineSkill } from "@johpaz/hive-sdk";
|
|
150
|
-
|
|
151
|
-
const skill = defineSkill({
|
|
152
|
-
name: "file-manager",
|
|
153
|
-
description: "Gestiona archivos y directorios",
|
|
154
|
-
steps: [
|
|
155
|
-
{ action: "fs_list", instruction: "Listar archivos" },
|
|
156
|
-
{ action: "fs_read", instruction: "Leer archivo" },
|
|
157
|
-
],
|
|
158
|
-
tools: ["fs_list", "fs_read"],
|
|
159
|
-
triggers: ["archivo", "directorio", "listar"],
|
|
160
|
-
});
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### SkillLoader
|
|
164
|
-
|
|
165
|
-
```typescript
|
|
166
|
-
import { SkillLoader } from "@johpaz/hive-sdk";
|
|
167
|
-
|
|
168
|
-
const loader = new SkillLoader({
|
|
169
|
-
allowBundled: ["file-manager", "web-researcher"],
|
|
170
|
-
managedDir: "./skills",
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
const skills = loader.list();
|
|
174
|
-
const skill = loader.get("file-manager");
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### Skills empaquetadas
|
|
178
|
-
|
|
179
|
-
El SDK incluye 23 skills empaquetadas. Algunas útiles para web y APIs:
|
|
180
|
-
|
|
181
|
-
- `web_research` — búsqueda y síntesis con `web_search` + `web_fetch`.
|
|
182
|
-
- `browser_scrape` — captura de contenido renderizado con screenshots.
|
|
183
|
-
- `browser_automate` — automatización de flujos web (clicks, formularios).
|
|
184
|
-
- `api_client` — consumo de APIs REST con `api_request`.
|
|
185
|
-
- `capability_discovery` — la skill mínima: enseña al agente a encontrar el resto.
|
|
186
|
-
|
|
187
|
-
Se generan desde los `SKILL.md` de `packages/core/src/skills/bundled/`:
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
bun run skills:bundle
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
En 0.1.5 se retiraron 21 skills que invocaban tools inexistentes (`voice_*`,
|
|
194
|
-
`meeting_transcription`, `canvas_*`, `code_*`, `project_*`): el selector se las
|
|
195
|
-
podía ofrecer al modelo y la ejecución moría sin ejecutor. Hay un test que falla
|
|
196
|
-
si alguna vuelve a declarar una tool que no está en el registry.
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
|
|
200
|
-
## MCP
|
|
201
|
-
|
|
202
|
-
Model Context Protocol — herramientas externas via STDIO/SSE/WebSocket.
|
|
203
|
-
|
|
204
|
-
### MCPClientManager
|
|
205
|
-
|
|
206
|
-
```typescript
|
|
207
|
-
import { MCPClientManager } from "@johpaz/hive-sdk";
|
|
208
|
-
|
|
209
|
-
const mcp = new MCPClientManager({
|
|
210
|
-
servers: {
|
|
211
|
-
"filesystem": {
|
|
212
|
-
transport: "stdio",
|
|
213
|
-
command: "npx",
|
|
214
|
-
args: ["-y", "@modelcontextprotocol/server-filesystem", "./data"],
|
|
215
|
-
enabled: true,
|
|
216
|
-
},
|
|
217
|
-
"weather-api": {
|
|
218
|
-
transport: "sse",
|
|
219
|
-
url: "https://api.weather.com/mcp",
|
|
220
|
-
enabled: true,
|
|
221
|
-
},
|
|
222
|
-
},
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
await mcp.initialize();
|
|
226
|
-
const tools = mcp.getTools("filesystem");
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### Transports
|
|
230
|
-
|
|
231
|
-
```typescript
|
|
232
|
-
import { createTransport, SSETransport, WebSocketTransport } from "@johpaz/hive-sdk";
|
|
233
|
-
|
|
234
|
-
const transport = createTransport({
|
|
235
|
-
type: "stdio",
|
|
236
|
-
stdio: { command: "npx", args: ["-y", "server"], env: {} },
|
|
237
|
-
});
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
## Gateway
|
|
243
|
-
|
|
244
|
-
Servidor HTTP/WebSocket simplificado para exponer el agente como API.
|
|
245
|
-
|
|
246
|
-
### startGateway
|
|
247
|
-
|
|
248
|
-
```typescript
|
|
249
|
-
import { startGateway } from "@johpaz/hive-sdk";
|
|
250
|
-
|
|
251
|
-
const server = await startGateway({
|
|
252
|
-
host: "127.0.0.1",
|
|
253
|
-
port: 18790,
|
|
254
|
-
agentId: "coordinator",
|
|
255
|
-
mcpManager: null,
|
|
256
|
-
});
|
|
257
|
-
|
|
258
|
-
console.log(`Gateway at http://127.0.0.1:18790`);
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
### Endpoints
|
|
262
|
-
|
|
263
|
-
| Método | Ruta | Descripción |
|
|
264
|
-
|--------|------|-------------|
|
|
265
|
-
| GET | `/status` | Health check |
|
|
266
|
-
| POST | `/chat` | Chat con el agente |
|
|
267
|
-
| WS | `/ws` | WebSocket streaming |
|
|
268
|
-
|
|
269
|
-
### Ejemplo: Chat HTTP
|
|
270
|
-
|
|
271
|
-
```typescript
|
|
272
|
-
const res = await fetch("http://127.0.0.1:18790/chat", {
|
|
273
|
-
method: "POST",
|
|
274
|
-
headers: { "Content-Type": "application/json" },
|
|
275
|
-
body: JSON.stringify({ message: "Hello!", threadId: "t1" }),
|
|
276
|
-
});
|
|
277
|
-
|
|
278
|
-
const data = await res.json();
|
|
279
|
-
console.log(data.response);
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
## Channels
|
|
285
|
-
|
|
286
|
-
Integraciones con plataformas de mensajería.
|
|
287
|
-
|
|
288
|
-
### ChannelManager
|
|
289
|
-
|
|
290
|
-
```typescript
|
|
291
|
-
import { ChannelManager } from "@johpaz/hive-sdk";
|
|
292
|
-
|
|
293
|
-
const manager = new ChannelManager(config);
|
|
294
|
-
await manager.initialize();
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
### Canales soportados
|
|
298
|
-
|
|
299
|
-
```typescript
|
|
300
|
-
import {
|
|
301
|
-
TelegramChannel,
|
|
302
|
-
DiscordChannel,
|
|
303
|
-
WhatsAppChannel,
|
|
304
|
-
SlackChannel,
|
|
305
|
-
WebChatChannel,
|
|
306
|
-
} from "@johpaz/hive-sdk";
|
|
307
|
-
|
|
308
|
-
// Telegram
|
|
309
|
-
const telegram = new TelegramChannel({ botToken: process.env.TELEGRAM_BOT_TOKEN! });
|
|
310
|
-
|
|
311
|
-
// Discord
|
|
312
|
-
const discord = new DiscordChannel({ botToken: process.env.DISCORD_BOT_TOKEN! });
|
|
313
|
-
|
|
314
|
-
// WhatsApp
|
|
315
|
-
const whatsapp = new WhatsAppChannel();
|
|
316
|
-
|
|
317
|
-
// Slack
|
|
318
|
-
const slack = new SlackChannel({ botToken: process.env.SLACK_BOT_TOKEN! });
|
|
319
|
-
|
|
320
|
-
// Webchat
|
|
321
|
-
const webchat = new WebChatChannel();
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
## Tool Runtime
|
|
327
|
-
|
|
328
|
-
Ejecución paralela de herramientas vía Bun Workers.
|
|
329
|
-
|
|
330
|
-
### executeToolBatch
|
|
331
|
-
|
|
332
|
-
```typescript
|
|
333
|
-
import { executeToolBatch, shutdownToolRuntime } from "@johpaz/hive-sdk";
|
|
334
|
-
|
|
335
|
-
const results = await executeToolBatch({
|
|
336
|
-
toolCalls: [
|
|
337
|
-
{ id: "1", function: { name: "search", arguments: JSON.stringify({ q: "AI" }) } },
|
|
338
|
-
{ id: "2", function: { name: "fetch", arguments: JSON.stringify({ url: "..." }) } },
|
|
339
|
-
],
|
|
340
|
-
allTools: [searchTool, fetchTool],
|
|
341
|
-
toolConfig: { user_id: "u1", thread_id: "t1" },
|
|
342
|
-
hiveConfig: loadConfig(),
|
|
343
|
-
workerPool: {
|
|
344
|
-
enabled: true,
|
|
345
|
-
maxWorkers: 4,
|
|
346
|
-
toolTimeoutMs: 30000,
|
|
347
|
-
parallelToolCalls: true,
|
|
348
|
-
},
|
|
349
|
-
});
|
|
350
|
-
|
|
351
|
-
// Limpieza
|
|
352
|
-
shutdownToolRuntime();
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
### ToolBatchResult
|
|
356
|
-
|
|
357
|
-
```typescript
|
|
358
|
-
interface ToolBatchResult {
|
|
359
|
-
toolCall: ToolCallLike;
|
|
360
|
-
toolName: string;
|
|
361
|
-
result: unknown;
|
|
362
|
-
ok: boolean;
|
|
363
|
-
durationMs: number;
|
|
364
|
-
error?: SerializedError;
|
|
365
|
-
timedOut?: boolean;
|
|
366
|
-
aborted?: boolean;
|
|
367
|
-
}
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
---
|
|
371
|
-
|
|
372
|
-
## Canvas
|
|
373
|
-
|
|
374
|
-
Visualización en tiempo real del estado de agentes.
|
|
375
|
-
|
|
376
|
-
```typescript
|
|
377
|
-
import { emitCanvas, subscribeCanvas, unsubscribeCanvas } from "@johpaz/hive-sdk";
|
|
378
|
-
|
|
379
|
-
const handler = (data: any) => console.log("Canvas:", data);
|
|
380
|
-
subscribeCanvas(handler);
|
|
381
|
-
|
|
382
|
-
emitCanvas("canvas:node_update", {
|
|
383
|
-
nodeId: "agent-1",
|
|
384
|
-
changes: { status: "running", currentTool: "web_search" },
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
unsubscribeCanvas(handler);
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
---
|
|
391
|
-
|
|
392
|
-
## Storage
|
|
393
|
-
|
|
394
|
-
HiveDB (`@johpaz/hive-db`), un motor embebido con colecciones de documentos e
|
|
395
|
-
índice BM25. Reemplazó a SQLite + FTS5 en 0.1.5.
|
|
396
|
-
|
|
397
|
-
```typescript
|
|
398
|
-
import { ensureHiveDb, col } from "@johpaz/hive-sdk";
|
|
399
|
-
import type { AgentDoc } from "@johpaz/hive-sdk";
|
|
400
|
-
|
|
401
|
-
// Abre la base, crea los índices y siembra el catálogo. Idempotente.
|
|
402
|
-
await ensureHiveDb();
|
|
403
|
-
|
|
404
|
-
const agents = await col<AgentDoc>("agents");
|
|
405
|
-
|
|
406
|
-
const one = await agents.get(agentId); // { id, doc, version } | undefined
|
|
407
|
-
const workers = await agents.findBy("role", "worker");
|
|
408
|
-
const all = await agents.scan({});
|
|
409
|
-
const scoped = await agents.scan({ prefix: `${threadId}:` });
|
|
410
|
-
|
|
411
|
-
// Escritura con concurrencia optimista
|
|
412
|
-
await agents.put(agentId, { ...one.doc, status: "idle" }, { expectedVersion: one.version });
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
`HIVE_DB_PATH=":memory:"` abre una base efímera — es lo que usa la suite de
|
|
416
|
-
tests para no tocar la del usuario.
|
|
417
|
-
|
|
418
|
-
### Búsqueda de capacidad
|
|
419
|
-
|
|
420
|
-
El índice BM25 es lo que hace funcionar a `search_knowledge`: el agente arranca
|
|
421
|
-
con un loadout mínimo y descubre el resto en runtime.
|
|
422
|
-
|
|
423
|
-
```typescript
|
|
424
|
-
import { selectTools, selectSkills } from "@johpaz/hive-sdk";
|
|
425
|
-
|
|
426
|
-
const tools = await selectTools("leer un archivo del workspace");
|
|
427
|
-
const skills = await selectSkills("investigar en la web");
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
Una tool declarada con `defineTool` y pasada a `createAgent` queda indexada
|
|
431
|
-
automáticamente, así que el modelo puede descubrirla igual que a las nativas.
|
|
432
|
-
|
|
433
|
-
---
|
|
434
|
-
|
|
435
|
-
## Config
|
|
436
|
-
|
|
437
|
-
```typescript
|
|
438
|
-
import { loadConfig, loadEnv, getHiveDir } from "@johpaz/hive-sdk";
|
|
439
|
-
|
|
440
|
-
const config = await loadConfig();
|
|
441
|
-
const hiveDir = getHiveDir(); // ~/.hive o HIVE_DATA_DIR
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
---
|
|
445
|
-
|
|
446
|
-
*Documentación Hive SDK v0.0.17*
|