@johpaz/hive-agents 1.1.5 → 1.1.11
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 +4 -10
- package/dist/hive.js +218257 -148718
- package/dist/tool-worker.js +68422 -1622
- package/dist/ui/assets/{A2UIPage-Dr3p75oE.js → A2UIPage-v-VggXW3.js} +4 -4
- package/dist/ui/assets/{AgentCreateForm-DqYhH_gm.js → AgentCreateForm-Dr1l4Cvg.js} +1 -1
- package/dist/ui/assets/AgentDetailPage-Dsh_grrr.js +1 -0
- package/dist/ui/assets/{AgentNewPage-BRpFxJIT.js → AgentNewPage-D7557C0J.js} +1 -1
- package/dist/ui/assets/AgentsPage-C_Z56LL1.js +10 -0
- package/dist/ui/assets/{ApiClientPage-R9UDWfR2.js → ApiClientPage-uuBnrh0y.js} +1 -1
- package/dist/ui/assets/ChannelsPage-BI4mAgRU.js +8 -0
- package/dist/ui/assets/DashboardPage-BjAxvzYP.js +6 -0
- package/dist/ui/assets/LoginPage-D7IZKON0.js +1 -0
- package/dist/ui/assets/{LogsPage-DICMU_7m.js → LogsPage-mcqOYvGw.js} +1 -1
- package/dist/ui/assets/MeetingPage-qPJ1z5HA.js +1 -0
- package/dist/ui/assets/ModelSelector-njfNhkng.js +1 -0
- package/dist/ui/assets/{NotFound-D4ZlDVg9.js → NotFound-DY8e1RKh.js} +1 -1
- package/dist/ui/assets/{Office3DPage-31AMJ-LN.css → Office3DPage-C3SIzd2H.css} +1 -1
- package/dist/ui/assets/Office3DPage-Du42LRwi.js +319 -0
- package/dist/ui/assets/ProvidersPage-GDCJs8Zb.js +1 -0
- package/dist/ui/assets/{RecoverPage-Blms3NBa.js → RecoverPage-B6qvBBIl.js} +1 -1
- package/dist/ui/assets/SettingsPage-Br4PfWuc.js +9 -0
- package/dist/ui/assets/{SetupPage-CAjLseE_.js → SetupPage-OaouFLGD.js} +1 -1
- package/dist/ui/assets/{Vignette-DrI2yK2m.js → Vignette-GSZ-owcN.js} +17 -17
- package/dist/ui/assets/VoicePage-DRQZBl3j.js +307 -0
- package/dist/ui/assets/WebChatPage-Cypq-SYi.js +29 -0
- package/dist/ui/assets/{agentCapabilities-CDSfJWhw.js → agentCapabilities-Bf71Gir4.js} +1 -1
- package/dist/ui/assets/{alert-CjiX20jI.js → alert-Dn604uVs.js} +1 -1
- package/dist/ui/assets/{badge-B5AKge1b.js → badge-C6H33ePv.js} +1 -1
- package/dist/ui/assets/{card-mTJ4oZbL.js → card-D0qneq1i.js} +1 -1
- package/dist/ui/assets/{conversationsStore-DhM07qYi.js → conversationsStore-D6XgjMr1.js} +1 -1
- package/dist/ui/assets/{dialog-BP3GTCPn.js → dialog-DO1fQCF7.js} +1 -1
- package/dist/ui/assets/dist-js-C2MfmbEW.js +1 -0
- package/dist/ui/assets/{dist-js-CkNhvsFc.js → dist-js-Djxbxbst.js} +1 -1
- package/dist/ui/assets/google-external-e9lvWjy4.js +1 -0
- package/dist/ui/assets/index-BKNFH2al.css +2 -0
- package/dist/ui/assets/index-U0e4e5mL.js +156 -0
- package/dist/ui/assets/{key-DPkOY-J0.js → key-round-Ca0Ns34v.js} +1 -1
- package/dist/ui/assets/{label-D_fvqJyD.js → label-CvAtVE-v.js} +1 -1
- package/dist/ui/assets/{scroll-area-CbH8FOo8.js → scroll-area-CYMu7sU0.js} +1 -1
- package/dist/ui/assets/select-BjBXxyxL.js +1 -0
- package/dist/ui/assets/{slider-DXS4h1LB.js → slider-DR31eN3r.js} +1 -1
- package/dist/ui/assets/{switch-ndx8VCpm.js → switch-B5dAwb54.js} +1 -1
- package/dist/ui/assets/{tabs-epu-3Tl4.js → tabs-Ct92cLXr.js} +1 -1
- package/dist/ui/assets/{earth-BJRGJbVn.js → terminal-CpBDERBE.js} +1 -1
- package/dist/ui/assets/{textarea-BgZJFZTX.js → textarea-xtFAVuPf.js} +1 -1
- package/dist/ui/assets/{useAudioDevices-zj0fuGwZ.js → useAudioDevices-wZArmV3m.js} +1 -1
- package/dist/ui/assets/{useHiveAgentsModelLoad-Cd9p-bjs.js → useHiveAgentsModelLoad-CqJkzTOT.js} +1 -1
- package/dist/ui/assets/useOfficeModel-DZvwZRCw.js +1 -0
- package/dist/ui/assets/{useProviders-Dj1k5PCk.js → useProviders-CeSzDnx-.js} +1 -1
- package/dist/ui/assets/vendor-router-DxU0Uf4R.js +3 -0
- package/dist/ui/index.html +5 -5
- package/package.json +1 -3
- package/packages/cli/src/commands/onboard.ts +3 -2
- package/packages/core/src/agent/agent-catalog.ts +98 -1
- package/packages/core/src/agent/agent-loop.ts +5 -44
- package/packages/core/src/agent/context-compiler.ts +6 -94
- package/packages/core/src/agent/conversation-store.ts +23 -1
- package/packages/core/src/agent/llm-providers/openai-compat-base.ts +1 -1
- package/packages/core/src/agent/minimal-loadout.ts +1 -0
- package/packages/core/src/agent/prompt-builder.ts +17 -1
- package/packages/core/src/agent/tool-selector.ts +12 -0
- package/packages/core/src/artifacts/store.ts +73 -9
- package/packages/core/src/canvas/emitter.ts +0 -19
- package/packages/core/src/channels/base.ts +26 -0
- package/packages/core/src/channels/discord.ts +18 -2
- package/packages/core/src/channels/slack.ts +37 -7
- package/packages/core/src/channels/telegram.ts +39 -11
- package/packages/core/src/channels/whatsapp.ts +16 -1
- package/packages/core/src/gateway/channel-notify.ts +42 -0
- package/packages/core/src/gateway/google-host.ts +228 -0
- package/packages/core/src/gateway/initializer.ts +8 -0
- package/packages/core/src/gateway/routes/agents.ts +14 -0
- package/packages/core/src/gateway/routes/artifacts.ts +4 -0
- package/packages/core/src/gateway/routes/auth.ts +25 -3
- package/packages/core/src/gateway/routes/chat.ts +14 -1
- package/packages/core/src/gateway/routes/google.ts +252 -0
- package/packages/core/src/gateway/routes/meeting.ts +11 -3
- package/packages/core/src/gateway/routes/models.ts +27 -11
- package/packages/core/src/gateway/routes/multimodal.ts +38 -0
- package/packages/core/src/gateway/routes/providers.ts +19 -18
- package/packages/core/src/gateway/routes/system.ts +1 -3
- package/packages/core/src/gateway/routes/tts-local.ts +20 -374
- package/packages/core/src/gateway/routes/voice.ts +29 -35
- package/packages/core/src/gateway/server.ts +97 -48
- package/packages/core/src/gateway/tts/README.md +7 -86
- package/packages/core/src/gateway/tts/build.py +105 -0
- package/packages/core/src/gateway/tts/kitten.ts +282 -0
- package/packages/core/src/gateway/tts/python.d.ts +4 -0
- package/packages/core/src/gateway/tts/src/detect.ts +33 -39
- package/packages/core/src/gateway/tts/worker.py +80 -0
- package/packages/core/src/gateway/webchat-turn.ts +15 -13
- package/packages/core/src/google/client.ts +123 -0
- package/packages/core/src/google/config.ts +60 -0
- package/packages/core/src/google/google.test.ts +287 -0
- package/packages/core/src/google/index.ts +5 -0
- package/packages/core/src/google/oauth.ts +144 -0
- package/packages/core/src/google/scopes.ts +41 -0
- package/packages/core/src/google/token-store.ts +33 -0
- package/packages/core/src/multimodal/attachment-ingest.ts +190 -0
- package/packages/core/src/multimodal/image-generation.ts +244 -0
- package/packages/core/src/multimodal/vision-analyzer.ts +94 -0
- package/packages/core/src/multimodal/vision-service.ts +25 -0
- package/packages/core/src/storage/collections.ts +8 -8
- package/packages/core/src/storage/google-capabilities.ts +91 -0
- package/packages/core/src/storage/model-activation.ts +18 -0
- package/packages/core/src/storage/model-sync.ts +66 -14
- package/packages/core/src/storage/onboarding.ts +10 -2
- package/packages/core/src/storage/seed.ts +107 -24
- package/packages/core/src/storage/usage.ts +0 -52
- package/packages/core/src/tool-runtime/index.ts +2 -0
- package/packages/core/src/tools/agents/get-available-models.ts +1 -3
- package/packages/core/src/tools/core/index.ts +80 -2
- package/packages/core/src/tools/google/calendar.ts +204 -0
- package/packages/core/src/tools/google/drive.ts +160 -0
- package/packages/core/src/tools/google/gmail.ts +579 -0
- package/packages/core/src/tools/google/index.ts +18 -0
- package/packages/core/src/tools/google/shared.ts +80 -0
- package/packages/core/src/tools/image/image-generate.ts +90 -0
- package/packages/core/src/tools/image/index.ts +13 -0
- package/packages/core/src/tools/image/office-leer-imagenes.ts +198 -0
- package/packages/core/src/tools/index.ts +27 -0
- package/packages/core/src/tools/office/index.ts +9 -0
- package/packages/core/src/tools/office/office-editar-docx.ts +184 -0
- package/packages/core/src/tools/office/office-editar-pptx.ts +126 -0
- package/packages/core/src/tools/office/office-editar-xlsx.ts +122 -0
- package/packages/core/src/tools/office/office-escribir-docx.ts +3 -2
- package/packages/core/src/tools/office/office-escribir-pdf.ts +3 -2
- package/packages/core/src/tools/office/office-escribir-pptx.ts +3 -2
- package/packages/core/src/tools/office/office-escribir-xlsx.ts +3 -2
- package/packages/core/src/tools/office/office-images.ts +137 -0
- package/packages/core/src/tools/office/office-leer-docx.ts +16 -3
- package/packages/core/src/tools/office/office-leer-pdf.ts +41 -57
- package/packages/core/src/tools/office/office-leer-pptx.ts +54 -88
- package/packages/core/src/tools/office/office-leer-xlsx.ts +6 -2
- package/packages/core/src/tools/office/office-pdf-images.ts +225 -0
- package/packages/core/src/tools/office/pdf-text.ts +186 -0
- package/packages/core/src/tools/office/pptx-slides.ts +83 -0
- package/packages/core/src/tools/office/resolve-input.ts +49 -0
- package/packages/core/src/tools/web/browser-screenshot.ts +7 -0
- package/packages/core/src/voice/index.ts +123 -155
- package/packages/core/src/voice/local-model.ts +8 -0
- package/packages/core/src/voice/stt-models.ts +39 -0
- package/packages/skills/src/bundled/google/google_calendar/SKILL.md +51 -0
- package/packages/skills/src/bundled/google/google_drive/SKILL.md +50 -0
- package/packages/skills/src/bundled/google/google_gmail/SKILL.md +61 -0
- package/packages/skills/src/bundled-data.generated.ts +45 -0
- package/dist/ui/assets/AgentDetailPage-BVtE88U5.js +0 -1
- package/dist/ui/assets/AgentsPage-BOIJ55cj.js +0 -10
- package/dist/ui/assets/ChannelsPage-C5V2BmjL.js +0 -8
- package/dist/ui/assets/DashboardPage-B18gMzNj.js +0 -6
- package/dist/ui/assets/LoginPage-nrsYF9AY.js +0 -1
- package/dist/ui/assets/MeetingPage-xslJGfIz.js +0 -1
- package/dist/ui/assets/ModelSelector-BX4IvuYY.js +0 -1
- package/dist/ui/assets/Office3DPage-a6cuzt5X.js +0 -727
- package/dist/ui/assets/ProvidersPage-C8-xGoeh.js +0 -1
- package/dist/ui/assets/SettingsPage-BBeeq_QS.js +0 -9
- package/dist/ui/assets/VoicePage-BeSSYstD.js +0 -307
- package/dist/ui/assets/WebChatPage-Bat7uUfd.js +0 -29
- package/dist/ui/assets/dist-js-jWCEHSkB.js +0 -1
- package/dist/ui/assets/index-BG3nUPKq.js +0 -156
- package/dist/ui/assets/index-DmFPF9xQ.css +0 -2
- package/dist/ui/assets/lock-open-v0EphssG.js +0 -1
- package/dist/ui/assets/select-v_3QBYrD.js +0 -1
- package/dist/ui/assets/terminal-BEcTK780.js +0 -1
- package/dist/ui/assets/useOfficeModel-BaDn7U-X.js +0 -1
- package/dist/ui/assets/vendor-router-DSMCk-Ka.js +0 -3
- package/packages/core/src/agent/jev-decisions.ts +0 -242
- package/packages/core/src/agent/jev-planner.ts +0 -293
- package/packages/core/src/gateway/tts/package.json +0 -25
- package/packages/core/src/gateway/tts/src/client.ts +0 -59
- package/packages/core/src/gateway/tts/src/index.ts +0 -15
- package/packages/core/src/gateway/tts/src/install.ts +0 -137
- package/packages/core/src/gateway/tts/src/models.ts +0 -50
- package/packages/core/src/gateway/tts/src/server.ts +0 -253
- /package/dist/ui/assets/{core-p4c5dns5.js → core-npANj14X.js} +0 -0
- /package/dist/ui/assets/{download-BQXrpH0m.js → download-D0aDV8Y_.js} +0 -0
- /package/dist/ui/assets/{ellipsis-vertical-D7uFJLGh.js → ellipsis-vertical-BOW_iEOO.js} +0 -0
- /package/dist/ui/assets/{external-link-6oTH9pUM.js → external-link-DNJH7epD.js} +0 -0
- /package/dist/ui/assets/{eye-CxvxtQT5.js → eye-BVfTWOME.js} +0 -0
- /package/dist/ui/assets/{file-text-D5ZJEx3E.js → file-text-ByqNMpXm.js} +0 -0
- /package/dist/ui/assets/{gateway-url-BALS_wVh.js → gateway-url-BzQV75Ig.js} +0 -0
- /package/dist/ui/assets/{gauge-CEu7PhTW.js → gauge-CB4np0Vz.js} +0 -0
- /package/dist/ui/assets/{history-DLK5rTlP.js → history-CbhJX41s.js} +0 -0
- /package/dist/ui/assets/{info-8ReWzubE.js → info-BCD3-QX9.js} +0 -0
- /package/dist/ui/assets/{lock-3IApZyVy.js → lock-DpBean4K.js} +0 -0
- /package/dist/ui/assets/{mail-vwCEHyhQ.js → mail-Biwn8WrV.js} +0 -0
- /package/dist/ui/assets/{mic-CpDU_2as.js → mic-Rq4BxU1R.js} +0 -0
- /package/dist/ui/assets/{pause-BAMsNQkh.js → pause-87NGXbsz.js} +0 -0
- /package/dist/ui/assets/{pencil-CKritjT_.js → pencil-BG8EFaS3.js} +0 -0
- /package/dist/ui/assets/{play-Cwpe4tp6.js → play-D3De6YsQ.js} +0 -0
- /package/dist/ui/assets/{plus-RD44ce15.js → plus-Bp8-V68t.js} +0 -0
- /package/dist/ui/assets/{radio-lFPMHi6-.js → radio-m7rzuDKK.js} +0 -0
- /package/dist/ui/assets/{refresh-cw-DtJMHRHO.js → refresh-cw-D6F1zoC6.js} +0 -0
- /package/dist/ui/assets/{rotate-ccw-b3E_4PoX.js → rotate-ccw-DUlEC1_D.js} +0 -0
- /package/dist/ui/assets/{search-z2oZt00P.js → search-CfNwwpMW.js} +0 -0
- /package/dist/ui/assets/{send-CpoY_2F-.js → send-CI868CBV.js} +0 -0
- /package/dist/ui/assets/{settings-qV3kVkeG.js → settings-AEM2uWiD.js} +0 -0
- /package/dist/ui/assets/{shield-CIarwBvx.js → shield-DvVIcbzd.js} +0 -0
- /package/dist/ui/assets/{sparkles-DVvY6jDT.js → sparkles-DRe4GbSH.js} +0 -0
- /package/dist/ui/assets/{square-D5zdNkAY.js → square-DTWkjTT3.js} +0 -0
- /package/dist/ui/assets/{trash-2-D6oziYAK.js → trash-2-BZsMCfso.js} +0 -0
- /package/dist/ui/assets/{utils-DEmd_M8c.js → utils-lc8H6VGT.js} +0 -0
- /package/dist/ui/assets/{volume-2-EaA0JRvD.js → volume-2-CBMYsuF3.js} +0 -0
- /package/dist/ui/assets/{volume-x-CROXNMGT.js → volume-x-vNFf2e4-.js} +0 -0
- /package/dist/ui/assets/{wifi-BUJuOcgP.js → wifi-DNv53AfN.js} +0 -0
- /package/dist/ui/assets/{zap-DSoX9NDk.js → zap-Yed86Sh8.js} +0 -0
|
@@ -2,7 +2,9 @@ import { col, toIndexable, nextId } from "./hive"
|
|
|
2
2
|
import type { Collection } from "@johpaz/hive-db"
|
|
3
3
|
import { logger } from "../utils/logger"
|
|
4
4
|
import { catalogModelKey } from "./model-id"
|
|
5
|
+
import { voiceModelActivation } from "./model-activation"
|
|
5
6
|
import { invalidateModelPricingCache } from "./usage"
|
|
7
|
+
import { DEFAULT_LOCAL_VOICE, isLegacyPiper, LOCAL_TTS_MODEL, LOCAL_TTS_PROVIDER } from "../voice/local-model"
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* Seed de datos predeterminados para Hive
|
|
@@ -49,6 +51,37 @@ export const SEED_DATA: SeedData = {
|
|
|
49
51
|
// ─────────────────────────────────────────
|
|
50
52
|
// 2. WEB — Búsqueda, navegación + automatización
|
|
51
53
|
// ─────────────────────────────────────────
|
|
54
|
+
// ─────────────────────────────────────────
|
|
55
|
+
// GOOGLE — requieren conectar la cuenta en Ajustes → Perfil
|
|
56
|
+
// ─────────────────────────────────────────
|
|
57
|
+
{ id: "gmail_search", name: "gmail_search", category: "google", description: "Buscar correos en Gmail con la sintaxis de Gmail (from:, subject:, is:unread). Sinónimos: buscar correos, correos sin leer, bandeja de entrada (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
58
|
+
{ id: "gmail_read", name: "gmail_read", category: "google", description: "Leer un correo completo de Gmail por id. Sinónimos: abrir correo, leer email, contenido del correo (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
59
|
+
{ id: "gmail_thread", name: "gmail_thread", category: "google", description: "Leer una conversación completa de Gmail. Sinónimos: hilo de correos, historial del correo (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
60
|
+
{ id: "gmail_send", name: "gmail_send", category: "google", description: "Enviar un correo nuevo desde Gmail, con adjuntos; pide confirmación. Sinónimos: mandar email, escribir correo (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
61
|
+
{ id: "gmail_reply", name: "gmail_reply", category: "google", description: "Responder un correo manteniendo el hilo, o responder a todos; pide confirmación. Sinónimos: contestar email (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
62
|
+
{ id: "gmail_forward", name: "gmail_forward", category: "google", description: "Reenviar un correo con su texto y adjuntos; pide confirmación. Sinónimos: forward, pasar correo (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
63
|
+
{ id: "gmail_draft_save", name: "gmail_draft_save", category: "google", description: "Crear o editar un borrador de Gmail sin enviarlo. Sinónimos: guardar borrador, editar borrador (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
64
|
+
{ id: "gmail_draft_list", name: "gmail_draft_list", category: "google", description: "Listar los borradores de Gmail. Sinónimos: ver borradores (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
65
|
+
{ id: "gmail_draft_send", name: "gmail_draft_send", category: "google", description: "Enviar un borrador existente de Gmail; pide confirmación. Sinónimos: enviar borrador (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
66
|
+
{ id: "gmail_draft_delete", name: "gmail_draft_delete", category: "google", description: "Borrar un borrador de Gmail; pide confirmación. Sinónimos: eliminar borrador (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
67
|
+
{ id: "gmail_modify", name: "gmail_modify", category: "google", description: "Marcar leído o no leído, destacar, archivar, mandar a la papelera o etiquetar correos. Sinónimos: marcar como leído, archivar correo (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
68
|
+
{ id: "gmail_labels", name: "gmail_labels", category: "google", description: "Listar, crear, renombrar o borrar etiquetas de Gmail. Sinónimos: carpetas de gmail (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
69
|
+
{ id: "gmail_attachment_download", name: "gmail_attachment_download", category: "google", description: "Descargar un adjunto de un correo recibido a un artifact. Sinónimos: guardar adjunto (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
70
|
+
{ id: "gcal_list_events", name: "gcal_list_events", category: "google", description: "Listar eventos de Google Calendar en un rango. Sinónimos: ver agenda, próximos eventos, reuniones de la semana (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
71
|
+
{ id: "gcal_create_event", name: "gcal_create_event", category: "google", description: "Crear un evento en Google Calendar, con invitados y Meet; con invitados pide confirmación. Sinónimos: agendar reunión, programar cita (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
72
|
+
{ id: "gcal_update_event", name: "gcal_update_event", category: "google", description: "Modificar un evento de Google Calendar; pide confirmación. Sinónimos: mover reunión, reprogramar (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
73
|
+
{ id: "gcal_delete_event", name: "gcal_delete_event", category: "google", description: "Cancelar un evento de Google Calendar; pide confirmación. Sinónimos: borrar evento (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
74
|
+
{ id: "gcal_freebusy", name: "gcal_freebusy", category: "google", description: "Consultar disponibilidad (ocupado/libre) de uno o varios calendarios. Sinónimos: horarios libres (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
75
|
+
{ id: "gdrive_search", name: "gdrive_search", category: "google", description: "Buscar archivos en Google Drive por nombre o contenido. Sinónimos: buscar en drive (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
76
|
+
{ id: "gdrive_download", name: "gdrive_download", category: "google", description: "Descargar o exportar un archivo de Google Drive a un artifact. Sinónimos: leer documento de google (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
77
|
+
{ id: "gdrive_upload", name: "gdrive_upload", category: "google", description: "Subir un archivo nuevo a Google Drive. Sinónimos: guardar en drive (Requiere conectar tu cuenta de Google en tu perfil.)" },
|
|
78
|
+
|
|
79
|
+
// ─────────────────────────────────────────
|
|
80
|
+
// IMAGEN — usa el modelo elegido en Providers → Imagen
|
|
81
|
+
// ─────────────────────────────────────────
|
|
82
|
+
{ id: "image_generate", name: "image_generate", category: "image", description: "Crear una imagen nueva a partir de una descripción (ilustración, logo, póster, arte conceptual) con el modelo elegido en Providers → Imagen. Sinónimos: crear imagen, generar imagen, dibujar, hazme una imagen" },
|
|
83
|
+
{ id: "office_leer_imagenes", name: "office_leer_imagenes", category: "image", description: "Leer las imágenes dentro de un Word (.docx) o PowerPoint (.pptx): capturas, gráficos, diagramas, escaneos. Las describe y transcribe con el modelo de visión de Providers → Imagen. Sinónimos: leer imágenes de un documento, ocr de word, ocr de powerpoint, capturas dentro de un documento" },
|
|
84
|
+
|
|
52
85
|
{ id: "api_request", name: "api_request", category: "api", description: "Ejecutar una petición HTTP autorizada contra un endpoint REST y validar la respuesta. Sinónimos: llamar api, request rest, consumir endpoint, petición http, hacer get, hacer post" },
|
|
53
86
|
{ id: "web_search", name: "web_search", category: "web", description: "Buscar en la web información actual y noticias. Sinónimos: búsqueda web, noticias, información, buscar en internet, google" },
|
|
54
87
|
{ id: "web_fetch", name: "web_fetch", category: "web", description: "Obtener contenido de texto de una URL (ligero, sin JS). Sinónimos: descargar página, extraer texto, obtener contenido, leer url" },
|
|
@@ -150,6 +183,7 @@ export const SEED_DATA: SeedData = {
|
|
|
150
183
|
|
|
151
184
|
// 9. CORE — Notificaciones y notas
|
|
152
185
|
{ id: "notify", name: "notify", category: "core", description: "Enviar notificación al usuario. Sinónimos: notificar, enviar notificación, alertar, aviso" },
|
|
186
|
+
{ id: "send_file", name: "send_file", category: "core", description: "Enviar un archivo (Word, Excel, PDF, imagen) al usuario por el chat actual. Sinónimos: enviar archivo, enviar documento, devolver archivo corregido, mandar excel, mandar word, mandar pdf" },
|
|
153
187
|
{ id: "save_note", name: "save_note", category: "core", description: "Guardar nota persistente en el scratchpad. Sinónimos: guardar nota, escribir nota, recordatorio rápido, apuntar" },
|
|
154
188
|
{ id: "report_progress", name: "report_progress", category: "core", description: "Reportar progreso actual al usuario. Sinónimos: reportar progreso, informar estado, actualizar progreso, porcentaje" },
|
|
155
189
|
{ id: "conversation_read", name: "conversation_read", category: "core", description: "Recuperar mensajes anteriores de esta conversación por ID o búsqueda de texto. Sinónimos: leer conversación, recuperar contexto, historial omitido" },
|
|
@@ -163,6 +197,9 @@ export const SEED_DATA: SeedData = {
|
|
|
163
197
|
{ id: "office_escribir_docx", name: "office_escribir_docx", category: "office", description: "Generar un archivo Word (.docx) con párrafos, títulos y tablas. Sinónimos: crear word, generar docx, escribir documento word, exportar a docx" },
|
|
164
198
|
{ id: "office_leer_xlsx", name: "office_leer_xlsx", category: "office", description: "Leer un archivo Excel (.xlsx) y retornar hojas con datos en JSON (filas y columnas). Sinónimos: leer excel, abrir xlsx, extraer datos de excel, hojas excel" },
|
|
165
199
|
{ id: "office_escribir_xlsx", name: "office_escribir_xlsx", category: "office", description: "Generar un archivo Excel (.xlsx) desde un objeto JSON con hojas, filas y columnas. Sinónimos: crear excel, generar xlsx, escribir excel, exportar a xlsx" },
|
|
200
|
+
{ id: "office_editar_xlsx", name: "office_editar_xlsx", category: "office", description: "Editar un Excel (.xlsx) existente cambiando solo celdas indicadas y conservando el formato; guarda una copia. Sinónimos: editar excel, corregir excel, modificar celdas, mejorar planilla" },
|
|
201
|
+
{ id: "office_editar_docx", name: "office_editar_docx", category: "office", description: "Editar un Word (.docx) existente: reemplazar texto y añadir párrafos conservando estilos; guarda una copia. Sinónimos: editar word, corregir word, reemplazar texto en documento, mejorar documento" },
|
|
202
|
+
{ id: "office_editar_pptx", name: "office_editar_pptx", category: "office", description: "Editar un PowerPoint (.pptx) existente reemplazando texto en diapositivas y notas, conservando diseño e imágenes; guarda una copia. Sinónimos: editar powerpoint, corregir presentación, reemplazar texto en diapositivas, mejorar pptx" },
|
|
166
203
|
{ id: "office_leer_pptx", name: "office_leer_pptx", category: "office", description: "Leer un archivo PowerPoint (.pptx) y retornar el texto de cada diapositiva como array estructurado. Sinónimos: leer powerpoint, abrir pptx, extraer texto de presentacion, contenido slides" },
|
|
167
204
|
{ id: "office_escribir_pptx", name: "office_escribir_pptx", category: "office", description: "Generar un archivo PowerPoint (.pptx) desde un array de diapositivas con título y contenido. Sinónimos: crear powerpoint, generar pptx, escribir presentacion, exportar a pptx" },
|
|
168
205
|
|
|
@@ -189,7 +226,7 @@ export const SEED_DATA: SeedData = {
|
|
|
189
226
|
// no valida la key; el 401 recién aparece al invocar el modelo.
|
|
190
227
|
{ id: "modelscope", name: "ModelScope Qwen", baseUrl: "https://api-inference.modelscope.ai/v1" },
|
|
191
228
|
{ id: "opencode-go", name: "OpenCode Go", baseUrl: "https://opencode.ai/zen/go/v1" },
|
|
192
|
-
{ id:
|
|
229
|
+
{ id: LOCAL_TTS_PROVIDER, name: "Kitten (Local TTS)", category: "tts" },
|
|
193
230
|
{ id: "hiveagents", name: "HiveAgents LLM (Cloudflare)", baseUrl: "https://llm.hiveagents.io/v1", category: "llm" },
|
|
194
231
|
],
|
|
195
232
|
|
|
@@ -210,10 +247,11 @@ export const SEED_DATA: SeedData = {
|
|
|
210
247
|
{ id: "gpt-5.6-sol", providerId: "openai", name: "GPT-5.6 Sol", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 5, outputPer1M: 30 },
|
|
211
248
|
// STT / TTS
|
|
212
249
|
{ id: "whisper-1", providerId: "openai", name: "Whisper 1", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription", "translation"]) },
|
|
250
|
+
{ id: "gpt-transcribe", providerId: "openai", name: "GPT Transcribe", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription"]) },
|
|
213
251
|
{ id: "tts-1", providerId: "openai", name: "TTS-1", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
|
|
214
252
|
{ id: "tts-1-hd", providerId: "openai", name: "TTS-1 HD", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "high_quality"]) },
|
|
215
253
|
{ id: "gpt-4o-mini-tts", providerId: "openai", name: "GPT-4o Mini TTS", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
|
|
216
|
-
{ id:
|
|
254
|
+
{ id: LOCAL_TTS_MODEL, providerId: LOCAL_TTS_PROVIDER, name: "Kitten TTS 2 Mini (Español)", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "local"]) },
|
|
217
255
|
|
|
218
256
|
// ── Google Gemini (fuente: ai.google.dev/gemini-api/docs/models) ──
|
|
219
257
|
// Solo la generación 3.x: la familia 2.0 ya está apagada y la 2.5 quedó
|
|
@@ -221,7 +259,7 @@ export const SEED_DATA: SeedData = {
|
|
|
221
259
|
// el primero no existe en el catálogo y el segundo ya salió de preview.
|
|
222
260
|
// 3.8 Flash tiene precio de lanzamiento hasta el 31-dic-2026 ($0.75 / $3.75).
|
|
223
261
|
// Desde el 1-ene-2027 pasa a $1.50 / $7.50: actualizar aquí ese día o el
|
|
224
|
-
// dashboard subestimará el costo
|
|
262
|
+
// dashboard subestimará el costo a la mitad.
|
|
225
263
|
// contextWindow: el que reporta la propia API de modelos de Gemini.
|
|
226
264
|
{ id: "gemini-3.8-flash", providerId: "gemini", name: "Gemini 3.8 Flash", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.75, outputPer1M: 3.75 },
|
|
227
265
|
{ id: "gemini-3.6-flash", providerId: "gemini", name: "Gemini 3.6 Flash", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 1.5, outputPer1M: 7.5 },
|
|
@@ -267,7 +305,6 @@ export const SEED_DATA: SeedData = {
|
|
|
267
305
|
{ id: "kimi-k2.6", providerId: "kimi", name: "Kimi K2.6", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]), inputPer1M: 0.6, outputPer1M: 3.41 },
|
|
268
306
|
|
|
269
307
|
// ── OpenRouter (fuente: GET https://openrouter.ai/api/v1/models) ──
|
|
270
|
-
{ id: "typesafe/jev-1.13", providerId: "openrouter", name: "Jev 1.13 (Decisions)", modelType: "decision", contextWindow: 32000, capabilities: JSON.stringify(["choice", "noul", "score"]), inputPer1M: 0.042, outputPer1M: 0 },
|
|
271
308
|
// Solo modelos vivos con `tools` en supported_parameters y publicados desde
|
|
272
309
|
// 2025-07. contextWindow = context_length reportado por el propio catálogo.
|
|
273
310
|
// Anthropic
|
|
@@ -295,7 +332,14 @@ export const SEED_DATA: SeedData = {
|
|
|
295
332
|
// OpenRouter renombró qwen/qwen3.8-max a su versión fechada: mismo contexto
|
|
296
333
|
// y precio, ahora también con imagen. Verificado 2026-09-10.
|
|
297
334
|
{ id: "qwen/qwen3.8-max-0902", providerId: "openrouter", name: "Qwen3.8 Max (OR)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 2, outputPer1M: 6 },
|
|
298
|
-
{ id: "qwen/qwen3.7-flash", providerId: "openrouter", name: "Qwen3.7 Flash (OR)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.03, outputPer1M: 0.13 },
|
|
335
|
+
{ id: "qwen/qwen3.7-flash", providerId: "openrouter", name: "Qwen3.7 Flash (OR)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.03, outputPer1M: 0.13 },
|
|
336
|
+
{ id: "qwen/qwen4-max", providerId: "openrouter", name: "Qwen4 Max (OR)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 1.425, outputPer1M: 4.275 },
|
|
337
|
+
{ id: "qwen/qwen3.8-flash", providerId: "openrouter", name: "Qwen3.8 Flash (OR)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.15, outputPer1M: 0.47 },
|
|
338
|
+
{ id: "qwen/qwen3.8-omni-flash", providerId: "openrouter", name: "Qwen3.8 Omni Flash (OR)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.15, outputPer1M: 0.47 },
|
|
339
|
+
{ id: "qwen/qwen3.8-27b", providerId: "openrouter", name: "Qwen3.8 27B (OR)", modelType: "llm", contextWindow: 1024000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.06, outputPer1M: 1.96 },
|
|
340
|
+
{ id: "qwen/qwen3.6-plus", providerId: "openrouter", name: "Qwen3.6 Plus (OR)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.325, outputPer1M: 1.95 },
|
|
341
|
+
{ id: "qwen/qwen3.6-35b-a3b", providerId: "openrouter", name: "Qwen3.6 35B A3B (OR)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.1, outputPer1M: 0.9 },
|
|
342
|
+
{ id: "qwen/qwen3-vl-235b-a22b-instruct", providerId: "openrouter", name: "Qwen3 VL 235B (OR)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.21, outputPer1M: 1.9 },
|
|
299
343
|
// xAI
|
|
300
344
|
{ id: "x-ai/grok-4.5", providerId: "openrouter", name: "Grok 4.5 (OR)", modelType: "llm", contextWindow: 500000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 2, outputPer1M: 6 },
|
|
301
345
|
// Mistral
|
|
@@ -326,6 +370,8 @@ export const SEED_DATA: SeedData = {
|
|
|
326
370
|
|
|
327
371
|
// ── ElevenLabs (TTS) ──
|
|
328
372
|
{ id: "eleven_flash_v2_5", providerId: "elevenlabs", name: "Eleven Flash V2.5", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "fast"]) },
|
|
373
|
+
{ id: "scribe_v3", providerId: "elevenlabs", name: "ElevenLabs Scribe v3", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription"]) },
|
|
374
|
+
{ id: "scribe_v2", providerId: "elevenlabs", name: "ElevenLabs Scribe v2", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription"]) },
|
|
329
375
|
{ id: "eleven_turbo_v2_5", providerId: "elevenlabs", name: "Eleven Turbo V2.5", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "balanced"]) },
|
|
330
376
|
{ id: "eleven_multilingual_v2", providerId: "elevenlabs", name: "Eleven Multilingual V2", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "multilingual"]) },
|
|
331
377
|
{ id: "eleven_v3", providerId: "elevenlabs", name: "Eleven V3", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "expressive"]) },
|
|
@@ -336,8 +382,8 @@ export const SEED_DATA: SeedData = {
|
|
|
336
382
|
// estaba sembrado con 32768 en realidad tiene 262144.
|
|
337
383
|
{ id: "qwen3.7-max", providerId: "qwen", name: "Qwen 3.7 Max", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 1.475, outputPer1M: 4.425 },
|
|
338
384
|
{ id: "qwen3.7-plus", providerId: "qwen", name: "Qwen 3.7 Plus", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.32, outputPer1M: 1.28 },
|
|
339
|
-
{ id: "qwen3.6-flash", providerId: "qwen", name: "Qwen 3.6 Flash", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.1875, outputPer1M: 1.125 },
|
|
340
|
-
{ id: "qwen3.5-omni-plus", providerId: "qwen", name: "Qwen 3.5 Omni Plus", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.32, outputPer1M: 1.28 },
|
|
385
|
+
{ id: "qwen3.6-flash", providerId: "qwen", name: "Qwen 3.6 Flash", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.1875, outputPer1M: 1.125 },
|
|
386
|
+
{ id: "qwen3.5-omni-plus", providerId: "qwen", name: "Qwen 3.5 Omni Plus", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.32, outputPer1M: 1.28 },
|
|
341
387
|
|
|
342
388
|
// ── Qwen (TTS) ──
|
|
343
389
|
{ id: "qwen3-tts-instruct-flash", providerId: "qwen", name: "Qwen TTS Instruct Flash", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
|
|
@@ -362,6 +408,13 @@ export const SEED_DATA: SeedData = {
|
|
|
362
408
|
// julio/agosto con "Free Endpoint" en el catálogo de NGC, y responden con
|
|
363
409
|
// tool calling en una cuenta gratuita. Contexto según la referencia de la API
|
|
364
410
|
// de NVIDIA (Kimi K3) y OpenRouter (el resto). Verificado 2026-09-10.
|
|
411
|
+
// ── Generación de imágenes (NVIDIA, endpoints alojados ai.api.nvidia.com/v1/genai) ──
|
|
412
|
+
// Solo entran los verificados con una cuenta gratuita el 2026-11-23: responden con una
|
|
413
|
+
// imagen JPEG en `artifacts[0].base64`. flux.1-dev se colgó (>150 s) y su licencia es no
|
|
414
|
+
// comercial; los de edición (Kontext, klein con imagen) solo admiten imágenes de ejemplo
|
|
415
|
+
// predefinidas y Qwen-Image no tiene endpoint alojado, así que no se listan.
|
|
416
|
+
{ id: "black-forest-labs/flux.2-klein-4b", providerId: "nvidia", name: "FLUX.2 Klein 4B (NVIDIA)", modelType: "image", contextWindow: 0, capabilities: JSON.stringify(["image_generation"]), inputPer1M: 0, outputPer1M: 0 },
|
|
417
|
+
{ id: "black-forest-labs/flux.1-schnell", providerId: "nvidia", name: "FLUX.1 Schnell (NVIDIA)", modelType: "image", contextWindow: 0, capabilities: JSON.stringify(["image_generation"]), inputPer1M: 0, outputPer1M: 0 },
|
|
365
418
|
{ id: "meta/muse-glimmer-30b", providerId: "nvidia", name: "Muse Glimmer 30B (NVIDIA)", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "vision", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
|
|
366
419
|
{ id: "nvidia/nemotron-3-ultra-550b-a55b", providerId: "nvidia", name: "Nemotron 3 Ultra 550B", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
|
|
367
420
|
// Revisado el 2026-11-16 con llamadas reales a /v1/models y a cada modelo (nivel gratuito, "Free Endpoint"): de 23
|
|
@@ -399,7 +452,11 @@ export const SEED_DATA: SeedData = {
|
|
|
399
452
|
{ id: "Qwen-Ambassador/Qwen3.7-Max", providerId: "modelscope", name: "Qwen3.7 Max (Embajador)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
|
|
400
453
|
{ id: "Qwen-Ambassador/Qwen3.7-Plus", providerId: "modelscope", name: "Qwen3.7 Plus (Embajador)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
|
|
401
454
|
// Open-weight del mismo endpoint, para cuentas sin permiso de embajador.
|
|
402
|
-
{ id: "Qwen/Qwen3.5-397B-A17B", providerId: "modelscope", name: "Qwen3.5 397B (ModelScope)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
|
|
455
|
+
{ id: "Qwen/Qwen3.5-397B-A17B", providerId: "modelscope", name: "Qwen3.5 397B (ModelScope)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "code", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
|
|
456
|
+
{ id: "Qwen/Qwen3.8-27B", providerId: "modelscope", name: "Qwen3.8 27B (ModelScope)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
|
|
457
|
+
{ id: "Qwen/Qwen3.5-122B-A10B", providerId: "modelscope", name: "Qwen3.5 122B (ModelScope)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
|
|
458
|
+
{ id: "Qwen/Qwen3.5-35B-A3B", providerId: "modelscope", name: "Qwen3.5 35B (ModelScope)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
|
|
459
|
+
{ id: "Qwen/Qwen3.5-27B", providerId: "modelscope", name: "Qwen3.5 27B (ModelScope)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
|
|
403
460
|
{ id: "Qwen/Qwen3-Next-80B-A3B-Instruct", providerId: "modelscope", name: "Qwen3 Next 80B (ModelScope)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
|
|
404
461
|
{ id: "Qwen/Qwen3-Coder-30B-A3B-Instruct", providerId: "modelscope", name: "Qwen3 Coder 30B (ModelScope)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
|
|
405
462
|
{ id: "Qwen/Qwen3-VL-235B-A22B-Instruct", providerId: "modelscope", name: "Qwen3 VL 235B (ModelScope)", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
|
|
@@ -448,8 +505,13 @@ export const SEED_DATA: SeedData = {
|
|
|
448
505
|
// context_window es el ctx que se pide en POST /api/load, no un tope del
|
|
449
506
|
// modelo: DeepSeek va a 32K porque sus 90.9 GB de pesos dejan poco margen
|
|
450
507
|
// de memoria para el KV cache.
|
|
451
|
-
|
|
452
|
-
|
|
508
|
+
// Los Qwen 3.5/3.6/3.8 son multimodales nativos (aceptan imagen), por eso llevan `vision`: así
|
|
509
|
+
// aparecen en la pestaña de imagen. Inventario verificado contra GET /api/models el 2026-11-20;
|
|
510
|
+
// se omiten a propósito los de ciberseguridad (Cyber*, StagAI, Uraion, wolfram) y las piezas de MiniMax-Music3.
|
|
511
|
+
// Sin verificar y fuera del catálogo: Ornith 1.0 9B, Sage A1.5 y Gemma 4 12B.
|
|
512
|
+
{ id: "Qwen3.6-35B-A3B-UD-Q4_K_M.gguf", providerId: "hiveagents", name: "Qwen3.6 35B MoE (Recomendado)", modelType: "llm", contextWindow: 50000, capabilities: JSON.stringify(["chat", "vision", "streaming", "reasoning", "function_calling"]), inputPer1M: 0, outputPer1M: 0 },
|
|
513
|
+
{ id: "Qwen3.8-27B-UD-Q6_K_XL.gguf", providerId: "hiveagents", name: "Qwen3.8 27B Dense + MTP", modelType: "llm", contextWindow: 50000, capabilities: JSON.stringify(["chat", "vision", "streaming", "reasoning", "function_calling"]), inputPer1M: 0, outputPer1M: 0 },
|
|
514
|
+
{ id: "Qwen3.5-9B-UD-Q8_K_XL.gguf", providerId: "hiveagents", name: "Qwen3.5 9B + MTP (ligero)", modelType: "llm", contextWindow: 50000, capabilities: JSON.stringify(["chat", "vision", "streaming", "reasoning", "function_calling"]), inputPer1M: 0, outputPer1M: 0 },
|
|
453
515
|
// Se carga por el primer shard: llama.cpp descubre los otros dos solo.
|
|
454
516
|
// Sólo texto, y el más lento del inventario: ~91 s de carga y 12.8 t/s.
|
|
455
517
|
{ id: "DeepSeek-V4-Flash-UD-IQ2_XXS-00001-of-00003.gguf", providerId: "hiveagents", name: "DeepSeek V4 Flash 90 GB (lento)", modelType: "llm", contextWindow: 32768, capabilities: JSON.stringify(["chat", "streaming", "reasoning", "function_calling"]), inputPer1M: 0, outputPer1M: 0 },
|
|
@@ -512,6 +574,7 @@ import type {
|
|
|
512
574
|
ToolDoc, SkillDoc, EthicsDoc, ProviderDoc, ModelDoc, McpServerDoc, ChannelDoc, PlaybookDoc, AgentDoc,
|
|
513
575
|
} from "./collections"
|
|
514
576
|
import { createSeedCatalogAgents, ensureAgentsConfigured } from "../agent/agent-catalog"
|
|
577
|
+
import { syncGoogleCapabilities } from "./google-capabilities.ts"
|
|
515
578
|
|
|
516
579
|
const log = logger.child("seed");
|
|
517
580
|
|
|
@@ -757,6 +820,8 @@ async function reseedToolsAndSkills(): Promise<void> {
|
|
|
757
820
|
toolCount++;
|
|
758
821
|
}
|
|
759
822
|
log.info(`[seed] ✅ ${toolCount} tools re-seeded`);
|
|
823
|
+
// Las tools de Google nacen activas en SEED_DATA: se alinean con la conexión real.
|
|
824
|
+
await syncGoogleCapabilities("seed").catch((err) => log.warn(`[seed] google: ${(err as Error).message}`));
|
|
760
825
|
|
|
761
826
|
// ── Skills: re-seed from the bundled skill files ──
|
|
762
827
|
const skillsCol = await col<SkillDoc>("skills");
|
|
@@ -816,10 +881,11 @@ export async function seedAllData(): Promise<void> {
|
|
|
816
881
|
const providersCol = await col<ProviderDoc>("providers");
|
|
817
882
|
let providerCount = 0;
|
|
818
883
|
for (const provider of SEED_DATA.providers) {
|
|
884
|
+
const localByDefault = provider.id === LOCAL_TTS_PROVIDER;
|
|
819
885
|
await putIfAbsent(providersCol, provider.id, {
|
|
820
886
|
id: provider.id, name: provider.name, base_url: provider.baseUrl || null,
|
|
821
887
|
category: (provider.category || "llm") as ProviderDoc["category"],
|
|
822
|
-
num_ctx: null, num_gpu: -1, enabled:
|
|
888
|
+
num_ctx: null, num_gpu: -1, enabled: localByDefault, active: localByDefault, created_at: now,
|
|
823
889
|
});
|
|
824
890
|
providerCount++;
|
|
825
891
|
}
|
|
@@ -855,39 +921,49 @@ export async function seedAllData(): Promise<void> {
|
|
|
855
921
|
// (context_window, capabilities, precio) sobrevive a una entrada renombrada
|
|
856
922
|
// o corregida. Un upsert en sitio no daba esa garantía.
|
|
857
923
|
//
|
|
858
|
-
//
|
|
859
|
-
// - enabled/active por id, para
|
|
860
|
-
// eligió cada vez que se publica un catálogo nuevo;
|
|
924
|
+
// Se preservan a propósito:
|
|
925
|
+
// - enabled/active por id, salvo para voz, que hereda el estado del proveedor;
|
|
861
926
|
// - las filas source != "catalog" (Ollama tags, /v1/models), que no tienen
|
|
862
927
|
// origen canónico desde el que recrearse.
|
|
928
|
+
// - el resultado de la última consulta al proveedor sobre disponibilidad.
|
|
863
929
|
log.info("[seed] 🔄 Re-seeding models (wipe & recreate)...");
|
|
864
930
|
const modelsCol = await col<ModelDoc>("models");
|
|
865
931
|
const beforeWipe = await modelsCol.scan({});
|
|
932
|
+
const providersById = new Map((await providersCol.scan({})).map(({ id, doc }) => [id, doc]));
|
|
866
933
|
|
|
867
|
-
const
|
|
868
|
-
beforeWipe.map((e) => [e.id, { enabled: e.doc.enabled, active: e.doc.active }])
|
|
869
|
-
);
|
|
934
|
+
const previousModels = new Map(beforeWipe.map(({ id, doc }) => [id, doc]));
|
|
870
935
|
|
|
936
|
+
const piperModelIds = new Set(beforeWipe.filter(row => row.doc.provider_id === "piper").map(row => row.id));
|
|
871
937
|
let wipedModels = 0;
|
|
872
938
|
for (const row of beforeWipe) {
|
|
873
|
-
if (row.
|
|
874
|
-
|
|
875
|
-
|
|
939
|
+
if (piperModelIds.has(row.id)) continue;
|
|
940
|
+
if (row.doc.source === "catalog") {
|
|
941
|
+
await modelsCol.delete(row.id);
|
|
942
|
+
wipedModels++;
|
|
943
|
+
continue;
|
|
944
|
+
}
|
|
945
|
+
const activation = voiceModelActivation(row.doc, providersById.get(row.doc.provider_id));
|
|
946
|
+
if (activation && (row.doc.active !== activation.active || row.doc.enabled !== activation.enabled)) {
|
|
947
|
+
await modelsCol.put(row.id, { ...row.doc, ...activation }, { expectedVersion: row.version });
|
|
948
|
+
}
|
|
876
949
|
}
|
|
877
950
|
|
|
878
951
|
let modelCount = 0;
|
|
879
952
|
for (const model of SEED_DATA.models) {
|
|
880
953
|
const key = catalogModelKey(model.providerId, model.id);
|
|
881
|
-
const previous =
|
|
882
|
-
|
|
954
|
+
const previous = previousModels.get(key);
|
|
955
|
+
const doc: ModelDoc = {
|
|
883
956
|
id: key, provider_id: model.providerId, name: model.name,
|
|
884
957
|
model_type: model.modelType as ModelDoc["model_type"],
|
|
885
958
|
context_window: model.contextWindow || 0, capabilities: model.capabilities || null,
|
|
886
|
-
enabled: previous?.enabled ?? true, active: previous?.active ??
|
|
959
|
+
enabled: previous?.enabled ?? true, active: previous?.active ?? (key === LOCAL_TTS_MODEL),
|
|
960
|
+
...(previous?.unlisted ? { unlisted: true } : {}),
|
|
961
|
+
...(previous?.synced_at ? { synced_at: previous.synced_at } : {}),
|
|
887
962
|
source: "catalog",
|
|
888
963
|
input_per_1m: model.inputPer1M ?? null,
|
|
889
964
|
output_per_1m: model.outputPer1M ?? null,
|
|
890
|
-
}
|
|
965
|
+
};
|
|
966
|
+
await modelsCol.put(key, { ...doc, ...voiceModelActivation(doc, providersById.get(model.providerId)) });
|
|
891
967
|
modelCount++;
|
|
892
968
|
}
|
|
893
969
|
log.info(`[seed] 🗑️ ${wipedModels} modelo(s) de catálogo borrados y recreados desde SEED_DATA`);
|
|
@@ -922,6 +998,11 @@ export async function seedAllData(): Promise<void> {
|
|
|
922
998
|
patch[field] = RETIRED_VOICE_MODELS[current];
|
|
923
999
|
}
|
|
924
1000
|
}
|
|
1001
|
+
const tts = c.doc.tts_provider;
|
|
1002
|
+
if (tts && (piperModelIds.has(tts) || isLegacyPiper(tts))) {
|
|
1003
|
+
patch.tts_provider = LOCAL_TTS_MODEL;
|
|
1004
|
+
patch.tts_voice_id = DEFAULT_LOCAL_VOICE;
|
|
1005
|
+
}
|
|
925
1006
|
if (Object.keys(patch).length === 0) continue;
|
|
926
1007
|
await voiceChannelsCol.put(c.id, { ...c.doc, ...patch }, { expectedVersion: c.version });
|
|
927
1008
|
migratedVoice++;
|
|
@@ -930,6 +1011,8 @@ export async function seedAllData(): Promise<void> {
|
|
|
930
1011
|
if (migratedVoice > 0) {
|
|
931
1012
|
log.info(`[seed] 🎙️ ${migratedVoice} canal(es) repuntados a modelos de voz vigentes`);
|
|
932
1013
|
}
|
|
1014
|
+
for (const id of piperModelIds) await modelsCol.delete(id);
|
|
1015
|
+
if (await providersCol.get("piper")) await providersCol.delete("piper");
|
|
933
1016
|
|
|
934
1017
|
log.info(`[seed] ✅ ${modelCount} models procesados`);
|
|
935
1018
|
|
|
@@ -154,15 +154,6 @@ export interface UsageRecord {
|
|
|
154
154
|
created_at: number;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
export interface JevUsageSummary {
|
|
158
|
-
decisions: number;
|
|
159
|
-
costUsd: number;
|
|
160
|
-
/** Estimated main-model input tokens avoided; negative when Jev added more than it removed. */
|
|
161
|
-
savedTokens: number;
|
|
162
|
-
savedCostUsd: number;
|
|
163
|
-
byAgent: Record<string, { decisions: number; costUsd: number; savedTokens: number; savedCostUsd: number }>;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
157
|
export interface UsageSummary {
|
|
167
158
|
totalTokens: number;
|
|
168
159
|
totalInputTokens: number;
|
|
@@ -177,7 +168,6 @@ export interface UsageSummary {
|
|
|
177
168
|
toonSavingsPercent: number;
|
|
178
169
|
byProvider: Record<string, { tokens: number; costUsd: number; inputTokens: number; outputTokens: number }>;
|
|
179
170
|
byModel: Record<string, { tokens: number; costUsd: number; provider: string; inputTokens: number; outputTokens: number }>;
|
|
180
|
-
jev: JevUsageSummary;
|
|
181
171
|
recentRecords: UsageRecord[];
|
|
182
172
|
}
|
|
183
173
|
|
|
@@ -250,7 +240,6 @@ export async function getUsageStats(hours: number = 24): Promise<UsageSummary> {
|
|
|
250
240
|
let totalInput = 0, totalOutput = 0, totalCost = 0;
|
|
251
241
|
let toonSavedTokens = 0, toonSavedCost = 0, toonSavedBytes = 0;
|
|
252
242
|
let toonJsonTokens = 0, toonToonTokens = 0, toonJsonBytes = 0;
|
|
253
|
-
const jev: JevUsageSummary = { decisions: 0, costUsd: 0, savedTokens: 0, savedCostUsd: 0, byAgent: {} };
|
|
254
243
|
|
|
255
244
|
for (const r of rollups) {
|
|
256
245
|
totalInput += r.inputTokens;
|
|
@@ -262,18 +251,6 @@ export async function getUsageStats(hours: number = 24): Promise<UsageSummary> {
|
|
|
262
251
|
toonJsonTokens += r.toonJsonTokens;
|
|
263
252
|
toonToonTokens += r.toonToonTokens;
|
|
264
253
|
toonJsonBytes += r.toonJsonBytes;
|
|
265
|
-
jev.decisions += r.jevDecisions ?? 0;
|
|
266
|
-
jev.costUsd += r.jevCostUsd ?? 0;
|
|
267
|
-
jev.savedTokens += r.jevSavedTokens ?? 0;
|
|
268
|
-
jev.savedCostUsd += r.jevSavedCostUsd ?? 0;
|
|
269
|
-
for (const [agentId, a] of Object.entries(r.jevByAgent ?? {})) {
|
|
270
|
-
const cur = jev.byAgent[agentId] ?? { decisions: 0, costUsd: 0, savedTokens: 0, savedCostUsd: 0 };
|
|
271
|
-
cur.decisions += a.jevDecisions ?? 0;
|
|
272
|
-
cur.costUsd += a.jevCostUsd ?? 0;
|
|
273
|
-
cur.savedTokens += a.jevSavedTokens ?? 0;
|
|
274
|
-
cur.savedCostUsd += a.jevSavedCostUsd ?? 0;
|
|
275
|
-
jev.byAgent[agentId] = cur;
|
|
276
|
-
}
|
|
277
254
|
|
|
278
255
|
for (const [provider, p] of Object.entries(r.byProvider ?? {})) {
|
|
279
256
|
const cur = providerMap[provider] ?? { tokens: 0, costUsd: 0, inputTokens: 0, outputTokens: 0 };
|
|
@@ -324,39 +301,10 @@ export async function getUsageStats(hours: number = 24): Promise<UsageSummary> {
|
|
|
324
301
|
toonSavingsPercent,
|
|
325
302
|
byProvider: providerMap,
|
|
326
303
|
byModel: modelMap,
|
|
327
|
-
jev,
|
|
328
304
|
recentRecords
|
|
329
305
|
};
|
|
330
306
|
}
|
|
331
307
|
|
|
332
|
-
/**
|
|
333
|
-
* Persists one Jev decision into the hourly rollup. The avoided tokens are
|
|
334
|
-
* priced with the advised agent's own model (input rate), through the same
|
|
335
|
-
* catalog lookup as real usage, so "saved" and "spent" are comparable.
|
|
336
|
-
*/
|
|
337
|
-
export function recordJevDecision(options: {
|
|
338
|
-
agentId: string;
|
|
339
|
-
provider: string;
|
|
340
|
-
model: string;
|
|
341
|
-
savedTokens: number;
|
|
342
|
-
costUsd: number;
|
|
343
|
-
}): void {
|
|
344
|
-
Promise.resolve().then(async () => {
|
|
345
|
-
try {
|
|
346
|
-
const unitCost = await calculateCost(options.provider, options.model, Math.abs(options.savedTokens), 0);
|
|
347
|
-
const savedCostUsd = Math.sign(options.savedTokens) * unitCost;
|
|
348
|
-
await bumpRollup("usageRollups", hourBucket(Date.now()), {
|
|
349
|
-
jevDecisions: 1,
|
|
350
|
-
jevCostUsd: options.costUsd,
|
|
351
|
-
jevSavedTokens: options.savedTokens,
|
|
352
|
-
jevSavedCostUsd: savedCostUsd,
|
|
353
|
-
}, { field: "jevByAgent", key: options.agentId });
|
|
354
|
-
} catch (error) {
|
|
355
|
-
log.warn(`[JEV] Failed to record decision:`, error);
|
|
356
|
-
}
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
|
|
360
308
|
/**
|
|
361
309
|
* Record TOON savings for metrics tracking
|
|
362
310
|
* This updates the usage_records table with complete TOON compression metrics
|
|
@@ -236,6 +236,8 @@ const DEFAULT_MAIN_THREAD_TOOL_NAMES = new Set([
|
|
|
236
236
|
"cron.trigger",
|
|
237
237
|
"cron.history",
|
|
238
238
|
"notify",
|
|
239
|
+
// Entrega archivos por el canal: usa el sender y la base de datos del proceso principal.
|
|
240
|
+
"send_file",
|
|
239
241
|
"report_progress",
|
|
240
242
|
"task_delegate",
|
|
241
243
|
"task_list",
|
|
@@ -60,9 +60,7 @@ export const getAvailableModelsTool: Tool = {
|
|
|
60
60
|
.filter(m => m.enabled && providersById.has(m.provider_id));
|
|
61
61
|
|
|
62
62
|
if (providerId) models = models.filter(m => m.provider_id === providerId);
|
|
63
|
-
|
|
64
|
-
// agent assigned one would fail every turn.
|
|
65
|
-
models = modelType ? models.filter(m => m.model_type === modelType) : models.filter(m => m.model_type !== "decision");
|
|
63
|
+
if (modelType) models = models.filter(m => m.model_type === modelType);
|
|
66
64
|
if (capabilities) models = models.filter(m => (m.capabilities ?? "").includes(capabilities));
|
|
67
65
|
|
|
68
66
|
// Transformar a formato amigable
|
|
@@ -362,6 +362,84 @@ export const notifyTool: Tool = {
|
|
|
362
362
|
},
|
|
363
363
|
};
|
|
364
364
|
|
|
365
|
+
// ─── send_file ───────────────────────────────────────────────────────────────
|
|
366
|
+
|
|
367
|
+
const SEND_FILE_MIME: Record<string, string> = {
|
|
368
|
+
pdf: "application/pdf",
|
|
369
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
370
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
371
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
372
|
+
csv: "text/csv", txt: "text/plain", md: "text/markdown", json: "application/json",
|
|
373
|
+
png: "image/png", jpg: "image/jpeg", jpeg: "image/jpeg", webp: "image/webp", zip: "application/zip",
|
|
374
|
+
}
|
|
375
|
+
const SEND_FILE_MAX_BYTES = 50 * 1024 * 1024
|
|
376
|
+
|
|
377
|
+
export const sendFileTool: Tool = {
|
|
378
|
+
name: "send_file",
|
|
379
|
+
description:
|
|
380
|
+
"Send a file (Word, Excel, PDF, PowerPoint, image, text…) to the user in the chat they are writing from. Use it to hand back a document you created or corrected. Spanish: enviar archivo, enviar documento, devolver archivo corregido, mandar el excel/word/pdf al usuario",
|
|
381
|
+
parameters: {
|
|
382
|
+
type: "object",
|
|
383
|
+
properties: {
|
|
384
|
+
ruta: { type: "string", description: "Path of the file to send (inside the workspace, or the path of an attachment)" },
|
|
385
|
+
artifact_id: { type: "string", description: "Alternative to 'ruta': artifact_id of a file already stored" },
|
|
386
|
+
nombre: { type: "string", description: "File name the user will see (default: the file's own name)" },
|
|
387
|
+
mensaje: { type: "string", description: "Short caption shown with the file" },
|
|
388
|
+
},
|
|
389
|
+
required: [],
|
|
390
|
+
},
|
|
391
|
+
execute: async (params: Record<string, unknown>, config?: any) => {
|
|
392
|
+
const fs = await import("node:fs");
|
|
393
|
+
const nodePath = await import("node:path");
|
|
394
|
+
const { createArtifact } = await import("../../artifacts/store.ts");
|
|
395
|
+
const { resolveInWorkspace, getWorkspace } = await import("../filesystem/workspace-guard.ts");
|
|
396
|
+
const { sendFileToUserChannel } = await import("../../gateway/channel-notify");
|
|
397
|
+
|
|
398
|
+
const channel = (config?.configurable?.channel as string) ?? "webchat";
|
|
399
|
+
const userId = (config?.configurable?.user_id as string) ?? "";
|
|
400
|
+
const threadId = config?.configurable?.thread_id as string | undefined;
|
|
401
|
+
|
|
402
|
+
let artifactId = typeof params.artifact_id === "string" ? params.artifact_id.trim() : "";
|
|
403
|
+
let filename = typeof params.nombre === "string" ? params.nombre.trim() : "";
|
|
404
|
+
let mimeType = "application/octet-stream";
|
|
405
|
+
|
|
406
|
+
if (artifactId) {
|
|
407
|
+
const { col } = await import("../../storage/hive.ts");
|
|
408
|
+
const entry = await (await col<import("../../storage/collections.ts").ArtifactDoc>("artifacts")).get(artifactId);
|
|
409
|
+
if (!entry || entry.doc.status !== "active") return { ok: false, error: `El archivo ${artifactId} no existe o expiró.` };
|
|
410
|
+
mimeType = entry.doc.mime_type;
|
|
411
|
+
if (!filename) filename = nodePath.basename(entry.doc.path);
|
|
412
|
+
} else {
|
|
413
|
+
const ruta = typeof params.ruta === "string" ? params.ruta.trim() : "";
|
|
414
|
+
if (!ruta) return { ok: false, error: "Indica 'ruta' o 'artifact_id'." };
|
|
415
|
+
let abs: string;
|
|
416
|
+
try {
|
|
417
|
+
abs = resolveInWorkspace(ruta, getWorkspace(config));
|
|
418
|
+
} catch (err) {
|
|
419
|
+
return { ok: false, error: (err as Error).message };
|
|
420
|
+
}
|
|
421
|
+
abs = nodePath.resolve(abs);
|
|
422
|
+
if (!fs.existsSync(abs) || !fs.statSync(abs).isFile()) return { ok: false, error: `No existe el archivo: ${abs}` };
|
|
423
|
+
const size = fs.statSync(abs).size;
|
|
424
|
+
if (size === 0) return { ok: false, error: "El archivo está vacío." };
|
|
425
|
+
if (size > SEND_FILE_MAX_BYTES) return { ok: false, error: `El archivo pesa ${(size / 1048576).toFixed(1)} MB; el máximo es 50 MB.` };
|
|
426
|
+
const ext = nodePath.extname(abs).replace(".", "").toLowerCase();
|
|
427
|
+
mimeType = SEND_FILE_MIME[ext] ?? "application/octet-stream";
|
|
428
|
+
if (!filename) filename = nodePath.basename(abs);
|
|
429
|
+
const artifact = await createArtifact({
|
|
430
|
+
bytes: fs.readFileSync(abs), mimeType, kind: "outgoing", userId: userId || "unknown", extension: ext,
|
|
431
|
+
});
|
|
432
|
+
artifactId = artifact.id;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
const caption = typeof params.mensaje === "string" ? params.mensaje : undefined;
|
|
436
|
+
log.info(`[send_file] ${channel}/${userId}: ${filename} (${mimeType})`);
|
|
437
|
+
const result = await sendFileToUserChannel(channel, userId, { artifactId, filename, mimeType, caption }, { threadId });
|
|
438
|
+
if (!result.ok) return { ok: false, error: `No se pudo enviar el archivo: ${result.error}` };
|
|
439
|
+
return { ok: true, sent: filename };
|
|
440
|
+
},
|
|
441
|
+
};
|
|
442
|
+
|
|
365
443
|
// ─── save_note (scratchpad) ──────────────────────────────────────────────────
|
|
366
444
|
|
|
367
445
|
export const saveNoteTool: Tool = {
|
|
@@ -463,7 +541,7 @@ export const reportProgressTool: Tool = {
|
|
|
463
541
|
/** Máximo de mensajes que devuelve conversation_read. */
|
|
464
542
|
const MESSAGE_LIMIT = 8;
|
|
465
543
|
|
|
466
|
-
/** Recover a small, scoped slice of conversation omitted
|
|
544
|
+
/** Recover a small, scoped slice of conversation omitted from the context window. */
|
|
467
545
|
export const conversationReadTool: Tool = {
|
|
468
546
|
name: "conversation_read",
|
|
469
547
|
description: "Read earlier messages from the current conversation by message IDs or text query when selected context is insufficient. Searches by meaning across the whole history, including messages already compacted into the summary.",
|
|
@@ -504,5 +582,5 @@ export const conversationReadTool: Tool = {
|
|
|
504
582
|
};
|
|
505
583
|
|
|
506
584
|
export function createTools(): Tool[] {
|
|
507
|
-
return [searchKnowledgeTool, notifyTool, saveNoteTool, reportProgressTool, conversationReadTool];
|
|
585
|
+
return [searchKnowledgeTool, notifyTool, sendFileTool, saveNoteTool, reportProgressTool, conversationReadTool];
|
|
508
586
|
}
|