@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/src/cli/index.ts
ADDED
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { createRequire } from 'module';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
import { Conductor } from '../core/conductor.js';
|
|
6
|
+
import { PluginManager } from '../plugins/manager.js';
|
|
7
|
+
import { registerLifecycleCommands } from './commands/lifecycle.js';
|
|
8
|
+
|
|
9
|
+
const _require = createRequire(import.meta.url);
|
|
10
|
+
const { version: pkgVersion } = _require('../../package.json') as { version: string };
|
|
11
|
+
|
|
12
|
+
const program = new Command();
|
|
13
|
+
const conductor = new Conductor();
|
|
14
|
+
|
|
15
|
+
program
|
|
16
|
+
.name('conductor')
|
|
17
|
+
.description('The AI Tool Hub — One MCP server. 100+ tools. Every AI agent.')
|
|
18
|
+
.version(pkgVersion);
|
|
19
|
+
|
|
20
|
+
registerLifecycleCommands(program, conductor);
|
|
21
|
+
|
|
22
|
+
// ── AI ───────────────────────────────────────────────────────────────
|
|
23
|
+
const ai = program.command('ai').description('Configure AI providers');
|
|
24
|
+
|
|
25
|
+
ai.command('setup')
|
|
26
|
+
.description('Interactive AI provider setup')
|
|
27
|
+
.action(async () => {
|
|
28
|
+
const { setupAI } = await import('./commands/ai.js');
|
|
29
|
+
await setupAI(conductor);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
ai.command('test')
|
|
33
|
+
.description('Test current AI provider')
|
|
34
|
+
.action(async () => {
|
|
35
|
+
const { testAI } = await import('./commands/ai.js');
|
|
36
|
+
await testAI(conductor);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// ── MCP ──────────────────────────────────────────────────────────────
|
|
40
|
+
const mcp = program.command('mcp').description('MCP server management');
|
|
41
|
+
|
|
42
|
+
mcp
|
|
43
|
+
.command('setup')
|
|
44
|
+
.description('Configure MCP for Claude Desktop')
|
|
45
|
+
.action(async () => {
|
|
46
|
+
const { mcpSetup } = await import('./commands/mcp.js');
|
|
47
|
+
await mcpSetup(conductor);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
mcp
|
|
51
|
+
.command('status')
|
|
52
|
+
.description('Show MCP server status')
|
|
53
|
+
.action(async () => {
|
|
54
|
+
const { mcpStatus } = await import('./commands/mcp.js');
|
|
55
|
+
await mcpStatus(conductor);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
mcp
|
|
59
|
+
.command('start')
|
|
60
|
+
.description('Start MCP server (stdio)')
|
|
61
|
+
.action(async () => {
|
|
62
|
+
const { mcpStart } = await import('./commands/mcp.js');
|
|
63
|
+
await mcpStart(conductor);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
mcp
|
|
67
|
+
.command('remove')
|
|
68
|
+
.description('Remove MCP configuration')
|
|
69
|
+
.action(async () => {
|
|
70
|
+
const { mcpRemove } = await import('./commands/mcp.js');
|
|
71
|
+
await mcpRemove(conductor);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// ── Telegram ─────────────────────────────────────────────────────────
|
|
75
|
+
const telegram = program.command('telegram').description('Telegram bot');
|
|
76
|
+
|
|
77
|
+
telegram
|
|
78
|
+
.command('start')
|
|
79
|
+
.description('Start the Telegram bot')
|
|
80
|
+
.action(async () => {
|
|
81
|
+
const { TelegramBot } = await import('../bot/telegram.js');
|
|
82
|
+
await conductor.initialize();
|
|
83
|
+
const bot = new TelegramBot(conductor);
|
|
84
|
+
await bot.start();
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
telegram
|
|
88
|
+
.command('setup')
|
|
89
|
+
.description('Configure Telegram bot token')
|
|
90
|
+
.action(async () => {
|
|
91
|
+
const { telegramSetup } = await import('./commands/telegram.js');
|
|
92
|
+
await telegramSetup(conductor);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// ── Plugins (register both "plugins" and "plugin") ──────────────────
|
|
96
|
+
function registerPluginCommands(parent: Command, cmdName: string): void {
|
|
97
|
+
const cmd = parent.command(cmdName).description('Plugin management');
|
|
98
|
+
|
|
99
|
+
cmd
|
|
100
|
+
.command('list')
|
|
101
|
+
.description('List all plugins')
|
|
102
|
+
.action(async () => {
|
|
103
|
+
await conductor.initialize();
|
|
104
|
+
const pm = new PluginManager(conductor);
|
|
105
|
+
await pm.loadBuiltins();
|
|
106
|
+
|
|
107
|
+
const list = pm.listPlugins();
|
|
108
|
+
const enabledNames = conductor.getConfig().get<string[]>('plugins.enabled') || [];
|
|
109
|
+
|
|
110
|
+
console.log('');
|
|
111
|
+
console.log(` 🔌 Plugins (${list.length} available)\n`);
|
|
112
|
+
for (const p of list) {
|
|
113
|
+
const icon = enabledNames.includes(p.name) ? '🟢' : '⚪';
|
|
114
|
+
console.log(` ${icon} ${p.name}`);
|
|
115
|
+
console.log(` ${p.description}`);
|
|
116
|
+
console.log('');
|
|
117
|
+
}
|
|
118
|
+
if (enabledNames.length === 0) {
|
|
119
|
+
console.log(` Enable plugins with: conductor plugins enable <name>\n`);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
cmd
|
|
124
|
+
.command('enable')
|
|
125
|
+
.argument('<name>', 'Plugin name')
|
|
126
|
+
.description('Enable a plugin')
|
|
127
|
+
.action(async (name: string) => {
|
|
128
|
+
await conductor.initialize();
|
|
129
|
+
const pm = new PluginManager(conductor);
|
|
130
|
+
await pm.loadBuiltins();
|
|
131
|
+
try {
|
|
132
|
+
await pm.enablePlugin(name);
|
|
133
|
+
console.log(` ✓ Plugin "${name}" enabled`);
|
|
134
|
+
} catch (e: any) {
|
|
135
|
+
console.error(` ✗ ${e.message}`);
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
cmd
|
|
141
|
+
.command('disable')
|
|
142
|
+
.argument('<name>', 'Plugin name')
|
|
143
|
+
.description('Disable a plugin')
|
|
144
|
+
.action(async (name: string) => {
|
|
145
|
+
await conductor.initialize();
|
|
146
|
+
const pm = new PluginManager(conductor);
|
|
147
|
+
await pm.loadBuiltins();
|
|
148
|
+
try {
|
|
149
|
+
await pm.disablePlugin(name);
|
|
150
|
+
console.log(` ✓ Plugin "${name}" disabled`);
|
|
151
|
+
} catch (e: any) {
|
|
152
|
+
console.error(` ✗ ${e.message}`);
|
|
153
|
+
process.exit(1);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
cmd
|
|
158
|
+
.command('onboard')
|
|
159
|
+
.description('Interactive TUI — pick and configure plugins')
|
|
160
|
+
.action(async () => {
|
|
161
|
+
const { onboard } = await import('./commands/onboard.js');
|
|
162
|
+
await onboard(conductor);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
registerPluginCommands(program, 'plugins');
|
|
167
|
+
registerPluginCommands(program, 'plugin');
|
|
168
|
+
|
|
169
|
+
// ── Proactive (Autonomous) ──────────────────────────────────────────
|
|
170
|
+
const proactive = program.command('proactive').description('Autonomous agent management');
|
|
171
|
+
|
|
172
|
+
proactive
|
|
173
|
+
.command('start')
|
|
174
|
+
.description('Start the proactive autonomous loop')
|
|
175
|
+
.option('-i, --interval <minutes>', 'Interval between cycles', '30')
|
|
176
|
+
.action(async (options: { interval: string }) => {
|
|
177
|
+
await conductor.initialize();
|
|
178
|
+
await conductor.startProactiveMode(parseInt(options.interval));
|
|
179
|
+
|
|
180
|
+
// Keep process alive
|
|
181
|
+
console.log(`\n 🤖 Proactive mode active (every ${options.interval}m). Press Ctrl+C to stop.\n`);
|
|
182
|
+
process.on('SIGINT', async () => {
|
|
183
|
+
await conductor.stopProactiveMode();
|
|
184
|
+
process.exit(0);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// ── Google (Convenience Alias) ──────────────────────────────────────
|
|
189
|
+
program
|
|
190
|
+
.command('google')
|
|
191
|
+
.description('Alias for "auth google" — browser-based setup')
|
|
192
|
+
.option('-f, --file <path>', 'Import credentials from Google JSON file')
|
|
193
|
+
.action(async (options: { file?: string }) => {
|
|
194
|
+
const { GoogleAuthManager } = await import('../utils/google-auth.js');
|
|
195
|
+
await conductor.initialize();
|
|
196
|
+
const authManager = new GoogleAuthManager(conductor);
|
|
197
|
+
|
|
198
|
+
if (options.file) {
|
|
199
|
+
try {
|
|
200
|
+
await authManager.importFromJson(options.file);
|
|
201
|
+
} catch (error: any) {
|
|
202
|
+
console.error(`\n ❌ ${error.message}\n`);
|
|
203
|
+
process.exit(1);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const scopes = [
|
|
208
|
+
'https://www.googleapis.com/auth/gmail.modify',
|
|
209
|
+
'https://www.googleapis.com/auth/calendar',
|
|
210
|
+
'https://www.googleapis.com/auth/drive',
|
|
211
|
+
];
|
|
212
|
+
|
|
213
|
+
try {
|
|
214
|
+
await authManager.login({ scopes });
|
|
215
|
+
console.log('\n ✅ Google authentication successful!');
|
|
216
|
+
console.log(' 🔌 Gmail, Calendar, Drive, and Gemini are now ready.\n');
|
|
217
|
+
} catch (error: any) {
|
|
218
|
+
console.error(`\n ❌ Authentication failed: ${error.message}\n`);
|
|
219
|
+
process.exit(1);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
// ── Slack ──────────────────────────────────────────────────────────
|
|
224
|
+
const slack = program.command('slack').description('Slack bot management');
|
|
225
|
+
|
|
226
|
+
slack
|
|
227
|
+
.command('setup')
|
|
228
|
+
.description('Configure Slack Bot and App tokens')
|
|
229
|
+
.action(async () => {
|
|
230
|
+
const { Keychain } = await import('../security/keychain.js');
|
|
231
|
+
const { default: inquirer } = await import('inquirer');
|
|
232
|
+
await conductor.initialize();
|
|
233
|
+
const keychain = new Keychain(conductor.getConfig().getConfigDir());
|
|
234
|
+
|
|
235
|
+
console.log('\n 🤖 Slack Setup');
|
|
236
|
+
console.log(' To get these, create an app at: https://api.slack.com/apps');
|
|
237
|
+
console.log(' 1. Bot User OAuth Token (xoxb-...) in "OAuth & Permissions"');
|
|
238
|
+
console.log(' 2. App-Level Token (xapp-...) in "Basic Information"\n');
|
|
239
|
+
|
|
240
|
+
const answers = await inquirer.prompt([
|
|
241
|
+
{
|
|
242
|
+
type: 'password',
|
|
243
|
+
name: 'botToken',
|
|
244
|
+
message: 'Enter Slack Bot User OAuth Token (xoxb-):',
|
|
245
|
+
mask: '*',
|
|
246
|
+
validate: (input) => input.startsWith('xoxb-') || 'Must start with xoxb-',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
type: 'password',
|
|
250
|
+
name: 'appToken',
|
|
251
|
+
message: 'Enter Slack App-Level Token (xapp-):',
|
|
252
|
+
mask: '*',
|
|
253
|
+
validate: (input) => input.startsWith('xapp-') || 'Must start with xapp-',
|
|
254
|
+
},
|
|
255
|
+
]);
|
|
256
|
+
|
|
257
|
+
await keychain.set('slack', 'bot_token', answers.botToken);
|
|
258
|
+
await keychain.set('slack', 'app_token', answers.appToken);
|
|
259
|
+
|
|
260
|
+
console.log('\n ✅ Slack tokens saved to keychain.\n');
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
slack
|
|
264
|
+
.command('start')
|
|
265
|
+
.description('Start the Slack bot')
|
|
266
|
+
.action(async () => {
|
|
267
|
+
const { SlackBot } = await import('../bot/slack.js');
|
|
268
|
+
await conductor.initialize();
|
|
269
|
+
const bot = new SlackBot(conductor);
|
|
270
|
+
try {
|
|
271
|
+
await bot.start();
|
|
272
|
+
} catch (error: any) {
|
|
273
|
+
console.error(`\n ❌ ${error.message}\n`);
|
|
274
|
+
process.exit(1);
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
// ── Auth ───────────────────────────────────────────────────────────
|
|
279
|
+
const auth = program.command('auth').description('Authentication management');
|
|
280
|
+
|
|
281
|
+
auth
|
|
282
|
+
.command('google')
|
|
283
|
+
.description('Browser-based Google authentication')
|
|
284
|
+
.option('-f, --file <path>', 'Import credentials from Google JSON file')
|
|
285
|
+
.action(async (options: { file?: string }) => {
|
|
286
|
+
const { GoogleAuthManager } = await import('../utils/google-auth.js');
|
|
287
|
+
await conductor.initialize();
|
|
288
|
+
const authManager = new GoogleAuthManager(conductor);
|
|
289
|
+
|
|
290
|
+
if (options.file) {
|
|
291
|
+
try {
|
|
292
|
+
await authManager.importFromJson(options.file);
|
|
293
|
+
} catch (error: any) {
|
|
294
|
+
console.error(`\n ❌ ${error.message}\n`);
|
|
295
|
+
process.exit(1);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
const scopes = [
|
|
300
|
+
'https://www.googleapis.com/auth/gmail.modify',
|
|
301
|
+
'https://www.googleapis.com/auth/calendar',
|
|
302
|
+
'https://www.googleapis.com/auth/drive',
|
|
303
|
+
];
|
|
304
|
+
|
|
305
|
+
try {
|
|
306
|
+
await authManager.login({ scopes });
|
|
307
|
+
console.log('\n ✅ Google authentication successful!');
|
|
308
|
+
console.log(' 🔌 Gmail, Calendar, Drive, and Gemini are now ready.\n');
|
|
309
|
+
} catch (error: any) {
|
|
310
|
+
console.error(`\n ❌ Authentication failed: ${error.message}\n`);
|
|
311
|
+
process.exit(1);
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
// ── Marketplace ───────────────────────────────────────────────────────────────
|
|
316
|
+
program
|
|
317
|
+
.command('install')
|
|
318
|
+
.argument('<plugin>', 'Plugin ID to install (e.g. gmail, github, slack)')
|
|
319
|
+
.description('Install a plugin from the Conductor marketplace')
|
|
320
|
+
.action(async (pluginId: string) => {
|
|
321
|
+
const { installPlugin } = await import('./commands/marketplace.js');
|
|
322
|
+
await conductor.initialize();
|
|
323
|
+
await installPlugin(conductor, pluginId);
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
program
|
|
327
|
+
.command('uninstall')
|
|
328
|
+
.argument('<plugin>', 'Plugin ID to uninstall')
|
|
329
|
+
.description('Uninstall a marketplace plugin')
|
|
330
|
+
.action(async (pluginId: string) => {
|
|
331
|
+
const { uninstallPlugin } = await import('./commands/marketplace.js');
|
|
332
|
+
await conductor.initialize();
|
|
333
|
+
await uninstallPlugin(conductor, pluginId);
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
const marketplace = program.command('marketplace').description('Browse the Conductor plugin marketplace');
|
|
337
|
+
|
|
338
|
+
marketplace
|
|
339
|
+
.option('-s, --search <query>', 'Search plugins')
|
|
340
|
+
.option('-c, --category <category>', 'Filter by category')
|
|
341
|
+
.action(async (opts: { search?: string; category?: string }) => {
|
|
342
|
+
const { listMarketplace } = await import('./commands/marketplace.js');
|
|
343
|
+
await conductor.initialize();
|
|
344
|
+
await listMarketplace(conductor, opts);
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
marketplace
|
|
348
|
+
.command('info')
|
|
349
|
+
.argument('<plugin>', 'Plugin ID')
|
|
350
|
+
.description('Show details about a plugin')
|
|
351
|
+
.action(async (pluginId: string) => {
|
|
352
|
+
const { pluginInfo } = await import('./commands/marketplace.js');
|
|
353
|
+
await conductor.initialize();
|
|
354
|
+
await pluginInfo(conductor, pluginId);
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
// ── Dashboard ─────────────────────────────────────────────────────────
|
|
358
|
+
program
|
|
359
|
+
.command('dashboard')
|
|
360
|
+
.description('Open the Conductor web dashboard')
|
|
361
|
+
.option('-p, --port <port>', 'Port to run on', '4242')
|
|
362
|
+
.option('--no-open', 'Do not auto-open browser')
|
|
363
|
+
.action(async (opts: { port?: string; open?: boolean }) => {
|
|
364
|
+
const { dashboardCommand } = await import('../dashboard/cli.js');
|
|
365
|
+
await dashboardCommand(conductor, opts);
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
// ── Doctor ────────────────────────────────────────────────────────────
|
|
369
|
+
program
|
|
370
|
+
.command('doctor')
|
|
371
|
+
.description('Diagnose issues and check system health')
|
|
372
|
+
.action(async () => {
|
|
373
|
+
const { doctor } = await import('./commands/doctor.js');
|
|
374
|
+
await doctor(conductor);
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
// ── Plugin Create ─────────────────────────────────────────────────────
|
|
378
|
+
program
|
|
379
|
+
.command('plugin create')
|
|
380
|
+
.argument('<name>', 'Plugin name')
|
|
381
|
+
.description('Scaffold a new plugin with tests')
|
|
382
|
+
.action(async (name: string) => {
|
|
383
|
+
const { pluginCreate } = await import('./commands/plugin-create.js');
|
|
384
|
+
await pluginCreate(name);
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
// ── Health ────────────────────────────────────────────────────────────
|
|
388
|
+
program
|
|
389
|
+
.command('health')
|
|
390
|
+
.description('Show system health status')
|
|
391
|
+
.option('--json', 'Output as JSON')
|
|
392
|
+
.action(async (opts: { json?: boolean }) => {
|
|
393
|
+
await conductor.initialize();
|
|
394
|
+
const { HealthChecker } = await import('../core/health.js');
|
|
395
|
+
const checker = new HealthChecker();
|
|
396
|
+
const report = await checker.detailed(pkgVersion);
|
|
397
|
+
|
|
398
|
+
if (opts.json) {
|
|
399
|
+
console.log(JSON.stringify(report, null, 2));
|
|
400
|
+
} else {
|
|
401
|
+
console.log('');
|
|
402
|
+
console.log(` 🏥 Conductor Health — ${report.status.toUpperCase()}`);
|
|
403
|
+
console.log(` Version: ${report.version} | Uptime: ${report.uptime}s`);
|
|
404
|
+
console.log('');
|
|
405
|
+
for (const c of report.components) {
|
|
406
|
+
const icon = c.status === 'ok' ? '✅' : c.status === 'degraded' ? '⚠️' : '❌';
|
|
407
|
+
console.log(` ${icon} ${c.name}: ${c.status}${c.message ? ` — ${c.message}` : ''}`);
|
|
408
|
+
}
|
|
409
|
+
if (report.metrics) {
|
|
410
|
+
console.log('');
|
|
411
|
+
console.log(` 📊 Metrics:`);
|
|
412
|
+
console.log(` Tool calls: ${report.metrics.totalToolCalls} (${report.metrics.failedToolCalls} failed)`);
|
|
413
|
+
console.log(` Avg latency: ${report.metrics.avgLatencyMs}ms`);
|
|
414
|
+
console.log(` Active webhooks: ${report.metrics.activeWebhooks}`);
|
|
415
|
+
console.log(` Open circuits: ${report.metrics.openCircuits}`);
|
|
416
|
+
}
|
|
417
|
+
console.log('');
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
// ── Init (first-run wizard) ──────────────────────────────────────────────────
|
|
422
|
+
program
|
|
423
|
+
.command('init')
|
|
424
|
+
.description('First-run setup wizard — AI provider, plugins, and MCP client config')
|
|
425
|
+
.action(async () => {
|
|
426
|
+
const { init } = await import('./commands/init.js');
|
|
427
|
+
await init(conductor);
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
// ── Onboard ───────────────────────────────────────────────────────────
|
|
431
|
+
// Available as both `conductor onboard` and `conductor plugins onboard`
|
|
432
|
+
program
|
|
433
|
+
.command('onboard')
|
|
434
|
+
.description('Interactive TUI — pick and configure plugins')
|
|
435
|
+
.action(async () => {
|
|
436
|
+
const { onboard } = await import('./commands/onboard.js');
|
|
437
|
+
await onboard(conductor);
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
// ── Release ───────────────────────────────────────────────────────────
|
|
441
|
+
program
|
|
442
|
+
.command('release')
|
|
443
|
+
.description('Bump version, build, and publish to npm')
|
|
444
|
+
.action(async () => {
|
|
445
|
+
const { release } = await import('./commands/release.js');
|
|
446
|
+
await release();
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
// ── Run ──────────────────────────────────────────────────────────────
|
|
450
|
+
program.parse();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# src/config
|
|
2
|
+
|
|
3
|
+
Configuration helpers for Conductor, focused on OAuth flows and external service setup.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- `oauth.ts` - OAuth 2.0 flow handling for third-party service integrations
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
|
|
11
|
+
This module handles OAuth authentication flows for plugins that require user authorization (Google, GitHub, etc.). It manages token exchange, refresh, and storage. OAuth tokens are encrypted and stored securely via the keychain system.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Conductor } from '../core/conductor.js';
|
|
2
|
+
|
|
3
|
+
export interface OAuthCredentials {
|
|
4
|
+
clientId: string;
|
|
5
|
+
clientSecret: string;
|
|
6
|
+
redirectUri: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function getOAuthCredentials(conductor: Conductor, provider: string): OAuthCredentials {
|
|
10
|
+
const config = conductor.getConfig();
|
|
11
|
+
const searchProvider = provider === 'gemini' ? 'google' : provider;
|
|
12
|
+
const oauth = config.get<any>(`oauth.${searchProvider}`) || {};
|
|
13
|
+
|
|
14
|
+
const clientId = process.env.CONDUCTOR_GOOGLE_CLIENT_ID || oauth.clientId || '';
|
|
15
|
+
const clientSecret = process.env.CONDUCTOR_GOOGLE_CLIENT_SECRET || oauth.clientSecret || '';
|
|
16
|
+
const redirectUri =
|
|
17
|
+
process.env.CONDUCTOR_GOOGLE_REDIRECT_URI || oauth.redirectUri || 'http://localhost:3000/callback';
|
|
18
|
+
|
|
19
|
+
if (!clientId || !clientSecret) {
|
|
20
|
+
throw new Error(
|
|
21
|
+
`Google OAuth not configured. Run "conductor google" to setup your Client ID and Secret interactively.`,
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return { clientId, clientSecret, redirectUri };
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# src/core
|
|
2
|
+
|
|
3
|
+
Core orchestration layer for Conductor. Contains the central `Conductor` class and its dependencies.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- `conductor.ts` - Main orchestrator that owns ConfigManager, DatabaseManager, PluginManager, and AIManager
|
|
8
|
+
- `interfaces.ts` - Narrow interfaces (`IConfig`, `IDatabase`, `IPluginRegistry`) for dependency injection
|
|
9
|
+
- `config.ts` - Reads/writes `~/.conductor/config.json`
|
|
10
|
+
- `database.ts` - SQLite database via `sql.js` at `~/.conductor/conductor.db`
|
|
11
|
+
- `audit.ts` - SHA-256 chained append-only audit log at `~/.conductor/audit.log`
|
|
12
|
+
- `circuit-breaker.ts` - Per-tool circuit breaker for fault tolerance
|
|
13
|
+
- `retry.ts` - Exponential backoff retry logic
|
|
14
|
+
- `health.ts` - System health monitoring
|
|
15
|
+
- `webhooks.ts` - Webhook event handling
|
|
16
|
+
- `logger.ts` - Structured logging
|
|
17
|
+
- `errors.ts` - Custom error types
|
|
18
|
+
- `zero-config.ts` - Zero-configuration defaults
|
|
19
|
+
|
|
20
|
+
## Architecture
|
|
21
|
+
|
|
22
|
+
`Conductor` is the central hub. Consumers should depend on the interfaces in `interfaces.ts` rather than concrete classes. The core layer is initialized once and shared across the MCP server, CLI, bot, and dashboard.
|