@jaimevalasek/aioson 1.7.2 → 1.8.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/CHANGELOG.md +35 -0
- package/README.md +153 -10
- package/docs/en/cli-reference.md +56 -1
- package/docs/en/i18n.md +18 -18
- package/docs/en/schemas/index.json +10 -0
- package/docs/en/schemas/parallel-assign.schema.json +9 -0
- package/docs/en/schemas/parallel-doctor.schema.json +36 -0
- package/docs/en/schemas/parallel-guard.schema.json +63 -0
- package/docs/en/schemas/parallel-merge.schema.json +84 -0
- package/docs/en/schemas/parallel-status.schema.json +91 -1
- package/docs/integrations/apps-publish-marketplace.md +94 -0
- package/docs/pt/README.md +9 -0
- package/docs/pt/agentes.md +324 -3
- package/docs/pt/clientes-ai.md +7 -3
- package/docs/pt/comandos-cli.md +160 -13
- package/docs/pt/compress-agents.md +304 -0
- package/docs/pt/design-docs-governance.md +59 -0
- package/docs/pt/feature-archive.md +191 -0
- package/docs/pt/genome-3.0-spec.md +115 -4
- package/docs/pt/genome-distribution.md +232 -0
- package/docs/pt/inicio-rapido.md +1 -0
- package/docs/pt/motor-hardening.md +492 -0
- package/docs/pt/runner-system.md +113 -0
- package/package.json +2 -1
- package/src/agent-manifests.js +66 -0
- package/src/agents.js +27 -7
- package/src/autonomy-policy.js +139 -0
- package/src/brain-query.js +161 -0
- package/src/cli.js +1377 -1099
- package/src/commands/agents.js +102 -7
- package/src/commands/artifact-validate.js +33 -4
- package/src/commands/auth.js +272 -0
- package/src/commands/brain-query.js +44 -0
- package/src/commands/briefing.js +344 -0
- package/src/commands/commit-prepare.js +547 -0
- package/src/commands/compress-agents.js +416 -0
- package/src/commands/context-health.js +4 -2
- package/src/commands/context-trim.js +17 -11
- package/src/commands/design-hybrid-options.js +3 -3
- package/src/commands/devlog-process.js +6 -4
- package/src/commands/dossier.js +423 -0
- package/src/commands/feature-archive.js +513 -0
- package/src/commands/feature-close.js +123 -18
- package/src/commands/gate-approve.js +198 -0
- package/src/commands/gate-check.js +24 -5
- package/src/commands/genome-doctor.js +166 -9
- package/src/commands/git-guard.js +170 -0
- package/src/commands/harness.js +121 -0
- package/src/commands/implementation-plan.js +47 -20
- package/src/commands/init.js +6 -2
- package/src/commands/install.js +6 -2
- package/src/commands/live.js +497 -56
- package/src/commands/locale-apply.js +9 -6
- package/src/commands/locale-diff.js +11 -112
- package/src/commands/mcp-doctor.js +2 -1
- package/src/commands/mcp-init.js +4 -10
- package/src/commands/memory.js +234 -0
- package/src/commands/parallel-assign.js +107 -27
- package/src/commands/parallel-doctor.js +416 -3
- package/src/commands/parallel-guard.js +241 -0
- package/src/commands/parallel-init.js +66 -4
- package/src/commands/parallel-merge.js +299 -0
- package/src/commands/parallel-status.js +147 -3
- package/src/commands/preflight.js +63 -4
- package/src/commands/qa-init.js +10 -5
- package/src/commands/revision.js +235 -0
- package/src/commands/scaffold-complete.js +188 -0
- package/src/commands/security-audit.js +275 -0
- package/src/commands/security-scan.js +376 -0
- package/src/commands/self-implement-loop.js +46 -2
- package/src/commands/setup-context.js +11 -10
- package/src/commands/squad-agent-create.js +51 -9
- package/src/commands/squad-investigate.js +53 -0
- package/src/commands/squad-plan.js +33 -1
- package/src/commands/squad-scaffold.js +4 -3
- package/src/commands/squad-score.js +71 -14
- package/src/commands/squad-status.js +22 -1
- package/src/commands/squad-validate.js +93 -2
- package/src/commands/store-genome.js +304 -0
- package/src/commands/store-skill.js +247 -0
- package/src/commands/store-squad.js +431 -0
- package/src/commands/store-system.js +392 -0
- package/src/commands/tool-capabilities.js +63 -0
- package/src/commands/update.js +3 -3
- package/src/commands/verify-gate.js +40 -0
- package/src/commands/workflow-execute.js +644 -155
- package/src/commands/workflow-harden.js +231 -0
- package/src/commands/workflow-heal.js +136 -0
- package/src/commands/workflow-next.js +460 -22
- package/src/commands/workflow-status.js +328 -138
- package/src/commands/workspace.js +144 -0
- package/src/constants.js +42 -75
- package/src/context-memory.js +133 -4
- package/src/context-writer.js +2 -1
- package/src/context.js +32 -2
- package/src/doctor.js +46 -6
- package/src/dossier/codemap-store.js +267 -0
- package/src/dossier/dossier-bootstrap.js +222 -0
- package/src/dossier/dossier-compact.js +159 -0
- package/src/dossier/lock.js +128 -0
- package/src/dossier/revision-store.js +313 -0
- package/src/dossier/schema.js +155 -0
- package/src/dossier/store.js +400 -0
- package/src/execution-gateway.js +3 -0
- package/src/friction-scanner.js +202 -0
- package/src/genome-schema.js +24 -1
- package/src/genomes.js +33 -0
- package/src/handoff-contract.js +363 -0
- package/src/handoff-validator.js +45 -0
- package/src/harness/circuit-breaker.js +135 -0
- package/src/i18n/messages/en.js +317 -22
- package/src/i18n/messages/es.js +259 -18
- package/src/i18n/messages/fr.js +260 -18
- package/src/i18n/messages/pt-BR.js +313 -22
- package/src/install-profile.js +0 -16
- package/src/installer.js +70 -6
- package/src/lib/git-commit-guard.js +691 -0
- package/src/lib/security/artifact-reader.js +167 -0
- package/src/lib/security/exit-codes.js +51 -0
- package/src/lib/security/findings-writer.js +176 -0
- package/src/lib/security/runtime-events.js +77 -0
- package/src/lib/security/secrets-regex.js +115 -0
- package/src/lib/store/security-scan.js +173 -0
- package/src/lib/terminal-checkbox.js +130 -0
- package/src/lib/tmux-launcher.js +163 -0
- package/src/lib/tool-capabilities.js +102 -0
- package/src/locales.js +12 -8
- package/src/parallel-workspace.js +756 -0
- package/src/parser.js +8 -1
- package/src/path-guard.js +47 -0
- package/src/preflight-engine.js +237 -26
- package/src/self-healing.js +142 -0
- package/src/session-handoff.js +111 -1
- package/src/squad/squad-scaffold.js +183 -19
- package/src/test-briefing.js +226 -0
- package/src/updater.js +1 -1
- package/src/utils.js +3 -0
- package/src/workflow-gates.js +185 -0
- package/template/.aioson/agents/analyst.md +76 -130
- package/template/.aioson/agents/architect.md +53 -86
- package/template/.aioson/agents/committer.md +161 -0
- package/template/.aioson/agents/cypher.md +252 -0
- package/template/.aioson/agents/dev.md +112 -628
- package/template/.aioson/agents/deyvin.md +33 -236
- package/template/.aioson/agents/discover.md +235 -0
- package/template/.aioson/agents/discovery-design-doc.md +17 -252
- package/template/.aioson/agents/genome.md +76 -26
- package/template/.aioson/agents/manifests/analyst.manifest.json +26 -0
- package/template/.aioson/agents/manifests/architect.manifest.json +23 -0
- package/template/.aioson/agents/manifests/committer.manifest.json +23 -0
- package/template/.aioson/agents/manifests/dev.manifest.json +37 -0
- package/template/.aioson/agents/manifests/orchestrator.manifest.json +30 -0
- package/template/.aioson/agents/manifests/pentester.manifest.json +39 -0
- package/template/.aioson/agents/manifests/pm.manifest.json +26 -0
- package/template/.aioson/agents/manifests/product.manifest.json +23 -0
- package/template/.aioson/agents/manifests/qa.manifest.json +25 -0
- package/template/.aioson/agents/manifests/setup.manifest.json +20 -0
- package/template/.aioson/agents/manifests/ux-ui.manifest.json +24 -0
- package/template/.aioson/agents/neo.md +5 -7
- package/template/.aioson/agents/orache.md +2 -6
- package/template/.aioson/agents/orchestrator.md +81 -182
- package/template/.aioson/agents/pentester.md +235 -0
- package/template/.aioson/agents/pm.md +40 -104
- package/template/.aioson/agents/product.md +99 -344
- package/template/.aioson/agents/profiler-enricher.md +57 -6
- package/template/.aioson/agents/profiler-forge.md +17 -7
- package/template/.aioson/agents/profiler-researcher.md +29 -6
- package/template/.aioson/agents/qa.md +168 -514
- package/template/.aioson/agents/setup.md +52 -278
- package/template/.aioson/agents/sheldon.md +122 -754
- package/template/.aioson/agents/site-forge.md +111 -1583
- package/template/.aioson/agents/squad.md +139 -2010
- package/template/.aioson/agents/tester.md +10 -0
- package/template/.aioson/agents/ux-ui.md +104 -812
- package/template/.aioson/agents/validator.md +69 -0
- package/template/.aioson/brains/scripts/query.js +5 -1
- package/template/.aioson/config/autonomy-protocol.json +43 -0
- package/template/.aioson/config.md +43 -15
- package/template/.aioson/constitution.md +36 -33
- package/template/.aioson/context/design-doc.md +136 -0
- package/template/.aioson/context/project-map.md +57 -0
- package/template/.aioson/design-docs/code-reuse.md +48 -0
- package/template/.aioson/design-docs/componentization.md +47 -0
- package/template/.aioson/design-docs/file-size.md +52 -0
- package/template/.aioson/design-docs/folder-structure.md +51 -0
- package/template/.aioson/design-docs/naming.md +54 -0
- package/template/.aioson/docs/LAYERS.md +12 -2
- package/template/.aioson/docs/dev/execution-discipline.md +106 -0
- package/template/.aioson/docs/dev/stack-conventions.md +83 -0
- package/template/.aioson/docs/deyvin/continuity-recovery.md +57 -0
- package/template/.aioson/docs/deyvin/debugging-escalation.md +30 -0
- package/template/.aioson/docs/deyvin/pair-execution.md +44 -0
- package/template/.aioson/docs/deyvin/runtime-handoffs.md +36 -0
- package/template/.aioson/docs/product/conversation-playbook.md +116 -0
- package/template/.aioson/docs/product/prd-contract.md +107 -0
- package/template/.aioson/docs/product/quality-lens.md +57 -0
- package/template/.aioson/docs/product/research-loop.md +65 -0
- package/template/.aioson/docs/sheldon/enrichment-paths.md +134 -0
- package/template/.aioson/docs/sheldon/quality-lens.md +57 -0
- package/template/.aioson/docs/sheldon/research-loop.md +56 -0
- package/template/.aioson/docs/sheldon/web-intelligence.md +75 -0
- package/template/.aioson/docs/site-forge-build.md +195 -0
- package/template/.aioson/docs/site-forge-extraction.md +135 -0
- package/template/.aioson/docs/site-forge-qa.md +155 -0
- package/template/.aioson/docs/site-forge-recon.md +434 -0
- package/template/.aioson/docs/site-forge-transform.md +249 -0
- package/template/.aioson/docs/squad/content-output.md +91 -0
- package/template/.aioson/docs/squad/creation-flow.md +135 -0
- package/template/.aioson/docs/squad/domain-classification.md +117 -0
- package/template/.aioson/docs/squad/genome-bindings.md +47 -0
- package/template/.aioson/docs/squad/package-contract.md +234 -0
- package/template/.aioson/docs/squad/quality-lens.md +56 -0
- package/template/.aioson/docs/squad/research-loop.md +59 -0
- package/template/.aioson/docs/squad/session-operations.md +117 -0
- package/template/.aioson/docs/squad/workflow-quality.md +165 -0
- package/template/.aioson/docs/ux-ui/accessibility-audit.md +55 -0
- package/template/.aioson/docs/ux-ui/audit-mode.md +86 -0
- package/template/.aioson/docs/ux-ui/component-map.md +35 -0
- package/template/.aioson/docs/ux-ui/design-execution.md +111 -0
- package/template/.aioson/docs/ux-ui/design-gate.md +27 -0
- package/template/.aioson/docs/ux-ui/research-mode.md +39 -0
- package/template/.aioson/docs/ux-ui/site-delivery.md +156 -0
- package/template/.aioson/docs/ux-ui/token-contract.md +57 -0
- package/template/.aioson/genomes/copywriting.meta.json +48 -0
- package/template/.aioson/git-guard.json +11 -0
- package/template/.aioson/mcp/servers.md +0 -1
- package/template/.aioson/rules/agent-language-policy.md +93 -0
- package/template/.aioson/rules/aioson-context-boundary.md +63 -0
- package/template/.aioson/rules/canonical-path-contract.md +47 -0
- package/template/.aioson/rules/data-format-convention.md +24 -86
- package/template/.aioson/rules/disk-first-artifacts.md +44 -0
- package/template/.aioson/rules/output-brevity.md +44 -0
- package/template/.aioson/rules/prd-section-ownership.md +49 -0
- package/template/.aioson/rules/security-baseline.md +139 -0
- package/template/.aioson/rules/spec-level-ownership.md +61 -0
- package/template/.aioson/rules/squad-driver-pattern.md +81 -0
- package/template/.aioson/schemas/squad-blueprint.schema.json +24 -0
- package/template/.aioson/schemas/squad-manifest.schema.json +44 -0
- package/template/.aioson/skills/process/aioson-spec-driven/references/pm.md +30 -0
- package/template/.aioson/skills/process/secure-tdd/SKILL.md +97 -0
- package/template/.aioson/skills/process/secure-tdd/references/nextjs.md +81 -0
- package/template/.aioson/skills/process/secure-tdd/references/node-express.md +91 -0
- package/template/.aioson/skills/process/secure-tdd/references/planned-stacks.md +33 -0
- package/template/.aioson/skills/static/harness-validate/SKILL.md +46 -0
- package/template/.aioson/skills/static/web-research-cache.md +3 -0
- package/template/.aioson/tasks/squad-create.md +35 -8
- package/template/.aioson/tasks/squad-design.md +50 -2
- package/template/.aioson/tasks/squad-investigate.md +14 -1
- package/template/.claude/commands/aioson/agent/committer.md +5 -0
- package/template/.claude/commands/aioson/agent/copywriter.md +5 -0
- package/template/.claude/commands/aioson/agent/cypher.md +5 -0
- package/template/.claude/commands/aioson/agent/pair.md +5 -0
- package/template/.claude/commands/aioson/agent/validator.md +5 -0
- package/template/.gemini/commands/aios-analyst.toml +6 -3
- package/template/.gemini/commands/aios-architect.toml +7 -6
- package/template/.gemini/commands/aios-committer.toml +7 -0
- package/template/.gemini/commands/aios-copywriter.toml +7 -0
- package/template/.gemini/commands/aios-cypher.toml +7 -0
- package/template/.gemini/commands/aios-dev.toml +8 -7
- package/template/.gemini/commands/aios-deyvin.toml +6 -5
- package/template/.gemini/commands/aios-discovery-design-doc.toml +6 -3
- package/template/.gemini/commands/aios-genome.toml +7 -0
- package/template/.gemini/commands/aios-neo.toml +5 -3
- package/template/.gemini/commands/aios-orache.toml +7 -0
- package/template/.gemini/commands/aios-orchestrator.toml +8 -7
- package/template/.gemini/commands/aios-pair.toml +6 -5
- package/template/.gemini/commands/aios-pm.toml +8 -7
- package/template/.gemini/commands/aios-product.toml +5 -3
- package/template/.gemini/commands/aios-qa.toml +6 -5
- package/template/.gemini/commands/aios-setup.toml +5 -2
- package/template/.gemini/commands/aios-sheldon.toml +7 -0
- package/template/.gemini/commands/aios-site-forge.toml +7 -0
- package/template/.gemini/commands/aios-squad.toml +7 -0
- package/template/.gemini/commands/aios-tester.toml +6 -5
- package/template/.gemini/commands/aios-ux-ui.toml +8 -7
- package/template/.gemini/commands/aios-validator.toml +7 -0
- package/template/AGENTS.md +12 -1
- package/template/CLAUDE.md +5 -1
- package/template/.aioson/locales/en/agents/analyst.md +0 -244
- package/template/.aioson/locales/en/agents/architect.md +0 -245
- package/template/.aioson/locales/en/agents/dev.md +0 -397
- package/template/.aioson/locales/en/agents/deyvin.md +0 -137
- package/template/.aioson/locales/en/agents/discovery-design-doc.md +0 -27
- package/template/.aioson/locales/en/agents/genome.md +0 -212
- package/template/.aioson/locales/en/agents/neo.md +0 -8
- package/template/.aioson/locales/en/agents/orache.md +0 -6
- package/template/.aioson/locales/en/agents/orchestrator.md +0 -189
- package/template/.aioson/locales/en/agents/pair.md +0 -5
- package/template/.aioson/locales/en/agents/pm.md +0 -84
- package/template/.aioson/locales/en/agents/product.md +0 -378
- package/template/.aioson/locales/en/agents/profiler-enricher.md +0 -5
- package/template/.aioson/locales/en/agents/profiler-forge.md +0 -5
- package/template/.aioson/locales/en/agents/profiler-researcher.md +0 -5
- package/template/.aioson/locales/en/agents/qa.md +0 -270
- package/template/.aioson/locales/en/agents/setup.md +0 -421
- package/template/.aioson/locales/en/agents/sheldon.md +0 -455
- package/template/.aioson/locales/en/agents/squad.md +0 -449
- package/template/.aioson/locales/en/agents/tester.md +0 -6
- package/template/.aioson/locales/en/agents/ux-ui.md +0 -668
- package/template/.aioson/locales/es/agents/analyst.md +0 -225
- package/template/.aioson/locales/es/agents/architect.md +0 -245
- package/template/.aioson/locales/es/agents/dev.md +0 -370
- package/template/.aioson/locales/es/agents/deyvin.md +0 -99
- package/template/.aioson/locales/es/agents/discovery-design-doc.md +0 -21
- package/template/.aioson/locales/es/agents/genome.md +0 -104
- package/template/.aioson/locales/es/agents/neo.md +0 -50
- package/template/.aioson/locales/es/agents/orache.md +0 -105
- package/template/.aioson/locales/es/agents/orchestrator.md +0 -194
- package/template/.aioson/locales/es/agents/pair.md +0 -7
- package/template/.aioson/locales/es/agents/pm.md +0 -90
- package/template/.aioson/locales/es/agents/product.md +0 -372
- package/template/.aioson/locales/es/agents/profiler-enricher.md +0 -7
- package/template/.aioson/locales/es/agents/profiler-forge.md +0 -7
- package/template/.aioson/locales/es/agents/profiler-researcher.md +0 -7
- package/template/.aioson/locales/es/agents/qa.md +0 -198
- package/template/.aioson/locales/es/agents/setup.md +0 -405
- package/template/.aioson/locales/es/agents/sheldon.md +0 -309
- package/template/.aioson/locales/es/agents/squad.md +0 -532
- package/template/.aioson/locales/es/agents/tester.md +0 -9
- package/template/.aioson/locales/es/agents/ux-ui.md +0 -212
- package/template/.aioson/locales/fr/agents/analyst.md +0 -225
- package/template/.aioson/locales/fr/agents/architect.md +0 -245
- package/template/.aioson/locales/fr/agents/dev.md +0 -370
- package/template/.aioson/locales/fr/agents/deyvin.md +0 -99
- package/template/.aioson/locales/fr/agents/discovery-design-doc.md +0 -21
- package/template/.aioson/locales/fr/agents/genome.md +0 -104
- package/template/.aioson/locales/fr/agents/neo.md +0 -50
- package/template/.aioson/locales/fr/agents/orache.md +0 -106
- package/template/.aioson/locales/fr/agents/orchestrator.md +0 -194
- package/template/.aioson/locales/fr/agents/pair.md +0 -7
- package/template/.aioson/locales/fr/agents/pm.md +0 -90
- package/template/.aioson/locales/fr/agents/product.md +0 -372
- package/template/.aioson/locales/fr/agents/profiler-enricher.md +0 -7
- package/template/.aioson/locales/fr/agents/profiler-forge.md +0 -7
- package/template/.aioson/locales/fr/agents/profiler-researcher.md +0 -7
- package/template/.aioson/locales/fr/agents/qa.md +0 -198
- package/template/.aioson/locales/fr/agents/setup.md +0 -405
- package/template/.aioson/locales/fr/agents/sheldon.md +0 -309
- package/template/.aioson/locales/fr/agents/squad.md +0 -532
- package/template/.aioson/locales/fr/agents/tester.md +0 -9
- package/template/.aioson/locales/fr/agents/ux-ui.md +0 -212
- package/template/.aioson/locales/pt-BR/agents/analyst.md +0 -319
- package/template/.aioson/locales/pt-BR/agents/architect.md +0 -284
- package/template/.aioson/locales/pt-BR/agents/dev.md +0 -483
- package/template/.aioson/locales/pt-BR/agents/deyvin.md +0 -184
- package/template/.aioson/locales/pt-BR/agents/discovery-design-doc.md +0 -198
- package/template/.aioson/locales/pt-BR/agents/genome.md +0 -297
- package/template/.aioson/locales/pt-BR/agents/neo.md +0 -208
- package/template/.aioson/locales/pt-BR/agents/orache.md +0 -137
- package/template/.aioson/locales/pt-BR/agents/orchestrator.md +0 -324
- package/template/.aioson/locales/pt-BR/agents/pair.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/pm.md +0 -182
- package/template/.aioson/locales/pt-BR/agents/product.md +0 -466
- package/template/.aioson/locales/pt-BR/agents/profiler-enricher.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/profiler-forge.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/profiler-researcher.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/qa.md +0 -300
- package/template/.aioson/locales/pt-BR/agents/setup.md +0 -533
- package/template/.aioson/locales/pt-BR/agents/sheldon.md +0 -323
- package/template/.aioson/locales/pt-BR/agents/squad.md +0 -1330
- package/template/.aioson/locales/pt-BR/agents/tester.md +0 -449
- package/template/.aioson/locales/pt-BR/agents/ux-ui.md +0 -669
package/src/cli.js
CHANGED
|
@@ -1,1099 +1,1377 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require('node:fs');
|
|
4
|
-
const { parseArgv } = require('./parser');
|
|
5
|
-
const { createTranslator, normalizeLocale } = require('./i18n');
|
|
6
|
-
const { runInit } = require('./commands/init');
|
|
7
|
-
const { runInstall } = require('./commands/install');
|
|
8
|
-
const { runSetup } = require('./commands/setup');
|
|
9
|
-
const { runUpdate } = require('./commands/update');
|
|
10
|
-
const { runInfo } = require('./commands/info');
|
|
11
|
-
const { runDoctorCommand } = require('./commands/doctor');
|
|
12
|
-
const { runI18nAdd } = require('./commands/i18n-add');
|
|
13
|
-
const { runAgentsList, runAgentPrompt } = require('./commands/agents');
|
|
14
|
-
const { runContextValidate } = require('./commands/context-validate');
|
|
15
|
-
const { runContextPack } = require('./commands/context-pack');
|
|
16
|
-
const { runSetupContext } = require('./commands/setup-context');
|
|
17
|
-
const { runLocaleApply } = require('./commands/locale-apply');
|
|
18
|
-
const { runSmokeTest } = require('./commands/smoke');
|
|
19
|
-
const { runMcpInit } = require('./commands/mcp-init');
|
|
20
|
-
const { runMcpDoctor } = require('./commands/mcp-doctor');
|
|
21
|
-
const { runPackageTest } = require('./commands/package-e2e');
|
|
22
|
-
const { runWorkflowPlan } = require('./commands/workflow-plan');
|
|
23
|
-
const { runWorkflowNext } = require('./commands/workflow-next');
|
|
24
|
-
const { runWorkflowStatus } = require('./commands/workflow-status');
|
|
25
|
-
const {
|
|
26
|
-
const {
|
|
27
|
-
const {
|
|
28
|
-
const {
|
|
29
|
-
const {
|
|
30
|
-
const {
|
|
31
|
-
const {
|
|
32
|
-
const {
|
|
33
|
-
const {
|
|
34
|
-
const {
|
|
35
|
-
const {
|
|
36
|
-
const {
|
|
37
|
-
const {
|
|
38
|
-
const {
|
|
39
|
-
const {
|
|
40
|
-
const {
|
|
41
|
-
const {
|
|
42
|
-
const {
|
|
43
|
-
const {
|
|
44
|
-
const {
|
|
45
|
-
const {
|
|
46
|
-
const {
|
|
47
|
-
const {
|
|
48
|
-
const {
|
|
49
|
-
const {
|
|
50
|
-
const {
|
|
51
|
-
const {
|
|
52
|
-
const {
|
|
53
|
-
const {
|
|
54
|
-
const {
|
|
55
|
-
const {
|
|
56
|
-
const {
|
|
57
|
-
const {
|
|
58
|
-
const {
|
|
59
|
-
const {
|
|
60
|
-
const {
|
|
61
|
-
const {
|
|
62
|
-
const {
|
|
63
|
-
const {
|
|
64
|
-
const {
|
|
65
|
-
const {
|
|
66
|
-
const {
|
|
67
|
-
const {
|
|
68
|
-
const {
|
|
69
|
-
const {
|
|
70
|
-
const {
|
|
71
|
-
const {
|
|
72
|
-
const {
|
|
73
|
-
const {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
} = require('./commands/
|
|
115
|
-
const {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const {
|
|
132
|
-
const {
|
|
133
|
-
const {
|
|
134
|
-
const {
|
|
135
|
-
const {
|
|
136
|
-
const {
|
|
137
|
-
const {
|
|
138
|
-
const {
|
|
139
|
-
const {
|
|
140
|
-
const {
|
|
141
|
-
const {
|
|
142
|
-
const {
|
|
143
|
-
const {
|
|
144
|
-
const {
|
|
145
|
-
const {
|
|
146
|
-
const {
|
|
147
|
-
const {
|
|
148
|
-
const {
|
|
149
|
-
const {
|
|
150
|
-
const {
|
|
151
|
-
const {
|
|
152
|
-
const {
|
|
153
|
-
const {
|
|
154
|
-
const {
|
|
155
|
-
const {
|
|
156
|
-
const {
|
|
157
|
-
const {
|
|
158
|
-
const {
|
|
159
|
-
const {
|
|
160
|
-
const {
|
|
161
|
-
const {
|
|
162
|
-
const {
|
|
163
|
-
const {
|
|
164
|
-
const {
|
|
165
|
-
const {
|
|
166
|
-
const {
|
|
167
|
-
const {
|
|
168
|
-
const {
|
|
169
|
-
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
'
|
|
199
|
-
'
|
|
200
|
-
'
|
|
201
|
-
'
|
|
202
|
-
'
|
|
203
|
-
'
|
|
204
|
-
'
|
|
205
|
-
'agent
|
|
206
|
-
'
|
|
207
|
-
'
|
|
208
|
-
'
|
|
209
|
-
'
|
|
210
|
-
'
|
|
211
|
-
'
|
|
212
|
-
'
|
|
213
|
-
'
|
|
214
|
-
'
|
|
215
|
-
'
|
|
216
|
-
'
|
|
217
|
-
'
|
|
218
|
-
'
|
|
219
|
-
'
|
|
220
|
-
'
|
|
221
|
-
'
|
|
222
|
-
'
|
|
223
|
-
'
|
|
224
|
-
'
|
|
225
|
-
'
|
|
226
|
-
'
|
|
227
|
-
'
|
|
228
|
-
'
|
|
229
|
-
'
|
|
230
|
-
'
|
|
231
|
-
'
|
|
232
|
-
'
|
|
233
|
-
'
|
|
234
|
-
'
|
|
235
|
-
'
|
|
236
|
-
'
|
|
237
|
-
'
|
|
238
|
-
'
|
|
239
|
-
'
|
|
240
|
-
'
|
|
241
|
-
'
|
|
242
|
-
'
|
|
243
|
-
'
|
|
244
|
-
'
|
|
245
|
-
'
|
|
246
|
-
'
|
|
247
|
-
'
|
|
248
|
-
'
|
|
249
|
-
'
|
|
250
|
-
'
|
|
251
|
-
'
|
|
252
|
-
'
|
|
253
|
-
'
|
|
254
|
-
'
|
|
255
|
-
'
|
|
256
|
-
'
|
|
257
|
-
'
|
|
258
|
-
'
|
|
259
|
-
'
|
|
260
|
-
'
|
|
261
|
-
'
|
|
262
|
-
'
|
|
263
|
-
'
|
|
264
|
-
'
|
|
265
|
-
'
|
|
266
|
-
'
|
|
267
|
-
'
|
|
268
|
-
'
|
|
269
|
-
'
|
|
270
|
-
'
|
|
271
|
-
'
|
|
272
|
-
'
|
|
273
|
-
'
|
|
274
|
-
'
|
|
275
|
-
'
|
|
276
|
-
'
|
|
277
|
-
'
|
|
278
|
-
'
|
|
279
|
-
'
|
|
280
|
-
'
|
|
281
|
-
'
|
|
282
|
-
'
|
|
283
|
-
'
|
|
284
|
-
'
|
|
285
|
-
'
|
|
286
|
-
'
|
|
287
|
-
'
|
|
288
|
-
'
|
|
289
|
-
'
|
|
290
|
-
'
|
|
291
|
-
'
|
|
292
|
-
'
|
|
293
|
-
'
|
|
294
|
-
'squad:
|
|
295
|
-
'squad-
|
|
296
|
-
'squad:
|
|
297
|
-
'squad-
|
|
298
|
-
'squad:
|
|
299
|
-
'squad-
|
|
300
|
-
'squad:
|
|
301
|
-
'squad-
|
|
302
|
-
'squad:
|
|
303
|
-
'squad-
|
|
304
|
-
'squad:
|
|
305
|
-
'squad-
|
|
306
|
-
'
|
|
307
|
-
'
|
|
308
|
-
'
|
|
309
|
-
'
|
|
310
|
-
'
|
|
311
|
-
'
|
|
312
|
-
'
|
|
313
|
-
'
|
|
314
|
-
'
|
|
315
|
-
'
|
|
316
|
-
'
|
|
317
|
-
'
|
|
318
|
-
'squad
|
|
319
|
-
'squad
|
|
320
|
-
'
|
|
321
|
-
'
|
|
322
|
-
'
|
|
323
|
-
'
|
|
324
|
-
'squad
|
|
325
|
-
'squad
|
|
326
|
-
'
|
|
327
|
-
'
|
|
328
|
-
'squad
|
|
329
|
-
'
|
|
330
|
-
'
|
|
331
|
-
'
|
|
332
|
-
'
|
|
333
|
-
'
|
|
334
|
-
'
|
|
335
|
-
'
|
|
336
|
-
'
|
|
337
|
-
'
|
|
338
|
-
'
|
|
339
|
-
'
|
|
340
|
-
'
|
|
341
|
-
'
|
|
342
|
-
'
|
|
343
|
-
'
|
|
344
|
-
'
|
|
345
|
-
'
|
|
346
|
-
'
|
|
347
|
-
'
|
|
348
|
-
'
|
|
349
|
-
'
|
|
350
|
-
'
|
|
351
|
-
'
|
|
352
|
-
'
|
|
353
|
-
'
|
|
354
|
-
'
|
|
355
|
-
'
|
|
356
|
-
'
|
|
357
|
-
'
|
|
358
|
-
'
|
|
359
|
-
'
|
|
360
|
-
'
|
|
361
|
-
'
|
|
362
|
-
'
|
|
363
|
-
'
|
|
364
|
-
'
|
|
365
|
-
'
|
|
366
|
-
'
|
|
367
|
-
'
|
|
368
|
-
'
|
|
369
|
-
'
|
|
370
|
-
'
|
|
371
|
-
'
|
|
372
|
-
'
|
|
373
|
-
'
|
|
374
|
-
'
|
|
375
|
-
'
|
|
376
|
-
'
|
|
377
|
-
'
|
|
378
|
-
'
|
|
379
|
-
'
|
|
380
|
-
'
|
|
381
|
-
'
|
|
382
|
-
'
|
|
383
|
-
'
|
|
384
|
-
'
|
|
385
|
-
'
|
|
386
|
-
'
|
|
387
|
-
'
|
|
388
|
-
'
|
|
389
|
-
'
|
|
390
|
-
'
|
|
391
|
-
'
|
|
392
|
-
'
|
|
393
|
-
'
|
|
394
|
-
'
|
|
395
|
-
'
|
|
396
|
-
'
|
|
397
|
-
'
|
|
398
|
-
'
|
|
399
|
-
'
|
|
400
|
-
'
|
|
401
|
-
'
|
|
402
|
-
'
|
|
403
|
-
'
|
|
404
|
-
'
|
|
405
|
-
'
|
|
406
|
-
'
|
|
407
|
-
'
|
|
408
|
-
'
|
|
409
|
-
'
|
|
410
|
-
'
|
|
411
|
-
'
|
|
412
|
-
'
|
|
413
|
-
'
|
|
414
|
-
'
|
|
415
|
-
'
|
|
416
|
-
'
|
|
417
|
-
'
|
|
418
|
-
'
|
|
419
|
-
'
|
|
420
|
-
'
|
|
421
|
-
'
|
|
422
|
-
'
|
|
423
|
-
'
|
|
424
|
-
'
|
|
425
|
-
'
|
|
426
|
-
'
|
|
427
|
-
'
|
|
428
|
-
'
|
|
429
|
-
'
|
|
430
|
-
'
|
|
431
|
-
'
|
|
432
|
-
'
|
|
433
|
-
'
|
|
434
|
-
'
|
|
435
|
-
'
|
|
436
|
-
'
|
|
437
|
-
'
|
|
438
|
-
'
|
|
439
|
-
'
|
|
440
|
-
'
|
|
441
|
-
'
|
|
442
|
-
'
|
|
443
|
-
'
|
|
444
|
-
'
|
|
445
|
-
'
|
|
446
|
-
'
|
|
447
|
-
'
|
|
448
|
-
'
|
|
449
|
-
'
|
|
450
|
-
'
|
|
451
|
-
'
|
|
452
|
-
'
|
|
453
|
-
'
|
|
454
|
-
'
|
|
455
|
-
'
|
|
456
|
-
'
|
|
457
|
-
'
|
|
458
|
-
'
|
|
459
|
-
'
|
|
460
|
-
'
|
|
461
|
-
'
|
|
462
|
-
'
|
|
463
|
-
'
|
|
464
|
-
'
|
|
465
|
-
'
|
|
466
|
-
'
|
|
467
|
-
'
|
|
468
|
-
'
|
|
469
|
-
'
|
|
470
|
-
'
|
|
471
|
-
'
|
|
472
|
-
'
|
|
473
|
-
'
|
|
474
|
-
'
|
|
475
|
-
'
|
|
476
|
-
'
|
|
477
|
-
'
|
|
478
|
-
'
|
|
479
|
-
'
|
|
480
|
-
'
|
|
481
|
-
'
|
|
482
|
-
'-
|
|
483
|
-
'
|
|
484
|
-
'
|
|
485
|
-
'
|
|
486
|
-
'
|
|
487
|
-
'
|
|
488
|
-
'
|
|
489
|
-
'
|
|
490
|
-
'
|
|
491
|
-
'
|
|
492
|
-
'
|
|
493
|
-
'
|
|
494
|
-
'
|
|
495
|
-
'
|
|
496
|
-
'
|
|
497
|
-
'
|
|
498
|
-
'
|
|
499
|
-
'
|
|
500
|
-
'
|
|
501
|
-
'
|
|
502
|
-
'
|
|
503
|
-
'
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
'
|
|
508
|
-
'
|
|
509
|
-
'
|
|
510
|
-
'
|
|
511
|
-
'
|
|
512
|
-
'
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
} else
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
result = await
|
|
831
|
-
} else if (command === '
|
|
832
|
-
result = await
|
|
833
|
-
} else if (command === '
|
|
834
|
-
result = await
|
|
835
|
-
} else if (command === '
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
result = await
|
|
843
|
-
} else if (command === '
|
|
844
|
-
result = await
|
|
845
|
-
} else if (command === '
|
|
846
|
-
result = await
|
|
847
|
-
} else if (
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
result = await
|
|
888
|
-
} else if (
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
result = await
|
|
898
|
-
} else if (
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
result = await
|
|
912
|
-
} else if (
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
result = await
|
|
926
|
-
} else if (
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
result = await
|
|
940
|
-
} else if (command === '
|
|
941
|
-
result = await
|
|
942
|
-
} else if (command === '
|
|
943
|
-
result = await
|
|
944
|
-
} else if (command === '
|
|
945
|
-
result = await
|
|
946
|
-
} else if (command === '
|
|
947
|
-
result = await
|
|
948
|
-
} else if (command === '
|
|
949
|
-
result = await
|
|
950
|
-
} else if (command === '
|
|
951
|
-
result = await
|
|
952
|
-
} else if (command === '
|
|
953
|
-
result = await
|
|
954
|
-
} else if (command === '
|
|
955
|
-
result = await
|
|
956
|
-
} else if (command === '
|
|
957
|
-
result = await
|
|
958
|
-
} else if (command === '
|
|
959
|
-
result = await
|
|
960
|
-
} else if (command === '
|
|
961
|
-
result = await
|
|
962
|
-
} else if (command === '
|
|
963
|
-
result = await
|
|
964
|
-
} else if (command === '
|
|
965
|
-
result = await
|
|
966
|
-
} else if (command === '
|
|
967
|
-
result = await
|
|
968
|
-
} else if (command === '
|
|
969
|
-
result = await
|
|
970
|
-
} else if (command === '
|
|
971
|
-
result = await
|
|
972
|
-
} else if (command === '
|
|
973
|
-
result = await
|
|
974
|
-
} else if (command === '
|
|
975
|
-
result = await
|
|
976
|
-
} else if (command === '
|
|
977
|
-
result = await
|
|
978
|
-
} else if (command === '
|
|
979
|
-
result = await
|
|
980
|
-
} else if (command === '
|
|
981
|
-
result = await
|
|
982
|
-
} else if (command === '
|
|
983
|
-
result = await
|
|
984
|
-
} else if (command === '
|
|
985
|
-
result = await
|
|
986
|
-
} else if (command === '
|
|
987
|
-
result = await
|
|
988
|
-
} else if (command === '
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
result = await
|
|
994
|
-
} else if (command === '
|
|
995
|
-
result = await
|
|
996
|
-
} else if (command === '
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
result = await
|
|
1002
|
-
} else if (command === '
|
|
1003
|
-
result = await
|
|
1004
|
-
} else if (command === '
|
|
1005
|
-
result = await
|
|
1006
|
-
} else if (command === '
|
|
1007
|
-
result = await
|
|
1008
|
-
} else if (command === '
|
|
1009
|
-
result = await
|
|
1010
|
-
} else if (command === '
|
|
1011
|
-
result = await
|
|
1012
|
-
} else if (command === '
|
|
1013
|
-
result = await
|
|
1014
|
-
} else if (command === '
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
result = await
|
|
1028
|
-
} else if (command === '
|
|
1029
|
-
result = await
|
|
1030
|
-
} else if (command === '
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
} else if (command === '
|
|
1042
|
-
result = await
|
|
1043
|
-
} else if (command === '
|
|
1044
|
-
result = await
|
|
1045
|
-
} else if (command === '
|
|
1046
|
-
result = await
|
|
1047
|
-
} else if (command === '
|
|
1048
|
-
result = await
|
|
1049
|
-
} else if (command === '
|
|
1050
|
-
result = await
|
|
1051
|
-
} else if (command === '
|
|
1052
|
-
result = await
|
|
1053
|
-
} else if (command === '
|
|
1054
|
-
result = await
|
|
1055
|
-
} else if (command === '
|
|
1056
|
-
result = await
|
|
1057
|
-
} else {
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
if (
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
if (
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
});
|
|
1092
|
-
} else {
|
|
1093
|
-
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('node:fs');
|
|
4
|
+
const { parseArgv } = require('./parser');
|
|
5
|
+
const { createTranslator, normalizeLocale } = require('./i18n');
|
|
6
|
+
const { runInit } = require('./commands/init');
|
|
7
|
+
const { runInstall } = require('./commands/install');
|
|
8
|
+
const { runSetup } = require('./commands/setup');
|
|
9
|
+
const { runUpdate } = require('./commands/update');
|
|
10
|
+
const { runInfo } = require('./commands/info');
|
|
11
|
+
const { runDoctorCommand } = require('./commands/doctor');
|
|
12
|
+
const { runI18nAdd } = require('./commands/i18n-add');
|
|
13
|
+
const { runAgentsList, runAgentPrompt } = require('./commands/agents');
|
|
14
|
+
const { runContextValidate } = require('./commands/context-validate');
|
|
15
|
+
const { runContextPack } = require('./commands/context-pack');
|
|
16
|
+
const { runSetupContext } = require('./commands/setup-context');
|
|
17
|
+
const { runLocaleApply } = require('./commands/locale-apply');
|
|
18
|
+
const { runSmokeTest } = require('./commands/smoke');
|
|
19
|
+
const { runMcpInit } = require('./commands/mcp-init');
|
|
20
|
+
const { runMcpDoctor } = require('./commands/mcp-doctor');
|
|
21
|
+
const { runPackageTest } = require('./commands/package-e2e');
|
|
22
|
+
const { runWorkflowPlan } = require('./commands/workflow-plan');
|
|
23
|
+
const { runWorkflowNext } = require('./commands/workflow-next');
|
|
24
|
+
const { runWorkflowStatus } = require('./commands/workflow-status');
|
|
25
|
+
const { runWorkflowHeal } = require('./commands/workflow-heal');
|
|
26
|
+
const { runWorkflowHarden } = require('./commands/workflow-harden');
|
|
27
|
+
const { runParallelInit } = require('./commands/parallel-init');
|
|
28
|
+
const { runParallelDoctor } = require('./commands/parallel-doctor');
|
|
29
|
+
const { runParallelAssign } = require('./commands/parallel-assign');
|
|
30
|
+
const { runParallelStatus } = require('./commands/parallel-status');
|
|
31
|
+
const { runParallelMerge } = require('./commands/parallel-merge');
|
|
32
|
+
const { runParallelGuard } = require('./commands/parallel-guard');
|
|
33
|
+
const { runTestAgents } = require('./commands/test-agents');
|
|
34
|
+
const { runLocaleDiff } = require('./commands/locale-diff');
|
|
35
|
+
const { runQaDoctor } = require('./commands/qa-doctor');
|
|
36
|
+
const { runQaInit } = require('./commands/qa-init');
|
|
37
|
+
const { runQaRun } = require('./commands/qa-run');
|
|
38
|
+
const { runQaScan } = require('./commands/qa-scan');
|
|
39
|
+
const { runQaReport } = require('./commands/qa-report');
|
|
40
|
+
const { runWebMap } = require('./commands/web-map');
|
|
41
|
+
const { runWebScrape } = require('./commands/web-scrape');
|
|
42
|
+
const { runScanProject } = require('./commands/scan-project');
|
|
43
|
+
const { runSecurityScan } = require('./commands/security-scan');
|
|
44
|
+
const { runSecurityAudit } = require('./commands/security-audit');
|
|
45
|
+
const { runConfig } = require('./commands/config');
|
|
46
|
+
const { runGenomeDoctor } = require('./commands/genome-doctor');
|
|
47
|
+
const { runGenomeMigrate } = require('./commands/genome-migrate');
|
|
48
|
+
const { runSquadStatus } = require('./commands/squad-status');
|
|
49
|
+
const { runSquadDoctor } = require('./commands/squad-doctor');
|
|
50
|
+
const { runSquadRepairGenomes } = require('./commands/squad-repair-genomes');
|
|
51
|
+
const { runSquadValidate } = require('./commands/squad-validate');
|
|
52
|
+
const { runSquadExport } = require('./commands/squad-export');
|
|
53
|
+
const { runSquadPipeline } = require('./commands/squad-pipeline');
|
|
54
|
+
const { runSquadAgentCreate } = require('./commands/squad-agent-create');
|
|
55
|
+
const { runSquadInvestigate } = require('./commands/squad-investigate');
|
|
56
|
+
const { runImplementationPlan } = require('./commands/implementation-plan');
|
|
57
|
+
const { runSquadPlan } = require('./commands/squad-plan');
|
|
58
|
+
const { runSquadLearning } = require('./commands/squad-learning');
|
|
59
|
+
const { runLearning } = require('./commands/learning');
|
|
60
|
+
const { runSquadDashboard } = require('./commands/squad-dashboard');
|
|
61
|
+
const { runSquadWorker } = require('./commands/squad-worker');
|
|
62
|
+
const { runSquadDaemon } = require('./commands/squad-daemon');
|
|
63
|
+
const { runSquadMcp } = require('./commands/squad-mcp');
|
|
64
|
+
const { runSquadRoi } = require('./commands/squad-roi');
|
|
65
|
+
const { runSquadScore } = require('./commands/squad-score');
|
|
66
|
+
const { runSquadProcesses } = require('./commands/squad-processes');
|
|
67
|
+
const { runSquadWorktrees, runSquadMerge } = require('./commands/squad-worktrees');
|
|
68
|
+
const { runSquadRecovery } = require('./commands/squad-recovery');
|
|
69
|
+
const { runSquadDeploy } = require('./commands/squad-deploy');
|
|
70
|
+
const { runSquadWebhook } = require('./commands/squad-webhook');
|
|
71
|
+
const { runSquadBus } = require('./commands/squad-bus');
|
|
72
|
+
const { runSquadAutorun } = require('./commands/squad-autorun');
|
|
73
|
+
const { runSquadDependencyGraph } = require('./commands/squad-dependency-graph');
|
|
74
|
+
const { runSquadToolRegister } = require('./commands/squad-tool-register');
|
|
75
|
+
const { runSquadReview } = require('./commands/squad-review');
|
|
76
|
+
const { runAgentAudit } = require('./commands/agent-audit');
|
|
77
|
+
const { runBriefGen } = require('./commands/brief-gen');
|
|
78
|
+
const { runHarnessInit, runHarnessValidate } = require('./commands/harness');
|
|
79
|
+
const { runVerifyGate } = require('./commands/verify-gate');
|
|
80
|
+
const {
|
|
81
|
+
runRuntimeInit,
|
|
82
|
+
runRuntimeIngest,
|
|
83
|
+
runRuntimeTaskStart,
|
|
84
|
+
runRuntimeStart,
|
|
85
|
+
runRuntimeUpdate,
|
|
86
|
+
runRuntimeTaskFinish,
|
|
87
|
+
runRuntimeFinish,
|
|
88
|
+
runRuntimeTaskFail,
|
|
89
|
+
runRuntimeFail,
|
|
90
|
+
runRuntimeStatus,
|
|
91
|
+
runRuntimeLog,
|
|
92
|
+
runAgentDone,
|
|
93
|
+
runAgentRecover,
|
|
94
|
+
runRuntimeSessionStart,
|
|
95
|
+
runRuntimeSessionLog,
|
|
96
|
+
runRuntimeSessionFinish,
|
|
97
|
+
runRuntimeSessionStatus,
|
|
98
|
+
runDeliver,
|
|
99
|
+
runOutputStrategyExport,
|
|
100
|
+
runOutputStrategyImport,
|
|
101
|
+
runDevlogSync,
|
|
102
|
+
runRuntimePrune
|
|
103
|
+
} = require('./commands/runtime');
|
|
104
|
+
const {
|
|
105
|
+
runLiveStart,
|
|
106
|
+
runRuntimeEmit,
|
|
107
|
+
runLiveHandoff,
|
|
108
|
+
runLiveStatus,
|
|
109
|
+
runLiveClose,
|
|
110
|
+
runLiveList
|
|
111
|
+
} = require('./commands/live');
|
|
112
|
+
const {
|
|
113
|
+
runToolCapabilities,
|
|
114
|
+
} = require('./commands/tool-capabilities');
|
|
115
|
+
const { runScaffoldComplete } = require('./commands/scaffold-complete');
|
|
116
|
+
const {
|
|
117
|
+
runCloudImportSquad,
|
|
118
|
+
runCloudImportGenome,
|
|
119
|
+
runCloudPublishGenome,
|
|
120
|
+
runCloudPublishSquad
|
|
121
|
+
} = require('./commands/cloud');
|
|
122
|
+
const {
|
|
123
|
+
runRuntimeBackup,
|
|
124
|
+
runRuntimeRestore
|
|
125
|
+
} = require('./commands/backup');
|
|
126
|
+
const {
|
|
127
|
+
runSkillInstall,
|
|
128
|
+
runSkillList,
|
|
129
|
+
runSkillRemove
|
|
130
|
+
} = require('./commands/skill');
|
|
131
|
+
const { runDesignHybridOptions } = require('./commands/design-hybrid-options');
|
|
132
|
+
const { runBackupLocal } = require('./commands/backup-local-cmd');
|
|
133
|
+
const { runRecoveryGenerate, runRecoveryShow } = require('./commands/recovery');
|
|
134
|
+
const { runContextMonitor } = require('./commands/context-monitor');
|
|
135
|
+
const { runContextSearch, runContextSearchIndex } = require('./commands/context-search');
|
|
136
|
+
const { runContextCacheList, runContextCacheSave, runContextCacheRestore, runContextCacheCleanup } = require('./commands/context-cache');
|
|
137
|
+
const { runSandboxExec } = require('./commands/sandbox');
|
|
138
|
+
const { runAgentLoad, runAgentShardIndex } = require('./commands/agent-loader');
|
|
139
|
+
const { runLearningEvolve, runLearningApply } = require('./commands/learning-evolve');
|
|
140
|
+
const { runLearningRollback } = require('./commands/learning-rollback');
|
|
141
|
+
const { runToolRegistry } = require('./commands/tool-registry-cmd');
|
|
142
|
+
const { runHealth } = require('./commands/health');
|
|
143
|
+
const { runContextHealth } = require('./commands/context-health');
|
|
144
|
+
const { runContextTrim } = require('./commands/context-trim');
|
|
145
|
+
const { runHooksEmit } = require('./commands/hooks-emit');
|
|
146
|
+
const { runHooksInstall, runHooksUninstall } = require('./commands/hooks-install');
|
|
147
|
+
const { runSessionGuard } = require('./commands/session-guard');
|
|
148
|
+
const { runDevlogProcess } = require('./commands/devlog-process');
|
|
149
|
+
const { runDevlogWatch } = require('./commands/devlog-watch');
|
|
150
|
+
const { runDevlogExportBrains } = require('./commands/devlog-export-brains');
|
|
151
|
+
const { runBrainQuery } = require('./commands/brain-query');
|
|
152
|
+
const { runMemoryStatus, runMemorySummary } = require('./commands/memory');
|
|
153
|
+
const { runSpecSync } = require('./commands/spec-sync');
|
|
154
|
+
const { runSpecStatus } = require('./commands/spec-status');
|
|
155
|
+
const { runSpecCheckpoint } = require('./commands/spec-checkpoint');
|
|
156
|
+
const { runSpecTasks } = require('./commands/spec-tasks');
|
|
157
|
+
const { runLearningExport } = require('./commands/learning-export');
|
|
158
|
+
const { runRunnerRun } = require('./commands/runner-run');
|
|
159
|
+
const { runRunnerQueue } = require('./commands/runner-queue');
|
|
160
|
+
const { runRunnerPlan } = require('./commands/runner-plan');
|
|
161
|
+
const { runRunnerDaemon } = require('./commands/runner-daemon');
|
|
162
|
+
const { runPreflight } = require('./commands/preflight');
|
|
163
|
+
const { runClassify } = require('./commands/classify');
|
|
164
|
+
const { runSizing } = require('./commands/sizing');
|
|
165
|
+
const { runDetectTestRunner } = require('./commands/detect-test-runner');
|
|
166
|
+
const { runPulseUpdate } = require('./commands/pulse-update');
|
|
167
|
+
const { runStateSave } = require('./commands/state-save');
|
|
168
|
+
const { runFeatureClose } = require('./commands/feature-close');
|
|
169
|
+
const { runFeatureArchive } = require('./commands/feature-archive');
|
|
170
|
+
const { runDossierInit, runDossierShow, runDossierAddFinding, runDossierAddCodemap, runDossierLinkRule, runDossierCompact } = require('./commands/dossier');
|
|
171
|
+
const { runRevisionOpen, runRevisionList, runRevisionResolve } = require('./commands/revision');
|
|
172
|
+
const { runGateCheck } = require('./commands/gate-check');
|
|
173
|
+
const { runGateApprove } = require('./commands/gate-approve');
|
|
174
|
+
const { runArtifactValidate } = require('./commands/artifact-validate');
|
|
175
|
+
const { runWorkflowExecute } = require('./commands/workflow-execute');
|
|
176
|
+
const { runRunnerQueueFromPlan } = require('./commands/runner-queue-from-plan');
|
|
177
|
+
const { runLearningAutoPromote } = require('./commands/learning-auto-promote');
|
|
178
|
+
const { runBriefValidate } = require('./commands/brief-validate');
|
|
179
|
+
const { runPreflightContext } = require('./commands/preflight-context');
|
|
180
|
+
const { runContextCompact } = require('./commands/context-compact');
|
|
181
|
+
const { runSquadScaffold } = require('./commands/squad-scaffold');
|
|
182
|
+
const { runPatternDetect } = require('./commands/pattern-detect');
|
|
183
|
+
const { runSelfLoop } = require('./commands/self-implement-loop');
|
|
184
|
+
const { runSquadCard } = require('./commands/squad-card');
|
|
185
|
+
const { runAgentExportSkill } = require('./commands/agent-export-skill');
|
|
186
|
+
const { runGitGuard } = require('./commands/git-guard');
|
|
187
|
+
const { runCommitPrepare } = require('./commands/commit-prepare');
|
|
188
|
+
const { runAuthLogin, runAuthLogout, runAuthStatus } = require('./commands/auth');
|
|
189
|
+
const { runWorkspaceInit, runWorkspaceStatus, runWorkspaceOpen } = require('./commands/workspace');
|
|
190
|
+
const { runGenomePublish, runGenomeInstallStore, runGenomeInstall, runGenomeList, runGenomeRemove } = require('./commands/store-genome');
|
|
191
|
+
const { runSkillPublish, runSkillInstallStore, runSkillListRemote } = require('./commands/store-skill');
|
|
192
|
+
const { runSquadPublish, runSquadInstall, runSquadGrant, runSquadList } = require('./commands/store-squad');
|
|
193
|
+
const { runSystemPackage, runSystemPublish, runSystemList, runSystemInstall } = require('./commands/store-system');
|
|
194
|
+
const { runBriefingApprove, runBriefingUnapprove } = require('./commands/briefing');
|
|
195
|
+
const { runCompressAgents } = require('./commands/compress-agents');
|
|
196
|
+
|
|
197
|
+
const JSON_SUPPORTED_COMMANDS = new Set([
|
|
198
|
+
'init',
|
|
199
|
+
'install',
|
|
200
|
+
'setup',
|
|
201
|
+
'update',
|
|
202
|
+
'i18n:add',
|
|
203
|
+
'i18n-add',
|
|
204
|
+
'agents',
|
|
205
|
+
'agent:prompt',
|
|
206
|
+
'agent-prompt',
|
|
207
|
+
'agent:invoke',
|
|
208
|
+
'agent-invoke',
|
|
209
|
+
'setup:context',
|
|
210
|
+
'setup-context',
|
|
211
|
+
'locale:apply',
|
|
212
|
+
'locale-apply',
|
|
213
|
+
'info',
|
|
214
|
+
'doctor',
|
|
215
|
+
'context:validate',
|
|
216
|
+
'context-validate',
|
|
217
|
+
'context:pack',
|
|
218
|
+
'context-pack',
|
|
219
|
+
'test:smoke',
|
|
220
|
+
'test-smoke',
|
|
221
|
+
'test:agents',
|
|
222
|
+
'test-agents',
|
|
223
|
+
'locale:diff',
|
|
224
|
+
'locale-diff',
|
|
225
|
+
'test:package',
|
|
226
|
+
'test-package',
|
|
227
|
+
'workflow:plan',
|
|
228
|
+
'workflow-plan',
|
|
229
|
+
'workflow:next',
|
|
230
|
+
'workflow-next',
|
|
231
|
+
'workflow:status',
|
|
232
|
+
'workflow-status',
|
|
233
|
+
'agent:next',
|
|
234
|
+
'agent-next',
|
|
235
|
+
'parallel:init',
|
|
236
|
+
'parallel-init',
|
|
237
|
+
'parallel:doctor',
|
|
238
|
+
'parallel-doctor',
|
|
239
|
+
'parallel:assign',
|
|
240
|
+
'parallel-assign',
|
|
241
|
+
'parallel:status',
|
|
242
|
+
'parallel-status',
|
|
243
|
+
'parallel:merge',
|
|
244
|
+
'parallel-merge',
|
|
245
|
+
'parallel:guard',
|
|
246
|
+
'parallel-guard',
|
|
247
|
+
'orchestrator:init',
|
|
248
|
+
'orchestrator-init',
|
|
249
|
+
'orchestrator:doctor',
|
|
250
|
+
'orchestrator-doctor',
|
|
251
|
+
'orchestrator:assign',
|
|
252
|
+
'orchestrator:merge',
|
|
253
|
+
'orchestrator-merge',
|
|
254
|
+
'orchestrator:guard',
|
|
255
|
+
'orchestrator-guard',
|
|
256
|
+
'orchestrator-assign',
|
|
257
|
+
'orchestrator:status',
|
|
258
|
+
'orchestrator-status',
|
|
259
|
+
'mcp:init',
|
|
260
|
+
'mcp-init',
|
|
261
|
+
'mcp:doctor',
|
|
262
|
+
'mcp-doctor',
|
|
263
|
+
'qa:doctor',
|
|
264
|
+
'qa-doctor',
|
|
265
|
+
'qa:init',
|
|
266
|
+
'qa-init',
|
|
267
|
+
'qa:run',
|
|
268
|
+
'qa-run',
|
|
269
|
+
'qa:scan',
|
|
270
|
+
'qa-scan',
|
|
271
|
+
'qa:report',
|
|
272
|
+
'qa-report',
|
|
273
|
+
'web:map',
|
|
274
|
+
'web-map',
|
|
275
|
+
'web:scrape',
|
|
276
|
+
'web-scrape',
|
|
277
|
+
'scan:project',
|
|
278
|
+
'scan-project',
|
|
279
|
+
'security:scan',
|
|
280
|
+
'security-scan',
|
|
281
|
+
'security:audit',
|
|
282
|
+
'security-audit',
|
|
283
|
+
'config',
|
|
284
|
+
'genome:doctor',
|
|
285
|
+
'genome-doctor',
|
|
286
|
+
'genome:migrate',
|
|
287
|
+
'genome-migrate',
|
|
288
|
+
'squad:status',
|
|
289
|
+
'squad-status',
|
|
290
|
+
'squad:doctor',
|
|
291
|
+
'squad-doctor',
|
|
292
|
+
'squad:repair-genomes',
|
|
293
|
+
'squad-repair-genomes',
|
|
294
|
+
'squad:validate',
|
|
295
|
+
'squad-validate',
|
|
296
|
+
'squad:export',
|
|
297
|
+
'squad-export',
|
|
298
|
+
'squad:pipeline',
|
|
299
|
+
'squad-pipeline',
|
|
300
|
+
'squad:agent-create',
|
|
301
|
+
'squad-agent-create',
|
|
302
|
+
'squad:investigate',
|
|
303
|
+
'squad-investigate',
|
|
304
|
+
'squad:dashboard',
|
|
305
|
+
'squad-dashboard',
|
|
306
|
+
'squad:worker',
|
|
307
|
+
'squad-worker',
|
|
308
|
+
'squad:daemon',
|
|
309
|
+
'squad-daemon',
|
|
310
|
+
'squad:mcp',
|
|
311
|
+
'squad-mcp',
|
|
312
|
+
'squad:mcp:call',
|
|
313
|
+
'squad:roi',
|
|
314
|
+
'squad-roi',
|
|
315
|
+
'squad:score',
|
|
316
|
+
'squad-score',
|
|
317
|
+
'squad:processes',
|
|
318
|
+
'squad-processes',
|
|
319
|
+
'squad:worktrees',
|
|
320
|
+
'squad-worktrees',
|
|
321
|
+
'squad:merge',
|
|
322
|
+
'squad-merge',
|
|
323
|
+
'squad:recovery',
|
|
324
|
+
'squad-recovery',
|
|
325
|
+
'squad:deploy',
|
|
326
|
+
'squad-deploy',
|
|
327
|
+
'squad:webhook',
|
|
328
|
+
'squad-webhook',
|
|
329
|
+
'plan:show',
|
|
330
|
+
'plan:status',
|
|
331
|
+
'plan:checkpoint',
|
|
332
|
+
'plan:stale',
|
|
333
|
+
'plan:register',
|
|
334
|
+
'plan',
|
|
335
|
+
'squad:plan',
|
|
336
|
+
'squad-plan',
|
|
337
|
+
'squad:bus',
|
|
338
|
+
'squad-bus',
|
|
339
|
+
'squad:autorun',
|
|
340
|
+
'squad-autorun',
|
|
341
|
+
'squad:dependency-graph',
|
|
342
|
+
'squad-dependency-graph',
|
|
343
|
+
'squad:tool:register',
|
|
344
|
+
'squad-tool-register',
|
|
345
|
+
'squad:review',
|
|
346
|
+
'squad-review',
|
|
347
|
+
'agent:audit',
|
|
348
|
+
'agent-audit',
|
|
349
|
+
'brief:gen',
|
|
350
|
+
'harness:init',
|
|
351
|
+
'harness-init',
|
|
352
|
+
'harness:validate',
|
|
353
|
+
'harness-validate',
|
|
354
|
+
'brief-gen',
|
|
355
|
+
'verify:gate',
|
|
356
|
+
'verify-gate',
|
|
357
|
+
'brief:validate',
|
|
358
|
+
'brief-validate',
|
|
359
|
+
'preflight:context',
|
|
360
|
+
'preflight-context',
|
|
361
|
+
'context:compact',
|
|
362
|
+
'context-compact',
|
|
363
|
+
'squad:scaffold',
|
|
364
|
+
'squad-scaffold',
|
|
365
|
+
'pattern:detect',
|
|
366
|
+
'pattern-detect',
|
|
367
|
+
'self:loop',
|
|
368
|
+
'self-loop',
|
|
369
|
+
'squad:card',
|
|
370
|
+
'squad-card',
|
|
371
|
+
'git:guard',
|
|
372
|
+
'git-guard',
|
|
373
|
+
'commit:prepare',
|
|
374
|
+
'commit-prepare',
|
|
375
|
+
'agent:export-skill',
|
|
376
|
+
'agent-export-skill',
|
|
377
|
+
'squad:learning',
|
|
378
|
+
'squad-learning',
|
|
379
|
+
'learning',
|
|
380
|
+
'learning:list',
|
|
381
|
+
'learning:stats',
|
|
382
|
+
'learning:promote',
|
|
383
|
+
'learning:evolve',
|
|
384
|
+
'learning-evolve',
|
|
385
|
+
'learning:apply',
|
|
386
|
+
'learning-apply',
|
|
387
|
+
'learning:rollback',
|
|
388
|
+
'learning-rollback',
|
|
389
|
+
'learning:export',
|
|
390
|
+
'learning-export',
|
|
391
|
+
'spec:sync',
|
|
392
|
+
'spec-sync',
|
|
393
|
+
'spec:status',
|
|
394
|
+
'spec-status',
|
|
395
|
+
'spec:checkpoint',
|
|
396
|
+
'spec-checkpoint',
|
|
397
|
+
'spec:tasks',
|
|
398
|
+
'spec-tasks',
|
|
399
|
+
'tool:register',
|
|
400
|
+
'tool-register',
|
|
401
|
+
'tool:list',
|
|
402
|
+
'tool-list',
|
|
403
|
+
'tool:call',
|
|
404
|
+
'tool-call',
|
|
405
|
+
'tool:unregister',
|
|
406
|
+
'tool-unregister',
|
|
407
|
+
'tool:show',
|
|
408
|
+
'tool-show',
|
|
409
|
+
'health',
|
|
410
|
+
'runtime:init',
|
|
411
|
+
'runtime-init',
|
|
412
|
+
'runtime:ingest',
|
|
413
|
+
'runtime-ingest',
|
|
414
|
+
'runtime:task:start',
|
|
415
|
+
'runtime-task-start',
|
|
416
|
+
'runtime:start',
|
|
417
|
+
'runtime-start',
|
|
418
|
+
'runtime:update',
|
|
419
|
+
'runtime-update',
|
|
420
|
+
'runtime:task:finish',
|
|
421
|
+
'runtime-task-finish',
|
|
422
|
+
'runtime:finish',
|
|
423
|
+
'runtime-finish',
|
|
424
|
+
'runtime:task:fail',
|
|
425
|
+
'runtime-task-fail',
|
|
426
|
+
'runtime:fail',
|
|
427
|
+
'runtime-fail',
|
|
428
|
+
'runtime:status',
|
|
429
|
+
'runtime-status',
|
|
430
|
+
'runtime:log',
|
|
431
|
+
'runtime-log',
|
|
432
|
+
'agent:done',
|
|
433
|
+
'agent-done',
|
|
434
|
+
'agent:recover',
|
|
435
|
+
'agent-recover',
|
|
436
|
+
'runtime:session:start',
|
|
437
|
+
'runtime-session-start',
|
|
438
|
+
'runtime:session:log',
|
|
439
|
+
'runtime-session-log',
|
|
440
|
+
'runtime:session:finish',
|
|
441
|
+
'runtime-session-finish',
|
|
442
|
+
'runtime:session:status',
|
|
443
|
+
'runtime-session-status',
|
|
444
|
+
'runtime:emit',
|
|
445
|
+
'runtime-emit',
|
|
446
|
+
'live:start',
|
|
447
|
+
'live-start',
|
|
448
|
+
'live:status',
|
|
449
|
+
'live-status',
|
|
450
|
+
'live:handoff',
|
|
451
|
+
'live-handoff',
|
|
452
|
+
'live:close',
|
|
453
|
+
'live-close',
|
|
454
|
+
'live:list',
|
|
455
|
+
'live-list',
|
|
456
|
+
'scaffold:complete',
|
|
457
|
+
'scaffold-complete',
|
|
458
|
+
'deliver',
|
|
459
|
+
'output-strategy:export',
|
|
460
|
+
'output-strategy:import',
|
|
461
|
+
'cloud:import:squad',
|
|
462
|
+
'cloud-import-squad',
|
|
463
|
+
'cloud:import:genome',
|
|
464
|
+
'cloud-import-genome',
|
|
465
|
+
'cloud:publish:squad',
|
|
466
|
+
'cloud-publish-squad',
|
|
467
|
+
'cloud:publish:genome',
|
|
468
|
+
'cloud-publish-genome',
|
|
469
|
+
'hooks:emit',
|
|
470
|
+
'hooks-emit',
|
|
471
|
+
'hooks:install',
|
|
472
|
+
'hooks-install',
|
|
473
|
+
'hooks:uninstall',
|
|
474
|
+
'hooks-uninstall',
|
|
475
|
+
'session:guard',
|
|
476
|
+
'session-guard',
|
|
477
|
+
'devlog:process',
|
|
478
|
+
'devlog-process',
|
|
479
|
+
'devlog:watch',
|
|
480
|
+
'devlog-watch',
|
|
481
|
+
'devlog:export-brains',
|
|
482
|
+
'devlog-export-brains',
|
|
483
|
+
'brain:query',
|
|
484
|
+
'brain-query',
|
|
485
|
+
'memory:status',
|
|
486
|
+
'memory-status',
|
|
487
|
+
'memory:summary',
|
|
488
|
+
'memory-summary',
|
|
489
|
+
'runtime:backup',
|
|
490
|
+
'runtime-backup',
|
|
491
|
+
'runtime:restore',
|
|
492
|
+
'runtime-restore',
|
|
493
|
+
'skill:install',
|
|
494
|
+
'skill-install',
|
|
495
|
+
'skill:list',
|
|
496
|
+
'skill-list',
|
|
497
|
+
'skill:remove',
|
|
498
|
+
'skill-remove',
|
|
499
|
+
'design-hybrid:options',
|
|
500
|
+
'design-hybrid-options',
|
|
501
|
+
'recovery:generate',
|
|
502
|
+
'recovery-generate',
|
|
503
|
+
'recovery:show',
|
|
504
|
+
'recovery-show',
|
|
505
|
+
'context:monitor',
|
|
506
|
+
'context-monitor',
|
|
507
|
+
'context:health',
|
|
508
|
+
'context-health',
|
|
509
|
+
'context:trim',
|
|
510
|
+
'context-trim',
|
|
511
|
+
'context:search',
|
|
512
|
+
'context-search',
|
|
513
|
+
'context:search:index',
|
|
514
|
+
'context-search-index',
|
|
515
|
+
'context:cache',
|
|
516
|
+
'context-cache',
|
|
517
|
+
'context:cache:save',
|
|
518
|
+
'context-cache-save',
|
|
519
|
+
'context:cache:restore',
|
|
520
|
+
'context-cache-restore',
|
|
521
|
+
'context:cache:cleanup',
|
|
522
|
+
'context-cache-cleanup',
|
|
523
|
+
'sandbox:exec',
|
|
524
|
+
'sandbox-exec',
|
|
525
|
+
'agent:load',
|
|
526
|
+
'agent-load',
|
|
527
|
+
'agent:shard:index',
|
|
528
|
+
'agent-shard-index',
|
|
529
|
+
'runner:run',
|
|
530
|
+
'runner-run',
|
|
531
|
+
'runner:queue',
|
|
532
|
+
'runner-queue',
|
|
533
|
+
'runner:plan',
|
|
534
|
+
'runner-plan',
|
|
535
|
+
'runner:daemon',
|
|
536
|
+
'runner-daemon',
|
|
537
|
+
'version',
|
|
538
|
+
'--version',
|
|
539
|
+
'-v',
|
|
540
|
+
'preflight',
|
|
541
|
+
'classify',
|
|
542
|
+
'sizing',
|
|
543
|
+
'detect:test-runner',
|
|
544
|
+
'detect-test-runner',
|
|
545
|
+
'pulse:update',
|
|
546
|
+
'pulse-update',
|
|
547
|
+
'state:save',
|
|
548
|
+
'state-save',
|
|
549
|
+
'feature:close',
|
|
550
|
+
'feature-close',
|
|
551
|
+
'feature:archive',
|
|
552
|
+
'feature-archive',
|
|
553
|
+
'dossier:init',
|
|
554
|
+
'dossier-init',
|
|
555
|
+
'dossier:show',
|
|
556
|
+
'dossier-show',
|
|
557
|
+
'dossier:add-finding',
|
|
558
|
+
'dossier-add-finding',
|
|
559
|
+
'dossier:add-codemap',
|
|
560
|
+
'dossier-add-codemap',
|
|
561
|
+
'dossier:link-rule',
|
|
562
|
+
'dossier-link-rule',
|
|
563
|
+
'dossier:compact',
|
|
564
|
+
'dossier-compact',
|
|
565
|
+
'revision:open',
|
|
566
|
+
'revision-open',
|
|
567
|
+
'revision:list',
|
|
568
|
+
'revision-list',
|
|
569
|
+
'revision:resolve',
|
|
570
|
+
'revision-resolve',
|
|
571
|
+
'gate:check',
|
|
572
|
+
'gate-check',
|
|
573
|
+
'gate:approve',
|
|
574
|
+
'gate-approve',
|
|
575
|
+
'artifact:validate',
|
|
576
|
+
'artifact-validate',
|
|
577
|
+
'workflow:execute',
|
|
578
|
+
'workflow-execute',
|
|
579
|
+
'runner:queue:from-plan',
|
|
580
|
+
'runner-queue-from-plan',
|
|
581
|
+
'learning:auto-promote',
|
|
582
|
+
'learning-auto-promote',
|
|
583
|
+
'auth:login',
|
|
584
|
+
'auth-login',
|
|
585
|
+
'auth:logout',
|
|
586
|
+
'auth-logout',
|
|
587
|
+
'auth:status',
|
|
588
|
+
'auth-status',
|
|
589
|
+
'workspace:init',
|
|
590
|
+
'workspace-init',
|
|
591
|
+
'workspace:status',
|
|
592
|
+
'workspace-status',
|
|
593
|
+
'workspace:open',
|
|
594
|
+
'workspace-open',
|
|
595
|
+
'genome:publish',
|
|
596
|
+
'genome-publish',
|
|
597
|
+
'genome:install',
|
|
598
|
+
'genome-install',
|
|
599
|
+
'genome:install:store',
|
|
600
|
+
'genome-install-store',
|
|
601
|
+
'genome:list',
|
|
602
|
+
'genome-list',
|
|
603
|
+
'genome:remove',
|
|
604
|
+
'genome-remove',
|
|
605
|
+
'skill:publish',
|
|
606
|
+
'skill-publish',
|
|
607
|
+
'compress:agents',
|
|
608
|
+
'compress-agents',
|
|
609
|
+
'skill:install:store',
|
|
610
|
+
'skill-install-store',
|
|
611
|
+
'squad:list',
|
|
612
|
+
'squad-list',
|
|
613
|
+
'squad:publish',
|
|
614
|
+
'squad-publish',
|
|
615
|
+
'squad:install',
|
|
616
|
+
'squad-install',
|
|
617
|
+
'squad:grant',
|
|
618
|
+
'squad-grant',
|
|
619
|
+
'system:package',
|
|
620
|
+
'system-package',
|
|
621
|
+
'system:publish',
|
|
622
|
+
'system-publish',
|
|
623
|
+
'system:list',
|
|
624
|
+
'system-list',
|
|
625
|
+
'system:install',
|
|
626
|
+
'system-install'
|
|
627
|
+
]);
|
|
628
|
+
|
|
629
|
+
const LEGACY_DASHBOARD_COMMANDS = new Set([
|
|
630
|
+
'dashboard:init',
|
|
631
|
+
'dashboard-init',
|
|
632
|
+
'dashboard:dev',
|
|
633
|
+
'dashboard-dev',
|
|
634
|
+
'dashboard:open',
|
|
635
|
+
'dashboard-open'
|
|
636
|
+
]);
|
|
637
|
+
|
|
638
|
+
function toText(value) {
|
|
639
|
+
if (value === undefined || value === null) return '';
|
|
640
|
+
return typeof value === 'string' ? value : String(value);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
function createLogger() {
|
|
644
|
+
return {
|
|
645
|
+
log(value = '') {
|
|
646
|
+
fs.writeSync(1, `${toText(value)}\n`);
|
|
647
|
+
},
|
|
648
|
+
error(value = '') {
|
|
649
|
+
fs.writeSync(2, `${toText(value)}\n`);
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
function createSilentLogger() {
|
|
655
|
+
return {
|
|
656
|
+
log() {},
|
|
657
|
+
error() {}
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
function logHelpLine(t, logger, key) {
|
|
662
|
+
logger.log(t('cli.help_item_line', { text: t(key) }));
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
function printHelp(t, logger) {
|
|
666
|
+
logger.log(t('cli.title_line', { title: t('cli.title') }));
|
|
667
|
+
logger.log(t('cli.usage'));
|
|
668
|
+
logHelpLine(t, logger, 'cli.help_init');
|
|
669
|
+
logHelpLine(t, logger, 'cli.help_install');
|
|
670
|
+
logHelpLine(t, logger, 'cli.help_setup');
|
|
671
|
+
logHelpLine(t, logger, 'cli.help_update');
|
|
672
|
+
logHelpLine(t, logger, 'cli.help_info');
|
|
673
|
+
logHelpLine(t, logger, 'cli.help_doctor');
|
|
674
|
+
logHelpLine(t, logger, 'cli.help_i18n_add');
|
|
675
|
+
logHelpLine(t, logger, 'cli.help_agents');
|
|
676
|
+
logHelpLine(t, logger, 'cli.help_agent_prompt');
|
|
677
|
+
logHelpLine(t, logger, 'cli.help_agent_invoke');
|
|
678
|
+
logHelpLine(t, logger, 'cli.help_context_validate');
|
|
679
|
+
logHelpLine(t, logger, 'cli.help_context_pack');
|
|
680
|
+
logHelpLine(t, logger, 'cli.help_memory_status');
|
|
681
|
+
logHelpLine(t, logger, 'cli.help_memory_summary');
|
|
682
|
+
logHelpLine(t, logger, 'cli.help_brain_query');
|
|
683
|
+
logHelpLine(t, logger, 'cli.help_setup_context');
|
|
684
|
+
logHelpLine(t, logger, 'cli.help_locale_apply');
|
|
685
|
+
logHelpLine(t, logger, 'cli.help_locale_diff');
|
|
686
|
+
logHelpLine(t, logger, 'cli.help_test_agents');
|
|
687
|
+
logHelpLine(t, logger, 'cli.help_test_smoke');
|
|
688
|
+
logHelpLine(t, logger, 'cli.help_test_package');
|
|
689
|
+
logHelpLine(t, logger, 'cli.help_workflow_plan');
|
|
690
|
+
logHelpLine(t, logger, 'cli.help_workflow_next');
|
|
691
|
+
logHelpLine(t, logger, 'cli.help_workflow_status');
|
|
692
|
+
logHelpLine(t, logger, 'cli.help_workflow_execute');
|
|
693
|
+
logHelpLine(t, logger, 'cli.help_parallel_init');
|
|
694
|
+
logHelpLine(t, logger, 'cli.help_parallel_doctor');
|
|
695
|
+
logHelpLine(t, logger, 'cli.help_parallel_assign');
|
|
696
|
+
logHelpLine(t, logger, 'cli.help_parallel_status');
|
|
697
|
+
logHelpLine(t, logger, 'cli.help_parallel_merge');
|
|
698
|
+
logHelpLine(t, logger, 'cli.help_parallel_guard');
|
|
699
|
+
logHelpLine(t, logger, 'cli.help_mcp_init');
|
|
700
|
+
logHelpLine(t, logger, 'cli.help_mcp_doctor');
|
|
701
|
+
logHelpLine(t, logger, 'cli.help_qa_doctor');
|
|
702
|
+
logHelpLine(t, logger, 'cli.help_qa_init');
|
|
703
|
+
logHelpLine(t, logger, 'cli.help_qa_run');
|
|
704
|
+
logHelpLine(t, logger, 'cli.help_qa_scan');
|
|
705
|
+
logHelpLine(t, logger, 'cli.help_qa_report');
|
|
706
|
+
logHelpLine(t, logger, 'cli.help_web_map');
|
|
707
|
+
logHelpLine(t, logger, 'cli.help_web_scrape');
|
|
708
|
+
logHelpLine(t, logger, 'cli.help_scan_project');
|
|
709
|
+
logHelpLine(t, logger, 'cli.help_config');
|
|
710
|
+
logHelpLine(t, logger, 'cli.help_genome_doctor');
|
|
711
|
+
logHelpLine(t, logger, 'cli.help_genome_migrate');
|
|
712
|
+
logHelpLine(t, logger, 'cli.help_squad_status');
|
|
713
|
+
logHelpLine(t, logger, 'cli.help_squad_doctor');
|
|
714
|
+
logHelpLine(t, logger, 'cli.help_squad_repair_genomes');
|
|
715
|
+
logHelpLine(t, logger, 'cli.help_squad_validate');
|
|
716
|
+
logHelpLine(t, logger, 'cli.help_squad_export');
|
|
717
|
+
logHelpLine(t, logger, 'cli.help_squad_pipeline');
|
|
718
|
+
logHelpLine(t, logger, 'cli.help_squad_agent_create');
|
|
719
|
+
logHelpLine(t, logger, 'cli.help_squad_investigate');
|
|
720
|
+
logHelpLine(t, logger, 'cli.help_squad_dashboard');
|
|
721
|
+
logHelpLine(t, logger, 'cli.help_squad_worker');
|
|
722
|
+
logHelpLine(t, logger, 'cli.help_squad_daemon');
|
|
723
|
+
logHelpLine(t, logger, 'cli.help_squad_mcp');
|
|
724
|
+
logHelpLine(t, logger, 'cli.help_squad_roi');
|
|
725
|
+
logHelpLine(t, logger, 'cli.help_squad_score');
|
|
726
|
+
logHelpLine(t, logger, 'cli.help_squad_learning');
|
|
727
|
+
logHelpLine(t, logger, 'cli.help_learning');
|
|
728
|
+
logHelpLine(t, logger, 'cli.help_runtime_init');
|
|
729
|
+
logHelpLine(t, logger, 'cli.help_runtime_ingest');
|
|
730
|
+
logHelpLine(t, logger, 'cli.help_runtime_task_start');
|
|
731
|
+
logHelpLine(t, logger, 'cli.help_runtime_start');
|
|
732
|
+
logHelpLine(t, logger, 'cli.help_runtime_update');
|
|
733
|
+
logHelpLine(t, logger, 'cli.help_runtime_task_finish');
|
|
734
|
+
logHelpLine(t, logger, 'cli.help_runtime_finish');
|
|
735
|
+
logHelpLine(t, logger, 'cli.help_runtime_task_fail');
|
|
736
|
+
logHelpLine(t, logger, 'cli.help_runtime_fail');
|
|
737
|
+
logHelpLine(t, logger, 'cli.help_runtime_status');
|
|
738
|
+
logHelpLine(t, logger, 'cli.help_runtime_session_start');
|
|
739
|
+
logHelpLine(t, logger, 'cli.help_runtime_session_log');
|
|
740
|
+
logHelpLine(t, logger, 'cli.help_runtime_session_finish');
|
|
741
|
+
logHelpLine(t, logger, 'cli.help_runtime_session_status');
|
|
742
|
+
logHelpLine(t, logger, 'cli.help_runtime_emit');
|
|
743
|
+
logHelpLine(t, logger, 'cli.help_live_start');
|
|
744
|
+
logHelpLine(t, logger, 'cli.help_live_status');
|
|
745
|
+
logHelpLine(t, logger, 'cli.help_live_handoff');
|
|
746
|
+
logHelpLine(t, logger, 'cli.help_live_close');
|
|
747
|
+
logHelpLine(t, logger, 'cli.help_scaffold_complete');
|
|
748
|
+
logHelpLine(t, logger, 'cli.help_runtime_backup');
|
|
749
|
+
logHelpLine(t, logger, 'cli.help_runtime_restore');
|
|
750
|
+
logHelpLine(t, logger, 'cli.help_skill_install');
|
|
751
|
+
logHelpLine(t, logger, 'cli.help_skill_list');
|
|
752
|
+
logHelpLine(t, logger, 'cli.help_skill_remove');
|
|
753
|
+
logHelpLine(t, logger, 'cli.help_design_hybrid_options');
|
|
754
|
+
logHelpLine(t, logger, 'cli.help_cloud_import_squad');
|
|
755
|
+
logHelpLine(t, logger, 'cli.help_cloud_import_genome');
|
|
756
|
+
logHelpLine(t, logger, 'cli.help_cloud_publish_squad');
|
|
757
|
+
logHelpLine(t, logger, 'cli.help_cloud_publish_genome');
|
|
758
|
+
logHelpLine(t, logger, 'cli.help_auth_login');
|
|
759
|
+
logHelpLine(t, logger, 'cli.help_auth_logout');
|
|
760
|
+
logHelpLine(t, logger, 'cli.help_auth_status');
|
|
761
|
+
logHelpLine(t, logger, 'cli.help_workspace_init');
|
|
762
|
+
logHelpLine(t, logger, 'cli.help_workspace_status');
|
|
763
|
+
logHelpLine(t, logger, 'cli.help_workspace_open');
|
|
764
|
+
logHelpLine(t, logger, 'cli.help_genome_publish');
|
|
765
|
+
logHelpLine(t, logger, 'cli.help_genome_install');
|
|
766
|
+
logHelpLine(t, logger, 'cli.help_genome_list');
|
|
767
|
+
logHelpLine(t, logger, 'cli.help_genome_remove');
|
|
768
|
+
logHelpLine(t, logger, 'cli.help_genome_install_store');
|
|
769
|
+
logHelpLine(t, logger, 'cli.help_skill_publish');
|
|
770
|
+
logHelpLine(t, logger, 'cli.help_squad_list');
|
|
771
|
+
logHelpLine(t, logger, 'cli.help_squad_publish');
|
|
772
|
+
logHelpLine(t, logger, 'cli.help_squad_install');
|
|
773
|
+
logHelpLine(t, logger, 'cli.help_squad_grant');
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
function commandSupportsJson(command) {
|
|
777
|
+
return JSON_SUPPORTED_COMMANDS.has(command);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
function writeJson(payload) {
|
|
781
|
+
const text = `${JSON.stringify(payload, null, 2)}\n`;
|
|
782
|
+
fs.writeSync(1, text);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
async function main() {
|
|
786
|
+
const { command, args, options } = parseArgv(process.argv);
|
|
787
|
+
const locale = normalizeLocale(options.locale || process.env.AIOS_LITE_LOCALE || 'en');
|
|
788
|
+
const jsonMode = Boolean(options.json);
|
|
789
|
+
const { t } = createTranslator(locale);
|
|
790
|
+
const logger = createLogger();
|
|
791
|
+
const silentLogger = createSilentLogger();
|
|
792
|
+
|
|
793
|
+
if (command === 'help' || options.help || command === '--help' || command === '-h') {
|
|
794
|
+
printHelp(t, logger);
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
if (command === '--version' || command === '-v' || command === 'version' || options.version) {
|
|
799
|
+
const result = await runInfo({ args: ['.'], options, logger, t });
|
|
800
|
+
if (jsonMode) {
|
|
801
|
+
writeJson(result);
|
|
802
|
+
}
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
if (LEGACY_DASHBOARD_COMMANDS.has(command)) {
|
|
807
|
+
const message = t('cli.dashboard_moved', { command });
|
|
808
|
+
if (jsonMode) {
|
|
809
|
+
writeJson({
|
|
810
|
+
ok: false,
|
|
811
|
+
error: {
|
|
812
|
+
code: 'dashboard_moved',
|
|
813
|
+
message,
|
|
814
|
+
command
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
} else {
|
|
818
|
+
logger.error(t('cli.dashboard_moved_line', { message }));
|
|
819
|
+
}
|
|
820
|
+
process.exitCode = 1;
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
try {
|
|
825
|
+
let result = null;
|
|
826
|
+
const commandLogger =
|
|
827
|
+
jsonMode && commandSupportsJson(command) ? silentLogger : logger;
|
|
828
|
+
|
|
829
|
+
if (command === 'init') {
|
|
830
|
+
result = await runInit({ args, options, logger: commandLogger, t });
|
|
831
|
+
} else if (command === 'install') {
|
|
832
|
+
result = await runInstall({ args, options, logger: commandLogger, t });
|
|
833
|
+
} else if (command === 'setup') {
|
|
834
|
+
result = await runSetup({ args, options, logger: commandLogger, t });
|
|
835
|
+
} else if (command === 'install') {
|
|
836
|
+
result = await runInstall({ args, options, logger: commandLogger, t });
|
|
837
|
+
} else if (command === 'update') {
|
|
838
|
+
result = await runUpdate({ args, options, logger: commandLogger, t });
|
|
839
|
+
} else if (command === 'info') {
|
|
840
|
+
result = await runInfo({ args, options, logger: commandLogger, t });
|
|
841
|
+
} else if (command === 'doctor') {
|
|
842
|
+
result = await runDoctorCommand({ args, options, logger: commandLogger, t });
|
|
843
|
+
} else if (command === 'i18n:add' || command === 'i18n-add') {
|
|
844
|
+
result = await runI18nAdd({ args, options, logger: commandLogger, t });
|
|
845
|
+
} else if (command === 'agents') {
|
|
846
|
+
result = await runAgentsList({ args, options, logger: commandLogger, t });
|
|
847
|
+
} else if (
|
|
848
|
+
command === 'agent:prompt' ||
|
|
849
|
+
command === 'agent-prompt' ||
|
|
850
|
+
command === 'agent:invoke' ||
|
|
851
|
+
command === 'agent-invoke'
|
|
852
|
+
) {
|
|
853
|
+
result = await runAgentPrompt({ args, options, logger: commandLogger, t });
|
|
854
|
+
} else if (command === 'context:validate' || command === 'context-validate') {
|
|
855
|
+
result = await runContextValidate({ args, options, logger: commandLogger, t });
|
|
856
|
+
} else if (command === 'context:pack' || command === 'context-pack') {
|
|
857
|
+
result = await runContextPack({ args, options, logger: commandLogger, t });
|
|
858
|
+
} else if (command === 'setup:context' || command === 'setup-context') {
|
|
859
|
+
result = await runSetupContext({ args, options, logger: commandLogger, t });
|
|
860
|
+
} else if (command === 'locale:apply' || command === 'locale-apply') {
|
|
861
|
+
result = await runLocaleApply({ args, options, logger: commandLogger, t });
|
|
862
|
+
} else if (command === 'locale:diff' || command === 'locale-diff') {
|
|
863
|
+
result = await runLocaleDiff({ args, options, logger: commandLogger, t });
|
|
864
|
+
} else if (command === 'test:agents' || command === 'test-agents') {
|
|
865
|
+
result = await runTestAgents({ args, options, logger: commandLogger, t });
|
|
866
|
+
} else if (command === 'test:smoke' || command === 'test-smoke') {
|
|
867
|
+
result = await runSmokeTest({ args, options, logger: commandLogger, t });
|
|
868
|
+
} else if (command === 'test:package' || command === 'test-package') {
|
|
869
|
+
result = await runPackageTest({ args, options, logger: commandLogger, t });
|
|
870
|
+
} else if (command === 'workflow:plan' || command === 'workflow-plan') {
|
|
871
|
+
result = await runWorkflowPlan({ args, options, logger: commandLogger, t });
|
|
872
|
+
} else if (
|
|
873
|
+
command === 'workflow:next' ||
|
|
874
|
+
command === 'workflow-next' ||
|
|
875
|
+
command === 'agent:next' ||
|
|
876
|
+
command === 'agent-next'
|
|
877
|
+
) {
|
|
878
|
+
if (options.status || options.suggest) {
|
|
879
|
+
result = await runWorkflowStatus({ args, options, logger: commandLogger, t });
|
|
880
|
+
} else {
|
|
881
|
+
result = await runWorkflowNext({ args, options, logger: commandLogger, t });
|
|
882
|
+
}
|
|
883
|
+
} else if (
|
|
884
|
+
command === 'workflow:status' ||
|
|
885
|
+
command === 'workflow-status'
|
|
886
|
+
) {
|
|
887
|
+
result = await runWorkflowStatus({ args, options, logger: commandLogger, t });
|
|
888
|
+
} else if (
|
|
889
|
+
command === 'workflow:heal' ||
|
|
890
|
+
command === 'workflow-heal'
|
|
891
|
+
) {
|
|
892
|
+
result = await runWorkflowHeal({ args, options, logger: commandLogger, t });
|
|
893
|
+
} else if (
|
|
894
|
+
command === 'workflow:harden' ||
|
|
895
|
+
command === 'workflow-harden'
|
|
896
|
+
) {
|
|
897
|
+
result = await runWorkflowHarden({ args, options, logger: commandLogger, t });
|
|
898
|
+
} else if (
|
|
899
|
+
command === 'parallel:init' ||
|
|
900
|
+
command === 'parallel-init' ||
|
|
901
|
+
command === 'orchestrator:init' ||
|
|
902
|
+
command === 'orchestrator-init'
|
|
903
|
+
) {
|
|
904
|
+
result = await runParallelInit({ args, options, logger: commandLogger, t });
|
|
905
|
+
} else if (
|
|
906
|
+
command === 'parallel:doctor' ||
|
|
907
|
+
command === 'parallel-doctor' ||
|
|
908
|
+
command === 'orchestrator:doctor' ||
|
|
909
|
+
command === 'orchestrator-doctor'
|
|
910
|
+
) {
|
|
911
|
+
result = await runParallelDoctor({ args, options, logger: commandLogger, t });
|
|
912
|
+
} else if (
|
|
913
|
+
command === 'parallel:assign' ||
|
|
914
|
+
command === 'parallel-assign' ||
|
|
915
|
+
command === 'orchestrator:assign' ||
|
|
916
|
+
command === 'orchestrator-assign'
|
|
917
|
+
) {
|
|
918
|
+
result = await runParallelAssign({ args, options, logger: commandLogger, t });
|
|
919
|
+
} else if (
|
|
920
|
+
command === 'parallel:status' ||
|
|
921
|
+
command === 'parallel-status' ||
|
|
922
|
+
command === 'orchestrator:status' ||
|
|
923
|
+
command === 'orchestrator-status'
|
|
924
|
+
) {
|
|
925
|
+
result = await runParallelStatus({ args, options, logger: commandLogger, t });
|
|
926
|
+
} else if (
|
|
927
|
+
command === 'parallel:merge' ||
|
|
928
|
+
command === 'parallel-merge' ||
|
|
929
|
+
command === 'orchestrator:merge' ||
|
|
930
|
+
command === 'orchestrator-merge'
|
|
931
|
+
) {
|
|
932
|
+
result = await runParallelMerge({ args, options, logger: commandLogger, t });
|
|
933
|
+
} else if (
|
|
934
|
+
command === 'parallel:guard' ||
|
|
935
|
+
command === 'parallel-guard' ||
|
|
936
|
+
command === 'orchestrator:guard' ||
|
|
937
|
+
command === 'orchestrator-guard'
|
|
938
|
+
) {
|
|
939
|
+
result = await runParallelGuard({ args, options, logger: commandLogger, t });
|
|
940
|
+
} else if (command === 'mcp:init' || command === 'mcp-init') {
|
|
941
|
+
result = await runMcpInit({ args, options, logger: commandLogger, t });
|
|
942
|
+
} else if (command === 'mcp:doctor' || command === 'mcp-doctor') {
|
|
943
|
+
result = await runMcpDoctor({ args, options, logger: commandLogger, t });
|
|
944
|
+
} else if (command === 'qa:doctor' || command === 'qa-doctor') {
|
|
945
|
+
result = await runQaDoctor({ args, options, logger: commandLogger, t });
|
|
946
|
+
} else if (command === 'qa:init' || command === 'qa-init') {
|
|
947
|
+
result = await runQaInit({ args, options, logger: commandLogger, t });
|
|
948
|
+
} else if (command === 'qa:run' || command === 'qa-run') {
|
|
949
|
+
result = await runQaRun({ args, options, logger: commandLogger, t });
|
|
950
|
+
} else if (command === 'qa:scan' || command === 'qa-scan') {
|
|
951
|
+
result = await runQaScan({ args, options, logger: commandLogger, t });
|
|
952
|
+
} else if (command === 'qa:report' || command === 'qa-report') {
|
|
953
|
+
result = await runQaReport({ args, options, logger: commandLogger, t });
|
|
954
|
+
} else if (command === 'web:map' || command === 'web-map') {
|
|
955
|
+
result = await runWebMap({ args, options, logger: commandLogger, t });
|
|
956
|
+
} else if (command === 'web:scrape' || command === 'web-scrape') {
|
|
957
|
+
result = await runWebScrape({ args, options, logger: commandLogger, t });
|
|
958
|
+
} else if (command === 'scan:project' || command === 'scan-project') {
|
|
959
|
+
result = await runScanProject({ args, options, logger: commandLogger, t });
|
|
960
|
+
} else if (command === 'security:scan' || command === 'security-scan') {
|
|
961
|
+
result = await runSecurityScan({ args, options, logger: commandLogger, t });
|
|
962
|
+
} else if (command === 'security:audit' || command === 'security-audit') {
|
|
963
|
+
result = await runSecurityAudit({ args, options, logger: commandLogger, t });
|
|
964
|
+
} else if (command === 'config') {
|
|
965
|
+
result = await runConfig({ args, options, logger: commandLogger, t });
|
|
966
|
+
} else if (command === 'genome:doctor' || command === 'genome-doctor') {
|
|
967
|
+
result = await runGenomeDoctor({ args, options, logger: commandLogger, t });
|
|
968
|
+
} else if (command === 'genome:migrate' || command === 'genome-migrate') {
|
|
969
|
+
result = await runGenomeMigrate({ args, options, logger: commandLogger, t });
|
|
970
|
+
} else if (command === 'squad:status' || command === 'squad-status') {
|
|
971
|
+
result = await runSquadStatus({ args, options, logger: commandLogger, t });
|
|
972
|
+
} else if (command === 'squad:doctor' || command === 'squad-doctor') {
|
|
973
|
+
result = await runSquadDoctor({ args, options, logger: commandLogger, t });
|
|
974
|
+
} else if (command === 'squad:repair-genomes' || command === 'squad-repair-genomes') {
|
|
975
|
+
result = await runSquadRepairGenomes({ args, options, logger: commandLogger, t });
|
|
976
|
+
} else if (command === 'squad:validate' || command === 'squad-validate') {
|
|
977
|
+
result = await runSquadValidate({ args, options, logger: commandLogger, t });
|
|
978
|
+
} else if (command === 'squad:export' || command === 'squad-export') {
|
|
979
|
+
result = await runSquadExport({ args, options, logger: commandLogger, t });
|
|
980
|
+
} else if (command === 'squad:pipeline' || command === 'squad-pipeline') {
|
|
981
|
+
result = await runSquadPipeline({ args, options, logger: commandLogger, t });
|
|
982
|
+
} else if (command === 'squad:agent-create' || command === 'squad-agent-create') {
|
|
983
|
+
result = await runSquadAgentCreate({ args, options, logger: commandLogger, t });
|
|
984
|
+
} else if (command === 'squad:investigate' || command === 'squad-investigate') {
|
|
985
|
+
result = await runSquadInvestigate({ args, options, logger: commandLogger, t });
|
|
986
|
+
} else if (command === 'squad:dashboard' || command === 'squad-dashboard') {
|
|
987
|
+
result = await runSquadDashboard({ args, options, logger: commandLogger, t });
|
|
988
|
+
} else if (command === 'squad:worker' || command === 'squad-worker') {
|
|
989
|
+
const sub = options.sub || 'list';
|
|
990
|
+
result = await runSquadWorker({ args, options: { ...options, sub }, logger: commandLogger, t });
|
|
991
|
+
} else if (command === 'squad:daemon' || command === 'squad-daemon') {
|
|
992
|
+
const sub = options.sub || 'status';
|
|
993
|
+
result = await runSquadDaemon({ args, options: { ...options, sub }, logger: commandLogger, t });
|
|
994
|
+
} else if (command === 'squad:mcp:call') {
|
|
995
|
+
result = await runSquadMcp({ args, options: { ...options, sub: 'call' }, logger: commandLogger, t });
|
|
996
|
+
} else if (command === 'squad:mcp' || command === 'squad-mcp') {
|
|
997
|
+
const sub = options.sub || 'status';
|
|
998
|
+
result = await runSquadMcp({ args, options: { ...options, sub }, logger: commandLogger, t });
|
|
999
|
+
} else if (command === 'squad:roi' || command === 'squad-roi') {
|
|
1000
|
+
const sub = options.sub || 'report';
|
|
1001
|
+
result = await runSquadRoi({ args, options: { ...options, sub }, logger: commandLogger, t });
|
|
1002
|
+
} else if (command === 'squad:score' || command === 'squad-score') {
|
|
1003
|
+
result = await runSquadScore({ args, options, logger: commandLogger, translator: t });
|
|
1004
|
+
} else if (command === 'squad:processes' || command === 'squad-processes') {
|
|
1005
|
+
result = await runSquadProcesses({ args, options, logger: commandLogger, t });
|
|
1006
|
+
} else if (command === 'squad:worktrees' || command === 'squad-worktrees') {
|
|
1007
|
+
result = await runSquadWorktrees({ args, options, logger: commandLogger, t });
|
|
1008
|
+
} else if (command === 'squad:merge' || command === 'squad-merge') {
|
|
1009
|
+
result = await runSquadMerge({ args, options, logger: commandLogger, t });
|
|
1010
|
+
} else if (command === 'squad:recovery' || command === 'squad-recovery') {
|
|
1011
|
+
result = await runSquadRecovery({ args, options, logger: commandLogger, t });
|
|
1012
|
+
} else if (command === 'squad:deploy' || command === 'squad-deploy') {
|
|
1013
|
+
result = await runSquadDeploy({ args, options, logger: commandLogger, t });
|
|
1014
|
+
} else if (command === 'squad:webhook' || command === 'squad-webhook') {
|
|
1015
|
+
const sub = options.sub || 'start';
|
|
1016
|
+
result = await runSquadWebhook({ args, options: { ...options, sub }, logger: commandLogger, t });
|
|
1017
|
+
} else if (command === 'squad:plan' || command === 'squad-plan') {
|
|
1018
|
+
result = await runSquadPlan({ args, options, logger: commandLogger, t });
|
|
1019
|
+
} else if (command === 'squad:bus' || command === 'squad-bus') {
|
|
1020
|
+
const sub = args[1] || options.sub || 'read';
|
|
1021
|
+
result = await runSquadBus({ args, options: { ...options, sub }, logger: commandLogger });
|
|
1022
|
+
} else if (command === 'squad:autorun' || command === 'squad-autorun') {
|
|
1023
|
+
result = await runSquadAutorun({ args, options, logger: commandLogger });
|
|
1024
|
+
} else if (command === 'squad:dependency-graph' || command === 'squad-dependency-graph') {
|
|
1025
|
+
result = await runSquadDependencyGraph({ args, options, logger: commandLogger });
|
|
1026
|
+
} else if (command === 'squad:tool:register' || command === 'squad-tool-register') {
|
|
1027
|
+
result = await runSquadToolRegister({ args, options, logger: commandLogger });
|
|
1028
|
+
} else if (command === 'squad:review' || command === 'squad-review') {
|
|
1029
|
+
result = await runSquadReview({ args, options, logger: commandLogger });
|
|
1030
|
+
} else if (command === 'agent:audit' || command === 'agent-audit') {
|
|
1031
|
+
result = await runAgentAudit({ args, options, logger: commandLogger });
|
|
1032
|
+
} else if (command === 'brief:gen' || command === 'brief-gen') {
|
|
1033
|
+
result = await runBriefGen({ args, options, logger: commandLogger, t });
|
|
1034
|
+
} else if (command === 'harness:init' || command === 'harness-init') {
|
|
1035
|
+
result = await runHarnessInit({ args, options, logger: commandLogger, t });
|
|
1036
|
+
} else if (command === 'harness:validate' || command === 'harness-validate') {
|
|
1037
|
+
result = await runHarnessValidate({ args, options, logger: commandLogger, t });
|
|
1038
|
+
} else if (command === 'verify:gate' || command === 'verify-gate') {
|
|
1039
|
+
result = await runVerifyGate({ args, options, logger: commandLogger, t });
|
|
1040
|
+
|
|
1041
|
+
} else if (command === 'brief:validate' || command === 'brief-validate') {
|
|
1042
|
+
result = await runBriefValidate({ args, options, logger: commandLogger });
|
|
1043
|
+
} else if (command === 'preflight:context' || command === 'preflight-context') {
|
|
1044
|
+
result = await runPreflightContext({ args, options, logger: commandLogger });
|
|
1045
|
+
} else if (command === 'context:compact' || command === 'context-compact') {
|
|
1046
|
+
result = await runContextCompact({ args, options, logger: commandLogger });
|
|
1047
|
+
} else if (command === 'squad:scaffold' || command === 'squad-scaffold') {
|
|
1048
|
+
result = await runSquadScaffold({ args, options, logger: commandLogger });
|
|
1049
|
+
} else if (command === 'pattern:detect' || command === 'pattern-detect') {
|
|
1050
|
+
result = await runPatternDetect({ args, options, logger: commandLogger });
|
|
1051
|
+
} else if (command === 'self:loop' || command === 'self-loop') {
|
|
1052
|
+
result = await runSelfLoop({ args, options, logger: commandLogger });
|
|
1053
|
+
} else if (command === 'squad:card' || command === 'squad-card') {
|
|
1054
|
+
result = await runSquadCard({ args, options, logger: commandLogger });
|
|
1055
|
+
} else if (command === 'git:guard' || command === 'git-guard') {
|
|
1056
|
+
result = await runGitGuard({ args, options, logger: commandLogger });
|
|
1057
|
+
} else if (command === 'commit:prepare' || command === 'commit-prepare') {
|
|
1058
|
+
result = await runCommitPrepare({ args, options, logger: commandLogger });
|
|
1059
|
+
} else if (command === 'agent:export-skill' || command === 'agent-export-skill') {
|
|
1060
|
+
result = await runAgentExportSkill({ args, options, logger: commandLogger });
|
|
1061
|
+
} else if (command === 'squad:learning' || command === 'squad-learning') {
|
|
1062
|
+
const sub = args[1] || 'list';
|
|
1063
|
+
result = await runSquadLearning({ args, options: { ...options, sub }, logger: commandLogger, t });
|
|
1064
|
+
} else if (command === 'learning:evolve' || command === 'learning-evolve') {
|
|
1065
|
+
result = await runLearningEvolve({ args, options, logger: commandLogger, t });
|
|
1066
|
+
} else if (command === 'learning:rollback' || command === 'learning-rollback') {
|
|
1067
|
+
result = await runLearningRollback({ args, options, logger: commandLogger });
|
|
1068
|
+
} else if (command === 'learning:apply' || command === 'learning-apply') {
|
|
1069
|
+
result = await runLearningApply({ args, options, logger: commandLogger, t });
|
|
1070
|
+
} else if (command === 'learning:export' || command === 'learning-export') {
|
|
1071
|
+
result = await runLearningExport({ args, options, logger: commandLogger });
|
|
1072
|
+
} else if (command === 'spec:sync' || command === 'spec-sync') {
|
|
1073
|
+
result = await runSpecSync({ args, options, logger: commandLogger });
|
|
1074
|
+
} else if (command === 'spec:status' || command === 'spec-status') {
|
|
1075
|
+
result = await runSpecStatus({ args, options, logger: commandLogger });
|
|
1076
|
+
} else if (command === 'spec:checkpoint' || command === 'spec-checkpoint') {
|
|
1077
|
+
result = await runSpecCheckpoint({ args, options, logger: commandLogger });
|
|
1078
|
+
} else if (command === 'spec:tasks' || command === 'spec-tasks') {
|
|
1079
|
+
result = await runSpecTasks({ args, options, logger: commandLogger });
|
|
1080
|
+
} else if (command.startsWith('learning:') || command === 'learning') {
|
|
1081
|
+
const sub = command === 'learning' ? (args[1] || 'list') : command.split(':')[1];
|
|
1082
|
+
result = await runLearning({ args, options: { ...options, sub }, logger: commandLogger, t });
|
|
1083
|
+
} else if (command.startsWith('plan:') || command === 'plan') {
|
|
1084
|
+
const sub = command === 'plan' ? (args[1] || 'show') : command.split(':')[1];
|
|
1085
|
+
result = await runImplementationPlan({ args, options: { ...options, sub }, logger: commandLogger, t });
|
|
1086
|
+
} else if (command === 'runtime:init' || command === 'runtime-init') {
|
|
1087
|
+
result = await runRuntimeInit({ args, options, logger: commandLogger, t });
|
|
1088
|
+
} else if (command === 'runtime:ingest' || command === 'runtime-ingest') {
|
|
1089
|
+
result = await runRuntimeIngest({ args, options, logger: commandLogger, t });
|
|
1090
|
+
} else if (command === 'runtime:task:start' || command === 'runtime-task-start') {
|
|
1091
|
+
result = await runRuntimeTaskStart({ args, options, logger: commandLogger, t });
|
|
1092
|
+
} else if (command === 'runtime:start' || command === 'runtime-start') {
|
|
1093
|
+
result = await runRuntimeStart({ args, options, logger: commandLogger, t });
|
|
1094
|
+
} else if (command === 'runtime:update' || command === 'runtime-update') {
|
|
1095
|
+
result = await runRuntimeUpdate({ args, options, logger: commandLogger, t });
|
|
1096
|
+
} else if (command === 'runtime:task:finish' || command === 'runtime-task-finish') {
|
|
1097
|
+
result = await runRuntimeTaskFinish({ args, options, logger: commandLogger, t });
|
|
1098
|
+
} else if (command === 'runtime:finish' || command === 'runtime-finish') {
|
|
1099
|
+
result = await runRuntimeFinish({ args, options, logger: commandLogger, t });
|
|
1100
|
+
} else if (command === 'runtime:task:fail' || command === 'runtime-task-fail') {
|
|
1101
|
+
result = await runRuntimeTaskFail({ args, options, logger: commandLogger, t });
|
|
1102
|
+
} else if (command === 'runtime:fail' || command === 'runtime-fail') {
|
|
1103
|
+
result = await runRuntimeFail({ args, options, logger: commandLogger, t });
|
|
1104
|
+
} else if (command === 'runtime:status' || command === 'runtime-status') {
|
|
1105
|
+
result = await runRuntimeStatus({ args, options, logger: commandLogger, t });
|
|
1106
|
+
} else if (command === 'runtime:log' || command === 'runtime-log') {
|
|
1107
|
+
result = await runRuntimeLog({ args, options, logger: commandLogger, t });
|
|
1108
|
+
} else if (command === 'agent:done' || command === 'agent-done') {
|
|
1109
|
+
result = await runAgentDone({ args, options, logger: commandLogger, t });
|
|
1110
|
+
} else if (command === 'agent:recover' || command === 'agent-recover') {
|
|
1111
|
+
result = await runAgentRecover({ args, options, logger: commandLogger, t });
|
|
1112
|
+
} else if (command === 'runtime:session:start' || command === 'runtime-session-start') {
|
|
1113
|
+
result = await runRuntimeSessionStart({ args, options, logger: commandLogger, t });
|
|
1114
|
+
} else if (command === 'runtime:session:log' || command === 'runtime-session-log') {
|
|
1115
|
+
result = await runRuntimeSessionLog({ args, options, logger: commandLogger, t });
|
|
1116
|
+
} else if (command === 'runtime:session:finish' || command === 'runtime-session-finish') {
|
|
1117
|
+
result = await runRuntimeSessionFinish({ args, options, logger: commandLogger, t });
|
|
1118
|
+
} else if (command === 'runtime:session:status' || command === 'runtime-session-status') {
|
|
1119
|
+
result = await runRuntimeSessionStatus({ args, options, logger: commandLogger, t });
|
|
1120
|
+
} else if (command === 'runtime:emit' || command === 'runtime-emit') {
|
|
1121
|
+
result = await runRuntimeEmit({ args, options, logger: commandLogger, t });
|
|
1122
|
+
} else if (command === 'live:start' || command === 'live-start') {
|
|
1123
|
+
result = await runLiveStart({ args, options, logger: commandLogger, t });
|
|
1124
|
+
} else if (command === 'live:status' || command === 'live-status') {
|
|
1125
|
+
result = await runLiveStatus({ args, options, logger: commandLogger, t });
|
|
1126
|
+
} else if (command === 'live:handoff' || command === 'live-handoff') {
|
|
1127
|
+
result = await runLiveHandoff({ args, options, logger: commandLogger, t });
|
|
1128
|
+
} else if (command === 'live:close' || command === 'live-close') {
|
|
1129
|
+
result = await runLiveClose({ args, options, logger: commandLogger, t });
|
|
1130
|
+
} else if (command === 'live:list' || command === 'live-list') {
|
|
1131
|
+
result = await runLiveList({ args, options, logger: commandLogger, t });
|
|
1132
|
+
} else if (command === 'tool:capabilities' || command === 'tool-capabilities') {
|
|
1133
|
+
result = await runToolCapabilities({ args, options, logger: commandLogger, t });
|
|
1134
|
+
} else if (command === 'scaffold:complete' || command === 'scaffold-complete') {
|
|
1135
|
+
result = await runScaffoldComplete({ args, options, logger: commandLogger, t });
|
|
1136
|
+
} else if (command === 'deliver') {
|
|
1137
|
+
result = await runDeliver({ args, options, logger: commandLogger, t });
|
|
1138
|
+
} else if (command === 'output-strategy:export') {
|
|
1139
|
+
result = await runOutputStrategyExport({ args, options, logger: commandLogger, t });
|
|
1140
|
+
} else if (command === 'output-strategy:import') {
|
|
1141
|
+
result = await runOutputStrategyImport({ args, options, logger: commandLogger, t });
|
|
1142
|
+
} else if (command === 'devlog:sync' || command === 'devlog-sync') {
|
|
1143
|
+
result = await runDevlogSync({ args, options, logger: commandLogger, t });
|
|
1144
|
+
} else if (command === 'hooks:emit' || command === 'hooks-emit') {
|
|
1145
|
+
result = await runHooksEmit({ args, options, logger: commandLogger });
|
|
1146
|
+
} else if (command === 'hooks:install' || command === 'hooks-install') {
|
|
1147
|
+
result = await runHooksInstall({ args, options, logger: commandLogger });
|
|
1148
|
+
} else if (command === 'hooks:uninstall' || command === 'hooks-uninstall') {
|
|
1149
|
+
result = await runHooksUninstall({ args, options, logger: commandLogger });
|
|
1150
|
+
} else if (command === 'session:guard' || command === 'session-guard') {
|
|
1151
|
+
result = await runSessionGuard({ args, options, logger: commandLogger });
|
|
1152
|
+
} else if (command === 'devlog:process' || command === 'devlog-process') {
|
|
1153
|
+
result = await runDevlogProcess({ args, options, logger: commandLogger });
|
|
1154
|
+
} else if (command === 'devlog:watch' || command === 'devlog-watch') {
|
|
1155
|
+
result = await runDevlogWatch({ args, options, logger: commandLogger });
|
|
1156
|
+
} else if (command === 'devlog:export-brains' || command === 'devlog-export-brains') {
|
|
1157
|
+
result = await runDevlogExportBrains({ args, options, logger: commandLogger });
|
|
1158
|
+
} else if (command === 'brain:query' || command === 'brain-query') {
|
|
1159
|
+
result = await runBrainQuery({ args, options, logger: commandLogger });
|
|
1160
|
+
} else if (command === 'memory:status' || command === 'memory-status') {
|
|
1161
|
+
result = await runMemoryStatus({ args, options, logger: commandLogger });
|
|
1162
|
+
} else if (command === 'memory:summary' || command === 'memory-summary') {
|
|
1163
|
+
result = await runMemorySummary({ args, options, logger: commandLogger });
|
|
1164
|
+
} else if (command === 'runtime:prune' || command === 'runtime-prune') {
|
|
1165
|
+
result = await runRuntimePrune({ args, options, logger: commandLogger, t });
|
|
1166
|
+
} else if (command === 'runtime:backup' || command === 'runtime-backup') {
|
|
1167
|
+
result = await runRuntimeBackup({ args, options, logger: commandLogger, t });
|
|
1168
|
+
} else if (command === 'runtime:restore' || command === 'runtime-restore') {
|
|
1169
|
+
result = await runRuntimeRestore({ args, options, logger: commandLogger, t });
|
|
1170
|
+
} else if (command === 'backup:local' || command === 'backup-local') {
|
|
1171
|
+
result = await runBackupLocal({ args, options, logger: commandLogger, t });
|
|
1172
|
+
} else if (command === 'skill:install' || command === 'skill-install') {
|
|
1173
|
+
if (options.from === 'store') {
|
|
1174
|
+
result = await runSkillInstallStore({ args, options, logger: commandLogger, t });
|
|
1175
|
+
} else {
|
|
1176
|
+
result = await runSkillInstall({ args, options, logger: commandLogger, t });
|
|
1177
|
+
}
|
|
1178
|
+
} else if (command === 'skill:install:store' || command === 'skill-install-store') {
|
|
1179
|
+
result = await runSkillInstallStore({ args, options, logger: commandLogger, t });
|
|
1180
|
+
} else if (command === 'skill:list' || command === 'skill-list') {
|
|
1181
|
+
if (options.remote) {
|
|
1182
|
+
result = await runSkillListRemote({ args, options, logger: commandLogger, t });
|
|
1183
|
+
} else {
|
|
1184
|
+
result = await runSkillList({ args, options, logger: commandLogger, t });
|
|
1185
|
+
}
|
|
1186
|
+
} else if (command === 'skill:remove' || command === 'skill-remove') {
|
|
1187
|
+
result = await runSkillRemove({ args, options, logger: commandLogger, t });
|
|
1188
|
+
} else if (command === 'design-hybrid:options' || command === 'design-hybrid-options') {
|
|
1189
|
+
result = await runDesignHybridOptions({ args, options, logger: commandLogger, t });
|
|
1190
|
+
} else if (command === 'cloud:import:squad' || command === 'cloud-import-squad') {
|
|
1191
|
+
result = await runCloudImportSquad({ args, options, logger: commandLogger, t });
|
|
1192
|
+
} else if (command === 'cloud:import:genome' || command === 'cloud-import-genome') {
|
|
1193
|
+
result = await runCloudImportGenome({ args, options, logger: commandLogger, t });
|
|
1194
|
+
} else if (command === 'cloud:publish:squad' || command === 'cloud-publish-squad') {
|
|
1195
|
+
result = await runCloudPublishSquad({ args, options, logger: commandLogger, t });
|
|
1196
|
+
} else if (command === 'cloud:publish:genome' || command === 'cloud-publish-genome') {
|
|
1197
|
+
result = await runCloudPublishGenome({ args, options, logger: commandLogger, t });
|
|
1198
|
+
} else if (command === 'recovery:generate' || command === 'recovery-generate') {
|
|
1199
|
+
result = await runRecoveryGenerate({ args, options, logger: commandLogger, t });
|
|
1200
|
+
} else if (command === 'recovery:show' || command === 'recovery-show') {
|
|
1201
|
+
result = await runRecoveryShow({ args, options, logger: commandLogger, t });
|
|
1202
|
+
} else if (command === 'context:monitor' || command === 'context-monitor') {
|
|
1203
|
+
result = await runContextMonitor({ args, options, logger: commandLogger, t });
|
|
1204
|
+
} else if (command === 'context:health' || command === 'context-health') {
|
|
1205
|
+
result = await runContextHealth({ args, options, logger: commandLogger });
|
|
1206
|
+
} else if (command === 'context:trim' || command === 'context-trim') {
|
|
1207
|
+
result = await runContextTrim({ args, options, logger: commandLogger });
|
|
1208
|
+
} else if (command === 'context:search' || command === 'context-search') {
|
|
1209
|
+
result = await runContextSearch({ args, options, logger: commandLogger, t });
|
|
1210
|
+
} else if (command === 'context:search:index' || command === 'context-search-index') {
|
|
1211
|
+
result = await runContextSearchIndex({ args, options, logger: commandLogger, t });
|
|
1212
|
+
} else if (command === 'context:cache' || command === 'context-cache') {
|
|
1213
|
+
result = await runContextCacheList({ args, options, logger: commandLogger, t });
|
|
1214
|
+
} else if (command === 'context:cache:save' || command === 'context-cache-save') {
|
|
1215
|
+
result = await runContextCacheSave({ args, options, logger: commandLogger, t });
|
|
1216
|
+
} else if (command === 'context:cache:restore' || command === 'context-cache-restore') {
|
|
1217
|
+
result = await runContextCacheRestore({ args, options, logger: commandLogger, t });
|
|
1218
|
+
} else if (command === 'context:cache:cleanup' || command === 'context-cache-cleanup') {
|
|
1219
|
+
result = await runContextCacheCleanup({ args, options, logger: commandLogger, t });
|
|
1220
|
+
} else if (command === 'sandbox:exec' || command === 'sandbox-exec') {
|
|
1221
|
+
result = await runSandboxExec({ args, options, logger: commandLogger, t });
|
|
1222
|
+
} else if (command === 'agent:load' || command === 'agent-load') {
|
|
1223
|
+
result = await runAgentLoad({ args, options, logger: commandLogger, t });
|
|
1224
|
+
} else if (command === 'agent:shard:index' || command === 'agent-shard-index') {
|
|
1225
|
+
result = await runAgentShardIndex({ args, options, logger: commandLogger, t });
|
|
1226
|
+
} else if (command.startsWith('tool:') || command.startsWith('tool-')) {
|
|
1227
|
+
const sub = command.replace(/^tool[:-]/, '');
|
|
1228
|
+
result = await runToolRegistry({ args, options: { ...options, sub }, logger: commandLogger, t });
|
|
1229
|
+
} else if (command === 'health') {
|
|
1230
|
+
result = await runHealth({ args, options, logger: commandLogger, t });
|
|
1231
|
+
} else if (command === 'runner:run' || command === 'runner-run') {
|
|
1232
|
+
result = await runRunnerRun({ args, options, logger: commandLogger });
|
|
1233
|
+
} else if (command === 'runner:queue' || command === 'runner-queue') {
|
|
1234
|
+
const sub = args[1] || options.sub || 'list';
|
|
1235
|
+
result = await runRunnerQueue({ args, options: { ...options, sub }, logger: commandLogger });
|
|
1236
|
+
} else if (command === 'runner:plan' || command === 'runner-plan') {
|
|
1237
|
+
result = await runRunnerPlan({ args, options, logger: commandLogger });
|
|
1238
|
+
} else if (command === 'runner:daemon' || command === 'runner-daemon') {
|
|
1239
|
+
const sub = args[1] || options.sub || 'status';
|
|
1240
|
+
result = await runRunnerDaemon({ args, options: { ...options, sub }, logger: commandLogger });
|
|
1241
|
+
} else if (command === 'preflight') {
|
|
1242
|
+
result = await runPreflight({ args, options, logger: commandLogger });
|
|
1243
|
+
} else if (command === 'classify') {
|
|
1244
|
+
result = await runClassify({ args, options, logger: commandLogger });
|
|
1245
|
+
} else if (command === 'sizing') {
|
|
1246
|
+
result = await runSizing({ args, options, logger: commandLogger });
|
|
1247
|
+
} else if (command === 'detect:test-runner' || command === 'detect-test-runner') {
|
|
1248
|
+
result = await runDetectTestRunner({ args, options, logger: commandLogger });
|
|
1249
|
+
} else if (command === 'pulse:update' || command === 'pulse-update') {
|
|
1250
|
+
result = await runPulseUpdate({ args, options, logger: commandLogger });
|
|
1251
|
+
} else if (command === 'state:save' || command === 'state-save') {
|
|
1252
|
+
result = await runStateSave({ args, options, logger: commandLogger });
|
|
1253
|
+
} else if (command === 'feature:close' || command === 'feature-close') {
|
|
1254
|
+
result = await runFeatureClose({ args, options, logger: commandLogger });
|
|
1255
|
+
} else if (command === 'feature:archive' || command === 'feature-archive') {
|
|
1256
|
+
result = await runFeatureArchive({ args, options, logger: commandLogger });
|
|
1257
|
+
} else if (command === 'dossier:init' || command === 'dossier-init') {
|
|
1258
|
+
result = await runDossierInit({ args, options, logger: commandLogger });
|
|
1259
|
+
} else if (command === 'dossier:show' || command === 'dossier-show') {
|
|
1260
|
+
result = await runDossierShow({ args, options, logger: commandLogger });
|
|
1261
|
+
} else if (command === 'dossier:add-finding' || command === 'dossier-add-finding') {
|
|
1262
|
+
result = await runDossierAddFinding({ args, options, logger: commandLogger });
|
|
1263
|
+
} else if (command === 'dossier:add-codemap' || command === 'dossier-add-codemap') {
|
|
1264
|
+
result = await runDossierAddCodemap({ args, options, logger: commandLogger });
|
|
1265
|
+
} else if (command === 'dossier:link-rule' || command === 'dossier-link-rule') {
|
|
1266
|
+
result = await runDossierLinkRule({ args, options, logger: commandLogger });
|
|
1267
|
+
} else if (command === 'dossier:compact' || command === 'dossier-compact') {
|
|
1268
|
+
result = await runDossierCompact({ args, options, logger: commandLogger });
|
|
1269
|
+
} else if (command === 'revision:open' || command === 'revision-open') {
|
|
1270
|
+
result = await runRevisionOpen({ args, options, logger: commandLogger });
|
|
1271
|
+
} else if (command === 'revision:list' || command === 'revision-list') {
|
|
1272
|
+
result = await runRevisionList({ args, options, logger: commandLogger });
|
|
1273
|
+
} else if (command === 'revision:resolve' || command === 'revision-resolve') {
|
|
1274
|
+
result = await runRevisionResolve({ args, options, logger: commandLogger });
|
|
1275
|
+
} else if (command === 'gate:check' || command === 'gate-check') {
|
|
1276
|
+
result = await runGateCheck({ args, options, logger: commandLogger });
|
|
1277
|
+
} else if (command === 'gate:approve' || command === 'gate-approve') {
|
|
1278
|
+
result = await runGateApprove({ args, options, logger: commandLogger });
|
|
1279
|
+
} else if (command === 'artifact:validate' || command === 'artifact-validate') {
|
|
1280
|
+
result = await runArtifactValidate({ args, options, logger: commandLogger });
|
|
1281
|
+
} else if (command === 'workflow:execute' || command === 'workflow-execute') {
|
|
1282
|
+
result = await runWorkflowExecute({ args, options, logger: commandLogger });
|
|
1283
|
+
} else if (command === 'runner:queue:from-plan' || command === 'runner-queue-from-plan') {
|
|
1284
|
+
result = await runRunnerQueueFromPlan({ args, options, logger: commandLogger });
|
|
1285
|
+
} else if (command === 'learning:auto-promote' || command === 'learning-auto-promote') {
|
|
1286
|
+
result = await runLearningAutoPromote({ args, options, logger: commandLogger });
|
|
1287
|
+
} else if (command === 'auth:login' || command === 'auth-login') {
|
|
1288
|
+
result = await runAuthLogin({ args, options, logger: commandLogger, t });
|
|
1289
|
+
} else if (command === 'auth:logout' || command === 'auth-logout') {
|
|
1290
|
+
result = await runAuthLogout({ args, options, logger: commandLogger, t });
|
|
1291
|
+
} else if (command === 'auth:status' || command === 'auth-status') {
|
|
1292
|
+
result = await runAuthStatus({ args, options, logger: commandLogger, t });
|
|
1293
|
+
} else if (command === 'workspace:init' || command === 'workspace-init') {
|
|
1294
|
+
result = await runWorkspaceInit({ args, options, logger: commandLogger, t });
|
|
1295
|
+
} else if (command === 'workspace:status' || command === 'workspace-status') {
|
|
1296
|
+
result = await runWorkspaceStatus({ args, options, logger: commandLogger, t });
|
|
1297
|
+
} else if (command === 'workspace:open' || command === 'workspace-open') {
|
|
1298
|
+
result = await runWorkspaceOpen({ args, options, logger: commandLogger, t });
|
|
1299
|
+
} else if (command === 'genome:publish' || command === 'genome-publish') {
|
|
1300
|
+
result = await runGenomePublish({ args, options, logger: commandLogger, t });
|
|
1301
|
+
} else if (command === 'genome:install' || command === 'genome-install') {
|
|
1302
|
+
result = await runGenomeInstall({ args, options, logger: commandLogger, t });
|
|
1303
|
+
} else if (command === 'genome:install:store' || command === 'genome-install-store') {
|
|
1304
|
+
result = await runGenomeInstallStore({ args, options, logger: commandLogger, t });
|
|
1305
|
+
} else if (command === 'genome:list' || command === 'genome-list') {
|
|
1306
|
+
result = await runGenomeList({ args, options, logger: commandLogger, t });
|
|
1307
|
+
} else if (command === 'genome:remove' || command === 'genome-remove') {
|
|
1308
|
+
result = await runGenomeRemove({ args, options, logger: commandLogger, t });
|
|
1309
|
+
} else if (command === 'compress:agents' || command === 'compress-agents') {
|
|
1310
|
+
result = await runCompressAgents({ args, options, logger: commandLogger });
|
|
1311
|
+
} else if (command === 'skill:publish' || command === 'skill-publish') {
|
|
1312
|
+
result = await runSkillPublish({ args, options, logger: commandLogger, t });
|
|
1313
|
+
} else if (command === 'squad:list' || command === 'squad-list') {
|
|
1314
|
+
result = await runSquadList({ args, options, logger: commandLogger, t });
|
|
1315
|
+
} else if (command === 'squad:publish' || command === 'squad-publish') {
|
|
1316
|
+
result = await runSquadPublish({ args, options, logger: commandLogger, t });
|
|
1317
|
+
} else if (command === 'squad:install' || command === 'squad-install') {
|
|
1318
|
+
result = await runSquadInstall({ args, options, logger: commandLogger, t });
|
|
1319
|
+
} else if (command === 'squad:grant' || command === 'squad-grant') {
|
|
1320
|
+
result = await runSquadGrant({ args, options, logger: commandLogger, t });
|
|
1321
|
+
} else if (command === 'system:package' || command === 'system-package') {
|
|
1322
|
+
result = await runSystemPackage({ args, options, logger: commandLogger, t });
|
|
1323
|
+
} else if (command === 'system:publish' || command === 'system-publish') {
|
|
1324
|
+
result = await runSystemPublish({ args, options, logger: commandLogger, t });
|
|
1325
|
+
} else if (command === 'system:list' || command === 'system-list') {
|
|
1326
|
+
result = await runSystemList({ args, options, logger: commandLogger, t });
|
|
1327
|
+
} else if (command === 'system:install' || command === 'system-install') {
|
|
1328
|
+
result = await runSystemInstall({ args, options, logger: commandLogger, t });
|
|
1329
|
+
} else if (command === 'briefing:approve' || command === 'briefing-approve') {
|
|
1330
|
+
result = await runBriefingApprove({ args, options, logger: commandLogger });
|
|
1331
|
+
} else if (command === 'briefing:unapprove' || command === 'briefing-unapprove') {
|
|
1332
|
+
result = await runBriefingUnapprove({ args, options, logger: commandLogger });
|
|
1333
|
+
} else {
|
|
1334
|
+
const message = t('cli.unknown_command', { command });
|
|
1335
|
+
if (jsonMode) {
|
|
1336
|
+
writeJson({
|
|
1337
|
+
ok: false,
|
|
1338
|
+
error: {
|
|
1339
|
+
code: 'unknown_command',
|
|
1340
|
+
message,
|
|
1341
|
+
command
|
|
1342
|
+
}
|
|
1343
|
+
});
|
|
1344
|
+
} else {
|
|
1345
|
+
logger.error(t('cli.unknown_command_line', { message }));
|
|
1346
|
+
printHelp(t, logger);
|
|
1347
|
+
}
|
|
1348
|
+
process.exitCode = 1;
|
|
1349
|
+
return;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
if (jsonMode && commandSupportsJson(command)) {
|
|
1353
|
+
writeJson(result || { ok: true });
|
|
1354
|
+
if (result && typeof result.exitCode === 'number') {
|
|
1355
|
+
process.exitCode = result.exitCode;
|
|
1356
|
+
} else if (result && Object.prototype.hasOwnProperty.call(result, 'ok') && !result.ok) {
|
|
1357
|
+
process.exitCode = 1;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
} catch (error) {
|
|
1361
|
+
if (jsonMode) {
|
|
1362
|
+
writeJson({
|
|
1363
|
+
ok: false,
|
|
1364
|
+
error: {
|
|
1365
|
+
code: 'command_error',
|
|
1366
|
+
message: error.message,
|
|
1367
|
+
command
|
|
1368
|
+
}
|
|
1369
|
+
});
|
|
1370
|
+
} else {
|
|
1371
|
+
logger.error(t('cli.error_prefix', { message: error.message }));
|
|
1372
|
+
}
|
|
1373
|
+
process.exitCode = 1;
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
main();
|