profclaw 0.0.1-beta.3 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +14 -2
- package/CHANGELOG.md +54 -34
- package/CONTRIBUTING.md +23 -5
- package/Dockerfile +39 -23
- package/README.md +271 -72
- package/dist/agents/agent-summary.d.ts +44 -0
- package/dist/agents/agent-summary.js +176 -0
- package/dist/agents/auto-memory.d.ts +59 -0
- package/dist/agents/auto-memory.js +310 -0
- package/dist/agents/checkpoint-manager.d.ts +76 -0
- package/dist/agents/checkpoint-manager.js +156 -0
- package/dist/agents/circuit-breaker.d.ts +54 -0
- package/dist/agents/circuit-breaker.js +153 -0
- package/dist/agents/context-compactor.d.ts +70 -0
- package/dist/agents/context-compactor.js +361 -0
- package/dist/agents/conversation-branch.d.ts +55 -0
- package/dist/agents/conversation-branch.js +115 -0
- package/dist/agents/error-recovery.d.ts +44 -0
- package/dist/agents/error-recovery.js +197 -0
- package/dist/agents/events.d.ts +76 -0
- package/dist/agents/events.js +8 -0
- package/dist/agents/executor.d.ts +35 -1
- package/dist/agents/executor.js +573 -124
- package/dist/agents/file-snapshots.d.ts +72 -0
- package/dist/agents/file-snapshots.js +182 -0
- package/dist/agents/index.d.ts +2 -0
- package/dist/agents/orchestrator.d.ts +183 -0
- package/dist/agents/orchestrator.js +495 -0
- package/dist/agents/permissions.d.ts +63 -0
- package/dist/agents/permissions.js +138 -0
- package/dist/agents/plan-mode.d.ts +71 -0
- package/dist/agents/plan-mode.js +186 -0
- package/dist/agents/prompt-suggestions.d.ts +33 -0
- package/dist/agents/prompt-suggestions.js +208 -0
- package/dist/agents/rate-limit-monitor.d.ts +56 -0
- package/dist/agents/rate-limit-monitor.js +224 -0
- package/dist/agents/result-store.d.ts +37 -0
- package/dist/agents/result-store.js +104 -0
- package/dist/agents/session-diff.d.ts +43 -0
- package/dist/agents/session-diff.js +258 -0
- package/dist/agents/tool-loader.d.ts +65 -0
- package/dist/agents/tool-loader.js +273 -0
- package/dist/agents/transcript.d.ts +96 -0
- package/dist/agents/transcript.js +267 -0
- package/dist/agents/worktree-manager.d.ts +80 -0
- package/dist/agents/worktree-manager.js +203 -0
- package/dist/auth/middleware.js +14 -0
- package/dist/chat/agentic-executor.d.ts +7 -0
- package/dist/chat/agentic-executor.js +253 -30
- package/dist/chat/conversations.d.ts +2 -0
- package/dist/chat/conversations.js +8 -0
- package/dist/chat/execution/executor.d.ts +8 -0
- package/dist/chat/execution/executor.js +157 -103
- package/dist/chat/execution/index.js +5 -1
- package/dist/chat/execution/tool-router.js +40 -14
- package/dist/chat/execution/tools/canvas.d.ts +2 -2
- package/dist/chat/execution/tools/code-tools.d.ts +66 -0
- package/dist/chat/execution/tools/code-tools.js +353 -0
- package/dist/chat/execution/tools/complete-task.d.ts +2 -2
- package/dist/chat/execution/tools/cron-tool.d.ts +26 -10
- package/dist/chat/execution/tools/cron-tool.js +48 -3
- package/dist/chat/execution/tools/decompose-task.d.ts +58 -0
- package/dist/chat/execution/tools/decompose-task.js +166 -0
- package/dist/chat/execution/tools/exec.d.ts +5 -2
- package/dist/chat/execution/tools/exec.js +294 -155
- package/dist/chat/execution/tools/feed-tools.d.ts +77 -0
- package/dist/chat/execution/tools/feed-tools.js +142 -0
- package/dist/chat/execution/tools/file-ops.d.ts +1 -1
- package/dist/chat/execution/tools/github.d.ts +2 -2
- package/dist/chat/execution/tools/index.d.ts +15 -3
- package/dist/chat/execution/tools/index.js +125 -12
- package/dist/chat/execution/tools/integrations.d.ts +8 -8
- package/dist/chat/execution/tools/multi-patch.d.ts +53 -0
- package/dist/chat/execution/tools/multi-patch.js +373 -0
- package/dist/chat/execution/tools/openai-image-gen.d.ts +2 -2
- package/dist/chat/execution/tools/plan-tools.d.ts +80 -0
- package/dist/chat/execution/tools/plan-tools.js +134 -0
- package/dist/chat/execution/tools/profclaw-ops.d.ts +6 -6
- package/dist/chat/execution/tools/repl-tool.d.ts +46 -0
- package/dist/chat/execution/tools/repl-tool.js +207 -0
- package/dist/chat/execution/tools/sessions-send.d.ts +2 -2
- package/dist/chat/execution/tools/slack-actions.d.ts +2 -2
- package/dist/chat/execution/tools/system.d.ts +4 -4
- package/dist/chat/execution/tools/todo-tool.d.ts +72 -0
- package/dist/chat/execution/tools/todo-tool.js +152 -0
- package/dist/chat/execution/tools/tool-search.d.ts +50 -0
- package/dist/chat/execution/tools/tool-search.js +155 -0
- package/dist/chat/execution/types.d.ts +21 -14
- package/dist/chat/execution/workflows/executor.d.ts +11 -0
- package/dist/chat/execution/workflows/executor.js +99 -1
- package/dist/chat/execution/workflows/types.d.ts +35 -2
- package/dist/chat/format/index.d.ts +1 -0
- package/dist/chat/format/index.js +1 -0
- package/dist/chat/format/markdown-convert.d.ts +23 -0
- package/dist/chat/format/markdown-convert.js +149 -0
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/chat/message-handler.js +58 -6
- package/dist/chat/proactive/index.d.ts +62 -0
- package/dist/chat/proactive/index.js +147 -0
- package/dist/chat/prompt-adapter.js +2 -0
- package/dist/chat/providers/irc/index.d.ts +2 -2
- package/dist/chat/providers/slack/index.d.ts +2 -2
- package/dist/chat/providers/telegram/index.d.ts +2 -0
- package/dist/chat/providers/telegram/index.js +21 -2
- package/dist/chat/system-prompts.d.ts +3 -3
- package/dist/chat/system-prompts.js +116 -61
- package/dist/chat/tools.d.ts +6 -6
- package/dist/cli/commands/auth.js +64 -1
- package/dist/cli/commands/chat.js +1327 -138
- package/dist/cli/commands/doctor.js +222 -16
- package/dist/cli/commands/history.d.ts +3 -0
- package/dist/cli/commands/history.js +138 -0
- package/dist/cli/commands/import.d.ts +44 -0
- package/dist/cli/commands/import.js +526 -0
- package/dist/cli/commands/init.d.ts +13 -0
- package/dist/cli/commands/init.js +381 -0
- package/dist/cli/commands/models.js +39 -26
- package/dist/cli/commands/onboard.js +263 -98
- package/dist/cli/commands/plan.d.ts +13 -0
- package/dist/cli/commands/plan.js +184 -0
- package/dist/cli/commands/serve.d.ts +7 -0
- package/dist/cli/commands/serve.js +77 -18
- package/dist/cli/commands/setup.js +375 -91
- package/dist/cli/commands/status.js +54 -0
- package/dist/cli/commands/tools.js +13 -13
- package/dist/cli/commands/tui.js +26 -1
- package/dist/cli/index.js +19 -6
- package/dist/cli/ink/App.d.ts +13 -0
- package/dist/cli/ink/App.js +6 -0
- package/dist/cli/ink/ChatApp.d.ts +60 -0
- package/dist/cli/ink/ChatApp.js +325 -0
- package/dist/cli/ink/DashboardApp.d.ts +3 -0
- package/dist/cli/ink/DashboardApp.js +143 -0
- package/dist/cli/ink/components/AgentStatus.d.ts +17 -0
- package/dist/cli/ink/components/AgentStatus.js +33 -0
- package/dist/cli/ink/components/ChannelList.d.ts +17 -0
- package/dist/cli/ink/components/ChannelList.js +33 -0
- package/dist/cli/ink/components/ConnectionStatus.d.ts +19 -0
- package/dist/cli/ink/components/ConnectionStatus.js +50 -0
- package/dist/cli/ink/components/CostBar.d.ts +19 -0
- package/dist/cli/ink/components/CostBar.js +35 -0
- package/dist/cli/ink/components/HookStatus.d.ts +15 -0
- package/dist/cli/ink/components/HookStatus.js +7 -0
- package/dist/cli/ink/components/PermissionPrompt.d.ts +21 -0
- package/dist/cli/ink/components/PermissionPrompt.js +51 -0
- package/dist/cli/ink/components/PlanView.d.ts +23 -0
- package/dist/cli/ink/components/PlanView.js +26 -0
- package/dist/cli/ink/components/ProviderList.d.ts +16 -0
- package/dist/cli/ink/components/ProviderList.js +16 -0
- package/dist/cli/ink/components/SessionHeader.d.ts +15 -0
- package/dist/cli/ink/components/SessionHeader.js +15 -0
- package/dist/cli/ink/components/StreamingMessage.d.ts +20 -0
- package/dist/cli/ink/components/StreamingMessage.js +27 -0
- package/dist/cli/ink/components/SuggestionBar.d.ts +15 -0
- package/dist/cli/ink/components/SuggestionBar.js +28 -0
- package/dist/cli/ink/components/SystemHealth.d.ts +20 -0
- package/dist/cli/ink/components/SystemHealth.js +39 -0
- package/dist/cli/ink/components/TaskList.d.ts +17 -0
- package/dist/cli/ink/components/TaskList.js +59 -0
- package/dist/cli/ink/components/ToolCall.d.ts +17 -0
- package/dist/cli/ink/components/ToolCall.js +43 -0
- package/dist/cli/ink/index.d.ts +23 -0
- package/dist/cli/ink/index.js +15 -0
- package/dist/cli/ink/keybindings.d.ts +35 -0
- package/dist/cli/ink/keybindings.js +105 -0
- package/dist/cli/ink/markdown-renderer.d.ts +47 -0
- package/dist/cli/ink/markdown-renderer.js +380 -0
- package/dist/cli/ink/output-styles.d.ts +39 -0
- package/dist/cli/ink/output-styles.js +119 -0
- package/dist/cli/interactive/auto-serve.d.ts +38 -0
- package/dist/cli/interactive/auto-serve.js +209 -0
- package/dist/cli/interactive/index.d.ts +25 -0
- package/dist/cli/interactive/index.js +23 -0
- package/dist/cli/interactive/picker.d.ts +28 -0
- package/dist/cli/interactive/picker.js +153 -0
- package/dist/cli/interactive/renderer.d.ts +26 -0
- package/dist/cli/interactive/renderer.js +555 -0
- package/dist/cli/interactive/repl.d.ts +14 -0
- package/dist/cli/interactive/repl.js +1516 -0
- package/dist/cli/interactive/stream-client.d.ts +59 -0
- package/dist/cli/interactive/stream-client.js +506 -0
- package/dist/cli/interactive/types.d.ts +121 -0
- package/dist/cli/interactive/types.js +10 -0
- package/dist/cli/providers.d.ts +15 -0
- package/dist/cli/providers.js +41 -0
- package/dist/cli/utils/api.d.ts +9 -0
- package/dist/cli/utils/api.js +58 -2
- package/dist/core/deployment.js +2 -0
- package/dist/cron/natural-language.d.ts +54 -0
- package/dist/cron/natural-language.js +569 -0
- package/dist/cron/scheduler.d.ts +34 -4
- package/dist/cron/scheduler.js +141 -9
- package/dist/cron/templates.d.ts +1 -1
- package/dist/cron/templates.js +219 -0
- package/dist/feeds/feed-engine.d.ts +149 -0
- package/dist/feeds/feed-engine.js +600 -0
- package/dist/feeds/index.d.ts +9 -0
- package/dist/feeds/index.js +8 -0
- package/dist/gateway/router.js +6 -1
- package/dist/hooks/built-in/audit-log.d.ts +11 -0
- package/dist/hooks/built-in/audit-log.js +84 -0
- package/dist/hooks/built-in/cost-warning.d.ts +10 -0
- package/dist/hooks/built-in/cost-warning.js +59 -0
- package/dist/hooks/built-in/dangerous-tool.d.ts +32 -0
- package/dist/hooks/built-in/dangerous-tool.js +80 -0
- package/dist/hooks/built-in/index.d.ts +14 -0
- package/dist/hooks/built-in/index.js +20 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +6 -0
- package/dist/hooks/loader.d.ts +17 -0
- package/dist/hooks/loader.js +142 -0
- package/dist/hooks/registry.d.ts +62 -0
- package/dist/hooks/registry.js +127 -0
- package/dist/integrations/web-search.js +6 -3
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/index.js +2 -0
- package/dist/memory/memory-service.js +14 -13
- package/dist/memory/observational.d.ts +62 -0
- package/dist/memory/observational.js +396 -0
- package/dist/middleware/content-filter.d.ts +22 -0
- package/dist/middleware/content-filter.js +69 -0
- package/dist/middleware/request-validator.d.ts +159 -0
- package/dist/middleware/request-validator.js +93 -0
- package/dist/plugins/sdk.d.ts +22 -0
- package/dist/plugins/sdk.js +17 -1
- package/dist/projects/types.d.ts +10 -10
- package/dist/providers/ai-sdk.d.ts +11 -0
- package/dist/providers/ai-sdk.js +97 -18
- package/dist/providers/core/models.js +67 -1
- package/dist/providers/core/types.d.ts +3 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.js +1 -0
- package/dist/providers/smart-router.d.ts +118 -0
- package/dist/providers/smart-router.js +685 -0
- package/dist/providers/types.d.ts +16 -16
- package/dist/routes/agents.js +50 -0
- package/dist/routes/auth.js +8 -1
- package/dist/routes/channels.d.ts +12 -0
- package/dist/routes/channels.js +166 -0
- package/dist/routes/chat.js +259 -14
- package/dist/routes/costs.js +32 -0
- package/dist/routes/cron.js +80 -5
- package/dist/routes/feeds.d.ts +10 -0
- package/dist/routes/feeds.js +168 -0
- package/dist/routes/mcp.js +21 -0
- package/dist/routes/memory.js +130 -0
- package/dist/routes/skills.js +129 -0
- package/dist/routes/teams.d.ts +9 -0
- package/dist/routes/teams.js +210 -0
- package/dist/routes/tools.js +14 -0
- package/dist/routes/users.js +2 -0
- package/dist/server/route-loader.js +4 -1
- package/dist/server/stream-bridge.d.ts +19 -0
- package/dist/server/stream-bridge.js +38 -0
- package/dist/server.js +421 -141
- package/dist/skills/marketplace.d.ts +87 -0
- package/dist/skills/marketplace.js +268 -0
- package/dist/storage/index.d.ts +14 -0
- package/dist/storage/index.js +64 -3
- package/dist/storage/schema.d.ts +4 -4
- package/dist/storage/schema.js +1 -1
- package/dist/teams/index.d.ts +110 -0
- package/dist/teams/index.js +365 -0
- package/dist/tickets/types.d.ts +39 -39
- package/dist/types/summary.d.ts +5 -5
- package/dist/utils/auto-update.d.ts +23 -0
- package/dist/utils/auto-update.js +157 -0
- package/dist/utils/offline-detect.d.ts +55 -0
- package/dist/utils/offline-detect.js +121 -0
- package/dist/utils/pid-file.d.ts +36 -0
- package/dist/utils/pid-file.js +125 -0
- package/dist/utils/prevent-sleep.d.ts +27 -0
- package/dist/utils/prevent-sleep.js +95 -0
- package/dist/utils/sanitizer.d.ts +57 -0
- package/dist/utils/sanitizer.js +174 -0
- package/docker-compose.yml +13 -137
- package/package.json +31 -6
- package/skills/deploy-cloudflare/SKILL.md +62 -0
- package/skills/deploy-vercel/SKILL.md +67 -0
- package/skills/docker-deploy/SKILL.md +158 -0
- package/skills/full-stack-builder/SKILL.md +92 -0
- package/skills/git-workflow/SKILL.md +3 -3
- package/skills/humanizer/SKILL.md +488 -0
- package/skills/profclaw-assistant/SKILL.md +85 -56
- package/ui/dist/assets/ActivityView-Da6HQ8ws.js +1 -0
- package/ui/dist/assets/AgentList-H58R0kX3.js +1 -0
- package/ui/dist/assets/AnalyticsDashboard-B28AeRsc.js +1 -0
- package/ui/dist/assets/AreaChart-DwLzeAQ8.js +1 -0
- package/ui/dist/assets/CartesianChart-piKQsTAR.js +36 -0
- package/ui/dist/assets/ChatView-Dbj8rxU5.js +10 -0
- package/ui/dist/assets/CostsDashboard-C6F5df0F.js +1 -0
- package/ui/dist/assets/EstimateSelect-wga0rUKX.js +1 -0
- package/ui/dist/assets/FeedDashboard-Ef6FEzEf.js +1 -0
- package/ui/dist/assets/FloatingChatbot-0yhkUeCq.js +2 -0
- package/ui/dist/assets/InviteCodeManagement-tUXfx4Bc.js +2 -0
- package/ui/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/ui/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/ui/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/ui/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/ui/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/ui/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/ui/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/ui/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/ui/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/ui/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/ui/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/ui/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/ui/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/ui/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/ui/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/ui/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/ui/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/ui/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/ui/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/ui/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/ui/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/ui/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/ui/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/ui/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/ui/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/ui/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/ui/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/ui/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/ui/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/ui/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/ui/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/ui/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/ui/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/ui/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/ui/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/ui/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/ui/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/ui/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/ui/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/ui/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/ui/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/ui/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/ui/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/ui/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/ui/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/ui/dist/assets/MarketplacePage-DGrLtolR.js +1 -0
- package/ui/dist/assets/{ProjectDetail-DlYUcOss.js → ProjectDetail-BgWvA6UP.js} +2 -2
- package/ui/dist/assets/ProjectIcon-TDuliqwg.js +1 -0
- package/ui/dist/assets/ProjectList-DXgM4187.js +1 -0
- package/ui/dist/assets/{Settings-CgPqzUvj.js → Settings-xA8Zhi3p.js} +3 -3
- package/ui/dist/assets/StatusIndicator-B8vfFAxg.js +1 -0
- package/ui/dist/assets/{SummaryDetail-CwLAfHgJ.js → SummaryDetail-eedRfTtF.js} +2 -2
- package/ui/dist/assets/SummaryList-CLNX2P84.js +1 -0
- package/ui/dist/assets/TaskDetail-BtWclNiR.js +1 -0
- package/ui/dist/assets/TaskList-JjODAgSc.js +1 -0
- package/ui/dist/assets/TeamsPage-CBK5iAyx.js +1 -0
- package/ui/dist/assets/TicketBoard-C9aJNNYp.js +1 -0
- package/ui/dist/assets/TicketDetail-CV5JmL31.js +1 -0
- package/ui/dist/assets/TicketList-68V4lzUz.js +1 -0
- package/ui/dist/assets/UserManagement-DKTb6UpE.js +2 -0
- package/ui/dist/assets/ViewSwitcher-BvdQht2Y.js +1 -0
- package/ui/dist/assets/alert-dialog-O6qBOv_f.js +1 -0
- package/ui/dist/assets/{archive-CGck7gxR.js → archive-CX7UvZpf.js} +1 -1
- package/ui/dist/assets/badge-BbfnwDJP.js +1 -0
- package/ui/dist/assets/{bug-DqSGPUUE.js → bug-3WX0394-.js} +1 -1
- package/ui/dist/assets/{calendar-BuZ4zbPW.js → calendar-buq77TaS.js} +1 -1
- package/ui/dist/assets/{chevron-up-DcJ4LL_N.js → chevron-up-4ymsBJRo.js} +1 -1
- package/ui/dist/assets/{circle-x-C78PNZjF.js → circle-x-ByXtwR6Y.js} +1 -1
- package/ui/dist/assets/constants-CVdDh7p0.js +1 -0
- package/ui/dist/assets/{cpu-Ck6AoG8c.js → cpu-CiuoCeDY.js} +1 -1
- package/ui/dist/assets/{database-CA2w8Lvt.js → database-BWXSBg5a.js} +1 -1
- package/ui/dist/assets/dialog-lDg4NvMV.js +1 -0
- package/ui/dist/assets/dollar-sign-Dmijd6DP.js +1 -0
- package/ui/dist/assets/{ellipsis-FhHKRbfl.js → ellipsis-vT-5SVIp.js} +1 -1
- package/ui/dist/assets/{ellipsis-vertical-CO0UqE4-.js → ellipsis-vertical-B4tAX_bL.js} +1 -1
- package/ui/dist/assets/feature-markdown-DBo5Q7uq.js +289 -0
- package/ui/dist/assets/{file-code-ChnhYYj1.js → file-code-ChOWdKXf.js} +1 -1
- package/ui/dist/assets/{folder-open-CHwA1-ve.js → folder-open-CkOUbIiP.js} +1 -1
- package/ui/dist/assets/{funnel-ByEjRFNB.js → funnel-uZkoSPP-.js} +1 -1
- package/ui/dist/assets/{git-branch-GTOPQgU4.js → git-branch-CwvUxj7C.js} +1 -1
- package/ui/dist/assets/{git-commit-horizontal-F5M84Kut.js → git-commit-horizontal-lxPzCvhD.js} +1 -1
- package/ui/dist/assets/{globe-CQWfr7hT.js → globe-D_WpJdsj.js} +1 -1
- package/ui/dist/assets/{hash-nKC9gtLg.js → hash-CA0hJ7vh.js} +1 -1
- package/ui/dist/assets/{history-DfFSA9xJ.js → history-CEWMLELs.js} +1 -1
- package/ui/dist/assets/inbox-ehtOptTV.js +1 -0
- package/ui/dist/assets/{index-a4Fxq0Hb.js → index-C1rhbml4.js} +3 -3
- package/ui/dist/assets/index-CR8gfCHv.js +1 -0
- package/ui/dist/assets/index-DVXMpWai.js +1 -0
- package/ui/dist/assets/index-DaDJMM2v.js +1 -0
- package/ui/dist/assets/index-Djdq_0xu.js +1 -0
- package/ui/dist/assets/index-M46Gcb8K.css +1 -0
- package/ui/dist/assets/index-sEBN7w8J.js +109 -0
- package/ui/dist/assets/layers-C6Mhf8Nk.js +1 -0
- package/ui/dist/assets/{layout-dashboard-WmgjMhWF.js → layout-dashboard-BRUM0kpT.js} +1 -1
- package/ui/dist/assets/{lightbulb-Bo8hEr7B.js → lightbulb-CN2q1O5l.js} +1 -1
- package/ui/dist/assets/{link-2-YqrpQXBH.js → link-2-CC4E28yJ.js} +1 -1
- package/ui/dist/assets/markdown-renderer-C6ENbB0u.js +10 -0
- package/ui/dist/assets/markdown-renderer-CfVKi3_s.css +1 -0
- package/ui/dist/assets/{message-square-CD0H5hot.js → message-square-Bbb241am.js} +1 -1
- package/ui/dist/assets/package-CwT3IzFx.js +1 -0
- package/ui/dist/assets/{pencil-DpFnj5dn.js → pencil-CDmiHzoj.js} +1 -1
- package/ui/dist/assets/{play-DVgea_jT.js → play-tjy5jMQX.js} +1 -1
- package/ui/dist/assets/popover-CFHZf3pE.js +1 -0
- package/ui/dist/assets/progress-BboUHuLf.js +1 -0
- package/ui/dist/assets/{rocket-BFxPYGx9.js → rocket--8ZHgdXJ.js} +1 -1
- package/ui/dist/assets/select-n108rXny.js +1 -0
- package/ui/dist/assets/{send-eYnW_7n-.js → send-Cu7MR2Qh.js} +1 -1
- package/ui/dist/assets/server-DmodxZp-.js +1 -0
- package/ui/dist/assets/{settings-2-scXUOuE_.js → settings-2-CkRNqkxj.js} +1 -1
- package/ui/dist/assets/sheet-7aUJkyzU.js +1 -0
- package/ui/dist/assets/{shield-check-PEr7nmVw.js → shield-check-ViI3nMKE.js} +1 -1
- package/ui/dist/assets/{shield-off-CLtXio62.js → shield-off-DN3tagkn.js} +1 -1
- package/ui/dist/assets/skeleton-C0E1Nfro.js +1 -0
- package/ui/dist/assets/{smartphone-DusFfY0U.js → smartphone-5FghiXpA.js} +1 -1
- package/ui/dist/assets/{square-e1yxB2eR.js → square-DiNSx8K7.js} +1 -1
- package/ui/dist/assets/star-DhdFVidS.js +1 -0
- package/ui/dist/assets/switch-CIgVbZqQ.js +1 -0
- package/ui/dist/assets/table-BC56FVMV.js +1 -0
- package/ui/dist/assets/{tag-tAwMmQ9G.js → tag-CH_vQliw.js} +1 -1
- package/ui/dist/assets/textarea-CxDiKFXZ.js +1 -0
- package/ui/dist/assets/{timer-Vel1N3RP.js → timer-CdGVTb60.js} +1 -1
- package/ui/dist/assets/tooltip-BuW9A5UO.js +1 -0
- package/ui/dist/assets/{trash-2-eM-CNwsZ.js → trash-2-CucZJL0N.js} +1 -1
- package/ui/dist/assets/trending-down-BCezC1z2.js +1 -0
- package/ui/dist/assets/{trending-up-BGafmjRo.js → trending-up-C5OYX2k2.js} +1 -1
- package/ui/dist/assets/vendor-query-C0p7b53x.js +4 -0
- package/ui/dist/assets/vendor-react-Mc5_kfYG.js +12 -0
- package/ui/dist/assets/vendor-ui-CXPAUBFv.js +51 -0
- package/ui/dist/assets/{wand-sparkles-DPvcd9Pi.js → wand-sparkles-BaH6pJnc.js} +1 -1
- package/ui/dist/assets/{wrench-B8s3zYVV.js → wrench-CjxjP6ok.js} +1 -1
- package/ui/dist/index.html +5 -2
- package/dist/chat/auto-reply.d.ts +0 -90
- package/dist/chat/auto-reply.js +0 -272
- package/dist/chat/execution/pty.d.ts +0 -92
- package/dist/chat/execution/pty.js +0 -285
- package/dist/chat/execution/tools/glinr-ops.d.ts +0 -202
- package/dist/chat/execution/tools/glinr-ops.js +0 -694
- package/dist/cli/commands/browser.d.ts +0 -3
- package/dist/cli/commands/browser.js +0 -138
- package/dist/cli/commands/canvas.d.ts +0 -3
- package/dist/cli/commands/canvas.js +0 -155
- package/dist/cli/commands/nodes.d.ts +0 -3
- package/dist/cli/commands/nodes.js +0 -193
- package/dist/diagnostics/exporters.d.ts +0 -21
- package/dist/diagnostics/exporters.js +0 -138
- package/dist/diagnostics/index.d.ts +0 -10
- package/dist/diagnostics/index.js +0 -9
- package/dist/diagnostics/middleware.d.ts +0 -12
- package/dist/diagnostics/middleware.js +0 -58
- package/dist/diagnostics/tracer.d.ts +0 -133
- package/dist/diagnostics/tracer.js +0 -257
- package/dist/discovery/index.d.ts +0 -8
- package/dist/discovery/index.js +0 -7
- package/dist/discovery/mdns.d.ts +0 -40
- package/dist/discovery/mdns.js +0 -249
- package/dist/plugins/registry.d.ts +0 -122
- package/dist/plugins/registry.js +0 -352
- package/dist/plugins/sandbox.d.ts +0 -77
- package/dist/plugins/sandbox.js +0 -287
- package/dist/plugins/search/brave.d.ts +0 -9
- package/dist/plugins/search/brave.js +0 -157
- package/dist/plugins/search/duckduckgo.d.ts +0 -9
- package/dist/plugins/search/duckduckgo.js +0 -171
- package/dist/plugins/search/index.d.ts +0 -13
- package/dist/plugins/search/index.js +0 -23
- package/dist/plugins/search/searxng.d.ts +0 -9
- package/dist/plugins/search/searxng.js +0 -170
- package/dist/plugins/search/serper.d.ts +0 -9
- package/dist/plugins/search/serper.js +0 -135
- package/dist/plugins/search/tavily.d.ts +0 -9
- package/dist/plugins/search/tavily.js +0 -146
- package/dist/providers/adapters/anthropic.d.ts +0 -26
- package/dist/providers/adapters/anthropic.js +0 -306
- package/dist/providers/adapters/base.d.ts +0 -53
- package/dist/providers/adapters/base.js +0 -99
- package/dist/providers/adapters/ollama.d.ts +0 -30
- package/dist/providers/adapters/ollama.js +0 -292
- package/dist/utils/ai-cache.d.ts +0 -72
- package/dist/utils/ai-cache.js +0 -204
- package/dist/utils/file-lock.d.ts +0 -85
- package/dist/utils/file-lock.js +0 -204
- package/ui/dist/assets/ActivityView-DIPQSJ_d.js +0 -1
- package/ui/dist/assets/AgentList-CqyaYrcq.js +0 -1
- package/ui/dist/assets/AnalyticsDashboard-C-mjuGHT.js +0 -1
- package/ui/dist/assets/AreaChart-CfYWmbtr.js +0 -1
- package/ui/dist/assets/CartesianChart-BaQ3It0c.js +0 -36
- package/ui/dist/assets/ChatView-DxxQy6pl.js +0 -10
- package/ui/dist/assets/CostsDashboard-CDBBcGkg.js +0 -1
- package/ui/dist/assets/EstimateSelect-CDjf5qKl.js +0 -1
- package/ui/dist/assets/FloatingChatbot-CZHjvJIe.js +0 -2
- package/ui/dist/assets/InviteCodeManagement-DTm-IPTm.js +0 -2
- package/ui/dist/assets/ProjectIcon-BMRpnM04.js +0 -1
- package/ui/dist/assets/ProjectList-D85TN0i0.js +0 -4
- package/ui/dist/assets/StatusIndicator-yig0uZEA.js +0 -1
- package/ui/dist/assets/SummaryList-BvS5Idnu.js +0 -1
- package/ui/dist/assets/TaskDetail-zarC1fOt.js +0 -1
- package/ui/dist/assets/TaskList-CyJq3ANE.js +0 -1
- package/ui/dist/assets/TicketBoard-BlWr3-iH.js +0 -1
- package/ui/dist/assets/TicketDetail-DmqWKj2W.js +0 -1
- package/ui/dist/assets/TicketList-Scj4pMWa.js +0 -1
- package/ui/dist/assets/UserManagement-BH7uG7dw.js +0 -2
- package/ui/dist/assets/ViewSwitcher-3HzZUdWn.js +0 -1
- package/ui/dist/assets/alert-dialog-DWPb2IfQ.js +0 -7
- package/ui/dist/assets/badge-DEmc3Z_l.js +0 -1
- package/ui/dist/assets/brain-CfFdLVqb.js +0 -1
- package/ui/dist/assets/constants-DhDjZe4P.js +0 -1
- package/ui/dist/assets/dialog-BOdGWhgE.js +0 -1
- package/ui/dist/assets/index--JkIxVXb.js +0 -67
- package/ui/dist/assets/index-Ca3vk7Gq.js +0 -1
- package/ui/dist/assets/index-DHGvP9mp.js +0 -1
- package/ui/dist/assets/index-DeI8lKRR.js +0 -1
- package/ui/dist/assets/index-WclMPci1.css +0 -1
- package/ui/dist/assets/index-Z4-RtZcs.js +0 -1
- package/ui/dist/assets/layers-DFeLExSa.js +0 -1
- package/ui/dist/assets/markdown-renderer-Croje6Xe.js +0 -36
- package/ui/dist/assets/popover-JXecfWG5.js +0 -1
- package/ui/dist/assets/progress-C1ghf1Fu.js +0 -1
- package/ui/dist/assets/select-MADP8m6Q.js +0 -1
- package/ui/dist/assets/server-CPMaysH8.js +0 -1
- package/ui/dist/assets/sheet-r6NSOxi-.js +0 -1
- package/ui/dist/assets/skeleton-C9oEzNlU.js +0 -1
- package/ui/dist/assets/switch-tNs0n-kz.js +0 -1
- package/ui/dist/assets/table-CXxtLicg.js +0 -1
- package/ui/dist/assets/textarea-BjiEeIWh.js +0 -1
- package/ui/dist/assets/tooltip-ZMwtfr1J.js +0 -1
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Brave Search Provider
|
|
3
|
-
*
|
|
4
|
-
* Privacy-focused search with independent index.
|
|
5
|
-
* https://brave.com/search/api/
|
|
6
|
-
*/
|
|
7
|
-
import type { SearchPluginDefinition } from '../types.js';
|
|
8
|
-
export declare const BRAVE_DEFINITION: SearchPluginDefinition;
|
|
9
|
-
//# sourceMappingURL=brave.d.ts.map
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Brave Search Provider
|
|
3
|
-
*
|
|
4
|
-
* Privacy-focused search with independent index.
|
|
5
|
-
* https://brave.com/search/api/
|
|
6
|
-
*/
|
|
7
|
-
const BRAVE_API_URL = 'https://api.search.brave.com/res/v1/web/search';
|
|
8
|
-
class BraveProvider {
|
|
9
|
-
metadata = BRAVE_DEFINITION.metadata;
|
|
10
|
-
apiKey;
|
|
11
|
-
safeSearch;
|
|
12
|
-
constructor(config) {
|
|
13
|
-
this.apiKey = config.credentials?.apiKey || '';
|
|
14
|
-
this.safeSearch = config.settings?.safeSearch || 'moderate';
|
|
15
|
-
}
|
|
16
|
-
async search(query, options) {
|
|
17
|
-
if (!this.apiKey) {
|
|
18
|
-
throw new Error('Brave Search API key not configured');
|
|
19
|
-
}
|
|
20
|
-
const startTime = Date.now();
|
|
21
|
-
const params = new URLSearchParams({
|
|
22
|
-
q: query,
|
|
23
|
-
count: String(options?.limit || 10),
|
|
24
|
-
safesearch: this.safeSearch,
|
|
25
|
-
});
|
|
26
|
-
if (options?.language)
|
|
27
|
-
params.set('search_lang', options.language);
|
|
28
|
-
if (options?.region)
|
|
29
|
-
params.set('country', options.region);
|
|
30
|
-
if (options?.freshness) {
|
|
31
|
-
const freshnessMap = {
|
|
32
|
-
day: 'pd',
|
|
33
|
-
week: 'pw',
|
|
34
|
-
month: 'pm',
|
|
35
|
-
year: 'py',
|
|
36
|
-
};
|
|
37
|
-
params.set('freshness', freshnessMap[options.freshness] || '');
|
|
38
|
-
}
|
|
39
|
-
const response = await fetch(`${BRAVE_API_URL}?${params}`, {
|
|
40
|
-
headers: {
|
|
41
|
-
'Accept': 'application/json',
|
|
42
|
-
'Accept-Encoding': 'gzip',
|
|
43
|
-
'X-Subscription-Token': this.apiKey,
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
if (!response.ok) {
|
|
47
|
-
const error = await response.text();
|
|
48
|
-
throw new Error(`Brave Search API error: ${response.status} - ${error}`);
|
|
49
|
-
}
|
|
50
|
-
const data = await response.json();
|
|
51
|
-
const searchTime = Date.now() - startTime;
|
|
52
|
-
const results = (data.web?.results || []).map((item) => ({
|
|
53
|
-
title: item.title,
|
|
54
|
-
url: item.url,
|
|
55
|
-
snippet: item.description || '',
|
|
56
|
-
date: item.age,
|
|
57
|
-
source: 'brave',
|
|
58
|
-
favicon: item.profile?.img,
|
|
59
|
-
metadata: {
|
|
60
|
-
language: item.language,
|
|
61
|
-
familyFriendly: item.family_friendly,
|
|
62
|
-
extraSnippets: item.extra_snippets,
|
|
63
|
-
},
|
|
64
|
-
}));
|
|
65
|
-
return {
|
|
66
|
-
results,
|
|
67
|
-
query: data.query?.original || query,
|
|
68
|
-
totalResults: data.web?.total_results,
|
|
69
|
-
searchTime,
|
|
70
|
-
provider: 'brave',
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
async isAvailable() {
|
|
74
|
-
return !!this.apiKey;
|
|
75
|
-
}
|
|
76
|
-
async healthCheck() {
|
|
77
|
-
if (!this.apiKey) {
|
|
78
|
-
return {
|
|
79
|
-
healthy: false,
|
|
80
|
-
lastCheck: new Date(),
|
|
81
|
-
errorMessage: 'API key not configured',
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
try {
|
|
85
|
-
const startTime = Date.now();
|
|
86
|
-
await this.search('test', { limit: 1 });
|
|
87
|
-
const latency = Date.now() - startTime;
|
|
88
|
-
return {
|
|
89
|
-
healthy: true,
|
|
90
|
-
lastCheck: new Date(),
|
|
91
|
-
latency,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
catch (error) {
|
|
95
|
-
return {
|
|
96
|
-
healthy: false,
|
|
97
|
-
lastCheck: new Date(),
|
|
98
|
-
errorMessage: error instanceof Error ? error.message : 'Health check failed',
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
export const BRAVE_DEFINITION = {
|
|
104
|
-
metadata: {
|
|
105
|
-
id: 'brave',
|
|
106
|
-
name: 'Brave Search',
|
|
107
|
-
description: 'Privacy-first search with independent index - great for enterprise',
|
|
108
|
-
category: 'search',
|
|
109
|
-
icon: 'shield-check',
|
|
110
|
-
version: '1.0.0',
|
|
111
|
-
homepage: 'https://brave.com/search/api/',
|
|
112
|
-
pricing: {
|
|
113
|
-
type: 'freemium',
|
|
114
|
-
costPer1k: 3.0,
|
|
115
|
-
freeQuota: 2000, // 2000 free queries/month
|
|
116
|
-
},
|
|
117
|
-
rateLimit: {
|
|
118
|
-
requestsPerSecond: 1, // Free tier
|
|
119
|
-
requestsPerMinute: 15, // Free tier
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
settingsSchema: {
|
|
123
|
-
credentials: [
|
|
124
|
-
{
|
|
125
|
-
key: 'apiKey',
|
|
126
|
-
type: 'password',
|
|
127
|
-
label: 'API Key',
|
|
128
|
-
description: 'Your Brave Search API key',
|
|
129
|
-
placeholder: 'BSA...',
|
|
130
|
-
required: true,
|
|
131
|
-
},
|
|
132
|
-
],
|
|
133
|
-
settings: [
|
|
134
|
-
{
|
|
135
|
-
key: 'safeSearch',
|
|
136
|
-
type: 'select',
|
|
137
|
-
label: 'Safe Search',
|
|
138
|
-
description: 'Content filtering level',
|
|
139
|
-
default: 'moderate',
|
|
140
|
-
options: [
|
|
141
|
-
{ value: 'off', label: 'Off' },
|
|
142
|
-
{ value: 'moderate', label: 'Moderate' },
|
|
143
|
-
{ value: 'strict', label: 'Strict' },
|
|
144
|
-
],
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
key: 'useGoggles',
|
|
148
|
-
type: 'boolean',
|
|
149
|
-
label: 'Use Goggles',
|
|
150
|
-
description: 'Enable custom result re-ranking with Brave Goggles',
|
|
151
|
-
default: false,
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
|
-
},
|
|
155
|
-
factory: (config) => new BraveProvider(config),
|
|
156
|
-
};
|
|
157
|
-
//# sourceMappingURL=brave.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DuckDuckGo Search Provider
|
|
3
|
-
*
|
|
4
|
-
* Free, privacy-focused search - great for fallback.
|
|
5
|
-
* Note: Uses the instant answer API, not official search API.
|
|
6
|
-
*/
|
|
7
|
-
import type { SearchPluginDefinition } from '../types.js';
|
|
8
|
-
export declare const DUCKDUCKGO_DEFINITION: SearchPluginDefinition;
|
|
9
|
-
//# sourceMappingURL=duckduckgo.d.ts.map
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DuckDuckGo Search Provider
|
|
3
|
-
*
|
|
4
|
-
* Free, privacy-focused search - great for fallback.
|
|
5
|
-
* Note: Uses the instant answer API, not official search API.
|
|
6
|
-
*/
|
|
7
|
-
// DuckDuckGo HTML search endpoint (no official API)
|
|
8
|
-
const DDG_SEARCH_URL = 'https://html.duckduckgo.com/html/';
|
|
9
|
-
class DuckDuckGoProvider {
|
|
10
|
-
metadata = DUCKDUCKGO_DEFINITION.metadata;
|
|
11
|
-
safeSearch;
|
|
12
|
-
constructor(config) {
|
|
13
|
-
this.safeSearch = config.settings?.safeSearch ?? true;
|
|
14
|
-
}
|
|
15
|
-
async search(query, options) {
|
|
16
|
-
const startTime = Date.now();
|
|
17
|
-
const limit = options?.limit || 10;
|
|
18
|
-
// Use DuckDuckGo HTML endpoint with form data
|
|
19
|
-
const formData = new URLSearchParams();
|
|
20
|
-
formData.append('q', query);
|
|
21
|
-
formData.append('kl', options?.region || 'wt-wt'); // Region
|
|
22
|
-
if (this.safeSearch || options?.safeSearch) {
|
|
23
|
-
formData.append('kp', '1'); // Safe search on
|
|
24
|
-
}
|
|
25
|
-
const response = await fetch(DDG_SEARCH_URL, {
|
|
26
|
-
method: 'POST',
|
|
27
|
-
headers: {
|
|
28
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
29
|
-
'User-Agent': 'profClaw/1.0',
|
|
30
|
-
},
|
|
31
|
-
body: formData.toString(),
|
|
32
|
-
});
|
|
33
|
-
if (!response.ok) {
|
|
34
|
-
throw new Error(`DuckDuckGo search failed: ${response.status}`);
|
|
35
|
-
}
|
|
36
|
-
const html = await response.text();
|
|
37
|
-
const results = this.parseResults(html, limit);
|
|
38
|
-
const searchTime = Date.now() - startTime;
|
|
39
|
-
return {
|
|
40
|
-
results,
|
|
41
|
-
query,
|
|
42
|
-
searchTime,
|
|
43
|
-
provider: 'duckduckgo',
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
parseResults(html, limit) {
|
|
47
|
-
const results = [];
|
|
48
|
-
// Simple regex parsing for DuckDuckGo HTML results
|
|
49
|
-
// Match result blocks
|
|
50
|
-
const resultRegex = /<a[^>]*class="result__a"[^>]*href="([^"]*)"[^>]*>([^<]*)<\/a>[\s\S]*?<a[^>]*class="result__snippet"[^>]*>([^<]*)/g;
|
|
51
|
-
let match;
|
|
52
|
-
while ((match = resultRegex.exec(html)) !== null && results.length < limit) {
|
|
53
|
-
const [, url, title, snippet] = match;
|
|
54
|
-
if (url && title) {
|
|
55
|
-
// DuckDuckGo wraps URLs, extract the actual URL
|
|
56
|
-
const actualUrl = this.extractUrl(url);
|
|
57
|
-
results.push({
|
|
58
|
-
title: this.decodeHtml(title.trim()),
|
|
59
|
-
url: actualUrl,
|
|
60
|
-
snippet: this.decodeHtml(snippet?.trim() || ''),
|
|
61
|
-
source: 'duckduckgo',
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
// Fallback: Try simpler pattern if main regex didn't match
|
|
66
|
-
if (results.length === 0) {
|
|
67
|
-
const linkRegex = /<a[^>]*class="[^"]*result__url[^"]*"[^>]*href="([^"]*)"[^>]*>.*?<\/a>[\s\S]*?<h2[^>]*class="[^"]*result__title[^"]*"[^>]*>[\s\S]*?<a[^>]*>([^<]*)<\/a>/g;
|
|
68
|
-
while ((match = linkRegex.exec(html)) !== null && results.length < limit) {
|
|
69
|
-
const [, url, title] = match;
|
|
70
|
-
if (url && title) {
|
|
71
|
-
results.push({
|
|
72
|
-
title: this.decodeHtml(title.trim()),
|
|
73
|
-
url: this.extractUrl(url),
|
|
74
|
-
snippet: '',
|
|
75
|
-
source: 'duckduckgo',
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return results;
|
|
81
|
-
}
|
|
82
|
-
extractUrl(wrappedUrl) {
|
|
83
|
-
// DuckDuckGo wraps URLs like: //duckduckgo.com/l/?uddg=https%3A%2F%2Fexample.com
|
|
84
|
-
if (wrappedUrl.includes('uddg=')) {
|
|
85
|
-
const match = wrappedUrl.match(/uddg=([^&]*)/);
|
|
86
|
-
if (match) {
|
|
87
|
-
return decodeURIComponent(match[1]);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
// Return as-is if not wrapped
|
|
91
|
-
return wrappedUrl.startsWith('//') ? `https:${wrappedUrl}` : wrappedUrl;
|
|
92
|
-
}
|
|
93
|
-
decodeHtml(text) {
|
|
94
|
-
return text
|
|
95
|
-
.replace(/&/g, '&')
|
|
96
|
-
.replace(/</g, '<')
|
|
97
|
-
.replace(/>/g, '>')
|
|
98
|
-
.replace(/"/g, '"')
|
|
99
|
-
.replace(/'/g, "'")
|
|
100
|
-
.replace(/<[^>]*>/g, ''); // Strip any remaining HTML tags
|
|
101
|
-
}
|
|
102
|
-
async isAvailable() {
|
|
103
|
-
// DuckDuckGo is always available (no API key needed)
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
async healthCheck() {
|
|
107
|
-
try {
|
|
108
|
-
const startTime = Date.now();
|
|
109
|
-
await this.search('test', { limit: 1 });
|
|
110
|
-
const latency = Date.now() - startTime;
|
|
111
|
-
return {
|
|
112
|
-
healthy: true,
|
|
113
|
-
lastCheck: new Date(),
|
|
114
|
-
latency,
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
catch (error) {
|
|
118
|
-
return {
|
|
119
|
-
healthy: false,
|
|
120
|
-
lastCheck: new Date(),
|
|
121
|
-
errorMessage: error instanceof Error ? error.message : 'Health check failed',
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
export const DUCKDUCKGO_DEFINITION = {
|
|
127
|
-
metadata: {
|
|
128
|
-
id: 'duckduckgo',
|
|
129
|
-
name: 'DuckDuckGo',
|
|
130
|
-
description: 'Privacy-focused search - free, no API key required',
|
|
131
|
-
category: 'search',
|
|
132
|
-
icon: 'shield',
|
|
133
|
-
version: '1.0.0',
|
|
134
|
-
homepage: 'https://duckduckgo.com',
|
|
135
|
-
pricing: {
|
|
136
|
-
type: 'free',
|
|
137
|
-
},
|
|
138
|
-
rateLimit: {
|
|
139
|
-
requestsPerSecond: 1, // Be nice to DuckDuckGo
|
|
140
|
-
requestsPerMinute: 30,
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
settingsSchema: {
|
|
144
|
-
credentials: [], // No credentials needed
|
|
145
|
-
settings: [
|
|
146
|
-
{
|
|
147
|
-
key: 'safeSearch',
|
|
148
|
-
type: 'boolean',
|
|
149
|
-
label: 'Safe Search',
|
|
150
|
-
description: 'Filter explicit content from results',
|
|
151
|
-
default: true,
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
key: 'region',
|
|
155
|
-
type: 'select',
|
|
156
|
-
label: 'Region',
|
|
157
|
-
description: 'Search region preference',
|
|
158
|
-
default: 'wt-wt',
|
|
159
|
-
options: [
|
|
160
|
-
{ value: 'wt-wt', label: 'No region (worldwide)' },
|
|
161
|
-
{ value: 'us-en', label: 'United States' },
|
|
162
|
-
{ value: 'uk-en', label: 'United Kingdom' },
|
|
163
|
-
{ value: 'de-de', label: 'Germany' },
|
|
164
|
-
{ value: 'fr-fr', label: 'France' },
|
|
165
|
-
],
|
|
166
|
-
},
|
|
167
|
-
],
|
|
168
|
-
},
|
|
169
|
-
factory: (config) => new DuckDuckGoProvider(config),
|
|
170
|
-
};
|
|
171
|
-
//# sourceMappingURL=duckduckgo.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Search Provider Plugins
|
|
3
|
-
*
|
|
4
|
-
* Export all built-in search provider definitions.
|
|
5
|
-
*/
|
|
6
|
-
export { SERPER_DEFINITION } from './serper.js';
|
|
7
|
-
export { TAVILY_DEFINITION } from './tavily.js';
|
|
8
|
-
export { BRAVE_DEFINITION } from './brave.js';
|
|
9
|
-
export { DUCKDUCKGO_DEFINITION } from './duckduckgo.js';
|
|
10
|
-
export { SEARXNG_DEFINITION } from './searxng.js';
|
|
11
|
-
import type { SearchPluginDefinition } from '../types.js';
|
|
12
|
-
export declare const ALL_SEARCH_PLUGINS: SearchPluginDefinition[];
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Search Provider Plugins
|
|
3
|
-
*
|
|
4
|
-
* Export all built-in search provider definitions.
|
|
5
|
-
*/
|
|
6
|
-
export { SERPER_DEFINITION } from './serper.js';
|
|
7
|
-
export { TAVILY_DEFINITION } from './tavily.js';
|
|
8
|
-
export { BRAVE_DEFINITION } from './brave.js';
|
|
9
|
-
export { DUCKDUCKGO_DEFINITION } from './duckduckgo.js';
|
|
10
|
-
export { SEARXNG_DEFINITION } from './searxng.js';
|
|
11
|
-
import { SERPER_DEFINITION } from './serper.js';
|
|
12
|
-
import { TAVILY_DEFINITION } from './tavily.js';
|
|
13
|
-
import { BRAVE_DEFINITION } from './brave.js';
|
|
14
|
-
import { DUCKDUCKGO_DEFINITION } from './duckduckgo.js';
|
|
15
|
-
import { SEARXNG_DEFINITION } from './searxng.js';
|
|
16
|
-
export const ALL_SEARCH_PLUGINS = [
|
|
17
|
-
SERPER_DEFINITION,
|
|
18
|
-
TAVILY_DEFINITION,
|
|
19
|
-
BRAVE_DEFINITION,
|
|
20
|
-
DUCKDUCKGO_DEFINITION,
|
|
21
|
-
SEARXNG_DEFINITION,
|
|
22
|
-
];
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SearXNG Search Provider
|
|
3
|
-
*
|
|
4
|
-
* Self-hosted metasearch engine - complete privacy control.
|
|
5
|
-
* https://docs.searxng.org/
|
|
6
|
-
*/
|
|
7
|
-
import type { SearchPluginDefinition } from '../types.js';
|
|
8
|
-
export declare const SEARXNG_DEFINITION: SearchPluginDefinition;
|
|
9
|
-
//# sourceMappingURL=searxng.d.ts.map
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SearXNG Search Provider
|
|
3
|
-
*
|
|
4
|
-
* Self-hosted metasearch engine - complete privacy control.
|
|
5
|
-
* https://docs.searxng.org/
|
|
6
|
-
*/
|
|
7
|
-
class SearXNGProvider {
|
|
8
|
-
metadata = SEARXNG_DEFINITION.metadata;
|
|
9
|
-
baseUrl;
|
|
10
|
-
engines;
|
|
11
|
-
constructor(config) {
|
|
12
|
-
this.baseUrl = config.credentials?.baseUrl || 'http://localhost:8080';
|
|
13
|
-
this.engines = config.settings?.engines || [];
|
|
14
|
-
}
|
|
15
|
-
async search(query, options) {
|
|
16
|
-
if (!this.baseUrl) {
|
|
17
|
-
throw new Error('SearXNG base URL not configured');
|
|
18
|
-
}
|
|
19
|
-
const startTime = Date.now();
|
|
20
|
-
const params = new URLSearchParams({
|
|
21
|
-
q: query,
|
|
22
|
-
format: 'json',
|
|
23
|
-
});
|
|
24
|
-
if (options?.limit)
|
|
25
|
-
params.set('pageno', '1'); // SearXNG uses pagination
|
|
26
|
-
if (options?.language)
|
|
27
|
-
params.set('language', options.language);
|
|
28
|
-
if (options?.safeSearch)
|
|
29
|
-
params.set('safesearch', '2'); // 0=off, 1=moderate, 2=strict
|
|
30
|
-
if (this.engines.length > 0) {
|
|
31
|
-
params.set('engines', this.engines.join(','));
|
|
32
|
-
}
|
|
33
|
-
const url = `${this.baseUrl.replace(/\/$/, '')}/search?${params}`;
|
|
34
|
-
const response = await fetch(url, {
|
|
35
|
-
headers: {
|
|
36
|
-
'Accept': 'application/json',
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
if (!response.ok) {
|
|
40
|
-
const error = await response.text();
|
|
41
|
-
throw new Error(`SearXNG error: ${response.status} - ${error}`);
|
|
42
|
-
}
|
|
43
|
-
const data = await response.json();
|
|
44
|
-
const searchTime = Date.now() - startTime;
|
|
45
|
-
const limit = options?.limit || 10;
|
|
46
|
-
const results = (data.results || []).slice(0, limit).map((item) => ({
|
|
47
|
-
title: item.title,
|
|
48
|
-
url: item.url,
|
|
49
|
-
snippet: item.content || '',
|
|
50
|
-
source: 'searxng',
|
|
51
|
-
metadata: {
|
|
52
|
-
engine: item.engine,
|
|
53
|
-
engines: item.engines,
|
|
54
|
-
category: item.category,
|
|
55
|
-
score: item.score,
|
|
56
|
-
publishedDate: item.publishedDate,
|
|
57
|
-
},
|
|
58
|
-
}));
|
|
59
|
-
return {
|
|
60
|
-
results,
|
|
61
|
-
query: data.query || query,
|
|
62
|
-
totalResults: data.number_of_results,
|
|
63
|
-
searchTime,
|
|
64
|
-
provider: 'searxng',
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
async isAvailable() {
|
|
68
|
-
if (!this.baseUrl)
|
|
69
|
-
return false;
|
|
70
|
-
try {
|
|
71
|
-
const response = await fetch(`${this.baseUrl}/config`, {
|
|
72
|
-
signal: AbortSignal.timeout(5000),
|
|
73
|
-
});
|
|
74
|
-
return response.ok;
|
|
75
|
-
}
|
|
76
|
-
catch {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
async healthCheck() {
|
|
81
|
-
if (!this.baseUrl) {
|
|
82
|
-
return {
|
|
83
|
-
healthy: false,
|
|
84
|
-
lastCheck: new Date(),
|
|
85
|
-
errorMessage: 'Base URL not configured',
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
try {
|
|
89
|
-
const startTime = Date.now();
|
|
90
|
-
const response = await fetch(`${this.baseUrl}/config`, {
|
|
91
|
-
signal: AbortSignal.timeout(5000),
|
|
92
|
-
});
|
|
93
|
-
if (!response.ok) {
|
|
94
|
-
return {
|
|
95
|
-
healthy: false,
|
|
96
|
-
lastCheck: new Date(),
|
|
97
|
-
errorMessage: `SearXNG returned ${response.status}`,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
const latency = Date.now() - startTime;
|
|
101
|
-
return {
|
|
102
|
-
healthy: true,
|
|
103
|
-
lastCheck: new Date(),
|
|
104
|
-
latency,
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
catch (error) {
|
|
108
|
-
return {
|
|
109
|
-
healthy: false,
|
|
110
|
-
lastCheck: new Date(),
|
|
111
|
-
errorMessage: error instanceof Error ? error.message : 'Connection failed',
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
export const SEARXNG_DEFINITION = {
|
|
117
|
-
metadata: {
|
|
118
|
-
id: 'searxng',
|
|
119
|
-
name: 'SearXNG',
|
|
120
|
-
description: 'Self-hosted metasearch - 246+ sources, complete privacy',
|
|
121
|
-
category: 'search',
|
|
122
|
-
icon: 'server',
|
|
123
|
-
version: '1.0.0',
|
|
124
|
-
homepage: 'https://docs.searxng.org/',
|
|
125
|
-
pricing: {
|
|
126
|
-
type: 'free',
|
|
127
|
-
},
|
|
128
|
-
rateLimit: {
|
|
129
|
-
requestsPerSecond: 10, // Depends on your instance
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
settingsSchema: {
|
|
133
|
-
credentials: [
|
|
134
|
-
{
|
|
135
|
-
key: 'baseUrl',
|
|
136
|
-
type: 'url',
|
|
137
|
-
label: 'Instance URL',
|
|
138
|
-
description: 'URL of your SearXNG instance (e.g., http://localhost:8080)',
|
|
139
|
-
placeholder: 'http://localhost:8080',
|
|
140
|
-
required: true,
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
settings: [
|
|
144
|
-
{
|
|
145
|
-
key: 'engines',
|
|
146
|
-
type: 'text',
|
|
147
|
-
label: 'Engines',
|
|
148
|
-
description: 'Comma-separated list of engines to use (leave empty for all)',
|
|
149
|
-
placeholder: 'google,duckduckgo,bing',
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
key: 'safeSearch',
|
|
153
|
-
type: 'boolean',
|
|
154
|
-
label: 'Safe Search',
|
|
155
|
-
description: 'Enable strict safe search filtering',
|
|
156
|
-
default: true,
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
key: 'timeout',
|
|
160
|
-
type: 'number',
|
|
161
|
-
label: 'Timeout (seconds)',
|
|
162
|
-
description: 'Request timeout in seconds',
|
|
163
|
-
default: 10,
|
|
164
|
-
validation: { min: 1, max: 60 },
|
|
165
|
-
},
|
|
166
|
-
],
|
|
167
|
-
},
|
|
168
|
-
factory: (config) => new SearXNGProvider(config),
|
|
169
|
-
};
|
|
170
|
-
//# sourceMappingURL=searxng.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Serper Search Provider
|
|
3
|
-
*
|
|
4
|
-
* Fast and cost-effective Google Search API.
|
|
5
|
-
* https://serper.dev/
|
|
6
|
-
*/
|
|
7
|
-
import type { SearchPluginDefinition } from '../types.js';
|
|
8
|
-
export declare const SERPER_DEFINITION: SearchPluginDefinition;
|
|
9
|
-
//# sourceMappingURL=serper.d.ts.map
|