@useconductor/conductor 1.0.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/.claude-plugin/marketplace.json +33 -0
- package/.claude-plugin/plugin.json +23 -0
- package/.eslintrc.json +23 -0
- package/.gitattributes +6 -0
- package/.github/FUNDING.yml +15 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +91 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +63 -0
- package/.github/ISSUE_TEMPLATE/plugin_request.yml +71 -0
- package/.github/README.md +13 -0
- package/.github/workflows/README.md +22 -0
- package/.github/workflows/auto-release.yml +112 -0
- package/.github/workflows/ci.yml +49 -0
- package/.github/workflows/claude-code-review.yml +44 -0
- package/.github/workflows/claude.yml +36 -0
- package/.github/workflows/sync-install.yml +47 -0
- package/.mcp.json +9 -0
- package/.prettierrc.json +7 -0
- package/C.png +0 -0
- package/CHANGELOG.md +74 -0
- package/CLAUDE.md +118 -0
- package/CONTRIBUTING.md +231 -0
- package/LICENSE +201 -0
- package/README.md +179 -0
- package/SECURITY.md +47 -0
- package/commands/conductor-setup.md +11 -0
- package/commands/conductor-status.md +7 -0
- package/dist/ai/base.d.ts +44 -0
- package/dist/ai/base.d.ts.map +1 -0
- package/dist/ai/base.js +47 -0
- package/dist/ai/base.js.map +1 -0
- package/dist/ai/claude.d.ts +11 -0
- package/dist/ai/claude.d.ts.map +1 -0
- package/dist/ai/claude.js +149 -0
- package/dist/ai/claude.js.map +1 -0
- package/dist/ai/gemini.d.ts +15 -0
- package/dist/ai/gemini.d.ts.map +1 -0
- package/dist/ai/gemini.js +156 -0
- package/dist/ai/gemini.js.map +1 -0
- package/dist/ai/maestro.d.ts +22 -0
- package/dist/ai/maestro.d.ts.map +1 -0
- package/dist/ai/maestro.js +142 -0
- package/dist/ai/maestro.js.map +1 -0
- package/dist/ai/manager.d.ts +47 -0
- package/dist/ai/manager.d.ts.map +1 -0
- package/dist/ai/manager.js +450 -0
- package/dist/ai/manager.js.map +1 -0
- package/dist/ai/ollama.d.ts +16 -0
- package/dist/ai/ollama.d.ts.map +1 -0
- package/dist/ai/ollama.js +151 -0
- package/dist/ai/ollama.js.map +1 -0
- package/dist/ai/openai.d.ts +11 -0
- package/dist/ai/openai.d.ts.map +1 -0
- package/dist/ai/openai.js +132 -0
- package/dist/ai/openai.js.map +1 -0
- package/dist/ai/openrouter.d.ts +11 -0
- package/dist/ai/openrouter.d.ts.map +1 -0
- package/dist/ai/openrouter.js +139 -0
- package/dist/ai/openrouter.js.map +1 -0
- package/dist/bot/slack.d.ts +17 -0
- package/dist/bot/slack.d.ts.map +1 -0
- package/dist/bot/slack.js +144 -0
- package/dist/bot/slack.js.map +1 -0
- package/dist/bot/telegram.d.ts +19 -0
- package/dist/bot/telegram.d.ts.map +1 -0
- package/dist/bot/telegram.js +157 -0
- package/dist/bot/telegram.js.map +1 -0
- package/dist/cli/commands/ai.d.ts +4 -0
- package/dist/cli/commands/ai.d.ts.map +1 -0
- package/dist/cli/commands/ai.js +161 -0
- package/dist/cli/commands/ai.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +18 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +213 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/init.d.ts +15 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +281 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/install.d.ts +16 -0
- package/dist/cli/commands/install.d.ts.map +1 -0
- package/dist/cli/commands/install.js +750 -0
- package/dist/cli/commands/install.js.map +1 -0
- package/dist/cli/commands/lifecycle.d.ts +4 -0
- package/dist/cli/commands/lifecycle.d.ts.map +1 -0
- package/dist/cli/commands/lifecycle.js +84 -0
- package/dist/cli/commands/lifecycle.js.map +1 -0
- package/dist/cli/commands/marketplace.d.ts +13 -0
- package/dist/cli/commands/marketplace.d.ts.map +1 -0
- package/dist/cli/commands/marketplace.js +197 -0
- package/dist/cli/commands/marketplace.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +6 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +83 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/onboard.d.ts +10 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -0
- package/dist/cli/commands/onboard.js +207 -0
- package/dist/cli/commands/onboard.js.map +1 -0
- package/dist/cli/commands/plugin-create.d.ts +13 -0
- package/dist/cli/commands/plugin-create.d.ts.map +1 -0
- package/dist/cli/commands/plugin-create.js +122 -0
- package/dist/cli/commands/plugin-create.js.map +1 -0
- package/dist/cli/commands/plugins.d.ts +5 -0
- package/dist/cli/commands/plugins.d.ts.map +1 -0
- package/dist/cli/commands/plugins.js +30 -0
- package/dist/cli/commands/plugins.js.map +1 -0
- package/dist/cli/commands/release.d.ts +13 -0
- package/dist/cli/commands/release.d.ts.map +1 -0
- package/dist/cli/commands/release.js +243 -0
- package/dist/cli/commands/release.js.map +1 -0
- package/dist/cli/commands/telegram.d.ts +3 -0
- package/dist/cli/commands/telegram.d.ts.map +1 -0
- package/dist/cli/commands/telegram.js +20 -0
- package/dist/cli/commands/telegram.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +402 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config/oauth.d.ts +8 -0
- package/dist/config/oauth.d.ts.map +1 -0
- package/dist/config/oauth.js +13 -0
- package/dist/config/oauth.js.map +1 -0
- package/dist/core/audit.d.ts +91 -0
- package/dist/core/audit.d.ts.map +1 -0
- package/dist/core/audit.js +233 -0
- package/dist/core/audit.js.map +1 -0
- package/dist/core/circuit-breaker.d.ts +56 -0
- package/dist/core/circuit-breaker.d.ts.map +1 -0
- package/dist/core/circuit-breaker.js +107 -0
- package/dist/core/circuit-breaker.js.map +1 -0
- package/dist/core/conductor.d.ts +44 -0
- package/dist/core/conductor.d.ts.map +1 -0
- package/dist/core/conductor.js +200 -0
- package/dist/core/conductor.js.map +1 -0
- package/dist/core/config.d.ts +66 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +86 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/database.d.ts +59 -0
- package/dist/core/database.d.ts.map +1 -0
- package/dist/core/database.js +342 -0
- package/dist/core/database.js.map +1 -0
- package/dist/core/errors.d.ts +231 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +254 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/health.d.ts +72 -0
- package/dist/core/health.d.ts.map +1 -0
- package/dist/core/health.js +116 -0
- package/dist/core/health.js.map +1 -0
- package/dist/core/interfaces.d.ts +62 -0
- package/dist/core/interfaces.d.ts.map +1 -0
- package/dist/core/interfaces.js +8 -0
- package/dist/core/interfaces.js.map +1 -0
- package/dist/core/logger.d.ts +15 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +30 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/rbac.d.ts +132 -0
- package/dist/core/rbac.d.ts.map +1 -0
- package/dist/core/rbac.js +230 -0
- package/dist/core/rbac.js.map +1 -0
- package/dist/core/retry.d.ts +22 -0
- package/dist/core/retry.d.ts.map +1 -0
- package/dist/core/retry.js +41 -0
- package/dist/core/retry.js.map +1 -0
- package/dist/core/webhooks.d.ts +92 -0
- package/dist/core/webhooks.d.ts.map +1 -0
- package/dist/core/webhooks.js +176 -0
- package/dist/core/webhooks.js.map +1 -0
- package/dist/core/zero-config.d.ts +22 -0
- package/dist/core/zero-config.d.ts.map +1 -0
- package/dist/core/zero-config.js +59 -0
- package/dist/core/zero-config.js.map +1 -0
- package/dist/dashboard/cli.d.ts +6 -0
- package/dist/dashboard/cli.d.ts.map +1 -0
- package/dist/dashboard/cli.js +42 -0
- package/dist/dashboard/cli.js.map +1 -0
- package/dist/dashboard/index.html +3426 -0
- package/dist/dashboard/server.d.ts +7 -0
- package/dist/dashboard/server.d.ts.map +1 -0
- package/dist/dashboard/server.js +1427 -0
- package/dist/dashboard/server.js.map +1 -0
- package/dist/mcp/server.d.ts +27 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +380 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/misc.d.ts +15 -0
- package/dist/mcp/tools/misc.d.ts.map +1 -0
- package/dist/mcp/tools/misc.js +49 -0
- package/dist/mcp/tools/misc.js.map +1 -0
- package/dist/plugins/builtin/calculator.d.ts +11 -0
- package/dist/plugins/builtin/calculator.d.ts.map +1 -0
- package/dist/plugins/builtin/calculator.js +166 -0
- package/dist/plugins/builtin/calculator.js.map +1 -0
- package/dist/plugins/builtin/colors.d.ts +15 -0
- package/dist/plugins/builtin/colors.d.ts.map +1 -0
- package/dist/plugins/builtin/colors.js +193 -0
- package/dist/plugins/builtin/colors.js.map +1 -0
- package/dist/plugins/builtin/cron.d.ts +40 -0
- package/dist/plugins/builtin/cron.d.ts.map +1 -0
- package/dist/plugins/builtin/cron.js +578 -0
- package/dist/plugins/builtin/cron.js.map +1 -0
- package/dist/plugins/builtin/crypto.d.ts +11 -0
- package/dist/plugins/builtin/crypto.d.ts.map +1 -0
- package/dist/plugins/builtin/crypto.js +83 -0
- package/dist/plugins/builtin/crypto.js.map +1 -0
- package/dist/plugins/builtin/database.d.ts +29 -0
- package/dist/plugins/builtin/database.d.ts.map +1 -0
- package/dist/plugins/builtin/database.js +230 -0
- package/dist/plugins/builtin/database.js.map +1 -0
- package/dist/plugins/builtin/docker.d.ts +12 -0
- package/dist/plugins/builtin/docker.d.ts.map +1 -0
- package/dist/plugins/builtin/docker.js +436 -0
- package/dist/plugins/builtin/docker.js.map +1 -0
- package/dist/plugins/builtin/fun.d.ts +11 -0
- package/dist/plugins/builtin/fun.d.ts.map +1 -0
- package/dist/plugins/builtin/fun.js +114 -0
- package/dist/plugins/builtin/fun.js.map +1 -0
- package/dist/plugins/builtin/gcal.d.ts +38 -0
- package/dist/plugins/builtin/gcal.d.ts.map +1 -0
- package/dist/plugins/builtin/gcal.js +280 -0
- package/dist/plugins/builtin/gcal.js.map +1 -0
- package/dist/plugins/builtin/gdrive.d.ts +26 -0
- package/dist/plugins/builtin/gdrive.d.ts.map +1 -0
- package/dist/plugins/builtin/gdrive.js +295 -0
- package/dist/plugins/builtin/gdrive.js.map +1 -0
- package/dist/plugins/builtin/github-actions.d.ts +38 -0
- package/dist/plugins/builtin/github-actions.d.ts.map +1 -0
- package/dist/plugins/builtin/github-actions.js +629 -0
- package/dist/plugins/builtin/github-actions.js.map +1 -0
- package/dist/plugins/builtin/github.d.ts +26 -0
- package/dist/plugins/builtin/github.d.ts.map +1 -0
- package/dist/plugins/builtin/github.js +800 -0
- package/dist/plugins/builtin/github.js.map +1 -0
- package/dist/plugins/builtin/gmail.d.ts +50 -0
- package/dist/plugins/builtin/gmail.d.ts.map +1 -0
- package/dist/plugins/builtin/gmail.js +445 -0
- package/dist/plugins/builtin/gmail.js.map +1 -0
- package/dist/plugins/builtin/hash.d.ts +11 -0
- package/dist/plugins/builtin/hash.d.ts.map +1 -0
- package/dist/plugins/builtin/hash.js +95 -0
- package/dist/plugins/builtin/hash.js.map +1 -0
- package/dist/plugins/builtin/homekit.d.ts +53 -0
- package/dist/plugins/builtin/homekit.d.ts.map +1 -0
- package/dist/plugins/builtin/homekit.js +341 -0
- package/dist/plugins/builtin/homekit.js.map +1 -0
- package/dist/plugins/builtin/index.d.ts +4 -0
- package/dist/plugins/builtin/index.d.ts.map +1 -0
- package/dist/plugins/builtin/index.js +96 -0
- package/dist/plugins/builtin/index.js.map +1 -0
- package/dist/plugins/builtin/jira.d.ts +50 -0
- package/dist/plugins/builtin/jira.d.ts.map +1 -0
- package/dist/plugins/builtin/jira.js +353 -0
- package/dist/plugins/builtin/jira.js.map +1 -0
- package/dist/plugins/builtin/linear.d.ts +35 -0
- package/dist/plugins/builtin/linear.d.ts.map +1 -0
- package/dist/plugins/builtin/linear.js +397 -0
- package/dist/plugins/builtin/linear.js.map +1 -0
- package/dist/plugins/builtin/lumen.d.ts +21 -0
- package/dist/plugins/builtin/lumen.d.ts.map +1 -0
- package/dist/plugins/builtin/lumen.js +404 -0
- package/dist/plugins/builtin/lumen.js.map +1 -0
- package/dist/plugins/builtin/memory.d.ts +22 -0
- package/dist/plugins/builtin/memory.d.ts.map +1 -0
- package/dist/plugins/builtin/memory.js +184 -0
- package/dist/plugins/builtin/memory.js.map +1 -0
- package/dist/plugins/builtin/n8n.d.ts +60 -0
- package/dist/plugins/builtin/n8n.d.ts.map +1 -0
- package/dist/plugins/builtin/n8n.js +519 -0
- package/dist/plugins/builtin/n8n.js.map +1 -0
- package/dist/plugins/builtin/network.d.ts +11 -0
- package/dist/plugins/builtin/network.d.ts.map +1 -0
- package/dist/plugins/builtin/network.js +88 -0
- package/dist/plugins/builtin/network.js.map +1 -0
- package/dist/plugins/builtin/notes.d.ts +47 -0
- package/dist/plugins/builtin/notes.d.ts.map +1 -0
- package/dist/plugins/builtin/notes.js +641 -0
- package/dist/plugins/builtin/notes.js.map +1 -0
- package/dist/plugins/builtin/notion.d.ts +47 -0
- package/dist/plugins/builtin/notion.d.ts.map +1 -0
- package/dist/plugins/builtin/notion.js +317 -0
- package/dist/plugins/builtin/notion.js.map +1 -0
- package/dist/plugins/builtin/shell.d.ts +12 -0
- package/dist/plugins/builtin/shell.d.ts.map +1 -0
- package/dist/plugins/builtin/shell.js +310 -0
- package/dist/plugins/builtin/shell.js.map +1 -0
- package/dist/plugins/builtin/slack.d.ts +31 -0
- package/dist/plugins/builtin/slack.d.ts.map +1 -0
- package/dist/plugins/builtin/slack.js +295 -0
- package/dist/plugins/builtin/slack.js.map +1 -0
- package/dist/plugins/builtin/spotify.d.ts +55 -0
- package/dist/plugins/builtin/spotify.d.ts.map +1 -0
- package/dist/plugins/builtin/spotify.js +623 -0
- package/dist/plugins/builtin/spotify.js.map +1 -0
- package/dist/plugins/builtin/stripe.d.ts +35 -0
- package/dist/plugins/builtin/stripe.d.ts.map +1 -0
- package/dist/plugins/builtin/stripe.js +376 -0
- package/dist/plugins/builtin/stripe.js.map +1 -0
- package/dist/plugins/builtin/system.d.ts +11 -0
- package/dist/plugins/builtin/system.d.ts.map +1 -0
- package/dist/plugins/builtin/system.js +91 -0
- package/dist/plugins/builtin/system.js.map +1 -0
- package/dist/plugins/builtin/text-tools.d.ts +11 -0
- package/dist/plugins/builtin/text-tools.d.ts.map +1 -0
- package/dist/plugins/builtin/text-tools.js +146 -0
- package/dist/plugins/builtin/text-tools.js.map +1 -0
- package/dist/plugins/builtin/timezone.d.ts +13 -0
- package/dist/plugins/builtin/timezone.d.ts.map +1 -0
- package/dist/plugins/builtin/timezone.js +164 -0
- package/dist/plugins/builtin/timezone.js.map +1 -0
- package/dist/plugins/builtin/todoist.d.ts +49 -0
- package/dist/plugins/builtin/todoist.d.ts.map +1 -0
- package/dist/plugins/builtin/todoist.js +540 -0
- package/dist/plugins/builtin/todoist.js.map +1 -0
- package/dist/plugins/builtin/translate.d.ts +11 -0
- package/dist/plugins/builtin/translate.d.ts.map +1 -0
- package/dist/plugins/builtin/translate.js +42 -0
- package/dist/plugins/builtin/translate.js.map +1 -0
- package/dist/plugins/builtin/url-tools.d.ts +11 -0
- package/dist/plugins/builtin/url-tools.d.ts.map +1 -0
- package/dist/plugins/builtin/url-tools.js +70 -0
- package/dist/plugins/builtin/url-tools.js.map +1 -0
- package/dist/plugins/builtin/vercel.d.ts +55 -0
- package/dist/plugins/builtin/vercel.d.ts.map +1 -0
- package/dist/plugins/builtin/vercel.js +514 -0
- package/dist/plugins/builtin/vercel.js.map +1 -0
- package/dist/plugins/builtin/weather.d.ts +13 -0
- package/dist/plugins/builtin/weather.d.ts.map +1 -0
- package/dist/plugins/builtin/weather.js +103 -0
- package/dist/plugins/builtin/weather.js.map +1 -0
- package/dist/plugins/builtin/x.d.ts +54 -0
- package/dist/plugins/builtin/x.d.ts.map +1 -0
- package/dist/plugins/builtin/x.js +402 -0
- package/dist/plugins/builtin/x.js.map +1 -0
- package/dist/plugins/manager.d.ts +77 -0
- package/dist/plugins/manager.d.ts.map +1 -0
- package/dist/plugins/manager.js +141 -0
- package/dist/plugins/manager.js.map +1 -0
- package/dist/plugins/validation.d.ts +18 -0
- package/dist/plugins/validation.d.ts.map +1 -0
- package/dist/plugins/validation.js +81 -0
- package/dist/plugins/validation.js.map +1 -0
- package/dist/security/auth.d.ts +23 -0
- package/dist/security/auth.d.ts.map +1 -0
- package/dist/security/auth.js +56 -0
- package/dist/security/auth.js.map +1 -0
- package/dist/security/keychain.d.ts +60 -0
- package/dist/security/keychain.d.ts.map +1 -0
- package/dist/security/keychain.js +213 -0
- package/dist/security/keychain.js.map +1 -0
- package/dist/utils/google-auth.d.ts +21 -0
- package/dist/utils/google-auth.d.ts.map +1 -0
- package/dist/utils/google-auth.js +135 -0
- package/dist/utils/google-auth.js.map +1 -0
- package/dist/utils/retry.d.ts +5 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/utils/retry.js +34 -0
- package/dist/utils/retry.js.map +1 -0
- package/docs/README.md +13 -0
- package/docs/api.md +210 -0
- package/docs/getting-started.md +100 -0
- package/docs/plugins.md +306 -0
- package/docs-site/.vitepress/config.ts +59 -0
- package/docs-site/README.md +12 -0
- package/docs-site/index.md +30 -0
- package/eslint.config.js +29 -0
- package/install.ps1 +334 -0
- package/install.sh +1119 -0
- package/local-install.sh +304 -0
- package/package.json +90 -0
- package/packages/README.md +11 -0
- package/packages/plugin-sdk/README.md +12 -0
- package/packages/plugin-sdk/package.json +22 -0
- package/packages/plugin-sdk/src/README.md +11 -0
- package/packages/plugin-sdk/src/index.ts +191 -0
- package/sdks/README.md +26 -0
- package/sdks/csharp/ConductorClient.cs +65 -0
- package/sdks/csharp/README.md +11 -0
- package/sdks/go/README.md +11 -0
- package/sdks/go/conductor.go +257 -0
- package/sdks/java/ConductorClient.java +27 -0
- package/sdks/java/README.md +11 -0
- package/sdks/php/README.md +11 -0
- package/sdks/php/src/Client.php +72 -0
- package/sdks/python/README.md +12 -0
- package/sdks/python/conductor/__init__.py +227 -0
- package/sdks/python/pyproject.toml +30 -0
- package/sdks/ruby/README.md +11 -0
- package/sdks/ruby/lib/conductor.rb +46 -0
- package/sdks/rust/Cargo.toml +14 -0
- package/sdks/rust/README.md +11 -0
- package/sdks/swift/README.md +11 -0
- package/sdks/swift/Sources/Conductor/ConductorClient.swift +65 -0
- package/skills/conductor-mcp/SKILL.md +38 -0
- package/src/README.md +20 -0
- package/src/ai/README.md +18 -0
- package/src/ai/base.ts +93 -0
- package/src/ai/claude.ts +162 -0
- package/src/ai/gemini.ts +188 -0
- package/src/ai/maestro.ts +168 -0
- package/src/ai/manager.ts +537 -0
- package/src/ai/ollama.ts +186 -0
- package/src/ai/openai.ts +147 -0
- package/src/ai/openrouter.ts +152 -0
- package/src/bot/README.md +12 -0
- package/src/bot/slack.ts +164 -0
- package/src/bot/telegram.ts +185 -0
- package/src/cli/README.md +24 -0
- package/src/cli/commands/README.md +20 -0
- package/src/cli/commands/ai.ts +170 -0
- package/src/cli/commands/doctor.ts +221 -0
- package/src/cli/commands/init.ts +348 -0
- package/src/cli/commands/install.ts +792 -0
- package/src/cli/commands/lifecycle.ts +95 -0
- package/src/cli/commands/marketplace.ts +253 -0
- package/src/cli/commands/mcp.ts +92 -0
- package/src/cli/commands/onboard.ts +248 -0
- package/src/cli/commands/plugin-create.ts +130 -0
- package/src/cli/commands/plugins.ts +36 -0
- package/src/cli/commands/release.ts +251 -0
- package/src/cli/commands/telegram.ts +25 -0
- package/src/cli/index.ts +450 -0
- package/src/config/README.md +11 -0
- package/src/config/oauth.ts +26 -0
- package/src/core/README.md +22 -0
- package/src/core/audit.ts +291 -0
- package/src/core/circuit-breaker.ts +129 -0
- package/src/core/conductor.ts +240 -0
- package/src/core/config.ts +149 -0
- package/src/core/database.ts +411 -0
- package/src/core/errors.ts +275 -0
- package/src/core/health.ts +159 -0
- package/src/core/interfaces.ts +75 -0
- package/src/core/logger.ts +33 -0
- package/src/core/rbac.ts +321 -0
- package/src/core/retry.ts +61 -0
- package/src/core/webhooks.ts +234 -0
- package/src/core/zero-config.ts +72 -0
- package/src/dashboard/README.md +15 -0
- package/src/dashboard/cli.ts +48 -0
- package/src/dashboard/index.html +3426 -0
- package/src/dashboard/server.ts +1544 -0
- package/src/mcp/README.md +20 -0
- package/src/mcp/server.ts +475 -0
- package/src/mcp/tools/README.md +11 -0
- package/src/mcp/tools/misc.ts +61 -0
- package/src/plugins/README.md +28 -0
- package/src/plugins/builtin/README.md +23 -0
- package/src/plugins/builtin/calculator.ts +178 -0
- package/src/plugins/builtin/colors.ts +201 -0
- package/src/plugins/builtin/cron.ts +649 -0
- package/src/plugins/builtin/crypto.ts +85 -0
- package/src/plugins/builtin/database.ts +235 -0
- package/src/plugins/builtin/docker.ts +426 -0
- package/src/plugins/builtin/fun.ts +118 -0
- package/src/plugins/builtin/gcal.ts +305 -0
- package/src/plugins/builtin/gdrive.ts +326 -0
- package/src/plugins/builtin/github-actions.ts +666 -0
- package/src/plugins/builtin/github.ts +912 -0
- package/src/plugins/builtin/gmail.ts +492 -0
- package/src/plugins/builtin/hash.ts +98 -0
- package/src/plugins/builtin/homekit.ts +389 -0
- package/src/plugins/builtin/index.ts +116 -0
- package/src/plugins/builtin/jira.ts +380 -0
- package/src/plugins/builtin/linear.ts +448 -0
- package/src/plugins/builtin/lumen.ts +497 -0
- package/src/plugins/builtin/memory.ts +200 -0
- package/src/plugins/builtin/n8n.ts +565 -0
- package/src/plugins/builtin/network.ts +92 -0
- package/src/plugins/builtin/notes.ts +689 -0
- package/src/plugins/builtin/notion.ts +348 -0
- package/src/plugins/builtin/shell.ts +334 -0
- package/src/plugins/builtin/slack.ts +327 -0
- package/src/plugins/builtin/spotify.ts +665 -0
- package/src/plugins/builtin/stripe.ts +388 -0
- package/src/plugins/builtin/system.ts +93 -0
- package/src/plugins/builtin/text-tools.ts +150 -0
- package/src/plugins/builtin/timezone.ts +173 -0
- package/src/plugins/builtin/todoist.ts +625 -0
- package/src/plugins/builtin/translate.ts +47 -0
- package/src/plugins/builtin/url-tools.ts +73 -0
- package/src/plugins/builtin/vercel.ts +546 -0
- package/src/plugins/builtin/weather.ts +112 -0
- package/src/plugins/builtin/x.ts +440 -0
- package/src/plugins/manager.ts +213 -0
- package/src/plugins/validation.ts +94 -0
- package/src/security/README.md +12 -0
- package/src/security/auth.ts +72 -0
- package/src/security/keychain.ts +226 -0
- package/src/utils/README.md +12 -0
- package/src/utils/google-auth.ts +159 -0
- package/src/utils/retry.ts +41 -0
- package/test-all.mjs +1256 -0
- package/test.mjs +633 -0
- package/tests/README.md +19 -0
- package/tests/calculator.test.ts +54 -0
- package/tests/docker.test.ts +42 -0
- package/tests/load.test.ts +129 -0
- package/tests/mcp.test.ts +14 -0
- package/tests/shell.test.ts +42 -0
- package/tsconfig.json +21 -0
- package/vitest.config.ts +14 -0
package/C.png
ADDED
|
Binary file
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Conductor will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] — 2026-04-03
|
|
9
|
+
|
|
10
|
+
### The AI Tool Hub Release
|
|
11
|
+
|
|
12
|
+
Conductor is now the single MCP server that gives any AI agent access to 100+ tools.
|
|
13
|
+
|
|
14
|
+
#### Added
|
|
15
|
+
- **MCP Server v2** — Rewritten from scratch with metrics, dual transport (stdio + HTTP/SSE), auto-discovery
|
|
16
|
+
- **Zod Validation** — Every tool input validated before execution, zero `any` type leaks
|
|
17
|
+
- **Audit Logging** — Tamper-evident SHA-256 chained logs for every tool call, config change, auth event
|
|
18
|
+
- **Circuit Breakers** — Per-tool circuit breakers prevent cascading failures (closed → open → half_open)
|
|
19
|
+
- **Automatic Retries** — Exponential backoff with jitter on all transient failures
|
|
20
|
+
- **Health Check System** — `/health`, `/health/detailed`, `/health/ready` endpoints with per-plugin status
|
|
21
|
+
- **Webhook System** — Event-driven plugin communication with HMAC signatures, retry, failure tracking
|
|
22
|
+
- **Plugin SDK** — `@conductor/plugin-sdk` with type-safe plugin creation, Zod validation, testing utilities
|
|
23
|
+
- **SDKs for 8 Languages** — TypeScript, Python (complete), Go (complete), Rust, Java, Ruby, PHP, C#, Swift
|
|
24
|
+
- **CLI Enhancements** — `conductor doctor` (full system diagnosis), `conductor plugin create` (scaffold), `conductor health`
|
|
25
|
+
- **New Plugins** — Docker (9 tools), Databases (PostgreSQL/MySQL/MongoDB/Redis), Shell (safe execution with approval)
|
|
26
|
+
- **Gemini Tool Support** — Implemented function calling (was chat-only)
|
|
27
|
+
- **Ollama Tool Support** — Implemented tool calling via `/api/chat` tools parameter (was chat-only)
|
|
28
|
+
- **Rate Limiting** — All HTTP endpoints protected with `express-rate-limit`
|
|
29
|
+
- **Structured Logging** — Pino with pretty-print in dev, JSON in production
|
|
30
|
+
- **ESLint + Prettier** — Configured and passing
|
|
31
|
+
- **Vitest** — Real test framework with coverage reporting
|
|
32
|
+
- **CI Pipeline** — GitHub Actions: typecheck, lint, format, test, build across Node 18/20/22
|
|
33
|
+
- **Documentation** — Getting started, plugin development, webhook system, security, SDKs
|
|
34
|
+
- **CHANGELOG.md** — This file
|
|
35
|
+
- **SECURITY.md** — Updated with v1.0.0 positioning
|
|
36
|
+
- **`.env.example`** — All environment variables documented
|
|
37
|
+
|
|
38
|
+
#### Changed
|
|
39
|
+
- **Package renamed** — `@thealxlabs/conductor` → `@conductor/cli`
|
|
40
|
+
- **Version bumped** — 0.1.0 → 1.0.0
|
|
41
|
+
- **README rewritten** — "The AI Tool Hub" positioning
|
|
42
|
+
- **Calculator** — Replaced `new Function()` with `mathjs` (zero RCE risk)
|
|
43
|
+
- **Dashboard shell endpoint** — Removed (410 Gone), replaced `exec()` with `execFile()` whitelist
|
|
44
|
+
- **Plugin imports** — All 13 external plugins integrated with adapted imports
|
|
45
|
+
- **`ToolInput` type** — Changed from `Record<string, any>` to `Record<string, unknown>`
|
|
46
|
+
|
|
47
|
+
#### Fixed
|
|
48
|
+
- **Security** — Removed shell endpoint, replaced eval patterns, added rate limiting
|
|
49
|
+
- **Calculator** — No more `new Function()` execution
|
|
50
|
+
- **n8n plugin** — Removed personal URL from source comments
|
|
51
|
+
- **Spotify plugin** — Removed dead imports (crypto, fs/promises, http, path)
|
|
52
|
+
- **Plugin READMEs** — All 13 updated with correct tool names
|
|
53
|
+
- **Destructive operations** — Added `requiresApproval: true` to delete/merge/cancel tools
|
|
54
|
+
- **TypeScript errors** — All resolved, clean compilation
|
|
55
|
+
|
|
56
|
+
#### Removed
|
|
57
|
+
- Dashboard shell endpoint (`POST /api/system/shell` → 410 Gone)
|
|
58
|
+
- Process listing endpoint (`GET /api/system/processes` → 410 Gone)
|
|
59
|
+
- `new Function()` from calculator plugin
|
|
60
|
+
- `exec()` from dashboard (replaced with `execFile()`)
|
|
61
|
+
- Hand-rolled test scripts (replaced with Vitest)
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## [0.1.0] — 2026-03-01
|
|
66
|
+
|
|
67
|
+
### Initial Release
|
|
68
|
+
|
|
69
|
+
- Universal AI integration hub
|
|
70
|
+
- 6 AI providers (Claude, OpenAI, Gemini, Ollama, OpenRouter, Maestro)
|
|
71
|
+
- 27 plugins, 150+ tools
|
|
72
|
+
- MCP server, Slack bot, Telegram bot, web dashboard, HTTP API
|
|
73
|
+
- Google OAuth, encrypted keychain (AES-256-GCM)
|
|
74
|
+
- Proactive autonomous mode
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run build # Compile TypeScript → dist/
|
|
9
|
+
npm run dev # Watch mode (tsx watch)
|
|
10
|
+
npm test # Run all tests (vitest)
|
|
11
|
+
npm run test:watch # Watch mode tests
|
|
12
|
+
npm run test:coverage # Coverage report
|
|
13
|
+
npm run typecheck # Type-check without emit
|
|
14
|
+
npm run lint # ESLint
|
|
15
|
+
npm run lint:fix # ESLint with auto-fix
|
|
16
|
+
npm run format # Prettier
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Run a single test file:**
|
|
20
|
+
```bash
|
|
21
|
+
npx vitest run tests/calculator.test.ts
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Run the CLI locally (without building):**
|
|
25
|
+
```bash
|
|
26
|
+
npx tsx src/cli/index.ts <command>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**After building, run the CLI:**
|
|
30
|
+
```bash
|
|
31
|
+
node dist/cli/index.js <command>
|
|
32
|
+
# or if globally linked:
|
|
33
|
+
conductor <command>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Tests live in `tests/` and match `**/*.test.ts`. The `postbuild` script copies `src/dashboard/index.html` to `dist/dashboard/index.html` — if you add other static assets to `src/dashboard/`, add them to the postbuild script too.
|
|
37
|
+
|
|
38
|
+
## Architecture
|
|
39
|
+
|
|
40
|
+
Conductor is an **MCP (Model Context Protocol) server** that exposes a plugin system as tools to AI agents. The codebase is ESM TypeScript (`"type": "module"`, `Node16` module resolution). All imports must use `.js` extensions even for `.ts` source files.
|
|
41
|
+
|
|
42
|
+
### Core Object Model
|
|
43
|
+
|
|
44
|
+
`Conductor` (`src/core/conductor.ts`) is the central orchestrator. It owns:
|
|
45
|
+
- `ConfigManager` — reads/writes `~/.conductor/config.json`
|
|
46
|
+
- `DatabaseManager` — SQLite via `sql.js` at `~/.conductor/conductor.db`
|
|
47
|
+
- `PluginManager` — lazy-initializes plugins on first use
|
|
48
|
+
- `AIManager` — multi-provider AI (Claude, OpenAI, Gemini, Ollama)
|
|
49
|
+
|
|
50
|
+
Consumers should depend on the narrow interfaces in `src/core/interfaces.ts` (`IConfig`, `IDatabase`, `IPluginRegistry`) rather than the concrete classes.
|
|
51
|
+
|
|
52
|
+
### Plugin System
|
|
53
|
+
|
|
54
|
+
Every capability is a plugin implementing the `Plugin` interface (`src/plugins/manager.ts`):
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
interface Plugin {
|
|
58
|
+
name: string; description: string; version: string;
|
|
59
|
+
initialize(conductor: Conductor): Promise<void>;
|
|
60
|
+
isConfigured(): boolean;
|
|
61
|
+
getTools(): PluginTool[];
|
|
62
|
+
configSchema?: PluginConfigSchema; // for `conductor config setup <plugin>`
|
|
63
|
+
getContext?(): Promise<string | null>; // proactive reasoning cycle
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Plugins are **lazily initialized** — `PluginManager.getPlugin(name)` initializes on first call. All builtins are in `src/plugins/builtin/` and registered via `src/plugins/builtin/index.ts`. External plugins drop `.js` files into `~/.conductor/plugins/`. Current builtin count: ~35 plugins including github (20 tools), slack, gmail, notion, gcal, gdrive, docker, shell, vercel, n8n, github-actions, linear, jira, stripe, spotify, x, homekit, todoist, lumen, and 15+ zero-config utilities.
|
|
68
|
+
|
|
69
|
+
Secret credentials use `configSchema.fields[].secret = true` and are stored in the OS keychain, not `config.json`.
|
|
70
|
+
|
|
71
|
+
### MCP Server (`src/mcp/server.ts`)
|
|
72
|
+
|
|
73
|
+
The MCP server wraps every plugin tool with:
|
|
74
|
+
1. **Circuit breaker** per tool (`src/core/circuit-breaker.ts`) — opens after repeated failures
|
|
75
|
+
2. **Retry with exponential backoff** (`src/core/retry.ts`)
|
|
76
|
+
3. **Audit logging** (`src/core/audit.ts`) — SHA-256 chained append-only log at `~/.conductor/audit.log`
|
|
77
|
+
4. **Metrics** — in-memory call counts and latency per tool
|
|
78
|
+
5. **Zod validation** (`src/plugins/validation.ts`) — validates inputs before handler invocation
|
|
79
|
+
|
|
80
|
+
Transport: `StdioServerTransport` for AI agent integration; HTTP/SSE for the dashboard.
|
|
81
|
+
|
|
82
|
+
### Dashboard (`src/dashboard/`)
|
|
83
|
+
|
|
84
|
+
Express server (`server.ts`) serving a single-page app (`index.html`). The CLI (`cli.ts`) in the same directory exposes dashboard commands. The dashboard consumes metrics, audit, health, and webhook data from the MCP server's shared state.
|
|
85
|
+
|
|
86
|
+
### CLI (`src/cli/`)
|
|
87
|
+
|
|
88
|
+
Built with `commander`. Entry point: `src/cli/index.ts`. Commands live in `src/cli/commands/`:
|
|
89
|
+
- `init.ts` — first-run wizard (AI provider + plugin picker + client config)
|
|
90
|
+
- `plugins.ts` — enable/disable/list/install
|
|
91
|
+
- `onboard.ts` — interactive TUI plugin picker (also accessible as `plugins onboard`)
|
|
92
|
+
- `mcp.ts` — start/setup MCP server
|
|
93
|
+
- `lifecycle.ts` — start/stop/status
|
|
94
|
+
- `doctor.ts` — system health diagnostics
|
|
95
|
+
- `marketplace.ts` — plugin marketplace (`conductor plugins install <id>` downloads from GitHub raw)
|
|
96
|
+
- `plugin-create.ts` — scaffold new plugins
|
|
97
|
+
|
|
98
|
+
`install.sh` in root: one-line bash installer (`curl -fsSL .../install.sh | bash`). Checks Node ≥ 18, installs `@conductor/cli` globally, prompts to run `conductor init`.
|
|
99
|
+
|
|
100
|
+
### Config Storage
|
|
101
|
+
|
|
102
|
+
All state lives under `~/.conductor/`:
|
|
103
|
+
- `config.json` — non-secret settings
|
|
104
|
+
- `conductor.db` — SQLite conversation history + activity log
|
|
105
|
+
- `audit.log` — tamper-evident audit chain (JSONL)
|
|
106
|
+
- `plugins/` — external plugin `.js` files
|
|
107
|
+
- `.key` — machine-bound encryption key (AES-256-GCM)
|
|
108
|
+
|
|
109
|
+
### Security Model
|
|
110
|
+
|
|
111
|
+
- Shell plugin uses a whitelist allowlist — no `eval()` or `exec()`
|
|
112
|
+
- Dangerous tools set `requiresApproval: true` on `PluginTool`
|
|
113
|
+
- Secrets are AES-256-GCM encrypted, key derived from machine ID
|
|
114
|
+
- All HTTP endpoints behind `express-rate-limit`
|
|
115
|
+
|
|
116
|
+
### Bot Runtime (`src/bot/`)
|
|
117
|
+
|
|
118
|
+
Telegram bot and Slack bolt integration share the same `Conductor` instance. The proactive reasoning cycle runs on a timer, calling `plugin.getContext()` on each enabled plugin and feeding results to the AI manager.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# Contributing to Conductor
|
|
2
|
+
|
|
3
|
+
## Adding a New Plugin
|
|
4
|
+
|
|
5
|
+
Conductor plugins live in `src/plugins/builtin/`. Each plugin is a single TypeScript file
|
|
6
|
+
that exports a class implementing the `Plugin` interface.
|
|
7
|
+
|
|
8
|
+
### 1. Create the plugin file
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
// src/plugins/builtin/myplugin.ts
|
|
12
|
+
|
|
13
|
+
import { Plugin, PluginTool, PluginConfigSchema } from '../manager.js';
|
|
14
|
+
import { Conductor } from '../../core/conductor.js';
|
|
15
|
+
import { Keychain } from '../../security/keychain.js';
|
|
16
|
+
|
|
17
|
+
export class MyPlugin implements Plugin {
|
|
18
|
+
name = 'myplugin';
|
|
19
|
+
description = 'Short description shown in the dashboard';
|
|
20
|
+
version = '1.0.0';
|
|
21
|
+
|
|
22
|
+
// Required credentials, shown in dashboard Settings
|
|
23
|
+
configSchema: PluginConfigSchema = {
|
|
24
|
+
fields: [
|
|
25
|
+
{
|
|
26
|
+
key: 'api_key',
|
|
27
|
+
label: 'API Key',
|
|
28
|
+
type: 'password',
|
|
29
|
+
required: true,
|
|
30
|
+
secret: true, // Store in encrypted keychain
|
|
31
|
+
service: 'myplugin', // Keychain service name
|
|
32
|
+
description: 'Your MyPlugin API key from https://myplugin.com/settings',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
setupInstructions: '1. Go to myplugin.com/settings. 2. Copy your API key.',
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
private keychain!: Keychain;
|
|
39
|
+
|
|
40
|
+
async initialize(conductor: Conductor): Promise<void> {
|
|
41
|
+
this.keychain = new Keychain(conductor.getConfig().getConfigDir());
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
isConfigured(): boolean {
|
|
45
|
+
// Return true to allow lazy validation in tool handlers.
|
|
46
|
+
// The dashboard checks configSchema.fields against the keychain.
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Optional: provide context for the proactive reasoning cycle
|
|
51
|
+
async getContext(): Promise<string | null> {
|
|
52
|
+
try {
|
|
53
|
+
// Return a short summary string or null if nothing to report
|
|
54
|
+
const apiKey = await this.keychain.get('myplugin', 'api_key');
|
|
55
|
+
if (!apiKey) return null;
|
|
56
|
+
// ... fetch data ...
|
|
57
|
+
return '[MYPLUGIN] 3 pending items';
|
|
58
|
+
} catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
getTools(): PluginTool[] {
|
|
64
|
+
return [
|
|
65
|
+
{
|
|
66
|
+
name: 'myplugin_do_thing',
|
|
67
|
+
description: 'Do something with MyPlugin',
|
|
68
|
+
inputSchema: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
properties: {
|
|
71
|
+
query: { type: 'string', description: 'What to do' },
|
|
72
|
+
},
|
|
73
|
+
required: ['query'],
|
|
74
|
+
},
|
|
75
|
+
handler: async (input: { query: string }) => {
|
|
76
|
+
try {
|
|
77
|
+
const apiKey = await this.keychain.get('myplugin', 'api_key');
|
|
78
|
+
if (!apiKey) {
|
|
79
|
+
return 'MyPlugin not configured. Set your API key in the dashboard.';
|
|
80
|
+
}
|
|
81
|
+
// ... call the API ...
|
|
82
|
+
return `Result: done`;
|
|
83
|
+
} catch (err: any) {
|
|
84
|
+
return `Error: ${err.message}`;
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 2. Register in the plugin index
|
|
94
|
+
|
|
95
|
+
Edit `src/plugins/builtin/index.ts`:
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
import { MyPlugin } from './myplugin.js';
|
|
99
|
+
|
|
100
|
+
export function getAllBuiltinPlugins(): Plugin[] {
|
|
101
|
+
return [
|
|
102
|
+
// ... existing plugins ...
|
|
103
|
+
new MyPlugin(),
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 3. Register credentials in the dashboard server
|
|
109
|
+
|
|
110
|
+
Edit `src/dashboard/server.ts`:
|
|
111
|
+
|
|
112
|
+
Add to `PLUGIN_REQUIRED_CREDS`:
|
|
113
|
+
```typescript
|
|
114
|
+
'myplugin': [{ service: 'myplugin', key: 'api_key' }],
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Add to `KNOWN_CREDENTIALS`:
|
|
118
|
+
```typescript
|
|
119
|
+
{ service: 'myplugin', key: 'api_key' },
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Add to `ALL_PLUGINS`:
|
|
123
|
+
```typescript
|
|
124
|
+
const ALL_PLUGINS: readonly string[] = [
|
|
125
|
+
// ... existing ...
|
|
126
|
+
'myplugin',
|
|
127
|
+
] as const;
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 4. Build and test
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npm run build
|
|
134
|
+
node test-all.mjs --skip-auth
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Plugin Design Guidelines
|
|
140
|
+
|
|
141
|
+
### Tool handlers
|
|
142
|
+
- Always wrap the entire handler body in `try { ... } catch (err: any) { return \`Error: ${err.message}\`; }`
|
|
143
|
+
- Never `throw` from a handler — always return an error string
|
|
144
|
+
- Return either a plain string or a `Record<string, unknown>` object
|
|
145
|
+
- For destructive operations (delete, shell exec), add `requiresApproval: true`
|
|
146
|
+
|
|
147
|
+
### Credentials
|
|
148
|
+
- All secrets must go through `Keychain.set/get()` — never store raw secrets in config
|
|
149
|
+
- `configSchema` must describe every credential field with `secret: true` and `service: 'yourservice'`
|
|
150
|
+
- `isConfigured()` is synchronous — use it only as a hint; do real validation in the handler
|
|
151
|
+
|
|
152
|
+
### Zod validation (for new plugins)
|
|
153
|
+
Use Zod to validate handler inputs for robust error messages:
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
import { z, ZodError } from 'zod';
|
|
157
|
+
|
|
158
|
+
handler: async (rawInput: Record<string, unknown>) => {
|
|
159
|
+
try {
|
|
160
|
+
const schema = z.object({
|
|
161
|
+
query: z.string().min(1, 'query is required'),
|
|
162
|
+
limit: z.number().int().min(1).max(100).optional().default(10),
|
|
163
|
+
});
|
|
164
|
+
const { query, limit } = schema.parse(rawInput);
|
|
165
|
+
// ... use validated inputs ...
|
|
166
|
+
} catch (err: unknown) {
|
|
167
|
+
if (err instanceof ZodError) {
|
|
168
|
+
return `Validation error: ${err.issues.map(e => `${e.path.join('.')}: ${e.message}`).join('; ')}`;
|
|
169
|
+
}
|
|
170
|
+
return `Error: ${(err as Error).message}`;
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Credential Patterns
|
|
178
|
+
|
|
179
|
+
| Type | Keychain service | Key | Notes |
|
|
180
|
+
|------|-----------------|-----|-------|
|
|
181
|
+
| API key | plugin name | `api_key` | Standard |
|
|
182
|
+
| OAuth access token | `google` | `access_token` | Shared across Google plugins |
|
|
183
|
+
| OAuth refresh token | `google` | `refresh_token` | Auto-refreshed |
|
|
184
|
+
| Bot token | plugin name | `bot_token` | Telegram, Slack |
|
|
185
|
+
| Personal access token | `github` | `token` | GitHub |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Tool Schema Format
|
|
190
|
+
|
|
191
|
+
Tool `inputSchema` uses JSON Schema:
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
inputSchema: {
|
|
195
|
+
type: 'object',
|
|
196
|
+
properties: {
|
|
197
|
+
required_string: { type: 'string', description: '...' },
|
|
198
|
+
optional_number: { type: 'number', description: '...' },
|
|
199
|
+
optional_boolean: { type: 'boolean', description: '...' },
|
|
200
|
+
string_array: { type: 'array', items: { type: 'string' } },
|
|
201
|
+
},
|
|
202
|
+
required: ['required_string'],
|
|
203
|
+
},
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## TypeScript
|
|
209
|
+
|
|
210
|
+
- Run `npm run build` to compile
|
|
211
|
+
- Run `./node_modules/.bin/tsc --noEmit` to type-check without emitting
|
|
212
|
+
- All new code must compile without TypeScript errors before merging
|
|
213
|
+
- Use `// eslint-disable-next-line @typescript-eslint/no-explicit-any` only when necessary
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Testing
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Full suite
|
|
221
|
+
node test-all.mjs
|
|
222
|
+
|
|
223
|
+
# Skip tests requiring auth tokens
|
|
224
|
+
node test-all.mjs --skip-auth
|
|
225
|
+
|
|
226
|
+
# Run only new plugin tests
|
|
227
|
+
node test-all.mjs --suite newplugins
|
|
228
|
+
|
|
229
|
+
# Performance benchmarks
|
|
230
|
+
node test-all.mjs --suite bench
|
|
231
|
+
```
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Alexander Wondwossen
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|