@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,388 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stripe Plugin — Conductor
|
|
3
|
+
*
|
|
4
|
+
* Manage customers, payments, subscriptions, invoices, and account balance
|
|
5
|
+
* via the Stripe REST API. Requires a Stripe secret key.
|
|
6
|
+
*
|
|
7
|
+
* Setup: Stripe Dashboard > Developers > API Keys > Secret key
|
|
8
|
+
* Keychain entry: stripe / secret_key
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { Plugin, PluginTool } from '../manager.js';
|
|
12
|
+
import { Conductor } from '../../core/conductor.js';
|
|
13
|
+
import { Keychain } from '../../security/keychain.js';
|
|
14
|
+
|
|
15
|
+
const STRIPE_BASE = 'https://api.stripe.com/v1';
|
|
16
|
+
|
|
17
|
+
export class StripePlugin implements Plugin {
|
|
18
|
+
name = 'stripe';
|
|
19
|
+
description = 'Manage Stripe customers, payments, subscriptions, invoices, and billing';
|
|
20
|
+
version = '1.0.0';
|
|
21
|
+
|
|
22
|
+
private keychain!: Keychain;
|
|
23
|
+
|
|
24
|
+
configSchema = {
|
|
25
|
+
fields: [
|
|
26
|
+
{
|
|
27
|
+
key: 'secret_key',
|
|
28
|
+
label: 'Stripe Secret Key',
|
|
29
|
+
type: 'password' as const,
|
|
30
|
+
required: true,
|
|
31
|
+
secret: true,
|
|
32
|
+
service: 'stripe',
|
|
33
|
+
description: 'Starts with sk_live_ or sk_test_. From Dashboard > Developers > API Keys.',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
setupInstructions:
|
|
37
|
+
'Get your secret key from the Stripe Dashboard at https://dashboard.stripe.com/apikeys. Use a restricted key with only the permissions you need.',
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
async initialize(conductor: Conductor): Promise<void> {
|
|
41
|
+
this.keychain = new Keychain(conductor.getConfig().getConfigDir());
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
isConfigured(): boolean {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
private async getKey(): Promise<string> {
|
|
49
|
+
const k = await this.keychain.get('stripe', 'secret_key');
|
|
50
|
+
if (!k) throw new Error('Stripe secret key not configured. Run: conductor plugins setup stripe');
|
|
51
|
+
return k;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
private async stripeFetch(path: string, params?: Record<string, string>, method = 'GET'): Promise<any> {
|
|
55
|
+
const key = await this.getKey();
|
|
56
|
+
const url = `${STRIPE_BASE}${path}`;
|
|
57
|
+
const headers: Record<string, string> = {
|
|
58
|
+
Authorization: `Bearer ${key}`,
|
|
59
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
60
|
+
'Stripe-Version': '2024-04-10',
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
let body: string | undefined;
|
|
64
|
+
let finalUrl = url;
|
|
65
|
+
|
|
66
|
+
if (method === 'GET' && params) {
|
|
67
|
+
const qs = new URLSearchParams(params).toString();
|
|
68
|
+
finalUrl = `${url}?${qs}`;
|
|
69
|
+
} else if (params) {
|
|
70
|
+
body = new URLSearchParams(params).toString();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const res = await fetch(finalUrl, { method, headers, body });
|
|
74
|
+
if (!res.ok) {
|
|
75
|
+
const err = await res.json().catch(() => ({ error: { message: res.statusText } }));
|
|
76
|
+
throw new Error(`Stripe error: ${(err as any).error?.message ?? res.statusText}`);
|
|
77
|
+
}
|
|
78
|
+
return res.json();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
getTools(): PluginTool[] {
|
|
82
|
+
return [
|
|
83
|
+
// ── Customers ────────────────────────────────────────────────────────
|
|
84
|
+
{
|
|
85
|
+
name: 'stripe_customers',
|
|
86
|
+
description: 'List Stripe customers, optionally filtered by email',
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
properties: {
|
|
90
|
+
email: { type: 'string', description: 'Filter by exact email address' },
|
|
91
|
+
limit: { type: 'number', description: 'Number of results (default 10, max 100)' },
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
handler: async ({ email, limit = 10 }: any) => {
|
|
95
|
+
const params: Record<string, string> = { limit: String(Math.min(limit, 100)) };
|
|
96
|
+
if (email) params.email = email;
|
|
97
|
+
const data = await this.stripeFetch('/customers', params);
|
|
98
|
+
return {
|
|
99
|
+
count: data.data.length,
|
|
100
|
+
hasMore: data.has_more,
|
|
101
|
+
customers: data.data.map((c: any) => ({
|
|
102
|
+
id: c.id,
|
|
103
|
+
email: c.email,
|
|
104
|
+
name: c.name,
|
|
105
|
+
created: new Date(c.created * 1000).toISOString(),
|
|
106
|
+
currency: c.currency,
|
|
107
|
+
balance: c.balance,
|
|
108
|
+
subscriptions: c.subscriptions?.total_count ?? 0,
|
|
109
|
+
})),
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
{
|
|
115
|
+
name: 'stripe_customer',
|
|
116
|
+
description: 'Get a Stripe customer by ID',
|
|
117
|
+
inputSchema: {
|
|
118
|
+
type: 'object',
|
|
119
|
+
properties: {
|
|
120
|
+
customer_id: { type: 'string', description: 'Stripe customer ID (cus_...)' },
|
|
121
|
+
},
|
|
122
|
+
required: ['customer_id'],
|
|
123
|
+
},
|
|
124
|
+
handler: async ({ customer_id }: any) => {
|
|
125
|
+
const c = await this.stripeFetch(`/customers/${customer_id}`);
|
|
126
|
+
return {
|
|
127
|
+
id: c.id,
|
|
128
|
+
email: c.email,
|
|
129
|
+
name: c.name,
|
|
130
|
+
phone: c.phone,
|
|
131
|
+
created: new Date(c.created * 1000).toISOString(),
|
|
132
|
+
currency: c.currency,
|
|
133
|
+
balance: c.balance,
|
|
134
|
+
defaultPaymentMethod: c.invoice_settings?.default_payment_method,
|
|
135
|
+
metadata: c.metadata,
|
|
136
|
+
address: c.address,
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
// ── Payments ─────────────────────────────────────────────────────────
|
|
142
|
+
{
|
|
143
|
+
name: 'stripe_payments',
|
|
144
|
+
description: 'List recent payment intents',
|
|
145
|
+
inputSchema: {
|
|
146
|
+
type: 'object',
|
|
147
|
+
properties: {
|
|
148
|
+
limit: { type: 'number', description: 'Number of results (default 10)' },
|
|
149
|
+
customer: { type: 'string', description: 'Filter by customer ID' },
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
handler: async ({ limit = 10, customer }: any) => {
|
|
153
|
+
const params: Record<string, string> = { limit: String(Math.min(limit, 100)) };
|
|
154
|
+
if (customer) params.customer = customer;
|
|
155
|
+
const data = await this.stripeFetch('/payment_intents', params);
|
|
156
|
+
return {
|
|
157
|
+
count: data.data.length,
|
|
158
|
+
payments: data.data.map((p: any) => ({
|
|
159
|
+
id: p.id,
|
|
160
|
+
amount: p.amount,
|
|
161
|
+
currency: p.currency,
|
|
162
|
+
status: p.status,
|
|
163
|
+
customer: p.customer,
|
|
164
|
+
created: new Date(p.created * 1000).toISOString(),
|
|
165
|
+
description: p.description,
|
|
166
|
+
})),
|
|
167
|
+
};
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
{
|
|
172
|
+
name: 'stripe_payment',
|
|
173
|
+
description: 'Get a single payment intent by ID',
|
|
174
|
+
inputSchema: {
|
|
175
|
+
type: 'object',
|
|
176
|
+
properties: {
|
|
177
|
+
payment_id: { type: 'string', description: 'Payment intent ID (pi_...)' },
|
|
178
|
+
},
|
|
179
|
+
required: ['payment_id'],
|
|
180
|
+
},
|
|
181
|
+
handler: async ({ payment_id }: any) => {
|
|
182
|
+
const p = await this.stripeFetch(`/payment_intents/${payment_id}`);
|
|
183
|
+
return {
|
|
184
|
+
id: p.id,
|
|
185
|
+
amount: p.amount,
|
|
186
|
+
amountReceived: p.amount_received,
|
|
187
|
+
currency: p.currency,
|
|
188
|
+
status: p.status,
|
|
189
|
+
customer: p.customer,
|
|
190
|
+
created: new Date(p.created * 1000).toISOString(),
|
|
191
|
+
description: p.description,
|
|
192
|
+
paymentMethod: p.payment_method,
|
|
193
|
+
metadata: p.metadata,
|
|
194
|
+
};
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
// ── Subscriptions ─────────────────────────────────────────────────────
|
|
199
|
+
{
|
|
200
|
+
name: 'stripe_subscriptions',
|
|
201
|
+
description: 'List subscriptions, optionally filtered by status',
|
|
202
|
+
inputSchema: {
|
|
203
|
+
type: 'object',
|
|
204
|
+
properties: {
|
|
205
|
+
status: {
|
|
206
|
+
type: 'string',
|
|
207
|
+
description: 'Filter by status: active, past_due, canceled, trialing, all',
|
|
208
|
+
enum: ['active', 'past_due', 'canceled', 'trialing', 'all'],
|
|
209
|
+
},
|
|
210
|
+
customer: { type: 'string', description: 'Filter by customer ID' },
|
|
211
|
+
limit: { type: 'number', description: 'Number of results (default 10)' },
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
handler: async ({ status = 'active', customer, limit = 10 }: any) => {
|
|
215
|
+
const params: Record<string, string> = { limit: String(Math.min(limit, 100)) };
|
|
216
|
+
if (status !== 'all') params.status = status;
|
|
217
|
+
if (customer) params.customer = customer;
|
|
218
|
+
const data = await this.stripeFetch('/subscriptions', params);
|
|
219
|
+
return {
|
|
220
|
+
count: data.data.length,
|
|
221
|
+
subscriptions: data.data.map((s: any) => ({
|
|
222
|
+
id: s.id,
|
|
223
|
+
customer: s.customer,
|
|
224
|
+
status: s.status,
|
|
225
|
+
currentPeriodEnd: new Date(s.current_period_end * 1000).toISOString(),
|
|
226
|
+
cancelAtPeriodEnd: s.cancel_at_period_end,
|
|
227
|
+
items: s.items.data.map((i: any) => ({
|
|
228
|
+
priceId: i.price.id,
|
|
229
|
+
productId: i.price.product,
|
|
230
|
+
amount: i.price.unit_amount,
|
|
231
|
+
currency: i.price.currency,
|
|
232
|
+
interval: i.price.recurring?.interval,
|
|
233
|
+
})),
|
|
234
|
+
})),
|
|
235
|
+
};
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
{
|
|
240
|
+
name: 'stripe_subscription',
|
|
241
|
+
description: 'Get a single subscription by ID',
|
|
242
|
+
inputSchema: {
|
|
243
|
+
type: 'object',
|
|
244
|
+
properties: {
|
|
245
|
+
subscription_id: { type: 'string', description: 'Subscription ID (sub_...)' },
|
|
246
|
+
},
|
|
247
|
+
required: ['subscription_id'],
|
|
248
|
+
},
|
|
249
|
+
handler: async ({ subscription_id }: any) => {
|
|
250
|
+
const s = await this.stripeFetch(`/subscriptions/${subscription_id}`);
|
|
251
|
+
return {
|
|
252
|
+
id: s.id,
|
|
253
|
+
customer: s.customer,
|
|
254
|
+
status: s.status,
|
|
255
|
+
trialEnd: s.trial_end ? new Date(s.trial_end * 1000).toISOString() : null,
|
|
256
|
+
currentPeriodStart: new Date(s.current_period_start * 1000).toISOString(),
|
|
257
|
+
currentPeriodEnd: new Date(s.current_period_end * 1000).toISOString(),
|
|
258
|
+
cancelAtPeriodEnd: s.cancel_at_period_end,
|
|
259
|
+
metadata: s.metadata,
|
|
260
|
+
items: s.items.data.map((i: any) => ({
|
|
261
|
+
priceId: i.price.id,
|
|
262
|
+
amount: i.price.unit_amount,
|
|
263
|
+
currency: i.price.currency,
|
|
264
|
+
interval: `${i.price.recurring?.interval_count}x${i.price.recurring?.interval}`,
|
|
265
|
+
})),
|
|
266
|
+
};
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
|
|
270
|
+
// ── Invoices ──────────────────────────────────────────────────────────
|
|
271
|
+
{
|
|
272
|
+
name: 'stripe_invoices',
|
|
273
|
+
description: 'List invoices, optionally filtered by customer',
|
|
274
|
+
inputSchema: {
|
|
275
|
+
type: 'object',
|
|
276
|
+
properties: {
|
|
277
|
+
customer: { type: 'string', description: 'Filter by customer ID' },
|
|
278
|
+
status: { type: 'string', description: 'Filter by status: draft, open, paid, uncollectible, void' },
|
|
279
|
+
limit: { type: 'number', description: 'Number of results (default 10)' },
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
handler: async ({ customer, status, limit = 10 }: any) => {
|
|
283
|
+
const params: Record<string, string> = { limit: String(Math.min(limit, 100)) };
|
|
284
|
+
if (customer) params.customer = customer;
|
|
285
|
+
if (status) params.status = status;
|
|
286
|
+
const data = await this.stripeFetch('/invoices', params);
|
|
287
|
+
return {
|
|
288
|
+
count: data.data.length,
|
|
289
|
+
invoices: data.data.map((inv: any) => ({
|
|
290
|
+
id: inv.id,
|
|
291
|
+
number: inv.number,
|
|
292
|
+
customer: inv.customer,
|
|
293
|
+
status: inv.status,
|
|
294
|
+
amountDue: inv.amount_due,
|
|
295
|
+
amountPaid: inv.amount_paid,
|
|
296
|
+
currency: inv.currency,
|
|
297
|
+
created: new Date(inv.created * 1000).toISOString(),
|
|
298
|
+
dueDate: inv.due_date ? new Date(inv.due_date * 1000).toISOString() : null,
|
|
299
|
+
hostedInvoiceUrl: inv.hosted_invoice_url,
|
|
300
|
+
})),
|
|
301
|
+
};
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
|
|
305
|
+
// ── Products ──────────────────────────────────────────────────────────
|
|
306
|
+
{
|
|
307
|
+
name: 'stripe_products',
|
|
308
|
+
description: 'List Stripe products with their prices',
|
|
309
|
+
inputSchema: {
|
|
310
|
+
type: 'object',
|
|
311
|
+
properties: {
|
|
312
|
+
active: { type: 'boolean', description: 'Filter by active status (default true)' },
|
|
313
|
+
limit: { type: 'number', description: 'Number of results (default 10)' },
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
handler: async ({ active = true, limit = 10 }: any) => {
|
|
317
|
+
const params: Record<string, string> = {
|
|
318
|
+
limit: String(Math.min(limit, 100)),
|
|
319
|
+
active: String(active),
|
|
320
|
+
};
|
|
321
|
+
const data = await this.stripeFetch('/products', params);
|
|
322
|
+
return {
|
|
323
|
+
count: data.data.length,
|
|
324
|
+
products: data.data.map((p: any) => ({
|
|
325
|
+
id: p.id,
|
|
326
|
+
name: p.name,
|
|
327
|
+
description: p.description,
|
|
328
|
+
active: p.active,
|
|
329
|
+
created: new Date(p.created * 1000).toISOString(),
|
|
330
|
+
metadata: p.metadata,
|
|
331
|
+
})),
|
|
332
|
+
};
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
|
|
336
|
+
// ── Balance ───────────────────────────────────────────────────────────
|
|
337
|
+
{
|
|
338
|
+
name: 'stripe_balance',
|
|
339
|
+
description: 'Get current Stripe account balance (available and pending)',
|
|
340
|
+
inputSchema: { type: 'object', properties: {} },
|
|
341
|
+
handler: async () => {
|
|
342
|
+
const b = await this.stripeFetch('/balance');
|
|
343
|
+
return {
|
|
344
|
+
available: b.available.map((a: any) => ({ amount: a.amount, currency: a.currency })),
|
|
345
|
+
pending: b.pending.map((p: any) => ({ amount: p.amount, currency: p.currency })),
|
|
346
|
+
livemode: b.livemode,
|
|
347
|
+
};
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
|
|
351
|
+
// ── Refunds ───────────────────────────────────────────────────────────
|
|
352
|
+
{
|
|
353
|
+
name: 'stripe_refund',
|
|
354
|
+
description: 'Create a refund for a payment intent or charge',
|
|
355
|
+
inputSchema: {
|
|
356
|
+
type: 'object',
|
|
357
|
+
properties: {
|
|
358
|
+
payment_intent: { type: 'string', description: 'Payment intent ID to refund' },
|
|
359
|
+
charge: { type: 'string', description: 'Charge ID to refund (alternative to payment_intent)' },
|
|
360
|
+
amount: { type: 'number', description: 'Amount in cents to refund (omit for full refund)' },
|
|
361
|
+
reason: {
|
|
362
|
+
type: 'string',
|
|
363
|
+
description: 'Reason: duplicate, fraudulent, or requested_by_customer',
|
|
364
|
+
enum: ['duplicate', 'fraudulent', 'requested_by_customer'],
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
|
+
requiresApproval: true,
|
|
369
|
+
handler: async ({ payment_intent, charge, amount, reason }: any) => {
|
|
370
|
+
const params: Record<string, string> = {};
|
|
371
|
+
if (payment_intent) params.payment_intent = payment_intent;
|
|
372
|
+
if (charge) params.charge = charge;
|
|
373
|
+
if (amount) params.amount = String(amount);
|
|
374
|
+
if (reason) params.reason = reason;
|
|
375
|
+
const r = await this.stripeFetch('/refunds', params, 'POST');
|
|
376
|
+
return {
|
|
377
|
+
id: r.id,
|
|
378
|
+
amount: r.amount,
|
|
379
|
+
currency: r.currency,
|
|
380
|
+
status: r.status,
|
|
381
|
+
reason: r.reason,
|
|
382
|
+
created: new Date(r.created * 1000).toISOString(),
|
|
383
|
+
};
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
];
|
|
387
|
+
}
|
|
388
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Plugin, PluginTool } from '../manager.js';
|
|
2
|
+
import { Conductor } from '../../core/conductor.js';
|
|
3
|
+
import os from 'os';
|
|
4
|
+
|
|
5
|
+
export class SystemInfoPlugin implements Plugin {
|
|
6
|
+
name = 'system';
|
|
7
|
+
description = 'System information — CPU, memory, disk, network, OS details';
|
|
8
|
+
version = '1.0.0';
|
|
9
|
+
|
|
10
|
+
async initialize(_conductor: Conductor): Promise<void> {}
|
|
11
|
+
isConfigured(): boolean {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getTools(): PluginTool[] {
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
18
|
+
name: 'system_info',
|
|
19
|
+
description: 'Get comprehensive system information',
|
|
20
|
+
inputSchema: { type: 'object', properties: {} },
|
|
21
|
+
handler: async () => {
|
|
22
|
+
const cpus = os.cpus();
|
|
23
|
+
const totalMem = os.totalmem();
|
|
24
|
+
const freeMem = os.freemem();
|
|
25
|
+
return {
|
|
26
|
+
os: { platform: os.platform(), release: os.release(), arch: os.arch(), hostname: os.hostname() },
|
|
27
|
+
cpu: { model: cpus[0]?.model, cores: cpus.length, speed: `${cpus[0]?.speed} MHz` },
|
|
28
|
+
memory: {
|
|
29
|
+
total: `${(totalMem / 1073741824).toFixed(1)} GB`,
|
|
30
|
+
free: `${(freeMem / 1073741824).toFixed(1)} GB`,
|
|
31
|
+
used: `${((totalMem - freeMem) / 1073741824).toFixed(1)} GB`,
|
|
32
|
+
usage: `${(((totalMem - freeMem) / totalMem) * 100).toFixed(1)}%`,
|
|
33
|
+
},
|
|
34
|
+
uptime: `${(os.uptime() / 3600).toFixed(1)} hours`,
|
|
35
|
+
user: os.userInfo().username,
|
|
36
|
+
home: os.homedir(),
|
|
37
|
+
node: process.version,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'system_processes',
|
|
43
|
+
description: 'Get top processes by memory usage',
|
|
44
|
+
inputSchema: { type: 'object', properties: {} },
|
|
45
|
+
handler: async () => {
|
|
46
|
+
const { execSync } = await import('child_process');
|
|
47
|
+
try {
|
|
48
|
+
if (os.platform() === 'win32') {
|
|
49
|
+
const out = execSync('tasklist /FO CSV /NH', { encoding: 'utf8' });
|
|
50
|
+
return { note: 'Windows process list', processes: out.split('\n').slice(0, 15) };
|
|
51
|
+
}
|
|
52
|
+
// macOS uses different ps syntax than Linux
|
|
53
|
+
const psCmd = os.platform() === 'darwin' ? 'ps aux -m | head -11' : 'ps aux --sort=-%mem | head -11';
|
|
54
|
+
const out = execSync(psCmd, { encoding: 'utf8' });
|
|
55
|
+
const lines = out.trim().split('\n');
|
|
56
|
+
return {
|
|
57
|
+
processes: lines.slice(1).map((line) => {
|
|
58
|
+
const parts = line.trim().split(/\s+/);
|
|
59
|
+
return {
|
|
60
|
+
user: parts[0],
|
|
61
|
+
pid: parts[1],
|
|
62
|
+
cpu: parts[2],
|
|
63
|
+
mem: parts[3],
|
|
64
|
+
command: parts.slice(10).join(' '),
|
|
65
|
+
};
|
|
66
|
+
}),
|
|
67
|
+
};
|
|
68
|
+
} catch {
|
|
69
|
+
return { error: 'Could not list processes' };
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'system_network',
|
|
75
|
+
description: 'Get network interfaces and IP addresses',
|
|
76
|
+
inputSchema: { type: 'object', properties: {} },
|
|
77
|
+
handler: async () => {
|
|
78
|
+
const interfaces = os.networkInterfaces();
|
|
79
|
+
const result: any[] = [];
|
|
80
|
+
for (const [name, addrs] of Object.entries(interfaces)) {
|
|
81
|
+
if (!addrs) continue;
|
|
82
|
+
for (const addr of addrs) {
|
|
83
|
+
if (!addr.internal) {
|
|
84
|
+
result.push({ interface: name, address: addr.address, family: addr.family, mac: addr.mac });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return { interfaces: result };
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { Plugin, PluginTool } from '../manager.js';
|
|
2
|
+
import { Conductor } from '../../core/conductor.js';
|
|
3
|
+
|
|
4
|
+
export class TextToolsPlugin implements Plugin {
|
|
5
|
+
name = 'text-tools';
|
|
6
|
+
description = 'JSON formatting, text stats, regex testing, string manipulation';
|
|
7
|
+
version = '1.0.0';
|
|
8
|
+
|
|
9
|
+
async initialize(_conductor: Conductor): Promise<void> {}
|
|
10
|
+
isConfigured(): boolean {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
getTools(): PluginTool[] {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
name: 'json_format',
|
|
18
|
+
description: 'Format, validate, and minify JSON',
|
|
19
|
+
inputSchema: {
|
|
20
|
+
type: 'object',
|
|
21
|
+
properties: {
|
|
22
|
+
json: { type: 'string', description: 'JSON string to format' },
|
|
23
|
+
minify: { type: 'boolean', description: 'Minify instead of pretty-print', default: false },
|
|
24
|
+
},
|
|
25
|
+
required: ['json'],
|
|
26
|
+
},
|
|
27
|
+
handler: async (input: { json: string; minify?: boolean }) => {
|
|
28
|
+
try {
|
|
29
|
+
const parsed = JSON.parse(input.json);
|
|
30
|
+
const formatted = input.minify ? JSON.stringify(parsed) : JSON.stringify(parsed, null, 2);
|
|
31
|
+
return { valid: true, formatted, keys: typeof parsed === 'object' ? Object.keys(parsed) : undefined };
|
|
32
|
+
} catch (e: any) {
|
|
33
|
+
return { valid: false, error: e.message };
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'text_stats',
|
|
39
|
+
description: 'Get text statistics — word count, character count, sentence count, reading time',
|
|
40
|
+
inputSchema: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
properties: {
|
|
43
|
+
text: { type: 'string', description: 'Text to analyze' },
|
|
44
|
+
},
|
|
45
|
+
required: ['text'],
|
|
46
|
+
},
|
|
47
|
+
handler: async (input: { text: string }) => {
|
|
48
|
+
const t = input.text;
|
|
49
|
+
const words = t
|
|
50
|
+
.trim()
|
|
51
|
+
.split(/\s+/)
|
|
52
|
+
.filter((w) => w.length > 0);
|
|
53
|
+
const sentences = t.split(/[.!?]+/).filter((s) => s.trim().length > 0);
|
|
54
|
+
const paragraphs = t.split(/\n\n+/).filter((p) => p.trim().length > 0);
|
|
55
|
+
return {
|
|
56
|
+
characters: t.length,
|
|
57
|
+
characters_no_spaces: t.replace(/\s/g, '').length,
|
|
58
|
+
words: words.length,
|
|
59
|
+
sentences: sentences.length,
|
|
60
|
+
paragraphs: paragraphs.length,
|
|
61
|
+
reading_time: `${Math.max(1, Math.ceil(words.length / 200))} min`,
|
|
62
|
+
speaking_time: `${Math.max(1, Math.ceil(words.length / 130))} min`,
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'regex_test',
|
|
68
|
+
description: 'Test a regex pattern against text',
|
|
69
|
+
inputSchema: {
|
|
70
|
+
type: 'object',
|
|
71
|
+
properties: {
|
|
72
|
+
pattern: { type: 'string', description: 'Regex pattern (without delimiters)' },
|
|
73
|
+
text: { type: 'string', description: 'Text to test against' },
|
|
74
|
+
flags: { type: 'string', description: 'Regex flags (g, i, m, etc.)', default: 'g' },
|
|
75
|
+
},
|
|
76
|
+
required: ['pattern', 'text'],
|
|
77
|
+
},
|
|
78
|
+
handler: async (input: { pattern: string; text: string; flags?: string }) => {
|
|
79
|
+
try {
|
|
80
|
+
const regex = new RegExp(input.pattern, input.flags || 'g');
|
|
81
|
+
const matches = [...input.text.matchAll(regex)];
|
|
82
|
+
return {
|
|
83
|
+
pattern: input.pattern,
|
|
84
|
+
flags: input.flags || 'g',
|
|
85
|
+
matches_found: matches.length,
|
|
86
|
+
matches: matches.map((m) => ({
|
|
87
|
+
match: m[0],
|
|
88
|
+
index: m.index,
|
|
89
|
+
groups: m.groups || undefined,
|
|
90
|
+
})),
|
|
91
|
+
};
|
|
92
|
+
} catch (e: any) {
|
|
93
|
+
return { error: `Invalid regex: ${e.message}` };
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'text_transform',
|
|
99
|
+
description: 'Transform text: uppercase, lowercase, title case, camelCase, snake_case, slug, reverse',
|
|
100
|
+
inputSchema: {
|
|
101
|
+
type: 'object',
|
|
102
|
+
properties: {
|
|
103
|
+
text: { type: 'string', description: 'Text to transform' },
|
|
104
|
+
transform: { type: 'string', description: 'uppercase, lowercase, title, camel, snake, slug, reverse' },
|
|
105
|
+
},
|
|
106
|
+
required: ['text', 'transform'],
|
|
107
|
+
},
|
|
108
|
+
handler: async (input: { text: string; transform: string }) => {
|
|
109
|
+
const t = input.text;
|
|
110
|
+
let result: string;
|
|
111
|
+
switch (input.transform.toLowerCase()) {
|
|
112
|
+
case 'uppercase':
|
|
113
|
+
result = t.toUpperCase();
|
|
114
|
+
break;
|
|
115
|
+
case 'lowercase':
|
|
116
|
+
result = t.toLowerCase();
|
|
117
|
+
break;
|
|
118
|
+
case 'title':
|
|
119
|
+
result = t.replace(/\w\S*/g, (w) => w[0].toUpperCase() + w.slice(1).toLowerCase());
|
|
120
|
+
break;
|
|
121
|
+
case 'camel':
|
|
122
|
+
result = t.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (_, c) => c.toUpperCase());
|
|
123
|
+
break;
|
|
124
|
+
case 'snake':
|
|
125
|
+
result = t
|
|
126
|
+
.replace(/\s+/g, '_')
|
|
127
|
+
.replace(/[A-Z]/g, (c) => '_' + c.toLowerCase())
|
|
128
|
+
.replace(/^_/, '')
|
|
129
|
+
.toLowerCase();
|
|
130
|
+
break;
|
|
131
|
+
case 'slug':
|
|
132
|
+
result = t
|
|
133
|
+
.toLowerCase()
|
|
134
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
135
|
+
.replace(/^-|-$/g, '');
|
|
136
|
+
break;
|
|
137
|
+
case 'reverse':
|
|
138
|
+
result = t.split('').reverse().join('');
|
|
139
|
+
break;
|
|
140
|
+
default:
|
|
141
|
+
throw new Error(
|
|
142
|
+
`Unknown transform: ${input.transform}. Use: uppercase, lowercase, title, camel, snake, slug, reverse`,
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
return { original: t, transform: input.transform, result };
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
];
|
|
149
|
+
}
|
|
150
|
+
}
|