@wingman-ai/gateway 0.1.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/.wingman/agents/README.md +161 -0
- package/.wingman/agents/coding/agent.md +147 -0
- package/.wingman/agents/coding/implementor.md +56 -0
- package/.wingman/agents/main/agent.md +19 -0
- package/.wingman/agents/researcher/agent.md +62 -0
- package/.wingman/agents/stock-trader/agent.md +223 -0
- package/.wingman/agents/stock-trader/chain-curator.md +24 -0
- package/.wingman/agents/stock-trader/goal-translator.md +42 -0
- package/.wingman/agents/stock-trader/guardrails-veto.md +11 -0
- package/.wingman/agents/stock-trader/path-planner.md +23 -0
- package/.wingman/agents/stock-trader/regime-analyst.md +15 -0
- package/.wingman/agents/stock-trader/risk.md +20 -0
- package/.wingman/agents/stock-trader/selection.md +22 -0
- package/.wingman/agents/stock-trader/strategy-composer.md +38 -0
- package/.wingman/agents/wingman/agent.json +12 -0
- package/bin/wingman +7 -0
- package/dist/agent/config/agentConfig.cjs +95 -0
- package/dist/agent/config/agentConfig.d.ts +187 -0
- package/dist/agent/config/agentConfig.js +52 -0
- package/dist/agent/config/agentLoader.cjs +242 -0
- package/dist/agent/config/agentLoader.d.ts +42 -0
- package/dist/agent/config/agentLoader.js +208 -0
- package/dist/agent/config/mcpClientManager.cjs +168 -0
- package/dist/agent/config/mcpClientManager.d.ts +41 -0
- package/dist/agent/config/mcpClientManager.js +134 -0
- package/dist/agent/config/modelFactory.cjs +175 -0
- package/dist/agent/config/modelFactory.d.ts +33 -0
- package/dist/agent/config/modelFactory.js +141 -0
- package/dist/agent/config/toolRegistry.cjs +111 -0
- package/dist/agent/config/toolRegistry.d.ts +25 -0
- package/dist/agent/config/toolRegistry.js +71 -0
- package/dist/agent/middleware/additional-messages.cjs +60 -0
- package/dist/agent/middleware/additional-messages.d.ts +7 -0
- package/dist/agent/middleware/additional-messages.js +26 -0
- package/dist/agent/middleware/hooks/executor.cjs +137 -0
- package/dist/agent/middleware/hooks/executor.d.ts +52 -0
- package/dist/agent/middleware/hooks/executor.js +103 -0
- package/dist/agent/middleware/hooks/input-builder.cjs +55 -0
- package/dist/agent/middleware/hooks/input-builder.d.ts +15 -0
- package/dist/agent/middleware/hooks/input-builder.js +21 -0
- package/dist/agent/middleware/hooks/matcher.cjs +59 -0
- package/dist/agent/middleware/hooks/matcher.d.ts +27 -0
- package/dist/agent/middleware/hooks/matcher.js +22 -0
- package/dist/agent/middleware/hooks/merger.cjs +54 -0
- package/dist/agent/middleware/hooks/merger.d.ts +18 -0
- package/dist/agent/middleware/hooks/merger.js +20 -0
- package/dist/agent/middleware/hooks/types.cjs +62 -0
- package/dist/agent/middleware/hooks/types.d.ts +82 -0
- package/dist/agent/middleware/hooks/types.js +19 -0
- package/dist/agent/middleware/hooks.cjs +79 -0
- package/dist/agent/middleware/hooks.d.ts +19 -0
- package/dist/agent/middleware/hooks.js +45 -0
- package/dist/agent/middleware/media-compat.cjs +80 -0
- package/dist/agent/middleware/media-compat.d.ts +7 -0
- package/dist/agent/middleware/media-compat.js +46 -0
- package/dist/agent/tests/agentConfig.test.cjs +132 -0
- package/dist/agent/tests/agentConfig.test.d.ts +1 -0
- package/dist/agent/tests/agentConfig.test.js +126 -0
- package/dist/agent/tests/agentLoader.test.cjs +235 -0
- package/dist/agent/tests/agentLoader.test.d.ts +1 -0
- package/dist/agent/tests/agentLoader.test.js +229 -0
- package/dist/agent/tests/modelFactory.test.cjs +114 -0
- package/dist/agent/tests/modelFactory.test.d.ts +1 -0
- package/dist/agent/tests/modelFactory.test.js +108 -0
- package/dist/agent/tests/test-agent-loader.cjs +33 -0
- package/dist/agent/tests/test-agent-loader.d.ts +1 -0
- package/dist/agent/tests/test-agent-loader.js +27 -0
- package/dist/agent/tests/test-subagent-loading.cjs +99 -0
- package/dist/agent/tests/test-subagent-loading.d.ts +1 -0
- package/dist/agent/tests/test-subagent-loading.js +93 -0
- package/dist/agent/tests/toolRegistry.test.cjs +109 -0
- package/dist/agent/tests/toolRegistry.test.d.ts +1 -0
- package/dist/agent/tests/toolRegistry.test.js +103 -0
- package/dist/agent/tools/code_search.cjs +108 -0
- package/dist/agent/tools/code_search.d.ts +24 -0
- package/dist/agent/tools/code_search.js +74 -0
- package/dist/agent/tools/command_execute.cjs +136 -0
- package/dist/agent/tools/command_execute.d.ts +12 -0
- package/dist/agent/tools/command_execute.js +99 -0
- package/dist/agent/tools/git_status.cjs +126 -0
- package/dist/agent/tools/git_status.d.ts +15 -0
- package/dist/agent/tools/git_status.js +92 -0
- package/dist/agent/tools/internet_search.cjs +93 -0
- package/dist/agent/tools/internet_search.d.ts +25 -0
- package/dist/agent/tools/internet_search.js +56 -0
- package/dist/agent/tools/think.cjs +53 -0
- package/dist/agent/tools/think.d.ts +26 -0
- package/dist/agent/tools/think.js +16 -0
- package/dist/agent/tools/web_crawler.cjs +180 -0
- package/dist/agent/tools/web_crawler.d.ts +31 -0
- package/dist/agent/tools/web_crawler.js +143 -0
- package/dist/agent/utils.cjs +54 -0
- package/dist/agent/utils.d.ts +1 -0
- package/dist/agent/utils.js +10 -0
- package/dist/cli/commands/agent.cjs +169 -0
- package/dist/cli/commands/agent.d.ts +15 -0
- package/dist/cli/commands/agent.js +125 -0
- package/dist/cli/commands/gateway.cjs +601 -0
- package/dist/cli/commands/gateway.d.ts +12 -0
- package/dist/cli/commands/gateway.js +567 -0
- package/dist/cli/commands/init.cjs +681 -0
- package/dist/cli/commands/init.d.ts +10 -0
- package/dist/cli/commands/init.js +634 -0
- package/dist/cli/commands/provider.cjs +208 -0
- package/dist/cli/commands/provider.d.ts +5 -0
- package/dist/cli/commands/provider.js +174 -0
- package/dist/cli/commands/skill.cjs +145 -0
- package/dist/cli/commands/skill.d.ts +10 -0
- package/dist/cli/commands/skill.js +111 -0
- package/dist/cli/config/loader.cjs +143 -0
- package/dist/cli/config/loader.d.ts +14 -0
- package/dist/cli/config/loader.js +109 -0
- package/dist/cli/config/schema.cjs +262 -0
- package/dist/cli/config/schema.d.ts +268 -0
- package/dist/cli/config/schema.js +213 -0
- package/dist/cli/core/agentInvoker.cjs +284 -0
- package/dist/cli/core/agentInvoker.d.ts +77 -0
- package/dist/cli/core/agentInvoker.js +247 -0
- package/dist/cli/core/commandHandler.cjs +257 -0
- package/dist/cli/core/commandHandler.d.ts +62 -0
- package/dist/cli/core/commandHandler.js +223 -0
- package/dist/cli/core/database/bunSqliteAdapter.cjs +87 -0
- package/dist/cli/core/database/bunSqliteAdapter.d.ts +34 -0
- package/dist/cli/core/database/bunSqliteAdapter.js +53 -0
- package/dist/cli/core/loggerBridge.cjs +42 -0
- package/dist/cli/core/loggerBridge.d.ts +8 -0
- package/dist/cli/core/loggerBridge.js +8 -0
- package/dist/cli/core/outputManager.cjs +106 -0
- package/dist/cli/core/outputManager.d.ts +43 -0
- package/dist/cli/core/outputManager.js +72 -0
- package/dist/cli/core/sessionManager.cjs +535 -0
- package/dist/cli/core/sessionManager.d.ts +111 -0
- package/dist/cli/core/sessionManager.js +486 -0
- package/dist/cli/core/streamParser.cjs +328 -0
- package/dist/cli/core/streamParser.d.ts +42 -0
- package/dist/cli/core/streamParser.js +288 -0
- package/dist/cli/index.cjs +211 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +205 -0
- package/dist/cli/services/skillRepository.cjs +178 -0
- package/dist/cli/services/skillRepository.d.ts +35 -0
- package/dist/cli/services/skillRepository.js +144 -0
- package/dist/cli/services/skillService.cjs +336 -0
- package/dist/cli/services/skillService.d.ts +48 -0
- package/dist/cli/services/skillService.js +302 -0
- package/dist/cli/types/gateway.cjs +18 -0
- package/dist/cli/types/gateway.d.ts +18 -0
- package/dist/cli/types/gateway.js +0 -0
- package/dist/cli/types/init.cjs +18 -0
- package/dist/cli/types/init.d.ts +13 -0
- package/dist/cli/types/init.js +0 -0
- package/dist/cli/types/provider.cjs +18 -0
- package/dist/cli/types/provider.d.ts +9 -0
- package/dist/cli/types/provider.js +0 -0
- package/dist/cli/types/skill.cjs +18 -0
- package/dist/cli/types/skill.d.ts +71 -0
- package/dist/cli/types/skill.js +0 -0
- package/dist/cli/types.cjs +18 -0
- package/dist/cli/types.d.ts +175 -0
- package/dist/cli/types.js +0 -0
- package/dist/cli/ui/AgentOutput.cjs +82 -0
- package/dist/cli/ui/AgentOutput.d.ts +8 -0
- package/dist/cli/ui/AgentOutput.js +38 -0
- package/dist/cli/ui/App.cjs +285 -0
- package/dist/cli/ui/App.d.ts +6 -0
- package/dist/cli/ui/App.js +241 -0
- package/dist/cli/ui/ErrorDisplay.cjs +65 -0
- package/dist/cli/ui/ErrorDisplay.d.ts +8 -0
- package/dist/cli/ui/ErrorDisplay.js +21 -0
- package/dist/cli/ui/LogDisplay.cjs +74 -0
- package/dist/cli/ui/LogDisplay.d.ts +13 -0
- package/dist/cli/ui/LogDisplay.js +30 -0
- package/dist/cli/ui/SessionListDisplay.cjs +135 -0
- package/dist/cli/ui/SessionListDisplay.d.ts +9 -0
- package/dist/cli/ui/SessionListDisplay.js +91 -0
- package/dist/cli/ui/blockHelpers.cjs +80 -0
- package/dist/cli/ui/blockHelpers.d.ts +21 -0
- package/dist/cli/ui/blockHelpers.js +40 -0
- package/dist/cli/ui/components/ToolCallDisplay.cjs +207 -0
- package/dist/cli/ui/components/ToolCallDisplay.d.ts +7 -0
- package/dist/cli/ui/components/ToolCallDisplay.js +162 -0
- package/dist/cli/ui/components/ToolResultDisplay.cjs +86 -0
- package/dist/cli/ui/components/ToolResultDisplay.d.ts +8 -0
- package/dist/cli/ui/components/ToolResultDisplay.js +42 -0
- package/dist/cli/ui/toolDisplayHelpers.cjs +112 -0
- package/dist/cli/ui/toolDisplayHelpers.d.ts +3 -0
- package/dist/cli/ui/toolDisplayHelpers.js +72 -0
- package/dist/gateway/adapters/discord.cjs +298 -0
- package/dist/gateway/adapters/discord.d.ts +42 -0
- package/dist/gateway/adapters/discord.js +246 -0
- package/dist/gateway/auth.cjs +94 -0
- package/dist/gateway/auth.d.ts +36 -0
- package/dist/gateway/auth.js +60 -0
- package/dist/gateway/broadcast.cjs +131 -0
- package/dist/gateway/broadcast.d.ts +76 -0
- package/dist/gateway/broadcast.js +97 -0
- package/dist/gateway/client.cjs +282 -0
- package/dist/gateway/client.d.ts +141 -0
- package/dist/gateway/client.js +248 -0
- package/dist/gateway/daemon.cjs +195 -0
- package/dist/gateway/daemon.d.ts +67 -0
- package/dist/gateway/daemon.js +161 -0
- package/dist/gateway/discovery/index.cjs +72 -0
- package/dist/gateway/discovery/index.d.ts +3 -0
- package/dist/gateway/discovery/index.js +3 -0
- package/dist/gateway/discovery/mdns.cjs +221 -0
- package/dist/gateway/discovery/mdns.d.ts +37 -0
- package/dist/gateway/discovery/mdns.js +177 -0
- package/dist/gateway/discovery/tailscale.cjs +140 -0
- package/dist/gateway/discovery/tailscale.d.ts +31 -0
- package/dist/gateway/discovery/tailscale.js +106 -0
- package/dist/gateway/discovery/types.cjs +18 -0
- package/dist/gateway/discovery/types.d.ts +41 -0
- package/dist/gateway/discovery/types.js +0 -0
- package/dist/gateway/env.cjs +45 -0
- package/dist/gateway/env.d.ts +2 -0
- package/dist/gateway/env.js +8 -0
- package/dist/gateway/hooks/loader.cjs +137 -0
- package/dist/gateway/hooks/loader.d.ts +10 -0
- package/dist/gateway/hooks/loader.js +103 -0
- package/dist/gateway/hooks/registry.cjs +128 -0
- package/dist/gateway/hooks/registry.d.ts +13 -0
- package/dist/gateway/hooks/registry.js +94 -0
- package/dist/gateway/hooks/types.cjs +58 -0
- package/dist/gateway/hooks/types.d.ts +50 -0
- package/dist/gateway/hooks/types.js +18 -0
- package/dist/gateway/http/agents.cjs +280 -0
- package/dist/gateway/http/agents.d.ts +2 -0
- package/dist/gateway/http/agents.js +246 -0
- package/dist/gateway/http/fs.cjs +81 -0
- package/dist/gateway/http/fs.d.ts +2 -0
- package/dist/gateway/http/fs.js +47 -0
- package/dist/gateway/http/providers.cjs +120 -0
- package/dist/gateway/http/providers.d.ts +2 -0
- package/dist/gateway/http/providers.js +86 -0
- package/dist/gateway/http/routines.cjs +196 -0
- package/dist/gateway/http/routines.d.ts +20 -0
- package/dist/gateway/http/routines.js +159 -0
- package/dist/gateway/http/sessions.cjs +241 -0
- package/dist/gateway/http/sessions.d.ts +2 -0
- package/dist/gateway/http/sessions.js +207 -0
- package/dist/gateway/http/types.cjs +18 -0
- package/dist/gateway/http/types.d.ts +25 -0
- package/dist/gateway/http/types.js +0 -0
- package/dist/gateway/http/voice.cjs +167 -0
- package/dist/gateway/http/voice.d.ts +2 -0
- package/dist/gateway/http/voice.js +133 -0
- package/dist/gateway/http/webhooks.cjs +353 -0
- package/dist/gateway/http/webhooks.d.ts +22 -0
- package/dist/gateway/http/webhooks.js +313 -0
- package/dist/gateway/index.cjs +119 -0
- package/dist/gateway/index.d.ts +8 -0
- package/dist/gateway/index.js +9 -0
- package/dist/gateway/node.cjs +218 -0
- package/dist/gateway/node.d.ts +112 -0
- package/dist/gateway/node.js +184 -0
- package/dist/gateway/router.cjs +85 -0
- package/dist/gateway/router.d.ts +9 -0
- package/dist/gateway/router.js +51 -0
- package/dist/gateway/rpcClient.cjs +152 -0
- package/dist/gateway/rpcClient.d.ts +24 -0
- package/dist/gateway/rpcClient.js +118 -0
- package/dist/gateway/server.cjs +1175 -0
- package/dist/gateway/server.d.ts +185 -0
- package/dist/gateway/server.js +1138 -0
- package/dist/gateway/transport/http.cjs +153 -0
- package/dist/gateway/transport/http.d.ts +25 -0
- package/dist/gateway/transport/http.js +119 -0
- package/dist/gateway/transport/index.cjs +40 -0
- package/dist/gateway/transport/index.d.ts +3 -0
- package/dist/gateway/transport/index.js +3 -0
- package/dist/gateway/transport/types.cjs +18 -0
- package/dist/gateway/transport/types.d.ts +59 -0
- package/dist/gateway/transport/types.js +0 -0
- package/dist/gateway/transport/websocket.cjs +132 -0
- package/dist/gateway/transport/websocket.d.ts +21 -0
- package/dist/gateway/transport/websocket.js +98 -0
- package/dist/gateway/types.cjs +18 -0
- package/dist/gateway/types.d.ts +215 -0
- package/dist/gateway/types.js +0 -0
- package/dist/gateway/validation.cjs +225 -0
- package/dist/gateway/validation.d.ts +157 -0
- package/dist/gateway/validation.js +158 -0
- package/dist/index.cjs +95 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/logger.cjs +270 -0
- package/dist/logger.d.ts +54 -0
- package/dist/logger.js +215 -0
- package/dist/providers/copilot.cjs +148 -0
- package/dist/providers/copilot.d.ts +3 -0
- package/dist/providers/copilot.js +114 -0
- package/dist/providers/credentials.cjs +154 -0
- package/dist/providers/credentials.d.ts +26 -0
- package/dist/providers/credentials.js +99 -0
- package/dist/providers/oauth.cjs +279 -0
- package/dist/providers/oauth.d.ts +13 -0
- package/dist/providers/oauth.js +245 -0
- package/dist/providers/registry.cjs +138 -0
- package/dist/providers/registry.d.ts +32 -0
- package/dist/providers/registry.js +98 -0
- package/dist/tests/additionalMessageMiddleware.test.cjs +45 -0
- package/dist/tests/additionalMessageMiddleware.test.d.ts +1 -0
- package/dist/tests/additionalMessageMiddleware.test.js +39 -0
- package/dist/tests/agent-config-voice.test.cjs +25 -0
- package/dist/tests/agent-config-voice.test.d.ts +1 -0
- package/dist/tests/agent-config-voice.test.js +19 -0
- package/dist/tests/agentInvokerAttachments.test.cjs +67 -0
- package/dist/tests/agentInvokerAttachments.test.d.ts +1 -0
- package/dist/tests/agentInvokerAttachments.test.js +61 -0
- package/dist/tests/attachments-utils.test.cjs +46 -0
- package/dist/tests/attachments-utils.test.d.ts +1 -0
- package/dist/tests/attachments-utils.test.js +40 -0
- package/dist/tests/bunSqliteAdapter.test.cjs +265 -0
- package/dist/tests/bunSqliteAdapter.test.d.ts +1 -0
- package/dist/tests/bunSqliteAdapter.test.js +259 -0
- package/dist/tests/candleRange.test.cjs +48 -0
- package/dist/tests/candleRange.test.d.ts +1 -0
- package/dist/tests/candleRange.test.js +42 -0
- package/dist/tests/cli-config-loader.test.cjs +364 -0
- package/dist/tests/cli-config-loader.test.d.ts +1 -0
- package/dist/tests/cli-config-loader.test.js +358 -0
- package/dist/tests/cli-init.test.cjs +82 -0
- package/dist/tests/cli-init.test.d.ts +1 -0
- package/dist/tests/cli-init.test.js +76 -0
- package/dist/tests/discord-adapter.test.cjs +55 -0
- package/dist/tests/discord-adapter.test.d.ts +1 -0
- package/dist/tests/discord-adapter.test.js +49 -0
- package/dist/tests/gateway.test.cjs +319 -0
- package/dist/tests/gateway.test.d.ts +1 -0
- package/dist/tests/gateway.test.js +313 -0
- package/dist/tests/hooks-matcher.test.cjs +309 -0
- package/dist/tests/hooks-matcher.test.d.ts +1 -0
- package/dist/tests/hooks-matcher.test.js +303 -0
- package/dist/tests/hooks-merger.test.cjs +528 -0
- package/dist/tests/hooks-merger.test.d.ts +1 -0
- package/dist/tests/hooks-merger.test.js +522 -0
- package/dist/tests/integration/agent-invocation.integration.test.cjs +264 -0
- package/dist/tests/integration/agent-invocation.integration.test.d.ts +1 -0
- package/dist/tests/integration/agent-invocation.integration.test.js +258 -0
- package/dist/tests/integration/finnhub-candles.integration.test.cjs +98 -0
- package/dist/tests/integration/finnhub-candles.integration.test.d.ts +1 -0
- package/dist/tests/integration/finnhub-candles.integration.test.js +92 -0
- package/dist/tests/logger.test.cjs +353 -0
- package/dist/tests/logger.test.d.ts +1 -0
- package/dist/tests/logger.test.js +347 -0
- package/dist/tests/mediaCompatibilityMiddleware.test.cjs +106 -0
- package/dist/tests/mediaCompatibilityMiddleware.test.d.ts +1 -0
- package/dist/tests/mediaCompatibilityMiddleware.test.js +100 -0
- package/dist/tests/routines-api.test.cjs +107 -0
- package/dist/tests/routines-api.test.d.ts +1 -0
- package/dist/tests/routines-api.test.js +101 -0
- package/dist/tests/sessionMessageAttachments.test.cjs +108 -0
- package/dist/tests/sessionMessageAttachments.test.d.ts +1 -0
- package/dist/tests/sessionMessageAttachments.test.js +102 -0
- package/dist/tests/sessionMessageRole.test.cjs +44 -0
- package/dist/tests/sessionMessageRole.test.d.ts +1 -0
- package/dist/tests/sessionMessageRole.test.js +38 -0
- package/dist/tests/sessionStateMessages.test.cjs +72 -0
- package/dist/tests/sessionStateMessages.test.d.ts +1 -0
- package/dist/tests/sessionStateMessages.test.js +66 -0
- package/dist/tests/sessions-api.test.cjs +68 -0
- package/dist/tests/sessions-api.test.d.ts +1 -0
- package/dist/tests/sessions-api.test.js +62 -0
- package/dist/tests/technicalIndicators.test.cjs +82 -0
- package/dist/tests/technicalIndicators.test.d.ts +1 -0
- package/dist/tests/technicalIndicators.test.js +76 -0
- package/dist/tests/toolDisplayHelpers.test.cjs +43 -0
- package/dist/tests/toolDisplayHelpers.test.d.ts +1 -0
- package/dist/tests/toolDisplayHelpers.test.js +37 -0
- package/dist/tests/voice-config.test.cjs +35 -0
- package/dist/tests/voice-config.test.d.ts +1 -0
- package/dist/tests/voice-config.test.js +29 -0
- package/dist/tests/yahooCandles.test.cjs +111 -0
- package/dist/tests/yahooCandles.test.d.ts +1 -0
- package/dist/tests/yahooCandles.test.js +105 -0
- package/dist/tools/finance/candleRange.cjs +71 -0
- package/dist/tools/finance/candleRange.d.ts +21 -0
- package/dist/tools/finance/candleRange.js +28 -0
- package/dist/tools/finance/optionsAnalytics.cjs +222 -0
- package/dist/tools/finance/optionsAnalytics.d.ts +44 -0
- package/dist/tools/finance/optionsAnalytics.js +188 -0
- package/dist/tools/finance/optionsAnalytics.test.cjs +128 -0
- package/dist/tools/finance/optionsAnalytics.test.d.ts +1 -0
- package/dist/tools/finance/optionsAnalytics.test.js +122 -0
- package/dist/tools/finance/technicalIndicators.cjs +111 -0
- package/dist/tools/finance/technicalIndicators.d.ts +15 -0
- package/dist/tools/finance/technicalIndicators.js +68 -0
- package/dist/tools/finance/yahooCandles.cjs +125 -0
- package/dist/tools/finance/yahooCandles.d.ts +41 -0
- package/dist/tools/finance/yahooCandles.js +85 -0
- package/dist/tools/mcp-finance.cjs +649 -0
- package/dist/tools/mcp-finance.d.ts +1 -0
- package/dist/tools/mcp-finance.js +631 -0
- package/dist/types/agents.cjs +18 -0
- package/dist/types/agents.d.ts +11 -0
- package/dist/types/agents.js +0 -0
- package/dist/types/hooks.cjs +18 -0
- package/dist/types/hooks.d.ts +82 -0
- package/dist/types/hooks.js +0 -0
- package/dist/types/mcp.cjs +86 -0
- package/dist/types/mcp.d.ts +107 -0
- package/dist/types/mcp.js +40 -0
- package/dist/types/voice.cjs +103 -0
- package/dist/types/voice.d.ts +117 -0
- package/dist/types/voice.js +51 -0
- package/dist/utils/attachments.cjs +46 -0
- package/dist/utils/attachments.d.ts +7 -0
- package/dist/utils/attachments.js +12 -0
- package/dist/voice/config.cjs +52 -0
- package/dist/voice/config.d.ts +8 -0
- package/dist/voice/config.js +18 -0
- package/dist/webui/assets/index-BA0HaStz.css +1 -0
- package/dist/webui/assets/index-NHgTZsWN.js +112 -0
- package/dist/webui/assets/wingman_icon-DOy91UEF.webp +0 -0
- package/dist/webui/assets/wingman_logo-Cogyt3qm.webp +0 -0
- package/dist/webui/index.html +19 -0
- package/package.json +130 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
createGitStatusTool: ()=>createGitStatusTool
|
|
28
|
+
});
|
|
29
|
+
const external_langchain_namespaceObject = require("langchain");
|
|
30
|
+
const external_zod_namespaceObject = require("zod");
|
|
31
|
+
const external_node_child_process_namespaceObject = require("node:child_process");
|
|
32
|
+
const createGitStatusTool = (workspace)=>(0, external_langchain_namespaceObject.tool)(async ({ includeDiff = false, includeStaged = false })=>new Promise((resolve)=>{
|
|
33
|
+
try {
|
|
34
|
+
const statusProc = (0, external_node_child_process_namespaceObject.spawn)("git", [
|
|
35
|
+
"status",
|
|
36
|
+
"--porcelain"
|
|
37
|
+
], {
|
|
38
|
+
cwd: workspace,
|
|
39
|
+
shell: false
|
|
40
|
+
});
|
|
41
|
+
let output = "";
|
|
42
|
+
let errorOutput = "";
|
|
43
|
+
statusProc.stdout.on("data", (data)=>{
|
|
44
|
+
output += data.toString();
|
|
45
|
+
});
|
|
46
|
+
statusProc.stderr.on("data", (data)=>{
|
|
47
|
+
errorOutput += data.toString();
|
|
48
|
+
});
|
|
49
|
+
statusProc.on("close", async (code)=>{
|
|
50
|
+
if (0 !== code) return void resolve(`Error getting git status: ${errorOutput || "Not a git repository or git not available"}`);
|
|
51
|
+
let result = "# Git Status\n\n";
|
|
52
|
+
if (output.trim()) {
|
|
53
|
+
result += "## Changed Files\n\n";
|
|
54
|
+
result += output;
|
|
55
|
+
result += "\n";
|
|
56
|
+
} else result += "Working directory clean - no uncommitted changes\n";
|
|
57
|
+
const branchProc = (0, external_node_child_process_namespaceObject.spawn)("git", [
|
|
58
|
+
"branch",
|
|
59
|
+
"--show-current"
|
|
60
|
+
], {
|
|
61
|
+
cwd: workspace,
|
|
62
|
+
shell: false
|
|
63
|
+
});
|
|
64
|
+
let branchOutput = "";
|
|
65
|
+
branchProc.stdout.on("data", (data)=>{
|
|
66
|
+
branchOutput += data.toString();
|
|
67
|
+
});
|
|
68
|
+
branchProc.on("close", async ()=>{
|
|
69
|
+
if (branchOutput.trim()) result += `\n## Current Branch\n${branchOutput.trim()}\n`;
|
|
70
|
+
if (includeDiff && output.trim()) {
|
|
71
|
+
const diffProc = (0, external_node_child_process_namespaceObject.spawn)("git", [
|
|
72
|
+
"diff",
|
|
73
|
+
"--stat"
|
|
74
|
+
], {
|
|
75
|
+
cwd: workspace,
|
|
76
|
+
shell: false
|
|
77
|
+
});
|
|
78
|
+
let diffOutput = "";
|
|
79
|
+
diffProc.stdout.on("data", (data)=>{
|
|
80
|
+
diffOutput += data.toString();
|
|
81
|
+
});
|
|
82
|
+
diffProc.on("close", ()=>{
|
|
83
|
+
if (diffOutput.trim()) result += `\n## Diff Summary\n${diffOutput}\n`;
|
|
84
|
+
resolve(result);
|
|
85
|
+
});
|
|
86
|
+
} else if (includeStaged && output.trim()) {
|
|
87
|
+
const stagedProc = (0, external_node_child_process_namespaceObject.spawn)("git", [
|
|
88
|
+
"diff",
|
|
89
|
+
"--cached",
|
|
90
|
+
"--stat"
|
|
91
|
+
], {
|
|
92
|
+
cwd: workspace,
|
|
93
|
+
shell: false
|
|
94
|
+
});
|
|
95
|
+
let stagedOutput = "";
|
|
96
|
+
stagedProc.stdout.on("data", (data)=>{
|
|
97
|
+
stagedOutput += data.toString();
|
|
98
|
+
});
|
|
99
|
+
stagedProc.on("close", ()=>{
|
|
100
|
+
if (stagedOutput.trim()) result += `\n## Staged Changes\n${stagedOutput}\n`;
|
|
101
|
+
resolve(result);
|
|
102
|
+
});
|
|
103
|
+
} else resolve(result);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
statusProc.on("error", (err)=>{
|
|
107
|
+
resolve(`Failed to execute git: ${err.message}`);
|
|
108
|
+
});
|
|
109
|
+
} catch (error) {
|
|
110
|
+
resolve(`Error getting git status: ${error}`);
|
|
111
|
+
}
|
|
112
|
+
}), {
|
|
113
|
+
name: "git_status",
|
|
114
|
+
description: "Get current git repository status including uncommitted changes, current branch, and optionally diff statistics. Read-only operation that helps understand the state before making changes.",
|
|
115
|
+
schema: external_zod_namespaceObject.z.object({
|
|
116
|
+
includeDiff: external_zod_namespaceObject.z.boolean().optional().default(false).describe("Optional: Include summary of unstaged changes (diff --stat). Useful for understanding what has changed."),
|
|
117
|
+
includeStaged: external_zod_namespaceObject.z.boolean().optional().default(false).describe("Optional: Include summary of staged changes (diff --cached --stat). Shows what will be committed.")
|
|
118
|
+
})
|
|
119
|
+
});
|
|
120
|
+
exports.createGitStatusTool = __webpack_exports__.createGitStatusTool;
|
|
121
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
122
|
+
"createGitStatusTool"
|
|
123
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
124
|
+
Object.defineProperty(exports, '__esModule', {
|
|
125
|
+
value: true
|
|
126
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a tool that gets git repository status (read-only)
|
|
4
|
+
* Helps agents understand the current state without making modifications
|
|
5
|
+
*/
|
|
6
|
+
export declare const createGitStatusTool: (workspace: string) => import("langchain").DynamicStructuredTool<z.ZodObject<{
|
|
7
|
+
includeDiff: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
8
|
+
includeStaged: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
9
|
+
}, z.core.$strip>, {
|
|
10
|
+
includeDiff?: boolean;
|
|
11
|
+
includeStaged?: boolean;
|
|
12
|
+
}, {
|
|
13
|
+
includeDiff?: boolean | undefined;
|
|
14
|
+
includeStaged?: boolean | undefined;
|
|
15
|
+
}, string, "git_status">;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { tool } from "langchain";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { spawn } from "node:child_process";
|
|
4
|
+
const createGitStatusTool = (workspace)=>tool(async ({ includeDiff = false, includeStaged = false })=>new Promise((resolve)=>{
|
|
5
|
+
try {
|
|
6
|
+
const statusProc = spawn("git", [
|
|
7
|
+
"status",
|
|
8
|
+
"--porcelain"
|
|
9
|
+
], {
|
|
10
|
+
cwd: workspace,
|
|
11
|
+
shell: false
|
|
12
|
+
});
|
|
13
|
+
let output = "";
|
|
14
|
+
let errorOutput = "";
|
|
15
|
+
statusProc.stdout.on("data", (data)=>{
|
|
16
|
+
output += data.toString();
|
|
17
|
+
});
|
|
18
|
+
statusProc.stderr.on("data", (data)=>{
|
|
19
|
+
errorOutput += data.toString();
|
|
20
|
+
});
|
|
21
|
+
statusProc.on("close", async (code)=>{
|
|
22
|
+
if (0 !== code) return void resolve(`Error getting git status: ${errorOutput || "Not a git repository or git not available"}`);
|
|
23
|
+
let result = "# Git Status\n\n";
|
|
24
|
+
if (output.trim()) {
|
|
25
|
+
result += "## Changed Files\n\n";
|
|
26
|
+
result += output;
|
|
27
|
+
result += "\n";
|
|
28
|
+
} else result += "Working directory clean - no uncommitted changes\n";
|
|
29
|
+
const branchProc = spawn("git", [
|
|
30
|
+
"branch",
|
|
31
|
+
"--show-current"
|
|
32
|
+
], {
|
|
33
|
+
cwd: workspace,
|
|
34
|
+
shell: false
|
|
35
|
+
});
|
|
36
|
+
let branchOutput = "";
|
|
37
|
+
branchProc.stdout.on("data", (data)=>{
|
|
38
|
+
branchOutput += data.toString();
|
|
39
|
+
});
|
|
40
|
+
branchProc.on("close", async ()=>{
|
|
41
|
+
if (branchOutput.trim()) result += `\n## Current Branch\n${branchOutput.trim()}\n`;
|
|
42
|
+
if (includeDiff && output.trim()) {
|
|
43
|
+
const diffProc = spawn("git", [
|
|
44
|
+
"diff",
|
|
45
|
+
"--stat"
|
|
46
|
+
], {
|
|
47
|
+
cwd: workspace,
|
|
48
|
+
shell: false
|
|
49
|
+
});
|
|
50
|
+
let diffOutput = "";
|
|
51
|
+
diffProc.stdout.on("data", (data)=>{
|
|
52
|
+
diffOutput += data.toString();
|
|
53
|
+
});
|
|
54
|
+
diffProc.on("close", ()=>{
|
|
55
|
+
if (diffOutput.trim()) result += `\n## Diff Summary\n${diffOutput}\n`;
|
|
56
|
+
resolve(result);
|
|
57
|
+
});
|
|
58
|
+
} else if (includeStaged && output.trim()) {
|
|
59
|
+
const stagedProc = spawn("git", [
|
|
60
|
+
"diff",
|
|
61
|
+
"--cached",
|
|
62
|
+
"--stat"
|
|
63
|
+
], {
|
|
64
|
+
cwd: workspace,
|
|
65
|
+
shell: false
|
|
66
|
+
});
|
|
67
|
+
let stagedOutput = "";
|
|
68
|
+
stagedProc.stdout.on("data", (data)=>{
|
|
69
|
+
stagedOutput += data.toString();
|
|
70
|
+
});
|
|
71
|
+
stagedProc.on("close", ()=>{
|
|
72
|
+
if (stagedOutput.trim()) result += `\n## Staged Changes\n${stagedOutput}\n`;
|
|
73
|
+
resolve(result);
|
|
74
|
+
});
|
|
75
|
+
} else resolve(result);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
statusProc.on("error", (err)=>{
|
|
79
|
+
resolve(`Failed to execute git: ${err.message}`);
|
|
80
|
+
});
|
|
81
|
+
} catch (error) {
|
|
82
|
+
resolve(`Error getting git status: ${error}`);
|
|
83
|
+
}
|
|
84
|
+
}), {
|
|
85
|
+
name: "git_status",
|
|
86
|
+
description: "Get current git repository status including uncommitted changes, current branch, and optionally diff statistics. Read-only operation that helps understand the state before making changes.",
|
|
87
|
+
schema: z.object({
|
|
88
|
+
includeDiff: z.boolean().optional().default(false).describe("Optional: Include summary of unstaged changes (diff --stat). Useful for understanding what has changed."),
|
|
89
|
+
includeStaged: z.boolean().optional().default(false).describe("Optional: Include summary of staged changes (diff --cached --stat). Shows what will be committed.")
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
export { createGitStatusTool };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
createInternetSearchTool: ()=>createInternetSearchTool,
|
|
28
|
+
internetSearch: ()=>internetSearch
|
|
29
|
+
});
|
|
30
|
+
const external_langchain_namespaceObject = require("langchain");
|
|
31
|
+
const duckduckgo_search_namespaceObject = require("@langchain/community/tools/duckduckgo_search");
|
|
32
|
+
const openai_namespaceObject = require("@langchain/openai");
|
|
33
|
+
const external_zod_namespaceObject = require("zod");
|
|
34
|
+
function createDuckDuckGoTool(maxResults) {
|
|
35
|
+
return (0, external_langchain_namespaceObject.tool)(async ({ query, maxResults: queryMaxResults })=>{
|
|
36
|
+
const search = new duckduckgo_search_namespaceObject.DuckDuckGoSearch({
|
|
37
|
+
maxResults: queryMaxResults ?? maxResults
|
|
38
|
+
});
|
|
39
|
+
return await search._call(query);
|
|
40
|
+
}, {
|
|
41
|
+
name: "internet_search",
|
|
42
|
+
description: "Run a web search using DuckDuckGo",
|
|
43
|
+
schema: external_zod_namespaceObject.z.object({
|
|
44
|
+
query: external_zod_namespaceObject.z.string().describe("The search query"),
|
|
45
|
+
maxResults: external_zod_namespaceObject.z.number().optional().default(maxResults).describe("Maximum number of results to return")
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function createPerplexityTool(maxResults) {
|
|
50
|
+
if (!process.env.OPENROUTER_API_KEY) throw new Error("Perplexity search requires OPENROUTER_API_KEY environment variable. Get your key at https://openrouter.ai/ or switch to DuckDuckGo in wingman.config.json");
|
|
51
|
+
const model = new openai_namespaceObject.ChatOpenAI({
|
|
52
|
+
model: "perplexity/sonar",
|
|
53
|
+
temperature: 1,
|
|
54
|
+
configuration: {
|
|
55
|
+
baseURL: "https://openrouter.ai/api/v1",
|
|
56
|
+
apiKey: process.env.OPENROUTER_API_KEY
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
return (0, external_langchain_namespaceObject.tool)(async ({ query, maxResults: queryMaxResults })=>{
|
|
60
|
+
const limit = queryMaxResults ?? maxResults;
|
|
61
|
+
const prompt = `Search for: ${query}\n\nProvide up to ${limit} relevant results with citations.`;
|
|
62
|
+
const response = await model.invoke(prompt);
|
|
63
|
+
return response.content;
|
|
64
|
+
}, {
|
|
65
|
+
name: "internet_search",
|
|
66
|
+
description: "Run a web search using Perplexity Sonar with built-in citations",
|
|
67
|
+
schema: external_zod_namespaceObject.z.object({
|
|
68
|
+
query: external_zod_namespaceObject.z.string().describe("The search query"),
|
|
69
|
+
maxResults: external_zod_namespaceObject.z.number().optional().default(maxResults).describe("Maximum number of results to return")
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function createInternetSearchTool(config) {
|
|
74
|
+
const { provider, maxResults = 5 } = config;
|
|
75
|
+
switch(provider){
|
|
76
|
+
case "duckduckgo":
|
|
77
|
+
return createDuckDuckGoTool(maxResults);
|
|
78
|
+
case "perplexity":
|
|
79
|
+
return createPerplexityTool(maxResults);
|
|
80
|
+
default:
|
|
81
|
+
throw new Error(`Unknown search provider: ${provider}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const internetSearch = createDuckDuckGoTool(5);
|
|
85
|
+
exports.createInternetSearchTool = __webpack_exports__.createInternetSearchTool;
|
|
86
|
+
exports.internetSearch = __webpack_exports__.internetSearch;
|
|
87
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
88
|
+
"createInternetSearchTool",
|
|
89
|
+
"internetSearch"
|
|
90
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
91
|
+
Object.defineProperty(exports, '__esModule', {
|
|
92
|
+
value: true
|
|
93
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { SearchConfig } from "../../cli/config/schema.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create an internet search tool based on configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare function createInternetSearchTool(config: SearchConfig): import("langchain").DynamicStructuredTool<z.ZodObject<{
|
|
7
|
+
query: z.ZodString;
|
|
8
|
+
maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
9
|
+
}, z.core.$strip>, {
|
|
10
|
+
query: string;
|
|
11
|
+
maxResults?: number;
|
|
12
|
+
}, {
|
|
13
|
+
query: string;
|
|
14
|
+
maxResults?: number | undefined;
|
|
15
|
+
}, string | (import("langchain").ContentBlock | import("langchain").ContentBlock.Text)[], "internet_search">;
|
|
16
|
+
export declare const internetSearch: import("langchain").DynamicStructuredTool<z.ZodObject<{
|
|
17
|
+
query: z.ZodString;
|
|
18
|
+
maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
19
|
+
}, z.core.$strip>, {
|
|
20
|
+
query: string;
|
|
21
|
+
maxResults?: number;
|
|
22
|
+
}, {
|
|
23
|
+
query: string;
|
|
24
|
+
maxResults?: number | undefined;
|
|
25
|
+
}, string, "internet_search">;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { tool } from "langchain";
|
|
2
|
+
import { DuckDuckGoSearch } from "@langchain/community/tools/duckduckgo_search";
|
|
3
|
+
import { ChatOpenAI } from "@langchain/openai";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
function createDuckDuckGoTool(maxResults) {
|
|
6
|
+
return tool(async ({ query, maxResults: queryMaxResults })=>{
|
|
7
|
+
const search = new DuckDuckGoSearch({
|
|
8
|
+
maxResults: queryMaxResults ?? maxResults
|
|
9
|
+
});
|
|
10
|
+
return await search._call(query);
|
|
11
|
+
}, {
|
|
12
|
+
name: "internet_search",
|
|
13
|
+
description: "Run a web search using DuckDuckGo",
|
|
14
|
+
schema: z.object({
|
|
15
|
+
query: z.string().describe("The search query"),
|
|
16
|
+
maxResults: z.number().optional().default(maxResults).describe("Maximum number of results to return")
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function createPerplexityTool(maxResults) {
|
|
21
|
+
if (!process.env.OPENROUTER_API_KEY) throw new Error("Perplexity search requires OPENROUTER_API_KEY environment variable. Get your key at https://openrouter.ai/ or switch to DuckDuckGo in wingman.config.json");
|
|
22
|
+
const model = new ChatOpenAI({
|
|
23
|
+
model: "perplexity/sonar",
|
|
24
|
+
temperature: 1,
|
|
25
|
+
configuration: {
|
|
26
|
+
baseURL: "https://openrouter.ai/api/v1",
|
|
27
|
+
apiKey: process.env.OPENROUTER_API_KEY
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return tool(async ({ query, maxResults: queryMaxResults })=>{
|
|
31
|
+
const limit = queryMaxResults ?? maxResults;
|
|
32
|
+
const prompt = `Search for: ${query}\n\nProvide up to ${limit} relevant results with citations.`;
|
|
33
|
+
const response = await model.invoke(prompt);
|
|
34
|
+
return response.content;
|
|
35
|
+
}, {
|
|
36
|
+
name: "internet_search",
|
|
37
|
+
description: "Run a web search using Perplexity Sonar with built-in citations",
|
|
38
|
+
schema: z.object({
|
|
39
|
+
query: z.string().describe("The search query"),
|
|
40
|
+
maxResults: z.number().optional().default(maxResults).describe("Maximum number of results to return")
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function createInternetSearchTool(config) {
|
|
45
|
+
const { provider, maxResults = 5 } = config;
|
|
46
|
+
switch(provider){
|
|
47
|
+
case "duckduckgo":
|
|
48
|
+
return createDuckDuckGoTool(maxResults);
|
|
49
|
+
case "perplexity":
|
|
50
|
+
return createPerplexityTool(maxResults);
|
|
51
|
+
default:
|
|
52
|
+
throw new Error(`Unknown search provider: ${provider}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const internetSearch = createDuckDuckGoTool(5);
|
|
56
|
+
export { createInternetSearchTool, internetSearch };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
createThinkingTool: ()=>createThinkingTool,
|
|
28
|
+
readFileSchema: ()=>readFileSchema
|
|
29
|
+
});
|
|
30
|
+
const tools_namespaceObject = require("@langchain/core/tools");
|
|
31
|
+
const external_zod_namespaceObject = require("zod");
|
|
32
|
+
const readFileSchema = external_zod_namespaceObject.z.object({
|
|
33
|
+
thought: external_zod_namespaceObject.z.object({
|
|
34
|
+
type: external_zod_namespaceObject.z.string(),
|
|
35
|
+
description: external_zod_namespaceObject.z.string().describe("Your thoughts in plain text")
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
const createThinkingTool = ()=>(0, tools_namespaceObject.tool)(async (input)=>JSON.stringify({
|
|
39
|
+
input
|
|
40
|
+
}), {
|
|
41
|
+
name: "think",
|
|
42
|
+
description: "Use the tool to think about something. It will not obtain new information or make any changes to the repository, but just log the thought. Use it when complex reasoning or brainstorming is needed. For example, if you explore the repo and discover the source of a bug, call this tool to brainstorm several unique ways of fixing the bug, and assess which change(s) are likely to be simplest and most effective. Alternatively, if you receive some test results, call this tool to brainstorm ways to fix the failing tests.",
|
|
43
|
+
schema: readFileSchema
|
|
44
|
+
});
|
|
45
|
+
exports.createThinkingTool = __webpack_exports__.createThinkingTool;
|
|
46
|
+
exports.readFileSchema = __webpack_exports__.readFileSchema;
|
|
47
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
48
|
+
"createThinkingTool",
|
|
49
|
+
"readFileSchema"
|
|
50
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
51
|
+
Object.defineProperty(exports, '__esModule', {
|
|
52
|
+
value: true
|
|
53
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const readFileSchema: z.ZodObject<{
|
|
3
|
+
thought: z.ZodObject<{
|
|
4
|
+
type: z.ZodString;
|
|
5
|
+
description: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
/**
|
|
9
|
+
* Creates a tool that reads file contents
|
|
10
|
+
*/
|
|
11
|
+
export declare const createThinkingTool: () => import("langchain").DynamicStructuredTool<z.ZodObject<{
|
|
12
|
+
thought: z.ZodObject<{
|
|
13
|
+
type: z.ZodString;
|
|
14
|
+
description: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
}, z.core.$strip>, {
|
|
17
|
+
thought: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
}, {
|
|
22
|
+
thought: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
}, string, "think">;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { tool } from "@langchain/core/tools";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const readFileSchema = z.object({
|
|
4
|
+
thought: z.object({
|
|
5
|
+
type: z.string(),
|
|
6
|
+
description: z.string().describe("Your thoughts in plain text")
|
|
7
|
+
})
|
|
8
|
+
});
|
|
9
|
+
const createThinkingTool = ()=>tool(async (input)=>JSON.stringify({
|
|
10
|
+
input
|
|
11
|
+
}), {
|
|
12
|
+
name: "think",
|
|
13
|
+
description: "Use the tool to think about something. It will not obtain new information or make any changes to the repository, but just log the thought. Use it when complex reasoning or brainstorming is needed. For example, if you explore the repo and discover the source of a bug, call this tool to brainstorm several unique ways of fixing the bug, and assess which change(s) are likely to be simplest and most effective. Alternatively, if you receive some test results, call this tool to brainstorm ways to fix the failing tests.",
|
|
14
|
+
schema: readFileSchema
|
|
15
|
+
});
|
|
16
|
+
export { createThinkingTool, readFileSchema };
|