crewswarm 0.8.1-beta
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/.env.example +155 -0
- package/LICENSE +21 -0
- package/README.md +316 -0
- package/apps/dashboard/dist/assets/chat-core-BwSoInmZ.js +1 -0
- package/apps/dashboard/dist/assets/chat-core-BwSoInmZ.js.br +0 -0
- package/apps/dashboard/dist/assets/cli-process-COMRNPqr.js +1 -0
- package/apps/dashboard/dist/assets/cli-process-COMRNPqr.js.br +0 -0
- package/apps/dashboard/dist/assets/components-CSUb80ze.js +1 -0
- package/apps/dashboard/dist/assets/components-CSUb80ze.js.br +0 -0
- package/apps/dashboard/dist/assets/core-utils-CAVnDoe1.js +1 -0
- package/apps/dashboard/dist/assets/core-utils-CAVnDoe1.js.br +0 -0
- package/apps/dashboard/dist/assets/index-CF0aJRtC.css +1 -0
- package/apps/dashboard/dist/assets/index-CF0aJRtC.css.br +0 -0
- package/apps/dashboard/dist/assets/index-Px49zu76.js +2 -0
- package/apps/dashboard/dist/assets/index-Px49zu76.js.br +0 -0
- package/apps/dashboard/dist/assets/orchestration-Ca2DLWN-.js +1 -0
- package/apps/dashboard/dist/assets/orchestration-Ca2DLWN-.js.br +0 -0
- package/apps/dashboard/dist/assets/setup-wizard-i3eEixlo.js +1 -0
- package/apps/dashboard/dist/assets/setup-wizard-i3eEixlo.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-agents-tab-BThdsdJY.js +1 -0
- package/apps/dashboard/dist/assets/tab-agents-tab-BThdsdJY.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-benchmarks-tab-DfCuAClu.js +1 -0
- package/apps/dashboard/dist/assets/tab-comms-tab-eHpOSBhG.js +1 -0
- package/apps/dashboard/dist/assets/tab-comms-tab-eHpOSBhG.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-contacts-tab-yEegNyO4.js +1 -0
- package/apps/dashboard/dist/assets/tab-contacts-tab-yEegNyO4.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-engines-tab-C3DYxTwy.js +1 -0
- package/apps/dashboard/dist/assets/tab-engines-tab-C3DYxTwy.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-memory-tab-C59BYFQD.js +1 -0
- package/apps/dashboard/dist/assets/tab-memory-tab-C59BYFQD.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-models-tab-9Ur7pXWA.js +1 -0
- package/apps/dashboard/dist/assets/tab-models-tab-9Ur7pXWA.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-pm-loop-tab-D7mnDelU.js +1 -0
- package/apps/dashboard/dist/assets/tab-pm-loop-tab-D7mnDelU.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-projects-tab-C6h2Mv1K.js +1 -0
- package/apps/dashboard/dist/assets/tab-projects-tab-C6h2Mv1K.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-prompts-tab-C0wZvWK3.js +1 -0
- package/apps/dashboard/dist/assets/tab-prompts-tab-C0wZvWK3.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-services-tab-DBj_w3bc.js +1 -0
- package/apps/dashboard/dist/assets/tab-services-tab-DBj_w3bc.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-settings-tab-ezeqAjZk.js +1 -0
- package/apps/dashboard/dist/assets/tab-settings-tab-ezeqAjZk.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-skills-tab-BYdU2whk.js +1 -0
- package/apps/dashboard/dist/assets/tab-skills-tab-BYdU2whk.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-spending-tab-Bg6w9t_p.js +1 -0
- package/apps/dashboard/dist/assets/tab-spending-tab-Bg6w9t_p.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-swarm-chat-tab-BBV9HB2X.js +1 -0
- package/apps/dashboard/dist/assets/tab-swarm-chat-tab-BBV9HB2X.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-swarm-tab-ChqLlEVs.js +1 -0
- package/apps/dashboard/dist/assets/tab-swarm-tab-ChqLlEVs.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-usage-tab-B2UWXenJ.js +1 -0
- package/apps/dashboard/dist/assets/tab-usage-tab-B2UWXenJ.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-waves-tab-SaJDkb4x.js +1 -0
- package/apps/dashboard/dist/assets/tab-waves-tab-SaJDkb4x.js.br +0 -0
- package/apps/dashboard/dist/assets/tab-workflows-tab-6QSXLJ0i.js +1 -0
- package/apps/dashboard/dist/assets/tab-workflows-tab-6QSXLJ0i.js.br +0 -0
- package/apps/dashboard/dist/favicon.png +0 -0
- package/apps/dashboard/dist/index.html +6466 -0
- package/apps/dashboard/dist/index.html.br +0 -0
- package/apps/dashboard/dist/index.html.gz +0 -0
- package/apps/dashboard/dist/signup.html +446 -0
- package/apps/dashboard/index.html +6442 -0
- package/apps/dashboard/package.json +15 -0
- package/apps/dashboard/src/app.js +2823 -0
- package/apps/dashboard/src/app.js.br +0 -0
- package/apps/dashboard/src/app.js.gz +0 -0
- package/apps/dashboard/src/chat/chat-actions.js +1847 -0
- package/apps/dashboard/src/chat/chat-actions.js.br +0 -0
- package/apps/dashboard/src/chat/unified-messages.js +327 -0
- package/apps/dashboard/src/chat/unified-messages.js.br +0 -0
- package/apps/dashboard/src/cli-process.js +208 -0
- package/apps/dashboard/src/cli-process.js.br +0 -0
- package/apps/dashboard/src/cli-process.js.gz +0 -0
- package/apps/dashboard/src/components/active-tasks-panel.js +175 -0
- package/apps/dashboard/src/components/active-tasks-panel.js.br +0 -0
- package/apps/dashboard/src/core/api.js +18 -0
- package/apps/dashboard/src/core/api.js.br +0 -0
- package/apps/dashboard/src/core/dom.js +220 -0
- package/apps/dashboard/src/core/dom.js.br +0 -0
- package/apps/dashboard/src/core/state.js +91 -0
- package/apps/dashboard/src/core/state.js.br +0 -0
- package/apps/dashboard/src/core/task-manager.js +134 -0
- package/apps/dashboard/src/core/task-manager.js.br +0 -0
- package/apps/dashboard/src/orchestration-status.js +127 -0
- package/apps/dashboard/src/orchestration-status.js.br +0 -0
- package/apps/dashboard/src/setup-wizard.js +555 -0
- package/apps/dashboard/src/setup-wizard.js.br +0 -0
- package/apps/dashboard/src/styles.css +2085 -0
- package/apps/dashboard/src/styles.css.br +0 -0
- package/apps/dashboard/src/styles.css.gz +0 -0
- package/apps/dashboard/src/tabs/agents-tab.js +2237 -0
- package/apps/dashboard/src/tabs/agents-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/benchmarks-tab.js +229 -0
- package/apps/dashboard/src/tabs/benchmarks-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/comms-tab.js +955 -0
- package/apps/dashboard/src/tabs/comms-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/contacts-tab.js +654 -0
- package/apps/dashboard/src/tabs/contacts-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/engines-tab.js +175 -0
- package/apps/dashboard/src/tabs/engines-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/memory-tab.js +182 -0
- package/apps/dashboard/src/tabs/memory-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/models-tab.js +441 -0
- package/apps/dashboard/src/tabs/models-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/pm-loop-tab.js +185 -0
- package/apps/dashboard/src/tabs/pm-loop-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/projects-tab.js +663 -0
- package/apps/dashboard/src/tabs/projects-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/projects-tab.js.gz +0 -0
- package/apps/dashboard/src/tabs/prompts-tab.js +160 -0
- package/apps/dashboard/src/tabs/prompts-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/services-tab.js +202 -0
- package/apps/dashboard/src/tabs/services-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/settings-tab.js +803 -0
- package/apps/dashboard/src/tabs/settings-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/skills-tab.js +284 -0
- package/apps/dashboard/src/tabs/skills-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/spending-tab.js +173 -0
- package/apps/dashboard/src/tabs/spending-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/swarm-chat-tab.js +660 -0
- package/apps/dashboard/src/tabs/swarm-chat-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/swarm-tab.js +538 -0
- package/apps/dashboard/src/tabs/swarm-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/usage-tab.js +390 -0
- package/apps/dashboard/src/tabs/usage-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/waves-tab.js +238 -0
- package/apps/dashboard/src/tabs/waves-tab.js.br +0 -0
- package/apps/dashboard/src/tabs/workflows-tab.js +747 -0
- package/apps/dashboard/src/tabs/workflows-tab.js.br +0 -0
- package/apps/vibe/.crew/agent-memory/pipeline.json +249 -0
- package/apps/vibe/.crew/cost.json +17 -0
- package/apps/vibe/.crew/json-parse-metrics.jsonl +22 -0
- package/apps/vibe/.crew/pipeline-metrics.jsonl +22 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-0f90c392-2425-4ae5-850c-bd9d17b1d690.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-1c269dd9-a63f-4fba-af81-5cf08048ef06.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-288a7765-da24-4a22-89bc-1f3cc9b0562c.jsonl +1 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-2c78fd22-a657-4bd1-bc49-0679fb384409.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-3e6fe08d-3264-404a-8df3-aab7efef10e7.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-42eec610-57fe-4e09-9e7e-b315038495c2.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-4438eb4c-ae13-42b1-90e2-b043d8983be8.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-4740a9f5-86e7-44b6-a394-de433e291727.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-49e1da6a-957e-48fd-9220-415019e4f8e2.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-4c9251db-be68-427b-a3fc-a264f2b5778d.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-65e29a57-664d-4196-8109-017e364f182e.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-6aa04bc5-9593-4b1f-b58d-3bf2978cb602.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-6e1cba53-9b70-457e-99e0-59199149dd21.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-749f41cc-4dac-4204-be64-873a6080a0d2.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-74d68121-e181-4864-bd9a-c3211341dfaf.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-8509bc24-142d-4e07-b44a-a50bf99d1103.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-960339c6-07ca-43ce-9900-f6e1702b39b9.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-9c6480a9-7031-4146-b241-825b9a2d1de1.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-9fd42426-8492-4157-9d5f-e1537c060489.jsonl +2 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-ad6d40a3-2f5e-46a9-a345-47caaccc51aa.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-bc606133-8d5b-4535-8d85-f1a29cdaa981.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-c1a13ccd-634a-4d01-a4a7-1177b8a752ff.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-c7d27b42-249e-4bd4-8f26-6aa998110b8a.jsonl +5 -0
- package/apps/vibe/.crew/pipeline-runs/pipeline-cca2e9b9-4a34-4d25-a311-5c793fa7e91e.jsonl +5 -0
- package/apps/vibe/.crew/sandbox.json +7 -0
- package/apps/vibe/.crew/session.json +285 -0
- package/apps/vibe/.crew/training-data.jsonl +0 -0
- package/apps/vibe/.github/workflows/studio-quality.yml +37 -0
- package/apps/vibe/.studio-data/project-messages/chuck-norris.jsonl +12 -0
- package/apps/vibe/.studio-data/project-messages/general.jsonl +54 -0
- package/apps/vibe/.studio-data/project-messages/studio-local.jsonl +10 -0
- package/apps/vibe/ARCHITECTURE.md +3393 -0
- package/apps/vibe/QUICK-REFERENCE.md +211 -0
- package/apps/vibe/README.md +76 -0
- package/apps/vibe/ROADMAP.md +41 -0
- package/apps/vibe/STUDIO-SETUP-COMPLETE.md +35 -0
- package/apps/vibe/VISUAL-GUIDE.md +378 -0
- package/apps/vibe/capture-demo.mjs +160 -0
- package/apps/vibe/capture-vibe-assets.mjs +71 -0
- package/apps/vibe/capture-vibe-video.mjs +260 -0
- package/apps/vibe/check-buttons.js +41 -0
- package/apps/vibe/diagnose.html +106 -0
- package/apps/vibe/fix-buttons.js +103 -0
- package/apps/vibe/index.html +3401 -0
- package/apps/vibe/package-lock.json +920 -0
- package/apps/vibe/package.json +31 -0
- package/apps/vibe/public/favicon.png +0 -0
- package/apps/vibe/scripts/studio-pty-host.py +117 -0
- package/apps/vibe/server.mjs +1835 -0
- package/apps/vibe/src/main.js +2846 -0
- package/apps/vibe/src/register-all-languages.js +98 -0
- package/apps/vibe/start-studio.sh +11 -0
- package/apps/vibe/test/accessibility-tests.js +77 -0
- package/apps/vibe/test/browser-performance-audit.mjs +205 -0
- package/apps/vibe/test/performance-tests.js +120 -0
- package/apps/vibe/test/security-tests.js +213 -0
- package/apps/vibe/tests/e2e.local.mjs +54 -0
- package/apps/vibe/tests/server.smoke.mjs +106 -0
- package/apps/vibe/update_website.mjs +74 -0
- package/apps/vibe/vite.config.js +19 -0
- package/apps/vibe/watch-server.mjs +108 -0
- package/contrib/openclaw-plugin/README.md +199 -0
- package/contrib/openclaw-plugin/index.ts +306 -0
- package/contrib/openclaw-plugin/openclaw.plugin.json +41 -0
- package/contrib/openclaw-plugin/package.json +27 -0
- package/contrib/openclaw-plugin/skills/crewswarm/SKILL.md +88 -0
- package/crew-lead.mjs +649 -0
- package/engines/claude-code.json +36 -0
- package/engines/codex.json +37 -0
- package/engines/crew-cli.json +42 -0
- package/engines/cursor.json +40 -0
- package/engines/docker-sandbox.json +38 -0
- package/engines/gemini-cli.json +75 -0
- package/engines/opencode.json +31 -0
- package/gateway-bridge.mjs +1575 -0
- package/install.sh +738 -0
- package/lib/agent-registry.mjs +232 -0
- package/lib/agents/daemon.mjs +121 -0
- package/lib/agents/dispatch.mjs +225 -0
- package/lib/agents/permissions.mjs +90 -0
- package/lib/agents/platform-formatting.mjs +102 -0
- package/lib/agents/registry.mjs +81 -0
- package/lib/agents/tool-instructions.mjs +257 -0
- package/lib/agents/validation.mjs +75 -0
- package/lib/approval/policy-manager.mjs +221 -0
- package/lib/autoharness/index.mjs +391 -0
- package/lib/bridges/cli-executor.mjs +332 -0
- package/lib/bridges/gateway-ws.mjs +345 -0
- package/lib/bridges/integration.mjs +229 -0
- package/lib/bridges/rag-helper.mjs +90 -0
- package/lib/browser/opencode-passthrough-filter.js +44 -0
- package/lib/browser/passthrough-stderr.js +109 -0
- package/lib/chat/autonomous-mentions.mjs +373 -0
- package/lib/chat/history.mjs +82 -0
- package/lib/chat/mention-routing-intent.mjs +136 -0
- package/lib/chat/participants.mjs +95 -0
- package/lib/chat/project-messages-rag.mjs +265 -0
- package/lib/chat/project-messages.mjs +479 -0
- package/lib/chat/shared-chat-prompt-overlay.mjs +52 -0
- package/lib/chat/thread-binding.mjs +34 -0
- package/lib/chat/unified-history.mjs +223 -0
- package/lib/chat/unified-wrapper.mjs +41 -0
- package/lib/cli-process-tracker.mjs +228 -0
- package/lib/collections/index.mjs +433 -0
- package/lib/contacts/identity-linker.mjs +248 -0
- package/lib/contacts/index.mjs +341 -0
- package/lib/crew-judge/PROMPT.md +93 -0
- package/lib/crew-judge/judge.mjs +260 -0
- package/lib/crew-lead/agent-manager.mjs +125 -0
- package/lib/crew-lead/background.mjs +270 -0
- package/lib/crew-lead/brain.mjs +110 -0
- package/lib/crew-lead/chat-handler.mjs +2603 -0
- package/lib/crew-lead/chat-handler.mjs.bak +1274 -0
- package/lib/crew-lead/classifier.mjs +83 -0
- package/lib/crew-lead/http-server.mjs +4824 -0
- package/lib/crew-lead/intent.mjs +102 -0
- package/lib/crew-lead/interval-manager.mjs +41 -0
- package/lib/crew-lead/llm-caller.mjs +544 -0
- package/lib/crew-lead/prompts.mjs +392 -0
- package/lib/crew-lead/retry-manager.mjs +118 -0
- package/lib/crew-lead/tools.mjs +318 -0
- package/lib/crew-lead/wave-dispatcher.mjs +798 -0
- package/lib/crew-lead/waves-config.json +73 -0
- package/lib/crew-lead/waves-loader.mjs +110 -0
- package/lib/crew-lead/ws-router.mjs +428 -0
- package/lib/dispatch/parsers.mjs +299 -0
- package/lib/domain-planning/detector.mjs +196 -0
- package/lib/domain-planning/prompts/crew-pm-cli.md +96 -0
- package/lib/domain-planning/prompts/crew-pm-core.md +122 -0
- package/lib/domain-planning/prompts/crew-pm-frontend.md +111 -0
- package/lib/engines/crew-cli-sandbox.mjs +422 -0
- package/lib/engines/crew-cli.mjs +155 -0
- package/lib/engines/cursor-launcher.mjs +110 -0
- package/lib/engines/engine-registry.mjs +253 -0
- package/lib/engines/llm-direct.mjs +184 -0
- package/lib/engines/opencode.mjs +256 -0
- package/lib/engines/ouroboros.mjs +114 -0
- package/lib/engines/rt-envelope.mjs +1643 -0
- package/lib/engines/rt-envelope.mjs.backup-current +870 -0
- package/lib/engines/runners.mjs +1367 -0
- package/lib/gemini-cli-passthrough-noise.mjs +37 -0
- package/lib/integrations/code-search.mjs +259 -0
- package/lib/integrations/greptile.mjs +148 -0
- package/lib/integrations/multimodal.mjs +313 -0
- package/lib/integrations/telegram-streaming.mjs +153 -0
- package/lib/integrations/tts.mjs +312 -0
- package/lib/integrations/twitter-links.mjs +294 -0
- package/lib/memory/shared-adapter.mjs +296 -0
- package/lib/pipeline/manager.mjs +539 -0
- package/lib/preferences/extractor.mjs +347 -0
- package/lib/project-dir.mjs +20 -0
- package/lib/runtime/config.mjs +388 -0
- package/lib/runtime/dlq.mjs +170 -0
- package/lib/runtime/log-rotation.mjs +82 -0
- package/lib/runtime/logger.mjs +58 -0
- package/lib/runtime/memory.mjs +421 -0
- package/lib/runtime/paths.mjs +76 -0
- package/lib/runtime/project-dir.mjs +127 -0
- package/lib/runtime/spending.mjs +204 -0
- package/lib/runtime/startup-guard.mjs +291 -0
- package/lib/runtime/task-lease.mjs +234 -0
- package/lib/runtime/telemetry-schema.mjs +208 -0
- package/lib/runtime/telemetry.mjs +101 -0
- package/lib/runtime/utils.mjs +64 -0
- package/lib/skills/index.mjs +265 -0
- package/lib/tools/browser.mjs +135 -0
- package/lib/tools/executor.mjs +913 -0
- package/lib/types.d.ts +57 -0
- package/package.json +106 -0
- package/pm-loop.mjs +1626 -0
- package/prompts/coder-back.md +27 -0
- package/prompts/coder-front.md +27 -0
- package/prompts/coder.md +28 -0
- package/prompts/copywriter.md +17 -0
- package/prompts/fixer.md +39 -0
- package/prompts/frontend.md +23 -0
- package/prompts/github.md +24 -0
- package/prompts/main.md +39 -0
- package/prompts/pm-cli.md +95 -0
- package/prompts/pm-core.md +121 -0
- package/prompts/pm-frontend.md +110 -0
- package/prompts/pm.md +234 -0
- package/prompts/qa.md +44 -0
- package/prompts/security.md +19 -0
- package/scripts/build-crew-chat.sh +28 -0
- package/scripts/build-llms-full.mjs +52 -0
- package/scripts/chatmock-login.sh +16 -0
- package/scripts/chatmock-serve.sh +16 -0
- package/scripts/check-dashboard.mjs +88 -0
- package/scripts/crew-scribe.mjs +326 -0
- package/scripts/dashboard-helpers.mjs +391 -0
- package/scripts/dashboard-validation.mjs +198 -0
- package/scripts/dashboard.mjs +9717 -0
- package/scripts/dlq-replay.mjs +61 -0
- package/scripts/doctor.mjs +196 -0
- package/scripts/file-lock.mjs +186 -0
- package/scripts/fresh-machine-smoke.sh +323 -0
- package/scripts/generate-changelog.mjs +227 -0
- package/scripts/generate-openapi.mjs +334 -0
- package/scripts/health-check.mjs +229 -0
- package/scripts/install-docker.sh +213 -0
- package/scripts/mcp-server.mjs +1625 -0
- package/scripts/opencrew-rt-daemon.mjs +568 -0
- package/scripts/openswitchctl +646 -0
- package/scripts/refactor-configs.mjs +39 -0
- package/scripts/release-check.sh +46 -0
- package/scripts/resolve-node-bin.sh +25 -0
- package/scripts/restart-all-from-repo.sh +329 -0
- package/scripts/restart-crew-lead.sh +98 -0
- package/scripts/restart-dashboard.sh +104 -0
- package/scripts/restart-service.sh +274 -0
- package/scripts/run-accessibility-audit.mjs +356 -0
- package/scripts/run-integration-bounded.mjs +188 -0
- package/scripts/run-scheduled-pipeline.mjs +230 -0
- package/scripts/run.mjs +41 -0
- package/scripts/scan-skills.mjs +79 -0
- package/scripts/setup-firewall.sh +128 -0
- package/scripts/smoke-dispatch.mjs +149 -0
- package/scripts/smoke.sh +163 -0
- package/scripts/start-crew.mjs +328 -0
- package/scripts/start.mjs +146 -0
- package/scripts/swiftbar-restart-service.sh +19 -0
- package/scripts/sync-agents.mjs +152 -0
- package/scripts/sync-prompts.mjs +79 -0
- package/scripts/validate-config.mjs +337 -0
- package/scripts/wow.mjs +89 -0
- package/telegram-bridge.mjs +2421 -0
- package/unified-orchestrator.mjs +519 -0
- package/whatsapp-bridge.mjs +1481 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# CrewSwarm Plugin for OpenClaw
|
|
2
|
+
|
|
3
|
+
Connects your OpenClaw agents to a local [CrewSwarm](https://github.com/crewswarm/crewswarm) multi-agent crew.
|
|
4
|
+
|
|
5
|
+
Your OpenClaw agents gain three new tools — `crewswarm_dispatch`, `crewswarm_status`, and `crewswarm_agents` — plus a `/crewswarm` slash command and Gateway RPC methods. **No LLM credentials are shared** — only a single auth token.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What it does
|
|
10
|
+
|
|
11
|
+
| Surface | Description |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `crewswarm_dispatch` | Agent tool — dispatch a task to any crew agent and block until done |
|
|
14
|
+
| `crewswarm_status` | Agent tool — poll status of a task by `taskId` |
|
|
15
|
+
| `crewswarm_agents` | Agent tool — list available agents |
|
|
16
|
+
| `/crewswarm <agent> <task>` | Slash command from any channel |
|
|
17
|
+
| `crewswarm.dispatch` | Gateway RPC |
|
|
18
|
+
| `crewswarm.status` | Gateway RPC |
|
|
19
|
+
| `crewswarm.agents` | Gateway RPC |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Requirements
|
|
24
|
+
|
|
25
|
+
- [CrewSwarm](https://github.com/crewswarm/crewswarm) running locally (`npm run restart-all`)
|
|
26
|
+
- `crew-lead` reachable at `http://127.0.0.1:5010` (default)
|
|
27
|
+
- Your RT auth token from `~/.crewswarm/config.json → rt.authToken`
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# From the CrewSwarm repo root:
|
|
35
|
+
openclaw plugins install ./contrib/openclaw-plugin
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or link for development (no copy, reflects edits immediately):
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
openclaw plugins install -l ./contrib/openclaw-plugin
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Then restart the OpenClaw Gateway:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
openclaw restart
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Configure
|
|
53
|
+
|
|
54
|
+
Add to your `openclaw.json`:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"plugins": {
|
|
59
|
+
"entries": {
|
|
60
|
+
"crewswarm": {
|
|
61
|
+
"enabled": true,
|
|
62
|
+
"config": {
|
|
63
|
+
"url": "http://127.0.0.1:5010",
|
|
64
|
+
"token": "<your RT auth token>"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Find your token:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
cat ~/.crewswarm/config.json | python3 -c "import json,sys; print(json.load(sys.stdin)['rt']['authToken'])"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Optional config:
|
|
79
|
+
|
|
80
|
+
| Key | Default | Description |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| `url` | `http://127.0.0.1:5010` | crew-lead base URL |
|
|
83
|
+
| `token` | *(required)* | RT auth token |
|
|
84
|
+
| `pollIntervalMs` | `4000` | Status poll frequency |
|
|
85
|
+
| `pollTimeoutMs` | `300000` | Max wait time (5 min) |
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Usage
|
|
90
|
+
|
|
91
|
+
### From an OpenClaw agent conversation
|
|
92
|
+
|
|
93
|
+
Your OpenClaw agent will automatically call `crewswarm_dispatch` when it makes sense:
|
|
94
|
+
|
|
95
|
+
> "Use crew-coder to write a login endpoint with JWT auth"
|
|
96
|
+
|
|
97
|
+
Or explicitly:
|
|
98
|
+
|
|
99
|
+
> "Call crewswarm_dispatch with agent=crew-qa to audit my last change"
|
|
100
|
+
|
|
101
|
+
### Slash command (any channel — Telegram, WhatsApp, etc.)
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
/crewswarm crew-coder write /tmp/hello.js — a 10-line express hello world
|
|
105
|
+
/crewswarm crew-qa audit the last PR changes
|
|
106
|
+
/crewswarm crew-pm create a roadmap for the auth feature
|
|
107
|
+
/crewswarm ← lists available agents
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Gateway RPC (from scripts or other tools)
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Dispatch
|
|
114
|
+
openclaw rpc crewswarm.dispatch '{"agent":"crew-copywriter","task":"Write a tagline for CrewSwarm"}'
|
|
115
|
+
|
|
116
|
+
# Poll status
|
|
117
|
+
openclaw rpc crewswarm.status '{"taskId":"<uuid>"}'
|
|
118
|
+
|
|
119
|
+
# List agents
|
|
120
|
+
openclaw rpc crewswarm.agents
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Direct HTTP (no OpenClaw needed)
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
TOKEN="<your RT token>"
|
|
127
|
+
|
|
128
|
+
# List agents
|
|
129
|
+
curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:5010/api/agents
|
|
130
|
+
|
|
131
|
+
# Dispatch
|
|
132
|
+
curl -X POST http://127.0.0.1:5010/api/dispatch \
|
|
133
|
+
-H "Authorization: Bearer $TOKEN" \
|
|
134
|
+
-H "Content-Type: application/json" \
|
|
135
|
+
-d '{"agent":"crew-coder","task":"write hello.js"}'
|
|
136
|
+
|
|
137
|
+
# Poll
|
|
138
|
+
curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:5010/api/status/<taskId>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Available agents (default crew)
|
|
144
|
+
|
|
145
|
+
| Agent | Role |
|
|
146
|
+
|---|---|
|
|
147
|
+
| `crew-coder` | Full-stack coding |
|
|
148
|
+
| `crew-coder-front` | Frontend specialist |
|
|
149
|
+
| `crew-coder-back` | Backend specialist |
|
|
150
|
+
| `crew-frontend` | UI/CSS polish |
|
|
151
|
+
| `crew-qa` | Testing & audit |
|
|
152
|
+
| `crew-fixer` | Bug fixing |
|
|
153
|
+
| `crew-pm` | Planning & roadmaps |
|
|
154
|
+
| `crew-security` | Security review |
|
|
155
|
+
| `crew-copywriter` | Writing & docs |
|
|
156
|
+
| `crew-github` | Git & PRs |
|
|
157
|
+
| `crew-main` | General purpose |
|
|
158
|
+
| `crew-mega` | Heavy reasoning tasks |
|
|
159
|
+
| `crew-researcher` | Web research |
|
|
160
|
+
| `crew-architect` | System design |
|
|
161
|
+
| `crew-ml` | ML/data tasks |
|
|
162
|
+
| `crew-orchestrator` | Wave orchestration |
|
|
163
|
+
| `crew-seo` | SEO optimization |
|
|
164
|
+
| `crew-loco` | Web search/fetch |
|
|
165
|
+
| `crew-judge` | Task evaluation |
|
|
166
|
+
| `crew-telegram` | Telegram integration |
|
|
167
|
+
| `crew-whatsapp` | WhatsApp integration |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## How it works
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
OpenClaw agent
|
|
175
|
+
→ crewswarm_dispatch tool call
|
|
176
|
+
→ POST /api/dispatch (crew-lead HTTP, Bearer token)
|
|
177
|
+
→ RT WebSocket bus (port 18889)
|
|
178
|
+
→ target agent bridge (gateway-bridge.mjs)
|
|
179
|
+
→ LLM call (Mistral / Cerebras / DeepSeek / etc.)
|
|
180
|
+
→ tool execution (@@WRITE_FILE, @@RUN_CMD, etc.)
|
|
181
|
+
→ task.done event back on RT bus
|
|
182
|
+
→ crew-lead stores result
|
|
183
|
+
→ GET /api/status/:taskId (polled every 4s)
|
|
184
|
+
← result returned to OpenClaw agent
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
No LLM keys cross the boundary — CrewSwarm uses its own provider config. The only shared secret is the RT auth token.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Troubleshooting
|
|
192
|
+
|
|
193
|
+
**"crew-lead unreachable"** — run `npm run restart-all` in the CrewSwarm repo.
|
|
194
|
+
|
|
195
|
+
**401 Unauthorized** — token mismatch. Re-copy from `~/.crewswarm/config.json → rt.authToken`.
|
|
196
|
+
|
|
197
|
+
**Task never completes** — check `/tmp/crew-lead.log` and the bridge log in `/tmp/`.
|
|
198
|
+
|
|
199
|
+
**Agent not found** — call `crewswarm_agents` to see the live agent list.
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CrewSwarm plugin for OpenClaw
|
|
3
|
+
*
|
|
4
|
+
* Gives every OpenClaw agent access to a local CrewSwarm crew via:
|
|
5
|
+
* • crewswarm_dispatch — agent tool (call crew-coder, crew-qa, etc.)
|
|
6
|
+
* • crewswarm_status — agent tool (poll a previously dispatched task)
|
|
7
|
+
* • crewswarm_agents — agent tool (list available agents)
|
|
8
|
+
* • /crewswarm — slash command (dispatch from any channel)
|
|
9
|
+
* • crewswarm.dispatch — Gateway RPC
|
|
10
|
+
* • crewswarm.status — Gateway RPC
|
|
11
|
+
* • crewswarm.agents — Gateway RPC
|
|
12
|
+
*
|
|
13
|
+
* Config (plugins.entries.crewswarm.config):
|
|
14
|
+
* url — crew-lead base URL (default: http://127.0.0.1:5010)
|
|
15
|
+
* token — RT auth token from ~/.crewswarm/config.json → rt.authToken
|
|
16
|
+
* pollIntervalMs — status poll cadence (default: 4000)
|
|
17
|
+
* pollTimeoutMs — max wait for a result (default: 300000 = 5 min)
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
interface CrewSwarmConfig {
|
|
21
|
+
url?: string;
|
|
22
|
+
token: string;
|
|
23
|
+
pollIntervalMs?: number;
|
|
24
|
+
pollTimeoutMs?: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface DispatchResult {
|
|
28
|
+
ok: boolean;
|
|
29
|
+
taskId?: string;
|
|
30
|
+
agent?: string;
|
|
31
|
+
error?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface StatusResult {
|
|
35
|
+
ok: boolean;
|
|
36
|
+
taskId: string;
|
|
37
|
+
status: "pending" | "done" | "unknown";
|
|
38
|
+
agent?: string;
|
|
39
|
+
result?: string;
|
|
40
|
+
elapsedMs?: number;
|
|
41
|
+
error?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function getConfig(api: any): CrewSwarmConfig {
|
|
45
|
+
return api.config?.plugins?.entries?.crewswarm?.config ?? {};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function baseUrl(cfg: CrewSwarmConfig): string {
|
|
49
|
+
return (cfg.url ?? "http://127.0.0.1:5010").replace(/\/$/, "");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function authHeaders(cfg: CrewSwarmConfig): Record<string, string> {
|
|
53
|
+
return {
|
|
54
|
+
"content-type": "application/json",
|
|
55
|
+
authorization: `Bearer ${cfg.token}`,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function apiDispatch(
|
|
60
|
+
base: string,
|
|
61
|
+
headers: Record<string, string>,
|
|
62
|
+
agent: string,
|
|
63
|
+
task: string,
|
|
64
|
+
verify?: string,
|
|
65
|
+
done?: string,
|
|
66
|
+
): Promise<DispatchResult> {
|
|
67
|
+
try {
|
|
68
|
+
const body: Record<string, string> = { agent, task };
|
|
69
|
+
if (verify) body.verify = verify;
|
|
70
|
+
if (done) body.done = done;
|
|
71
|
+
const res = await fetch(`${base}/api/dispatch`, {
|
|
72
|
+
method: "POST",
|
|
73
|
+
headers,
|
|
74
|
+
body: JSON.stringify(body),
|
|
75
|
+
});
|
|
76
|
+
return res.json() as Promise<DispatchResult>;
|
|
77
|
+
} catch (e: any) {
|
|
78
|
+
return { ok: false, error: `Network error: ${e.message}` };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function apiStatus(
|
|
83
|
+
base: string,
|
|
84
|
+
headers: Record<string, string>,
|
|
85
|
+
taskId: string,
|
|
86
|
+
): Promise<StatusResult> {
|
|
87
|
+
try {
|
|
88
|
+
const res = await fetch(`${base}/api/status/${taskId}`, { headers });
|
|
89
|
+
return res.json() as Promise<StatusResult>;
|
|
90
|
+
} catch (e: any) {
|
|
91
|
+
return { ok: false, taskId, status: "unknown", error: `Network error: ${e.message}` };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async function apiAgents(
|
|
96
|
+
base: string,
|
|
97
|
+
headers: Record<string, string>,
|
|
98
|
+
): Promise<string[]> {
|
|
99
|
+
try {
|
|
100
|
+
const res = await fetch(`${base}/api/agents`, { headers });
|
|
101
|
+
const data = await res.json() as { ok: boolean; agents: string[] };
|
|
102
|
+
return data.agents ?? [];
|
|
103
|
+
} catch {
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** Dispatch and wait for result, polling until done or timeout */
|
|
109
|
+
async function dispatchAndWait(
|
|
110
|
+
api: any,
|
|
111
|
+
agent: string,
|
|
112
|
+
task: string,
|
|
113
|
+
verify?: string,
|
|
114
|
+
done?: string,
|
|
115
|
+
): Promise<string> {
|
|
116
|
+
const cfg = getConfig(api);
|
|
117
|
+
if (!cfg.token) return "Error: no CrewSwarm token configured (plugins.entries.crewswarm.config.token)";
|
|
118
|
+
|
|
119
|
+
const base = baseUrl(cfg);
|
|
120
|
+
const headers = authHeaders(cfg);
|
|
121
|
+
const pollMs = cfg.pollIntervalMs ?? 4000;
|
|
122
|
+
const timeoutMs = cfg.pollTimeoutMs ?? 300_000;
|
|
123
|
+
|
|
124
|
+
const dispatch = await apiDispatch(base, headers, agent, task, verify, done);
|
|
125
|
+
if (!dispatch.ok || !dispatch.taskId) {
|
|
126
|
+
return `Error dispatching to ${agent}: ${dispatch.error ?? "unknown error"}`;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const taskId = dispatch.taskId;
|
|
130
|
+
const deadline = Date.now() + timeoutMs;
|
|
131
|
+
|
|
132
|
+
while (Date.now() < deadline) {
|
|
133
|
+
await new Promise((r) => setTimeout(r, pollMs));
|
|
134
|
+
const s = await apiStatus(base, headers, taskId);
|
|
135
|
+
if (s.status === "done") return s.result ?? "(no result)";
|
|
136
|
+
if (s.status === "unknown") return `Error: task ${taskId} not found`;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return `Timeout: ${agent} did not complete within ${timeoutMs / 1000}s (taskId: ${taskId})`;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export default function register(api: any) {
|
|
143
|
+
// ── Agent tools ───────────────────────────────────────────────────────────
|
|
144
|
+
|
|
145
|
+
api.registerTool({
|
|
146
|
+
name: "crewswarm_dispatch",
|
|
147
|
+
description:
|
|
148
|
+
"Dispatch a task to a CrewSwarm specialist agent and wait for the result. " +
|
|
149
|
+
"Use this to delegate coding, QA, writing, security review, or any other task " +
|
|
150
|
+
"to the appropriate crew member. The call blocks until the agent replies.",
|
|
151
|
+
parameters: {
|
|
152
|
+
type: "object",
|
|
153
|
+
properties: {
|
|
154
|
+
agent: {
|
|
155
|
+
type: "string",
|
|
156
|
+
description:
|
|
157
|
+
"Target agent id. Common values: crew-coder, crew-qa, crew-fixer, " +
|
|
158
|
+
"crew-pm, crew-security, crew-copywriter, crew-frontend, crew-coder-back. " +
|
|
159
|
+
"Call crewswarm_agents first if unsure.",
|
|
160
|
+
},
|
|
161
|
+
task: {
|
|
162
|
+
type: "string",
|
|
163
|
+
description: "Full task description for the agent.",
|
|
164
|
+
},
|
|
165
|
+
verify: {
|
|
166
|
+
type: "string",
|
|
167
|
+
description:
|
|
168
|
+
"Optional: how the agent should verify its output (e.g. 'curl returns 200').",
|
|
169
|
+
},
|
|
170
|
+
done: {
|
|
171
|
+
type: "string",
|
|
172
|
+
description:
|
|
173
|
+
"Optional: explicit done condition (e.g. 'file contains const express').",
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
required: ["agent", "task"],
|
|
177
|
+
additionalProperties: false,
|
|
178
|
+
},
|
|
179
|
+
handler: async ({ agent, task, verify, done }: {
|
|
180
|
+
agent: string; task: string; verify?: string; done?: string;
|
|
181
|
+
}) => {
|
|
182
|
+
return dispatchAndWait(api, agent, task, verify, done);
|
|
183
|
+
},
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
api.registerTool({
|
|
187
|
+
name: "crewswarm_status",
|
|
188
|
+
description:
|
|
189
|
+
"Poll the status of a previously dispatched CrewSwarm task by taskId. " +
|
|
190
|
+
"Returns pending, done (with result), or unknown.",
|
|
191
|
+
parameters: {
|
|
192
|
+
type: "object",
|
|
193
|
+
properties: {
|
|
194
|
+
taskId: { type: "string", description: "taskId returned by crewswarm_dispatch" },
|
|
195
|
+
},
|
|
196
|
+
required: ["taskId"],
|
|
197
|
+
additionalProperties: false,
|
|
198
|
+
},
|
|
199
|
+
handler: async ({ taskId }: { taskId: string }) => {
|
|
200
|
+
const cfg = getConfig(api);
|
|
201
|
+
if (!cfg.token) return "Error: no CrewSwarm token configured";
|
|
202
|
+
const s = await apiStatus(baseUrl(cfg), authHeaders(cfg), taskId);
|
|
203
|
+
if (s.status === "done") return `Done: ${s.result}`;
|
|
204
|
+
if (s.status === "pending") return `Pending (${s.elapsedMs ?? 0}ms elapsed)`;
|
|
205
|
+
return `Unknown task: ${taskId}`;
|
|
206
|
+
},
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
api.registerTool({
|
|
210
|
+
name: "crewswarm_agents",
|
|
211
|
+
description: "List all available CrewSwarm agents by id.",
|
|
212
|
+
parameters: {
|
|
213
|
+
type: "object",
|
|
214
|
+
properties: {},
|
|
215
|
+
additionalProperties: false,
|
|
216
|
+
},
|
|
217
|
+
handler: async () => {
|
|
218
|
+
const cfg = getConfig(api);
|
|
219
|
+
if (!cfg.token) return "Error: no CrewSwarm token configured";
|
|
220
|
+
const agents = await apiAgents(baseUrl(cfg), authHeaders(cfg));
|
|
221
|
+
return agents.length
|
|
222
|
+
? `Available agents:\n${agents.map((a) => ` • ${a}`).join("\n")}`
|
|
223
|
+
: "No agents found — is crew-lead running?";
|
|
224
|
+
},
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
// ── Slash command: /crewswarm <agent> <task> ──────────────────────────────
|
|
228
|
+
|
|
229
|
+
api.registerCommand({
|
|
230
|
+
name: "crewswarm",
|
|
231
|
+
description: "Dispatch a task to CrewSwarm. Usage: /crewswarm <agent> <task>",
|
|
232
|
+
acceptsArgs: true,
|
|
233
|
+
requireAuth: true,
|
|
234
|
+
handler: async (ctx: any) => {
|
|
235
|
+
const args = (ctx.args ?? "").trim();
|
|
236
|
+
if (!args) {
|
|
237
|
+
const cfg = getConfig(api);
|
|
238
|
+
const agents = await apiAgents(baseUrl(cfg), authHeaders(cfg));
|
|
239
|
+
return {
|
|
240
|
+
text: agents.length
|
|
241
|
+
? `CrewSwarm agents: ${agents.join(", ")}\n\nUsage: /crewswarm <agent> <task>`
|
|
242
|
+
: "crew-lead not reachable. Is CrewSwarm running?",
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const [agent, ...rest] = args.split(" ");
|
|
247
|
+
const task = rest.join(" ").trim();
|
|
248
|
+
if (!task) return { text: `Usage: /crewswarm <agent> <task>\nExample: /crewswarm crew-coder write hello.js` };
|
|
249
|
+
|
|
250
|
+
const result = await dispatchAndWait(api, agent, task);
|
|
251
|
+
return { text: `[${agent}]: ${result}` };
|
|
252
|
+
},
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
// ── Gateway RPC ───────────────────────────────────────────────────────────
|
|
256
|
+
|
|
257
|
+
api.registerGatewayMethod("crewswarm.dispatch", async ({ params, respond }: any) => {
|
|
258
|
+
const { agent, task, verify, done } = params ?? {};
|
|
259
|
+
if (!agent || !task) {
|
|
260
|
+
respond(false, { error: "agent and task are required" });
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
const cfg = getConfig(api);
|
|
264
|
+
const dispatch = await apiDispatch(baseUrl(cfg), authHeaders(cfg), agent, task, verify, done);
|
|
265
|
+
respond(dispatch.ok, dispatch);
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
api.registerGatewayMethod("crewswarm.status", async ({ params, respond }: any) => {
|
|
269
|
+
const { taskId } = params ?? {};
|
|
270
|
+
if (!taskId) { respond(false, { error: "taskId required" }); return; }
|
|
271
|
+
const cfg = getConfig(api);
|
|
272
|
+
const s = await apiStatus(baseUrl(cfg), authHeaders(cfg), taskId);
|
|
273
|
+
respond(s.ok, s);
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
api.registerGatewayMethod("crewswarm.agents", async ({ respond }: any) => {
|
|
277
|
+
const cfg = getConfig(api);
|
|
278
|
+
const agents = await apiAgents(baseUrl(cfg), authHeaders(cfg));
|
|
279
|
+
respond(true, { agents });
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
// ── Background health check (logs warning on startup if unreachable) ──────
|
|
283
|
+
|
|
284
|
+
api.registerService({
|
|
285
|
+
id: "crewswarm-health",
|
|
286
|
+
start: async () => {
|
|
287
|
+
const cfg = getConfig(api);
|
|
288
|
+
if (!cfg.token) {
|
|
289
|
+
api.logger?.warn("[crewswarm] No token configured — set plugins.entries.crewswarm.config.token");
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
try {
|
|
293
|
+
const res = await fetch(`${baseUrl(cfg)}/health`);
|
|
294
|
+
const data = await res.json() as { ok: boolean };
|
|
295
|
+
if (data.ok) {
|
|
296
|
+
api.logger?.info(`[crewswarm] Connected to crew-lead at ${baseUrl(cfg)}`);
|
|
297
|
+
} else {
|
|
298
|
+
api.logger?.warn(`[crewswarm] crew-lead health check returned not-ok`);
|
|
299
|
+
}
|
|
300
|
+
} catch {
|
|
301
|
+
api.logger?.warn(`[crewswarm] crew-lead unreachable at ${baseUrl(cfg)} — start CrewSwarm first`);
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
stop: () => {},
|
|
305
|
+
});
|
|
306
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "crewswarm",
|
|
3
|
+
"name": "CrewSwarm",
|
|
4
|
+
"description": "Dispatch tasks to a local CrewSwarm multi-agent crew from any OpenClaw agent. Adds the crewswarm_dispatch tool, /crewswarm slash command, and Gateway RPC methods.",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"openclaw": {
|
|
7
|
+
"extensions": ["./index.ts"]
|
|
8
|
+
},
|
|
9
|
+
"configSchema": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"properties": {
|
|
13
|
+
"url": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"default": "http://127.0.0.1:5010",
|
|
16
|
+
"description": "Base URL of the CrewSwarm crew-lead HTTP server"
|
|
17
|
+
},
|
|
18
|
+
"token": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "RT auth token from ~/.crewswarm/config.json → rt.authToken"
|
|
21
|
+
},
|
|
22
|
+
"pollIntervalMs": {
|
|
23
|
+
"type": "number",
|
|
24
|
+
"default": 4000,
|
|
25
|
+
"description": "How often (ms) to poll /api/status when waiting for a task result"
|
|
26
|
+
},
|
|
27
|
+
"pollTimeoutMs": {
|
|
28
|
+
"type": "number",
|
|
29
|
+
"default": 300000,
|
|
30
|
+
"description": "Max time (ms) to wait for a dispatched task before giving up"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": ["token"]
|
|
34
|
+
},
|
|
35
|
+
"uiHints": {
|
|
36
|
+
"url": { "label": "crew-lead URL", "placeholder": "http://127.0.0.1:5010" },
|
|
37
|
+
"token": { "label": "RT Auth Token", "sensitive": true },
|
|
38
|
+
"pollIntervalMs": { "label": "Poll interval (ms)" },
|
|
39
|
+
"pollTimeoutMs": { "label": "Task timeout (ms)" }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "crewswarm-openclaw-plugin",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OpenClaw plugin — dispatch tasks to a local CrewSwarm multi-agent crew",
|
|
5
|
+
"keywords": ["openclaw", "crewswarm", "multi-agent", "ai", "orchestration"],
|
|
6
|
+
"homepage": "https://github.com/CrewSwarm/CrewSwarm",
|
|
7
|
+
"bugs": "https://github.com/CrewSwarm/CrewSwarm/issues",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/CrewSwarm/CrewSwarm.git",
|
|
11
|
+
"directory": "contrib/openclaw-plugin"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"openclaw": {
|
|
15
|
+
"extensions": ["./index.ts"],
|
|
16
|
+
"skills": ["./skills/crewswarm"]
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.ts",
|
|
20
|
+
"openclaw.plugin.json",
|
|
21
|
+
"skills/",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=20"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# CrewSwarm Dispatch Skill
|
|
2
|
+
|
|
3
|
+
## When to use this skill
|
|
4
|
+
|
|
5
|
+
Use CrewSwarm tools when the user asks you to **build, write, test, review, fix, or ship something** that would benefit from a specialist agent — especially multi-step work that crosses disciplines (code + tests + docs, or frontend + backend + QA).
|
|
6
|
+
|
|
7
|
+
**Trigger phrases:**
|
|
8
|
+
- "build / write / create / implement [feature]"
|
|
9
|
+
- "test / audit / review [code or PR]"
|
|
10
|
+
- "fix [bug]"
|
|
11
|
+
- "write docs / a README / a spec for..."
|
|
12
|
+
- "dispatch crew-coder / crew-qa / crew-pm to..."
|
|
13
|
+
- "have the crew handle..."
|
|
14
|
+
|
|
15
|
+
## Available tools
|
|
16
|
+
|
|
17
|
+
- `crewswarm_agents` — list all available agents (call this first if unsure)
|
|
18
|
+
- `crewswarm_dispatch` — send a task to a specialist and wait for the result
|
|
19
|
+
- `crewswarm_status` — poll a running task by taskId
|
|
20
|
+
|
|
21
|
+
## How to use
|
|
22
|
+
|
|
23
|
+
### Step 1 — pick the right agent
|
|
24
|
+
|
|
25
|
+
| Task type | Agent |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Write or edit code (general) | `crew-coder` |
|
|
28
|
+
| Frontend / UI / CSS | `crew-coder-front` or `crew-frontend` |
|
|
29
|
+
| Backend / API / DB | `crew-coder-back` |
|
|
30
|
+
| Write tests, audit, QA | `crew-qa` |
|
|
31
|
+
| Fix a bug or error | `crew-fixer` |
|
|
32
|
+
| Plan a feature or roadmap | `crew-pm` |
|
|
33
|
+
| Security review | `crew-security` |
|
|
34
|
+
| Write docs, copy, README | `crew-copywriter` |
|
|
35
|
+
| Git / PR operations | `crew-github` |
|
|
36
|
+
| Heavy reasoning / complex tasks | `crew-mega` |
|
|
37
|
+
| Web research | `crew-researcher` |
|
|
38
|
+
| System architecture / design | `crew-architect` |
|
|
39
|
+
| ML / data tasks | `crew-ml` |
|
|
40
|
+
| SEO optimization | `crew-seo` |
|
|
41
|
+
| Task evaluation / judging | `crew-judge` |
|
|
42
|
+
| General / orchestration | `crew-main` |
|
|
43
|
+
|
|
44
|
+
If you're unsure, call `crewswarm_agents` first to see the live list.
|
|
45
|
+
|
|
46
|
+
### Step 2 — dispatch with a clear task
|
|
47
|
+
|
|
48
|
+
Write the task as a precise, self-contained instruction. Include:
|
|
49
|
+
- **What** to produce (file path, function name, endpoint, etc.)
|
|
50
|
+
- **How** to verify it worked (optional `verify` field)
|
|
51
|
+
- **Done condition** (optional `done` field)
|
|
52
|
+
|
|
53
|
+
Good example:
|
|
54
|
+
```
|
|
55
|
+
agent: "crew-coder"
|
|
56
|
+
task: "Write /src/api/auth.ts — a JWT login endpoint using jose. Accept email+password, validate against users array, return httpOnly cookie."
|
|
57
|
+
verify: "curl -X POST http://localhost:3000/login returns Set-Cookie header"
|
|
58
|
+
done: "File exists and contains createSigner from jose"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Step 3 — wait and relay
|
|
62
|
+
|
|
63
|
+
`crewswarm_dispatch` blocks until the agent finishes (up to 5 minutes). The result includes the agent's full output including any files written, commands run, and verification results. Relay the relevant parts to the user.
|
|
64
|
+
|
|
65
|
+
## Chaining agents
|
|
66
|
+
|
|
67
|
+
For complex work, dispatch sequentially — use the result of one agent as context for the next:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
1. crewswarm_dispatch crew-pm → "Create a task plan for user auth feature"
|
|
71
|
+
2. crewswarm_dispatch crew-coder → "Implement: [result from step 1]"
|
|
72
|
+
3. crewswarm_dispatch crew-qa → "Test: [result from step 2]"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Slash command alternative
|
|
76
|
+
|
|
77
|
+
Users can also dispatch directly from any channel:
|
|
78
|
+
```
|
|
79
|
+
/crewswarm crew-coder write /tmp/hello.js — a 10-line express hello world
|
|
80
|
+
/crewswarm crew-qa audit the last PR
|
|
81
|
+
/crewswarm ← lists available agents
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## When NOT to use CrewSwarm
|
|
85
|
+
|
|
86
|
+
- Simple one-liner answers or explanations — handle directly
|
|
87
|
+
- Tasks you can complete yourself without writing files or running code
|
|
88
|
+
- If CrewSwarm is not running (`crewswarm_agents` returns empty or errors)
|