@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,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conductor Plugin Create — scaffold a new plugin with tests.
|
|
3
|
+
*
|
|
4
|
+
* Usage: conductor plugin create my-plugin
|
|
5
|
+
*
|
|
6
|
+
* Generates:
|
|
7
|
+
* plugins/my-plugin/
|
|
8
|
+
* ├── index.ts — Plugin source
|
|
9
|
+
* ├── index.test.ts — Tests
|
|
10
|
+
* └── package.json — Plugin metadata
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import fs from 'fs/promises';
|
|
14
|
+
import path from 'path';
|
|
15
|
+
|
|
16
|
+
export async function pluginCreate(name: string): Promise<void> {
|
|
17
|
+
const pluginDir = path.join(process.cwd(), 'plugins', name);
|
|
18
|
+
|
|
19
|
+
// Check if plugin already exists
|
|
20
|
+
try {
|
|
21
|
+
await fs.access(pluginDir);
|
|
22
|
+
console.error(`\n ❌ Plugin "${name}" already exists at ${pluginDir}\n`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
} catch {
|
|
25
|
+
// Directory doesn't exist — good
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Create directory structure
|
|
29
|
+
await fs.mkdir(pluginDir, { recursive: true });
|
|
30
|
+
|
|
31
|
+
// Generate plugin source
|
|
32
|
+
const pluginSource = `/**
|
|
33
|
+
* ${name} — Auto-generated Conductor plugin
|
|
34
|
+
*
|
|
35
|
+
* Edit this file to add your tools.
|
|
36
|
+
* Run: conductor plugins enable ${name}
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
import { Plugin, PluginTool } from '../../src/plugins/manager.js';
|
|
40
|
+
import { Conductor } from '../../src/core/conductor.js';
|
|
41
|
+
|
|
42
|
+
export class ${pascalCase(name)}Plugin implements Plugin {
|
|
43
|
+
name = '${name}';
|
|
44
|
+
description = 'TODO: Describe your plugin';
|
|
45
|
+
version = '1.0.0';
|
|
46
|
+
|
|
47
|
+
async initialize(_conductor: Conductor): Promise<void> {}
|
|
48
|
+
isConfigured(): boolean { return true; }
|
|
49
|
+
|
|
50
|
+
getTools(): PluginTool[] {
|
|
51
|
+
return [
|
|
52
|
+
{
|
|
53
|
+
name: '${name}_hello',
|
|
54
|
+
description: 'Say hello',
|
|
55
|
+
inputSchema: {
|
|
56
|
+
type: 'object',
|
|
57
|
+
properties: {
|
|
58
|
+
name: { type: 'string', description: 'Name to greet' },
|
|
59
|
+
},
|
|
60
|
+
required: ['name'],
|
|
61
|
+
},
|
|
62
|
+
handler: async (input: { name: string }) => {
|
|
63
|
+
return { message: \`Hello, \${input.name}!\` };
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
|
|
71
|
+
// Generate test file
|
|
72
|
+
const testSource = `import { describe, it, expect } from 'vitest';
|
|
73
|
+
import { ${pascalCase(name)}Plugin } from './index.js';
|
|
74
|
+
|
|
75
|
+
describe('${pascalCase(name)}Plugin', () => {
|
|
76
|
+
it('defines tools correctly', () => {
|
|
77
|
+
const plugin = new ${pascalCase(name)}Plugin();
|
|
78
|
+
const tools = plugin.getTools();
|
|
79
|
+
expect(tools.length).toBeGreaterThan(0);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('hello tool works', async () => {
|
|
83
|
+
const plugin = new ${pascalCase(name)}Plugin();
|
|
84
|
+
const tools = plugin.getTools();
|
|
85
|
+
const helloTool = tools.find(t => t.name === '${name}_hello');
|
|
86
|
+
expect(helloTool).toBeDefined();
|
|
87
|
+
|
|
88
|
+
const result = await helloTool!.handler({ name: 'World' });
|
|
89
|
+
expect(result).toEqual({ message: 'Hello, World!' });
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
`;
|
|
93
|
+
|
|
94
|
+
// Generate package.json
|
|
95
|
+
const pkgJson = {
|
|
96
|
+
name: `@conductor/plugin-${name}`,
|
|
97
|
+
version: '1.0.0',
|
|
98
|
+
description: `Conductor plugin: ${name}`,
|
|
99
|
+
type: 'module',
|
|
100
|
+
main: 'index.ts',
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// Write files
|
|
104
|
+
await fs.writeFile(path.join(pluginDir, 'index.ts'), pluginSource);
|
|
105
|
+
await fs.writeFile(path.join(pluginDir, 'index.test.ts'), testSource);
|
|
106
|
+
await fs.writeFile(path.join(pluginDir, 'package.json'), JSON.stringify(pkgJson, null, 2));
|
|
107
|
+
|
|
108
|
+
console.log('');
|
|
109
|
+
console.log(` ✅ Plugin "${name}" created at ${pluginDir}`);
|
|
110
|
+
console.log('');
|
|
111
|
+
console.log(' 📁 Files created:');
|
|
112
|
+
console.log(` ├── index.ts — Plugin source`);
|
|
113
|
+
console.log(` ├── index.test.ts — Tests`);
|
|
114
|
+
console.log(` └── package.json — Metadata`);
|
|
115
|
+
console.log('');
|
|
116
|
+
console.log(' 🚀 Next steps:');
|
|
117
|
+
console.log(` 1. Edit plugins/${name}/index.ts to add your tools`);
|
|
118
|
+
console.log(` 2. Run: npm test`);
|
|
119
|
+
console.log(` 3. Run: conductor plugins enable ${name}`);
|
|
120
|
+
console.log('');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function pascalCase(str: string): string {
|
|
124
|
+
return str
|
|
125
|
+
.replace(/[^a-zA-Z0-9]/g, ' ')
|
|
126
|
+
.split(' ')
|
|
127
|
+
.filter(Boolean)
|
|
128
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
129
|
+
.join('');
|
|
130
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Plugin command logic is now inline in src/cli/index.ts.
|
|
2
|
+
// This file exists for backward compatibility with any imports.
|
|
3
|
+
import { Conductor } from '../../core/conductor.js';
|
|
4
|
+
import { PluginManager } from '../../plugins/manager.js';
|
|
5
|
+
|
|
6
|
+
export async function listPlugins(conductor: Conductor): Promise<void> {
|
|
7
|
+
await conductor.initialize();
|
|
8
|
+
const pm = new PluginManager(conductor);
|
|
9
|
+
await pm.loadBuiltins();
|
|
10
|
+
const list = pm.listPlugins();
|
|
11
|
+
const enabled = conductor.getConfig().get<string[]>('plugins.enabled') || [];
|
|
12
|
+
|
|
13
|
+
console.log('');
|
|
14
|
+
console.log(` 🔌 Plugins (${list.length} available)\n`);
|
|
15
|
+
for (const p of list) {
|
|
16
|
+
const icon = enabled.includes(p.name) ? '🟢' : '⚪';
|
|
17
|
+
console.log(` ${icon} ${p.name}`);
|
|
18
|
+
console.log(` ${p.description}\n`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export async function enablePlugin(conductor: Conductor, name: string): Promise<void> {
|
|
23
|
+
await conductor.initialize();
|
|
24
|
+
const pm = new PluginManager(conductor);
|
|
25
|
+
await pm.loadBuiltins();
|
|
26
|
+
await pm.enablePlugin(name);
|
|
27
|
+
console.log(` ✓ Plugin "${name}" enabled`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export async function disablePlugin(conductor: Conductor, name: string): Promise<void> {
|
|
31
|
+
await conductor.initialize();
|
|
32
|
+
const pm = new PluginManager(conductor);
|
|
33
|
+
await pm.loadBuiltins();
|
|
34
|
+
await pm.disablePlugin(name);
|
|
35
|
+
console.log(` ✓ Plugin "${name}" disabled`);
|
|
36
|
+
}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* conductor release — automated npm publish with version bump
|
|
3
|
+
*
|
|
4
|
+
* Handles the full release pipeline:
|
|
5
|
+
* 1. Check npm auth + git state
|
|
6
|
+
* 2. Run tests + typecheck
|
|
7
|
+
* 3. Bump version (patch / minor / major / explicit)
|
|
8
|
+
* 4. Build
|
|
9
|
+
* 5. npm publish --access public
|
|
10
|
+
* 6. git tag + push
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import chalk from 'chalk';
|
|
14
|
+
import inquirer from 'inquirer';
|
|
15
|
+
import { execFile } from 'child_process';
|
|
16
|
+
import { promisify } from 'util';
|
|
17
|
+
import { readFile, writeFile } from 'fs/promises';
|
|
18
|
+
import { createRequire } from 'module';
|
|
19
|
+
import path from 'path';
|
|
20
|
+
import { fileURLToPath } from 'url';
|
|
21
|
+
|
|
22
|
+
const exec = promisify(execFile);
|
|
23
|
+
const _require = createRequire(import.meta.url);
|
|
24
|
+
|
|
25
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
26
|
+
const PKG_PATH = path.resolve(__dirname, '../../../package.json');
|
|
27
|
+
|
|
28
|
+
// ── Helpers ───────────────────────────────────────────────────────────────────
|
|
29
|
+
|
|
30
|
+
function step(msg: string) {
|
|
31
|
+
process.stdout.write(`\n ${chalk.dim('▶')} ${msg}…`);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function ok(detail?: string) {
|
|
35
|
+
process.stdout.write(` ${chalk.green('✓')}${detail ? chalk.dim(' ' + detail) : ''}\n`);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function fail(msg: string): never {
|
|
39
|
+
process.stdout.write(` ${chalk.red('✗')}\n`);
|
|
40
|
+
console.error(`\n ${chalk.red('Error:')} ${msg}\n`);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async function run(cmd: string, args: string[], cwd?: string): Promise<string> {
|
|
45
|
+
try {
|
|
46
|
+
const { stdout } = await exec(cmd, args, { cwd: cwd ?? process.cwd() });
|
|
47
|
+
return stdout.trim();
|
|
48
|
+
} catch (e: any) {
|
|
49
|
+
throw new Error(e.stderr?.trim() || e.message);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function bumpVersion(current: string, bump: 'patch' | 'minor' | 'major'): string {
|
|
54
|
+
const parts = current.replace(/^v/, '').split('.').map(Number);
|
|
55
|
+
if (bump === 'major') { parts[0]++; parts[1] = 0; parts[2] = 0; }
|
|
56
|
+
else if (bump === 'minor') { parts[1]++; parts[2] = 0; }
|
|
57
|
+
else { parts[2]++; }
|
|
58
|
+
return parts.join('.');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ── Main ──────────────────────────────────────────────────────────────────────
|
|
62
|
+
|
|
63
|
+
export async function release(): Promise<void> {
|
|
64
|
+
console.log('');
|
|
65
|
+
console.log(chalk.bold(' ╔══════════════════════════════════════╗'));
|
|
66
|
+
console.log(chalk.bold(' ║') + chalk.hex('#FF8C00')(' ♦ Conductor — Release to npm ') + chalk.bold('║'));
|
|
67
|
+
console.log(chalk.bold(' ╚══════════════════════════════════════╝'));
|
|
68
|
+
console.log('');
|
|
69
|
+
|
|
70
|
+
// ── 1. Read current package.json ────────────────────────────────────────────
|
|
71
|
+
const pkgRaw = await readFile(PKG_PATH, 'utf8');
|
|
72
|
+
const pkg = JSON.parse(pkgRaw) as { name: string; version: string };
|
|
73
|
+
const currentVersion = pkg.version;
|
|
74
|
+
|
|
75
|
+
console.log(chalk.dim(` Package: ${chalk.white(pkg.name)} v${currentVersion}`));
|
|
76
|
+
|
|
77
|
+
// ── 2. Check npm auth ───────────────────────────────────────────────────────
|
|
78
|
+
step('Checking npm auth');
|
|
79
|
+
try {
|
|
80
|
+
const whoami = await run('npm', ['whoami']);
|
|
81
|
+
ok(whoami);
|
|
82
|
+
} catch {
|
|
83
|
+
fail('Not logged in to npm. Run: npm login');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// ── 3. Check git is clean ───────────────────────────────────────────────────
|
|
87
|
+
step('Checking git status');
|
|
88
|
+
try {
|
|
89
|
+
const status = await run('git', ['status', '--porcelain']);
|
|
90
|
+
if (status.length > 0) {
|
|
91
|
+
fail('Working tree is not clean. Commit or stash changes first.');
|
|
92
|
+
}
|
|
93
|
+
ok('clean');
|
|
94
|
+
} catch (e: any) {
|
|
95
|
+
if (e.message.includes('Working tree')) throw e;
|
|
96
|
+
fail(e.message);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// ── 4. Version bump prompt ──────────────────────────────────────────────────
|
|
100
|
+
console.log('');
|
|
101
|
+
const { bumpType } = await inquirer.prompt<{ bumpType: string }>([
|
|
102
|
+
{
|
|
103
|
+
type: 'list',
|
|
104
|
+
name: 'bumpType',
|
|
105
|
+
message: `Version bump (current: ${chalk.white('v' + currentVersion)}):`,
|
|
106
|
+
choices: [
|
|
107
|
+
{
|
|
108
|
+
name: `patch → v${bumpVersion(currentVersion, 'patch')} (bug fixes)`,
|
|
109
|
+
value: 'patch',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: `minor → v${bumpVersion(currentVersion, 'minor')} (new features)`,
|
|
113
|
+
value: 'minor',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: `major → v${bumpVersion(currentVersion, 'major')} (breaking changes)`,
|
|
117
|
+
value: 'major',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'custom — enter version manually',
|
|
121
|
+
value: 'custom',
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
default: 'patch',
|
|
125
|
+
},
|
|
126
|
+
]);
|
|
127
|
+
|
|
128
|
+
let newVersion: string;
|
|
129
|
+
if (bumpType === 'custom') {
|
|
130
|
+
const { customVersion } = await inquirer.prompt<{ customVersion: string }>([
|
|
131
|
+
{
|
|
132
|
+
type: 'input',
|
|
133
|
+
name: 'customVersion',
|
|
134
|
+
message: 'Enter version (e.g. 1.2.3 or 1.2.3-beta.1):',
|
|
135
|
+
validate: (v) => /^\d+\.\d+\.\d+/.test(v) || 'Must be semver (e.g. 1.2.3)',
|
|
136
|
+
},
|
|
137
|
+
]);
|
|
138
|
+
newVersion = customVersion.replace(/^v/, '');
|
|
139
|
+
} else {
|
|
140
|
+
newVersion = bumpVersion(currentVersion, bumpType as 'patch' | 'minor' | 'major');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const { confirmed } = await inquirer.prompt<{ confirmed: boolean }>([
|
|
144
|
+
{
|
|
145
|
+
type: 'confirm',
|
|
146
|
+
name: 'confirmed',
|
|
147
|
+
message: `Publish ${chalk.white(pkg.name + '@' + newVersion)} to npm?`,
|
|
148
|
+
default: true,
|
|
149
|
+
},
|
|
150
|
+
]);
|
|
151
|
+
|
|
152
|
+
if (!confirmed) {
|
|
153
|
+
console.log(chalk.dim('\n Aborted.\n'));
|
|
154
|
+
process.exit(0);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// ── 5. Typecheck ────────────────────────────────────────────────────────────
|
|
158
|
+
step('Type-checking');
|
|
159
|
+
try {
|
|
160
|
+
await run('npx', ['tsc', '--noEmit']);
|
|
161
|
+
ok();
|
|
162
|
+
} catch (e: any) {
|
|
163
|
+
fail(`TypeScript errors:\n${e.message}`);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// ── 6. Tests ─────────────────────────────────────────────────────────────────
|
|
167
|
+
step('Running tests');
|
|
168
|
+
try {
|
|
169
|
+
await run('npx', ['vitest', 'run', '--reporter=dot']);
|
|
170
|
+
ok();
|
|
171
|
+
} catch (e: any) {
|
|
172
|
+
const { skipTests } = await inquirer.prompt<{ skipTests: boolean }>([
|
|
173
|
+
{
|
|
174
|
+
type: 'confirm',
|
|
175
|
+
name: 'skipTests',
|
|
176
|
+
message: chalk.yellow('Tests failed. Publish anyway?'),
|
|
177
|
+
default: false,
|
|
178
|
+
},
|
|
179
|
+
]);
|
|
180
|
+
if (!skipTests) {
|
|
181
|
+
console.log(chalk.dim('\n Aborted.\n'));
|
|
182
|
+
process.exit(1);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ── 7. Bump version in package.json ─────────────────────────────────────────
|
|
187
|
+
step(`Bumping version to ${newVersion}`);
|
|
188
|
+
pkg.version = newVersion;
|
|
189
|
+
await writeFile(PKG_PATH, JSON.stringify(pkg, null, 2) + '\n', 'utf8');
|
|
190
|
+
ok();
|
|
191
|
+
|
|
192
|
+
// ── 8. Build ─────────────────────────────────────────────────────────────────
|
|
193
|
+
step('Building');
|
|
194
|
+
try {
|
|
195
|
+
await run('npm', ['run', 'build']);
|
|
196
|
+
ok();
|
|
197
|
+
} catch (e: any) {
|
|
198
|
+
// Restore version on build failure
|
|
199
|
+
const restored = JSON.parse(pkgRaw) as { version: string };
|
|
200
|
+
restored.version = currentVersion;
|
|
201
|
+
await writeFile(PKG_PATH, JSON.stringify(restored, null, 2) + '\n', 'utf8');
|
|
202
|
+
fail(`Build failed:\n${e.message}`);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// ── 9. npm publish ───────────────────────────────────────────────────────────
|
|
206
|
+
step(`Publishing ${pkg.name}@${newVersion}`);
|
|
207
|
+
try {
|
|
208
|
+
await run('npm', ['publish', '--access', 'public']);
|
|
209
|
+
ok();
|
|
210
|
+
} catch (e: any) {
|
|
211
|
+
fail(`npm publish failed:\n${e.message}`);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// ── 10. Git commit + tag + push ──────────────────────────────────────────────
|
|
215
|
+
step('Committing version bump');
|
|
216
|
+
try {
|
|
217
|
+
await run('git', ['add', 'package.json']);
|
|
218
|
+
await run('git', ['commit', '-m', `chore: release v${newVersion}`]);
|
|
219
|
+
ok();
|
|
220
|
+
} catch (e: any) {
|
|
221
|
+
fail(e.message);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
step(`Tagging v${newVersion}`);
|
|
225
|
+
try {
|
|
226
|
+
await run('git', ['tag', `v${newVersion}`, '-m', `v${newVersion}`]);
|
|
227
|
+
ok();
|
|
228
|
+
} catch (e: any) {
|
|
229
|
+
fail(e.message);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
step('Pushing to origin');
|
|
233
|
+
try {
|
|
234
|
+
await run('git', ['push', 'origin', 'main', '--follow-tags']);
|
|
235
|
+
ok();
|
|
236
|
+
} catch (e: any) {
|
|
237
|
+
fail(e.message);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// ── Done ─────────────────────────────────────────────────────────────────────
|
|
241
|
+
console.log('');
|
|
242
|
+
console.log(
|
|
243
|
+
chalk.bold.white(` ✓ Published `) +
|
|
244
|
+
chalk.hex('#FF8C00')(`${pkg.name}@${newVersion}`) +
|
|
245
|
+
chalk.bold.white(` to npm`),
|
|
246
|
+
);
|
|
247
|
+
console.log('');
|
|
248
|
+
console.log(chalk.dim(` npm i -g ${pkg.name}`));
|
|
249
|
+
console.log(chalk.dim(` npx ${pkg.name}`));
|
|
250
|
+
console.log('');
|
|
251
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Conductor } from '../../core/conductor.js';
|
|
2
|
+
import { Keychain } from '../../security/keychain.js';
|
|
3
|
+
|
|
4
|
+
export async function telegramSetup(conductor: Conductor): Promise<void> {
|
|
5
|
+
await conductor.initialize();
|
|
6
|
+
|
|
7
|
+
const { default: inquirer } = await import('inquirer');
|
|
8
|
+
const keychain = new Keychain(conductor.getConfig().getConfigDir());
|
|
9
|
+
|
|
10
|
+
const { token } = await inquirer.prompt([
|
|
11
|
+
{
|
|
12
|
+
type: 'password',
|
|
13
|
+
name: 'token',
|
|
14
|
+
message: 'Enter your Telegram bot token (from @BotFather):',
|
|
15
|
+
mask: '*',
|
|
16
|
+
},
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
// Store in keychain (matching install.sh convention)
|
|
20
|
+
await keychain.set('telegram', 'bot_token', token);
|
|
21
|
+
await conductor.getConfig().set('telegram.enabled', true);
|
|
22
|
+
|
|
23
|
+
console.log('✅ Telegram bot token saved.');
|
|
24
|
+
console.log(' Start the bot with: conductor telegram start');
|
|
25
|
+
}
|