@johpaz/hive-sdk 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -4
- package/README.md +48 -7
- package/SECURITY.md +17 -0
- package/docs/API-AGENTS.md +430 -0
- package/docs/API-ARTIFACTS.md +55 -0
- package/docs/API-CONTEXT-COMPILER.md +285 -0
- package/docs/API-CRON.md +188 -0
- package/docs/API-DAG-SCHEDULER.md +291 -0
- package/docs/API-HOOKS.md +147 -0
- package/docs/API-RESILIENCE.md +45 -0
- package/docs/API-SERVICES.md +458 -0
- package/docs/API-SESSIONS.md +146 -0
- package/docs/API-TOOLS-SKILLS-CHANNELS.md +499 -0
- package/docs/API-WORKERS-EVENTS.md +311 -0
- package/docs/HIVE-HARNESS.md +232 -0
- package/docs/INDEX.md +198 -0
- package/docs/SECURITY-GUARDRAILS.md +87 -0
- package/docs/TEMPLATE-HIVE-APP.md +360 -0
- package/docs/UPGRADING.md +65 -0
- package/docs/assets/logoblack.png +0 -0
- package/docs/assets/logocolor-dark.png +0 -0
- package/docs/assets/logocolorbg.png +0 -0
- package/docs/plans/2026-09-05-office-dependency-hardening-design.md +28 -0
- package/docs/plans/2026-09-06-dependency-audit-remediation-design.md +25 -0
- package/docs/plans/2026-09-06-pptx-image-size-remediation-design.md +54 -0
- package/docs/plans/2026-09-06-typescript7-bun142-documentation-design.md +48 -0
- package/package.json +9 -8
- package/packages/cli/templates/hive-app/package.json +3 -0
- package/packages/core/src/agent/llm-providers/hiveagents.ts +2 -2
- package/packages/core/src/agent/providers/index.ts +17 -1
- package/packages/core/src/api/createAgent.ts +4 -2
- package/packages/core/src/config/loader.ts +2 -1
- package/packages/core/src/gateway/server.ts +1 -1
- package/packages/core/src/mcp/transports/sse.ts +22 -8
- package/packages/core/src/mcp/transports/websocket.ts +11 -9
- package/packages/core/src/scheduler/CronScheduler.ts +4 -2
- package/packages/core/src/scheduler/cron/job.ts +2 -1
- package/packages/core/src/scheduler/cron/zoned-time.ts +2 -1
- package/packages/core/src/tool-runtime/tool-worker.ts +3 -1
- package/packages/core/src/tools/office/office-escribir-pptx.ts +3 -1
- package/packages/core/src/tools/office/office-leer-pdf.ts +93 -44
- package/packages/core/src/tools/office/office-leer-xlsx.ts +36 -10
- package/packages/core/src/tools/office/security-limits.ts +28 -0
- package/packages/core/src/utils/port.ts +33 -0
- package/packages/core/src/vendor/pptxgenjs/LICENSE +21 -0
- package/packages/core/src/vendor/pptxgenjs/README.md +17 -0
- package/packages/core/src/vendor/pptxgenjs/pptxgen.es.d.ts +17 -0
- package/packages/core/src/vendor/pptxgenjs/pptxgen.es.js +7368 -0
- package/packages/core/src/voice/index.ts +6 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolvePort } from "../utils/port.ts";
|
|
1
2
|
import { col } from "../storage/hive.ts";
|
|
2
3
|
import type { ChannelDoc, ModelDoc } from "../storage/collections.ts";
|
|
3
4
|
import { loadProviderApiKey } from "../storage/crypto.ts";
|
|
@@ -164,7 +165,7 @@ class VoiceService {
|
|
|
164
165
|
throw new Error("GROQ_API_KEY not configured. Configúrala en Proveedores o en las variables de entorno.");
|
|
165
166
|
}
|
|
166
167
|
|
|
167
|
-
let audioData: ArrayBuffer
|
|
168
|
+
let audioData: Uint8Array<ArrayBuffer>;
|
|
168
169
|
|
|
169
170
|
if (audio.type === "buffer") {
|
|
170
171
|
audioData = new Uint8Array((audio.data as Buffer));
|
|
@@ -186,7 +187,7 @@ class VoiceService {
|
|
|
186
187
|
: mime.includes("wav") ? "wav"
|
|
187
188
|
: mime.includes("flac") ? "flac"
|
|
188
189
|
: "ogg";
|
|
189
|
-
const blob = new Blob([audioData
|
|
190
|
+
const blob = new Blob([audioData], { type: mime });
|
|
190
191
|
const formData = new FormData();
|
|
191
192
|
formData.append("file", blob, `audio.${ext}`);
|
|
192
193
|
formData.append("model", modelId);
|
|
@@ -216,7 +217,7 @@ class VoiceService {
|
|
|
216
217
|
throw new Error("OPENAI_API_KEY not configured. Configúrala en Proveedores o en las variables de entorno.");
|
|
217
218
|
}
|
|
218
219
|
|
|
219
|
-
let audioData: ArrayBuffer
|
|
220
|
+
let audioData: Uint8Array<ArrayBuffer>;
|
|
220
221
|
|
|
221
222
|
if (audio.type === "buffer") {
|
|
222
223
|
audioData = new Uint8Array(audio.data as Buffer);
|
|
@@ -231,7 +232,7 @@ class VoiceService {
|
|
|
231
232
|
throw new Error("Invalid audio input type");
|
|
232
233
|
}
|
|
233
234
|
|
|
234
|
-
const blob = new Blob([audioData
|
|
235
|
+
const blob = new Blob([audioData], { type: audio.mimeType || "audio/webm" });
|
|
235
236
|
const formData = new FormData();
|
|
236
237
|
formData.append("file", blob, "audio.webm");
|
|
237
238
|
|
|
@@ -281,7 +282,7 @@ class VoiceService {
|
|
|
281
282
|
|
|
282
283
|
private async speakWithPiper(text: string, voiceId?: string): Promise<AudioOutput> {
|
|
283
284
|
const cleanText = cleanTextForTTS(text);
|
|
284
|
-
const port =
|
|
285
|
+
const port = resolvePort(process.env.TTS_PORT, 5500);
|
|
285
286
|
const res = await fetch(`http://localhost:${port}/tts`, {
|
|
286
287
|
method: "POST",
|
|
287
288
|
headers: { "Content-Type": "application/json" },
|