convoke-agents 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +920 -0
- package/INSTALLATION.md +230 -0
- package/LICENSE +21 -0
- package/README.md +330 -0
- package/UPDATE-GUIDE.md +220 -0
- package/_bmad/bme/_vortex/README.md +150 -0
- package/_bmad/bme/_vortex/agents/contextualization-expert.md +100 -0
- package/_bmad/bme/_vortex/agents/discovery-empathy-expert.md +117 -0
- package/_bmad/bme/_vortex/agents/hypothesis-engineer.md +117 -0
- package/_bmad/bme/_vortex/agents/lean-experiments-specialist.md +118 -0
- package/_bmad/bme/_vortex/agents/learning-decision-expert.md +117 -0
- package/_bmad/bme/_vortex/agents/production-intelligence-specialist.md +117 -0
- package/_bmad/bme/_vortex/agents/research-convergence-specialist.md +117 -0
- package/_bmad/bme/_vortex/compass-routing-reference.md +312 -0
- package/_bmad/bme/_vortex/config.yaml +46 -0
- package/_bmad/bme/_vortex/contracts/hc1-empathy-artifacts.md +152 -0
- package/_bmad/bme/_vortex/contracts/hc2-problem-definition.md +125 -0
- package/_bmad/bme/_vortex/contracts/hc3-hypothesis-contract.md +112 -0
- package/_bmad/bme/_vortex/contracts/hc4-experiment-context.md +140 -0
- package/_bmad/bme/_vortex/contracts/hc5-signal-report.md +130 -0
- package/_bmad/bme/_vortex/examples/hc2-example-problem-definition.md +85 -0
- package/_bmad/bme/_vortex/examples/hc3-example-hypothesis-contract.md +103 -0
- package/_bmad/bme/_vortex/examples/hc5-example-signal-report.md +76 -0
- package/_bmad/bme/_vortex/guides/EMMA-USER-GUIDE.md +232 -0
- package/_bmad/bme/_vortex/guides/ISLA-USER-GUIDE.md +208 -0
- package/_bmad/bme/_vortex/guides/LIAM-USER-GUIDE.md +255 -0
- package/_bmad/bme/_vortex/guides/MAX-USER-GUIDE.md +213 -0
- package/_bmad/bme/_vortex/guides/MILA-USER-GUIDE.md +235 -0
- package/_bmad/bme/_vortex/guides/NOAH-USER-GUIDE.md +258 -0
- package/_bmad/bme/_vortex/guides/WADE-USER-GUIDE.md +245 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/empathy-map.template.md +143 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-01-define-user.md +60 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-02-says-thinks.md +67 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-03-does-feels.md +79 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-04-pain-points.md +87 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-05-gains.md +103 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-06-synthesize.md +104 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/validate.md +117 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/workflow.md +44 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-01-define-requirements.md +85 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-02-user-flows.md +59 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-03-information-architecture.md +68 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-04-wireframe-sketch.md +97 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-05-components.md +128 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-06-synthesize.md +83 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/wireframe.template.md +287 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/workflow.md +44 -0
- package/_bmad/bme/_vortex/workflows/assumption-mapping/steps/step-01-setup.md +66 -0
- package/_bmad/bme/_vortex/workflows/assumption-mapping/steps/step-02-context.md +93 -0
- package/_bmad/bme/_vortex/workflows/assumption-mapping/steps/step-03-risk-mapping.md +103 -0
- package/_bmad/bme/_vortex/workflows/assumption-mapping/steps/step-04-synthesize.md +101 -0
- package/_bmad/bme/_vortex/workflows/assumption-mapping/workflow.md +49 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/steps/step-01-setup.md +81 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/steps/step-02-context.md +67 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/steps/step-03-classification.md +98 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/steps/step-04-evidence.md +100 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/steps/step-05-synthesize.md +174 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/workflow.md +52 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/contextualize-scope.template.md +67 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-01-list-opportunities.md +47 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-02-define-criteria.md +36 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-03-evaluate-opportunities.md +30 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-04-define-boundaries.md +32 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-05-validate-fit.md +28 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-06-synthesize.md +36 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/workflow.md +59 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/empathy-map.template.md +143 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-01-define-user.md +60 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-02-says-thinks.md +67 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-03-does-feels.md +79 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-04-pain-points.md +87 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-05-gains.md +103 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-06-synthesize.md +107 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/validate.md +117 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/workflow.md +45 -0
- package/_bmad/bme/_vortex/workflows/experiment-design/steps/step-01-setup.md +66 -0
- package/_bmad/bme/_vortex/workflows/experiment-design/steps/step-02-context.md +77 -0
- package/_bmad/bme/_vortex/workflows/experiment-design/steps/step-03-design.md +114 -0
- package/_bmad/bme/_vortex/workflows/experiment-design/steps/step-04-synthesize.md +128 -0
- package/_bmad/bme/_vortex/workflows/experiment-design/workflow.md +51 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/steps/step-01-setup.md +66 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/steps/step-02-context.md +80 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/steps/step-03-brainwriting.md +79 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/steps/step-04-assumption-mapping.md +102 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/steps/step-05-synthesize.md +130 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/workflow.md +52 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/lean-experiment.template.md +29 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-01-hypothesis.md +58 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-02-design.md +68 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-03-metrics.md +73 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-04-run.md +75 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-05-analyze.md +84 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-06-decide.md +111 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/workflow.md +26 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/lean-persona.template.md +163 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-01-define-job.md +72 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-02-current-solution.md +83 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-03-problem-contexts.md +90 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-04-forces-anxieties.md +98 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-05-success-criteria.md +103 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-06-synthesize.md +129 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/workflow.md +50 -0
- package/_bmad/bme/_vortex/workflows/learning-card/learning-card.template.md +179 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-01-experiment-context.md +100 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-02-raw-results.md +125 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-03-analysis.md +125 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-04-validated-learning.md +139 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-05-implications.md +134 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-06-synthesize.md +121 -0
- package/_bmad/bme/_vortex/workflows/learning-card/validate.md +134 -0
- package/_bmad/bme/_vortex/workflows/learning-card/workflow.md +51 -0
- package/_bmad/bme/_vortex/workflows/mvp/mvp.template.md +40 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-01-riskiest-assumption.md +17 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-02-success-criteria.md +13 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-03-smallest-test.md +13 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-04-scope-features.md +13 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-05-build-measure-learn.md +13 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-06-synthesize.md +28 -0
- package/_bmad/bme/_vortex/workflows/mvp/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/mvp/workflow.md +36 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/steps/step-01-setup.md +102 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/steps/step-02-context.md +81 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/steps/step-03-pattern-identification.md +88 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/steps/step-04-theme-clustering.md +100 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/steps/step-05-synthesize.md +135 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/workflow.md +58 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/pivot-patch-persevere.template.md +201 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-01-evidence-review.md +125 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-02-hypothesis-assessment.md +132 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-03-option-analysis.md +167 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-04-stakeholder-input.md +141 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-05-decision.md +161 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-06-action-plan.md +188 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/validate.md +159 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/workflow.md +51 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/steps/step-01-setup.md +97 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/steps/step-02-context.md +86 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/steps/step-03-jtbd-reframing.md +88 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/steps/step-04-pains-gains-revision.md +76 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/steps/step-05-synthesize.md +158 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/workflow.md +52 -0
- package/_bmad/bme/_vortex/workflows/product-vision/product-vision.template.md +147 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-01-define-problem.md +89 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-02-target-market.md +91 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-03-unique-approach.md +87 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-04-future-state.md +100 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-05-principles.md +92 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-06-synthesize.md +170 -0
- package/_bmad/bme/_vortex/workflows/product-vision/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/product-vision/workflow.md +55 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/steps/step-01-setup.md +84 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/steps/step-02-context.md +66 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/steps/step-03-monitoring.md +74 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/steps/step-04-prioritization.md +97 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/steps/step-05-synthesize.md +183 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/workflow.md +52 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/proof-of-concept.template.md +25 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-01-risk.md +79 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-02-scope.md +105 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-03-build.md +92 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-04-test.md +103 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-05-evaluate.md +114 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-06-document.md +125 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/workflow.md +26 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/proof-of-value.template.md +29 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-01-value-hypothesis.md +75 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-02-validation-design.md +94 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-03-willingness.md +96 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-04-test.md +107 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-05-analyze.md +116 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-06-document.md +147 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/workflow.md +26 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/steps/step-01-setup.md +69 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/steps/step-02-context.md +70 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/steps/step-03-jtbd-framing.md +81 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/steps/step-04-pains-gains.md +77 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/steps/step-05-synthesize.md +147 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/workflow.md +50 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/steps/step-01-setup.md +68 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/steps/step-02-context.md +67 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/steps/step-03-signal-analysis.md +85 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/steps/step-04-anomaly-detection.md +93 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/steps/step-05-synthesize.md +163 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/workflow.md +52 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-01-discovery-scope.md +77 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-02-research-methods.md +152 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-03-research-plan.md +159 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-04-execute.md +169 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-05-organize-data.md +149 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-06-synthesize.md +159 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/user-discovery.template.md +231 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/validate.md +153 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/workflow.md +45 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-01-research-goals.md +100 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-02-interview-script.md +123 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-03-recruitment.md +144 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-04-conduct.md +154 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-05-findings.md +163 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-06-synthesize.md +171 -0
- package/_bmad/bme/_vortex/workflows/user-interview/user-interview.template.md +250 -0
- package/_bmad/bme/_vortex/workflows/user-interview/validate.md +142 -0
- package/_bmad/bme/_vortex/workflows/user-interview/workflow.md +51 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-01-current-state.md +56 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-02-evidence-inventory.md +70 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-03-gap-analysis.md +76 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-04-stream-evaluation.md +57 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-05-recommendation.md +65 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-06-navigation-plan.md +72 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/validate.md +75 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/vortex-navigation.template.md +105 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/workflow.md +54 -0
- package/index.js +56 -0
- package/package.json +77 -0
- package/scripts/README.md +226 -0
- package/scripts/convoke-doctor.js +322 -0
- package/scripts/docs-audit.js +584 -0
- package/scripts/install-all-agents.js +9 -0
- package/scripts/install-vortex-agents.js +208 -0
- package/scripts/postinstall.js +104 -0
- package/scripts/update/convoke-migrate.js +169 -0
- package/scripts/update/convoke-update.js +272 -0
- package/scripts/update/convoke-version.js +134 -0
- package/scripts/update/lib/agent-registry.js +144 -0
- package/scripts/update/lib/backup-manager.js +243 -0
- package/scripts/update/lib/config-merger.js +242 -0
- package/scripts/update/lib/migration-runner.js +367 -0
- package/scripts/update/lib/refresh-installation.js +171 -0
- package/scripts/update/lib/utils.js +96 -0
- package/scripts/update/lib/validator.js +360 -0
- package/scripts/update/lib/version-detector.js +241 -0
- package/scripts/update/migrations/1.0.x-to-1.3.0.js +128 -0
- package/scripts/update/migrations/1.1.x-to-1.3.0.js +29 -0
- package/scripts/update/migrations/1.2.x-to-1.3.0.js +29 -0
- package/scripts/update/migrations/1.3.x-to-1.5.0.js +29 -0
- package/scripts/update/migrations/1.4.x-to-1.5.0.js +29 -0
- package/scripts/update/migrations/1.5.x-to-1.6.0.js +95 -0
- package/scripts/update/migrations/1.6.x-to-1.7.0.js +29 -0
- package/scripts/update/migrations/1.7.x-to-2.0.0.js +31 -0
- package/scripts/update/migrations/registry.js +194 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs-extra');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { refreshInstallation } = require('./update/lib/refresh-installation');
|
|
6
|
+
const { findProjectRoot } = require('./update/lib/utils');
|
|
7
|
+
const { AGENTS } = require('./update/lib/agent-registry');
|
|
8
|
+
|
|
9
|
+
const BOLD = '\x1b[1m';
|
|
10
|
+
const RESET = '\x1b[0m';
|
|
11
|
+
const GREEN = '\x1b[32m';
|
|
12
|
+
const CYAN = '\x1b[36m';
|
|
13
|
+
const YELLOW = '\x1b[33m';
|
|
14
|
+
const RED = '\x1b[31m';
|
|
15
|
+
const GREY = '\x1b[90m';
|
|
16
|
+
|
|
17
|
+
function printBanner() {
|
|
18
|
+
console.log('');
|
|
19
|
+
console.log(`${GREY} ██████╗ ██████╗ ███╗ ██╗██╗ ██╗ ██████╗ ██╗ ██╗███████╗${RESET}`);
|
|
20
|
+
console.log(`${GREY} ██╔════╝██╔═══██╗████╗ ██║██║ ██║██╔═══██╗██║ ██╔╝██╔════╝${RESET}`);
|
|
21
|
+
console.log(`${GREY} ██║ ██║ ██║██╔██╗ ██║██║ ██║██║ ██║█████╔╝ █████╗ ${RESET}`);
|
|
22
|
+
console.log(`${GREY} ██║ ██║ ██║██║╚██╗██║╚██╗ ██╔╝██║ ██║██╔═██╗ ██╔══╝ ${RESET}`);
|
|
23
|
+
console.log(`${GREY} ╚██████╗╚██████╔╝██║ ╚████║ ╚████╔╝ ╚██████╔╝██║ ██╗███████╗${RESET}`);
|
|
24
|
+
console.log(`${GREY} ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝${RESET}`);
|
|
25
|
+
console.log(`${GREY} Agent teams for complex systems${RESET}`);
|
|
26
|
+
console.log('');
|
|
27
|
+
console.log(`${BOLD} Domain-specialized agent teams | compatible with BMAD Method${RESET}`);
|
|
28
|
+
console.log('');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function checkPrerequisites(projectRoot) {
|
|
32
|
+
console.log(`${CYAN}[1/6]${RESET} Checking prerequisites...`);
|
|
33
|
+
|
|
34
|
+
const bmadDir = path.join(projectRoot, '_bmad');
|
|
35
|
+
|
|
36
|
+
// Create _bmad directory if it doesn't exist
|
|
37
|
+
if (!fs.existsSync(bmadDir)) {
|
|
38
|
+
console.log(`${YELLOW} ⚠${RESET} _bmad directory not found - creating it`);
|
|
39
|
+
fs.mkdirSync(bmadDir, { recursive: true });
|
|
40
|
+
} else {
|
|
41
|
+
console.log(`${GREEN} ✓${RESET} BMAD directory detected`);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Check for BMAD Method configuration (optional)
|
|
45
|
+
const bmadConfigPath = path.join(bmadDir, '_config', 'bmad.yaml');
|
|
46
|
+
if (fs.existsSync(bmadConfigPath)) {
|
|
47
|
+
console.log(`${GREEN} ✓${RESET} BMAD Method configuration found`);
|
|
48
|
+
} else {
|
|
49
|
+
console.log(`${YELLOW} ⚠${RESET} BMAD Method not detected (Convoke will install standalone)`);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
console.log(`${GREEN} ✓${RESET} Prerequisites met`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function archiveDeprecatedWorkflows(projectRoot) {
|
|
56
|
+
console.log(`${CYAN}[2/6]${RESET} Archiving deprecated workflows...`);
|
|
57
|
+
|
|
58
|
+
const sourceDir = path.join(__dirname, '..', '_bmad', 'bme', '_vortex');
|
|
59
|
+
const targetDir = path.join(projectRoot, '_bmad', 'bme', '_vortex');
|
|
60
|
+
|
|
61
|
+
// Only wireframe is deprecated now; empathy-map is live for Isla
|
|
62
|
+
const deprecatedWorkflows = ['wireframe'];
|
|
63
|
+
|
|
64
|
+
for (const workflow of deprecatedWorkflows) {
|
|
65
|
+
const workflowSourceDir = path.join(sourceDir, 'workflows', '_deprecated', workflow);
|
|
66
|
+
const workflowTargetDir = path.join(targetDir, 'workflows', '_deprecated', workflow);
|
|
67
|
+
|
|
68
|
+
if (fs.existsSync(workflowSourceDir)) {
|
|
69
|
+
fs.copySync(workflowSourceDir, workflowTargetDir);
|
|
70
|
+
console.log(`${GREEN} ✓${RESET} Archived ${workflow} to _deprecated/`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Legacy cleanup
|
|
75
|
+
cleanupLegacyFiles(projectRoot);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function cleanupLegacyFiles(projectRoot) {
|
|
79
|
+
console.log(`${CYAN} →${RESET} Cleaning up legacy files...`);
|
|
80
|
+
|
|
81
|
+
// Remove _designos directory (pre-Vortex structure) from all possible locations
|
|
82
|
+
const legacyPaths = [
|
|
83
|
+
path.join(projectRoot, '_bmad', 'bme', '_designos'),
|
|
84
|
+
path.join(projectRoot, '_bmad', '_designos'),
|
|
85
|
+
];
|
|
86
|
+
|
|
87
|
+
for (const legacyPath of legacyPaths) {
|
|
88
|
+
if (fs.existsSync(legacyPath)) {
|
|
89
|
+
fs.removeSync(legacyPath);
|
|
90
|
+
console.log(`${GREEN} ✓${RESET} Removed legacy directory: ${path.relative(projectRoot, legacyPath)}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
console.log(`${GREEN} ✓${RESET} Legacy cleanup complete`);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function csvEscape(value) {
|
|
98
|
+
return `"${String(value).replace(/"/g, '""')}"`;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function createAgentManifest(projectRoot) {
|
|
102
|
+
console.log(`${CYAN}[3/6]${RESET} Creating agent manifest...`);
|
|
103
|
+
|
|
104
|
+
const manifestPath = path.join(projectRoot, '_bmad', '_config', 'agent-manifest.csv');
|
|
105
|
+
fs.mkdirSync(path.dirname(manifestPath), { recursive: true });
|
|
106
|
+
|
|
107
|
+
const header = '"agent_id","name","title","icon","role","identity","communication_style","expertise","submodule","path"\n';
|
|
108
|
+
const rows = AGENTS.map(a => {
|
|
109
|
+
const p = a.persona;
|
|
110
|
+
return [
|
|
111
|
+
a.id, a.name, a.title, a.icon,
|
|
112
|
+
p.role, p.identity, p.communication_style, p.expertise,
|
|
113
|
+
'bme', `_bmad/bme/_vortex/agents/${a.id}.md`,
|
|
114
|
+
].map(csvEscape).join(',');
|
|
115
|
+
}).join('\n') + '\n';
|
|
116
|
+
|
|
117
|
+
fs.writeFileSync(manifestPath, header + rows);
|
|
118
|
+
console.log(`${GREEN} ✓${RESET} Created agent-manifest.csv`);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function createOutputDirectory(projectRoot) {
|
|
122
|
+
console.log(`${CYAN}[4/6]${RESET} Setting up output directory...`);
|
|
123
|
+
|
|
124
|
+
const outputDir = path.join(projectRoot, '_bmad-output', 'vortex-artifacts');
|
|
125
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
126
|
+
|
|
127
|
+
console.log(`${GREEN} ✓${RESET} Output directory ready`);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function verifyInstallation(projectRoot) {
|
|
131
|
+
console.log(`${CYAN}[6/6]${RESET} Verifying installation...`);
|
|
132
|
+
|
|
133
|
+
const checks = [
|
|
134
|
+
...AGENTS.map(a => ({ path: `_bmad/bme/_vortex/agents/${a.id}.md`, name: `${a.name} agent file` })),
|
|
135
|
+
{ path: '_bmad/bme/_vortex/config.yaml', name: 'Configuration file' },
|
|
136
|
+
];
|
|
137
|
+
|
|
138
|
+
let allChecksPass = true;
|
|
139
|
+
checks.forEach(check => {
|
|
140
|
+
const fullPath = path.join(projectRoot, check.path);
|
|
141
|
+
if (fs.existsSync(fullPath)) {
|
|
142
|
+
console.log(`${GREEN} ✓${RESET} ${check.name}`);
|
|
143
|
+
} else {
|
|
144
|
+
console.log(`${RED} ✗${RESET} ${check.name} - MISSING`);
|
|
145
|
+
allChecksPass = false;
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
if (!allChecksPass) {
|
|
150
|
+
console.log('');
|
|
151
|
+
console.error(`${RED}Installation verification failed. Some files are missing.${RESET}`);
|
|
152
|
+
process.exit(1);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
console.log(`${GREEN} ✓${RESET} All files installed successfully`);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function printSuccess() {
|
|
159
|
+
console.log('');
|
|
160
|
+
console.log(`${GREEN}${BOLD}╔════════════════════════════════════════════════════╗${RESET}`);
|
|
161
|
+
console.log(`${GREEN}${BOLD}║ ║${RESET}`);
|
|
162
|
+
console.log(`${GREEN}${BOLD}║ ✓ All Vortex Agents Installed! 🎉 ║${RESET}`);
|
|
163
|
+
console.log(`${GREEN}${BOLD}║ ║${RESET}`);
|
|
164
|
+
console.log(`${GREEN}${BOLD}╚════════════════════════════════════════════════════╝${RESET}`);
|
|
165
|
+
console.log('');
|
|
166
|
+
console.log(`${BOLD}Installed Agents:${RESET}`);
|
|
167
|
+
console.log('');
|
|
168
|
+
for (const agent of AGENTS) {
|
|
169
|
+
console.log(` ${GREEN}✓${RESET} ${agent.name} (${agent.id}) - ${agent.title} ${agent.icon}`);
|
|
170
|
+
}
|
|
171
|
+
console.log('');
|
|
172
|
+
console.log(`${BOLD}Next Steps:${RESET}`);
|
|
173
|
+
console.log('');
|
|
174
|
+
console.log(` ${YELLOW}1.${RESET} Personalize your config:`);
|
|
175
|
+
console.log(` Edit ${CYAN}_bmad/bme/_vortex/config.yaml${RESET} and replace ${YELLOW}{user}${RESET} with your name`);
|
|
176
|
+
console.log('');
|
|
177
|
+
console.log(` ${YELLOW}2.${RESET} Activate an agent by reading their file:`);
|
|
178
|
+
for (const agent of AGENTS) {
|
|
179
|
+
console.log(` ${CYAN}cat _bmad/bme/_vortex/agents/${agent.id}.md${RESET} (${agent.name})`);
|
|
180
|
+
}
|
|
181
|
+
console.log('');
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
async function main() {
|
|
185
|
+
try {
|
|
186
|
+
// Use findProjectRoot for existing projects, fall back to cwd for fresh installs
|
|
187
|
+
const projectRoot = findProjectRoot() || process.cwd();
|
|
188
|
+
|
|
189
|
+
printBanner();
|
|
190
|
+
checkPrerequisites(projectRoot);
|
|
191
|
+
archiveDeprecatedWorkflows(projectRoot);
|
|
192
|
+
createAgentManifest(projectRoot);
|
|
193
|
+
createOutputDirectory(projectRoot);
|
|
194
|
+
|
|
195
|
+
// Use refreshInstallation for agents, workflows, config, and user guides
|
|
196
|
+
console.log(`${CYAN}[5/6]${RESET} Installing agents, workflows, config, and guides...`);
|
|
197
|
+
await refreshInstallation(projectRoot, { backupGuides: false });
|
|
198
|
+
console.log(`${GREEN} ✓${RESET} Installation refreshed`);
|
|
199
|
+
|
|
200
|
+
verifyInstallation(projectRoot);
|
|
201
|
+
printSuccess();
|
|
202
|
+
} catch (error) {
|
|
203
|
+
console.error(`${RED}✗ Installation failed:${RESET}`, error.message);
|
|
204
|
+
process.exit(1);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
main();
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const { AGENTS } = require('./update/lib/agent-registry');
|
|
6
|
+
|
|
7
|
+
// Check if update system is available
|
|
8
|
+
const versionDetectorPath = path.join(__dirname, 'update/lib/version-detector.js');
|
|
9
|
+
const registryPath = path.join(__dirname, 'update/migrations/registry.js');
|
|
10
|
+
|
|
11
|
+
const hasUpdateSystem = fs.existsSync(versionDetectorPath) && fs.existsSync(registryPath);
|
|
12
|
+
|
|
13
|
+
// ANSI color codes
|
|
14
|
+
const BOLD = '\x1b[1m';
|
|
15
|
+
const RESET = '\x1b[0m';
|
|
16
|
+
const CYAN = '\x1b[36m';
|
|
17
|
+
const GREEN = '\x1b[32m';
|
|
18
|
+
const YELLOW = '\x1b[33m';
|
|
19
|
+
const RED = '\x1b[31m';
|
|
20
|
+
|
|
21
|
+
async function main() {
|
|
22
|
+
console.log('');
|
|
23
|
+
console.log(`${BOLD}Convoke installed!${RESET}`);
|
|
24
|
+
console.log('');
|
|
25
|
+
|
|
26
|
+
// If update system available, check for upgrades
|
|
27
|
+
if (hasUpdateSystem) {
|
|
28
|
+
const versionDetector = require('./update/lib/version-detector');
|
|
29
|
+
const registry = require('./update/migrations/registry');
|
|
30
|
+
|
|
31
|
+
const { findProjectRoot, compareVersions } = require('./update/lib/utils');
|
|
32
|
+
const projectRoot = findProjectRoot();
|
|
33
|
+
|
|
34
|
+
const currentVersion = versionDetector.getCurrentVersion(projectRoot);
|
|
35
|
+
const targetVersion = versionDetector.getTargetVersion();
|
|
36
|
+
const scenario = versionDetector.detectInstallationScenario(projectRoot);
|
|
37
|
+
|
|
38
|
+
// Fresh install
|
|
39
|
+
if (scenario === 'fresh' || !currentVersion) {
|
|
40
|
+
const agentNames = AGENTS.map(a => a.name).join(' + ');
|
|
41
|
+
console.log('To install agents into your project, run:');
|
|
42
|
+
console.log('');
|
|
43
|
+
console.log(` ${CYAN}npx convoke-install${RESET} - Install all agents (${agentNames})`);
|
|
44
|
+
console.log('');
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Already up to date
|
|
49
|
+
if (currentVersion === targetVersion) {
|
|
50
|
+
console.log(`${GREEN}✓ Convoke is up to date! (v${currentVersion})${RESET}`);
|
|
51
|
+
console.log('');
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Upgrade detected
|
|
56
|
+
if (compareVersions(currentVersion, targetVersion) < 0) {
|
|
57
|
+
console.log(`${YELLOW}${BOLD}⚠ UPGRADE DETECTED${RESET}`);
|
|
58
|
+
console.log('');
|
|
59
|
+
console.log(` Current version: ${RED}${currentVersion}${RESET}`);
|
|
60
|
+
console.log(` New version: ${GREEN}${targetVersion}${RESET}`);
|
|
61
|
+
console.log('');
|
|
62
|
+
|
|
63
|
+
// Check for breaking changes
|
|
64
|
+
const breakingChanges = registry.getBreakingChanges(currentVersion);
|
|
65
|
+
if (breakingChanges.length > 0) {
|
|
66
|
+
console.log(`${RED}${BOLD} ⚠ Breaking changes detected!${RESET}`);
|
|
67
|
+
console.log('');
|
|
68
|
+
console.log(' Breaking changes:');
|
|
69
|
+
breakingChanges.forEach(change => {
|
|
70
|
+
console.log(`${YELLOW} - ${change}${RESET}`);
|
|
71
|
+
});
|
|
72
|
+
console.log('');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
console.log('To preview changes without applying:');
|
|
76
|
+
console.log(` ${CYAN}npx convoke-update --dry-run${RESET}`);
|
|
77
|
+
console.log('');
|
|
78
|
+
console.log('To apply the update:');
|
|
79
|
+
console.log(` ${CYAN}npx convoke-update${RESET}`);
|
|
80
|
+
console.log('');
|
|
81
|
+
console.log(`${BOLD}Your data will be backed up automatically before any changes.${RESET}`);
|
|
82
|
+
console.log('');
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Downgrade (shouldn't happen normally)
|
|
87
|
+
if (compareVersions(currentVersion, targetVersion) > 0) {
|
|
88
|
+
console.log(`${YELLOW}Note: Package version (${targetVersion}) is older than installed version (${currentVersion})${RESET}`);
|
|
89
|
+
console.log('');
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
// Fallback to original message if update system not available
|
|
94
|
+
const agentNames = AGENTS.map(a => a.name).join(' + ');
|
|
95
|
+
console.log('To install agents into your project, run:');
|
|
96
|
+
console.log('');
|
|
97
|
+
console.log(` ${CYAN}npx convoke-install${RESET} - Install all agents (${agentNames})`);
|
|
98
|
+
console.log('');
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
main().catch(error => {
|
|
103
|
+
console.error('Error in postinstall:', error.message);
|
|
104
|
+
});
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const chalk = require('chalk');
|
|
4
|
+
const registry = require('./migrations/registry');
|
|
5
|
+
const backupManager = require('./lib/backup-manager');
|
|
6
|
+
const { refreshInstallation } = require('./lib/refresh-installation');
|
|
7
|
+
const { findProjectRoot } = require('./lib/utils');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Convoke Migrate CLI
|
|
11
|
+
* Manual migration control for advanced users
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
async function main() {
|
|
15
|
+
const args = process.argv.slice(2);
|
|
16
|
+
|
|
17
|
+
// Validate project root
|
|
18
|
+
const projectRoot = findProjectRoot();
|
|
19
|
+
if (!projectRoot) {
|
|
20
|
+
console.error('');
|
|
21
|
+
console.error(chalk.red('Not in a Convoke project. Could not find _bmad/ directory.'));
|
|
22
|
+
console.error('');
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// No args - show available migrations
|
|
27
|
+
if (args.length === 0) {
|
|
28
|
+
showAvailableMigrations();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const migrationName = args[0];
|
|
33
|
+
|
|
34
|
+
// Find migration
|
|
35
|
+
const migrations = registry.getAllMigrations();
|
|
36
|
+
const migration = migrations.find(m => m.name === migrationName);
|
|
37
|
+
|
|
38
|
+
if (!migration) {
|
|
39
|
+
console.error('');
|
|
40
|
+
console.error(chalk.red(`Migration '${migrationName}' not found.`));
|
|
41
|
+
console.error('');
|
|
42
|
+
console.error('Run ' + chalk.cyan('npx convoke-migrate') + ' to see available migrations.');
|
|
43
|
+
console.error('');
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Check if already applied
|
|
48
|
+
const configPath = require('path').join(projectRoot, '_bmad/bme/_vortex/config.yaml');
|
|
49
|
+
if (registry.hasMigrationBeenApplied(migrationName, configPath)) {
|
|
50
|
+
console.log('');
|
|
51
|
+
console.log(chalk.yellow(`Migration '${migrationName}' has already been applied.`));
|
|
52
|
+
console.log('');
|
|
53
|
+
process.exit(0);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Load migration module
|
|
57
|
+
if (!migration.module) {
|
|
58
|
+
try {
|
|
59
|
+
migration.module = require(`./migrations/${migration.name}`);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
console.error('');
|
|
62
|
+
console.error(chalk.red(`Failed to load migration: ${error.message}`));
|
|
63
|
+
console.error('');
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Run migration with backup and refresh
|
|
69
|
+
console.log('');
|
|
70
|
+
console.log(chalk.cyan.bold(`Running migration: ${migration.name}`));
|
|
71
|
+
console.log(chalk.gray(migration.description));
|
|
72
|
+
console.log('');
|
|
73
|
+
|
|
74
|
+
let backupMetadata = null;
|
|
75
|
+
|
|
76
|
+
try {
|
|
77
|
+
// Create backup before running delta
|
|
78
|
+
console.log(chalk.cyan('Creating backup...'));
|
|
79
|
+
backupMetadata = await backupManager.createBackup('manual', projectRoot);
|
|
80
|
+
console.log(chalk.green(`✓ Backup created: ${require('path').basename(backupMetadata.backup_dir)}`));
|
|
81
|
+
console.log('');
|
|
82
|
+
|
|
83
|
+
// Run the delta
|
|
84
|
+
const changes = await migration.module.apply(projectRoot);
|
|
85
|
+
|
|
86
|
+
console.log('');
|
|
87
|
+
console.log(chalk.green.bold('✓ Migration delta completed'));
|
|
88
|
+
console.log('');
|
|
89
|
+
console.log(chalk.cyan('Delta changes:'));
|
|
90
|
+
changes.forEach(change => {
|
|
91
|
+
console.log(chalk.gray(` - ${change}`));
|
|
92
|
+
});
|
|
93
|
+
console.log('');
|
|
94
|
+
|
|
95
|
+
// Refresh installation after delta
|
|
96
|
+
console.log(chalk.cyan('Refreshing installation files...'));
|
|
97
|
+
await refreshInstallation(projectRoot);
|
|
98
|
+
console.log(chalk.green('✓ Installation refreshed'));
|
|
99
|
+
console.log('');
|
|
100
|
+
|
|
101
|
+
} catch (error) {
|
|
102
|
+
console.error('');
|
|
103
|
+
console.error(chalk.red.bold('✗ Migration failed'));
|
|
104
|
+
console.error(chalk.red(error.message));
|
|
105
|
+
console.error('');
|
|
106
|
+
|
|
107
|
+
// Rollback if we have a backup
|
|
108
|
+
if (backupMetadata) {
|
|
109
|
+
console.log(chalk.yellow('Restoring from backup...'));
|
|
110
|
+
try {
|
|
111
|
+
await backupManager.restoreBackup(backupMetadata, projectRoot);
|
|
112
|
+
console.log(chalk.green('✓ Installation restored from backup'));
|
|
113
|
+
console.log('');
|
|
114
|
+
} catch (restoreError) {
|
|
115
|
+
console.error(chalk.red('✗ Restore failed!'));
|
|
116
|
+
console.error(chalk.red(restoreError.message));
|
|
117
|
+
console.error('');
|
|
118
|
+
console.error(chalk.yellow(`Manual restore may be needed from: ${backupMetadata.backup_dir}`));
|
|
119
|
+
console.error('');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (error.stack) {
|
|
124
|
+
console.error(chalk.gray(error.stack));
|
|
125
|
+
console.error('');
|
|
126
|
+
}
|
|
127
|
+
process.exit(1);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Show available migrations
|
|
133
|
+
*/
|
|
134
|
+
function showAvailableMigrations() {
|
|
135
|
+
const migrations = registry.getAllMigrations();
|
|
136
|
+
|
|
137
|
+
console.log('');
|
|
138
|
+
console.log(chalk.bold('Available Migrations'));
|
|
139
|
+
console.log('');
|
|
140
|
+
|
|
141
|
+
if (migrations.length === 0) {
|
|
142
|
+
console.log(chalk.yellow('No migrations available'));
|
|
143
|
+
console.log('');
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
migrations.forEach((m, index) => {
|
|
148
|
+
const breaking = m.breaking ? chalk.red('[BREAKING]') : chalk.green('[SAFE]');
|
|
149
|
+
console.log(` ${index + 1}. ${chalk.cyan(m.name)} ${breaking}`);
|
|
150
|
+
console.log(` ${chalk.gray(m.description)}`);
|
|
151
|
+
console.log(` ${chalk.gray(`From: ${m.fromVersion}`)}`);
|
|
152
|
+
console.log('');
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
console.log('Usage: ' + chalk.cyan('npx convoke-migrate <migration-name>'));
|
|
156
|
+
console.log('');
|
|
157
|
+
console.log(chalk.yellow('Warning: Manual migrations bypass safety checks.'));
|
|
158
|
+
console.log(chalk.yellow(' Use ' + chalk.cyan('npx convoke-update') + ' for normal updates.'));
|
|
159
|
+
console.log('');
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Run main
|
|
163
|
+
main().catch(error => {
|
|
164
|
+
console.error('');
|
|
165
|
+
console.error(chalk.red('Unexpected error:'));
|
|
166
|
+
console.error(chalk.red(error.message));
|
|
167
|
+
console.error('');
|
|
168
|
+
process.exit(1);
|
|
169
|
+
});
|