opc-agent 4.1.2 → 4.1.4
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/dist/analytics/index.d.ts.map +1 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/channels/dingtalk.d.ts.map +1 -0
- package/dist/channels/dingtalk.js.map +1 -0
- package/dist/channels/discord.d.ts.map +1 -0
- package/dist/channels/discord.js.map +1 -0
- package/dist/channels/email.d.ts.map +1 -0
- package/dist/channels/email.js.map +1 -0
- package/dist/channels/feishu.d.ts.map +1 -0
- package/dist/channels/feishu.js.map +1 -0
- package/dist/channels/googlechat.d.ts.map +1 -0
- package/dist/channels/googlechat.js.map +1 -0
- package/dist/channels/imessage.d.ts.map +1 -0
- package/dist/channels/imessage.js.map +1 -0
- package/dist/channels/index.d.ts.map +1 -0
- package/dist/channels/index.js.map +1 -0
- package/dist/channels/irc.d.ts.map +1 -0
- package/dist/channels/irc.js.map +1 -0
- package/dist/channels/line.d.ts.map +1 -0
- package/dist/channels/line.js.map +1 -0
- package/dist/channels/matrix.d.ts.map +1 -0
- package/dist/channels/matrix.js.map +1 -0
- package/dist/channels/mattermost.d.ts.map +1 -0
- package/dist/channels/mattermost.js.map +1 -0
- package/dist/channels/msteams.d.ts.map +1 -0
- package/dist/channels/msteams.js.map +1 -0
- package/dist/channels/nostr.d.ts.map +1 -0
- package/dist/channels/nostr.js.map +1 -0
- package/dist/channels/qq.d.ts.map +1 -0
- package/dist/channels/qq.js.map +1 -0
- package/dist/channels/signal.d.ts.map +1 -0
- package/dist/channels/signal.js.map +1 -0
- package/dist/channels/slack.d.ts.map +1 -0
- package/dist/channels/slack.js.map +1 -0
- package/dist/channels/sms.d.ts.map +1 -0
- package/dist/channels/sms.js.map +1 -0
- package/dist/channels/telegram.d.ts.map +1 -0
- package/dist/channels/telegram.js.map +1 -0
- package/dist/channels/twitch.d.ts.map +1 -0
- package/dist/channels/twitch.js.map +1 -0
- package/dist/channels/voice-call.d.ts.map +1 -0
- package/dist/channels/voice-call.js.map +1 -0
- package/dist/channels/voice.d.ts.map +1 -0
- package/dist/channels/voice.js.map +1 -0
- package/dist/channels/web.d.ts.map +1 -0
- package/dist/channels/web.js.map +1 -0
- package/dist/channels/webhook.d.ts.map +1 -0
- package/dist/channels/webhook.js.map +1 -0
- package/dist/channels/websocket.d.ts.map +1 -0
- package/dist/channels/websocket.js.map +1 -0
- package/dist/channels/wechat.d.ts.map +1 -0
- package/dist/channels/wechat.js.map +1 -0
- package/dist/channels/whatsapp.d.ts.map +1 -0
- package/dist/channels/whatsapp.js.map +1 -0
- package/dist/cli/chat.d.ts.map +1 -0
- package/dist/cli/chat.js.map +1 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +108 -11
- package/dist/cli.js.map +1 -0
- package/dist/core/a2a.d.ts.map +1 -0
- package/dist/core/a2a.js.map +1 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/agent.js.map +1 -0
- package/dist/core/analytics-engine.d.ts.map +1 -0
- package/dist/core/analytics-engine.js.map +1 -0
- package/dist/core/api-server.d.ts.map +1 -0
- package/dist/core/api-server.js.map +1 -0
- package/dist/core/audio.d.ts.map +1 -0
- package/dist/core/audio.js.map +1 -0
- package/dist/core/auth.d.ts.map +1 -0
- package/dist/core/auth.js.map +1 -0
- package/dist/core/cache.d.ts.map +1 -0
- package/dist/core/cache.js.map +1 -0
- package/dist/core/collaboration.d.ts.map +1 -0
- package/dist/core/collaboration.js.map +1 -0
- package/dist/core/compose.d.ts.map +1 -0
- package/dist/core/compose.js.map +1 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/context-discovery.d.ts.map +1 -0
- package/dist/core/context-discovery.js.map +1 -0
- package/dist/core/context-refs.d.ts.map +1 -0
- package/dist/core/context-refs.js.map +1 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/gateway.d.ts.map +1 -0
- package/dist/core/gateway.js.map +1 -0
- package/dist/core/heartbeat.d.ts.map +1 -0
- package/dist/core/heartbeat.js.map +1 -0
- package/dist/core/hitl.d.ts.map +1 -0
- package/dist/core/hitl.js.map +1 -0
- package/dist/core/hooks.d.ts.map +1 -0
- package/dist/core/hooks.js.map +1 -0
- package/dist/core/ide-bridge.d.ts.map +1 -0
- package/dist/core/ide-bridge.js.map +1 -0
- package/dist/core/knowledge.d.ts.map +1 -0
- package/dist/core/knowledge.js.map +1 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/model-recommender.d.ts +40 -0
- package/dist/core/model-recommender.d.ts.map +1 -0
- package/dist/core/model-recommender.js +186 -0
- package/dist/core/model-recommender.js.map +1 -0
- package/dist/core/node-network.d.ts.map +1 -0
- package/dist/core/node-network.js.map +1 -0
- package/dist/core/orchestrator.d.ts.map +1 -0
- package/dist/core/orchestrator.js.map +1 -0
- package/dist/core/performance.d.ts.map +1 -0
- package/dist/core/performance.js.map +1 -0
- package/dist/core/profiles.d.ts.map +1 -0
- package/dist/core/profiles.js.map +1 -0
- package/dist/core/rate-limiter.d.ts.map +1 -0
- package/dist/core/rate-limiter.js.map +1 -0
- package/dist/core/room.d.ts.map +1 -0
- package/dist/core/room.js.map +1 -0
- package/dist/core/runtime.d.ts.map +1 -0
- package/dist/core/runtime.js.map +1 -0
- package/dist/core/sandbox.d.ts.map +1 -0
- package/dist/core/sandbox.js.map +1 -0
- package/dist/core/scheduler.d.ts.map +1 -0
- package/dist/core/scheduler.js.map +1 -0
- package/dist/core/security.d.ts.map +1 -0
- package/dist/core/security.js.map +1 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/streaming.d.ts.map +1 -0
- package/dist/core/streaming.js.map +1 -0
- package/dist/core/subagent.d.ts.map +1 -0
- package/dist/core/subagent.js.map +1 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/versioning.d.ts.map +1 -0
- package/dist/core/versioning.js.map +1 -0
- package/dist/core/vision.d.ts.map +1 -0
- package/dist/core/vision.js.map +1 -0
- package/dist/core/watch.d.ts.map +1 -0
- package/dist/core/watch.js.map +1 -0
- package/dist/core/workflow-graph.d.ts.map +1 -0
- package/dist/core/workflow-graph.js.map +1 -0
- package/dist/core/workflow.d.ts.map +1 -0
- package/dist/core/workflow.js.map +1 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js.map +1 -0
- package/dist/deploy/hermes.d.ts.map +1 -0
- package/dist/deploy/hermes.js.map +1 -0
- package/dist/deploy/index.d.ts.map +1 -0
- package/dist/deploy/index.js.map +1 -0
- package/dist/deploy/openclaw.d.ts.map +1 -0
- package/dist/deploy/openclaw.js.map +1 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js.map +1 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js.map +1 -0
- package/dist/hub/brain-seed.d.ts.map +1 -0
- package/dist/hub/brain-seed.js.map +1 -0
- package/dist/hub/client.d.ts.map +1 -0
- package/dist/hub/client.js.map +1 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -0
- package/dist/mcp/servers/calculator-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/calculator-mcp.js.map +1 -0
- package/dist/mcp/servers/crypto-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/crypto-mcp.js.map +1 -0
- package/dist/mcp/servers/database-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/database-mcp.js.map +1 -0
- package/dist/mcp/servers/datetime-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/datetime-mcp.js.map +1 -0
- package/dist/mcp/servers/filesystem.d.ts.map +1 -0
- package/dist/mcp/servers/filesystem.js.map +1 -0
- package/dist/mcp/servers/github-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/github-mcp.js.map +1 -0
- package/dist/mcp/servers/index.d.ts.map +1 -0
- package/dist/mcp/servers/index.js.map +1 -0
- package/dist/mcp/servers/json-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/json-mcp.js.map +1 -0
- package/dist/mcp/servers/memory-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/memory-mcp.js.map +1 -0
- package/dist/mcp/servers/regex-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/regex-mcp.js.map +1 -0
- package/dist/mcp/servers/web-mcp.d.ts.map +1 -0
- package/dist/mcp/servers/web-mcp.js.map +1 -0
- package/dist/memory/context-compressor.d.ts.map +1 -0
- package/dist/memory/context-compressor.js.map +1 -0
- package/dist/memory/deepbrain.d.ts.map +1 -0
- package/dist/memory/deepbrain.js.map +1 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/seed-loader.d.ts.map +1 -0
- package/dist/memory/seed-loader.js.map +1 -0
- package/dist/memory/user-profiler.d.ts.map +1 -0
- package/dist/memory/user-profiler.js.map +1 -0
- package/dist/plugins/content-filter.d.ts.map +1 -0
- package/dist/plugins/content-filter.js.map +1 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/logger.d.ts.map +1 -0
- package/dist/plugins/logger.js.map +1 -0
- package/dist/plugins/rate-limiter.d.ts.map +1 -0
- package/dist/plugins/rate-limiter.js.map +1 -0
- package/dist/protocols/a2a/client.d.ts.map +1 -0
- package/dist/protocols/a2a/client.js.map +1 -0
- package/dist/protocols/a2a/index.d.ts.map +1 -0
- package/dist/protocols/a2a/index.js.map +1 -0
- package/dist/protocols/a2a/server.d.ts.map +1 -0
- package/dist/protocols/a2a/server.js.map +1 -0
- package/dist/protocols/a2a/types.d.ts.map +1 -0
- package/dist/protocols/a2a/types.js.map +1 -0
- package/dist/protocols/a2a/utils.d.ts.map +1 -0
- package/dist/protocols/a2a/utils.js.map +1 -0
- package/dist/protocols/agui/client.d.ts.map +1 -0
- package/dist/protocols/agui/client.js.map +1 -0
- package/dist/protocols/agui/index.d.ts.map +1 -0
- package/dist/protocols/agui/index.js.map +1 -0
- package/dist/protocols/agui/server.d.ts.map +1 -0
- package/dist/protocols/agui/server.js.map +1 -0
- package/dist/protocols/agui/types.d.ts.map +1 -0
- package/dist/protocols/agui/types.js.map +1 -0
- package/dist/protocols/index.d.ts.map +1 -0
- package/dist/protocols/index.js.map +1 -0
- package/dist/protocols/mcp/agent-tools.d.ts.map +1 -0
- package/dist/protocols/mcp/agent-tools.js.map +1 -0
- package/dist/protocols/mcp/index.d.ts.map +1 -0
- package/dist/protocols/mcp/index.js.map +1 -0
- package/dist/protocols/mcp/server.d.ts.map +1 -0
- package/dist/protocols/mcp/server.js.map +1 -0
- package/dist/protocols/mcp/types.d.ts.map +1 -0
- package/dist/protocols/mcp/types.js.map +1 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/publish/index.d.ts.map +1 -0
- package/dist/publish/index.js.map +1 -0
- package/dist/scheduler/cron-engine.d.ts.map +1 -0
- package/dist/scheduler/cron-engine.js.map +1 -0
- package/dist/scheduler/index.d.ts.map +1 -0
- package/dist/scheduler/index.js.map +1 -0
- package/dist/schema/oad.d.ts.map +1 -0
- package/dist/schema/oad.js.map +1 -0
- package/dist/security/approval.d.ts.map +1 -0
- package/dist/security/approval.js.map +1 -0
- package/dist/security/approvals.d.ts.map +1 -0
- package/dist/security/approvals.js.map +1 -0
- package/dist/security/elevated.d.ts.map +1 -0
- package/dist/security/elevated.js.map +1 -0
- package/dist/security/guardrails.d.ts.map +1 -0
- package/dist/security/guardrails.js.map +1 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/keys.d.ts.map +1 -0
- package/dist/security/keys.js.map +1 -0
- package/dist/security/secrets.d.ts.map +1 -0
- package/dist/security/secrets.js.map +1 -0
- package/dist/skills/auto-learn.d.ts.map +1 -0
- package/dist/skills/auto-learn.js.map +1 -0
- package/dist/skills/base.d.ts.map +1 -0
- package/dist/skills/base.js.map +1 -0
- package/dist/skills/builtin/index.d.ts.map +1 -0
- package/dist/skills/builtin/index.js.map +1 -0
- package/dist/skills/document.d.ts.map +1 -0
- package/dist/skills/document.js.map +1 -0
- package/dist/skills/http.d.ts.map +1 -0
- package/dist/skills/http.js.map +1 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/marketplace.d.ts.map +1 -0
- package/dist/skills/marketplace.js.map +1 -0
- package/dist/skills/scheduler.d.ts.map +1 -0
- package/dist/skills/scheduler.js.map +1 -0
- package/dist/skills/types.d.ts.map +1 -0
- package/dist/skills/types.js.map +1 -0
- package/dist/skills/webhook-trigger.d.ts.map +1 -0
- package/dist/skills/webhook-trigger.js.map +1 -0
- package/dist/studio/server.d.ts.map +1 -0
- package/dist/studio/server.js.map +1 -0
- package/dist/studio/templates-data.d.ts.map +1 -0
- package/dist/studio/templates-data.js.map +1 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/templates/code-reviewer.d.ts.map +1 -0
- package/dist/templates/code-reviewer.js.map +1 -0
- package/dist/templates/content-writer.d.ts.map +1 -0
- package/dist/templates/content-writer.js.map +1 -0
- package/dist/templates/customer-service.d.ts.map +1 -0
- package/dist/templates/customer-service.js.map +1 -0
- package/dist/templates/data-analyst.d.ts.map +1 -0
- package/dist/templates/data-analyst.js.map +1 -0
- package/dist/templates/executive-assistant.d.ts.map +1 -0
- package/dist/templates/executive-assistant.js.map +1 -0
- package/dist/templates/financial-advisor.d.ts.map +1 -0
- package/dist/templates/financial-advisor.js.map +1 -0
- package/dist/templates/hr-recruiter.d.ts.map +1 -0
- package/dist/templates/hr-recruiter.js.map +1 -0
- package/dist/templates/knowledge-base.d.ts.map +1 -0
- package/dist/templates/knowledge-base.js.map +1 -0
- package/dist/templates/legal-assistant.d.ts.map +1 -0
- package/dist/templates/legal-assistant.js.map +1 -0
- package/dist/templates/project-manager.d.ts.map +1 -0
- package/dist/templates/project-manager.js.map +1 -0
- package/dist/templates/sales-assistant.d.ts.map +1 -0
- package/dist/templates/sales-assistant.js.map +1 -0
- package/dist/templates/teacher.d.ts.map +1 -0
- package/dist/templates/teacher.js.map +1 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/tools/builtin/browser.d.ts.map +1 -0
- package/dist/tools/builtin/browser.js.map +1 -0
- package/dist/tools/builtin/datetime.d.ts.map +1 -0
- package/dist/tools/builtin/datetime.js.map +1 -0
- package/dist/tools/builtin/file.d.ts.map +1 -0
- package/dist/tools/builtin/file.js.map +1 -0
- package/dist/tools/builtin/home-assistant.d.ts.map +1 -0
- package/dist/tools/builtin/home-assistant.js.map +1 -0
- package/dist/tools/builtin/index.d.ts.map +1 -0
- package/dist/tools/builtin/index.js.map +1 -0
- package/dist/tools/builtin/rl-tools.d.ts.map +1 -0
- package/dist/tools/builtin/rl-tools.js.map +1 -0
- package/dist/tools/builtin/shell.d.ts.map +1 -0
- package/dist/tools/builtin/shell.js.map +1 -0
- package/dist/tools/builtin/vision.d.ts.map +1 -0
- package/dist/tools/builtin/vision.js.map +1 -0
- package/dist/tools/builtin/web-search.d.ts.map +1 -0
- package/dist/tools/builtin/web-search.js.map +1 -0
- package/dist/tools/builtin/web.d.ts.map +1 -0
- package/dist/tools/builtin/web.js.map +1 -0
- package/dist/tools/calculator.d.ts.map +1 -0
- package/dist/tools/calculator.js.map +1 -0
- package/dist/tools/datetime.d.ts.map +1 -0
- package/dist/tools/datetime.js.map +1 -0
- package/dist/tools/document-processor.d.ts.map +1 -0
- package/dist/tools/document-processor.js.map +1 -0
- package/dist/tools/gateway.d.ts.map +1 -0
- package/dist/tools/gateway.js.map +1 -0
- package/dist/tools/image-generator.d.ts.map +1 -0
- package/dist/tools/image-generator.js.map +1 -0
- package/dist/tools/integrations/calendar.d.ts.map +1 -0
- package/dist/tools/integrations/calendar.js.map +1 -0
- package/dist/tools/integrations/code-exec.d.ts.map +1 -0
- package/dist/tools/integrations/code-exec.js.map +1 -0
- package/dist/tools/integrations/csv-analyzer.d.ts.map +1 -0
- package/dist/tools/integrations/csv-analyzer.js.map +1 -0
- package/dist/tools/integrations/database.d.ts.map +1 -0
- package/dist/tools/integrations/database.js.map +1 -0
- package/dist/tools/integrations/email-send.d.ts.map +1 -0
- package/dist/tools/integrations/email-send.js.map +1 -0
- package/dist/tools/integrations/git-tool.d.ts.map +1 -0
- package/dist/tools/integrations/git-tool.js.map +1 -0
- package/dist/tools/integrations/github-tool.d.ts.map +1 -0
- package/dist/tools/integrations/github-tool.js.map +1 -0
- package/dist/tools/integrations/image-gen.d.ts.map +1 -0
- package/dist/tools/integrations/image-gen.js.map +1 -0
- package/dist/tools/integrations/index.d.ts.map +1 -0
- package/dist/tools/integrations/index.js.map +1 -0
- package/dist/tools/integrations/jira.d.ts.map +1 -0
- package/dist/tools/integrations/jira.js.map +1 -0
- package/dist/tools/integrations/notion.d.ts.map +1 -0
- package/dist/tools/integrations/notion.js.map +1 -0
- package/dist/tools/integrations/npm-tool.d.ts.map +1 -0
- package/dist/tools/integrations/npm-tool.js.map +1 -0
- package/dist/tools/integrations/pdf-reader.d.ts.map +1 -0
- package/dist/tools/integrations/pdf-reader.js.map +1 -0
- package/dist/tools/integrations/slack.d.ts.map +1 -0
- package/dist/tools/integrations/slack.js.map +1 -0
- package/dist/tools/integrations/summarizer.d.ts.map +1 -0
- package/dist/tools/integrations/summarizer.js.map +1 -0
- package/dist/tools/integrations/translator.d.ts.map +1 -0
- package/dist/tools/integrations/translator.js.map +1 -0
- package/dist/tools/integrations/trello.d.ts.map +1 -0
- package/dist/tools/integrations/trello.js.map +1 -0
- package/dist/tools/integrations/vector-search.d.ts.map +1 -0
- package/dist/tools/integrations/vector-search.js.map +1 -0
- package/dist/tools/integrations/web-scraper.d.ts.map +1 -0
- package/dist/tools/integrations/web-scraper.js.map +1 -0
- package/dist/tools/integrations/web-search.d.ts.map +1 -0
- package/dist/tools/integrations/web-search.js.map +1 -0
- package/dist/tools/integrations/webhook.d.ts.map +1 -0
- package/dist/tools/integrations/webhook.js.map +1 -0
- package/dist/tools/json-transform.d.ts.map +1 -0
- package/dist/tools/json-transform.js.map +1 -0
- package/dist/tools/mcp-client.d.ts.map +1 -0
- package/dist/tools/mcp-client.js.map +1 -0
- package/dist/tools/mcp.d.ts.map +1 -0
- package/dist/tools/mcp.js.map +1 -0
- package/dist/tools/text-analysis.d.ts.map +1 -0
- package/dist/tools/text-analysis.js.map +1 -0
- package/dist/tools/web-scraper.d.ts.map +1 -0
- package/dist/tools/web-scraper.js.map +1 -0
- package/dist/tools/web-search.d.ts.map +1 -0
- package/dist/tools/web-search.js.map +1 -0
- package/dist/traces/index.d.ts.map +1 -0
- package/dist/traces/index.js.map +1 -0
- package/dist/ui/components.d.ts.map +1 -0
- package/dist/ui/components.js.map +1 -0
- package/models.json +164 -0
- package/package.json +1 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -20
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -14
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -13
- package/.github/workflows/ci.yml +0 -24
- package/USABILITY-ISSUES.md +0 -73
- package/docs/.vitepress/config.ts +0 -103
- package/docs/api/cli.md +0 -48
- package/docs/api/oad-schema.md +0 -64
- package/docs/api/sdk.md +0 -80
- package/docs/guide/concepts.md +0 -51
- package/docs/guide/configuration.md +0 -79
- package/docs/guide/deployment.md +0 -42
- package/docs/guide/getting-started.md +0 -44
- package/docs/guide/templates.md +0 -28
- package/docs/guide/testing.md +0 -84
- package/docs/index.md +0 -27
- package/docs/zh/api/cli.md +0 -54
- package/docs/zh/api/oad-schema.md +0 -87
- package/docs/zh/api/sdk.md +0 -102
- package/docs/zh/guide/concepts.md +0 -104
- package/docs/zh/guide/configuration.md +0 -135
- package/docs/zh/guide/deployment.md +0 -81
- package/docs/zh/guide/getting-started.md +0 -82
- package/docs/zh/guide/templates.md +0 -84
- package/docs/zh/guide/testing.md +0 -88
- package/docs/zh/index.md +0 -27
- package/fix-sidebar.mjs +0 -188
- package/serve-studio.js +0 -13
- package/serve-test.js +0 -25
- package/src/analytics/index.ts +0 -66
- package/src/channels/dingtalk.ts +0 -46
- package/src/channels/discord.ts +0 -192
- package/src/channels/email.ts +0 -351
- package/src/channels/feishu.ts +0 -349
- package/src/channels/googlechat.ts +0 -42
- package/src/channels/imessage.ts +0 -32
- package/src/channels/index.ts +0 -15
- package/src/channels/irc.ts +0 -82
- package/src/channels/line.ts +0 -33
- package/src/channels/matrix.ts +0 -34
- package/src/channels/mattermost.ts +0 -57
- package/src/channels/msteams.ts +0 -33
- package/src/channels/nostr.ts +0 -33
- package/src/channels/qq.ts +0 -34
- package/src/channels/signal.ts +0 -33
- package/src/channels/slack.ts +0 -217
- package/src/channels/sms.ts +0 -34
- package/src/channels/telegram.ts +0 -616
- package/src/channels/twitch.ts +0 -65
- package/src/channels/voice-call.ts +0 -100
- package/src/channels/voice.ts +0 -471
- package/src/channels/web.ts +0 -638
- package/src/channels/webhook.ts +0 -199
- package/src/channels/websocket.ts +0 -399
- package/src/channels/wechat.ts +0 -329
- package/src/channels/whatsapp.ts +0 -33
- package/src/cli/chat.ts +0 -99
- package/src/cli/setup.ts +0 -314
- package/src/cli.ts +0 -2826
- package/src/core/a2a.ts +0 -203
- package/src/core/agent.ts +0 -476
- package/src/core/analytics-engine.ts +0 -186
- package/src/core/api-server.ts +0 -277
- package/src/core/audio.ts +0 -98
- package/src/core/auth.ts +0 -57
- package/src/core/cache.ts +0 -141
- package/src/core/collaboration.ts +0 -275
- package/src/core/compose.ts +0 -77
- package/src/core/config.ts +0 -14
- package/src/core/context-discovery.ts +0 -85
- package/src/core/context-refs.ts +0 -140
- package/src/core/errors.ts +0 -148
- package/src/core/gateway.ts +0 -106
- package/src/core/heartbeat.ts +0 -51
- package/src/core/hitl.ts +0 -138
- package/src/core/hooks.ts +0 -105
- package/src/core/ide-bridge.ts +0 -133
- package/src/core/knowledge.ts +0 -255
- package/src/core/logger.ts +0 -57
- package/src/core/node-network.ts +0 -86
- package/src/core/orchestrator.ts +0 -215
- package/src/core/performance.ts +0 -187
- package/src/core/profiles.ts +0 -122
- package/src/core/rate-limiter.ts +0 -128
- package/src/core/room.ts +0 -109
- package/src/core/runtime.ts +0 -435
- package/src/core/sandbox.ts +0 -344
- package/src/core/scheduler.ts +0 -187
- package/src/core/security.ts +0 -171
- package/src/core/session-manager.ts +0 -137
- package/src/core/streaming.ts +0 -195
- package/src/core/subagent.ts +0 -98
- package/src/core/types.ts +0 -68
- package/src/core/versioning.ts +0 -106
- package/src/core/vision.ts +0 -180
- package/src/core/watch.ts +0 -178
- package/src/core/workflow-graph.ts +0 -365
- package/src/core/workflow.ts +0 -235
- package/src/daemon.ts +0 -96
- package/src/deploy/hermes.ts +0 -156
- package/src/deploy/index.ts +0 -255
- package/src/deploy/openclaw.ts +0 -190
- package/src/doctor.ts +0 -243
- package/src/eval/index.ts +0 -211
- package/src/eval/suites/basic.json +0 -16
- package/src/eval/suites/memory.json +0 -12
- package/src/eval/suites/safety.json +0 -14
- package/src/hub/brain-seed.ts +0 -54
- package/src/hub/client.ts +0 -60
- package/src/i18n/index.ts +0 -216
- package/src/index.ts +0 -283
- package/src/mcp/servers/calculator-mcp.ts +0 -65
- package/src/mcp/servers/crypto-mcp.ts +0 -73
- package/src/mcp/servers/database-mcp.ts +0 -72
- package/src/mcp/servers/datetime-mcp.ts +0 -69
- package/src/mcp/servers/filesystem.ts +0 -66
- package/src/mcp/servers/github-mcp.ts +0 -58
- package/src/mcp/servers/index.ts +0 -63
- package/src/mcp/servers/json-mcp.ts +0 -102
- package/src/mcp/servers/memory-mcp.ts +0 -56
- package/src/mcp/servers/regex-mcp.ts +0 -53
- package/src/mcp/servers/web-mcp.ts +0 -49
- package/src/memory/context-compressor.ts +0 -189
- package/src/memory/deepbrain.ts +0 -202
- package/src/memory/index.ts +0 -41
- package/src/memory/seed-loader.ts +0 -212
- package/src/memory/user-profiler.ts +0 -215
- package/src/plugins/content-filter.ts +0 -23
- package/src/plugins/index.ts +0 -339
- package/src/plugins/logger.ts +0 -18
- package/src/plugins/rate-limiter.ts +0 -38
- package/src/protocols/a2a/client.ts +0 -132
- package/src/protocols/a2a/index.ts +0 -8
- package/src/protocols/a2a/server.ts +0 -333
- package/src/protocols/a2a/types.ts +0 -88
- package/src/protocols/a2a/utils.ts +0 -50
- package/src/protocols/agui/client.ts +0 -83
- package/src/protocols/agui/index.ts +0 -4
- package/src/protocols/agui/server.ts +0 -218
- package/src/protocols/agui/types.ts +0 -153
- package/src/protocols/index.ts +0 -2
- package/src/protocols/mcp/agent-tools.ts +0 -134
- package/src/protocols/mcp/index.ts +0 -8
- package/src/protocols/mcp/server.ts +0 -262
- package/src/protocols/mcp/types.ts +0 -69
- package/src/providers/index.ts +0 -632
- package/src/publish/index.ts +0 -376
- package/src/scheduler/cron-engine.ts +0 -191
- package/src/scheduler/index.ts +0 -2
- package/src/schema/oad.ts +0 -217
- package/src/security/approval.ts +0 -131
- package/src/security/approvals.ts +0 -143
- package/src/security/elevated.ts +0 -105
- package/src/security/guardrails.ts +0 -248
- package/src/security/index.ts +0 -9
- package/src/security/keys.ts +0 -87
- package/src/security/secrets.ts +0 -129
- package/src/skills/auto-learn.ts +0 -262
- package/src/skills/base.ts +0 -16
- package/src/skills/builtin/index.ts +0 -408
- package/src/skills/document.ts +0 -100
- package/src/skills/http.ts +0 -35
- package/src/skills/index.ts +0 -27
- package/src/skills/marketplace.ts +0 -113
- package/src/skills/scheduler.ts +0 -80
- package/src/skills/types.ts +0 -42
- package/src/skills/webhook-trigger.ts +0 -59
- package/src/studio/server.ts +0 -1791
- package/src/studio/templates-data.ts +0 -178
- package/src/studio-ui/index.html +0 -3076
- package/src/telemetry/index.ts +0 -324
- package/src/templates/code-reviewer.ts +0 -30
- package/src/templates/content-writer.ts +0 -58
- package/src/templates/customer-service.ts +0 -76
- package/src/templates/data-analyst.ts +0 -66
- package/src/templates/executive-assistant.ts +0 -71
- package/src/templates/financial-advisor.ts +0 -60
- package/src/templates/hr-recruiter.ts +0 -58
- package/src/templates/knowledge-base.ts +0 -27
- package/src/templates/legal-assistant.ts +0 -71
- package/src/templates/project-manager.ts +0 -58
- package/src/templates/sales-assistant.ts +0 -75
- package/src/templates/teacher.ts +0 -75
- package/src/testing/index.ts +0 -181
- package/src/tools/builtin/browser.ts +0 -299
- package/src/tools/builtin/datetime.ts +0 -41
- package/src/tools/builtin/file.ts +0 -107
- package/src/tools/builtin/home-assistant.ts +0 -116
- package/src/tools/builtin/index.ts +0 -37
- package/src/tools/builtin/rl-tools.ts +0 -243
- package/src/tools/builtin/shell.ts +0 -43
- package/src/tools/builtin/vision.ts +0 -64
- package/src/tools/builtin/web-search.ts +0 -126
- package/src/tools/builtin/web.ts +0 -35
- package/src/tools/calculator.ts +0 -73
- package/src/tools/datetime.ts +0 -149
- package/src/tools/document-processor.ts +0 -213
- package/src/tools/gateway.ts +0 -220
- package/src/tools/image-generator.ts +0 -150
- package/src/tools/integrations/calendar.ts +0 -73
- package/src/tools/integrations/code-exec.ts +0 -39
- package/src/tools/integrations/csv-analyzer.ts +0 -92
- package/src/tools/integrations/database.ts +0 -44
- package/src/tools/integrations/email-send.ts +0 -76
- package/src/tools/integrations/git-tool.ts +0 -42
- package/src/tools/integrations/github-tool.ts +0 -76
- package/src/tools/integrations/image-gen.ts +0 -56
- package/src/tools/integrations/index.ts +0 -92
- package/src/tools/integrations/jira.ts +0 -83
- package/src/tools/integrations/notion.ts +0 -71
- package/src/tools/integrations/npm-tool.ts +0 -48
- package/src/tools/integrations/pdf-reader.ts +0 -58
- package/src/tools/integrations/slack.ts +0 -65
- package/src/tools/integrations/summarizer.ts +0 -49
- package/src/tools/integrations/translator.ts +0 -48
- package/src/tools/integrations/trello.ts +0 -60
- package/src/tools/integrations/vector-search.ts +0 -42
- package/src/tools/integrations/web-scraper.ts +0 -47
- package/src/tools/integrations/web-search.ts +0 -58
- package/src/tools/integrations/webhook.ts +0 -38
- package/src/tools/json-transform.ts +0 -187
- package/src/tools/mcp-client.ts +0 -131
- package/src/tools/mcp.ts +0 -76
- package/src/tools/text-analysis.ts +0 -116
- package/src/tools/web-scraper.ts +0 -179
- package/src/tools/web-search.ts +0 -180
- package/src/traces/index.ts +0 -132
- package/src/types/agent-workstation.d.ts +0 -2
- package/src/ui/components.ts +0 -127
- package/srv-err.txt +0 -0
- package/srv-out.txt +0 -1
- package/test-agent/Dockerfile +0 -9
- package/test-agent/README.md +0 -50
- package/test-agent/agent.yaml +0 -23
- package/test-agent/docker-compose.yml +0 -11
- package/test-agent/oad.yaml +0 -31
- package/test-agent/package-lock.json +0 -1492
- package/test-agent/package.json +0 -18
- package/test-agent/src/index.ts +0 -24
- package/test-agent/src/skills/echo.ts +0 -15
- package/test-agent/tsconfig.json +0 -25
- package/test-full.js +0 -43
- package/test-sidebar.js +0 -22
- package/test-studio3.js +0 -75
- package/test-studio4.js +0 -41
- package/tests/a2a-protocol.test.ts +0 -285
- package/tests/a2a.test.ts +0 -66
- package/tests/agent.test.ts +0 -72
- package/tests/agui-protocol.test.ts +0 -246
- package/tests/analytics.test.ts +0 -50
- package/tests/api-server.test.ts +0 -148
- package/tests/approvals.test.ts +0 -89
- package/tests/audio.test.ts +0 -40
- package/tests/auto-learn.test.ts +0 -105
- package/tests/brain-seed-extended.test.ts +0 -490
- package/tests/brain-seed.test.ts +0 -239
- package/tests/browser.test.ts +0 -179
- package/tests/builtin-tools.test.ts +0 -83
- package/tests/channel.test.ts +0 -39
- package/tests/channels/discord.test.ts +0 -79
- package/tests/channels/email.test.ts +0 -148
- package/tests/channels/feishu.test.ts +0 -123
- package/tests/channels/telegram.test.ts +0 -129
- package/tests/channels/websocket.test.ts +0 -53
- package/tests/channels/wechat.test.ts +0 -170
- package/tests/channels-extra.test.ts +0 -45
- package/tests/chat-cli.test.ts +0 -160
- package/tests/cli.test.ts +0 -46
- package/tests/collaboration.test.ts +0 -319
- package/tests/context-compressor.test.ts +0 -172
- package/tests/context-refs.test.ts +0 -121
- package/tests/cron-engine.test.ts +0 -101
- package/tests/daemon.test.ts +0 -135
- package/tests/deepbrain-wire.test.ts +0 -234
- package/tests/deploy-and-dag.test.ts +0 -196
- package/tests/doctor.test.ts +0 -38
- package/tests/document-processor.test.ts +0 -69
- package/tests/e2e-nocode.test.ts +0 -442
- package/tests/e2e.test.ts +0 -134
- package/tests/elevated.test.ts +0 -69
- package/tests/errors.test.ts +0 -83
- package/tests/eval.test.ts +0 -173
- package/tests/gateway.test.ts +0 -63
- package/tests/guardrails.test.ts +0 -177
- package/tests/hitl.test.ts +0 -71
- package/tests/home-assistant.test.ts +0 -40
- package/tests/hooks.test.ts +0 -79
- package/tests/i18n.test.ts +0 -41
- package/tests/ide-bridge.test.ts +0 -38
- package/tests/image-generator.test.ts +0 -84
- package/tests/init-role.test.ts +0 -124
- package/tests/integrations.test.ts +0 -249
- package/tests/mcp-client.test.ts +0 -92
- package/tests/mcp-server.test.ts +0 -178
- package/tests/mcp-servers.test.ts +0 -260
- package/tests/mcp.test.ts +0 -54
- package/tests/node-network.test.ts +0 -74
- package/tests/oad.test.ts +0 -68
- package/tests/performance.test.ts +0 -115
- package/tests/plugin-a2a-enhanced.test.ts +0 -230
- package/tests/plugin.test.ts +0 -74
- package/tests/profiles.test.ts +0 -61
- package/tests/publish.test.ts +0 -231
- package/tests/rl-tools.test.ts +0 -93
- package/tests/room.test.ts +0 -106
- package/tests/runtime.test.ts +0 -42
- package/tests/sandbox-manager.test.ts +0 -46
- package/tests/sandbox.test.ts +0 -46
- package/tests/scheduler.test.ts +0 -200
- package/tests/secrets.test.ts +0 -107
- package/tests/security-enhanced.test.ts +0 -233
- package/tests/security.test.ts +0 -60
- package/tests/settings-api.test.ts +0 -148
- package/tests/setup.test.ts +0 -73
- package/tests/skill-learner.test.ts +0 -161
- package/tests/streaming.test.ts +0 -109
- package/tests/studio.test.ts +0 -402
- package/tests/subagent.test.ts +0 -193
- package/tests/telegram-discord.test.ts +0 -60
- package/tests/telemetry.test.ts +0 -186
- package/tests/templates.test.ts +0 -77
- package/tests/tools/builtin-extended.test.ts +0 -138
- package/tests/user-profiler.test.ts +0 -169
- package/tests/v070.test.ts +0 -76
- package/tests/v090-features.test.ts +0 -254
- package/tests/versioning.test.ts +0 -75
- package/tests/vision.test.ts +0 -61
- package/tests/voice-call.test.ts +0 -47
- package/tests/voice-enhanced.test.ts +0 -169
- package/tests/voice-interaction.test.ts +0 -38
- package/tests/voice.test.ts +0 -61
- package/tests/web-search.test.ts +0 -155
- package/tests/webhook.test.ts +0 -29
- package/tests/workflow-graph.test.ts +0 -279
- package/tests/workflow.test.ts +0 -143
- package/tmp-js-test.js +0 -1532
- package/tmp-sc.js +0 -1716
- package/tutorial/customer-service-agent/README.md +0 -612
- package/tutorial/customer-service-agent/SOUL.md +0 -26
- package/tutorial/customer-service-agent/agent.yaml +0 -63
- package/tutorial/customer-service-agent/package.json +0 -19
- package/tutorial/customer-service-agent/src/index.ts +0 -69
- package/tutorial/customer-service-agent/src/skills/faq.ts +0 -27
- package/tutorial/customer-service-agent/src/skills/ticket.ts +0 -22
- package/tutorial/customer-service-agent/tsconfig.json +0 -14
- package/vitest.config.ts +0 -9
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import type { MCPTool } from '../mcp';
|
|
2
|
-
|
|
3
|
-
// Communication
|
|
4
|
-
export { SlackTool } from './slack';
|
|
5
|
-
export { EmailSendTool } from './email-send';
|
|
6
|
-
export { WebhookTool } from './webhook';
|
|
7
|
-
|
|
8
|
-
// Productivity
|
|
9
|
-
export { NotionTool } from './notion';
|
|
10
|
-
export { GitHubTool } from './github-tool';
|
|
11
|
-
export { JiraTool } from './jira';
|
|
12
|
-
export { CalendarTool } from './calendar';
|
|
13
|
-
export { TrelloTool } from './trello';
|
|
14
|
-
|
|
15
|
-
// Data & Search
|
|
16
|
-
export { WebSearchTool } from './web-search';
|
|
17
|
-
export { WebScraperTool } from './web-scraper';
|
|
18
|
-
export { DatabaseTool } from './database';
|
|
19
|
-
export { VectorSearchTool } from './vector-search';
|
|
20
|
-
|
|
21
|
-
// Code & Dev
|
|
22
|
-
export { CodeExecutionTool } from './code-exec';
|
|
23
|
-
export { GitTool } from './git-tool';
|
|
24
|
-
export { NpmTool } from './npm-tool';
|
|
25
|
-
|
|
26
|
-
// Media & Files
|
|
27
|
-
export { ImageGenerationTool } from './image-gen';
|
|
28
|
-
export { PDFReaderTool } from './pdf-reader';
|
|
29
|
-
export { CSVAnalyzerTool } from './csv-analyzer';
|
|
30
|
-
|
|
31
|
-
// AI & Analysis
|
|
32
|
-
export { SummarizerTool } from './summarizer';
|
|
33
|
-
export { TranslatorTool } from './translator';
|
|
34
|
-
|
|
35
|
-
// Import all tools for registry
|
|
36
|
-
import { SlackTool } from './slack';
|
|
37
|
-
import { EmailSendTool } from './email-send';
|
|
38
|
-
import { WebhookTool } from './webhook';
|
|
39
|
-
import { NotionTool } from './notion';
|
|
40
|
-
import { GitHubTool } from './github-tool';
|
|
41
|
-
import { JiraTool } from './jira';
|
|
42
|
-
import { CalendarTool } from './calendar';
|
|
43
|
-
import { TrelloTool } from './trello';
|
|
44
|
-
import { WebSearchTool } from './web-search';
|
|
45
|
-
import { WebScraperTool } from './web-scraper';
|
|
46
|
-
import { DatabaseTool } from './database';
|
|
47
|
-
import { VectorSearchTool } from './vector-search';
|
|
48
|
-
import { CodeExecutionTool } from './code-exec';
|
|
49
|
-
import { GitTool } from './git-tool';
|
|
50
|
-
import { NpmTool } from './npm-tool';
|
|
51
|
-
import { ImageGenerationTool } from './image-gen';
|
|
52
|
-
import { PDFReaderTool } from './pdf-reader';
|
|
53
|
-
import { CSVAnalyzerTool } from './csv-analyzer';
|
|
54
|
-
import { SummarizerTool } from './summarizer';
|
|
55
|
-
import { TranslatorTool } from './translator';
|
|
56
|
-
|
|
57
|
-
const ALL_INTEGRATION_TOOLS: MCPTool[] = [
|
|
58
|
-
SlackTool,
|
|
59
|
-
EmailSendTool,
|
|
60
|
-
WebhookTool,
|
|
61
|
-
NotionTool,
|
|
62
|
-
GitHubTool,
|
|
63
|
-
JiraTool,
|
|
64
|
-
CalendarTool,
|
|
65
|
-
TrelloTool,
|
|
66
|
-
WebSearchTool,
|
|
67
|
-
WebScraperTool,
|
|
68
|
-
DatabaseTool,
|
|
69
|
-
VectorSearchTool,
|
|
70
|
-
CodeExecutionTool,
|
|
71
|
-
GitTool,
|
|
72
|
-
NpmTool,
|
|
73
|
-
ImageGenerationTool,
|
|
74
|
-
PDFReaderTool,
|
|
75
|
-
CSVAnalyzerTool,
|
|
76
|
-
SummarizerTool,
|
|
77
|
-
TranslatorTool,
|
|
78
|
-
];
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Get all 20 pre-built integration tools.
|
|
82
|
-
*/
|
|
83
|
-
export function getAllIntegrationTools(): MCPTool[] {
|
|
84
|
-
return [...ALL_INTEGRATION_TOOLS];
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Get a specific integration tool by name.
|
|
89
|
-
*/
|
|
90
|
-
export function getIntegrationTool(name: string): MCPTool | undefined {
|
|
91
|
-
return ALL_INTEGRATION_TOOLS.find((t) => t.name === name);
|
|
92
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import type { MCPTool, MCPToolResult } from '../mcp';
|
|
2
|
-
|
|
3
|
-
export const JiraTool: MCPTool = {
|
|
4
|
-
name: 'jira',
|
|
5
|
-
description: 'Interact with Jira: create issues, update status, search, add comments. Requires JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN env vars.',
|
|
6
|
-
inputSchema: {
|
|
7
|
-
type: 'object',
|
|
8
|
-
properties: {
|
|
9
|
-
action: { type: 'string', enum: ['create_issue', 'update_status', 'search', 'add_comment'], description: 'Action to perform' },
|
|
10
|
-
project: { type: 'string', description: 'Project key (for create_issue)' },
|
|
11
|
-
summary: { type: 'string', description: 'Issue summary' },
|
|
12
|
-
description: { type: 'string', description: 'Issue description' },
|
|
13
|
-
issue_type: { type: 'string', description: 'Issue type (default: Task)' },
|
|
14
|
-
issue_key: { type: 'string', description: 'Issue key (e.g., PROJ-123)' },
|
|
15
|
-
status: { type: 'string', description: 'Target status (for update_status)' },
|
|
16
|
-
comment: { type: 'string', description: 'Comment text' },
|
|
17
|
-
jql: { type: 'string', description: 'JQL query (for search)' },
|
|
18
|
-
},
|
|
19
|
-
required: ['action'],
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
async execute(input: Record<string, unknown>): Promise<MCPToolResult> {
|
|
23
|
-
const baseUrl = process.env.JIRA_URL;
|
|
24
|
-
const email = process.env.JIRA_EMAIL;
|
|
25
|
-
const apiToken = process.env.JIRA_API_TOKEN;
|
|
26
|
-
if (!baseUrl || !email || !apiToken) return { content: 'Error: JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN required', isError: true };
|
|
27
|
-
|
|
28
|
-
const auth = Buffer.from(`${email}:${apiToken}`).toString('base64');
|
|
29
|
-
const headers = { 'Authorization': `Basic ${auth}`, 'Content-Type': 'application/json', 'Accept': 'application/json' };
|
|
30
|
-
const action = String(input.action ?? '');
|
|
31
|
-
|
|
32
|
-
try {
|
|
33
|
-
if (action === 'create_issue') {
|
|
34
|
-
if (!input.project || !input.summary) return { content: 'Error: project, summary required', isError: true };
|
|
35
|
-
const res = await fetch(`${baseUrl}/rest/api/3/issue`, {
|
|
36
|
-
method: 'POST', headers,
|
|
37
|
-
body: JSON.stringify({
|
|
38
|
-
fields: {
|
|
39
|
-
project: { key: input.project },
|
|
40
|
-
summary: input.summary,
|
|
41
|
-
description: input.description ? { type: 'doc', version: 1, content: [{ type: 'paragraph', content: [{ type: 'text', text: String(input.description) }] }] } : undefined,
|
|
42
|
-
issuetype: { name: String(input.issue_type ?? 'Task') },
|
|
43
|
-
},
|
|
44
|
-
}),
|
|
45
|
-
});
|
|
46
|
-
const data = await res.json() as Record<string, unknown>;
|
|
47
|
-
return { content: `Issue created: ${data.key}` };
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (action === 'update_status') {
|
|
51
|
-
if (!input.issue_key || !input.status) return { content: 'Error: issue_key, status required', isError: true };
|
|
52
|
-
const trRes = await fetch(`${baseUrl}/rest/api/3/issue/${input.issue_key}/transitions`, { headers });
|
|
53
|
-
const trData = await trRes.json() as { transitions: Array<{ id: string; name: string }> };
|
|
54
|
-
const transition = trData.transitions?.find((t) => t.name.toLowerCase() === String(input.status).toLowerCase());
|
|
55
|
-
if (!transition) return { content: `No transition found for status: ${input.status}`, isError: true };
|
|
56
|
-
await fetch(`${baseUrl}/rest/api/3/issue/${input.issue_key}/transitions`, {
|
|
57
|
-
method: 'POST', headers, body: JSON.stringify({ transition: { id: transition.id } }),
|
|
58
|
-
});
|
|
59
|
-
return { content: `${input.issue_key} moved to ${input.status}` };
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (action === 'search') {
|
|
63
|
-
if (!input.jql) return { content: 'Error: jql required', isError: true };
|
|
64
|
-
const res = await fetch(`${baseUrl}/rest/api/3/search?jql=${encodeURIComponent(String(input.jql))}&maxResults=20`, { headers });
|
|
65
|
-
const data = await res.json() as Record<string, unknown>;
|
|
66
|
-
return { content: JSON.stringify(data, null, 2).slice(0, 4000) };
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (action === 'add_comment') {
|
|
70
|
-
if (!input.issue_key || !input.comment) return { content: 'Error: issue_key, comment required', isError: true };
|
|
71
|
-
await fetch(`${baseUrl}/rest/api/3/issue/${input.issue_key}/comment`, {
|
|
72
|
-
method: 'POST', headers,
|
|
73
|
-
body: JSON.stringify({ body: { type: 'doc', version: 1, content: [{ type: 'paragraph', content: [{ type: 'text', text: String(input.comment) }] }] } }),
|
|
74
|
-
});
|
|
75
|
-
return { content: `Comment added to ${input.issue_key}` };
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return { content: `Unknown action: ${action}`, isError: true };
|
|
79
|
-
} catch (err) {
|
|
80
|
-
return { content: `Jira error: ${(err as Error).message}`, isError: true };
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { MCPTool, MCPToolResult } from '../mcp';
|
|
2
|
-
|
|
3
|
-
export const NotionTool: MCPTool = {
|
|
4
|
-
name: 'notion',
|
|
5
|
-
description: 'Interact with Notion API: create pages, search, append blocks. Requires NOTION_API_KEY env var.',
|
|
6
|
-
inputSchema: {
|
|
7
|
-
type: 'object',
|
|
8
|
-
properties: {
|
|
9
|
-
action: { type: 'string', enum: ['create_page', 'search', 'append_block'], description: 'Action to perform' },
|
|
10
|
-
parent_id: { type: 'string', description: 'Parent page/database ID' },
|
|
11
|
-
title: { type: 'string', description: 'Page title (for create_page)' },
|
|
12
|
-
content: { type: 'string', description: 'Content text (for create_page or append_block)' },
|
|
13
|
-
query: { type: 'string', description: 'Search query (for search)' },
|
|
14
|
-
block_id: { type: 'string', description: 'Block ID (for append_block)' },
|
|
15
|
-
},
|
|
16
|
-
required: ['action'],
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
async execute(input: Record<string, unknown>): Promise<MCPToolResult> {
|
|
20
|
-
const apiKey = process.env.NOTION_API_KEY;
|
|
21
|
-
if (!apiKey) return { content: 'Error: NOTION_API_KEY required', isError: true };
|
|
22
|
-
|
|
23
|
-
const action = String(input.action ?? '');
|
|
24
|
-
const headers = {
|
|
25
|
-
'Authorization': `Bearer ${apiKey}`,
|
|
26
|
-
'Content-Type': 'application/json',
|
|
27
|
-
'Notion-Version': '2022-06-28',
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
try {
|
|
31
|
-
if (action === 'create_page') {
|
|
32
|
-
if (!input.parent_id) return { content: 'Error: parent_id required', isError: true };
|
|
33
|
-
const res = await fetch('https://api.notion.com/v1/pages', {
|
|
34
|
-
method: 'POST', headers,
|
|
35
|
-
body: JSON.stringify({
|
|
36
|
-
parent: { page_id: input.parent_id },
|
|
37
|
-
properties: { title: { title: [{ text: { content: String(input.title ?? 'Untitled') } }] } },
|
|
38
|
-
children: input.content ? [{ object: 'block', type: 'paragraph', paragraph: { rich_text: [{ text: { content: String(input.content) } }] } }] : [],
|
|
39
|
-
}),
|
|
40
|
-
});
|
|
41
|
-
const data = await res.json() as Record<string, unknown>;
|
|
42
|
-
return { content: `Page created: ${data.id ?? 'unknown'}` };
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (action === 'search') {
|
|
46
|
-
const res = await fetch('https://api.notion.com/v1/search', {
|
|
47
|
-
method: 'POST', headers,
|
|
48
|
-
body: JSON.stringify({ query: String(input.query ?? '') }),
|
|
49
|
-
});
|
|
50
|
-
const data = await res.json() as Record<string, unknown>;
|
|
51
|
-
return { content: JSON.stringify(data, null, 2).slice(0, 4000) };
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (action === 'append_block') {
|
|
55
|
-
if (!input.block_id) return { content: 'Error: block_id required', isError: true };
|
|
56
|
-
const res = await fetch(`https://api.notion.com/v1/blocks/${input.block_id}/children`, {
|
|
57
|
-
method: 'PATCH', headers,
|
|
58
|
-
body: JSON.stringify({
|
|
59
|
-
children: [{ object: 'block', type: 'paragraph', paragraph: { rich_text: [{ text: { content: String(input.content ?? '') } }] } }],
|
|
60
|
-
}),
|
|
61
|
-
});
|
|
62
|
-
const data = await res.json() as Record<string, unknown>;
|
|
63
|
-
return { content: `Block appended: ${JSON.stringify(data).slice(0, 500)}` };
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return { content: `Unknown action: ${action}`, isError: true };
|
|
67
|
-
} catch (err) {
|
|
68
|
-
return { content: `Notion error: ${(err as Error).message}`, isError: true };
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { MCPTool, MCPToolResult } from '../mcp';
|
|
2
|
-
|
|
3
|
-
export const NpmTool: MCPTool = {
|
|
4
|
-
name: 'npm',
|
|
5
|
-
description: 'Search npm registry, get package info, or list installed packages.',
|
|
6
|
-
inputSchema: {
|
|
7
|
-
type: 'object',
|
|
8
|
-
properties: {
|
|
9
|
-
action: { type: 'string', enum: ['search', 'info', 'install'], description: 'Action' },
|
|
10
|
-
package: { type: 'string', description: 'Package name' },
|
|
11
|
-
query: { type: 'string', description: 'Search query (for search)' },
|
|
12
|
-
},
|
|
13
|
-
required: ['action'],
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
async execute(input: Record<string, unknown>): Promise<MCPToolResult> {
|
|
17
|
-
const action = String(input.action ?? '');
|
|
18
|
-
|
|
19
|
-
try {
|
|
20
|
-
if (action === 'search') {
|
|
21
|
-
const q = String(input.query ?? input.package ?? '');
|
|
22
|
-
if (!q) return { content: 'Error: query required', isError: true };
|
|
23
|
-
const res = await fetch(`https://registry.npmjs.org/-/v1/search?text=${encodeURIComponent(q)}&size=10`);
|
|
24
|
-
const data = await res.json() as { objects?: Array<{ package: { name: string; version: string; description: string } }> };
|
|
25
|
-
const results = (data.objects ?? []).map((o) => `${o.package.name}@${o.package.version} — ${o.package.description}`).join('\n');
|
|
26
|
-
return { content: results || 'No results' };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (action === 'info') {
|
|
30
|
-
const pkg = String(input.package ?? '');
|
|
31
|
-
if (!pkg) return { content: 'Error: package required', isError: true };
|
|
32
|
-
const res = await fetch(`https://registry.npmjs.org/${encodeURIComponent(pkg)}`);
|
|
33
|
-
if (!res.ok) return { content: `Package not found: ${pkg}`, isError: true };
|
|
34
|
-
const data = await res.json() as Record<string, unknown>;
|
|
35
|
-
const latest = (data['dist-tags'] as Record<string, string>)?.latest;
|
|
36
|
-
return { content: `${data.name}@${latest}\n${data.description}\nLicense: ${data.license}\nHomepage: ${data.homepage}` };
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if (action === 'install') {
|
|
40
|
-
return { content: 'Error: npm install is not supported via this tool for security. Use shell access instead.', isError: true };
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return { content: `Unknown action: ${action}`, isError: true };
|
|
44
|
-
} catch (err) {
|
|
45
|
-
return { content: `NPM error: ${(err as Error).message}`, isError: true };
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { MCPTool, MCPToolResult } from '../mcp';
|
|
2
|
-
import * as fs from 'fs';
|
|
3
|
-
|
|
4
|
-
export const PDFReaderTool: MCPTool = {
|
|
5
|
-
name: 'pdf-reader',
|
|
6
|
-
description: 'Extract text content from a PDF file. Uses basic binary parsing (no external deps).',
|
|
7
|
-
inputSchema: {
|
|
8
|
-
type: 'object',
|
|
9
|
-
properties: {
|
|
10
|
-
file_path: { type: 'string', description: 'Path to PDF file' },
|
|
11
|
-
url: { type: 'string', description: 'URL of PDF file (alternative to file_path)' },
|
|
12
|
-
max_length: { type: 'number', description: 'Max characters to return (default: 5000)' },
|
|
13
|
-
},
|
|
14
|
-
required: [],
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
async execute(input: Record<string, unknown>): Promise<MCPToolResult> {
|
|
18
|
-
const maxLen = Number(input.max_length ?? 5000);
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
let buffer: Buffer;
|
|
22
|
-
|
|
23
|
-
if (input.url) {
|
|
24
|
-
const res = await fetch(String(input.url));
|
|
25
|
-
if (!res.ok) return { content: `HTTP ${res.status}`, isError: true };
|
|
26
|
-
buffer = Buffer.from(await res.arrayBuffer());
|
|
27
|
-
} else if (input.file_path) {
|
|
28
|
-
buffer = fs.readFileSync(String(input.file_path));
|
|
29
|
-
} else {
|
|
30
|
-
return { content: 'Error: file_path or url required', isError: true };
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Basic PDF text extraction — find text between BT/ET markers and decode
|
|
34
|
-
const content = buffer.toString('latin1');
|
|
35
|
-
const textParts: string[] = [];
|
|
36
|
-
|
|
37
|
-
// Extract text from stream objects
|
|
38
|
-
const streamRegex = /stream\r?\n([\s\S]*?)\r?\nendstream/g;
|
|
39
|
-
let match: RegExpExecArray | null;
|
|
40
|
-
while ((match = streamRegex.exec(content)) !== null) {
|
|
41
|
-
const stream = match[1];
|
|
42
|
-
// Extract text shown with Tj or TJ operators
|
|
43
|
-
const tjRegex = /\(([^)]*)\)\s*Tj/g;
|
|
44
|
-
let tjMatch: RegExpExecArray | null;
|
|
45
|
-
while ((tjMatch = tjRegex.exec(stream)) !== null) {
|
|
46
|
-
textParts.push(tjMatch[1]);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const text = textParts.join(' ').replace(/\\n/g, '\n').replace(/\\\(/g, '(').replace(/\\\)/g, ')');
|
|
51
|
-
if (!text.trim()) return { content: '(No extractable text found — PDF may use compressed streams. Consider using a dedicated PDF library.)' };
|
|
52
|
-
|
|
53
|
-
return { content: text.slice(0, maxLen), metadata: { pages_approx: (content.match(/\/Type\s*\/Page[^s]/g) || []).length } };
|
|
54
|
-
} catch (err) {
|
|
55
|
-
return { content: `PDF error: ${(err as Error).message}`, isError: true };
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type { MCPTool, MCPToolResult } from '../mcp';
|
|
2
|
-
|
|
3
|
-
export const SlackTool: MCPTool = {
|
|
4
|
-
name: 'slack',
|
|
5
|
-
description: 'Send messages to Slack channels, list channels, or search messages. Requires SLACK_WEBHOOK_URL or SLACK_BOT_TOKEN env var.',
|
|
6
|
-
inputSchema: {
|
|
7
|
-
type: 'object',
|
|
8
|
-
properties: {
|
|
9
|
-
action: { type: 'string', enum: ['send_message', 'list_channels', 'search'], description: 'Action to perform' },
|
|
10
|
-
channel: { type: 'string', description: 'Channel name or ID (for send_message)' },
|
|
11
|
-
text: { type: 'string', description: 'Message text (for send_message) or search query (for search)' },
|
|
12
|
-
},
|
|
13
|
-
required: ['action'],
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
async execute(input: Record<string, unknown>): Promise<MCPToolResult> {
|
|
17
|
-
const action = String(input.action ?? '');
|
|
18
|
-
const token = process.env.SLACK_BOT_TOKEN;
|
|
19
|
-
const webhookUrl = process.env.SLACK_WEBHOOK_URL;
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
if (action === 'send_message') {
|
|
23
|
-
if (!input.text) return { content: 'Error: text is required', isError: true };
|
|
24
|
-
if (webhookUrl) {
|
|
25
|
-
const res = await fetch(webhookUrl, {
|
|
26
|
-
method: 'POST',
|
|
27
|
-
headers: { 'Content-Type': 'application/json' },
|
|
28
|
-
body: JSON.stringify({ channel: input.channel, text: input.text }),
|
|
29
|
-
});
|
|
30
|
-
return { content: `Message sent (status: ${res.status})` };
|
|
31
|
-
}
|
|
32
|
-
if (!token) return { content: 'Error: SLACK_BOT_TOKEN or SLACK_WEBHOOK_URL required', isError: true };
|
|
33
|
-
const res = await fetch('https://slack.com/api/chat.postMessage', {
|
|
34
|
-
method: 'POST',
|
|
35
|
-
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
|
|
36
|
-
body: JSON.stringify({ channel: input.channel, text: input.text }),
|
|
37
|
-
});
|
|
38
|
-
const data = await res.json() as Record<string, unknown>;
|
|
39
|
-
return { content: data.ok ? 'Message sent' : `Error: ${data.error}`, isError: !data.ok };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (action === 'list_channels') {
|
|
43
|
-
if (!token) return { content: 'Error: SLACK_BOT_TOKEN required', isError: true };
|
|
44
|
-
const res = await fetch('https://slack.com/api/conversations.list', {
|
|
45
|
-
headers: { 'Authorization': `Bearer ${token}` },
|
|
46
|
-
});
|
|
47
|
-
const data = await res.json() as Record<string, unknown>;
|
|
48
|
-
return { content: JSON.stringify(data, null, 2) };
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (action === 'search') {
|
|
52
|
-
if (!token) return { content: 'Error: SLACK_BOT_TOKEN required', isError: true };
|
|
53
|
-
const res = await fetch(`https://slack.com/api/search.messages?query=${encodeURIComponent(String(input.text ?? ''))}`, {
|
|
54
|
-
headers: { 'Authorization': `Bearer ${token}` },
|
|
55
|
-
});
|
|
56
|
-
const data = await res.json() as Record<string, unknown>;
|
|
57
|
-
return { content: JSON.stringify(data, null, 2) };
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return { content: `Unknown action: ${action}`, isError: true };
|
|
61
|
-
} catch (err) {
|
|
62
|
-
return { content: `Slack error: ${(err as Error).message}`, isError: true };
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { MCPTool, MCPToolResult } from '../mcp';
|
|
2
|
-
|
|
3
|
-
export const SummarizerTool: MCPTool = {
|
|
4
|
-
name: 'summarizer',
|
|
5
|
-
description: 'Summarize long text using an LLM API. Requires OPENAI_API_KEY or LLM_API_URL env var.',
|
|
6
|
-
inputSchema: {
|
|
7
|
-
type: 'object',
|
|
8
|
-
properties: {
|
|
9
|
-
text: { type: 'string', description: 'Text to summarize' },
|
|
10
|
-
max_length: { type: 'number', description: 'Approximate max summary length in words (default: 200)' },
|
|
11
|
-
style: { type: 'string', enum: ['brief', 'detailed', 'bullets'], description: 'Summary style (default: brief)' },
|
|
12
|
-
},
|
|
13
|
-
required: ['text'],
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
async execute(input: Record<string, unknown>): Promise<MCPToolResult> {
|
|
17
|
-
const text = String(input.text ?? '');
|
|
18
|
-
if (!text) return { content: 'Error: text required', isError: true };
|
|
19
|
-
|
|
20
|
-
const style = String(input.style ?? 'brief');
|
|
21
|
-
const maxLen = Number(input.max_length ?? 200);
|
|
22
|
-
const prompt = `Summarize the following text in a ${style} style, approximately ${maxLen} words:\n\n${text.slice(0, 15000)}`;
|
|
23
|
-
|
|
24
|
-
try {
|
|
25
|
-
const apiKey = process.env.OPENAI_API_KEY;
|
|
26
|
-
const apiUrl = process.env.LLM_API_URL || 'https://api.openai.com/v1/chat/completions';
|
|
27
|
-
if (!apiKey && apiUrl === 'https://api.openai.com/v1/chat/completions') {
|
|
28
|
-
return { content: 'Error: OPENAI_API_KEY or LLM_API_URL required', isError: true };
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const headers: Record<string, string> = { 'Content-Type': 'application/json' };
|
|
32
|
-
if (apiKey) headers['Authorization'] = `Bearer ${apiKey}`;
|
|
33
|
-
|
|
34
|
-
const res = await fetch(apiUrl, {
|
|
35
|
-
method: 'POST', headers,
|
|
36
|
-
body: JSON.stringify({
|
|
37
|
-
model: process.env.LLM_MODEL || 'gpt-4o-mini',
|
|
38
|
-
messages: [{ role: 'user', content: prompt }],
|
|
39
|
-
max_tokens: maxLen * 3,
|
|
40
|
-
}),
|
|
41
|
-
});
|
|
42
|
-
const data = await res.json() as { choices?: Array<{ message: { content: string } }> };
|
|
43
|
-
const summary = data.choices?.[0]?.message?.content ?? 'No summary generated';
|
|
44
|
-
return { content: summary };
|
|
45
|
-
} catch (err) {
|
|
46
|
-
return { content: `Summarizer error: ${(err as Error).message}`, isError: true };
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { MCPTool, MCPToolResult } from '../mcp';
|
|
2
|
-
|
|
3
|
-
export const TranslatorTool: MCPTool = {
|
|
4
|
-
name: 'translator',
|
|
5
|
-
description: 'Translate text between languages using an LLM. Requires OPENAI_API_KEY or LLM_API_URL env var.',
|
|
6
|
-
inputSchema: {
|
|
7
|
-
type: 'object',
|
|
8
|
-
properties: {
|
|
9
|
-
text: { type: 'string', description: 'Text to translate' },
|
|
10
|
-
from: { type: 'string', description: 'Source language (auto-detect if omitted)' },
|
|
11
|
-
to: { type: 'string', description: 'Target language (required)' },
|
|
12
|
-
},
|
|
13
|
-
required: ['text', 'to'],
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
async execute(input: Record<string, unknown>): Promise<MCPToolResult> {
|
|
17
|
-
const text = String(input.text ?? '');
|
|
18
|
-
const to = String(input.to ?? '');
|
|
19
|
-
if (!text || !to) return { content: 'Error: text and to are required', isError: true };
|
|
20
|
-
|
|
21
|
-
const from = input.from ? ` from ${input.from}` : '';
|
|
22
|
-
const prompt = `Translate the following text${from} to ${to}. Return only the translation, no explanations:\n\n${text.slice(0, 10000)}`;
|
|
23
|
-
|
|
24
|
-
try {
|
|
25
|
-
const apiKey = process.env.OPENAI_API_KEY;
|
|
26
|
-
const apiUrl = process.env.LLM_API_URL || 'https://api.openai.com/v1/chat/completions';
|
|
27
|
-
if (!apiKey && apiUrl === 'https://api.openai.com/v1/chat/completions') {
|
|
28
|
-
return { content: 'Error: OPENAI_API_KEY or LLM_API_URL required', isError: true };
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const headers: Record<string, string> = { 'Content-Type': 'application/json' };
|
|
32
|
-
if (apiKey) headers['Authorization'] = `Bearer ${apiKey}`;
|
|
33
|
-
|
|
34
|
-
const res = await fetch(apiUrl, {
|
|
35
|
-
method: 'POST', headers,
|
|
36
|
-
body: JSON.stringify({
|
|
37
|
-
model: process.env.LLM_MODEL || 'gpt-4o-mini',
|
|
38
|
-
messages: [{ role: 'user', content: prompt }],
|
|
39
|
-
}),
|
|
40
|
-
});
|
|
41
|
-
const data = await res.json() as { choices?: Array<{ message: { content: string } }> };
|
|
42
|
-
const translation = data.choices?.[0]?.message?.content ?? 'No translation generated';
|
|
43
|
-
return { content: translation };
|
|
44
|
-
} catch (err) {
|
|
45
|
-
return { content: `Translation error: ${(err as Error).message}`, isError: true };
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { MCPTool, MCPToolResult } from '../mcp';
|
|
2
|
-
|
|
3
|
-
export const TrelloTool: MCPTool = {
|
|
4
|
-
name: 'trello',
|
|
5
|
-
description: 'Interact with Trello: create cards, move cards, list boards. Requires TRELLO_API_KEY, TRELLO_TOKEN env vars.',
|
|
6
|
-
inputSchema: {
|
|
7
|
-
type: 'object',
|
|
8
|
-
properties: {
|
|
9
|
-
action: { type: 'string', enum: ['create_card', 'move_card', 'list_boards'], description: 'Action' },
|
|
10
|
-
list_id: { type: 'string', description: 'List ID (for create_card/move_card)' },
|
|
11
|
-
card_id: { type: 'string', description: 'Card ID (for move_card)' },
|
|
12
|
-
name: { type: 'string', description: 'Card name' },
|
|
13
|
-
description: { type: 'string', description: 'Card description' },
|
|
14
|
-
},
|
|
15
|
-
required: ['action'],
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
async execute(input: Record<string, unknown>): Promise<MCPToolResult> {
|
|
19
|
-
const key = process.env.TRELLO_API_KEY;
|
|
20
|
-
const token = process.env.TRELLO_TOKEN;
|
|
21
|
-
if (!key || !token) return { content: 'Error: TRELLO_API_KEY, TRELLO_TOKEN required', isError: true };
|
|
22
|
-
|
|
23
|
-
const auth = `key=${key}&token=${token}`;
|
|
24
|
-
const action = String(input.action ?? '');
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
if (action === 'create_card') {
|
|
28
|
-
if (!input.list_id || !input.name) return { content: 'Error: list_id, name required', isError: true };
|
|
29
|
-
const res = await fetch(`https://api.trello.com/1/cards?${auth}`, {
|
|
30
|
-
method: 'POST',
|
|
31
|
-
headers: { 'Content-Type': 'application/json' },
|
|
32
|
-
body: JSON.stringify({ idList: input.list_id, name: input.name, desc: input.description ?? '' }),
|
|
33
|
-
});
|
|
34
|
-
const data = await res.json() as Record<string, unknown>;
|
|
35
|
-
return { content: `Card created: ${data.shortUrl ?? data.id}` };
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (action === 'move_card') {
|
|
39
|
-
if (!input.card_id || !input.list_id) return { content: 'Error: card_id, list_id required', isError: true };
|
|
40
|
-
await fetch(`https://api.trello.com/1/cards/${input.card_id}?${auth}`, {
|
|
41
|
-
method: 'PUT',
|
|
42
|
-
headers: { 'Content-Type': 'application/json' },
|
|
43
|
-
body: JSON.stringify({ idList: input.list_id }),
|
|
44
|
-
});
|
|
45
|
-
return { content: `Card ${input.card_id} moved to list ${input.list_id}` };
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (action === 'list_boards') {
|
|
49
|
-
const res = await fetch(`https://api.trello.com/1/members/me/boards?${auth}`);
|
|
50
|
-
const data = await res.json() as Array<Record<string, unknown>>;
|
|
51
|
-
const summary = Array.isArray(data) ? data.map((b) => `${b.name} (${b.id})`).join('\n') : JSON.stringify(data);
|
|
52
|
-
return { content: summary };
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return { content: `Unknown action: ${action}`, isError: true };
|
|
56
|
-
} catch (err) {
|
|
57
|
-
return { content: `Trello error: ${(err as Error).message}`, isError: true };
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { MCPTool, MCPToolResult } from '../mcp';
|
|
2
|
-
|
|
3
|
-
export const VectorSearchTool: MCPTool = {
|
|
4
|
-
name: 'vector-search',
|
|
5
|
-
description: 'Search vector embeddings via DeepBrain or compatible API. Requires DEEPBRAIN_URL and DEEPBRAIN_API_KEY env vars.',
|
|
6
|
-
inputSchema: {
|
|
7
|
-
type: 'object',
|
|
8
|
-
properties: {
|
|
9
|
-
query: { type: 'string', description: 'Search query text' },
|
|
10
|
-
collection: { type: 'string', description: 'Collection/namespace to search' },
|
|
11
|
-
top_k: { type: 'number', description: 'Number of results (default: 5)' },
|
|
12
|
-
},
|
|
13
|
-
required: ['query'],
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
async execute(input: Record<string, unknown>): Promise<MCPToolResult> {
|
|
17
|
-
const baseUrl = process.env.DEEPBRAIN_URL;
|
|
18
|
-
const apiKey = process.env.DEEPBRAIN_API_KEY;
|
|
19
|
-
if (!baseUrl) return { content: 'Error: DEEPBRAIN_URL required', isError: true };
|
|
20
|
-
|
|
21
|
-
const query = String(input.query ?? '');
|
|
22
|
-
if (!query) return { content: 'Error: query required', isError: true };
|
|
23
|
-
|
|
24
|
-
try {
|
|
25
|
-
const headers: Record<string, string> = { 'Content-Type': 'application/json' };
|
|
26
|
-
if (apiKey) headers['Authorization'] = `Bearer ${apiKey}`;
|
|
27
|
-
|
|
28
|
-
const res = await fetch(`${baseUrl}/api/search`, {
|
|
29
|
-
method: 'POST', headers,
|
|
30
|
-
body: JSON.stringify({
|
|
31
|
-
query,
|
|
32
|
-
collection: input.collection ?? 'default',
|
|
33
|
-
top_k: Number(input.top_k ?? 5),
|
|
34
|
-
}),
|
|
35
|
-
});
|
|
36
|
-
const data = await res.json() as Record<string, unknown>;
|
|
37
|
-
return { content: JSON.stringify(data, null, 2).slice(0, 4000) };
|
|
38
|
-
} catch (err) {
|
|
39
|
-
return { content: `Vector search error: ${(err as Error).message}`, isError: true };
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
};
|