@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,25 +0,0 @@
|
|
|
1
|
-
import { Button } from "@/components/ui/button";
|
|
2
|
-
import { Upload } from "lucide-react";
|
|
3
|
-
|
|
4
|
-
interface ConfigImporterProps {
|
|
5
|
-
onImport: (content: string) => void;
|
|
6
|
-
accept?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function ConfigImporter({ onImport, accept = ".md,.json,.yaml" }: ConfigImporterProps) {
|
|
10
|
-
const handleFile = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
11
|
-
const file = e.target.files?.[0];
|
|
12
|
-
if (!file) return;
|
|
13
|
-
const reader = new FileReader();
|
|
14
|
-
reader.onload = () => onImport(reader.result as string);
|
|
15
|
-
reader.readAsText(file);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<Button variant="outline" size="sm" className="relative gap-1">
|
|
20
|
-
<Upload className="h-3.5 w-3.5" />
|
|
21
|
-
Importar
|
|
22
|
-
<input type="file" accept={accept} onChange={handleFile} className="absolute inset-0 cursor-pointer opacity-0" />
|
|
23
|
-
</Button>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
2
|
-
|
|
3
|
-
interface DiffViewerProps {
|
|
4
|
-
before: string;
|
|
5
|
-
after: string;
|
|
6
|
-
labelBefore?: string;
|
|
7
|
-
labelAfter?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function DiffViewer({ before, after, labelBefore = "Anterior", labelAfter = "Actual" }: DiffViewerProps) {
|
|
11
|
-
return (
|
|
12
|
-
<div className="grid grid-cols-2 gap-4">
|
|
13
|
-
<Card>
|
|
14
|
-
<CardHeader className="pb-2">
|
|
15
|
-
<CardTitle className="text-xs text-muted-foreground">{labelBefore}</CardTitle>
|
|
16
|
-
</CardHeader>
|
|
17
|
-
<CardContent>
|
|
18
|
-
<pre className="whitespace-pre-wrap text-xs">{before || "Vacío"}</pre>
|
|
19
|
-
</CardContent>
|
|
20
|
-
</Card>
|
|
21
|
-
<Card>
|
|
22
|
-
<CardHeader className="pb-2">
|
|
23
|
-
<CardTitle className="text-xs text-muted-foreground">{labelAfter}</CardTitle>
|
|
24
|
-
</CardHeader>
|
|
25
|
-
<CardContent>
|
|
26
|
-
<pre className="whitespace-pre-wrap text-xs">{after || "Vacío"}</pre>
|
|
27
|
-
</CardContent>
|
|
28
|
-
</Card>
|
|
29
|
-
</div>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Textarea } from "@/components/ui/textarea";
|
|
2
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|
3
|
-
|
|
4
|
-
interface MarkdownEditorProps {
|
|
5
|
-
value: string;
|
|
6
|
-
onChange: (value: string) => void;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function MarkdownEditor({ value, onChange, placeholder }: MarkdownEditorProps) {
|
|
11
|
-
return (
|
|
12
|
-
<Tabs defaultValue="edit" className="w-full">
|
|
13
|
-
<TabsList>
|
|
14
|
-
<TabsTrigger value="edit">Editar</TabsTrigger>
|
|
15
|
-
<TabsTrigger value="preview">Preview</TabsTrigger>
|
|
16
|
-
</TabsList>
|
|
17
|
-
<TabsContent value="edit">
|
|
18
|
-
<Textarea
|
|
19
|
-
value={value}
|
|
20
|
-
onChange={(e) => onChange(e.target.value)}
|
|
21
|
-
placeholder={placeholder ?? "Escribe en markdown..."}
|
|
22
|
-
className="min-h-[300px] font-mono text-sm"
|
|
23
|
-
/>
|
|
24
|
-
</TabsContent>
|
|
25
|
-
<TabsContent value="preview">
|
|
26
|
-
<div className="prose prose-sm dark:prose-invert min-h-[300px] rounded-md border p-4">
|
|
27
|
-
<pre className="whitespace-pre-wrap text-sm text-muted-foreground">{value || "Sin contenido"}</pre>
|
|
28
|
-
</div>
|
|
29
|
-
</TabsContent>
|
|
30
|
-
</Tabs>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Badge } from "@/components/ui/badge";
|
|
2
|
-
import { Check, Loader2, AlertCircle, Clock } from "lucide-react";
|
|
3
|
-
import type { SaveStatus } from "@/types";
|
|
4
|
-
|
|
5
|
-
interface SaveStatusIndicatorProps {
|
|
6
|
-
status: SaveStatus;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const statusMap: Record<SaveStatus, { label: string; icon: React.ReactNode; variant: "default" | "secondary" | "destructive" | "outline" }> = {
|
|
10
|
-
saved: { label: "Guardado", icon: <Check className="h-3 w-3" />, variant: "secondary" },
|
|
11
|
-
saving: { label: "Guardando…", icon: <Loader2 className="h-3 w-3 animate-spin" />, variant: "outline" },
|
|
12
|
-
pending: { label: "Pendiente", icon: <Clock className="h-3 w-3" />, variant: "outline" },
|
|
13
|
-
error: { label: "Error", icon: <AlertCircle className="h-3 w-3" />, variant: "destructive" },
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export function SaveStatusIndicator({ status }: SaveStatusIndicatorProps) {
|
|
17
|
-
const { label, icon, variant } = statusMap[status];
|
|
18
|
-
return (
|
|
19
|
-
<Badge variant={variant} className="gap-1 text-xs">
|
|
20
|
-
{icon} {label}
|
|
21
|
-
</Badge>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
2
|
-
import { AlertCircle, AlertTriangle, Info } from "lucide-react";
|
|
3
|
-
import type { ConfigValidationError } from "@/types";
|
|
4
|
-
|
|
5
|
-
interface ValidationPanelProps {
|
|
6
|
-
errors: ConfigValidationError[];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const severityIcon = {
|
|
10
|
-
error: <AlertCircle className="h-4 w-4 text-destructive" />,
|
|
11
|
-
warning: <AlertTriangle className="h-4 w-4 text-yellow-500" />,
|
|
12
|
-
info: <Info className="h-4 w-4 text-blue-500" />,
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export function ValidationPanel({ errors }: ValidationPanelProps) {
|
|
16
|
-
if (errors.length === 0) return null;
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<Card>
|
|
20
|
-
<CardHeader className="pb-2">
|
|
21
|
-
<CardTitle className="text-xs">Validación ({errors.length})</CardTitle>
|
|
22
|
-
</CardHeader>
|
|
23
|
-
<CardContent className="space-y-2">
|
|
24
|
-
{errors.map((err, i) => (
|
|
25
|
-
<div key={`${err.section}-${err.field}-${err.severity}`} className="flex items-start gap-2 text-xs">
|
|
26
|
-
{severityIcon[err.severity]}
|
|
27
|
-
<div>
|
|
28
|
-
<span className="font-medium">{err.section}/{err.field}:</span>{" "}
|
|
29
|
-
<span className="text-muted-foreground">{err.message}</span>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
))}
|
|
33
|
-
</CardContent>
|
|
34
|
-
</Card>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { ConfigEditorLayout } from "./ConfigEditorLayout";
|
|
2
|
-
export { MarkdownEditor } from "./MarkdownEditor";
|
|
3
|
-
export { DiffViewer } from "./DiffViewer";
|
|
4
|
-
export { SaveStatusIndicator } from "./SaveStatusIndicator";
|
|
5
|
-
export { ConfigImporter } from "./ConfigImporter";
|
|
6
|
-
export { ConfigExporter } from "./ConfigExporter";
|
|
7
|
-
export { ValidationPanel } from "./ValidationPanel";
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
2
|
-
import { Badge } from "@/components/ui/badge";
|
|
3
|
-
import { Zap, Cpu, Code2, Globe, Search, MessageSquare, BarChart3, Languages, Sparkles } from "lucide-react";
|
|
4
|
-
import { cn } from "@/lib/utils";
|
|
5
|
-
import type { Skill } from "@/types";
|
|
6
|
-
|
|
7
|
-
interface SkillCardProps {
|
|
8
|
-
skill: Skill;
|
|
9
|
-
onClick?: () => void;
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const getSkillIcon = (name: string) => {
|
|
14
|
-
const n = name.toLowerCase();
|
|
15
|
-
if (n.includes("code") || n.includes("program")) return <Code2 className="h-4 w-4" />;
|
|
16
|
-
if (n.includes("research") || n.includes("investiga")) return <Search className="h-4 w-4" />;
|
|
17
|
-
if (n.includes("write") || n.includes("escrib")) return <MessageSquare className="h-4 w-4" />;
|
|
18
|
-
if (n.includes("data") || n.includes("anal") || n.includes("estad")) return <BarChart3 className="h-4 w-4" />;
|
|
19
|
-
if (n.includes("trans") || n.includes("traduc")) return <Languages className="h-4 w-4" />;
|
|
20
|
-
if (n.includes("web") || n.includes("glob")) return <Globe className="h-4 w-4" />;
|
|
21
|
-
return <Zap className="h-4 w-4" />;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export function SkillCard({ skill, onClick, className }: SkillCardProps) {
|
|
25
|
-
const active = !!skill.active;
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<div
|
|
29
|
-
onClick={onClick}
|
|
30
|
-
className={`hive-card group transition-all duration-500 cursor-pointer ${active
|
|
31
|
-
? 'hive-card--active border-blue-500/20'
|
|
32
|
-
: 'opacity-60 grayscale-[0.8] hover:opacity-100 hover:grayscale-0'
|
|
33
|
-
} ${className}`}
|
|
34
|
-
>
|
|
35
|
-
<div className="hive-card-body">
|
|
36
|
-
<div className="flex items-start justify-between mb-6">
|
|
37
|
-
<div className={`h-12 w-12 rounded-xl flex items-center justify-center border transition-all duration-500 ${active
|
|
38
|
-
? 'bg-blue-500/10 border-blue-500/30 text-blue-400 shadow-blue-glow'
|
|
39
|
-
: 'bg-white/5 border-white/10 text-white/30'
|
|
40
|
-
}`}>
|
|
41
|
-
{getSkillIcon(skill.name)}
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<div className="h-6 w-6 rounded-full border border-white/5 bg-white/5 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity">
|
|
45
|
-
<Sparkles className="h-3 w-3 text-blue-400" />
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<div className="space-y-4">
|
|
50
|
-
<div>
|
|
51
|
-
<h3 className="text-lg font-black text-white uppercase tracking-tighter mb-1 line-clamp-1 group-hover:text-blue-400 transition-colors">
|
|
52
|
-
{skill.name}
|
|
53
|
-
</h3>
|
|
54
|
-
<p className="text-xs text-white/40 font-medium leading-relaxed line-clamp-2 h-8">
|
|
55
|
-
{skill.body?.substring(0, 100) || skill.category}
|
|
56
|
-
</p>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<div className="pt-4 border-t border-white/5 flex items-center justify-between">
|
|
60
|
-
<div className="flex items-center gap-4">
|
|
61
|
-
<div className="hive-stat">
|
|
62
|
-
<span className="hive-stat__label">CATEGORY</span>
|
|
63
|
-
<span className="hive-stat__value truncate max-w-[80px]">{skill.category || "GENERAL"}</span>
|
|
64
|
-
</div>
|
|
65
|
-
<div className="hive-stat">
|
|
66
|
-
<span className="hive-stat__label">TOOLS</span>
|
|
67
|
-
<span className="hive-stat__value">{skill.tools ? skill.tools.split(',').length : 0}</span>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
<div className="opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-1.5 text-[9px] font-black text-blue-400 uppercase tracking-widest">
|
|
72
|
-
DETALLES
|
|
73
|
-
<Cpu className="h-3 w-3" />
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
<div className={`hive-strip--bottom ${active ? 'bg-blue-500' : 'bg-white/10'}`} />
|
|
79
|
-
</div>
|
|
80
|
-
);
|
|
81
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
2
|
-
import { Settings } from "lucide-react";
|
|
3
|
-
|
|
4
|
-
interface SkillConfigEditorProps {
|
|
5
|
-
skillId: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function SkillConfigEditor({ skillId }: SkillConfigEditorProps) {
|
|
9
|
-
return (
|
|
10
|
-
<Card>
|
|
11
|
-
<CardHeader className="pb-2">
|
|
12
|
-
<CardTitle className="flex items-center gap-2 text-sm">
|
|
13
|
-
<Settings className="h-4 w-4" />
|
|
14
|
-
Configurar skill
|
|
15
|
-
</CardTitle>
|
|
16
|
-
</CardHeader>
|
|
17
|
-
<CardContent>
|
|
18
|
-
<p className="text-xs text-muted-foreground">Configuración de skill: {skillId}</p>
|
|
19
|
-
</CardContent>
|
|
20
|
-
</Card>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
2
|
-
import { Input } from "@/components/ui/input";
|
|
3
|
-
import { Textarea } from "@/components/ui/textarea";
|
|
4
|
-
import { Button } from "@/components/ui/button";
|
|
5
|
-
import { Label } from "@/components/ui/label";
|
|
6
|
-
import { Plus } from "lucide-react";
|
|
7
|
-
|
|
8
|
-
interface SkillCreatorProps {
|
|
9
|
-
onCreateSkill: (data: { name: string; category: string; tools: string; triggers: string; body: string }) => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function SkillCreator({ onCreateSkill }: SkillCreatorProps) {
|
|
13
|
-
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
14
|
-
e.preventDefault();
|
|
15
|
-
const formData = new FormData(e.currentTarget);
|
|
16
|
-
onCreateSkill({
|
|
17
|
-
name: formData.get("name") as string,
|
|
18
|
-
category: formData.get("category") as string || "",
|
|
19
|
-
tools: formData.get("tools") as string || "",
|
|
20
|
-
triggers: formData.get("triggers") as string || "",
|
|
21
|
-
body: formData.get("body") as string || "",
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<Card>
|
|
27
|
-
<CardHeader className="pb-2">
|
|
28
|
-
<CardTitle className="flex items-center gap-2 text-sm">
|
|
29
|
-
<Plus className="h-4 w-4" />
|
|
30
|
-
Crear skill
|
|
31
|
-
</CardTitle>
|
|
32
|
-
</CardHeader>
|
|
33
|
-
<CardContent>
|
|
34
|
-
<form onSubmit={handleSubmit} className="space-y-3">
|
|
35
|
-
<div className="space-y-1.5">
|
|
36
|
-
<Label className="text-xs">Nombre</Label>
|
|
37
|
-
<Input name="name" placeholder="Nombre del skill" className="h-8 text-sm" required />
|
|
38
|
-
</div>
|
|
39
|
-
<div className="space-y-1.5">
|
|
40
|
-
<Label className="text-xs">Categoría</Label>
|
|
41
|
-
<Input name="category" placeholder="Ej: web, code, data" className="h-8 text-sm" />
|
|
42
|
-
</div>
|
|
43
|
-
<div className="space-y-1.5">
|
|
44
|
-
<Label className="text-xs">Tools (comma-separated)</Label>
|
|
45
|
-
<Input name="tools" placeholder="web_search,web_fetch" className="h-8 text-sm" />
|
|
46
|
-
</div>
|
|
47
|
-
<div className="space-y-1.5">
|
|
48
|
-
<Label className="text-xs">Triggers (comma-separated)</Label>
|
|
49
|
-
<Input name="triggers" placeholder="busca,investiga,research" className="h-8 text-sm" />
|
|
50
|
-
</div>
|
|
51
|
-
<div className="space-y-1.5">
|
|
52
|
-
<Label className="text-xs">Contenido (Markdown)</Label>
|
|
53
|
-
<Textarea name="body" placeholder="Contenido/instrucciones del skill" className="min-h-[100px] text-sm" />
|
|
54
|
-
</div>
|
|
55
|
-
<Button type="submit" size="sm">Crear</Button>
|
|
56
|
-
</form>
|
|
57
|
-
</CardContent>
|
|
58
|
-
</Card>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
2
|
-
import { Button } from "@/components/ui/button";
|
|
3
|
-
import { Download } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
export function SkillInstaller() {
|
|
6
|
-
return (
|
|
7
|
-
<Card>
|
|
8
|
-
<CardHeader className="pb-2">
|
|
9
|
-
<CardTitle className="flex items-center gap-2 text-sm">
|
|
10
|
-
<Download className="h-4 w-4" />
|
|
11
|
-
Instalar skill
|
|
12
|
-
</CardTitle>
|
|
13
|
-
</CardHeader>
|
|
14
|
-
<CardContent>
|
|
15
|
-
<p className="text-xs text-muted-foreground">Instala skills desde el marketplace o archivo local</p>
|
|
16
|
-
<div className="mt-3 flex gap-2">
|
|
17
|
-
<Button variant="outline" size="sm">Marketplace</Button>
|
|
18
|
-
<Button variant="outline" size="sm">Archivo local</Button>
|
|
19
|
-
</div>
|
|
20
|
-
</CardContent>
|
|
21
|
-
</Card>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
3
|
-
import { Badge } from "@/components/ui/badge";
|
|
4
|
-
import { Switch } from "@/components/ui/switch";
|
|
5
|
-
import { Zap } from "lucide-react";
|
|
6
|
-
import { apiClient } from "@/lib/api";
|
|
7
|
-
import type { Skill } from "@/types";
|
|
8
|
-
|
|
9
|
-
export function SkillList() {
|
|
10
|
-
const [skills, setSkills] = useState<Skill[]>([]);
|
|
11
|
-
const [toggling, setToggling] = useState<string | null>(null);
|
|
12
|
-
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
apiClient<{ skills: Skill[] }>("/api/skills").then((res) => {
|
|
15
|
-
setSkills(res.skills);
|
|
16
|
-
}).catch(() => {});
|
|
17
|
-
}, []);
|
|
18
|
-
|
|
19
|
-
async function handleToggle(skill: Skill) {
|
|
20
|
-
setToggling(skill.id);
|
|
21
|
-
const newActive = !skill.active;
|
|
22
|
-
try {
|
|
23
|
-
await apiClient(`/api/skills/${skill.id}/toggle`, {
|
|
24
|
-
method: "POST",
|
|
25
|
-
body: { active: newActive },
|
|
26
|
-
});
|
|
27
|
-
setSkills((prev) =>
|
|
28
|
-
prev.map((s) => s.id === skill.id ? { ...s, active: newActive } : s)
|
|
29
|
-
);
|
|
30
|
-
} catch {
|
|
31
|
-
// revert on error — state unchanged
|
|
32
|
-
} finally {
|
|
33
|
-
setToggling(null);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const activeCount = skills.filter((s) => s.active).length;
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<div className="space-y-3">
|
|
41
|
-
<div className="flex items-center justify-between">
|
|
42
|
-
<h4 className="text-sm font-medium">Skills disponibles</h4>
|
|
43
|
-
<Badge variant="secondary" className="text-xs">{activeCount} activos</Badge>
|
|
44
|
-
</div>
|
|
45
|
-
<div className="space-y-2">
|
|
46
|
-
{skills.map((skill) => (
|
|
47
|
-
<Card key={skill.id}>
|
|
48
|
-
<CardHeader className="flex flex-row items-center justify-between py-3 pb-1">
|
|
49
|
-
<CardTitle className="flex items-center gap-2 text-sm">
|
|
50
|
-
<Zap className="h-3.5 w-3.5 text-green-400" />
|
|
51
|
-
{skill.name}
|
|
52
|
-
</CardTitle>
|
|
53
|
-
<Switch
|
|
54
|
-
checked={!!skill.active}
|
|
55
|
-
disabled={toggling === skill.id}
|
|
56
|
-
onCheckedChange={() => handleToggle(skill)}
|
|
57
|
-
/>
|
|
58
|
-
</CardHeader>
|
|
59
|
-
<CardContent className="pb-3">
|
|
60
|
-
<p className="text-xs text-muted-foreground">
|
|
61
|
-
{skill.category} • {skill.tools ? skill.tools.split(',').length : 0} tools
|
|
62
|
-
</p>
|
|
63
|
-
</CardContent>
|
|
64
|
-
</Card>
|
|
65
|
-
))}
|
|
66
|
-
{skills.length === 0 && (
|
|
67
|
-
<p className="text-xs text-muted-foreground text-center py-4">No hay skills cargadas</p>
|
|
68
|
-
)}
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from "react";
|
|
2
|
-
import { Wand2, Loader2, Save, Info, Sparkles } from "lucide-react";
|
|
3
|
-
import { useSkills } from "@/hooks/useProviders";
|
|
4
|
-
import { Button } from "@/components/ui/button";
|
|
5
|
-
import { Badge } from "@/components/ui/badge";
|
|
6
|
-
import { Input } from "@/components/ui/input";
|
|
7
|
-
import { Textarea } from "@/components/ui/textarea";
|
|
8
|
-
import { Label } from "@/components/ui/label";
|
|
9
|
-
import { Switch } from "@/components/ui/switch";
|
|
10
|
-
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog";
|
|
11
|
-
import { Toast } from "@/lib/swal";
|
|
12
|
-
import { loader } from "@/stores/useLoaderStore";
|
|
13
|
-
import { SkillCard } from "./SkillCard";
|
|
14
|
-
import type { Skill } from "@/types";
|
|
15
|
-
|
|
16
|
-
export function SkillsTab() {
|
|
17
|
-
const { skills, isLoading, fetchSkills, toggleSkill, updateSkill } = useSkills();
|
|
18
|
-
const [editingSkill, setEditingSkill] = useState<Skill | null>(null);
|
|
19
|
-
const [editForm, setEditForm] = useState({ name: "", body: "" });
|
|
20
|
-
const [togglingId, setTogglingId] = useState<string | null>(null);
|
|
21
|
-
const [isSaving, setIsSaving] = useState(false);
|
|
22
|
-
|
|
23
|
-
useEffect(() => { fetchSkills(); }, [fetchSkills]);
|
|
24
|
-
|
|
25
|
-
const handleToggle = async (id: string, active: boolean) => {
|
|
26
|
-
if (togglingId) return;
|
|
27
|
-
setTogglingId(id);
|
|
28
|
-
try {
|
|
29
|
-
await toggleSkill(id, active);
|
|
30
|
-
Toast.fire({ icon: "success", title: active ? "Skill habilitado" : "Skill deshabilitado" });
|
|
31
|
-
} catch {
|
|
32
|
-
Toast.fire({ icon: "error", title: "Error al cambiar estado del skill" });
|
|
33
|
-
} finally {
|
|
34
|
-
setTogglingId(null);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const handleOpenEdit = (skill: Skill) => {
|
|
39
|
-
setEditingSkill(skill);
|
|
40
|
-
setEditForm({ name: skill.name, body: skill.body || "" });
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const handleSave = async () => {
|
|
44
|
-
if (!editingSkill) return;
|
|
45
|
-
setIsSaving(true);
|
|
46
|
-
loader.show("Guardando skill...");
|
|
47
|
-
try {
|
|
48
|
-
await updateSkill(editingSkill.id, editForm);
|
|
49
|
-
Toast.fire({ icon: "success", title: "Skill actualizado correctamente" });
|
|
50
|
-
fetchSkills();
|
|
51
|
-
setEditingSkill(null);
|
|
52
|
-
} catch {
|
|
53
|
-
Toast.fire({ icon: "error", title: "Error al actualizar skill" });
|
|
54
|
-
} finally {
|
|
55
|
-
setIsSaving(false);
|
|
56
|
-
loader.hide();
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
if (isLoading && skills.length === 0) {
|
|
61
|
-
return (
|
|
62
|
-
<div className="flex flex-col items-center justify-center py-20 space-y-4">
|
|
63
|
-
<div className="relative">
|
|
64
|
-
<Loader2 className="h-10 w-10 animate-spin text-primary/40" />
|
|
65
|
-
<Sparkles className="h-4 w-4 text-primary absolute -top-1 -right-1 animate-pulse" />
|
|
66
|
-
</div>
|
|
67
|
-
<p className="text-sm text-muted-foreground animate-pulse">Cargando habilidades premium...</p>
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<div className="space-y-6 animate-in fade-in duration-500">
|
|
74
|
-
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-8">
|
|
75
|
-
<div>
|
|
76
|
-
<div className="flex items-center gap-2 mb-2">
|
|
77
|
-
<h3 className="hive-title-section !text-lg">Habilidades del Sistema</h3>
|
|
78
|
-
<span className="hive-tag bg-blue-500/10 text-blue-400 border-blue-500/20">
|
|
79
|
-
{skills.length} ACTIVAS
|
|
80
|
-
</span>
|
|
81
|
-
</div>
|
|
82
|
-
<p className="hive-subtitle !mt-0 !text-xs">
|
|
83
|
-
Gestiona los módulos cognitivos que otorgan capacidades autónomas a tus agentes.
|
|
84
|
-
</p>
|
|
85
|
-
</div>
|
|
86
|
-
|
|
87
|
-
<div className="flex items-center gap-2 text-[10px] uppercase tracking-widest font-black text-white/20 bg-white/5 px-4 py-2 rounded-xl border border-white/5">
|
|
88
|
-
<Info className="h-3.5 w-3.5" />
|
|
89
|
-
<span>Click en skill para configurar</span>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
{skills.length === 0 ? (
|
|
94
|
-
<div className="hive-card border-dashed border-white/10 bg-white/[0.02]">
|
|
95
|
-
<div className="hive-card-body flex flex-col items-center justify-center py-16 px-4">
|
|
96
|
-
<div className="h-16 w-16 rounded-2xl bg-white/5 flex items-center justify-center mb-6">
|
|
97
|
-
<Wand2 className="h-8 w-8 text-white/20" />
|
|
98
|
-
</div>
|
|
99
|
-
<div className="text-center">
|
|
100
|
-
<p className="hive-title-section text-center mb-2">No se detectan habilidades</p>
|
|
101
|
-
<p className="text-xs text-white/40 mb-8 max-w-[300px] mx-auto leading-relaxed">
|
|
102
|
-
El repositorio de habilidades está vacío. Visita el Marketplace para descargar nuevos nodos cognitivos.
|
|
103
|
-
</p>
|
|
104
|
-
</div>
|
|
105
|
-
<button className="hive-btn hive-btn--primary px-8">
|
|
106
|
-
Explorar Marketplace
|
|
107
|
-
</button>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
) : (
|
|
111
|
-
<div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6">
|
|
112
|
-
{skills.map(skill => (
|
|
113
|
-
<div key={skill.id} className="relative">
|
|
114
|
-
<SkillCard
|
|
115
|
-
skill={skill}
|
|
116
|
-
onClick={() => handleOpenEdit(skill)}
|
|
117
|
-
/>
|
|
118
|
-
<div className="absolute top-6 right-6 z-20 pointer-events-auto flex items-center gap-2">
|
|
119
|
-
<span className={`text-[9px] font-black tracking-widest ${skill.active ? 'text-blue-400' : 'text-white/20'}`}>
|
|
120
|
-
{skill.active ? 'HABILITADO' : 'DESACTIVADO'}
|
|
121
|
-
</span>
|
|
122
|
-
<Switch
|
|
123
|
-
checked={!!skill.active}
|
|
124
|
-
disabled={togglingId === skill.id}
|
|
125
|
-
onClick={e => e.stopPropagation()}
|
|
126
|
-
onCheckedChange={checked => handleToggle(skill.id, checked)}
|
|
127
|
-
className="scale-75 data-[state=checked]:bg-blue-500"
|
|
128
|
-
/>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
))}
|
|
132
|
-
</div>
|
|
133
|
-
)}
|
|
134
|
-
|
|
135
|
-
<Dialog open={!!editingSkill} onOpenChange={open => !open && setEditingSkill(null)}>
|
|
136
|
-
<DialogContent className="hive-card border-white/10 p-0 overflow-hidden max-w-md bg-[#09090b]">
|
|
137
|
-
<div className="p-6 border-b border-white/5 bg-white/5 relative overflow-hidden">
|
|
138
|
-
<div className="hive-glow-blob hive-glow-blob--blue -top-10 -right-10 h-32 w-32 opacity-20" />
|
|
139
|
-
<div className="flex items-center gap-4 relative z-10">
|
|
140
|
-
<div className="h-12 w-12 rounded-xl bg-blue-500/10 border border-blue-500/20 flex items-center justify-center">
|
|
141
|
-
<Wand2 className="h-6 w-6 text-blue-400 shadow-blue-glow" />
|
|
142
|
-
</div>
|
|
143
|
-
<div>
|
|
144
|
-
<h2 className="text-xl font-black text-white uppercase tracking-tighter">Sintonizar Habilidad</h2>
|
|
145
|
-
<p className="text-xs text-white/40 font-medium">Personaliza el comportamiento de {editingSkill?.name}.</p>
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
|
|
150
|
-
<div className="p-6 space-y-6">
|
|
151
|
-
<div className="space-y-2">
|
|
152
|
-
<label className="hive-label uppercase !text-[10px]">Identificador Visual</label>
|
|
153
|
-
<Input
|
|
154
|
-
value={editForm.name}
|
|
155
|
-
onChange={e => setEditForm(p => ({ ...p, name: e.target.value }))}
|
|
156
|
-
className="bg-white/5 border-white/5 focus-visible:ring-blue-500/30 text-white font-bold"
|
|
157
|
-
placeholder="Nombre de la habilidad"
|
|
158
|
-
/>
|
|
159
|
-
</div>
|
|
160
|
-
|
|
161
|
-
<div className="space-y-2">
|
|
162
|
-
<label className="hive-label uppercase !text-[10px]">Contenido (Markdown)</label>
|
|
163
|
-
<Textarea
|
|
164
|
-
value={editForm.body}
|
|
165
|
-
onChange={e => setEditForm(p => ({ ...p, body: e.target.value }))}
|
|
166
|
-
className="min-h-[120px] resize-none bg-white/5 border-white/5 focus-visible:ring-blue-500/30 text-white/80 text-sm"
|
|
167
|
-
placeholder="Contenido/instrucciones del skill"
|
|
168
|
-
/>
|
|
169
|
-
</div>
|
|
170
|
-
|
|
171
|
-
<div className="grid grid-cols-2 gap-4">
|
|
172
|
-
<div className="hive-stat !bg-white/5 !border-white/5 p-4 rounded-xl">
|
|
173
|
-
<span className="hive-stat__label !text-[9px]">CATEGORIA</span>
|
|
174
|
-
<span className="hive-stat__value !text-xs mt-1 truncate">{editingSkill?.category || "GENERAL"}</span>
|
|
175
|
-
</div>
|
|
176
|
-
<div className="hive-stat !bg-white/5 !border-white/5 p-4 rounded-xl">
|
|
177
|
-
<span className="hive-stat__label !text-[9px]">TOOLS</span>
|
|
178
|
-
<span className="hive-stat__value !text-xs mt-1 truncate">{editingSkill?.tools?.split(',').length || 0}</span>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
|
|
183
|
-
<div className="p-6 bg-white/5 flex items-center justify-end gap-3 border-t border-white/5">
|
|
184
|
-
<button
|
|
185
|
-
className="hive-btn hive-btn--ghost px-6 text-[10px]"
|
|
186
|
-
onClick={() => setEditingSkill(null)}
|
|
187
|
-
>
|
|
188
|
-
DESCARTAR
|
|
189
|
-
</button>
|
|
190
|
-
<button
|
|
191
|
-
className="hive-btn hive-btn--primary px-8 text-[10px]"
|
|
192
|
-
onClick={handleSave}
|
|
193
|
-
disabled={isSaving}
|
|
194
|
-
>
|
|
195
|
-
{isSaving ? "GUARDANDO..." : "Sincronizar Cambios"}
|
|
196
|
-
</button>
|
|
197
|
-
</div>
|
|
198
|
-
</DialogContent>
|
|
199
|
-
</Dialog>
|
|
200
|
-
</div>
|
|
201
|
-
);
|
|
202
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
2
|
-
import { Badge } from "@/components/ui/badge";
|
|
3
|
-
import { Wrench } from "lucide-react";
|
|
4
|
-
import type { Tool } from "@/types";
|
|
5
|
-
|
|
6
|
-
interface ToolCardProps {
|
|
7
|
-
tool: Tool;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function ToolCard({ tool }: ToolCardProps) {
|
|
11
|
-
return (
|
|
12
|
-
<Card className="transition-colors hover:border-orange-400/30">
|
|
13
|
-
<CardHeader className="pb-2">
|
|
14
|
-
<CardTitle className="flex items-center gap-2 text-sm">
|
|
15
|
-
<Wrench className="h-3.5 w-3.5 text-orange-400" />
|
|
16
|
-
{tool.name}
|
|
17
|
-
<Badge variant={tool.enabled ? "default" : "secondary"} className="ml-auto text-xs">
|
|
18
|
-
{tool.enabled ? "Activa" : "Inactiva"}
|
|
19
|
-
</Badge>
|
|
20
|
-
</CardTitle>
|
|
21
|
-
</CardHeader>
|
|
22
|
-
<CardContent>
|
|
23
|
-
<p className="text-xs text-muted-foreground">{tool.description}</p>
|
|
24
|
-
</CardContent>
|
|
25
|
-
</Card>
|
|
26
|
-
);
|
|
27
|
-
}
|