aiox-core 5.0.7 → 5.0.8
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/.aiox-core/cli/commands/pro/buyer.js +379 -0
- package/.aiox-core/cli/commands/pro/index.js +191 -52
- package/.aiox-core/cli/commands/validate/index.js +2 -0
- package/.aiox-core/core/code-intel/helpers/dev-helper.js +1 -1
- package/.aiox-core/core/code-intel/helpers/devops-helper.js +0 -1
- package/.aiox-core/core/code-intel/helpers/planning-helper.js +1 -1
- package/.aiox-core/core/code-intel/helpers/qa-helper.js +2 -2
- package/.aiox-core/core/config/schemas/framework-config.schema.json +1 -0
- package/.aiox-core/core/config/template-overrides.js +1 -1
- package/.aiox-core/core/doctor/checks/ide-sync.js +81 -25
- package/.aiox-core/core/doctor/checks/rules-files.js +0 -1
- package/.aiox-core/core/doctor/checks/skills-count.js +83 -15
- package/.aiox-core/core/graph-dashboard/cli.js +1 -2
- package/.aiox-core/core/graph-dashboard/data-sources/code-intel-source.js +1 -1
- package/.aiox-core/core/ids/layer-classifier.js +1 -1
- package/.aiox-core/core/pro/pro-updater.js +578 -0
- package/.aiox-core/core/synapse/context/context-tracker.js +107 -9
- package/.aiox-core/core/synapse/layers/layer-processor.js +1 -1
- package/.aiox-core/core-config.yaml +15 -1
- package/.aiox-core/data/capability-detection.js +15 -15
- package/.aiox-core/data/entity-registry.yaml +18 -2
- package/.aiox-core/data/registry-update-log.jsonl +5 -0
- package/.aiox-core/data/tok3-token-comparison.js +0 -4
- package/.aiox-core/data/tool-search-validation.js +1 -1
- package/.aiox-core/development/agents/aiox-master.md +44 -6
- package/.aiox-core/development/agents/data-engineer.md +4 -4
- package/.aiox-core/development/agents/devops.md +52 -2
- package/.aiox-core/development/agents/po.md +1 -1
- package/.aiox-core/development/agents/qa.md +5 -11
- package/.aiox-core/development/agents/sm.md +3 -3
- package/.aiox-core/development/agents/ux-design-expert.md +1 -1
- package/.aiox-core/development/scripts/unified-activation-pipeline.js +29 -3
- package/.aiox-core/development/tasks/dev-develop-story.md +46 -7
- package/.aiox-core/development/tasks/devops-pro-access-grant.md +93 -0
- package/.aiox-core/development/tasks/devops-pro-activate.md +42 -0
- package/.aiox-core/development/tasks/devops-pro-check-access.md +34 -0
- package/.aiox-core/development/tasks/devops-pro-request-reset.md +34 -0
- package/.aiox-core/development/tasks/devops-pro-resend-verification.md +32 -0
- package/.aiox-core/development/tasks/devops-pro-reset-password.md +36 -0
- package/.aiox-core/development/tasks/devops-pro-validate-login.md +36 -0
- package/.aiox-core/development/tasks/devops-pro-verify-status.md +33 -0
- package/.aiox-core/development/tasks/qa-gate.md +54 -4
- package/.aiox-core/development/tasks/validate-next-story.md +39 -2
- package/.aiox-core/framework-config.yaml +1 -0
- package/.aiox-core/infrastructure/scripts/codex-skills-sync/README.md +69 -0
- package/.aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js +727 -0
- package/.aiox-core/infrastructure/scripts/codex-skills-sync/index.js +10 -0
- package/.aiox-core/infrastructure/scripts/codex-skills-sync/validate.js +65 -4
- package/.aiox-core/infrastructure/scripts/generate-settings-json.js +29 -4
- package/.aiox-core/infrastructure/scripts/ide-sync/agent-parser.js +4 -0
- package/.aiox-core/infrastructure/scripts/ide-sync/index.js +67 -7
- package/.aiox-core/infrastructure/scripts/ide-sync/transformers/claude-code.js +145 -3
- package/.aiox-core/infrastructure/scripts/repair-agent-references.js +263 -0
- package/.aiox-core/infrastructure/scripts/validate-claude-integration.js +60 -8
- package/.aiox-core/infrastructure/scripts/validate-paths.js +13 -0
- package/.aiox-core/install-manifest.yaml +134 -82
- package/.aiox-core/utils/filters/index.js +2 -1
- package/.claude/commands/AIOX/agents/aiox-master.md +21 -0
- package/.claude/commands/AIOX/agents/analyst.md +21 -0
- package/.claude/commands/AIOX/agents/architect.md +21 -0
- package/.claude/commands/AIOX/agents/data-engineer.md +21 -0
- package/.claude/commands/AIOX/agents/dev.md +21 -0
- package/.claude/commands/AIOX/agents/devops.md +21 -0
- package/.claude/commands/AIOX/agents/pm.md +21 -0
- package/.claude/commands/AIOX/agents/po.md +21 -0
- package/.claude/commands/AIOX/agents/qa.md +21 -0
- package/.claude/commands/AIOX/agents/sm.md +21 -0
- package/.claude/commands/AIOX/agents/squad-creator.md +21 -0
- package/.claude/commands/AIOX/agents/ux-design-expert.md +21 -0
- package/.claude/commands/AIOX/scripts/agent-config-loader.js +624 -0
- package/.claude/commands/AIOX/scripts/generate-greeting.js +160 -0
- package/.claude/commands/AIOX/scripts/greeting-builder.js +866 -0
- package/.claude/commands/AIOX/scripts/session-context-loader.js +286 -0
- package/.claude/commands/AIOX/stories/story-6.1.4.md +1404 -0
- package/.claude/commands/cohort-squad/agents/cohort-manager.md +156 -0
- package/.claude/commands/design-system/agents/brad-frost.md +1097 -0
- package/.claude/commands/design-system/agents/dan-mall.md +857 -0
- package/.claude/commands/design-system/agents/dave-malouf.md +2272 -0
- package/.claude/commands/design-system/agents/design-chief.md +102 -0
- package/.claude/commands/design-system/agents/nano-banana-generator.md +162 -0
- package/.claude/commands/greet.md +101 -0
- package/.claude/commands/synapse/manager.md +75 -0
- package/.claude/commands/synapse/tasks/add-rule.md +94 -0
- package/.claude/commands/synapse/tasks/create-command.md +109 -0
- package/.claude/commands/synapse/tasks/create-domain.md +127 -0
- package/.claude/commands/synapse/tasks/diagnose-synapse.md +245 -0
- package/.claude/commands/synapse/tasks/edit-rule.md +109 -0
- package/.claude/commands/synapse/tasks/suggest-domain.md +116 -0
- package/.claude/commands/synapse/tasks/toggle-domain.md +83 -0
- package/.claude/commands/synapse/templates/domain-template +8 -0
- package/.claude/commands/synapse/templates/manifest-entry-template +4 -0
- package/.claude/commands/synapse/utils/manifest-parser-reference.md +134 -0
- package/.claude/hooks/precompact-session-digest.cjs +2 -2
- package/.claude/skills/AIOX/agents/aiox-master/SKILL.md +511 -0
- package/.claude/skills/AIOX/agents/analyst/SKILL.md +281 -0
- package/.claude/skills/AIOX/agents/architect/SKILL.md +482 -0
- package/.claude/skills/AIOX/agents/data-engineer/SKILL.md +503 -0
- package/.claude/skills/AIOX/agents/dev/SKILL.md +568 -0
- package/.claude/skills/AIOX/agents/devops/SKILL.md +597 -0
- package/.claude/skills/AIOX/agents/pm/SKILL.md +385 -0
- package/.claude/skills/AIOX/agents/po/SKILL.md +343 -0
- package/.claude/skills/AIOX/agents/qa/SKILL.md +451 -0
- package/.claude/skills/AIOX/agents/sm/SKILL.md +295 -0
- package/.claude/skills/AIOX/agents/squad-creator/SKILL.md +352 -0
- package/.claude/skills/AIOX/agents/ux-design-expert/SKILL.md +503 -0
- package/.claude/skills/architect-first/SKILL.md +275 -0
- package/.claude/skills/architect-first/assets/architecture-template.md +505 -0
- package/.claude/skills/architect-first/assets/config-template.yaml +351 -0
- package/.claude/skills/architect-first/references/architecture-checklist.md +216 -0
- package/.claude/skills/architect-first/references/pre-implementation-checklist.md +119 -0
- package/.claude/skills/architect-first/references/stop-rules-guide.md +291 -0
- package/.claude/skills/architect-first/references/testing-strategy-guide.md +477 -0
- package/.claude/skills/architect-first/scripts/architecture_validator.py +490 -0
- package/.claude/skills/architect-first/scripts/check_coupling.py +306 -0
- package/.claude/skills/architect-first/scripts/validate_risk_mitigation.py +382 -0
- package/.claude/skills/checklist-runner/SKILL.md +113 -0
- package/.claude/skills/clone-mind.md +329 -0
- package/.claude/skills/coderabbit-review/SKILL.md +106 -0
- package/.claude/skills/course-generation-workflow.md +76 -0
- package/.claude/skills/enhance-workflow.md +466 -0
- package/.claude/skills/mcp-builder/LICENSE.txt +202 -0
- package/.claude/skills/mcp-builder/SKILL.md +328 -0
- package/.claude/skills/mcp-builder/reference/evaluation.md +602 -0
- package/.claude/skills/mcp-builder/reference/mcp_best_practices.md +915 -0
- package/.claude/skills/mcp-builder/reference/node_mcp_server.md +916 -0
- package/.claude/skills/mcp-builder/reference/python_mcp_server.md +752 -0
- package/.claude/skills/mcp-builder/scripts/connections.py +151 -0
- package/.claude/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/.claude/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/.claude/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/.claude/skills/ralph.md +181 -0
- package/.claude/skills/skill-creator/LICENSE.txt +202 -0
- package/.claude/skills/skill-creator/SKILL.md +209 -0
- package/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/.claude/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/.claude/skills/squad.md +301 -0
- package/.claude/skills/synapse/SKILL.md +132 -0
- package/.claude/skills/synapse/assets/README.md +50 -0
- package/.claude/skills/synapse/references/brackets.md +100 -0
- package/.claude/skills/synapse/references/commands.md +118 -0
- package/.claude/skills/synapse/references/domains.md +126 -0
- package/.claude/skills/synapse/references/layers.md +186 -0
- package/.claude/skills/synapse/references/manifest.md +142 -0
- package/.claude/skills/tech-search/SKILL.md +431 -0
- package/.claude/skills/tech-search/prompts/page-extract.md +133 -0
- package/README.en.md +2 -2
- package/README.md +8 -2
- package/bin/aiox.js +55 -4
- package/bin/utils/framework-guard.js +4 -2
- package/bin/utils/pro-detector.js +119 -28
- package/bin/utils/validate-publish.js +6 -6
- package/docs/aiox-agent-flows/devops-system.md +18 -0
- package/docs/aiox-workflows/README.md +1 -0
- package/docs/aiox-workflows/pro-access-grant-workflow.md +218 -0
- package/docs/guides/pro/access-grant-ops-playbook.md +370 -0
- package/docs/guides/pro/install-gate-setup.md +12 -6
- package/docs/guides/pro/squad-creator-handoff-pro-access-ops.md +134 -0
- package/docs/guides/supabase-ops-handoff.md +768 -0
- package/package.json +12 -1
- package/packages/aiox-pro-cli/bin/aiox-pro.js +33 -12
- package/packages/installer/src/config/configure-environment.js +118 -50
- package/packages/installer/src/installer/aiox-core-installer.js +124 -27
- package/packages/installer/src/installer/brownfield-upgrader.js +66 -9
- package/packages/installer/src/installer/dependency-installer.js +4 -0
- package/packages/installer/src/pro/pro-scaffolder.js +5 -5
- package/packages/installer/src/updater/index.js +151 -10
- package/packages/installer/src/wizard/ide-config-generator.js +73 -7
- package/packages/installer/src/wizard/index.js +119 -31
- package/packages/installer/src/wizard/pro-setup.js +118 -47
- package/packages/installer/src/wizard/validation/validators/dependency-validator.js +32 -25
- package/packages/installer/src/wizard/validation/validators/file-structure-validator.js +26 -0
- package/packages/installer/tests/unit/artifact-copy-pipeline/artifact-copy-pipeline.test.js +84 -1
- package/packages/installer/tests/unit/claude-md-template-v5/claude-md-template-v5.test.js +1 -1
- package/packages/installer/tests/unit/doctor/doctor-checks.test.js +85 -19
- package/packages/installer/tests/unit/entity-registry-bootstrap.test.js +4 -4
- package/packages/installer/tests/unit/generate-settings-json/generate-settings-json.test.js +5 -5
- package/packages/installer/tests/unit/ide-sync-integration/ide-sync-integration.test.js +4 -4
- package/packages/installer/tests/unit/merger/yaml-merger.test.js +11 -11
- package/pro/README.md +12 -1
- package/pro/license/index.js +3 -11
- package/pro/license/license-api.js +25 -0
- package/pro/license/license-cache.js +135 -31
- package/pro/license/license-crypto.js +59 -3
- package/pro/package.json +5 -4
- package/pro/squads/README.md +16 -16
- package/pro/squads/index.js +1 -1
- package/scripts/e2e/installed-skills-smoke.js +264 -0
- package/scripts/package-synapse.js +3 -3
- package/scripts/validate-package-completeness.js +8 -11
- package/.aiox-core/lib/build.json +0 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* aiox pro deactivate Deactivate the current license
|
|
10
10
|
* aiox pro features List all pro features
|
|
11
11
|
* aiox pro validate Force online revalidation
|
|
12
|
-
* aiox pro setup
|
|
12
|
+
* aiox pro setup Install or verify the AIOX Pro package
|
|
13
13
|
*
|
|
14
14
|
* @module cli/commands/pro
|
|
15
15
|
* @version 1.1.0
|
|
@@ -22,10 +22,11 @@ const { Command } = require('commander');
|
|
|
22
22
|
const path = require('path');
|
|
23
23
|
const fs = require('fs');
|
|
24
24
|
const readline = require('readline');
|
|
25
|
+
const { createBuyerCommand } = require('./buyer');
|
|
25
26
|
|
|
26
27
|
// BUG-6 fix (INS-1): Dynamic licensePath resolution
|
|
27
28
|
// In framework-dev: __dirname = aiox-core/.aiox-core/cli/commands/pro → ../../../../pro/license
|
|
28
|
-
// In project-dev: pro is installed via npm as @aiox-
|
|
29
|
+
// In project-dev: pro is installed via npm as @aiox-squads/pro or a legacy scope.
|
|
29
30
|
function resolveLicensePath() {
|
|
30
31
|
// 1. Try relative path (framework-dev mode)
|
|
31
32
|
const relativePath = path.resolve(__dirname, '..', '..', '..', '..', 'pro', 'license');
|
|
@@ -33,23 +34,38 @@ function resolveLicensePath() {
|
|
|
33
34
|
return relativePath;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
// 2. Try
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
// 2. Try npm packages — canonical then fallback
|
|
38
|
+
const npmCandidates = [
|
|
39
|
+
'@aiox-squads/pro',
|
|
40
|
+
'@aiox-fullstack/pro',
|
|
41
|
+
'@aios-fullstack/pro',
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
for (const pkgName of npmCandidates) {
|
|
45
|
+
try {
|
|
46
|
+
const proPkg = require.resolve(`${pkgName}/package.json`);
|
|
47
|
+
const proDir = path.dirname(proPkg);
|
|
48
|
+
const npmPath = path.join(proDir, 'license');
|
|
49
|
+
if (fs.existsSync(npmPath)) {
|
|
50
|
+
return npmPath;
|
|
51
|
+
}
|
|
52
|
+
} catch {
|
|
53
|
+
// package not installed
|
|
43
54
|
}
|
|
44
|
-
} catch {
|
|
45
|
-
// @aiox-fullstack/pro not installed via npm
|
|
46
55
|
}
|
|
47
56
|
|
|
48
|
-
// 3. Try project root node_modules (
|
|
57
|
+
// 3. Try project root node_modules (both scopes)
|
|
49
58
|
const projectRoot = process.cwd();
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
const scopePaths = [
|
|
60
|
+
path.join(projectRoot, 'node_modules', '@aiox-squads', 'pro', 'license'),
|
|
61
|
+
path.join(projectRoot, 'node_modules', '@aiox-fullstack', 'pro', 'license'),
|
|
62
|
+
path.join(projectRoot, 'node_modules', '@aios-fullstack', 'pro', 'license'),
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
for (const cwdPath of scopePaths) {
|
|
66
|
+
if (fs.existsSync(cwdPath)) {
|
|
67
|
+
return cwdPath;
|
|
68
|
+
}
|
|
53
69
|
}
|
|
54
70
|
|
|
55
71
|
// Return relative path as default (will fail gracefully in loadLicenseModules)
|
|
@@ -97,7 +113,8 @@ function loadLicenseModules() {
|
|
|
97
113
|
};
|
|
98
114
|
} catch (error) {
|
|
99
115
|
console.error('AIOX Pro license module not available.');
|
|
100
|
-
console.error('Install AIOX Pro:
|
|
116
|
+
console.error('Install AIOX Pro: aiox pro setup');
|
|
117
|
+
console.error('Or via wrapper: npx aiox-pro install');
|
|
101
118
|
process.exit(1);
|
|
102
119
|
}
|
|
103
120
|
}
|
|
@@ -217,9 +234,13 @@ async function activateAction(options) {
|
|
|
217
234
|
// Scaffold pro content into project (Story INS-3.1)
|
|
218
235
|
// Lazy-load to avoid crashing if pro-scaffolder or js-yaml is unavailable
|
|
219
236
|
const projectRoot = path.resolve(__dirname, '..', '..', '..', '..');
|
|
220
|
-
|
|
237
|
+
// Try canonical then fallback package path
|
|
238
|
+
const proSourceDir = [
|
|
239
|
+
path.join(projectRoot, 'node_modules', '@aiox-fullstack', 'pro'),
|
|
240
|
+
path.join(projectRoot, 'node_modules', '@aios-fullstack', 'pro'),
|
|
241
|
+
].find(p => fs.existsSync(p));
|
|
221
242
|
|
|
222
|
-
if (
|
|
243
|
+
if (proSourceDir) {
|
|
223
244
|
let scaffoldProContent;
|
|
224
245
|
try {
|
|
225
246
|
({ scaffoldProContent } = require('../../../../packages/installer/src/pro/pro-scaffolder'));
|
|
@@ -261,7 +282,7 @@ async function activateAction(options) {
|
|
|
261
282
|
console.log('');
|
|
262
283
|
}
|
|
263
284
|
} else {
|
|
264
|
-
console.log('Note:
|
|
285
|
+
console.log('Note: AIOX Pro package not found in node_modules.');
|
|
265
286
|
console.log('Pro content will be scaffolded when the package is installed.');
|
|
266
287
|
console.log('');
|
|
267
288
|
}
|
|
@@ -571,64 +592,108 @@ async function validateAction() {
|
|
|
571
592
|
// ---------------------------------------------------------------------------
|
|
572
593
|
|
|
573
594
|
/**
|
|
574
|
-
* Setup and verify
|
|
595
|
+
* Setup and verify AIOX Pro installation.
|
|
575
596
|
*
|
|
576
|
-
*
|
|
577
|
-
* no special token or .npmrc configuration is needed. This command
|
|
578
|
-
* installs the package and verifies it's working.
|
|
597
|
+
* Tries canonical @aiox-squads/pro first, then legacy fallbacks.
|
|
579
598
|
*
|
|
580
599
|
* @param {object} options - Command options
|
|
581
600
|
* @param {boolean} options.verify - Only verify without installing
|
|
582
601
|
*/
|
|
583
602
|
async function setupAction(options) {
|
|
603
|
+
const PRO_PACKAGES = ['@aiox-squads/pro', '@aiox-fullstack/pro', '@aios-fullstack/pro'];
|
|
604
|
+
|
|
584
605
|
console.log('\nAIOX Pro - Setup\n');
|
|
585
606
|
|
|
586
607
|
if (options.verify) {
|
|
587
|
-
|
|
588
|
-
console.log('Verifying @aiox-fullstack/pro installation...\n');
|
|
608
|
+
console.log('Verifying AIOX Pro installation...\n');
|
|
589
609
|
|
|
590
610
|
try {
|
|
591
611
|
const { execSync } = require('child_process');
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
612
|
+
let found = false;
|
|
613
|
+
for (const pkg of PRO_PACKAGES) {
|
|
614
|
+
try {
|
|
615
|
+
const result = execSync(`npm ls ${pkg} --json`, { stdio: 'pipe', timeout: 15000 });
|
|
616
|
+
const parsed = JSON.parse(result.toString());
|
|
617
|
+
const deps = parsed.dependencies || {};
|
|
618
|
+
if (deps[pkg]) {
|
|
619
|
+
console.log(`✅ ${pkg}@${deps[pkg].version} is installed`);
|
|
620
|
+
found = true;
|
|
621
|
+
break;
|
|
622
|
+
}
|
|
623
|
+
} catch { /* try next */ }
|
|
624
|
+
}
|
|
625
|
+
if (!found) {
|
|
626
|
+
console.log('❌ AIOX Pro is not installed');
|
|
602
627
|
console.log('');
|
|
603
628
|
console.log('Install with:');
|
|
604
|
-
console.log('
|
|
629
|
+
console.log(' aiox pro setup');
|
|
630
|
+
console.log(' # or npx aiox-pro install');
|
|
605
631
|
}
|
|
606
632
|
} catch {
|
|
607
|
-
console.log('❌
|
|
633
|
+
console.log('❌ AIOX Pro is not installed');
|
|
608
634
|
console.log('');
|
|
609
635
|
console.log('Install with:');
|
|
610
|
-
console.log('
|
|
636
|
+
console.log(' aiox pro setup');
|
|
637
|
+
console.log(' # or npx aiox-pro install');
|
|
611
638
|
}
|
|
612
639
|
return;
|
|
613
640
|
}
|
|
614
641
|
|
|
615
|
-
// Install mode
|
|
616
|
-
console.log('
|
|
642
|
+
// Install mode — try canonical first, fallback second
|
|
643
|
+
console.log('AIOX Pro is available on the public npm registry.');
|
|
617
644
|
console.log('No special tokens or configuration needed.\n');
|
|
618
645
|
|
|
619
|
-
|
|
646
|
+
const { execSync } = require('child_process');
|
|
647
|
+
let installedPackage = null;
|
|
620
648
|
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
649
|
+
function getInstallErrorOutput(error) {
|
|
650
|
+
return [
|
|
651
|
+
error?.message,
|
|
652
|
+
error?.stderr?.toString?.(),
|
|
653
|
+
error?.stdout?.toString?.(),
|
|
654
|
+
].filter(Boolean).join('\n');
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
function isPackageNotFoundError(error, pkg) {
|
|
658
|
+
const output = getInstallErrorOutput(error).toLowerCase();
|
|
659
|
+
const packageName = pkg.toLowerCase();
|
|
660
|
+
|
|
661
|
+
if (!output.includes(packageName)) {
|
|
662
|
+
return false;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
return output.includes('e404')
|
|
666
|
+
|| output.includes('npm err! 404')
|
|
667
|
+
|| output.includes(' is not in this registry')
|
|
668
|
+
|| output.includes(' not found');
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
for (const pkg of PRO_PACKAGES) {
|
|
672
|
+
try {
|
|
673
|
+
console.log(`Installing ${pkg}...\n`);
|
|
674
|
+
execSync(`npm install ${pkg}`, { stdio: 'inherit', timeout: 120000 });
|
|
675
|
+
console.log(`\n✅ ${pkg} installed successfully!`);
|
|
676
|
+
installedPackage = pkg;
|
|
677
|
+
break;
|
|
678
|
+
} catch (error) {
|
|
679
|
+
if (isPackageNotFoundError(error, pkg)) {
|
|
680
|
+
continue;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
console.error(`\n❌ Failed to install ${pkg}.`);
|
|
684
|
+
const details = getInstallErrorOutput(error);
|
|
685
|
+
if (details) {
|
|
686
|
+
console.error(details);
|
|
687
|
+
}
|
|
688
|
+
process.exit(1);
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
if (!installedPackage) {
|
|
693
|
+
console.error('\n❌ Installation failed.');
|
|
630
694
|
console.log('\nTry manually:');
|
|
631
|
-
console.log('
|
|
695
|
+
console.log(' aiox pro setup');
|
|
696
|
+
console.log(' # or npx aiox-pro install');
|
|
632
697
|
process.exit(1);
|
|
633
698
|
}
|
|
634
699
|
|
|
@@ -644,6 +709,66 @@ async function setupAction(options) {
|
|
|
644
709
|
console.log('');
|
|
645
710
|
}
|
|
646
711
|
|
|
712
|
+
// ---------------------------------------------------------------------------
|
|
713
|
+
// aiox pro update (Story 122.3)
|
|
714
|
+
// ---------------------------------------------------------------------------
|
|
715
|
+
|
|
716
|
+
async function updateAction(options) {
|
|
717
|
+
const proUpdaterPath = path.resolve(__dirname, '..', '..', '..', 'core', 'pro', 'pro-updater');
|
|
718
|
+
let updatePro, formatUpdateResult;
|
|
719
|
+
|
|
720
|
+
try {
|
|
721
|
+
({ updatePro, formatUpdateResult } = require(proUpdaterPath));
|
|
722
|
+
} catch {
|
|
723
|
+
console.error('❌ Pro updater module not found.');
|
|
724
|
+
console.error('Please ensure aiox-core is installed correctly.');
|
|
725
|
+
process.exit(1);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
const projectRoot = process.cwd();
|
|
729
|
+
|
|
730
|
+
// Validate license before updating (unless --check)
|
|
731
|
+
if (!options.check && !options.dryRun) {
|
|
732
|
+
try {
|
|
733
|
+
const { featureGate } = loadLicenseModules();
|
|
734
|
+
const state = featureGate.getLicenseState();
|
|
735
|
+
if (state !== 'Active' && state !== 'Grace') {
|
|
736
|
+
console.error('\n❌ AIOX Pro license is not active.');
|
|
737
|
+
console.error('Activate your license first: aiox pro activate --key PRO-XXXX-XXXX-XXXX-XXXX');
|
|
738
|
+
process.exit(1);
|
|
739
|
+
}
|
|
740
|
+
} catch {
|
|
741
|
+
// License modules not available — proceed anyway (first update scenario)
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
try {
|
|
746
|
+
const result = await updatePro(projectRoot, {
|
|
747
|
+
check: options.check || false,
|
|
748
|
+
dryRun: options.dryRun || false,
|
|
749
|
+
force: options.force || false,
|
|
750
|
+
includeCoreUpdate: options.includeCore || false,
|
|
751
|
+
skipScaffold: options.skipScaffold || false,
|
|
752
|
+
onProgress: (phase, message) => {
|
|
753
|
+
if (phase === 'detect') console.log(` 🔍 ${message}`);
|
|
754
|
+
else if (phase === 'check') console.log(` 📡 ${message}`);
|
|
755
|
+
else if (phase === 'core') console.log(` 📦 ${message}`);
|
|
756
|
+
else if (phase === 'update') console.log(` ⬆️ ${message}`);
|
|
757
|
+
else if (phase === 'scaffold') console.log(` 🔧 ${message}`);
|
|
758
|
+
},
|
|
759
|
+
});
|
|
760
|
+
|
|
761
|
+
console.log(formatUpdateResult(result));
|
|
762
|
+
|
|
763
|
+
if (!result.success) {
|
|
764
|
+
process.exit(1);
|
|
765
|
+
}
|
|
766
|
+
} catch (error) {
|
|
767
|
+
console.error(`\n❌ ${error.message}`);
|
|
768
|
+
process.exit(1);
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
|
|
647
772
|
// ---------------------------------------------------------------------------
|
|
648
773
|
// Command builder
|
|
649
774
|
// ---------------------------------------------------------------------------
|
|
@@ -691,10 +816,24 @@ function createProCommand() {
|
|
|
691
816
|
// aiox pro setup (AC-12: Install-gate)
|
|
692
817
|
proCmd
|
|
693
818
|
.command('setup')
|
|
694
|
-
.description('Install and verify
|
|
819
|
+
.description('Install and verify AIOX Pro')
|
|
695
820
|
.option('--verify', 'Only verify installation without installing')
|
|
696
821
|
.action(setupAction);
|
|
697
822
|
|
|
823
|
+
// aiox pro update (Story 122.3)
|
|
824
|
+
proCmd
|
|
825
|
+
.command('update')
|
|
826
|
+
.description('Update AIOX Pro to latest version and sync assets')
|
|
827
|
+
.option('--check', 'Check for updates without applying')
|
|
828
|
+
.option('--dry-run', 'Show update plan without executing')
|
|
829
|
+
.option('-f, --force', 'Force reinstall even if up-to-date')
|
|
830
|
+
.option('--include-core', 'Also update aiox-core')
|
|
831
|
+
.option('--skip-scaffold', 'Skip re-scaffolding assets after update')
|
|
832
|
+
.action(updateAction);
|
|
833
|
+
|
|
834
|
+
// aiox pro buyer — Cohort admin operations (Story 123.8)
|
|
835
|
+
proCmd.addCommand(createBuyerCommand());
|
|
836
|
+
|
|
698
837
|
return proCmd;
|
|
699
838
|
}
|
|
700
839
|
|
|
@@ -62,6 +62,7 @@ function createValidateCommand() {
|
|
|
62
62
|
.option('-d, --dry-run', 'Preview repairs without applying (use with --repair)')
|
|
63
63
|
.option('--detailed', 'Show detailed file list')
|
|
64
64
|
.option('--no-hash', 'Skip hash verification (faster)')
|
|
65
|
+
.option('--no-signature', 'Skip manifest signature verification (insecure; recovery only)')
|
|
65
66
|
.option('--extras', 'Detect extra files not in manifest')
|
|
66
67
|
.option('-v, --verbose', 'Enable verbose output')
|
|
67
68
|
.option('--json', 'Output results as JSON')
|
|
@@ -213,6 +214,7 @@ async function runValidation(options) {
|
|
|
213
214
|
// Create validator instance
|
|
214
215
|
const validator = new PostInstallValidator(projectRoot, sourceDir, {
|
|
215
216
|
verifyHashes: options.hash !== false,
|
|
217
|
+
requireSignature: options.signature !== false,
|
|
216
218
|
detectExtras: options.extras === true,
|
|
217
219
|
verbose: options.verbose === true,
|
|
218
220
|
onProgress: options.json
|
|
@@ -6,7 +6,7 @@ const { getEnricher, getClient, isCodeIntelAvailable } = require('../index');
|
|
|
6
6
|
const RISK_THRESHOLDS = {
|
|
7
7
|
LOW_MAX: 4, // 0-4 refs = LOW
|
|
8
8
|
MEDIUM_MAX: 15, // 5-15 refs = MEDIUM
|
|
9
|
-
|
|
9
|
+
// >15 refs = HIGH
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
// Minimum references to suggest REUSE (>threshold = REUSE, <=threshold = ADAPT)
|
|
@@ -78,7 +78,6 @@ async function generateImpactSummary(files) {
|
|
|
78
78
|
} catch { /* skip — partial result ok */ }
|
|
79
79
|
|
|
80
80
|
const riskLevel = classifyRiskLevel(impact.blastRadius);
|
|
81
|
-
const fileCount = impact.references ? impact.references.length : 0;
|
|
82
81
|
const topFiles = (impact.references || [])
|
|
83
82
|
.map((r) => r.file || r.path || 'unknown')
|
|
84
83
|
.slice(0, 10);
|
|
@@ -7,14 +7,14 @@ const { getEnricher, getClient, isCodeIntelAvailable } = require('../index');
|
|
|
7
7
|
const RISK_THRESHOLDS = {
|
|
8
8
|
LOW_MAX: 4, // 0-4 refs = LOW
|
|
9
9
|
MEDIUM_MAX: 15, // 5-15 refs = MEDIUM
|
|
10
|
-
|
|
10
|
+
// >15 refs = HIGH
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
// Coverage status thresholds based on test reference count
|
|
14
14
|
const COVERAGE_THRESHOLDS = {
|
|
15
15
|
INDIRECT_MAX: 2, // 1-2 test refs = INDIRECT
|
|
16
16
|
MINIMAL_MAX: 5, // 3-5 test refs = MINIMAL
|
|
17
|
-
|
|
17
|
+
// >5 test refs = GOOD
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
"properties": {
|
|
117
117
|
"enabled": { "type": "boolean" },
|
|
118
118
|
"path": { "type": "string" },
|
|
119
|
+
"skillsPath": { "type": "string" },
|
|
119
120
|
"format": { "type": "string", "enum": ["full-markdown-yaml", "condensed-rules", "cursor-style"] }
|
|
120
121
|
},
|
|
121
122
|
"additionalProperties": false
|
|
@@ -53,7 +53,7 @@ function getTemplateOverrides(resolvedConfig) {
|
|
|
53
53
|
if (unknown.length > 0) {
|
|
54
54
|
throw new Error(
|
|
55
55
|
`Unknown story section ID(s) in template_overrides: ${unknown.join(', ')}. ` +
|
|
56
|
-
`Valid IDs: ${KNOWN_STORY_SECTIONS.join(', ')}
|
|
56
|
+
`Valid IDs: ${KNOWN_STORY_SECTIONS.join(', ')}`,
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Doctor Check: IDE Sync
|
|
3
3
|
*
|
|
4
|
-
* Validates
|
|
5
|
-
* .aiox-core/development/agents/
|
|
4
|
+
* Validates Claude agent skills and legacy command files match
|
|
5
|
+
* .aiox-core/development/agents/ during the skills-first transition.
|
|
6
6
|
*
|
|
7
7
|
* @module aiox-core/doctor/checks/ide-sync
|
|
8
8
|
* @story INS-4.1
|
|
@@ -13,9 +13,54 @@ const fs = require('fs');
|
|
|
13
13
|
|
|
14
14
|
const name = 'ide-sync';
|
|
15
15
|
|
|
16
|
+
function readMarkdownAgents(dir, label) {
|
|
17
|
+
if (!fs.existsSync(dir)) {
|
|
18
|
+
return { agents: [], error: null };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
const agents = fs.readdirSync(dir)
|
|
23
|
+
.filter((f) => f.endsWith('.md'))
|
|
24
|
+
.map((f) => f.replace('.md', ''));
|
|
25
|
+
return { agents, error: null };
|
|
26
|
+
} catch (error) {
|
|
27
|
+
return { agents: [], error: `Cannot read ${label} directory: ${error.message}` };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function readSkillAgents(dir) {
|
|
32
|
+
if (!fs.existsSync(dir)) {
|
|
33
|
+
return { agents: [], error: null };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
const agents = fs.readdirSync(dir, { withFileTypes: true })
|
|
38
|
+
.filter((entry) => entry.isDirectory() && fs.existsSync(path.join(dir, entry.name, 'SKILL.md')))
|
|
39
|
+
.map((entry) => entry.name);
|
|
40
|
+
return { agents, error: null };
|
|
41
|
+
} catch (error) {
|
|
42
|
+
return { agents: [], error: `Cannot read Claude skills directory: ${error.message}` };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function diffAgents(expected, actual) {
|
|
47
|
+
const expectedSet = new Set(expected);
|
|
48
|
+
const actualSet = new Set(actual);
|
|
49
|
+
return {
|
|
50
|
+
missing: expected.filter((id) => !actualSet.has(id)),
|
|
51
|
+
extra: actual.filter((id) => !expectedSet.has(id)),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function formatList(items) {
|
|
56
|
+
if (items.length === 0) return 'none';
|
|
57
|
+
return items.slice(0, 5).join(', ') + (items.length > 5 ? `, +${items.length - 5} more` : '');
|
|
58
|
+
}
|
|
59
|
+
|
|
16
60
|
async function run(context) {
|
|
17
61
|
const agentsSourceDir = path.join(context.projectRoot, '.aiox-core', 'development', 'agents');
|
|
18
|
-
const
|
|
62
|
+
const agentsCommandDir = path.join(context.projectRoot, '.claude', 'commands', 'AIOX', 'agents');
|
|
63
|
+
const agentsSkillDir = path.join(context.projectRoot, '.claude', 'skills', 'AIOX', 'agents');
|
|
19
64
|
|
|
20
65
|
if (!fs.existsSync(agentsSourceDir)) {
|
|
21
66
|
return {
|
|
@@ -26,16 +71,7 @@ async function run(context) {
|
|
|
26
71
|
};
|
|
27
72
|
}
|
|
28
73
|
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
check: name,
|
|
32
|
-
status: 'WARN',
|
|
33
|
-
message: 'IDE agents directory not found (.claude/commands/AIOX/agents/)',
|
|
34
|
-
fixCommand: 'npx aiox-core install --force',
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
let sourceAgents, ideFiles;
|
|
74
|
+
let sourceAgents;
|
|
39
75
|
try {
|
|
40
76
|
sourceAgents = fs.readdirSync(agentsSourceDir)
|
|
41
77
|
.filter((f) => f.endsWith('.md'))
|
|
@@ -49,27 +85,41 @@ async function run(context) {
|
|
|
49
85
|
};
|
|
50
86
|
}
|
|
51
87
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
88
|
+
const commandResult = readMarkdownAgents(agentsCommandDir, 'Claude commands');
|
|
89
|
+
const skillResult = readSkillAgents(agentsSkillDir);
|
|
90
|
+
|
|
91
|
+
if (commandResult.error || skillResult.error) {
|
|
56
92
|
return {
|
|
57
93
|
check: name,
|
|
58
|
-
status: '
|
|
59
|
-
message:
|
|
94
|
+
status: 'FAIL',
|
|
95
|
+
message: commandResult.error || skillResult.error,
|
|
60
96
|
fixCommand: 'npx aiox-core install --force',
|
|
61
97
|
};
|
|
62
98
|
}
|
|
63
99
|
|
|
64
|
-
const
|
|
100
|
+
const commandAgents = commandResult.agents;
|
|
101
|
+
const skillAgents = skillResult.agents;
|
|
102
|
+
|
|
65
103
|
const sourceCount = sourceAgents.length;
|
|
66
|
-
const
|
|
104
|
+
const commandCount = commandAgents.length;
|
|
105
|
+
const skillCount = skillAgents.length;
|
|
106
|
+
const skillDiff = diffAgents(sourceAgents, skillAgents);
|
|
107
|
+
const commandDiff = diffAgents(sourceAgents, commandAgents);
|
|
108
|
+
|
|
109
|
+
if (skillDiff.missing.length > 0 || skillDiff.extra.length > 0) {
|
|
110
|
+
return {
|
|
111
|
+
check: name,
|
|
112
|
+
status: 'WARN',
|
|
113
|
+
message: `Claude skills mismatch (missing: ${formatList(skillDiff.missing)}; extra: ${formatList(skillDiff.extra)})`,
|
|
114
|
+
fixCommand: 'npx aiox-core install --force',
|
|
115
|
+
};
|
|
116
|
+
}
|
|
67
117
|
|
|
68
|
-
if (
|
|
118
|
+
if (commandDiff.missing.length === 0 && commandDiff.extra.length === 0) {
|
|
69
119
|
return {
|
|
70
120
|
check: name,
|
|
71
121
|
status: 'PASS',
|
|
72
|
-
message: `${
|
|
122
|
+
message: `${skillCount}/${sourceCount} Claude skills synced; ${commandCount}/${sourceCount} legacy commands synced`,
|
|
73
123
|
fixCommand: null,
|
|
74
124
|
};
|
|
75
125
|
}
|
|
@@ -77,9 +127,15 @@ async function run(context) {
|
|
|
77
127
|
return {
|
|
78
128
|
check: name,
|
|
79
129
|
status: 'WARN',
|
|
80
|
-
message:
|
|
130
|
+
message: `${skillCount}/${sourceCount} Claude skills synced; legacy commands mismatch (missing: ${formatList(commandDiff.missing)}; extra: ${formatList(commandDiff.extra)}; count: ${commandCount}/${sourceCount})`,
|
|
81
131
|
fixCommand: 'npx aiox-core install --force',
|
|
82
132
|
};
|
|
83
133
|
}
|
|
84
134
|
|
|
85
|
-
module.exports = {
|
|
135
|
+
module.exports = {
|
|
136
|
+
name,
|
|
137
|
+
run,
|
|
138
|
+
readMarkdownAgents,
|
|
139
|
+
readSkillAgents,
|
|
140
|
+
diffAgents,
|
|
141
|
+
};
|