Skip to content

Commit 84cebbd

Browse files
authored
feat(enterprise): add Pro upgrade pipeline (#704)
* feat(enterprise): add pro upgrade pipeline [PEM] * fix(enterprise): address upgrade review findings [PEM]
1 parent 106bb34 commit 84cebbd

15 files changed

Lines changed: 2805 additions & 0 deletions

bin/aiox.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ USAGE:
7575
npx aiox-core@latest info # Show system info
7676
npx aiox-core@latest doctor # Run diagnostics
7777
aiox-delegate codex -t <slug> # Delegate implementation to external executor
78+
npx aiox-core@latest enterprise upgrade --target . --dry-run --enterprise-source <path>
79+
# Plan Pro to Enterprise upgrade
7880
npx aiox-core@latest --version # Show version
7981
npx aiox-core@latest --version -d # Show detailed version info
8082
npx aiox-core@latest --help # Show this help
@@ -110,6 +112,10 @@ EXTERNAL EXECUTION:
110112
aiox-delegate codex -t story-4.3 -f prompt.md
111113
aiox-delegate codex -t story-4.3 -p "Implement AC1" --dry-run
112114
115+
ENTERPRISE:
116+
aiox enterprise upgrade --target . --enterprise-source /path/to/AIOX-enterprise --dry-run
117+
aiox enterprise upgrade --target . --enterprise-source /path/to/AIOX-enterprise --dry-run --plan outputs/enterprise-upgrade-plan.yaml
118+
113119
EXAMPLES:
114120
# Install in current directory
115121
npx aiox-core@latest
@@ -415,6 +421,35 @@ async function runDoctor(options = {}) {
415421
}
416422
}
417423

424+
// Helper: Run Enterprise commands
425+
async function runEnterprise() {
426+
const enterpriseArgs = args.slice(1);
427+
const enterprisePath = path.join(
428+
__dirname,
429+
'..',
430+
'packages',
431+
'installer',
432+
'src',
433+
'enterprise',
434+
'enterprise-upgrade-plan.js',
435+
);
436+
437+
try {
438+
const { runEnterpriseUpgradeCli } = require(enterprisePath);
439+
const exitCode = await runEnterpriseUpgradeCli(enterpriseArgs, {
440+
stdout: process.stdout,
441+
stderr: process.stderr,
442+
});
443+
444+
if (exitCode !== 0) {
445+
process.exit(exitCode);
446+
}
447+
} catch (error) {
448+
console.error(`❌ Enterprise command error: ${error.message}`);
449+
process.exit(1);
450+
}
451+
}
452+
418453
// Helper: Format bytes to human readable
419454
function formatBytes(bytes) {
420455
if (bytes === 0) return '0 Bytes';
@@ -884,6 +919,11 @@ async function main() {
884919
}
885920
break;
886921

922+
case 'enterprise':
923+
// AIOX Enterprise Upgrade Planning - Story PEM.1
924+
await runEnterprise();
925+
break;
926+
887927
case 'install': {
888928
// Install in current project with flag support
889929
const installArgs = args.slice(1);

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@
5050
],
5151
"exports": {
5252
"./installer/aiox-core-installer": "./packages/installer/src/installer/aiox-core-installer.js",
53+
"./installer/enterprise-detector": "./packages/installer/src/enterprise/enterprise-detector.js",
54+
"./installer/enterprise-errors": "./packages/installer/src/enterprise/enterprise-errors.js",
55+
"./installer/enterprise-manifest-loader": "./packages/installer/src/enterprise/enterprise-manifest-loader.js",
56+
"./installer/enterprise-rollback": "./packages/installer/src/enterprise/enterprise-rollback.js",
57+
"./installer/enterprise-upgrader": "./packages/installer/src/enterprise/enterprise-upgrader.js",
58+
"./installer/enterprise-upgrade-plan": "./packages/installer/src/enterprise/enterprise-upgrade-plan.js",
5359
"./installer/pro-scaffolder": "./packages/installer/src/pro/pro-scaffolder.js",
5460
"./package.json": "./package.json"
5561
},
@@ -60,6 +66,7 @@
6066
"test:watch": "jest --watch",
6167
"test:coverage": "jest --coverage",
6268
"test:e2e:installed-skills": "node scripts/e2e/installed-skills-smoke.js",
69+
"test:e2e:pro-enterprise-upgrade": "node scripts/e2e/pro-to-enterprise-upgrade-smoke.js",
6370
"test:health-check": "mocha tests/health-check/**/*.test.js --timeout 30000",
6471
"lint": "eslint . --cache --cache-location .eslintcache",
6572
"typecheck": "tsc --noEmit",

0 commit comments

Comments
 (0)