aios-core 2.2.2 → 2.3.1
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/.aios-core/.session/current-session.json +14 -14
- package/.aios-core/cli/commands/migrate/validate.js +1 -1
- package/.aios-core/core/docs/session-update-pattern.md +17 -10
- package/.aios-core/core/elicitation/elicitation-engine.js +11 -6
- package/.aios-core/core/elicitation/session-manager.js +2 -1
- package/.aios-core/core/registry/registry-schema.json +166 -166
- package/.aios-core/core/registry/service-registry.json +6585 -6585
- package/.aios-core/core-config.yaml +12 -1
- package/.aios-core/data/agent-config-requirements.yaml +5 -5
- package/.aios-core/development/agents/devops.md +12 -0
- package/.aios-core/development/scripts/squad/README.md +112 -0
- package/.aios-core/development/scripts/squad/index.js +41 -0
- package/.aios-core/development/scripts/squad/squad-loader.js +359 -0
- package/.aios-core/development/scripts/squad/squad-validator.js +685 -0
- package/.aios-core/development/tasks/add-mcp.md +11 -5
- package/.aios-core/development/tasks/search-mcp.md +309 -0
- package/.aios-core/development/tasks/setup-mcp-docker.md +11 -8
- package/.aios-core/development/tasks/squad-creator-validate.md +151 -0
- package/.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +3 -3
- package/.aios-core/index.d.ts +7 -7
- package/.aios-core/index.js +1 -1
- package/.aios-core/infrastructure/scripts/batch-creator.js +1 -1
- package/.aios-core/infrastructure/scripts/component-generator.js +1 -1
- package/.aios-core/infrastructure/templates/coderabbit.yaml.template +279 -279
- package/.aios-core/infrastructure/templates/github-workflows/ci.yml.template +169 -169
- package/.aios-core/infrastructure/templates/github-workflows/pr-automation.yml.template +330 -330
- package/.aios-core/infrastructure/templates/github-workflows/release.yml.template +196 -196
- package/.aios-core/infrastructure/templates/gitignore/gitignore-aios-base.tmpl +63 -63
- package/.aios-core/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +18 -18
- package/.aios-core/infrastructure/templates/gitignore/gitignore-node.tmpl +85 -85
- package/.aios-core/infrastructure/templates/gitignore/gitignore-python.tmpl +145 -145
- package/.aios-core/infrastructure/tests/utilities-audit-results.json +500 -500
- package/.aios-core/infrastructure/tools/README.md +1 -1
- package/.aios-core/install-manifest.yaml +4 -1
- package/.aios-core/manifests/schema/manifest-schema.json +190 -190
- package/.aios-core/manifests/workers.csv +203 -203
- package/.aios-core/package.json +102 -102
- package/.aios-core/product/templates/activation-instructions-template.md +7 -7
- package/.aios-core/product/templates/adr.hbs +125 -125
- package/.aios-core/product/templates/component-react-tmpl.tsx +98 -98
- package/.aios-core/product/templates/dbdr.hbs +241 -241
- package/.aios-core/product/templates/engine/schemas/adr.schema.json +102 -102
- package/.aios-core/product/templates/engine/schemas/dbdr.schema.json +205 -205
- package/.aios-core/product/templates/engine/schemas/epic.schema.json +175 -175
- package/.aios-core/product/templates/engine/schemas/pmdr.schema.json +175 -175
- package/.aios-core/product/templates/engine/schemas/prd-v2.schema.json +300 -300
- package/.aios-core/product/templates/engine/schemas/prd.schema.json +152 -152
- package/.aios-core/product/templates/engine/schemas/story.schema.json +222 -222
- package/.aios-core/product/templates/engine/schemas/task.schema.json +154 -154
- package/.aios-core/product/templates/epic.hbs +212 -212
- package/.aios-core/product/templates/eslintrc-security.json +32 -32
- package/.aios-core/product/templates/github-actions-cd.yml +212 -212
- package/.aios-core/product/templates/github-actions-ci.yml +172 -172
- package/.aios-core/product/templates/pmdr.hbs +186 -186
- package/.aios-core/product/templates/prd-v2.0.hbs +216 -216
- package/.aios-core/product/templates/prd.hbs +201 -201
- package/.aios-core/product/templates/shock-report-tmpl.html +502 -502
- package/.aios-core/product/templates/story.hbs +263 -263
- package/.aios-core/product/templates/task.hbs +170 -170
- package/.aios-core/product/templates/tmpl-comment-on-examples.sql +158 -158
- package/.aios-core/product/templates/tmpl-migration-script.sql +91 -91
- package/.aios-core/product/templates/tmpl-rls-granular-policies.sql +104 -104
- package/.aios-core/product/templates/tmpl-rls-kiss-policy.sql +10 -10
- package/.aios-core/product/templates/tmpl-rls-roles.sql +135 -135
- package/.aios-core/product/templates/tmpl-rls-simple.sql +77 -77
- package/.aios-core/product/templates/tmpl-rls-tenant.sql +152 -152
- package/.aios-core/product/templates/tmpl-rollback-script.sql +77 -77
- package/.aios-core/product/templates/tmpl-seed-data.sql +140 -140
- package/.aios-core/product/templates/tmpl-smoke-test.sql +16 -16
- package/.aios-core/product/templates/tmpl-staging-copy-merge.sql +139 -139
- package/.aios-core/product/templates/tmpl-stored-proc.sql +140 -140
- package/.aios-core/product/templates/tmpl-trigger.sql +152 -152
- package/.aios-core/product/templates/tmpl-view-materialized.sql +133 -133
- package/.aios-core/product/templates/tmpl-view.sql +177 -177
- package/.aios-core/product/templates/token-exports-css-tmpl.css +240 -240
- package/.aios-core/quality/schemas/quality-metrics.schema.json +233 -233
- package/.aios-core/schemas/squad-schema.json +185 -0
- package/.aios-core/scripts/README.md +90 -322
- package/.aios-core/scripts/migrate-framework-docs.sh +300 -300
- package/.claude/rules/mcp-usage.md +116 -100
- package/LICENSE +48 -48
- package/README.md +3 -4
- package/bin/aios.js +2 -1
- package/package.json +1 -3
- package/packages/installer/package.json +39 -39
- package/templates/squad/LICENSE +21 -21
- package/templates/squad/README.md +37 -37
- package/templates/squad/agents/example-agent.yaml +36 -36
- package/templates/squad/package.json +19 -19
- package/templates/squad/squad.yaml +25 -25
- package/templates/squad/tasks/example-task.yaml +46 -46
- package/templates/squad/templates/example-template.md +24 -24
- package/templates/squad/tests/example-agent.test.js +53 -53
- package/templates/squad/workflows/example-workflow.yaml +54 -54
- package/tools/diagnose-npx-issue.ps1 +96 -96
- package/tools/quick-diagnose.cmd +85 -85
- package/tools/quick-diagnose.ps1 +117 -117
- package/.aios-core/core/data/agent-config-requirements.yaml +0 -368
- package/.aios-core/core/data/aios-kb.md +0 -924
- package/.aios-core/core/data/workflow-patterns.yaml +0 -267
- package/.aios-core/product/templates/1mcp-config.yaml +0 -225
- package/.aios-core/scripts/context-detector.js +0 -226
- package/.aios-core/scripts/elicitation-engine.js +0 -385
- package/.aios-core/scripts/elicitation-session-manager.js +0 -300
- package/.claude/CLAUDE.md +0 -221
package/tools/quick-diagnose.cmd
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
echo.
|
|
3
|
-
echo ========================================
|
|
4
|
-
echo AIOS-Core Quick Diagnostic (CMD)
|
|
5
|
-
echo ========================================
|
|
6
|
-
echo.
|
|
7
|
-
|
|
8
|
-
echo Checking Node.js...
|
|
9
|
-
node --version 2>nul
|
|
10
|
-
if %errorlevel% neq 0 (
|
|
11
|
-
echo ERROR: Node.js NOT INSTALLED!
|
|
12
|
-
echo Download: https://nodejs.org/
|
|
13
|
-
) else (
|
|
14
|
-
echo Node.js: OK
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
echo.
|
|
18
|
-
echo Checking npm...
|
|
19
|
-
npm --version 2>nul
|
|
20
|
-
if %errorlevel% neq 0 (
|
|
21
|
-
echo ERROR: npm NOT INSTALLED!
|
|
22
|
-
) else (
|
|
23
|
-
echo npm: OK
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
echo.
|
|
27
|
-
echo Checking npx...
|
|
28
|
-
npx --version 2>nul
|
|
29
|
-
if %errorlevel% neq 0 (
|
|
30
|
-
echo ERROR: npx NOT FOUND!
|
|
31
|
-
) else (
|
|
32
|
-
echo npx: OK
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
echo.
|
|
36
|
-
echo Checking Git...
|
|
37
|
-
git --version 2>nul
|
|
38
|
-
if %errorlevel% neq 0 (
|
|
39
|
-
echo WARNING: Git not installed (optional)
|
|
40
|
-
echo Download: https://git-scm.com/
|
|
41
|
-
) else (
|
|
42
|
-
echo Git: OK
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
echo.
|
|
46
|
-
echo Checking npm prefix...
|
|
47
|
-
for /f "tokens=*" %%i in ('npm config get prefix 2^>nul') do set NPM_PREFIX=%%i
|
|
48
|
-
echo npm prefix: %NPM_PREFIX%
|
|
49
|
-
|
|
50
|
-
echo.
|
|
51
|
-
echo Checking aios-core availability on npm...
|
|
52
|
-
npm view aios-core version 2>nul
|
|
53
|
-
if %errorlevel% neq 0 (
|
|
54
|
-
echo ERROR: Cannot access npm registry!
|
|
55
|
-
echo Check your internet/firewall settings
|
|
56
|
-
) else (
|
|
57
|
-
echo aios-core: Available
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
echo.
|
|
61
|
-
echo ========================================
|
|
62
|
-
echo Testing npx aios-core@latest
|
|
63
|
-
echo ========================================
|
|
64
|
-
echo.
|
|
65
|
-
echo Running: npx aios-core@latest --version
|
|
66
|
-
echo (This may take a moment on first run...)
|
|
67
|
-
echo.
|
|
68
|
-
npx aios-core@latest --version
|
|
69
|
-
if %errorlevel% neq 0 (
|
|
70
|
-
echo.
|
|
71
|
-
echo ERROR: npx aios-core failed!
|
|
72
|
-
echo.
|
|
73
|
-
echo Common fixes:
|
|
74
|
-
echo 1. Update Node.js to v18+: https://nodejs.org/
|
|
75
|
-
echo 2. Update npm: npm install -g npm@latest
|
|
76
|
-
echo 3. Clear cache: npm cache clean --force
|
|
77
|
-
echo 4. Check firewall/proxy settings
|
|
78
|
-
) else (
|
|
79
|
-
echo.
|
|
80
|
-
echo SUCCESS! You can now run:
|
|
81
|
-
echo npx aios-core@latest
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
echo.
|
|
85
|
-
pause
|
|
1
|
+
@echo off
|
|
2
|
+
echo.
|
|
3
|
+
echo ========================================
|
|
4
|
+
echo AIOS-Core Quick Diagnostic (CMD)
|
|
5
|
+
echo ========================================
|
|
6
|
+
echo.
|
|
7
|
+
|
|
8
|
+
echo Checking Node.js...
|
|
9
|
+
node --version 2>nul
|
|
10
|
+
if %errorlevel% neq 0 (
|
|
11
|
+
echo ERROR: Node.js NOT INSTALLED!
|
|
12
|
+
echo Download: https://nodejs.org/
|
|
13
|
+
) else (
|
|
14
|
+
echo Node.js: OK
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
echo.
|
|
18
|
+
echo Checking npm...
|
|
19
|
+
npm --version 2>nul
|
|
20
|
+
if %errorlevel% neq 0 (
|
|
21
|
+
echo ERROR: npm NOT INSTALLED!
|
|
22
|
+
) else (
|
|
23
|
+
echo npm: OK
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
echo.
|
|
27
|
+
echo Checking npx...
|
|
28
|
+
npx --version 2>nul
|
|
29
|
+
if %errorlevel% neq 0 (
|
|
30
|
+
echo ERROR: npx NOT FOUND!
|
|
31
|
+
) else (
|
|
32
|
+
echo npx: OK
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
echo.
|
|
36
|
+
echo Checking Git...
|
|
37
|
+
git --version 2>nul
|
|
38
|
+
if %errorlevel% neq 0 (
|
|
39
|
+
echo WARNING: Git not installed (optional)
|
|
40
|
+
echo Download: https://git-scm.com/
|
|
41
|
+
) else (
|
|
42
|
+
echo Git: OK
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
echo.
|
|
46
|
+
echo Checking npm prefix...
|
|
47
|
+
for /f "tokens=*" %%i in ('npm config get prefix 2^>nul') do set NPM_PREFIX=%%i
|
|
48
|
+
echo npm prefix: %NPM_PREFIX%
|
|
49
|
+
|
|
50
|
+
echo.
|
|
51
|
+
echo Checking aios-core availability on npm...
|
|
52
|
+
npm view aios-core version 2>nul
|
|
53
|
+
if %errorlevel% neq 0 (
|
|
54
|
+
echo ERROR: Cannot access npm registry!
|
|
55
|
+
echo Check your internet/firewall settings
|
|
56
|
+
) else (
|
|
57
|
+
echo aios-core: Available
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
echo.
|
|
61
|
+
echo ========================================
|
|
62
|
+
echo Testing npx aios-core@latest
|
|
63
|
+
echo ========================================
|
|
64
|
+
echo.
|
|
65
|
+
echo Running: npx aios-core@latest --version
|
|
66
|
+
echo (This may take a moment on first run...)
|
|
67
|
+
echo.
|
|
68
|
+
npx aios-core@latest --version
|
|
69
|
+
if %errorlevel% neq 0 (
|
|
70
|
+
echo.
|
|
71
|
+
echo ERROR: npx aios-core failed!
|
|
72
|
+
echo.
|
|
73
|
+
echo Common fixes:
|
|
74
|
+
echo 1. Update Node.js to v18+: https://nodejs.org/
|
|
75
|
+
echo 2. Update npm: npm install -g npm@latest
|
|
76
|
+
echo 3. Clear cache: npm cache clean --force
|
|
77
|
+
echo 4. Check firewall/proxy settings
|
|
78
|
+
) else (
|
|
79
|
+
echo.
|
|
80
|
+
echo SUCCESS! You can now run:
|
|
81
|
+
echo npx aios-core@latest
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
echo.
|
|
85
|
+
pause
|
package/tools/quick-diagnose.ps1
CHANGED
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
# AIOS-Core Quick Diagnostic - Run this in PowerShell
|
|
2
|
-
# Usage: Copy and paste this entire script into PowerShell on the target machine
|
|
3
|
-
|
|
4
|
-
Write-Host ""
|
|
5
|
-
Write-Host "========================================" -ForegroundColor Cyan
|
|
6
|
-
Write-Host " AIOS-Core Quick Diagnostic" -ForegroundColor Cyan
|
|
7
|
-
Write-Host "========================================" -ForegroundColor Cyan
|
|
8
|
-
Write-Host ""
|
|
9
|
-
|
|
10
|
-
# Check Node.js
|
|
11
|
-
Write-Host "Checking Node.js..." -ForegroundColor Yellow
|
|
12
|
-
$nodeVersion = & node --version 2>$null
|
|
13
|
-
if ($nodeVersion) {
|
|
14
|
-
Write-Host " Node.js: $nodeVersion" -ForegroundColor Green
|
|
15
|
-
$nodeMajor = [int]($nodeVersion -replace 'v(\d+)\..*', '$1')
|
|
16
|
-
if ($nodeMajor -lt 18) {
|
|
17
|
-
Write-Host " ERROR: Node.js 18+ required!" -ForegroundColor Red
|
|
18
|
-
}
|
|
19
|
-
} else {
|
|
20
|
-
Write-Host " ERROR: Node.js NOT INSTALLED!" -ForegroundColor Red
|
|
21
|
-
Write-Host " Download: https://nodejs.org/" -ForegroundColor Yellow
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
# Check npm
|
|
25
|
-
Write-Host ""
|
|
26
|
-
Write-Host "Checking npm..." -ForegroundColor Yellow
|
|
27
|
-
$npmVersion = & npm --version 2>$null
|
|
28
|
-
if ($npmVersion) {
|
|
29
|
-
Write-Host " npm: v$npmVersion" -ForegroundColor Green
|
|
30
|
-
$npmMajor = [int]($npmVersion -replace '(\d+)\..*', '$1')
|
|
31
|
-
if ($npmMajor -lt 9) {
|
|
32
|
-
Write-Host " ERROR: npm 9+ required!" -ForegroundColor Red
|
|
33
|
-
Write-Host " Run: npm install -g npm@latest" -ForegroundColor Yellow
|
|
34
|
-
}
|
|
35
|
-
} else {
|
|
36
|
-
Write-Host " ERROR: npm NOT INSTALLED!" -ForegroundColor Red
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
# Check npx
|
|
40
|
-
Write-Host ""
|
|
41
|
-
Write-Host "Checking npx..." -ForegroundColor Yellow
|
|
42
|
-
$npxVersion = & npx --version 2>$null
|
|
43
|
-
if ($npxVersion) {
|
|
44
|
-
Write-Host " npx: v$npxVersion" -ForegroundColor Green
|
|
45
|
-
} else {
|
|
46
|
-
Write-Host " ERROR: npx NOT FOUND!" -ForegroundColor Red
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
# Check Git
|
|
50
|
-
Write-Host ""
|
|
51
|
-
Write-Host "Checking Git..." -ForegroundColor Yellow
|
|
52
|
-
$gitVersion = & git --version 2>$null
|
|
53
|
-
if ($gitVersion) {
|
|
54
|
-
Write-Host " $gitVersion" -ForegroundColor Green
|
|
55
|
-
} else {
|
|
56
|
-
Write-Host " WARNING: Git not installed (optional but recommended)" -ForegroundColor Yellow
|
|
57
|
-
Write-Host " Download: https://git-scm.com/" -ForegroundColor Yellow
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
# Check PowerShell Execution Policy
|
|
61
|
-
Write-Host ""
|
|
62
|
-
Write-Host "Checking PowerShell Policy..." -ForegroundColor Yellow
|
|
63
|
-
$policy = Get-ExecutionPolicy
|
|
64
|
-
Write-Host " Execution Policy: $policy" -ForegroundColor $(if ($policy -in @('Unrestricted', 'RemoteSigned', 'Bypass')) { 'Green' } else { 'Red' })
|
|
65
|
-
if ($policy -notin @('Unrestricted', 'RemoteSigned', 'Bypass')) {
|
|
66
|
-
Write-Host " WARNING: May need to run:" -ForegroundColor Yellow
|
|
67
|
-
Write-Host " Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser" -ForegroundColor Yellow
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
# Check npm prefix in PATH
|
|
71
|
-
Write-Host ""
|
|
72
|
-
Write-Host "Checking npm PATH..." -ForegroundColor Yellow
|
|
73
|
-
$npmPrefix = & npm config get prefix 2>$null
|
|
74
|
-
if ($npmPrefix) {
|
|
75
|
-
$inPath = $env:PATH -like "*$npmPrefix*"
|
|
76
|
-
if ($inPath) {
|
|
77
|
-
Write-Host " npm prefix in PATH: Yes" -ForegroundColor Green
|
|
78
|
-
} else {
|
|
79
|
-
Write-Host " npm prefix NOT in PATH!" -ForegroundColor Red
|
|
80
|
-
Write-Host " Add to PATH: $npmPrefix" -ForegroundColor Yellow
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
# Check npm registry
|
|
85
|
-
Write-Host ""
|
|
86
|
-
Write-Host "Checking npm registry access..." -ForegroundColor Yellow
|
|
87
|
-
$registryTest = & npm view aios-core version 2>$null
|
|
88
|
-
if ($registryTest) {
|
|
89
|
-
Write-Host " aios-core v$registryTest available" -ForegroundColor Green
|
|
90
|
-
} else {
|
|
91
|
-
Write-Host " Cannot access npm registry!" -ForegroundColor Red
|
|
92
|
-
Write-Host " Check firewall/proxy settings" -ForegroundColor Yellow
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
# Test npx aios-core
|
|
96
|
-
Write-Host ""
|
|
97
|
-
Write-Host "Testing: npx aios-core@latest --version" -ForegroundColor Yellow
|
|
98
|
-
Write-Host "(This may take a moment...)" -ForegroundColor Gray
|
|
99
|
-
try {
|
|
100
|
-
$result = & npx aios-core@latest --version 2>&1
|
|
101
|
-
if ($result -match '\d+\.\d+\.\d+') {
|
|
102
|
-
Write-Host " SUCCESS: $result" -ForegroundColor Green
|
|
103
|
-
} else {
|
|
104
|
-
Write-Host " FAILED: $result" -ForegroundColor Red
|
|
105
|
-
}
|
|
106
|
-
} catch {
|
|
107
|
-
Write-Host " ERROR: $($_.Exception.Message)" -ForegroundColor Red
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
Write-Host ""
|
|
111
|
-
Write-Host "========================================" -ForegroundColor Cyan
|
|
112
|
-
Write-Host " Diagnostic Complete" -ForegroundColor Cyan
|
|
113
|
-
Write-Host "========================================" -ForegroundColor Cyan
|
|
114
|
-
Write-Host ""
|
|
115
|
-
Write-Host "If all checks passed, run:" -ForegroundColor Green
|
|
116
|
-
Write-Host " npx aios-core@latest" -ForegroundColor White
|
|
117
|
-
Write-Host ""
|
|
1
|
+
# AIOS-Core Quick Diagnostic - Run this in PowerShell
|
|
2
|
+
# Usage: Copy and paste this entire script into PowerShell on the target machine
|
|
3
|
+
|
|
4
|
+
Write-Host ""
|
|
5
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
6
|
+
Write-Host " AIOS-Core Quick Diagnostic" -ForegroundColor Cyan
|
|
7
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
8
|
+
Write-Host ""
|
|
9
|
+
|
|
10
|
+
# Check Node.js
|
|
11
|
+
Write-Host "Checking Node.js..." -ForegroundColor Yellow
|
|
12
|
+
$nodeVersion = & node --version 2>$null
|
|
13
|
+
if ($nodeVersion) {
|
|
14
|
+
Write-Host " Node.js: $nodeVersion" -ForegroundColor Green
|
|
15
|
+
$nodeMajor = [int]($nodeVersion -replace 'v(\d+)\..*', '$1')
|
|
16
|
+
if ($nodeMajor -lt 18) {
|
|
17
|
+
Write-Host " ERROR: Node.js 18+ required!" -ForegroundColor Red
|
|
18
|
+
}
|
|
19
|
+
} else {
|
|
20
|
+
Write-Host " ERROR: Node.js NOT INSTALLED!" -ForegroundColor Red
|
|
21
|
+
Write-Host " Download: https://nodejs.org/" -ForegroundColor Yellow
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
# Check npm
|
|
25
|
+
Write-Host ""
|
|
26
|
+
Write-Host "Checking npm..." -ForegroundColor Yellow
|
|
27
|
+
$npmVersion = & npm --version 2>$null
|
|
28
|
+
if ($npmVersion) {
|
|
29
|
+
Write-Host " npm: v$npmVersion" -ForegroundColor Green
|
|
30
|
+
$npmMajor = [int]($npmVersion -replace '(\d+)\..*', '$1')
|
|
31
|
+
if ($npmMajor -lt 9) {
|
|
32
|
+
Write-Host " ERROR: npm 9+ required!" -ForegroundColor Red
|
|
33
|
+
Write-Host " Run: npm install -g npm@latest" -ForegroundColor Yellow
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
Write-Host " ERROR: npm NOT INSTALLED!" -ForegroundColor Red
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# Check npx
|
|
40
|
+
Write-Host ""
|
|
41
|
+
Write-Host "Checking npx..." -ForegroundColor Yellow
|
|
42
|
+
$npxVersion = & npx --version 2>$null
|
|
43
|
+
if ($npxVersion) {
|
|
44
|
+
Write-Host " npx: v$npxVersion" -ForegroundColor Green
|
|
45
|
+
} else {
|
|
46
|
+
Write-Host " ERROR: npx NOT FOUND!" -ForegroundColor Red
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
# Check Git
|
|
50
|
+
Write-Host ""
|
|
51
|
+
Write-Host "Checking Git..." -ForegroundColor Yellow
|
|
52
|
+
$gitVersion = & git --version 2>$null
|
|
53
|
+
if ($gitVersion) {
|
|
54
|
+
Write-Host " $gitVersion" -ForegroundColor Green
|
|
55
|
+
} else {
|
|
56
|
+
Write-Host " WARNING: Git not installed (optional but recommended)" -ForegroundColor Yellow
|
|
57
|
+
Write-Host " Download: https://git-scm.com/" -ForegroundColor Yellow
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
# Check PowerShell Execution Policy
|
|
61
|
+
Write-Host ""
|
|
62
|
+
Write-Host "Checking PowerShell Policy..." -ForegroundColor Yellow
|
|
63
|
+
$policy = Get-ExecutionPolicy
|
|
64
|
+
Write-Host " Execution Policy: $policy" -ForegroundColor $(if ($policy -in @('Unrestricted', 'RemoteSigned', 'Bypass')) { 'Green' } else { 'Red' })
|
|
65
|
+
if ($policy -notin @('Unrestricted', 'RemoteSigned', 'Bypass')) {
|
|
66
|
+
Write-Host " WARNING: May need to run:" -ForegroundColor Yellow
|
|
67
|
+
Write-Host " Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser" -ForegroundColor Yellow
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
# Check npm prefix in PATH
|
|
71
|
+
Write-Host ""
|
|
72
|
+
Write-Host "Checking npm PATH..." -ForegroundColor Yellow
|
|
73
|
+
$npmPrefix = & npm config get prefix 2>$null
|
|
74
|
+
if ($npmPrefix) {
|
|
75
|
+
$inPath = $env:PATH -like "*$npmPrefix*"
|
|
76
|
+
if ($inPath) {
|
|
77
|
+
Write-Host " npm prefix in PATH: Yes" -ForegroundColor Green
|
|
78
|
+
} else {
|
|
79
|
+
Write-Host " npm prefix NOT in PATH!" -ForegroundColor Red
|
|
80
|
+
Write-Host " Add to PATH: $npmPrefix" -ForegroundColor Yellow
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
# Check npm registry
|
|
85
|
+
Write-Host ""
|
|
86
|
+
Write-Host "Checking npm registry access..." -ForegroundColor Yellow
|
|
87
|
+
$registryTest = & npm view aios-core version 2>$null
|
|
88
|
+
if ($registryTest) {
|
|
89
|
+
Write-Host " aios-core v$registryTest available" -ForegroundColor Green
|
|
90
|
+
} else {
|
|
91
|
+
Write-Host " Cannot access npm registry!" -ForegroundColor Red
|
|
92
|
+
Write-Host " Check firewall/proxy settings" -ForegroundColor Yellow
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
# Test npx aios-core
|
|
96
|
+
Write-Host ""
|
|
97
|
+
Write-Host "Testing: npx aios-core@latest --version" -ForegroundColor Yellow
|
|
98
|
+
Write-Host "(This may take a moment...)" -ForegroundColor Gray
|
|
99
|
+
try {
|
|
100
|
+
$result = & npx aios-core@latest --version 2>&1
|
|
101
|
+
if ($result -match '\d+\.\d+\.\d+') {
|
|
102
|
+
Write-Host " SUCCESS: $result" -ForegroundColor Green
|
|
103
|
+
} else {
|
|
104
|
+
Write-Host " FAILED: $result" -ForegroundColor Red
|
|
105
|
+
}
|
|
106
|
+
} catch {
|
|
107
|
+
Write-Host " ERROR: $($_.Exception.Message)" -ForegroundColor Red
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
Write-Host ""
|
|
111
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
112
|
+
Write-Host " Diagnostic Complete" -ForegroundColor Cyan
|
|
113
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
114
|
+
Write-Host ""
|
|
115
|
+
Write-Host "If all checks passed, run:" -ForegroundColor Green
|
|
116
|
+
Write-Host " npx aios-core@latest" -ForegroundColor White
|
|
117
|
+
Write-Host ""
|