@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
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
describe('CalculatorPlugin', () => {
|
|
4
|
+
it('evaluates simple math expressions', async () => {
|
|
5
|
+
const { CalculatorPlugin } = await import('../src/plugins/builtin/calculator.js');
|
|
6
|
+
const plugin = new CalculatorPlugin();
|
|
7
|
+
const tools = plugin.getTools();
|
|
8
|
+
const mathTool = tools.find((t) => t.name === 'calc_math');
|
|
9
|
+
|
|
10
|
+
expect(mathTool).toBeDefined();
|
|
11
|
+
const result = await mathTool!.handler({ expression: '2 + 2' });
|
|
12
|
+
expect(result).toEqual({ expression: '2 + 2', result: 4 });
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('evaluates complex math expressions', async () => {
|
|
16
|
+
const { CalculatorPlugin } = await import('../src/plugins/builtin/calculator.js');
|
|
17
|
+
const plugin = new CalculatorPlugin();
|
|
18
|
+
const tools = plugin.getTools();
|
|
19
|
+
const mathTool = tools.find((t) => t.name === 'calc_math');
|
|
20
|
+
|
|
21
|
+
const result = await mathTool!.handler({ expression: 'sqrt(144) + pow(2, 3)' });
|
|
22
|
+
expect(result).toEqual({ expression: 'sqrt(144) + pow(2, 3)', result: 20 });
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('rejects invalid expressions', async () => {
|
|
26
|
+
const { CalculatorPlugin } = await import('../src/plugins/builtin/calculator.js');
|
|
27
|
+
const plugin = new CalculatorPlugin();
|
|
28
|
+
const tools = plugin.getTools();
|
|
29
|
+
const mathTool = tools.find((t) => t.name === 'calc_math');
|
|
30
|
+
|
|
31
|
+
await expect(mathTool!.handler({ expression: 'process.exit(0)' })).rejects.toThrow();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('converts units correctly', async () => {
|
|
35
|
+
const { CalculatorPlugin } = await import('../src/plugins/builtin/calculator.js');
|
|
36
|
+
const plugin = new CalculatorPlugin();
|
|
37
|
+
const tools = plugin.getTools();
|
|
38
|
+
const convertTool = tools.find((t) => t.name === 'calc_convert');
|
|
39
|
+
|
|
40
|
+
const result = await convertTool!.handler({ value: 1, from: 'km', to: 'mi' });
|
|
41
|
+
expect(result).toHaveProperty('result');
|
|
42
|
+
expect(Math.abs((result as any).result - 0.621371)).toBeLessThan(0.0001);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('calculates date differences', async () => {
|
|
46
|
+
const { CalculatorPlugin } = await import('../src/plugins/builtin/calculator.js');
|
|
47
|
+
const plugin = new CalculatorPlugin();
|
|
48
|
+
const tools = plugin.getTools();
|
|
49
|
+
const dateTool = tools.find((t) => t.name === 'calc_date');
|
|
50
|
+
|
|
51
|
+
const result = await dateTool!.handler({ date: '2024-01-01', end_date: '2024-01-31' });
|
|
52
|
+
expect(result).toHaveProperty('days', 30);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
describe('DockerPlugin', () => {
|
|
4
|
+
it('defines all expected tools', async () => {
|
|
5
|
+
const { DockerPlugin } = await import('../src/plugins/builtin/docker.js');
|
|
6
|
+
const plugin = new DockerPlugin();
|
|
7
|
+
const tools = plugin.getTools();
|
|
8
|
+
|
|
9
|
+
const toolNames = tools.map((t) => t.name);
|
|
10
|
+
expect(toolNames).toContain('docker_containers');
|
|
11
|
+
expect(toolNames).toContain('docker_container_logs');
|
|
12
|
+
expect(toolNames).toContain('docker_container_action');
|
|
13
|
+
expect(toolNames).toContain('docker_images');
|
|
14
|
+
expect(toolNames).toContain('docker_pull');
|
|
15
|
+
expect(toolNames).toContain('docker_run');
|
|
16
|
+
expect(toolNames).toContain('docker_volumes');
|
|
17
|
+
expect(toolNames).toContain('docker_networks');
|
|
18
|
+
expect(toolNames).toContain('docker_stats');
|
|
19
|
+
expect(tools.length).toBe(16);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('marks docker_run as requiring approval', async () => {
|
|
23
|
+
const { DockerPlugin } = await import('../src/plugins/builtin/docker.js');
|
|
24
|
+
const plugin = new DockerPlugin();
|
|
25
|
+
const tools = plugin.getTools();
|
|
26
|
+
|
|
27
|
+
const runTool = tools.find((t) => t.name === 'docker_run');
|
|
28
|
+
expect(runTool?.requiresApproval).toBe(true);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('has proper input schemas', async () => {
|
|
32
|
+
const { DockerPlugin } = await import('../src/plugins/builtin/docker.js');
|
|
33
|
+
const plugin = new DockerPlugin();
|
|
34
|
+
const tools = plugin.getTools();
|
|
35
|
+
|
|
36
|
+
for (const tool of tools) {
|
|
37
|
+
expect(tool.inputSchema).toHaveProperty('type');
|
|
38
|
+
expect(tool.inputSchema).toHaveProperty('properties');
|
|
39
|
+
expect(tool.description.length).toBeGreaterThan(0);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load Test — 100 concurrent tool calls against the calculator plugin.
|
|
3
|
+
*
|
|
4
|
+
* Validates that the plugin handles concurrent load without failures,
|
|
5
|
+
* circuit breaker trips, or unacceptable latency.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { describe, it, expect } from 'vitest';
|
|
9
|
+
import { CalculatorPlugin } from '../src/plugins/builtin/calculator.js';
|
|
10
|
+
import { CircuitBreaker } from '../src/core/circuit-breaker.js';
|
|
11
|
+
|
|
12
|
+
interface CallResult {
|
|
13
|
+
index: number;
|
|
14
|
+
expression: string;
|
|
15
|
+
latencyMs: number;
|
|
16
|
+
success: boolean;
|
|
17
|
+
error?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Calculate percentile from a sorted array of numbers.
|
|
22
|
+
*/
|
|
23
|
+
function percentile(sorted: number[], p: number): number {
|
|
24
|
+
if (sorted.length === 0) return 0;
|
|
25
|
+
const idx = Math.ceil((p / 100) * sorted.length) - 1;
|
|
26
|
+
return sorted[Math.max(0, idx)];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
describe('Load Test — 100 concurrent tool calls', () => {
|
|
30
|
+
it('handles 100 concurrent calc_math calls with 100% success rate', async () => {
|
|
31
|
+
const plugin = new CalculatorPlugin();
|
|
32
|
+
const tools = plugin.getTools();
|
|
33
|
+
const mathTool = tools.find((t) => t.name === 'calc_math');
|
|
34
|
+
expect(mathTool).toBeDefined();
|
|
35
|
+
|
|
36
|
+
// Dedicated circuit breaker for this test
|
|
37
|
+
const cb = new CircuitBreaker({ failureThreshold: 10, recoveryTimeout: 5000 });
|
|
38
|
+
|
|
39
|
+
const expressions = Array.from({ length: 100 }, (_, i) => {
|
|
40
|
+
const n = i + 1;
|
|
41
|
+
const exprs = [
|
|
42
|
+
`${n} + ${n * 2}`,
|
|
43
|
+
`sqrt(${n * 100})`,
|
|
44
|
+
`pow(${n}, 2)`,
|
|
45
|
+
`abs(-${n})`,
|
|
46
|
+
`${n} * ${n + 1} / ${n}`,
|
|
47
|
+
`ceil(${n}.7)`,
|
|
48
|
+
`floor(${n}.3)`,
|
|
49
|
+
`round(${n}.5)`,
|
|
50
|
+
`${n} % 7`,
|
|
51
|
+
`log(${n})`,
|
|
52
|
+
];
|
|
53
|
+
return exprs[i % exprs.length];
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const results: CallResult[] = [];
|
|
57
|
+
|
|
58
|
+
// Spawn all 100 calls concurrently
|
|
59
|
+
const promises = expressions.map((expression, index) =>
|
|
60
|
+
(async () => {
|
|
61
|
+
const start = performance.now();
|
|
62
|
+
try {
|
|
63
|
+
const result = await cb.execute(async () => mathTool!.handler({ expression }));
|
|
64
|
+
const latency = performance.now() - start;
|
|
65
|
+
results.push({ index, expression, latencyMs: latency, success: true });
|
|
66
|
+
return result;
|
|
67
|
+
} catch (err: unknown) {
|
|
68
|
+
const latency = performance.now() - start;
|
|
69
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
70
|
+
results.push({ index, expression, latencyMs: latency, success: false, error: msg });
|
|
71
|
+
// eslint-disable-next-line no-console
|
|
72
|
+
console.log(`FAIL [${index}]: "${expression}" => ${msg}`);
|
|
73
|
+
throw err;
|
|
74
|
+
}
|
|
75
|
+
})(),
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
// Wait for all to settle (don't throw on individual failures — we collect them)
|
|
79
|
+
await Promise.allSettled(promises);
|
|
80
|
+
|
|
81
|
+
// ── Statistics ──
|
|
82
|
+
const totalCalls = results.length;
|
|
83
|
+
const successCount = results.filter((r) => r.success).length;
|
|
84
|
+
const failCount = totalCalls - successCount;
|
|
85
|
+
const successRate = (successCount / totalCalls) * 100;
|
|
86
|
+
|
|
87
|
+
const latencies = results.map((r) => r.latencyMs).sort((a, b) => a - b);
|
|
88
|
+
const p50 = percentile(latencies, 50);
|
|
89
|
+
const p95 = percentile(latencies, 95);
|
|
90
|
+
const p99 = percentile(latencies, 99);
|
|
91
|
+
const min = latencies[0] ?? 0;
|
|
92
|
+
const max = latencies[latencies.length - 1] ?? 0;
|
|
93
|
+
const avg = latencies.reduce((sum, v) => sum + v, 0) / latencies.length;
|
|
94
|
+
|
|
95
|
+
// ── Circuit breaker status ──
|
|
96
|
+
const cbStatus = cb.getStatus();
|
|
97
|
+
|
|
98
|
+
// ── Summary table ──
|
|
99
|
+
const table = `
|
|
100
|
+
┌─────────────────────────────────────────────────────┐
|
|
101
|
+
│ LOAD TEST SUMMARY │
|
|
102
|
+
├─────────────────────────────────────────────────────┤
|
|
103
|
+
│ Total calls: ${String(totalCalls).padEnd(30)}│
|
|
104
|
+
│ Successful: ${String(successCount).padEnd(30)}│
|
|
105
|
+
│ Failed: ${String(failCount).padEnd(30)}│
|
|
106
|
+
│ Success rate: ${`${successRate.toFixed(1)}%`.padEnd(30)}│
|
|
107
|
+
├─────────────────────────────────────────────────────┤
|
|
108
|
+
│ Min latency: ${`${min.toFixed(2)}ms`.padEnd(30)}│
|
|
109
|
+
│ Avg latency: ${`${avg.toFixed(2)}ms`.padEnd(30)}│
|
|
110
|
+
│ P50 latency: ${`${p50.toFixed(2)}ms`.padEnd(30)}│
|
|
111
|
+
│ P95 latency: ${`${p95.toFixed(2)}ms`.padEnd(30)}│
|
|
112
|
+
│ P99 latency: ${`${p99.toFixed(2)}ms`.padEnd(30)}│
|
|
113
|
+
│ Max latency: ${`${max.toFixed(2)}ms`.padEnd(30)}│
|
|
114
|
+
├─────────────────────────────────────────────────────┤
|
|
115
|
+
│ Circuit breaker: ${cbStatus.state.padEnd(30)}│
|
|
116
|
+
│ CB failures: ${String(cbStatus.failures).padEnd(30)}│
|
|
117
|
+
└─────────────────────────────────────────────────────┘`;
|
|
118
|
+
|
|
119
|
+
// eslint-disable-next-line no-console
|
|
120
|
+
console.log(table);
|
|
121
|
+
|
|
122
|
+
// ── Assertions ──
|
|
123
|
+
expect(totalCalls).toBe(100);
|
|
124
|
+
expect(successRate).toBe(100);
|
|
125
|
+
expect(p99).toBeLessThan(500);
|
|
126
|
+
expect(cbStatus.state).toBe('closed');
|
|
127
|
+
expect(cbStatus.failures).toBe(0);
|
|
128
|
+
});
|
|
129
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
describe('MCP Server', () => {
|
|
4
|
+
it('exports startMCPServer function', async () => {
|
|
5
|
+
const { startMCPServer } = await import('../src/mcp/server.js');
|
|
6
|
+
expect(typeof startMCPServer).toBe('function');
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
it('builds tool registry with builtin tools', async () => {
|
|
10
|
+
// This tests that the MCP server can start and register tools
|
|
11
|
+
const { startMCPServer } = await import('../src/mcp/server.js');
|
|
12
|
+
expect(startMCPServer).toBeDefined();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
describe('ShellPlugin', () => {
|
|
4
|
+
it('defines all expected tools', async () => {
|
|
5
|
+
const { ShellPlugin } = await import('../src/plugins/builtin/shell.js');
|
|
6
|
+
const plugin = new ShellPlugin();
|
|
7
|
+
const tools = plugin.getTools();
|
|
8
|
+
|
|
9
|
+
const toolNames = tools.map((t) => t.name);
|
|
10
|
+
expect(toolNames).toContain('shell_run');
|
|
11
|
+
expect(toolNames).toContain('shell_read_file');
|
|
12
|
+
expect(toolNames).toContain('shell_write_file');
|
|
13
|
+
expect(toolNames).toContain('shell_list_dir');
|
|
14
|
+
expect(toolNames).toContain('shell_search_files');
|
|
15
|
+
expect(toolNames).toContain('shell_search_content');
|
|
16
|
+
expect(tools.length).toBe(6);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('marks write operations as requiring approval', async () => {
|
|
20
|
+
const { ShellPlugin } = await import('../src/plugins/builtin/shell.js');
|
|
21
|
+
const plugin = new ShellPlugin();
|
|
22
|
+
const tools = plugin.getTools();
|
|
23
|
+
|
|
24
|
+
const writeTool = tools.find((t) => t.name === 'shell_write_file');
|
|
25
|
+
expect(writeTool?.requiresApproval).toBe(true);
|
|
26
|
+
|
|
27
|
+
const runTool = tools.find((t) => t.name === 'shell_run');
|
|
28
|
+
expect(runTool?.requiresApproval).toBe(true);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('has proper input schemas', async () => {
|
|
32
|
+
const { ShellPlugin } = await import('../src/plugins/builtin/shell.js');
|
|
33
|
+
const plugin = new ShellPlugin();
|
|
34
|
+
const tools = plugin.getTools();
|
|
35
|
+
|
|
36
|
+
for (const tool of tools) {
|
|
37
|
+
expect(tool.inputSchema).toHaveProperty('type');
|
|
38
|
+
expect(tool.inputSchema).toHaveProperty('properties');
|
|
39
|
+
expect(tool.description.length).toBeGreaterThan(0);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
});
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "Node16",
|
|
5
|
+
"lib": ["ES2022"],
|
|
6
|
+
"moduleResolution": "Node16",
|
|
7
|
+
"outDir": "./dist",
|
|
8
|
+
"rootDir": "./src",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"declaration": true,
|
|
15
|
+
"declarationMap": true,
|
|
16
|
+
"sourceMap": true,
|
|
17
|
+
"removeComments": false
|
|
18
|
+
},
|
|
19
|
+
"include": ["src/**/*"],
|
|
20
|
+
"exclude": ["node_modules", "dist"]
|
|
21
|
+
}
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
globals: true,
|
|
6
|
+
environment: 'node',
|
|
7
|
+
include: ['tests/**/*.test.ts'],
|
|
8
|
+
coverage: {
|
|
9
|
+
provider: 'v8',
|
|
10
|
+
reporter: ['text', 'lcov'],
|
|
11
|
+
exclude: ['dist/', 'node_modules/', 'tests/', 'src/dashboard/', 'src/bot/', 'extensions/'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|