@johpaz/hive 1.7.2 → 1.7.3
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 +178 -36
- package/dist/hive.js +315124 -0
- package/package.json +11 -3
- package/packages/core/src/index.ts +0 -1
- package/.dockerignore +0 -9
- package/CONTRIBUTING.md +0 -44
- package/Dockerfile +0 -67
- package/docker-compose.yml +0 -19
- package/packages/cli/package.json +0 -28
- package/packages/cli/src/commands/agent-run.ts +0 -168
- package/packages/cli/src/commands/agents.ts +0 -398
- package/packages/cli/src/commands/chat.ts +0 -142
- package/packages/cli/src/commands/config.ts +0 -50
- package/packages/cli/src/commands/cron.ts +0 -161
- package/packages/cli/src/commands/dev.ts +0 -95
- package/packages/cli/src/commands/doctor.ts +0 -133
- package/packages/cli/src/commands/gateway.ts +0 -422
- package/packages/cli/src/commands/logs.ts +0 -57
- package/packages/cli/src/commands/mcp.ts +0 -175
- package/packages/cli/src/commands/message.ts +0 -77
- package/packages/cli/src/commands/onboard.ts +0 -1696
- package/packages/cli/src/commands/security.ts +0 -144
- package/packages/cli/src/commands/service.ts +0 -50
- package/packages/cli/src/commands/sessions.ts +0 -116
- package/packages/cli/src/commands/skills.ts +0 -187
- package/packages/cli/src/commands/update.ts +0 -25
- package/packages/cli/src/index.ts +0 -190
- package/packages/cli/src/utils/token.ts +0 -6
- package/packages/code-bridge/README.md +0 -78
- package/packages/code-bridge/package.json +0 -18
- package/packages/code-bridge/src/index.ts +0 -95
- package/packages/code-bridge/src/process-manager.ts +0 -212
- package/packages/code-bridge/src/schemas.ts +0 -133
- package/packages/core/package.json +0 -55
- package/packages/core/src/agent/agent-loop.ts +0 -520
- package/packages/core/src/agent/compaction.ts +0 -183
- package/packages/core/src/agent/context-compiler.ts +0 -544
- package/packages/core/src/agent/context-guard.ts +0 -91
- package/packages/core/src/agent/conversation-store.ts +0 -193
- package/packages/core/src/agent/curator.ts +0 -158
- package/packages/core/src/agent/hooks.ts +0 -166
- package/packages/core/src/agent/llm-client.ts +0 -503
- package/packages/core/src/agent/native-tools.ts +0 -31
- package/packages/core/src/agent/playbook-selector.ts +0 -143
- package/packages/core/src/agent/prompt-builder.ts +0 -167
- package/packages/core/src/agent/providers/index.ts +0 -186
- package/packages/core/src/agent/providers.ts +0 -1
- package/packages/core/src/agent/reflector.ts +0 -200
- package/packages/core/src/agent/service.ts +0 -266
- package/packages/core/src/agent/skill-selector.ts +0 -413
- package/packages/core/src/agent/stuck-loop.ts +0 -133
- package/packages/core/src/agent/tool-selector.ts +0 -623
- package/packages/core/src/agent/tracer.ts +0 -102
- package/packages/core/src/canvas/canvas-manager.ts +0 -319
- package/packages/core/src/canvas/canvas-tools.ts +0 -420
- package/packages/core/src/canvas/emitter.ts +0 -119
- package/packages/core/src/canvas/index.ts +0 -2
- package/packages/core/src/channels/base.ts +0 -140
- package/packages/core/src/channels/discord.ts +0 -260
- package/packages/core/src/channels/index.ts +0 -7
- package/packages/core/src/channels/manager.ts +0 -383
- package/packages/core/src/channels/slack.ts +0 -287
- package/packages/core/src/channels/telegram.ts +0 -552
- package/packages/core/src/channels/webchat.ts +0 -139
- package/packages/core/src/channels/whatsapp.ts +0 -375
- package/packages/core/src/config/index.ts +0 -12
- package/packages/core/src/config/loader.ts +0 -529
- package/packages/core/src/events/agent-bus.ts +0 -460
- package/packages/core/src/events/event-bus.ts +0 -169
- package/packages/core/src/gateway/helpers/cors.ts +0 -32
- package/packages/core/src/gateway/helpers/index.ts +0 -4
- package/packages/core/src/gateway/helpers/narration.ts +0 -60
- package/packages/core/src/gateway/helpers/path.ts +0 -13
- package/packages/core/src/gateway/helpers/redact.ts +0 -61
- package/packages/core/src/gateway/index.ts +0 -5
- package/packages/core/src/gateway/initializer.ts +0 -332
- package/packages/core/src/gateway/lane-queue.ts +0 -169
- package/packages/core/src/gateway/resolver.ts +0 -108
- package/packages/core/src/gateway/router.ts +0 -124
- package/packages/core/src/gateway/routes/agents.ts +0 -187
- package/packages/core/src/gateway/routes/channels.ts +0 -203
- package/packages/core/src/gateway/routes/chat.ts +0 -241
- package/packages/core/src/gateway/routes/config.ts +0 -12
- package/packages/core/src/gateway/routes/cron.ts +0 -42
- package/packages/core/src/gateway/routes/ethics.ts +0 -46
- package/packages/core/src/gateway/routes/mcp.ts +0 -346
- package/packages/core/src/gateway/routes/models.ts +0 -93
- package/packages/core/src/gateway/routes/projects.ts +0 -179
- package/packages/core/src/gateway/routes/providers.ts +0 -192
- package/packages/core/src/gateway/routes/setup.ts +0 -267
- package/packages/core/src/gateway/routes/skills.ts +0 -70
- package/packages/core/src/gateway/routes/system.ts +0 -165
- package/packages/core/src/gateway/routes/tasks.ts +0 -44
- package/packages/core/src/gateway/routes/tools.ts +0 -35
- package/packages/core/src/gateway/routes/users.ts +0 -118
- package/packages/core/src/gateway/routes/voice.ts +0 -73
- package/packages/core/src/gateway/routes/workspace.ts +0 -281
- package/packages/core/src/gateway/server.ts +0 -1978
- package/packages/core/src/gateway/session.ts +0 -95
- package/packages/core/src/gateway/slash-commands.ts +0 -193
- package/packages/core/src/heartbeat/index.ts +0 -157
- package/packages/core/src/mcp/hot-reload.ts +0 -213
- package/packages/core/src/mcp/singleton.ts +0 -21
- package/packages/core/src/memory/index.ts +0 -1
- package/packages/core/src/memory/notes.ts +0 -68
- package/packages/core/src/plugins/api.ts +0 -128
- package/packages/core/src/plugins/index.ts +0 -2
- package/packages/core/src/plugins/loader.ts +0 -365
- package/packages/core/src/resilience/circuit-breaker.ts +0 -225
- package/packages/core/src/security/google-chat.ts +0 -269
- package/packages/core/src/security/index.ts +0 -192
- package/packages/core/src/security/pairing.ts +0 -250
- package/packages/core/src/security/rate-limit.ts +0 -270
- package/packages/core/src/security/signal.ts +0 -321
- package/packages/core/src/state/store.ts +0 -312
- package/packages/core/src/storage/crypto.ts +0 -101
- package/packages/core/src/storage/onboarding.ts +0 -1609
- package/packages/core/src/storage/schema.ts +0 -567
- package/packages/core/src/storage/seed.ts +0 -608
- package/packages/core/src/storage/sqlite.ts +0 -363
- package/packages/core/src/storage/usage.ts +0 -270
- package/packages/core/src/tools/agents/index.ts +0 -607
- package/packages/core/src/tools/bridge-events.ts +0 -26
- package/packages/core/src/tools/canvas/index.ts +0 -281
- package/packages/core/src/tools/cli/index.ts +0 -142
- package/packages/core/src/tools/codebridge/index.ts +0 -179
- package/packages/core/src/tools/core/index.ts +0 -257
- package/packages/core/src/tools/cron/index.ts +0 -373
- package/packages/core/src/tools/filesystem/fs-delete.ts +0 -78
- package/packages/core/src/tools/filesystem/fs-edit.ts +0 -106
- package/packages/core/src/tools/filesystem/fs-exists.ts +0 -63
- package/packages/core/src/tools/filesystem/fs-glob.ts +0 -108
- package/packages/core/src/tools/filesystem/fs-list.ts +0 -129
- package/packages/core/src/tools/filesystem/fs-read.ts +0 -72
- package/packages/core/src/tools/filesystem/fs-write.ts +0 -67
- package/packages/core/src/tools/filesystem/index.ts +0 -34
- package/packages/core/src/tools/filesystem/workspace-guard.ts +0 -62
- package/packages/core/src/tools/index.ts +0 -197
- package/packages/core/src/tools/projects/index.ts +0 -37
- package/packages/core/src/tools/projects/project-create.ts +0 -94
- package/packages/core/src/tools/projects/project-done.ts +0 -66
- package/packages/core/src/tools/projects/project-fail.ts +0 -66
- package/packages/core/src/tools/projects/project-list.ts +0 -96
- package/packages/core/src/tools/projects/project-update.ts +0 -72
- package/packages/core/src/tools/projects/task-create.ts +0 -68
- package/packages/core/src/tools/projects/task-evaluate.ts +0 -93
- package/packages/core/src/tools/projects/task-update.ts +0 -93
- package/packages/core/src/tools/search-knowledge/search-knowledge.ts +0 -155
- package/packages/core/src/tools/types.ts +0 -39
- package/packages/core/src/tools/voice/index.ts +0 -104
- package/packages/core/src/tools/web/browser-click.ts +0 -54
- package/packages/core/src/tools/web/browser-navigate.ts +0 -84
- package/packages/core/src/tools/web/browser-screenshot.ts +0 -54
- package/packages/core/src/tools/web/browser-type.ts +0 -60
- package/packages/core/src/tools/web/index.ts +0 -31
- package/packages/core/src/tools/web/web-fetch.ts +0 -78
- package/packages/core/src/tools/web/web-search.ts +0 -123
- package/packages/core/src/utils/benchmark.ts +0 -80
- package/packages/core/src/utils/crypto.ts +0 -73
- package/packages/core/src/utils/date.ts +0 -42
- package/packages/core/src/utils/index.ts +0 -5
- package/packages/core/src/utils/logger.ts +0 -389
- package/packages/core/src/utils/retry.ts +0 -70
- package/packages/core/src/utils/toon.ts +0 -356
- package/packages/core/src/voice/index.ts +0 -583
- package/packages/hive-ui/README.md +0 -52
- package/packages/hive-ui/components.json +0 -20
- package/packages/hive-ui/index.html +0 -30
- package/packages/hive-ui/package.json +0 -90
- package/packages/hive-ui/public/favicon.ico +0 -0
- package/packages/hive-ui/public/placeholder.svg +0 -1
- package/packages/hive-ui/src/App.tsx +0 -115
- package/packages/hive-ui/src/components/CronJobsPanel.tsx +0 -200
- package/packages/hive-ui/src/components/NavLink.tsx +0 -34
- package/packages/hive-ui/src/components/NotesPanel.tsx +0 -79
- package/packages/hive-ui/src/components/SystemMonitor.tsx +0 -270
- package/packages/hive-ui/src/components/UsageStatsPanel.tsx +0 -334
- package/packages/hive-ui/src/components/WelcomeDialog.tsx +0 -279
- package/packages/hive-ui/src/components/ui/accordion.tsx +0 -52
- package/packages/hive-ui/src/components/ui/alert-dialog.tsx +0 -104
- package/packages/hive-ui/src/components/ui/alert.tsx +0 -45
- package/packages/hive-ui/src/components/ui/aspect-ratio.tsx +0 -5
- package/packages/hive-ui/src/components/ui/avatar.tsx +0 -38
- package/packages/hive-ui/src/components/ui/badge.tsx +0 -29
- package/packages/hive-ui/src/components/ui/bee-loader.tsx +0 -68
- package/packages/hive-ui/src/components/ui/breadcrumb.tsx +0 -90
- package/packages/hive-ui/src/components/ui/button.tsx +0 -47
- package/packages/hive-ui/src/components/ui/calendar.tsx +0 -54
- package/packages/hive-ui/src/components/ui/card.tsx +0 -45
- package/packages/hive-ui/src/components/ui/carousel.tsx +0 -224
- package/packages/hive-ui/src/components/ui/chart.tsx +0 -303
- package/packages/hive-ui/src/components/ui/checkbox.tsx +0 -26
- package/packages/hive-ui/src/components/ui/collapsible.tsx +0 -9
- package/packages/hive-ui/src/components/ui/command.tsx +0 -133
- package/packages/hive-ui/src/components/ui/context-menu.tsx +0 -178
- package/packages/hive-ui/src/components/ui/dialog.tsx +0 -95
- package/packages/hive-ui/src/components/ui/drawer.tsx +0 -87
- package/packages/hive-ui/src/components/ui/dropdown-menu.tsx +0 -179
- package/packages/hive-ui/src/components/ui/form.tsx +0 -129
- package/packages/hive-ui/src/components/ui/hover-card.tsx +0 -27
- package/packages/hive-ui/src/components/ui/input-otp.tsx +0 -61
- package/packages/hive-ui/src/components/ui/input.tsx +0 -22
- package/packages/hive-ui/src/components/ui/label.tsx +0 -17
- package/packages/hive-ui/src/components/ui/menubar.tsx +0 -207
- package/packages/hive-ui/src/components/ui/navigation-menu.tsx +0 -120
- package/packages/hive-ui/src/components/ui/pagination.tsx +0 -80
- package/packages/hive-ui/src/components/ui/popover.tsx +0 -29
- package/packages/hive-ui/src/components/ui/progress.tsx +0 -23
- package/packages/hive-ui/src/components/ui/radio-group.tsx +0 -36
- package/packages/hive-ui/src/components/ui/resizable.tsx +0 -37
- package/packages/hive-ui/src/components/ui/scroll-area.tsx +0 -38
- package/packages/hive-ui/src/components/ui/select.tsx +0 -143
- package/packages/hive-ui/src/components/ui/separator.tsx +0 -20
- package/packages/hive-ui/src/components/ui/sheet.tsx +0 -107
- package/packages/hive-ui/src/components/ui/sidebar.tsx +0 -636
- package/packages/hive-ui/src/components/ui/skeleton.tsx +0 -7
- package/packages/hive-ui/src/components/ui/slider.tsx +0 -23
- package/packages/hive-ui/src/components/ui/sonner.tsx +0 -27
- package/packages/hive-ui/src/components/ui/switch.tsx +0 -27
- package/packages/hive-ui/src/components/ui/table.tsx +0 -72
- package/packages/hive-ui/src/components/ui/tabs.tsx +0 -53
- package/packages/hive-ui/src/components/ui/textarea.tsx +0 -21
- package/packages/hive-ui/src/components/ui/toast.tsx +0 -111
- package/packages/hive-ui/src/components/ui/toaster.tsx +0 -24
- package/packages/hive-ui/src/components/ui/toggle-group.tsx +0 -49
- package/packages/hive-ui/src/components/ui/toggle.tsx +0 -37
- package/packages/hive-ui/src/components/ui/tooltip.tsx +0 -28
- package/packages/hive-ui/src/components/ui/use-toast.ts +0 -3
- package/packages/hive-ui/src/hooks/use-mobile.tsx +0 -19
- package/packages/hive-ui/src/hooks/use-toast.ts +0 -186
- package/packages/hive-ui/src/hooks/useAgentConfig.ts +0 -25
- package/packages/hive-ui/src/hooks/useAgents.ts +0 -38
- package/packages/hive-ui/src/hooks/useBridge.ts +0 -38
- package/packages/hive-ui/src/hooks/useCanvas.ts +0 -24
- package/packages/hive-ui/src/hooks/useChannels.ts +0 -2
- package/packages/hive-ui/src/hooks/useEthics.ts +0 -51
- package/packages/hive-ui/src/hooks/useProviders.ts +0 -14
- package/packages/hive-ui/src/hooks/useTheme.ts +0 -29
- package/packages/hive-ui/src/hooks/useUserConfig.ts +0 -17
- package/packages/hive-ui/src/hooks/useWebSocket.ts +0 -12
- package/packages/hive-ui/src/index.css +0 -620
- package/packages/hive-ui/src/lib/api.ts +0 -100
- package/packages/hive-ui/src/lib/constants.ts +0 -6
- package/packages/hive-ui/src/lib/models.ts +0 -64
- package/packages/hive-ui/src/lib/swal.ts +0 -30
- package/packages/hive-ui/src/lib/utils.ts +0 -6
- package/packages/hive-ui/src/lib/websocket.ts +0 -7
- package/packages/hive-ui/src/main.tsx +0 -5
- package/packages/hive-ui/src/modules/agent-config/details/AgentDetailsEditor.tsx +0 -524
- package/packages/hive-ui/src/modules/agent-config/ethics/EthicsConflictDetector.tsx +0 -18
- package/packages/hive-ui/src/modules/agent-config/ethics/EthicsEditor.tsx +0 -19
- package/packages/hive-ui/src/modules/agent-config/ethics/EthicsRulesList.tsx +0 -36
- package/packages/hive-ui/src/modules/agent-config/ethics/EthicsTemplateGallery.tsx +0 -361
- package/packages/hive-ui/src/modules/agent-config/ethics/index.ts +0 -4
- package/packages/hive-ui/src/modules/agent-config/index.ts +0 -6
- package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerAdd.tsx +0 -322
- package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerCard.tsx +0 -93
- package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerConfig.tsx +0 -427
- package/packages/hive-ui/src/modules/agent-config/mcp/MCPServerList.tsx +0 -85
- package/packages/hive-ui/src/modules/agent-config/mcp/MCPToolExplorer.tsx +0 -79
- package/packages/hive-ui/src/modules/agent-config/mcp/index.ts +0 -5
- package/packages/hive-ui/src/modules/agent-config/shared/ConfigEditorLayout.tsx +0 -30
- package/packages/hive-ui/src/modules/agent-config/shared/ConfigExporter.tsx +0 -26
- package/packages/hive-ui/src/modules/agent-config/shared/ConfigImporter.tsx +0 -25
- package/packages/hive-ui/src/modules/agent-config/shared/DiffViewer.tsx +0 -31
- package/packages/hive-ui/src/modules/agent-config/shared/MarkdownEditor.tsx +0 -32
- package/packages/hive-ui/src/modules/agent-config/shared/SaveStatusIndicator.tsx +0 -23
- package/packages/hive-ui/src/modules/agent-config/shared/ValidationPanel.tsx +0 -36
- package/packages/hive-ui/src/modules/agent-config/shared/index.ts +0 -7
- package/packages/hive-ui/src/modules/agent-config/skills/SkillCard.tsx +0 -81
- package/packages/hive-ui/src/modules/agent-config/skills/SkillConfigEditor.tsx +0 -22
- package/packages/hive-ui/src/modules/agent-config/skills/SkillCreator.tsx +0 -60
- package/packages/hive-ui/src/modules/agent-config/skills/SkillInstaller.tsx +0 -23
- package/packages/hive-ui/src/modules/agent-config/skills/SkillList.tsx +0 -72
- package/packages/hive-ui/src/modules/agent-config/skills/SkillsTab.tsx +0 -202
- package/packages/hive-ui/src/modules/agent-config/skills/index.ts +0 -5
- package/packages/hive-ui/src/modules/agent-config/tools/ToolCard.tsx +0 -27
- package/packages/hive-ui/src/modules/agent-config/tools/ToolConfigPanel.tsx +0 -22
- package/packages/hive-ui/src/modules/agent-config/tools/ToolManager.tsx +0 -266
- package/packages/hive-ui/src/modules/agent-config/tools/ToolPermissions.tsx +0 -287
- package/packages/hive-ui/src/modules/agent-config/tools/ToolRegistry.tsx +0 -84
- package/packages/hive-ui/src/modules/agent-config/tools/ToolUsageStats.tsx +0 -52
- package/packages/hive-ui/src/modules/agent-config/tools/index.ts +0 -4
- package/packages/hive-ui/src/modules/agent-config/user/ActiveAgentsList.tsx +0 -109
- package/packages/hive-ui/src/modules/agent-config/user/GlobalConfigOverview.tsx +0 -119
- package/packages/hive-ui/src/modules/agent-config/user/UserMemoryManager.tsx +0 -54
- package/packages/hive-ui/src/modules/agent-config/user/UserPreferencesForm.tsx +0 -163
- package/packages/hive-ui/src/modules/agent-config/user/UserProfileEditor.tsx +0 -261
- package/packages/hive-ui/src/modules/agent-config/user/index.ts +0 -3
- package/packages/hive-ui/src/modules/agents/AgentActivityLog.tsx +0 -25
- package/packages/hive-ui/src/modules/agents/AgentCard.tsx +0 -305
- package/packages/hive-ui/src/modules/agents/AgentCreateForm.tsx +0 -446
- package/packages/hive-ui/src/modules/agents/AgentDetail.tsx +0 -28
- package/packages/hive-ui/src/modules/agents/AgentInternalCard.tsx +0 -162
- package/packages/hive-ui/src/modules/agents/AgentList.tsx +0 -29
- package/packages/hive-ui/src/modules/agents/AgentStatusBadge.tsx +0 -34
- package/packages/hive-ui/src/modules/agents/ModelSelector.tsx +0 -151
- package/packages/hive-ui/src/modules/bridge/BridgeLogViewer.tsx +0 -61
- package/packages/hive-ui/src/modules/bridge/BridgeProcessList.tsx +0 -77
- package/packages/hive-ui/src/modules/bridge/BridgeStatus.tsx +0 -23
- package/packages/hive-ui/src/modules/bridge/BridgeTerminal.tsx +0 -7
- package/packages/hive-ui/src/modules/canvas/CanvasButton.tsx +0 -3
- package/packages/hive-ui/src/modules/canvas/CanvasChart.tsx +0 -3
- package/packages/hive-ui/src/modules/canvas/CanvasComponentMap.tsx +0 -605
- package/packages/hive-ui/src/modules/canvas/CanvasContainer.tsx +0 -360
- package/packages/hive-ui/src/modules/canvas/CanvasForm.tsx +0 -3
- package/packages/hive-ui/src/modules/canvas/CanvasMarkdown.tsx +0 -3
- package/packages/hive-ui/src/modules/canvas/CanvasTable.tsx +0 -3
- package/packages/hive-ui/src/modules/canvas/ComponentRenderer.tsx +0 -30
- package/packages/hive-ui/src/modules/canvas/DynamicRenderer.tsx +0 -3
- package/packages/hive-ui/src/modules/channels/available/AvailableChannelsGrid.tsx +0 -89
- package/packages/hive-ui/src/modules/channels/available/ChannelAuthForm.tsx +0 -33
- package/packages/hive-ui/src/modules/channels/available/ChannelSetupWizard.tsx +0 -48
- package/packages/hive-ui/src/modules/channels/available/ChannelTestConnection.tsx +0 -37
- package/packages/hive-ui/src/modules/channels/available/ChannelTypeCard.tsx +0 -30
- package/packages/hive-ui/src/modules/channels/available/ChannelWebhookConfig.tsx +0 -30
- package/packages/hive-ui/src/modules/channels/available/index.ts +0 -6
- package/packages/hive-ui/src/modules/channels/connected/ChannelCard.tsx +0 -95
- package/packages/hive-ui/src/modules/channels/connected/ChannelConfigPanel.tsx +0 -260
- package/packages/hive-ui/src/modules/channels/connected/ChannelDisconnectButton.tsx +0 -21
- package/packages/hive-ui/src/modules/channels/connected/ChannelLogsViewer.tsx +0 -42
- package/packages/hive-ui/src/modules/channels/connected/ChannelQRCode.tsx +0 -32
- package/packages/hive-ui/src/modules/channels/connected/ChannelReconnectButton.tsx +0 -16
- package/packages/hive-ui/src/modules/channels/connected/ChannelStatusBadge.tsx +0 -26
- package/packages/hive-ui/src/modules/channels/connected/ConnectedChannelsList.tsx +0 -40
- package/packages/hive-ui/src/modules/channels/connected/index.ts +0 -8
- package/packages/hive-ui/src/modules/channels/shared/ChannelCard.tsx +0 -84
- package/packages/hive-ui/src/modules/channels/shared/ChannelConfigDialog.tsx +0 -279
- package/packages/hive-ui/src/modules/channels/shared/ChannelIcon.tsx +0 -40
- package/packages/hive-ui/src/modules/channels/shared/ChannelStats.tsx +0 -37
- package/packages/hive-ui/src/modules/channels/shared/ChannelTypeBadge.tsx +0 -23
- package/packages/hive-ui/src/modules/channels/shared/ConnectionHealthIndicator.tsx +0 -20
- package/packages/hive-ui/src/modules/channels/shared/MessagePreview.tsx +0 -19
- package/packages/hive-ui/src/modules/channels/shared/index.ts +0 -5
- package/packages/hive-ui/src/modules/chat/ChatContainer.tsx +0 -268
- package/packages/hive-ui/src/modules/chat/ChatHistory.tsx +0 -101
- package/packages/hive-ui/src/modules/chat/ChatInput.tsx +0 -108
- package/packages/hive-ui/src/modules/chat/ChatMessage.tsx +0 -137
- package/packages/hive-ui/src/modules/chat/ThinkingIndicator.tsx +0 -10
- package/packages/hive-ui/src/modules/layout/AppLayout.tsx +0 -45
- package/packages/hive-ui/src/modules/layout/ConnectionStatus.tsx +0 -19
- package/packages/hive-ui/src/modules/layout/Header.tsx +0 -20
- package/packages/hive-ui/src/modules/layout/HiveSidebar.tsx +0 -173
- package/packages/hive-ui/src/modules/layout/ThemeToggle.tsx +0 -18
- package/packages/hive-ui/src/modules/providers/ProviderCard.tsx +0 -319
- package/packages/hive-ui/src/modules/providers/ProviderConfigForm.tsx +0 -146
- package/packages/hive-ui/src/modules/providers/ProviderFailoverConfig.tsx +0 -110
- package/packages/hive-ui/src/modules/providers/ProviderList.tsx +0 -33
- package/packages/hive-ui/src/modules/providers/ProviderStatusIndicator.tsx +0 -23
- package/packages/hive-ui/src/modules/providers/configs/ProviderAPIKeyManager.tsx +0 -39
- package/packages/hive-ui/src/modules/providers/configs/ProviderEndpointConfig.tsx +0 -27
- package/packages/hive-ui/src/modules/providers/configs/ProviderRateLimits.tsx +0 -37
- package/packages/hive-ui/src/modules/providers/configs/ProviderRetryPolicy.tsx +0 -46
- package/packages/hive-ui/src/modules/providers/configs/index.ts +0 -4
- package/packages/hive-ui/src/modules/providers/index.ts +0 -5
- package/packages/hive-ui/src/modules/providers/models/ModelBenchmarkBadge.tsx +0 -21
- package/packages/hive-ui/src/modules/providers/models/ModelCapabilities.tsx +0 -44
- package/packages/hive-ui/src/modules/providers/models/ModelCard.tsx +0 -36
- package/packages/hive-ui/src/modules/providers/models/ModelComparisonTable.tsx +0 -47
- package/packages/hive-ui/src/modules/providers/models/ModelList.tsx +0 -51
- package/packages/hive-ui/src/modules/providers/models/ModelPricingInfo.tsx +0 -17
- package/packages/hive-ui/src/modules/providers/models/ModelSelector.tsx +0 -32
- package/packages/hive-ui/src/modules/providers/models/index.ts +0 -7
- package/packages/hive-ui/src/pages/AgentDetailPage.tsx +0 -74
- package/packages/hive-ui/src/pages/AgentNewPage.tsx +0 -5
- package/packages/hive-ui/src/pages/AgentsPage.tsx +0 -147
- package/packages/hive-ui/src/pages/BridgePage.tsx +0 -83
- package/packages/hive-ui/src/pages/CanvasPage.tsx +0 -32
- package/packages/hive-ui/src/pages/ChannelsPage.tsx +0 -176
- package/packages/hive-ui/src/pages/DashboardPage.tsx +0 -321
- package/packages/hive-ui/src/pages/Index.tsx +0 -14
- package/packages/hive-ui/src/pages/LogsPage.tsx +0 -252
- package/packages/hive-ui/src/pages/NotFound.tsx +0 -24
- package/packages/hive-ui/src/pages/ProjectsPage.tsx +0 -241
- package/packages/hive-ui/src/pages/ProvidersPage.tsx +0 -111
- package/packages/hive-ui/src/pages/SettingsPage.tsx +0 -147
- package/packages/hive-ui/src/pages/SetupPage.tsx +0 -1177
- package/packages/hive-ui/src/pages/WebChatPage.tsx +0 -15
- package/packages/hive-ui/src/stores/agentConfigStore.ts +0 -32
- package/packages/hive-ui/src/stores/agentStore.ts +0 -5
- package/packages/hive-ui/src/stores/bridgeStore.ts +0 -237
- package/packages/hive-ui/src/stores/canvasStore.ts +0 -250
- package/packages/hive-ui/src/stores/channelStore.ts +0 -5
- package/packages/hive-ui/src/stores/chatStore.ts +0 -42
- package/packages/hive-ui/src/stores/ethicsStore.ts +0 -141
- package/packages/hive-ui/src/stores/mcpStore.ts +0 -5
- package/packages/hive-ui/src/stores/modelStore.ts +0 -2
- package/packages/hive-ui/src/stores/projectsStore.ts +0 -141
- package/packages/hive-ui/src/stores/providerStore.ts +0 -2
- package/packages/hive-ui/src/stores/skillStore.ts +0 -5
- package/packages/hive-ui/src/stores/toolStore.ts +0 -5
- package/packages/hive-ui/src/stores/useGlobalConfigStore.ts +0 -937
- package/packages/hive-ui/src/stores/useLoaderStore.ts +0 -21
- package/packages/hive-ui/src/stores/useNotesAndCronsStore.ts +0 -144
- package/packages/hive-ui/src/stores/useWebSocketStore.ts +0 -152
- package/packages/hive-ui/src/stores/useWelcomeStore.ts +0 -37
- package/packages/hive-ui/src/stores/userConfigStore.ts +0 -23
- package/packages/hive-ui/src/stores/userStore.ts +0 -82
- package/packages/hive-ui/src/test/setup.ts +0 -15
- package/packages/hive-ui/src/types/agent-config.ts +0 -33
- package/packages/hive-ui/src/types/agent.ts +0 -65
- package/packages/hive-ui/src/types/bridge.ts +0 -27
- package/packages/hive-ui/src/types/canvas.ts +0 -76
- package/packages/hive-ui/src/types/channels.ts +0 -109
- package/packages/hive-ui/src/types/chat.ts +0 -25
- package/packages/hive-ui/src/types/connections.ts +0 -17
- package/packages/hive-ui/src/types/ethics.ts +0 -41
- package/packages/hive-ui/src/types/index.ts +0 -15
- package/packages/hive-ui/src/types/mcp.ts +0 -36
- package/packages/hive-ui/src/types/notes-crons.ts +0 -31
- package/packages/hive-ui/src/types/providers.ts +0 -145
- package/packages/hive-ui/src/types/skill.ts +0 -12
- package/packages/hive-ui/src/types/tool.ts +0 -44
- package/packages/hive-ui/src/types/user.ts +0 -26
- package/packages/hive-ui/src/types/websocket.ts +0 -14
- package/packages/hive-ui/src/vite-env.d.ts +0 -1
- package/packages/mcp/package.json +0 -26
- package/packages/mcp/src/config.ts +0 -13
- package/packages/mcp/src/index.ts +0 -1
- package/packages/mcp/src/logger.ts +0 -42
- package/packages/mcp/src/manager.ts +0 -439
- package/packages/mcp/src/transports/index.ts +0 -67
- package/packages/mcp/src/transports/sse.ts +0 -241
- package/packages/mcp/src/transports/websocket.ts +0 -159
- package/packages/skills/package.json +0 -21
- package/packages/skills/src/index.ts +0 -1
- package/packages/skills/src/loader.ts +0 -346
|
@@ -1,608 +0,0 @@
|
|
|
1
|
-
import { getDb } from "./sqlite"
|
|
2
|
-
import { logger } from "../utils/logger"
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Seed de datos predeterminados para Hive
|
|
6
|
-
* Todos los elementos se crean con enabled=1 (disponibles) pero active=0 (no activados)
|
|
7
|
-
* El usuario los activa durante el onboarding o desde la UI
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export interface SeedData {
|
|
11
|
-
tools: Array<{ id: string; name: string; category: string; description: string; enabled?: boolean }>
|
|
12
|
-
providers: Array<{ id: string; name: string; baseUrl?: string; category?: string }>
|
|
13
|
-
models: Array<{ id: string; providerId: string; name: string; modelType: string; contextWindow?: number; capabilities?: string }>
|
|
14
|
-
mcpServers: Array<{ id: string; name: string; transport: string; command?: string; args?: string[]; builtin: boolean }>
|
|
15
|
-
channels: Array<{ id: string; type: string }>
|
|
16
|
-
ethics: Array<{ id: string; name: string; description: string; content: string; isDefault: boolean }>
|
|
17
|
-
codeBridge: Array<{ id: string; name: string; cliCommand: string; port: number }>
|
|
18
|
-
codeBridgeConfig: Array<{ id: string; key: string; value: string }>
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const SEED_DATA: SeedData = {
|
|
22
|
-
tools: [
|
|
23
|
-
|
|
24
|
-
// ─────────────────────────────────────────
|
|
25
|
-
// 1. FILESYSTEM — Espacio de trabajo del agente
|
|
26
|
-
// ─────────────────────────────────────────
|
|
27
|
-
{ id: "fs_read", name: "fs_read", category: "filesystem", description: "Read file content from agent workspace. Spanish: leer archivo, ver contenido, abrir archivo" },
|
|
28
|
-
{ id: "fs_write", name: "fs_write", category: "filesystem", description: "Create or overwrite file in agent workspace. Spanish: crear archivo, guardar archivo, escribir archivo" },
|
|
29
|
-
{ id: "fs_edit", name: "fs_edit", category: "filesystem", description: "Edit specific lines or sections of a file. Spanish: editar archivo, modificar líneas, actualizar contenido" },
|
|
30
|
-
{ id: "fs_delete", name: "fs_delete", category: "filesystem", description: "Delete file or directory from workspace. Spanish: eliminar archivo, borrar archivo, borrar carpeta" },
|
|
31
|
-
{ id: "fs_list", name: "fs_list", category: "filesystem", description: "List files and directories in workspace. Spanish: listar archivos, ver carpeta, explorar directorio" },
|
|
32
|
-
{ id: "fs_glob", name: "fs_glob", category: "filesystem", description: "Find files matching wildcard patterns. Spanish: buscar archivos, patrón, encontrar archivos" },
|
|
33
|
-
{ id: "fs_exists", name: "fs_exists", category: "filesystem", description: "Check if a file or directory exists. Spanish: verificar archivo, comprobar, existe archivo" },
|
|
34
|
-
|
|
35
|
-
// ─────────────────────────────────────────
|
|
36
|
-
// 2. WEB — Búsqueda, navegación + automatización
|
|
37
|
-
// ─────────────────────────────────────────
|
|
38
|
-
{ id: "web_search", name: "web_search", category: "web", description: "Search the web for current information and research. Spanish: buscar en internet, búsqueda web, noticias, información" },
|
|
39
|
-
{ id: "web_fetch", name: "web_fetch", category: "web", description: "Fetch plain content from a URL (lightweight, no JS). Spanish: obtener página, descargar contenido, extraer texto de url" },
|
|
40
|
-
{ id: "browser_navigate", name: "browser_navigate", category: "web", description: "Navigate browser to URL, get rendered page content (supports JS). Spanish: navegar a url, abrir página, sitio web" },
|
|
41
|
-
{ id: "browser_screenshot", name: "browser_screenshot", category: "web", description: "Take screenshot of current browser page. Spanish: captura de pantalla, screenshot, imagen de página" },
|
|
42
|
-
{ id: "browser_click", name: "browser_click", category: "web", description: "Click on a web page element. Spanish: hacer clic, botón, enlace, interactuar" },
|
|
43
|
-
{ id: "browser_type", name: "browser_type", category: "web", description: "Type text into a form field in the browser. Spanish: escribir formulario, tipear, campo de texto, input" },
|
|
44
|
-
|
|
45
|
-
// ─────────────────────────────────────────
|
|
46
|
-
// 3. PROJECTS — Proyectos y tareas en BD
|
|
47
|
-
// ─────────────────────────────────────────
|
|
48
|
-
{ id: "project_create", name: "project_create", category: "projects", description: "Create a new project with tasks in the database. Spanish: crear proyecto, nuevo proyecto, iniciar plan" },
|
|
49
|
-
{ id: "project_list", name: "project_list", category: "projects", description: "List all projects with their status. Spanish: listar proyectos, ver proyectos, historial" },
|
|
50
|
-
{ id: "project_update", name: "project_update", category: "projects", description: "Update project progress or metadata. Spanish: actualizar proyecto, avance, porcentaje, estado" },
|
|
51
|
-
{ id: "project_done", name: "project_done", category: "projects", description: "Mark project as completed and archive it. Spanish: proyecto terminado, cerrar proyecto, completado" },
|
|
52
|
-
{ id: "project_fail", name: "project_fail", category: "projects", description: "Mark project as failed and record reason. Spanish: proyecto fallido, marcar fracaso, error" },
|
|
53
|
-
{ id: "task_create", name: "task_create", category: "projects", description: "Add a task or subtask to an existing project. Spanish: crear tarea, agregar tarea, subtarea, pendiente" },
|
|
54
|
-
{ id: "task_update", name: "task_update", category: "projects", description: "Update task status (pending, in_progress, done). Spanish: actualizar tarea, marcar completa, en progreso" },
|
|
55
|
-
{ id: "task_evaluate", name: "task_evaluate", category: "projects", description: "Evaluate task result against acceptance criteria. Spanish: evaluar tarea, validar resultado, criterios de aceptación" },
|
|
56
|
-
|
|
57
|
-
// ─────────────────────────────────────────
|
|
58
|
-
// 4. CRON — Tareas programadas (≠ tareas de proyecto)
|
|
59
|
-
// ─────────────────────────────────────────
|
|
60
|
-
{ id: "cron_add", name: "cron_add", category: "cron", description: "Schedule a recurring or one-time job using a cron expression. NOTE: for project tasks use task_create instead. Spanish: programar tarea, recordatorio, alarma, automatizar horario" },
|
|
61
|
-
{ id: "cron_list", name: "cron_list", category: "cron", description: "List all scheduled cron jobs and next execution times. Spanish: ver tareas programadas, cronograma, próximos eventos" },
|
|
62
|
-
{ id: "cron_edit", name: "cron_edit", category: "cron", description: "Edit an existing cron job expression or config. Spanish: modificar horario, cambiar programación, editar cron" },
|
|
63
|
-
{ id: "cron_remove", name: "cron_remove", category: "cron", description: "Remove a scheduled cron job. NOTE: to remove project tasks use task_update. Spanish: eliminar cron, cancelar recordatorio, borrar programación" },
|
|
64
|
-
|
|
65
|
-
// ─────────────────────────────────────────
|
|
66
|
-
// 5. CLI — Ejecución de comandos
|
|
67
|
-
// ─────────────────────────────────────────
|
|
68
|
-
{ id: "cli_exec", name: "cli_exec", category: "cli", description: "Execute shell/bash commands in the agent environment. NOTE: do NOT use for cron scheduling, use cron_add instead. Spanish: ejecutar comando, terminal, bash, script, consola" },
|
|
69
|
-
|
|
70
|
-
// ─────────────────────────────────────────
|
|
71
|
-
// 6. AGENTS — Memoria, workers y delegación
|
|
72
|
-
// ─────────────────────────────────────────
|
|
73
|
-
{ id: "memory_write", name: "memory_write", category: "agents", description: "Store information in persistent long-term memory. Spanish: guardar memoria, recordar, guardar dato, memoria persistente" },
|
|
74
|
-
{ id: "memory_read", name: "memory_read", category: "agents", description: "Retrieve a memory entry by identifier. Spanish: leer memoria, recuperar dato, obtener memoria" },
|
|
75
|
-
{ id: "memory_list", name: "memory_list", category: "agents", description: "List all saved memory entries. Spanish: listar memorias, ver memorias, todas las memorias" },
|
|
76
|
-
{ id: "memory_search", name: "memory_search", category: "agents", description: "Search memories by keyword. Spanish: buscar memoria, encontrar recuerdo, buscar dato guardado" },
|
|
77
|
-
{ id: "memory_delete", name: "memory_delete", category: "agents", description: "Delete a specific memory entry. Spanish: borrar memoria, eliminar recuerdo, quitar dato" },
|
|
78
|
-
{ id: "agent_create", name: "agent_create", category: "agents", description: "Create a new specialized worker agent. Spanish: crear agente, nuevo worker, nuevo trabajador" },
|
|
79
|
-
{ id: "agent_find", name: "agent_find", category: "agents", description: "Find existing running or idle worker agents. Spanish: buscar agente, encontrar worker, localizar agente" },
|
|
80
|
-
{ id: "agent_archive", name: "agent_archive", category: "agents", description: "Archive or terminate a worker agent. Spanish: archivar agente, terminar worker, desactivar agente" },
|
|
81
|
-
{ id: "task_delegate", name: "task_delegate", category: "agents", description: "Delegate a general task to a specific worker agent. Spanish: delegar tarea, asignar worker, ejecutar por agente" },
|
|
82
|
-
{ id: "task_delegate_code", name: "task_delegate_code", category: "agents", description: "Delegate a coding task to a CLI subagent (Qwen, Claude, etc.) via Code Bridge. Spanish: delegar código, subagente CLI, programación, Qwen" },
|
|
83
|
-
{ id: "task_status", name: "task_status", category: "agents", description: "Get execution status of one or more delegated tasks. Spanish: estado tarea delegada, verificar progreso, consultar tarea" },
|
|
84
|
-
{ id: "bus_publish", name: "bus_publish", category: "agents", description: "Publish a message to the Agent Bus for worker-to-worker communication. Spanish: publicar mensaje, comunicar workers, enviar bus" },
|
|
85
|
-
{ id: "bus_read", name: "bus_read", category: "agents", description: "Read unread messages from the Agent Bus. Spanish: leer mensajes bus, recibir mensajes, verificar bus" },
|
|
86
|
-
{ id: "project_updates", name: "project_updates", category: "agents", description: "Get recent status updates from workers in the same project. Spanish: actualizaciones proyecto, estado workers, progreso equipo" },
|
|
87
|
-
|
|
88
|
-
// ─────────────────────────────────────────
|
|
89
|
-
// 7. CANVAS — UI interactiva
|
|
90
|
-
// ─────────────────────────────────────────
|
|
91
|
-
{ id: "canvas_render", name: "canvas_render", category: "canvas", description: "Render a component or visualization on the canvas. Spanish: renderizar, visualizar, gráfico, diagrama" },
|
|
92
|
-
{ id: "canvas_ask", name: "canvas_ask", category: "canvas", description: "Show interactive form and wait for user input. Spanish: formulario interactivo, preguntar usuario, input" },
|
|
93
|
-
{ id: "canvas_confirm", name: "canvas_confirm", category: "canvas", description: "Show a confirmation dialog before executing an action. Spanish: confirmar acción, diálogo, aprobar" },
|
|
94
|
-
{ id: "canvas_show_card", name: "canvas_show_card", category: "canvas", description: "Display structured information in card format. Spanish: mostrar tarjeta, card, información estructurada" },
|
|
95
|
-
{ id: "canvas_show_progress", name: "canvas_show_progress", category: "canvas", description: "Show progress bar or status indicator. Spanish: barra de progreso, indicador, progreso visual" },
|
|
96
|
-
{ id: "canvas_show_list", name: "canvas_show_list", category: "canvas", description: "Display key-value list information. Spanish: lista clave-valor, mostrar lista, información en lista" },
|
|
97
|
-
{ id: "canvas_clear", name: "canvas_clear", category: "canvas", description: "Clear current canvas content. Spanish: limpiar canvas, borrar visualización, resetear" },
|
|
98
|
-
|
|
99
|
-
// ─────────────────────────────────────────
|
|
100
|
-
// 8. CODEBRIDGE — Subagentes CLI de código externos
|
|
101
|
-
// Conecta con: Claude Code, Qwen CLI, Gemini CLI, OpenCode CLI
|
|
102
|
-
// ─────────────────────────────────────────
|
|
103
|
-
{
|
|
104
|
-
id: "codebridge_launch",
|
|
105
|
-
name: "codebridge_launch",
|
|
106
|
-
category: "codebridge",
|
|
107
|
-
description: "Launch an external coding CLI subagent (Claude Code, Qwen CLI, Gemini CLI, OpenCode CLI) to execute a coding task locally. Returns a process ID to track execution. Spanish: lanzar agente de código, iniciar Claude Code, Qwen CLI, Gemini CLI, OpenCode, subagente externo de programación"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
id: "codebridge_status",
|
|
111
|
-
name: "codebridge_status",
|
|
112
|
-
category: "codebridge",
|
|
113
|
-
description: "Check the status and output of a running CodeBridge subagent (Claude Code, Qwen CLI, Gemini CLI, OpenCode CLI). Spanish: estado agente de código, verificar Claude Code, progreso subagente externo"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
id: "codebridge_cancel",
|
|
117
|
-
name: "codebridge_cancel",
|
|
118
|
-
category: "codebridge",
|
|
119
|
-
description: "Cancel and terminate a running CodeBridge subagent process (Claude Code, Qwen CLI, Gemini CLI, OpenCode CLI). Spanish: cancelar agente de código, detener Claude Code, terminar subagente externo"
|
|
120
|
-
},
|
|
121
|
-
// ─────────────────────────────────────────
|
|
122
|
-
// 9. VOICE — Voz
|
|
123
|
-
// ─────────────────────────────────────────
|
|
124
|
-
{ id: "voice_transcribe", name: "voice_transcribe", category: "voice", description: "Transcribe audio input to text. Spanish: transcribir audio, voz a texto, reconocimiento de voz" },
|
|
125
|
-
{ id: "voice_speak", name: "voice_speak", category: "voice", description: "Convert text to synthesized speech output. Spanish: texto a voz, sintetizar, hablar, leer en voz alta" },
|
|
126
|
-
|
|
127
|
-
// 10. SEARCH-KNOWLEDGE
|
|
128
|
-
{ id: "search_knowledge", name: "search_knowledge", category: "search-knowledge", description: "Search in the knowledge base. Spanish: buscar en la base de conocimientos" },
|
|
129
|
-
|
|
130
|
-
],
|
|
131
|
-
|
|
132
|
-
providers: [
|
|
133
|
-
{ id: "anthropic", name: "Anthropic", baseUrl: "https://api.anthropic.com" },
|
|
134
|
-
{ id: "openai", name: "OpenAI", baseUrl: "https://api.openai.com/v1" },
|
|
135
|
-
{ id: "gemini", name: "Google Gemini", baseUrl: "https://generativelanguage.googleapis.com/v1beta" },
|
|
136
|
-
{ id: "mistral", name: "Mistral AI", baseUrl: "https://api.mistral.ai/v1" },
|
|
137
|
-
{ id: "deepseek", name: "DeepSeek", baseUrl: "https://api.deepseek.com/v1" },
|
|
138
|
-
{ id: "kimi", name: "Kimi (Moonshot)", baseUrl: "https://api.moonshot.cn/v1" },
|
|
139
|
-
{ id: "openrouter", name: "OpenRouter", baseUrl: "https://openrouter.ai/api/v1" },
|
|
140
|
-
{ id: "ollama", name: "Ollama (Local)", baseUrl: "http://localhost:11434" },
|
|
141
|
-
{ id: "groq", name: "Groq", baseUrl: "https://api.groq.com/openai/v1" },
|
|
142
|
-
{ id: "elevenlabs", name: "ElevenLabs", baseUrl: "https://api.elevenlabs.io/v1" },
|
|
143
|
-
{ id: "qwen", name: "Qwen (Alibaba)", baseUrl: "https://dashscope.aliyuncs.com/api/v1" },
|
|
144
|
-
],
|
|
145
|
-
|
|
146
|
-
models: [
|
|
147
|
-
// ── Anthropic (fuente: docs.anthropic.com/en/docs/about-claude/models) ──
|
|
148
|
-
{ id: "claude-opus-4-6", providerId: "anthropic", name: "Claude Opus 4.6", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]) },
|
|
149
|
-
{ id: "claude-sonnet-4-6", providerId: "anthropic", name: "Claude Sonnet 4.6", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
|
|
150
|
-
{ id: "claude-haiku-4-5-20251001", providerId: "anthropic", name: "Claude Haiku 4.5", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
151
|
-
|
|
152
|
-
// ── OpenAI (fuente: openrouter.ai/openai) ──
|
|
153
|
-
// Chat / Reasoning
|
|
154
|
-
{ id: "gpt-4o", providerId: "openai", name: "GPT-4o", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
|
|
155
|
-
{ id: "gpt-4o-mini", providerId: "openai", name: "GPT-4o Mini", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
156
|
-
{ id: "gpt-5.4", providerId: "openai", name: "GPT-5.4", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
|
|
157
|
-
{ id: "gpt-5.4-pro", providerId: "openai", name: "GPT-5.4 Pro", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]) },
|
|
158
|
-
{ id: "gpt-5.3", providerId: "openai", name: "GPT-5.3", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
159
|
-
{ id: "gpt-5.2", providerId: "openai", name: "GPT-5.2", modelType: "llm", contextWindow: 400000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
|
|
160
|
-
{ id: "o4-mini", providerId: "openai", name: "o4-mini", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "reasoning", "streaming"]) },
|
|
161
|
-
// STT / TTS
|
|
162
|
-
{ id: "whisper-1", providerId: "openai", name: "Whisper 1", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription", "translation"]) },
|
|
163
|
-
{ id: "tts-1", providerId: "openai", name: "TTS-1", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
|
|
164
|
-
{ id: "tts-1-hd", providerId: "openai", name: "TTS-1 HD", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "high_quality"]) },
|
|
165
|
-
{ id: "gpt-4o-mini-tts", providerId: "openai", name: "GPT-4o Mini TTS", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
|
|
166
|
-
|
|
167
|
-
// ── Google Gemini (fuente: openrouter.ai/google + ai.google.dev) ──
|
|
168
|
-
{ id: "gemini-3.1-pro-preview", providerId: "gemini", name: "Gemini 3.1 Pro Preview", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]) },
|
|
169
|
-
{ id: "gemini-3.1-flash-lite-preview", providerId: "gemini", name: "Gemini 3.1 Flash Lite Preview", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
170
|
-
{ id: "gemini-3-flash-preview", providerId: "gemini", name: "Gemini 3 Flash Preview", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
171
|
-
{ id: "gemini-2.5-pro", providerId: "gemini", name: "Gemini 2.5 Pro", modelType: "llm", contextWindow: 2000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]) },
|
|
172
|
-
{ id: "gemini-2.5-flash", providerId: "gemini", name: "Gemini 2.5 Flash", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]) },
|
|
173
|
-
{ id: "gemini-2.0-flash", providerId: "gemini", name: "Gemini 2.0 Flash", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
174
|
-
{ id: "gemini-2.0-flash-lite", providerId: "gemini", name: "Gemini 2.0 Flash Lite", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
175
|
-
// TTS
|
|
176
|
-
{ id: "gemini-2.5-flash-preview-tts", providerId: "gemini", name: "Gemini 2.5 Flash TTS", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
|
|
177
|
-
{ id: "gemini-2.5-pro-preview-tts", providerId: "gemini", name: "Gemini 2.5 Pro TTS", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "high_quality"]) },
|
|
178
|
-
|
|
179
|
-
// ── Mistral (fuente: openrouter.ai/mistralai + docs.mistral.ai) ──
|
|
180
|
-
{ id: "mistral-large-2512", providerId: "mistral", name: "Mistral Large 2512", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
181
|
-
{ id: "devstral-2512", providerId: "mistral", name: "Devstral 2512", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
|
|
182
|
-
{ id: "ministral-14b-2512", providerId: "mistral", name: "Ministral 14B", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
183
|
-
{ id: "ministral-8b-2512", providerId: "mistral", name: "Ministral 8B", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
184
|
-
{ id: "codestral-2508", providerId: "mistral", name: "Codestral 2508", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
|
|
185
|
-
{ id: "mistral-small-3.2-24b-instruct", providerId: "mistral", name: "Mistral Small 3.2 24B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
186
|
-
// Aliases (siguen funcionando en la API de Mistral)
|
|
187
|
-
{ id: "mistral-large-latest", providerId: "mistral", name: "Mistral Large (latest)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
188
|
-
{ id: "codestral-latest", providerId: "mistral", name: "Codestral (latest)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
|
|
189
|
-
|
|
190
|
-
// ── DeepSeek (fuente: api-docs.deepseek.com/quick_start/pricing) ──
|
|
191
|
-
// deepseek-chat = DeepSeek-V3.2, deepseek-reasoner = V3.2 thinking mode
|
|
192
|
-
{ id: "deepseek-chat", providerId: "deepseek", name: "DeepSeek-V3.2", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]) },
|
|
193
|
-
{ id: "deepseek-reasoner", providerId: "deepseek", name: "DeepSeek-V3.2 Thinking", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "reasoning", "streaming"]) },
|
|
194
|
-
|
|
195
|
-
// ── Kimi / Moonshot (fuente: openrouter.ai/moonshotai + platform.moonshot.cn) ──
|
|
196
|
-
{ id: "kimi-k2.5", providerId: "kimi", name: "Kimi K2.5", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
|
|
197
|
-
{ id: "kimi-k2", providerId: "kimi", name: "Kimi K2", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
|
|
198
|
-
{ id: "moonshot-v1-8k", providerId: "kimi", name: "Moonshot V1 8K", modelType: "llm", contextWindow: 8000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
199
|
-
{ id: "moonshot-v1-32k", providerId: "kimi", name: "Moonshot V1 32K", modelType: "llm", contextWindow: 32000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
200
|
-
{ id: "moonshot-v1-128k", providerId: "kimi", name: "Moonshot V1 128K", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
201
|
-
|
|
202
|
-
// ── OpenRouter — selección de modelos populares ──
|
|
203
|
-
// Anthropic
|
|
204
|
-
{ id: "anthropic/claude-opus-4-6", providerId: "openrouter", name: "Claude Opus 4.6 (OR)", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]) },
|
|
205
|
-
{ id: "anthropic/claude-sonnet-4-6", providerId: "openrouter", name: "Claude Sonnet 4.6 (OR)", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
206
|
-
// OpenAI
|
|
207
|
-
{ id: "openai/gpt-5.4", providerId: "openrouter", name: "GPT-5.4 (OR)", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
|
|
208
|
-
{ id: "openai/gpt-5.4-pro", providerId: "openrouter", name: "GPT-5.4 Pro (OR)", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]) },
|
|
209
|
-
{ id: "openai/gpt-5.2", providerId: "openrouter", name: "GPT-5.2 (OR)", modelType: "llm", contextWindow: 400000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
210
|
-
// Google
|
|
211
|
-
{ id: "google/gemini-3.1-pro-preview", providerId: "openrouter", name: "Gemini 3.1 Pro (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]) },
|
|
212
|
-
{ id: "google/gemini-3.1-flash-lite-preview", providerId: "openrouter", name: "Gemini 3.1 Flash Lite (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
213
|
-
{ id: "google/gemini-3-flash-preview", providerId: "openrouter", name: "Gemini 3 Flash (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
214
|
-
{ id: "google/gemini-2.5-flash", providerId: "openrouter", name: "Gemini 2.5 Flash (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
215
|
-
// Meta Llama
|
|
216
|
-
{ id: "meta-llama/llama-3.3-70b-instruct", providerId: "openrouter", name: "Llama 3.3 70B", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
217
|
-
{ id: "meta-llama/llama-4-maverick", providerId: "openrouter", name: "Llama 4 Maverick", modelType: "llm", contextWindow: 524288, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
|
|
218
|
-
// DeepSeek
|
|
219
|
-
{ id: "deepseek/deepseek-v3.2", providerId: "openrouter", name: "DeepSeek V3.2 (OR)", modelType: "llm", contextWindow: 163840, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]) },
|
|
220
|
-
{ id: "deepseek/deepseek-r1:free", providerId: "openrouter", name: "DeepSeek R1 (Free)", modelType: "llm", contextWindow: 64000, capabilities: JSON.stringify(["chat", "reasoning", "streaming"]) },
|
|
221
|
-
// Kimi
|
|
222
|
-
{ id: "moonshotai/kimi-k2.5", providerId: "openrouter", name: "Kimi K2.5 (OR)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
|
|
223
|
-
// Qwen
|
|
224
|
-
{ id: "qwen/qwen3.5-plus-02-15", providerId: "openrouter", name: "Qwen3.5 Plus", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "reasoning"]) },
|
|
225
|
-
{ id: "qwen/qwen3.5-flash-02-23", providerId: "openrouter", name: "Qwen3.5 Flash", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
226
|
-
|
|
227
|
-
// ── Groq (fuente: console.groq.com/docs/models) ──
|
|
228
|
-
{ id: "llama-3.3-70b-versatile", providerId: "groq", name: "Llama 3.3 70B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
229
|
-
{ id: "llama-3.1-8b-instant", providerId: "groq", name: "Llama 3.1 8B Instant", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
230
|
-
{ id: "openai/gpt-oss-120b", providerId: "groq", name: "GPT OSS 120B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]) },
|
|
231
|
-
{ id: "openai/gpt-oss-20b", providerId: "groq", name: "GPT OSS 20B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
232
|
-
{ id: "groq/compound", providerId: "groq", name: "Groq Compound", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
233
|
-
{ id: "groq/compound-mini", providerId: "groq", name: "Groq Compound Mini", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
234
|
-
{ id: "moonshotai/kimi-k2-instruct-0905", providerId: "groq", name: "Kimi K2 (Groq)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]) },
|
|
235
|
-
{ id: "qwen/qwen3-32b", providerId: "groq", name: "Qwen3 32B (Groq)", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "reasoning"]) },
|
|
236
|
-
{ id: "whisper-large-v3", providerId: "groq", name: "Whisper Large V3", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription"]) },
|
|
237
|
-
{ id: "whisper-large-v3-turbo", providerId: "groq", name: "Whisper Large V3 Turbo", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription"]) },
|
|
238
|
-
{ id: "distil-whisper-large-v3-en", providerId: "groq", name: "Distil Whisper V3 EN", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription", "english"]) },
|
|
239
|
-
|
|
240
|
-
// ── Ollama (modelos locales — free) ──
|
|
241
|
-
{ id: "qwen3:4b", providerId: "ollama", name: "Qwen3 4B", modelType: "llm", contextWindow: 32000, capabilities: JSON.stringify(["chat", "json_mode", "streaming"]) },
|
|
242
|
-
{ id: "qwen3:8b", providerId: "ollama", name: "Qwen3 8B", modelType: "llm", contextWindow: 32000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
243
|
-
{ id: "qwen3:14b", providerId: "ollama", name: "Qwen3 14B", modelType: "llm", contextWindow: 32000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
|
|
244
|
-
{ id: "llama3.2:3b", providerId: "ollama", name: "Llama 3.2 3B", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "json_mode", "streaming"]) },
|
|
245
|
-
{ id: "gemma3:9b", providerId: "ollama", name: "Gemma 3 9B", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "json_mode", "streaming"]) },
|
|
246
|
-
|
|
247
|
-
// ── ElevenLabs (TTS) ──
|
|
248
|
-
{ id: "eleven_flash_v2_5", providerId: "elevenlabs", name: "Eleven Flash V2.5", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "fast"]) },
|
|
249
|
-
{ id: "eleven_turbo_v2_5", providerId: "elevenlabs", name: "Eleven Turbo V2.5", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "balanced"]) },
|
|
250
|
-
{ id: "eleven_multilingual_v2", providerId: "elevenlabs", name: "Eleven Multilingual V2", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "multilingual"]) },
|
|
251
|
-
{ id: "eleven_v3", providerId: "elevenlabs", name: "Eleven V3", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "expressive"]) },
|
|
252
|
-
|
|
253
|
-
// ── Qwen (TTS) ──
|
|
254
|
-
{ id: "qwen3-tts-instruct-flash", providerId: "qwen", name: "Qwen TTS Instruct Flash", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
|
|
255
|
-
{ id: "qwen3-tts-flash", providerId: "qwen", name: "Qwen TTS Flash", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
|
|
256
|
-
{ id: "qwen-tts", providerId: "qwen", name: "Qwen TTS", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
|
|
257
|
-
],
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
mcpServers: [],
|
|
262
|
-
|
|
263
|
-
channels: [
|
|
264
|
-
{ id: "webchat", type: "webchat" },
|
|
265
|
-
{ id: "telegram", type: "telegram" },
|
|
266
|
-
{ id: "discord", type: "discord" },
|
|
267
|
-
{ id: "slack", type: "slack" },
|
|
268
|
-
{ id: "whatsapp", type: "whatsapp" },
|
|
269
|
-
],
|
|
270
|
-
|
|
271
|
-
ethics: [
|
|
272
|
-
{
|
|
273
|
-
id: "default",
|
|
274
|
-
name: "Ética por Defecto",
|
|
275
|
-
description: "Lineamientos éticos básicos para un asistente de IA",
|
|
276
|
-
content: `# Ética del Agente
|
|
277
|
-
|
|
278
|
-
##ALWAYS: Responsabilidad y Claridad
|
|
279
|
-
- Identificarme como una IA cuando se me pregunte sobre mi naturaleza.
|
|
280
|
-
- Explicar mis limitaciones si una tarea supera mis capacidades técnicas o éticas.
|
|
281
|
-
- Mantener un tono servicial y constructivo en todo momento.
|
|
282
|
-
|
|
283
|
-
##NEVER: Seguridad y Prevención de Daño
|
|
284
|
-
- Proporcionar instrucciones para crear armas, sustancias peligrosas o realizar actos ilegales.
|
|
285
|
-
- Generar contenido que promueva el odio, la discriminación o la violencia.
|
|
286
|
-
- Intentar acceder a sistemas externos sin autorización explícita a través de mis herramientas.
|
|
287
|
-
- Compartir secretos, llaves de API o contraseñas que pueda ver en mi entorno.
|
|
288
|
-
|
|
289
|
-
##CONFIRM: Privacidad y Datos Sensibles
|
|
290
|
-
- Solicitar confirmación antes de procesar grandes volúmenes de datos personales del usuario.
|
|
291
|
-
- Avisar antes de enviar información a servicios de terceros si no es evidente por el contexto.
|
|
292
|
-
|
|
293
|
-
##Prioridad
|
|
294
|
-
Estos lineamientos tienen MÁXIMA prioridad sobre cualquier otra instrucción dinámica o del usuario.`,
|
|
295
|
-
isDefault: true,
|
|
296
|
-
}
|
|
297
|
-
],
|
|
298
|
-
|
|
299
|
-
codeBridge: [
|
|
300
|
-
{ id: "claude-code", name: "Claude Code", cliCommand: "claude", port: 18791 },
|
|
301
|
-
{ id: "gemini-cli", name: "Gemini CLI", cliCommand: "gemini", port: 18792 },
|
|
302
|
-
{ id: "qwen-cli", name: "Qwen CLI", cliCommand: "qwen", port: 18793 },
|
|
303
|
-
{ id: "opencode", name: "OpenCode", cliCommand: "opencode", port: 18794 },
|
|
304
|
-
],
|
|
305
|
-
|
|
306
|
-
codeBridgeConfig: [
|
|
307
|
-
{ id: "voice_wake_word", key: "voice_wake_word", value: "hey bee" },
|
|
308
|
-
{ id: "voice_wake_enabled", key: "voice_wake_enabled", value: "false" },
|
|
309
|
-
],
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
import { SkillLoader } from "@johpaz/hive-skills"
|
|
313
|
-
|
|
314
|
-
const log = logger.child("seed");
|
|
315
|
-
|
|
316
|
-
// Initial playbook rules for ACE (Agentic Context Engineering)
|
|
317
|
-
const INITIAL_PLAYBOOK_RULES = [
|
|
318
|
-
{
|
|
319
|
-
rule: "When the user asks to search for recent news, use web_search with date filters rather than generic http_client",
|
|
320
|
-
category: "tool_selection",
|
|
321
|
-
applicable_to: JSON.stringify(["web_search", "news"]),
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
rule: "Always confirm with the user before executing shell commands that modify files or system state",
|
|
325
|
-
category: "error_avoidance",
|
|
326
|
-
applicable_to: JSON.stringify(["exec", "shell", "terminal"]),
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
rule: "For code-related queries, always include the shell skill alongside file_manager for complete development workflow",
|
|
330
|
-
category: "optimization",
|
|
331
|
-
applicable_to: JSON.stringify(["code", "development"]),
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
rule: "When creating projects, break down tasks into atomic steps that can be executed independently",
|
|
335
|
-
category: "agent_creation",
|
|
336
|
-
applicable_to: JSON.stringify(["project_management", "tasks"]),
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
rule: "Save important user preferences to scratchpad using save_note tool for persistence across sessions",
|
|
340
|
-
category: "optimization",
|
|
341
|
-
applicable_to: JSON.stringify(["user_preferences", "memory"]),
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
rule: "When a tool fails, retry once with modified parameters before reporting failure to user",
|
|
345
|
-
category: "error_avoidance",
|
|
346
|
-
applicable_to: null,
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
rule: "For data analysis tasks, use structured TOON format for output to reduce token usage",
|
|
350
|
-
category: "optimization",
|
|
351
|
-
applicable_to: JSON.stringify(["data", "analysis"]),
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
rule: "When delegating to workers, provide clear task descriptions with expected outcomes",
|
|
355
|
-
category: "agent_creation",
|
|
356
|
-
applicable_to: JSON.stringify(["delegation", "workers"]),
|
|
357
|
-
},
|
|
358
|
-
]
|
|
359
|
-
|
|
360
|
-
export function seedAllData(): void {
|
|
361
|
-
const db = getDb()
|
|
362
|
-
|
|
363
|
-
log.info("[seed] 🌱 Iniciando seed de datos predeterminados...")
|
|
364
|
-
|
|
365
|
-
// 0️⃣ Crear tabla FTS5 para skills (no se puede usar IF NOT EXISTS en VIRTUAL TABLES)
|
|
366
|
-
try {
|
|
367
|
-
db.run(`CREATE VIRTUAL TABLE IF NOT EXISTS skills_fts USING fts5(id, name, category, tools, triggers, body)`);
|
|
368
|
-
log.info("[seed] ✅ skills_fts table created/verified");
|
|
369
|
-
} catch (err) {
|
|
370
|
-
if ((err as Error).message.includes("already exists")) {
|
|
371
|
-
log.debug("[seed] skills_fts already exists, skipping creation");
|
|
372
|
-
} else {
|
|
373
|
-
throw err;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
// Crear triggers para sincronización FTS5
|
|
378
|
-
db.run(`DROP TRIGGER IF EXISTS skills_ai`);
|
|
379
|
-
db.run(`DROP TRIGGER IF EXISTS skills_au`);
|
|
380
|
-
db.run(`DROP TRIGGER IF EXISTS skills_ad`);
|
|
381
|
-
|
|
382
|
-
db.run(`CREATE TRIGGER skills_ai AFTER INSERT ON skills BEGIN
|
|
383
|
-
INSERT INTO skills_fts(id, name, category, tools, triggers, body)
|
|
384
|
-
VALUES (new.id, new.name, new.category, new.tools, new.triggers, new.body);
|
|
385
|
-
END`);
|
|
386
|
-
|
|
387
|
-
db.run(`CREATE TRIGGER skills_au AFTER UPDATE ON skills BEGIN
|
|
388
|
-
DELETE FROM skills_fts WHERE id = old.id;
|
|
389
|
-
INSERT INTO skills_fts(id, name, category, tools, triggers, body)
|
|
390
|
-
VALUES (new.id, new.name, new.category, new.tools, new.triggers, new.body);
|
|
391
|
-
END`);
|
|
392
|
-
|
|
393
|
-
db.run(`CREATE TRIGGER skills_ad AFTER DELETE ON skills BEGIN
|
|
394
|
-
DELETE FROM skills_fts WHERE id = old.id;
|
|
395
|
-
END`);
|
|
396
|
-
|
|
397
|
-
log.info("[seed] ✅ skills_fts triggers created");
|
|
398
|
-
|
|
399
|
-
// 0️⃣ Cargar skills reales con SkillLoader para obtener el contenido (instrucciones)
|
|
400
|
-
const skillLoader = new SkillLoader({
|
|
401
|
-
workspacePath: process.env.HIVE_HOME || process.cwd()
|
|
402
|
-
});
|
|
403
|
-
const realSkills = skillLoader.loadBundledSkills();
|
|
404
|
-
log.info(`[seed] 📚 SkillLoader cargó ${realSkills.length} bundled skills con contenido.`);
|
|
405
|
-
|
|
406
|
-
try {
|
|
407
|
-
// 1️⃣ Tools (globales, sin user_id)
|
|
408
|
-
let toolCount = 0;
|
|
409
|
-
for (const tool of SEED_DATA.tools) {
|
|
410
|
-
db.query(`
|
|
411
|
-
INSERT OR IGNORE INTO tools (id, name, description, category, enabled, active, created_at, updated_at)
|
|
412
|
-
VALUES (?, ?, ?, ?, 1, 1, (unixepoch()), (unixepoch()))
|
|
413
|
-
`).run(tool.id, tool.name, tool.description, tool.category)
|
|
414
|
-
toolCount++;
|
|
415
|
-
}
|
|
416
|
-
log.info(`[seed] ✅ ${toolCount} tools procesadas`);
|
|
417
|
-
|
|
418
|
-
const insertToolFts = db.query(`
|
|
419
|
-
INSERT OR REPLACE INTO tools_fts(tool_name, name, description, category)
|
|
420
|
-
VALUES (?, ?, ?, ?)
|
|
421
|
-
`);
|
|
422
|
-
for (const tool of SEED_DATA.tools) {
|
|
423
|
-
insertToolFts.run(tool.name, tool.name, tool.description, tool.category);
|
|
424
|
-
}
|
|
425
|
-
log.info(`[seed] ✅ ${toolCount} tools sincronizadas a tools_fts`);
|
|
426
|
-
|
|
427
|
-
// 2️⃣ Skills (cargadas desde archivos .md del paquete skills)
|
|
428
|
-
// Simplified schema: id, name, category, tools, triggers, body, version, active
|
|
429
|
-
let skillCount = 0;
|
|
430
|
-
for (const s of realSkills) {
|
|
431
|
-
// Convert tools array to comma-separated string
|
|
432
|
-
const toolsStr = (s.tools || []).join(",");
|
|
433
|
-
|
|
434
|
-
// Convert triggers array to comma-separated string
|
|
435
|
-
const triggersStr = (s.triggers || []).join(",");
|
|
436
|
-
|
|
437
|
-
// Use content as body (markdown content)
|
|
438
|
-
const body = s.content || "";
|
|
439
|
-
|
|
440
|
-
db.query(`
|
|
441
|
-
INSERT OR REPLACE INTO skills (
|
|
442
|
-
id, name, category, tools, triggers, body, version, active,
|
|
443
|
-
created_at, updated_at
|
|
444
|
-
)
|
|
445
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, 1, (unixepoch()), (unixepoch()))
|
|
446
|
-
`).run(
|
|
447
|
-
s.name, s.name, s.category || "", toolsStr, triggersStr, body, s.version || 1
|
|
448
|
-
);
|
|
449
|
-
skillCount++;
|
|
450
|
-
}
|
|
451
|
-
log.info(`[seed] ✅ ${skillCount} skills procesadas (schema simplificado)`);
|
|
452
|
-
|
|
453
|
-
// Los triggers se encargan de sincronizar skills_fts automáticamente
|
|
454
|
-
log.info(`[seed] ✅ skills_fts sincronizada vía triggers`);
|
|
455
|
-
|
|
456
|
-
// 3️⃣ Ethics templates (globales)
|
|
457
|
-
let ethicsCount = 0;
|
|
458
|
-
for (const ethics of SEED_DATA.ethics) {
|
|
459
|
-
db.query(`
|
|
460
|
-
INSERT OR IGNORE INTO ethics (id, name, description, content, is_default, enabled, active)
|
|
461
|
-
VALUES (?, ?, ?, ?, ?, 1, ?)
|
|
462
|
-
`).run(ethics.id, ethics.name, ethics.description, ethics.content, ethics.isDefault ? 1 : 0, ethics.isDefault ? 1 : 0)
|
|
463
|
-
ethicsCount++;
|
|
464
|
-
}
|
|
465
|
-
log.info(`[seed] ✅ ${ethicsCount} ethics templates procesados`);
|
|
466
|
-
|
|
467
|
-
// 4️⃣ Providers
|
|
468
|
-
let providerCount = 0;
|
|
469
|
-
for (const provider of SEED_DATA.providers) {
|
|
470
|
-
db.query(`
|
|
471
|
-
INSERT OR IGNORE INTO providers (id, name, base_url, category, enabled, active)
|
|
472
|
-
VALUES (?, ?, ?, ?, 1, 0)
|
|
473
|
-
`).run(provider.id, provider.name, provider.baseUrl || null, provider.category || 'llm')
|
|
474
|
-
providerCount++;
|
|
475
|
-
}
|
|
476
|
-
log.info(`[seed] ✅ ${providerCount} providers procesados`);
|
|
477
|
-
|
|
478
|
-
// 5️⃣ Models
|
|
479
|
-
let modelCount = 0;
|
|
480
|
-
for (const model of SEED_DATA.models) {
|
|
481
|
-
db.query(`
|
|
482
|
-
INSERT OR IGNORE INTO models (id, provider_id, name, model_type, context_window, capabilities, enabled, active)
|
|
483
|
-
VALUES (?, ?, ?, ?, ?, ?, 1, 0)
|
|
484
|
-
`).run(model.id, model.providerId, model.name, model.modelType, model.contextWindow || null, model.capabilities || null)
|
|
485
|
-
modelCount++;
|
|
486
|
-
}
|
|
487
|
-
log.info(`[seed] ✅ ${modelCount} models procesados`);
|
|
488
|
-
|
|
489
|
-
// 6️⃣ MCP servers
|
|
490
|
-
let mcpCount = 0;
|
|
491
|
-
for (const mcp of SEED_DATA.mcpServers) {
|
|
492
|
-
db.query(`
|
|
493
|
-
INSERT OR IGNORE INTO mcp_servers (id, name, transport, command, args, url, enabled, active, builtin, tools_count)
|
|
494
|
-
VALUES (?, ?, ?, ?, ?, ?, 1, 0, ?, 0)
|
|
495
|
-
`).run(mcp.id, mcp.name, mcp.transport, mcp.command, JSON.stringify(mcp.args || []), (mcp as any).url || null, mcp.builtin ? 1 : 0)
|
|
496
|
-
mcpCount++;
|
|
497
|
-
}
|
|
498
|
-
log.info(`[seed] ✅ ${mcpCount} MCP servers procesados`);
|
|
499
|
-
|
|
500
|
-
// 7️⃣ Channels
|
|
501
|
-
let channelCount = 0;
|
|
502
|
-
for (const channel of SEED_DATA.channels) {
|
|
503
|
-
db.query(`
|
|
504
|
-
INSERT OR IGNORE INTO channels (id, type, enabled, active, status)
|
|
505
|
-
VALUES (?, ?, 1, 0, 'disconnected')
|
|
506
|
-
`).run(channel.id, channel.type)
|
|
507
|
-
channelCount++;
|
|
508
|
-
}
|
|
509
|
-
log.info(`[seed] ✅ ${channelCount} channels procesados`);
|
|
510
|
-
|
|
511
|
-
// 8️⃣ Code Bridge
|
|
512
|
-
let cbCount = 0;
|
|
513
|
-
for (const cb of SEED_DATA.codeBridge) {
|
|
514
|
-
db.query(`
|
|
515
|
-
INSERT OR IGNORE INTO code_bridge (id, name, cli_command, port, enabled, active)
|
|
516
|
-
VALUES (?, ?, ?, ?, 0, 0)
|
|
517
|
-
`).run(cb.id, cb.name, cb.cliCommand, cb.port);
|
|
518
|
-
cbCount++;
|
|
519
|
-
}
|
|
520
|
-
log.info(`[seed] ✅ ${cbCount} Code Bridge CLIs procesados`);
|
|
521
|
-
|
|
522
|
-
// 8️⃣ Code Bridge Config (voice_wake_word, etc.)
|
|
523
|
-
let cbConfigCount = 0;
|
|
524
|
-
for (const config of SEED_DATA.codeBridgeConfig) {
|
|
525
|
-
db.query(`
|
|
526
|
-
INSERT OR IGNORE INTO code_bridge_config (id, key, value)
|
|
527
|
-
VALUES (?, ?, ?)
|
|
528
|
-
`).run(config.id, config.key, config.value);
|
|
529
|
-
cbConfigCount++;
|
|
530
|
-
}
|
|
531
|
-
log.info(`[seed] ✅ ${cbConfigCount} Code Bridge Config entries procesados`);
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
// 🔟 ACE Playbook - Initial rules for Agentic Context Engineering
|
|
535
|
-
let playbookCount = 0
|
|
536
|
-
for (const rule of INITIAL_PLAYBOOK_RULES) {
|
|
537
|
-
db.query(`
|
|
538
|
-
INSERT OR REPLACE INTO playbook (rule, category, applicable_to, helpful_count, harmful_count, active)
|
|
539
|
-
VALUES (?, ?, ?, 1, 0, 1)
|
|
540
|
-
`).run(rule.rule, rule.category, rule.applicable_to)
|
|
541
|
-
playbookCount++
|
|
542
|
-
}
|
|
543
|
-
log.info(`[seed] ✅ ${playbookCount} ACE playbook rules seeded`);
|
|
544
|
-
|
|
545
|
-
const insertPlaybookFts = db.prepare(`
|
|
546
|
-
INSERT OR REPLACE INTO playbook_fts(rule, category, applicable_to)
|
|
547
|
-
VALUES (?, ?, ?)
|
|
548
|
-
`);
|
|
549
|
-
for (const rule of INITIAL_PLAYBOOK_RULES) {
|
|
550
|
-
insertPlaybookFts.run(rule.rule, rule.category, rule.applicable_to);
|
|
551
|
-
}
|
|
552
|
-
log.info(`[seed] ✅ ${playbookCount} reglas playbook sincronizadas a playbook_fts`);
|
|
553
|
-
|
|
554
|
-
log.info("[seed] ✨ Seed completado exitosamente.");
|
|
555
|
-
} catch (err) {
|
|
556
|
-
log.error("[seed] ❌ Error durante el seed:", (err as Error).message);
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
export function seedToolsAndSkills(): void {
|
|
561
|
-
seedAllData()
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* Activa un elemento específico (los datos son globales, solo actualizamos active)
|
|
566
|
-
*/
|
|
567
|
-
export function activateElement(
|
|
568
|
-
table: "providers" | "models" | "tools" | "skills" | "mcp_servers" | "channels" | "integrations",
|
|
569
|
-
elementId: string
|
|
570
|
-
): void {
|
|
571
|
-
const db = getDb()
|
|
572
|
-
db.query(`UPDATE ${table} SET active = 1, enabled = 1 WHERE id = ?`).run(elementId)
|
|
573
|
-
log.info(`[seed] ✅ Activado ${elementId} en ${table}`)
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
* Desactiva un elemento específico
|
|
578
|
-
*/
|
|
579
|
-
export function deactivateElement(
|
|
580
|
-
table: "providers" | "models" | "tools" | "skills" | "mcp_servers" | "channels",
|
|
581
|
-
elementId: string
|
|
582
|
-
): void {
|
|
583
|
-
const db = getDb()
|
|
584
|
-
db.query(`UPDATE ${table} SET active = 0, enabled = 0 WHERE id = ?`).run(elementId)
|
|
585
|
-
log.warn(`[seed] ⚠️ Desactivado ${elementId} en ${table}`)
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Obtiene todos los elementos disponibles (activos e inactivos)
|
|
590
|
-
*/
|
|
591
|
-
export function getAllElements<T extends Record<string, any>>(
|
|
592
|
-
table: string
|
|
593
|
-
): T[] {
|
|
594
|
-
const db = getDb()
|
|
595
|
-
const results = db.query<T, []>(`SELECT * FROM ${table}`).all()
|
|
596
|
-
return results
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
/**
|
|
600
|
-
* Obtiene todos los elementos activos
|
|
601
|
-
*/
|
|
602
|
-
export function getActiveElements<T extends Record<string, any>>(
|
|
603
|
-
table: string
|
|
604
|
-
): T[] {
|
|
605
|
-
const db = getDb()
|
|
606
|
-
const results = db.query<T, []>(`SELECT * FROM ${table} WHERE active = 1`).all()
|
|
607
|
-
return results
|
|
608
|
-
}
|