aios-core 2.2.0 → 2.2.2
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/README.md +30 -28
- package/bin/aios-init.js +11 -6
- package/package.json +1 -1
- package/packages/installer/tests/integration/environment-configuration.test.js +2 -2
- package/packages/installer/tests/unit/env-template.test.js +4 -3
- package/tools/diagnose-installation.js +266 -0
- package/tools/diagnose-npx-issue.ps1 +96 -0
- package/tools/quick-diagnose.cmd +85 -0
- package/tools/quick-diagnose.ps1 +117 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Synkra AIOS: Framework Universal de Agentes IA 🚀
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/aios-core)
|
|
4
4
|
[](LICENSE)
|
|
5
|
-
[](https://nodejs.org/)
|
|
6
6
|
[](https://synkra.ai)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
[](CONTRIBUTING.md)
|
|
@@ -24,9 +24,11 @@ Esta abordagem de duas fases elimina tanto a **inconsistência de planejamento**
|
|
|
24
24
|
|
|
25
25
|
## Pré-requisitos
|
|
26
26
|
|
|
27
|
-
- Node.js >=
|
|
28
|
-
- npm
|
|
29
|
-
- GitHub CLI (necessário para colaboração em equipe)
|
|
27
|
+
- Node.js >=18.0.0 (v20+ recomendado)
|
|
28
|
+
- npm >=9.0.0
|
|
29
|
+
- GitHub CLI (opcional, necessário para colaboração em equipe)
|
|
30
|
+
|
|
31
|
+
> **Problemas de instalação?** Consulte o [Guia de Troubleshooting](docs/guides/installation-troubleshooting.md)
|
|
30
32
|
|
|
31
33
|
**Guias específicos por plataforma:**
|
|
32
34
|
- 📖 [Guia de Instalação para macOS](docs/installation/macos.md)
|
|
@@ -81,14 +83,14 @@ Isto facilita beneficiar-se das últimas melhorias, correções de bugs e novos
|
|
|
81
83
|
|
|
82
84
|
```bash
|
|
83
85
|
# Criar um novo projeto com assistente interativo moderno
|
|
84
|
-
npx
|
|
86
|
+
npx aios-core init meu-projeto
|
|
85
87
|
|
|
86
88
|
# Ou instalar em projeto existente
|
|
87
89
|
cd seu-projeto
|
|
88
|
-
npx
|
|
90
|
+
npx aios-core install
|
|
89
91
|
|
|
90
92
|
# Ou usar uma versão específica
|
|
91
|
-
npx
|
|
93
|
+
npx aios-core@latest init meu-projeto
|
|
92
94
|
```
|
|
93
95
|
|
|
94
96
|
### ✨ Assistente de Instalação Moderno
|
|
@@ -118,7 +120,7 @@ O Synkra AIOS agora inclui uma experiência de instalação interativa de últim
|
|
|
118
120
|
|
|
119
121
|
> **É isso!** Sem clonar, sem configuração manual - apenas um comando e você está pronto para começar com uma experiência de instalação moderna e profissional.
|
|
120
122
|
|
|
121
|
-
**Pré-requisitos**: [Node.js](https://nodejs.org) v18+ necessário (v20+ recomendado)
|
|
123
|
+
**Pré-requisitos**: [Node.js](https://nodejs.org) v18+ necessário (v20+ recomendado) | [Troubleshooting](docs/guides/installation-troubleshooting.md)
|
|
122
124
|
|
|
123
125
|
### Atualizando uma Instalação Existente
|
|
124
126
|
|
|
@@ -164,27 +166,27 @@ O Synkra AIOS oferece uma CLI moderna e cross-platform com comandos intuitivos:
|
|
|
164
166
|
|
|
165
167
|
```bash
|
|
166
168
|
# Gerenciamento de Projeto (com assistente interativo)
|
|
167
|
-
npx
|
|
169
|
+
npx aios-core init <nome-projeto> [opções]
|
|
168
170
|
--force Forçar criação em diretório não vazio
|
|
169
171
|
--skip-install Pular instalação de dependências npm
|
|
170
172
|
--template <nome> Usar template específico (default, minimal, enterprise)
|
|
171
173
|
|
|
172
174
|
# Instalação e Configuração (com prompts modernos)
|
|
173
|
-
npx
|
|
175
|
+
npx aios-core install [opções]
|
|
174
176
|
--force Sobrescrever configuração existente
|
|
175
177
|
--quiet Saída mínima durante instalação
|
|
176
178
|
--dry-run Simular instalação sem modificar arquivos
|
|
177
179
|
|
|
178
180
|
# Comandos do Sistema
|
|
179
|
-
npx
|
|
180
|
-
npx
|
|
181
|
-
npx
|
|
182
|
-
npx
|
|
183
|
-
npx
|
|
181
|
+
npx aios-core --version Exibir versão instalada
|
|
182
|
+
npx aios-core --help Exibir ajuda detalhada
|
|
183
|
+
npx aios-core info Exibir informações do sistema
|
|
184
|
+
npx aios-core doctor Executar diagnósticos do sistema
|
|
185
|
+
npx aios-core doctor --fix Corrigir problemas detectados automaticamente
|
|
184
186
|
|
|
185
187
|
# Manutenção
|
|
186
|
-
npx
|
|
187
|
-
npx
|
|
188
|
+
npx aios-core update Atualizar para versão mais recente
|
|
189
|
+
npx aios-core uninstall Remover Synkra AIOS
|
|
188
190
|
```
|
|
189
191
|
|
|
190
192
|
**Recursos da CLI:**
|
|
@@ -199,7 +201,7 @@ npx @synkra/aios-core uninstall Remover Synkra AIOS
|
|
|
199
201
|
#### Instalação Interativa Completa
|
|
200
202
|
|
|
201
203
|
```bash
|
|
202
|
-
$ npx
|
|
204
|
+
$ npx aios-core install
|
|
203
205
|
|
|
204
206
|
🚀 Synkra AIOS Installation
|
|
205
207
|
|
|
@@ -237,15 +239,15 @@ $ npx @synkra/aios-core install
|
|
|
237
239
|
|
|
238
240
|
Next steps:
|
|
239
241
|
cd my-awesome-project
|
|
240
|
-
|
|
241
|
-
|
|
242
|
+
aios-core doctor # Verify installation
|
|
243
|
+
aios-core --help # See available commands
|
|
242
244
|
```
|
|
243
245
|
|
|
244
246
|
#### Instalação Silenciosa (CI/CD)
|
|
245
247
|
|
|
246
248
|
```bash
|
|
247
249
|
# Instalação automatizada sem prompts
|
|
248
|
-
$ npx
|
|
250
|
+
$ npx aios-core install --quiet --force
|
|
249
251
|
✔ Synkra AIOS installed successfully
|
|
250
252
|
```
|
|
251
253
|
|
|
@@ -253,7 +255,7 @@ $ npx @synkra/aios-core install --quiet --force
|
|
|
253
255
|
|
|
254
256
|
```bash
|
|
255
257
|
# Testar instalação sem modificar arquivos
|
|
256
|
-
$ npx
|
|
258
|
+
$ npx aios-core install --dry-run
|
|
257
259
|
|
|
258
260
|
[DRY RUN] Would create: ./my-project/
|
|
259
261
|
[DRY RUN] Would copy: .aios-core/ (45 files)
|
|
@@ -265,7 +267,7 @@ $ npx @synkra/aios-core install --dry-run
|
|
|
265
267
|
#### Diagnóstico do Sistema
|
|
266
268
|
|
|
267
269
|
```bash
|
|
268
|
-
$ npx
|
|
270
|
+
$ npx aios-core doctor
|
|
269
271
|
|
|
270
272
|
🏥 AIOS System Diagnostics
|
|
271
273
|
|
|
@@ -294,9 +296,9 @@ Dependencies:
|
|
|
294
296
|
#### Obter Ajuda
|
|
295
297
|
|
|
296
298
|
```bash
|
|
297
|
-
$ npx
|
|
299
|
+
$ npx aios-core --help
|
|
298
300
|
|
|
299
|
-
Usage:
|
|
301
|
+
Usage: aios-core [options] [command]
|
|
300
302
|
|
|
301
303
|
Synkra AIOS: AI-Orchestrated System for Full Stack Development
|
|
302
304
|
|
|
@@ -311,7 +313,7 @@ Commands:
|
|
|
311
313
|
doctor [options] Run system diagnostics and health checks
|
|
312
314
|
help [command] display help for command
|
|
313
315
|
|
|
314
|
-
Run '
|
|
316
|
+
Run 'aios-core <command> --help' for detailed information about each command.
|
|
315
317
|
```
|
|
316
318
|
|
|
317
319
|
### Alternativa: Clonar e Construir
|
|
@@ -699,4 +701,4 @@ Veja também:
|
|
|
699
701
|
|
|
700
702
|
---
|
|
701
703
|
|
|
702
|
-
**[⬆ Voltar ao topo](
|
|
704
|
+
**[⬆ Voltar ao topo](#synkra-aios-framework-universal-de-agentes-ia-)**
|
package/bin/aios-init.js
CHANGED
|
@@ -289,11 +289,12 @@ async function main() {
|
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
// Step 2: Install AIOS CORE agents and tasks for Claude Code
|
|
292
|
+
// v2.1: Agents and tasks are in development/ module
|
|
292
293
|
if (ides.includes('claude')) {
|
|
293
|
-
const coreAgentsSource = path.join(targetCoreDir, 'agents');
|
|
294
|
+
const coreAgentsSource = path.join(targetCoreDir, 'development', 'agents');
|
|
294
295
|
const coreAgentsTarget = path.join(context.projectRoot, '.claude', 'commands', 'AIOS', 'agents');
|
|
295
296
|
|
|
296
|
-
const coreTasksSource = path.join(targetCoreDir, 'tasks');
|
|
297
|
+
const coreTasksSource = path.join(targetCoreDir, 'development', 'tasks');
|
|
297
298
|
const coreTasksTarget = path.join(context.projectRoot, '.claude', 'commands', 'AIOS', 'tasks');
|
|
298
299
|
|
|
299
300
|
if (fs.existsSync(coreAgentsSource)) {
|
|
@@ -325,8 +326,9 @@ See .aios-core/user-guide.md for complete documentation.
|
|
|
325
326
|
}
|
|
326
327
|
|
|
327
328
|
// Step 3: Install AIOS CORE agents for Cursor
|
|
329
|
+
// v2.1: Agents are in development/ module
|
|
328
330
|
if (ides.includes('cursor')) {
|
|
329
|
-
const coreAgentsSource = path.join(targetCoreDir, 'agents');
|
|
331
|
+
const coreAgentsSource = path.join(targetCoreDir, 'development', 'agents');
|
|
330
332
|
const cursorRulesTarget = path.join(context.projectRoot, '.cursor', 'rules', 'AIOS', 'agents');
|
|
331
333
|
|
|
332
334
|
if (fs.existsSync(coreAgentsSource)) {
|
|
@@ -360,10 +362,11 @@ See .aios-core/user-guide.md for complete documentation.
|
|
|
360
362
|
}
|
|
361
363
|
|
|
362
364
|
// Step 4: Install AIOS CORE agents for other IDEs (Trae, Cline, Gemini, AntiGravity)
|
|
365
|
+
// v2.1: Agents are in development/ module
|
|
363
366
|
const otherIdeInstalls = ['trae', 'cline', 'gemini', 'antigravity'];
|
|
364
367
|
for (const ide of otherIdeInstalls) {
|
|
365
368
|
if (ides.includes(ide)) {
|
|
366
|
-
const coreAgentsSource = path.join(targetCoreDir, 'agents');
|
|
369
|
+
const coreAgentsSource = path.join(targetCoreDir, 'development', 'agents');
|
|
367
370
|
const ideRulesDir = ide === 'gemini' ? '.gemini' : `.${ide}`;
|
|
368
371
|
const ideRulesTarget = path.join(context.projectRoot, ideRulesDir, 'rules', 'AIOS', 'agents');
|
|
369
372
|
|
|
@@ -385,8 +388,9 @@ See .aios-core/user-guide.md for complete documentation.
|
|
|
385
388
|
}
|
|
386
389
|
|
|
387
390
|
// Step 5: Install Roo Code modes
|
|
391
|
+
// v2.1: Agents are in development/ module
|
|
388
392
|
if (ides.includes('roo')) {
|
|
389
|
-
const coreAgentsSource = path.join(targetCoreDir, 'agents');
|
|
393
|
+
const coreAgentsSource = path.join(targetCoreDir, 'development', 'agents');
|
|
390
394
|
const rooModesPath = path.join(context.projectRoot, '.roomodes');
|
|
391
395
|
|
|
392
396
|
if (fs.existsSync(coreAgentsSource)) {
|
|
@@ -412,8 +416,9 @@ See .aios-core/user-guide.md for complete documentation.
|
|
|
412
416
|
}
|
|
413
417
|
|
|
414
418
|
// Step 6: Install GitHub Copilot chat modes
|
|
419
|
+
// v2.1: Agents are in development/ module
|
|
415
420
|
if (ides.includes('github-copilot')) {
|
|
416
|
-
const coreAgentsSource = path.join(targetCoreDir, 'agents');
|
|
421
|
+
const coreAgentsSource = path.join(targetCoreDir, 'development', 'agents');
|
|
417
422
|
const copilotModesDir = path.join(context.projectRoot, '.github', 'chatmodes');
|
|
418
423
|
|
|
419
424
|
if (fs.existsSync(coreAgentsSource)) {
|
package/package.json
CHANGED
|
@@ -9,7 +9,6 @@ const fs = require('fs-extra');
|
|
|
9
9
|
const path = require('path');
|
|
10
10
|
const os = require('os');
|
|
11
11
|
const { configureEnvironment, updateGitignore } = require('../../src/config/configure-environment');
|
|
12
|
-
const pkg = require('../../../../package.json');
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* Cleanup helper with retry logic for flaky file system operations
|
|
@@ -73,7 +72,8 @@ describe('Environment Configuration Integration', () => {
|
|
|
73
72
|
|
|
74
73
|
const content = await fs.readFile(envPath, 'utf8');
|
|
75
74
|
expect(content).toContain('NODE_ENV=development');
|
|
76
|
-
|
|
75
|
+
// Version-agnostic: check AIOS_VERSION exists with valid semver format
|
|
76
|
+
expect(content).toMatch(/AIOS_VERSION=\d+\.\d+\.\d+/);
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
it('should create .env.example file', async () => {
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const { generateEnvContent, generateEnvExample } = require('../../src/config/templates/env-template');
|
|
9
|
-
const pkg = require('../../../../package.json');
|
|
10
9
|
|
|
11
10
|
describe('.env Template Generator', () => {
|
|
12
11
|
describe('generateEnvContent', () => {
|
|
@@ -14,7 +13,8 @@ describe('.env Template Generator', () => {
|
|
|
14
13
|
const content = generateEnvContent();
|
|
15
14
|
|
|
16
15
|
expect(content).toContain('NODE_ENV=development');
|
|
17
|
-
|
|
16
|
+
// Version-agnostic: check AIOS_VERSION exists with valid semver format
|
|
17
|
+
expect(content).toMatch(/AIOS_VERSION=\d+\.\d+\.\d+/);
|
|
18
18
|
expect(content).toContain('OPENAI_API_KEY=');
|
|
19
19
|
expect(content).toContain('ANTHROPIC_API_KEY=');
|
|
20
20
|
expect(content).toContain('# Synkra AIOS Environment Configuration');
|
|
@@ -84,7 +84,8 @@ describe('.env Template Generator', () => {
|
|
|
84
84
|
const content = generateEnvExample();
|
|
85
85
|
|
|
86
86
|
expect(content).toContain('NODE_ENV=development');
|
|
87
|
-
|
|
87
|
+
// Version-agnostic: check AIOS_VERSION exists with valid semver format
|
|
88
|
+
expect(content).toMatch(/AIOS_VERSION=\d+\.\d+\.\d+/);
|
|
88
89
|
expect(content).toContain('OPENAI_API_KEY=');
|
|
89
90
|
expect(content).toContain('ANTHROPIC_API_KEY=');
|
|
90
91
|
expect(content).toContain('CLICKUP_API_KEY=');
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* AIOS-Core Installation Diagnostic Tool
|
|
4
|
+
*
|
|
5
|
+
* Run this script to diagnose installation issues:
|
|
6
|
+
* node diagnose-installation.js
|
|
7
|
+
*
|
|
8
|
+
* Or directly from URL:
|
|
9
|
+
* npx https://raw.githubusercontent.com/SynkraAI/aios-core/main/tools/diagnose-installation.js
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const { execSync, spawnSync } = require('child_process');
|
|
13
|
+
const os = require('os');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
const fs = require('fs');
|
|
16
|
+
|
|
17
|
+
const REQUIRED_NODE = '18.0.0';
|
|
18
|
+
const REQUIRED_NPM = '9.0.0';
|
|
19
|
+
|
|
20
|
+
console.log('');
|
|
21
|
+
console.log('╔══════════════════════════════════════════════════════════════════╗');
|
|
22
|
+
console.log('║ AIOS-Core Installation Diagnostic Tool ║');
|
|
23
|
+
console.log('╚══════════════════════════════════════════════════════════════════╝');
|
|
24
|
+
console.log('');
|
|
25
|
+
|
|
26
|
+
// Helper functions
|
|
27
|
+
function exec(cmd) {
|
|
28
|
+
try {
|
|
29
|
+
return execSync(cmd, { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }).trim();
|
|
30
|
+
} catch (e) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function compareVersions(v1, v2) {
|
|
36
|
+
const parts1 = v1.split('.').map(Number);
|
|
37
|
+
const parts2 = v2.split('.').map(Number);
|
|
38
|
+
for (let i = 0; i < 3; i++) {
|
|
39
|
+
if ((parts1[i] || 0) > (parts2[i] || 0)) return 1;
|
|
40
|
+
if ((parts1[i] || 0) < (parts2[i] || 0)) return -1;
|
|
41
|
+
}
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function checkMark(ok) {
|
|
46
|
+
return ok ? '✓' : '✗';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
let hasErrors = false;
|
|
50
|
+
let hasWarnings = false;
|
|
51
|
+
|
|
52
|
+
// 1. System Information
|
|
53
|
+
console.log('── System Information ──────────────────────────────────────────────');
|
|
54
|
+
console.log(` Platform: ${os.platform()} (${os.arch()})`);
|
|
55
|
+
console.log(` OS: ${os.type()} ${os.release()}`);
|
|
56
|
+
console.log(` Hostname: ${os.hostname()}`);
|
|
57
|
+
console.log(` Home: ${os.homedir()}`);
|
|
58
|
+
console.log(` User: ${os.userInfo().username}`);
|
|
59
|
+
console.log('');
|
|
60
|
+
|
|
61
|
+
// 2. Node.js Check
|
|
62
|
+
console.log('── Node.js ─────────────────────────────────────────────────────────');
|
|
63
|
+
const nodeVersion = exec('node --version');
|
|
64
|
+
if (nodeVersion) {
|
|
65
|
+
const nodeVer = nodeVersion.replace('v', '');
|
|
66
|
+
const nodeOk = compareVersions(nodeVer, REQUIRED_NODE) >= 0;
|
|
67
|
+
console.log(` ${checkMark(nodeOk)} Version: ${nodeVersion} (required: >= v${REQUIRED_NODE})`);
|
|
68
|
+
if (!nodeOk) {
|
|
69
|
+
console.log(` ⚠️ ERROR: Node.js version too old! Please upgrade to v${REQUIRED_NODE} or higher.`);
|
|
70
|
+
console.log(` 📥 Download: https://nodejs.org/`);
|
|
71
|
+
hasErrors = true;
|
|
72
|
+
}
|
|
73
|
+
const nodePath = exec('where node') || exec('which node');
|
|
74
|
+
console.log(` Path: ${nodePath ? nodePath.split('\n')[0] : 'NOT FOUND'}`);
|
|
75
|
+
} else {
|
|
76
|
+
console.log(' ✗ Node.js: NOT INSTALLED');
|
|
77
|
+
console.log(' ⚠️ ERROR: Node.js is required!');
|
|
78
|
+
console.log(' 📥 Download: https://nodejs.org/');
|
|
79
|
+
hasErrors = true;
|
|
80
|
+
}
|
|
81
|
+
console.log('');
|
|
82
|
+
|
|
83
|
+
// 3. npm Check
|
|
84
|
+
console.log('── npm ─────────────────────────────────────────────────────────────');
|
|
85
|
+
const npmVersion = exec('npm --version');
|
|
86
|
+
if (npmVersion) {
|
|
87
|
+
const npmOk = compareVersions(npmVersion, REQUIRED_NPM) >= 0;
|
|
88
|
+
console.log(` ${checkMark(npmOk)} Version: v${npmVersion} (required: >= v${REQUIRED_NPM})`);
|
|
89
|
+
if (!npmOk) {
|
|
90
|
+
console.log(` ⚠️ ERROR: npm version too old! Please upgrade.`);
|
|
91
|
+
console.log(` 📥 Run: npm install -g npm@latest`);
|
|
92
|
+
hasErrors = true;
|
|
93
|
+
}
|
|
94
|
+
const npmPath = exec('where npm') || exec('which npm');
|
|
95
|
+
console.log(` Path: ${npmPath ? npmPath.split('\n')[0] : 'NOT FOUND'}`);
|
|
96
|
+
} else {
|
|
97
|
+
console.log(' ✗ npm: NOT INSTALLED');
|
|
98
|
+
console.log(' ⚠️ ERROR: npm is required!');
|
|
99
|
+
hasErrors = true;
|
|
100
|
+
}
|
|
101
|
+
console.log('');
|
|
102
|
+
|
|
103
|
+
// 4. npx Check
|
|
104
|
+
console.log('── npx ─────────────────────────────────────────────────────────────');
|
|
105
|
+
const npxVersion = exec('npx --version');
|
|
106
|
+
if (npxVersion) {
|
|
107
|
+
console.log(` ✓ Version: v${npxVersion}`);
|
|
108
|
+
const npxPath = exec('where npx') || exec('which npx');
|
|
109
|
+
console.log(` Path: ${npxPath ? npxPath.split('\n')[0] : 'NOT FOUND'}`);
|
|
110
|
+
} else {
|
|
111
|
+
console.log(' ✗ npx: NOT FOUND');
|
|
112
|
+
console.log(' ⚠️ ERROR: npx is required! Usually comes with npm.');
|
|
113
|
+
hasErrors = true;
|
|
114
|
+
}
|
|
115
|
+
console.log('');
|
|
116
|
+
|
|
117
|
+
// 5. Git Check
|
|
118
|
+
console.log('── Git ─────────────────────────────────────────────────────────────');
|
|
119
|
+
const gitVersion = exec('git --version');
|
|
120
|
+
if (gitVersion) {
|
|
121
|
+
console.log(` ✓ Version: ${gitVersion.replace('git version ', 'v')}`);
|
|
122
|
+
} else {
|
|
123
|
+
console.log(' ✗ Git: NOT INSTALLED');
|
|
124
|
+
console.log(' ⚠️ WARNING: Git is recommended for full functionality.');
|
|
125
|
+
console.log(' 📥 Download: https://git-scm.com/');
|
|
126
|
+
hasWarnings = true;
|
|
127
|
+
}
|
|
128
|
+
console.log('');
|
|
129
|
+
|
|
130
|
+
// 6. npm Configuration
|
|
131
|
+
console.log('── npm Configuration ───────────────────────────────────────────────');
|
|
132
|
+
const npmPrefix = exec('npm config get prefix');
|
|
133
|
+
const npmCache = exec('npm config get cache');
|
|
134
|
+
const npmRegistry = exec('npm config get registry');
|
|
135
|
+
console.log(` Prefix: ${npmPrefix || 'NOT SET'}`);
|
|
136
|
+
console.log(` Cache: ${npmCache || 'NOT SET'}`);
|
|
137
|
+
console.log(` Registry: ${npmRegistry || 'NOT SET'}`);
|
|
138
|
+
|
|
139
|
+
// Check if prefix is in PATH
|
|
140
|
+
if (npmPrefix) {
|
|
141
|
+
const pathEnv = process.env.PATH || process.env.Path || '';
|
|
142
|
+
const inPath = pathEnv.toLowerCase().includes(npmPrefix.toLowerCase());
|
|
143
|
+
console.log(` ${checkMark(inPath)} In PATH: ${inPath ? 'Yes' : 'NO - This may cause issues!'}`);
|
|
144
|
+
if (!inPath) {
|
|
145
|
+
console.log(` ⚠️ WARNING: npm prefix is not in PATH!`);
|
|
146
|
+
console.log(` 📝 Add this to your PATH: ${npmPrefix}`);
|
|
147
|
+
hasWarnings = true;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
console.log('');
|
|
151
|
+
|
|
152
|
+
// 7. Network Check
|
|
153
|
+
console.log('── Network Access ──────────────────────────────────────────────────');
|
|
154
|
+
const registryCheck = exec('npm ping 2>&1');
|
|
155
|
+
if (registryCheck && registryCheck.includes('PONG')) {
|
|
156
|
+
console.log(' ✓ npm registry is accessible');
|
|
157
|
+
} else {
|
|
158
|
+
// Try curl/wget
|
|
159
|
+
const curlCheck = exec('curl -s -o /dev/null -w "%{http_code}" https://registry.npmjs.org/ 2>&1');
|
|
160
|
+
if (curlCheck === '200') {
|
|
161
|
+
console.log(' ✓ npm registry is accessible (via curl)');
|
|
162
|
+
} else {
|
|
163
|
+
console.log(' ⚠️ Cannot verify npm registry access');
|
|
164
|
+
console.log(` Registry check result: ${registryCheck || 'no response'}`);
|
|
165
|
+
hasWarnings = true;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
console.log('');
|
|
169
|
+
|
|
170
|
+
// 8. Package Availability Check
|
|
171
|
+
console.log('── Package Availability ────────────────────────────────────────────');
|
|
172
|
+
const pkgInfo = exec('npm view aios-core version 2>&1');
|
|
173
|
+
if (pkgInfo && !pkgInfo.includes('E404') && !pkgInfo.includes('error')) {
|
|
174
|
+
console.log(` ✓ aios-core v${pkgInfo} is available on npm`);
|
|
175
|
+
} else {
|
|
176
|
+
console.log(' ⚠️ Cannot verify aios-core package availability');
|
|
177
|
+
console.log(` Result: ${pkgInfo || 'no response'}`);
|
|
178
|
+
hasWarnings = true;
|
|
179
|
+
}
|
|
180
|
+
console.log('');
|
|
181
|
+
|
|
182
|
+
// 9. Permission Check (Windows/Unix)
|
|
183
|
+
console.log('── Permissions ─────────────────────────────────────────────────────');
|
|
184
|
+
if (os.platform() === 'win32') {
|
|
185
|
+
// Check PowerShell execution policy
|
|
186
|
+
const psPolicy = exec('powershell -Command "Get-ExecutionPolicy"');
|
|
187
|
+
if (psPolicy) {
|
|
188
|
+
const policyOk = ['Unrestricted', 'RemoteSigned', 'Bypass'].includes(psPolicy);
|
|
189
|
+
console.log(` ${checkMark(policyOk)} PowerShell Execution Policy: ${psPolicy}`);
|
|
190
|
+
if (!policyOk) {
|
|
191
|
+
console.log(' ⚠️ WARNING: Restricted policy may block scripts.');
|
|
192
|
+
console.log(' 📝 Run: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser');
|
|
193
|
+
hasWarnings = true;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
} else {
|
|
197
|
+
// Check npm global folder permissions
|
|
198
|
+
if (npmPrefix && fs.existsSync(npmPrefix)) {
|
|
199
|
+
try {
|
|
200
|
+
fs.accessSync(npmPrefix, fs.constants.W_OK);
|
|
201
|
+
console.log(' ✓ npm prefix is writable');
|
|
202
|
+
} catch {
|
|
203
|
+
console.log(' ✗ npm prefix is NOT writable');
|
|
204
|
+
console.log(' ⚠️ WARNING: May need sudo or fix permissions');
|
|
205
|
+
hasWarnings = true;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
console.log('');
|
|
210
|
+
|
|
211
|
+
// 10. Test npx execution
|
|
212
|
+
console.log('── npx Test ────────────────────────────────────────────────────────');
|
|
213
|
+
console.log(' Testing: npx aios-core@latest --version');
|
|
214
|
+
const npxTest = exec('npx aios-core@latest --version 2>&1');
|
|
215
|
+
if (npxTest && npxTest.match(/\d+\.\d+\.\d+/)) {
|
|
216
|
+
console.log(` ✓ SUCCESS: ${npxTest}`);
|
|
217
|
+
} else {
|
|
218
|
+
console.log(` ✗ FAILED: ${npxTest || 'no output'}`);
|
|
219
|
+
hasErrors = true;
|
|
220
|
+
}
|
|
221
|
+
console.log('');
|
|
222
|
+
|
|
223
|
+
// Summary
|
|
224
|
+
console.log('══════════════════════════════════════════════════════════════════');
|
|
225
|
+
if (hasErrors) {
|
|
226
|
+
console.log('❌ RESULT: Installation requirements NOT met');
|
|
227
|
+
console.log('');
|
|
228
|
+
console.log('COMMON FIXES:');
|
|
229
|
+
console.log(' 1. Update Node.js: https://nodejs.org/ (download LTS version)');
|
|
230
|
+
console.log(' 2. Update npm: npm install -g npm@latest');
|
|
231
|
+
console.log(' 3. Clear npm cache: npm cache clean --force');
|
|
232
|
+
console.log(' 4. Check firewall/proxy settings');
|
|
233
|
+
console.log('');
|
|
234
|
+
} else if (hasWarnings) {
|
|
235
|
+
console.log('⚠️ RESULT: May work but some issues detected');
|
|
236
|
+
console.log(' Review warnings above for optimal setup.');
|
|
237
|
+
console.log('');
|
|
238
|
+
} else {
|
|
239
|
+
console.log('✅ RESULT: All requirements met!');
|
|
240
|
+
console.log('');
|
|
241
|
+
console.log('You can install AIOS-Core with:');
|
|
242
|
+
console.log(' npx aios-core@latest');
|
|
243
|
+
console.log('');
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// Output machine-readable summary
|
|
247
|
+
const summary = {
|
|
248
|
+
timestamp: new Date().toISOString(),
|
|
249
|
+
platform: os.platform(),
|
|
250
|
+
arch: os.arch(),
|
|
251
|
+
node: nodeVersion,
|
|
252
|
+
npm: npmVersion,
|
|
253
|
+
npx: npxVersion,
|
|
254
|
+
git: gitVersion,
|
|
255
|
+
npmPrefix,
|
|
256
|
+
npmCache,
|
|
257
|
+
npmRegistry,
|
|
258
|
+
hasErrors,
|
|
259
|
+
hasWarnings,
|
|
260
|
+
npxTestResult: npxTest
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
const summaryFile = path.join(os.tmpdir(), 'aios-diagnostic-result.json');
|
|
264
|
+
fs.writeFileSync(summaryFile, JSON.stringify(summary, null, 2));
|
|
265
|
+
console.log(`📋 Full diagnostic saved to: ${summaryFile}`);
|
|
266
|
+
console.log('');
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Diagnóstico de problema com npx aios-core
|
|
2
|
+
# Execute este script no PC com problema
|
|
3
|
+
|
|
4
|
+
Write-Host ""
|
|
5
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
6
|
+
Write-Host " Diagnóstico NPX aios-core" -ForegroundColor Cyan
|
|
7
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
8
|
+
Write-Host ""
|
|
9
|
+
|
|
10
|
+
# 1. Verificar versões
|
|
11
|
+
Write-Host "[1] Versões instaladas:" -ForegroundColor Yellow
|
|
12
|
+
Write-Host " Node.js: $(node --version)"
|
|
13
|
+
Write-Host " npm: $(npm --version)"
|
|
14
|
+
Write-Host " npx: $(npx --version)"
|
|
15
|
+
Write-Host ""
|
|
16
|
+
|
|
17
|
+
# 2. Verificar se Node funciona corretamente
|
|
18
|
+
Write-Host "[2] Testando Node.js básico:" -ForegroundColor Yellow
|
|
19
|
+
$nodeTest = node -e "console.log('OK: Node funciona')" 2>&1
|
|
20
|
+
Write-Host " $nodeTest"
|
|
21
|
+
Write-Host ""
|
|
22
|
+
|
|
23
|
+
# 3. Verificar cache npx
|
|
24
|
+
Write-Host "[3] Limpando cache npx..." -ForegroundColor Yellow
|
|
25
|
+
npm cache clean --force 2>&1 | Out-Null
|
|
26
|
+
Write-Host " Cache limpo"
|
|
27
|
+
Write-Host ""
|
|
28
|
+
|
|
29
|
+
# 4. Tentar baixar e executar manualmente
|
|
30
|
+
Write-Host "[4] Baixando aios-core manualmente..." -ForegroundColor Yellow
|
|
31
|
+
$tempDir = "$env:TEMP\aios-test-$(Get-Random)"
|
|
32
|
+
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
|
33
|
+
Set-Location $tempDir
|
|
34
|
+
|
|
35
|
+
Write-Host " Diretório: $tempDir"
|
|
36
|
+
npm pack aios-core@2.2.0 2>&1 | Out-Null
|
|
37
|
+
|
|
38
|
+
if (Test-Path "aios-core-2.2.0.tgz") {
|
|
39
|
+
Write-Host " Download: OK" -ForegroundColor Green
|
|
40
|
+
|
|
41
|
+
# Extrair
|
|
42
|
+
tar -xzf aios-core-2.2.0.tgz 2>&1 | Out-Null
|
|
43
|
+
|
|
44
|
+
if (Test-Path "package/bin/aios.js") {
|
|
45
|
+
Write-Host " Extração: OK" -ForegroundColor Green
|
|
46
|
+
|
|
47
|
+
# Tentar executar
|
|
48
|
+
Write-Host ""
|
|
49
|
+
Write-Host "[5] Executando bin/aios.js --version:" -ForegroundColor Yellow
|
|
50
|
+
try {
|
|
51
|
+
$result = node package/bin/aios.js --version 2>&1
|
|
52
|
+
if ($result -match "^\d+\.\d+\.\d+$") {
|
|
53
|
+
Write-Host " Resultado: $result" -ForegroundColor Green
|
|
54
|
+
} else {
|
|
55
|
+
Write-Host " Resultado inesperado: $result" -ForegroundColor Red
|
|
56
|
+
}
|
|
57
|
+
} catch {
|
|
58
|
+
Write-Host " ERRO: $($_.Exception.Message)" -ForegroundColor Red
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
# Tentar executar o wizard
|
|
62
|
+
Write-Host ""
|
|
63
|
+
Write-Host "[6] Testando wizard (Ctrl+C para cancelar):" -ForegroundColor Yellow
|
|
64
|
+
Write-Host " Executando: node package/bin/aios.js --help"
|
|
65
|
+
node package/bin/aios.js --help 2>&1
|
|
66
|
+
|
|
67
|
+
} else {
|
|
68
|
+
Write-Host " Extração: FALHOU - bin/aios.js não encontrado" -ForegroundColor Red
|
|
69
|
+
Write-Host " Conteúdo do package:"
|
|
70
|
+
Get-ChildItem package -Recurse | Select-Object -First 20
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
Write-Host " Download: FALHOU" -ForegroundColor Red
|
|
74
|
+
Write-Host " Verifique sua conexão com a internet"
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
# Limpar
|
|
78
|
+
Set-Location $env:USERPROFILE
|
|
79
|
+
Remove-Item -Recurse -Force $tempDir -ErrorAction SilentlyContinue
|
|
80
|
+
|
|
81
|
+
Write-Host ""
|
|
82
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
83
|
+
Write-Host " Diagnóstico Completo" -ForegroundColor Cyan
|
|
84
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
85
|
+
Write-Host ""
|
|
86
|
+
|
|
87
|
+
# Recomendação
|
|
88
|
+
Write-Host "RECOMENDAÇÃO:" -ForegroundColor Yellow
|
|
89
|
+
Write-Host "Node v24 é uma versão EXPERIMENTAL e pode ter problemas."
|
|
90
|
+
Write-Host ""
|
|
91
|
+
Write-Host "Solução recomendada:" -ForegroundColor Green
|
|
92
|
+
Write-Host "1. Baixe Node.js LTS (v22 ou v20) de: https://nodejs.org/"
|
|
93
|
+
Write-Host "2. Desinstale Node v24"
|
|
94
|
+
Write-Host "3. Instale a versão LTS"
|
|
95
|
+
Write-Host "4. Tente novamente: npx aios-core@latest"
|
|
96
|
+
Write-Host ""
|
|
@@ -0,0 +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
|
|
@@ -0,0 +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 ""
|