@ornexus/neocortex 3.9.28 → 3.9.29
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/install.ps1 +52 -14
- package/install.sh +1 -1
- package/package.json +2 -2
- package/postinstall.js +95 -13
- package/targets-stubs/antigravity/gemini.md +1 -1
- package/targets-stubs/antigravity/skill/SKILL.md +1 -1
- package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
- package/targets-stubs/claude-code/neocortex.md +2 -2
- package/targets-stubs/codex/agents.md +1 -1
- package/targets-stubs/cursor/agent.md +2 -2
- package/targets-stubs/gemini-cli/agent.md +2 -2
- package/targets-stubs/vscode/agent.md +2 -2
package/install.ps1
CHANGED
|
@@ -15,7 +15,7 @@ param(
|
|
|
15
15
|
[string]$ServerUrl = "https://api.neocortex.ornexus.com"
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
-
$VERSION = "3.9.
|
|
18
|
+
$VERSION = "3.9.29"
|
|
19
19
|
|
|
20
20
|
# =============================================================================
|
|
21
21
|
# CONFIGURACOES
|
|
@@ -242,11 +242,15 @@ function Get-SourceDirectory {
|
|
|
242
242
|
".\node_modules\neocortex"
|
|
243
243
|
)
|
|
244
244
|
foreach ($dir in $possibleDirs) {
|
|
245
|
+
# Epic 64 (Story 64.6): Debug each possibleDir tested
|
|
246
|
+
Write-Dbg "Get-SourceDirectory: testing $dir"
|
|
245
247
|
$expandedDirs = Get-Item $dir -ErrorAction SilentlyContinue
|
|
246
248
|
foreach ($expanded in $expandedDirs) {
|
|
247
|
-
|
|
249
|
+
$found = (Test-Path "$($expanded.FullName)\targets-stubs\claude-code\neocortex.md") -or
|
|
248
250
|
(Test-Path "$($expanded.FullName)\targets\claude-code\neocortex.md") -or
|
|
249
|
-
(Test-Path "$($expanded.FullName)\neocortex.md")
|
|
251
|
+
(Test-Path "$($expanded.FullName)\neocortex.md")
|
|
252
|
+
Write-Dbg "Get-SourceDirectory: $($expanded.FullName) found=$found"
|
|
253
|
+
if ($found) {
|
|
250
254
|
$script:SourceDir = $expanded.FullName
|
|
251
255
|
break
|
|
252
256
|
}
|
|
@@ -502,6 +506,10 @@ function Verify-Installation {
|
|
|
502
506
|
foreach ($entry in $criticalFiles) {
|
|
503
507
|
$fpath = Join-Path $script:DestDir $entry.Name
|
|
504
508
|
$fname = $entry.Name
|
|
509
|
+
# Epic 64 (Story 64.6): Debug file verification details
|
|
510
|
+
$fileExists = Test-Path $fpath -PathType Leaf
|
|
511
|
+
$fileSize = if ($fileExists) { (Get-Item $fpath).Length } else { 0 }
|
|
512
|
+
Write-Dbg "Verify-Installation: $fname exists=$fileExists size=$fileSize path=$fpath"
|
|
505
513
|
|
|
506
514
|
if (-not (Test-Path $fpath -PathType Leaf)) {
|
|
507
515
|
$report += @{ Status = "FAIL"; Detail = "$fname (nao encontrado)" }
|
|
@@ -591,7 +599,16 @@ function Verify-Installation {
|
|
|
591
599
|
return $true
|
|
592
600
|
}
|
|
593
601
|
|
|
594
|
-
|
|
602
|
+
# Epic 64 (Story 64.3): In quiet mode, report FAILs before returning
|
|
603
|
+
if ($QUIET_MODE) {
|
|
604
|
+
if ($fails -gt 0) {
|
|
605
|
+
# Critical failures MUST be visible even in quiet mode
|
|
606
|
+
Write-Fail "Verificacao falhou: $fails arquivo(s) critico(s) faltando"
|
|
607
|
+
foreach ($entry in ($report | Where-Object { $_.Status -eq "FAIL" })) {
|
|
608
|
+
Write-Fail " $($entry.Detail)"
|
|
609
|
+
}
|
|
610
|
+
return $false
|
|
611
|
+
}
|
|
595
612
|
return $true # In quiet mode, skip warnings-only report
|
|
596
613
|
}
|
|
597
614
|
|
|
@@ -699,8 +716,10 @@ function Install-Core {
|
|
|
699
716
|
if (Test-Path $coreSource -PathType Container) {
|
|
700
717
|
Copy-Item -Path $coreSource -Destination "$script:DestDir\" -Recurse -Force -ErrorAction SilentlyContinue
|
|
701
718
|
}
|
|
702
|
-
Copy-Silent "$($script:SourceDir)\package.json" "$script:DestDir\"
|
|
703
|
-
|
|
719
|
+
$r = Copy-Silent "$($script:SourceDir)\package.json" "$script:DestDir\"
|
|
720
|
+
if (-not $r) { Write-Fail "Falha ao copiar package.json (Install-Core)" }
|
|
721
|
+
$r = Copy-Silent "$($script:SourceDir)\README.md" "$script:DestDir\"
|
|
722
|
+
if (-not $r) { Write-Fail "Falha ao copiar README.md (Install-Core)" }
|
|
704
723
|
} else {
|
|
705
724
|
# Tier 3 Remote Mode: NAO copiar IP
|
|
706
725
|
# Nota: Invoke-AutoCleanupLegacy ja rodou no inicio - aqui apenas config
|
|
@@ -805,10 +824,22 @@ function Install-Agent {
|
|
|
805
824
|
$claudeTargetDir = $script:SourceDir
|
|
806
825
|
}
|
|
807
826
|
|
|
827
|
+
# Epic 64 (Story 64.6): Debug diagnostics for Install-Agent
|
|
828
|
+
Write-Dbg "Install-Agent: SourceDir=$($script:SourceDir)"
|
|
829
|
+
Write-Dbg "Install-Agent: DestDir=$($script:DestDir)"
|
|
830
|
+
Write-Dbg "Install-Agent: claudeTargetDir=$claudeTargetDir"
|
|
831
|
+
Write-Dbg "Install-Agent: neocortex.md exists=$(Test-Path "$claudeTargetDir\neocortex.md")"
|
|
832
|
+
Write-Dbg "Install-Agent: neocortex.agent.yaml exists=$(Test-Path "$claudeTargetDir\neocortex.agent.yaml")"
|
|
833
|
+
|
|
808
834
|
# SEMPRE copiar os 3 arquivos de interface
|
|
809
835
|
# Tier 3: Copy only 2 stub files
|
|
810
|
-
Copy-Silent
|
|
811
|
-
Copy-Silent "$claudeTargetDir\neocortex.
|
|
836
|
+
# Epic 64 (Story 64.2): Capture Copy-Silent return and check for errors
|
|
837
|
+
$stubResult1 = Copy-Silent "$claudeTargetDir\neocortex.md" "$script:DestDir\"
|
|
838
|
+
if (-not $stubResult1) { Write-Fail "Falha ao copiar neocortex.md de $claudeTargetDir" }
|
|
839
|
+
Write-Dbg "Install-Agent: Copy neocortex.md result=$stubResult1"
|
|
840
|
+
$stubResult2 = Copy-Silent "$claudeTargetDir\neocortex.agent.yaml" "$script:DestDir\"
|
|
841
|
+
if (-not $stubResult2) { Write-Fail "Falha ao copiar neocortex.agent.yaml de $claudeTargetDir" }
|
|
842
|
+
Write-Dbg "Install-Agent: Copy neocortex.agent.yaml result=$stubResult2"
|
|
812
843
|
# Cleanup workflow.md from previous versions
|
|
813
844
|
if (Test-Path "$script:DestDir\workflow.md") {
|
|
814
845
|
Remove-Item "$script:DestDir\workflow.md" -Force -ErrorAction SilentlyContinue
|
|
@@ -816,8 +847,10 @@ function Install-Agent {
|
|
|
816
847
|
|
|
817
848
|
if ($LOCAL_MODE) {
|
|
818
849
|
# Modo local: copiar IP completa (comportamento legado para devs)
|
|
819
|
-
Copy-Silent "$($script:SourceDir)\package.json" "$script:DestDir\"
|
|
820
|
-
|
|
850
|
+
$r = Copy-Silent "$($script:SourceDir)\package.json" "$script:DestDir\"
|
|
851
|
+
if (-not $r) { Write-Fail "Falha ao copiar package.json" }
|
|
852
|
+
$r = Copy-Silent "$($script:SourceDir)\README.md" "$script:DestDir\"
|
|
853
|
+
if (-not $r) { Write-Fail "Falha ao copiar README.md" }
|
|
821
854
|
|
|
822
855
|
$coreSource = Join-Path $script:SourceDir "core"
|
|
823
856
|
if (Test-Path $coreSource -PathType Container) {
|
|
@@ -1296,8 +1329,11 @@ function New-ProjectDirectories {
|
|
|
1296
1329
|
|
|
1297
1330
|
# SEMPRE copiar os 3 arquivos de interface
|
|
1298
1331
|
# Tier 3: Copy only 2 stub files
|
|
1299
|
-
|
|
1300
|
-
Copy-Silent "$claudeTargetDir\neocortex.
|
|
1332
|
+
# Epic 64 (Story 64.2): Capture Copy-Silent return
|
|
1333
|
+
$r = Copy-Silent "$claudeTargetDir\neocortex.md" "$agentDest\"
|
|
1334
|
+
if (-not $r) { Write-Fail "Falha ao copiar neocortex.md (projeto)" }
|
|
1335
|
+
$r = Copy-Silent "$claudeTargetDir\neocortex.agent.yaml" "$agentDest\"
|
|
1336
|
+
if (-not $r) { Write-Fail "Falha ao copiar neocortex.agent.yaml (projeto)" }
|
|
1301
1337
|
# Cleanup workflow.md from previous versions
|
|
1302
1338
|
if (Test-Path "$agentDest\workflow.md") {
|
|
1303
1339
|
Remove-Item "$agentDest\workflow.md" -Force -ErrorAction SilentlyContinue
|
|
@@ -1305,8 +1341,10 @@ function New-ProjectDirectories {
|
|
|
1305
1341
|
|
|
1306
1342
|
if ($LOCAL_MODE) {
|
|
1307
1343
|
# Modo local: copiar IP completa (comportamento legado)
|
|
1308
|
-
Copy-Silent "$($script:SourceDir)\package.json" "$agentDest\"
|
|
1309
|
-
|
|
1344
|
+
$r = Copy-Silent "$($script:SourceDir)\package.json" "$agentDest\"
|
|
1345
|
+
if (-not $r) { Write-Fail "Falha ao copiar package.json (projeto)" }
|
|
1346
|
+
$r = Copy-Silent "$($script:SourceDir)\README.md" "$agentDest\"
|
|
1347
|
+
if (-not $r) { Write-Fail "Falha ao copiar README.md (projeto)" }
|
|
1310
1348
|
New-Item -ItemType Directory -Path "$agentDest\core" -Force | Out-Null
|
|
1311
1349
|
Copy-Item -Path "$coreSource\*" -Destination "$agentDest\core\" -Recurse -Force -ErrorAction SilentlyContinue
|
|
1312
1350
|
foreach ($folder in @("steps-c", "steps-e", "steps-p", "steps-r", "steps-u")) {
|
package/install.sh
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ornexus/neocortex",
|
|
3
|
-
"version": "3.9.
|
|
4
|
-
"description": "Neocortex v3.9.
|
|
3
|
+
"version": "3.9.29",
|
|
4
|
+
"description": "Neocortex v3.9.29 - Orquestrador de Desenvolvimento de Epics & Stories para Claude Code",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
7
7
|
"claude-code",
|
package/postinstall.js
CHANGED
|
@@ -35,9 +35,20 @@ function showUsageMessage() {
|
|
|
35
35
|
console.log(' @neocortex *status\n');
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
function showErrorMessage() {
|
|
39
|
+
console.error('\n[x] Instalacao do Neocortex falhou.\n');
|
|
40
|
+
console.error('Troubleshooting:');
|
|
41
|
+
console.error(' 1. Execute manualmente: npx @ornexus/neocortex -Debug');
|
|
42
|
+
console.error(' 2. Verifique permissoes no diretorio ~/.claude/');
|
|
43
|
+
console.error(' 3. Reporte em: https://github.com/OrNexus-AI/neocortex/issues\n');
|
|
44
|
+
}
|
|
45
|
+
|
|
38
46
|
function runInstaller() {
|
|
39
47
|
const platform = os.platform();
|
|
40
48
|
|
|
49
|
+
// Epic 64: Check NEOCORTEX_DEBUG env var for debug mode
|
|
50
|
+
const debugMode = process.env.NEOCORTEX_DEBUG === '1';
|
|
51
|
+
|
|
41
52
|
if (platform === 'win32') {
|
|
42
53
|
// Windows: run install.ps1
|
|
43
54
|
const scriptPath = path.join(__dirname, 'install.ps1');
|
|
@@ -46,19 +57,54 @@ function runInstaller() {
|
|
|
46
57
|
return;
|
|
47
58
|
}
|
|
48
59
|
|
|
60
|
+
const baseFlags = ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', scriptPath];
|
|
61
|
+
const quietFlags = ['-Yes', '-Quiet', '-SkipProject'];
|
|
62
|
+
const retryFlags = ['-Yes', '-SkipProject'];
|
|
63
|
+
if (debugMode) {
|
|
64
|
+
quietFlags.push('-Debug');
|
|
65
|
+
retryFlags.push('-Debug');
|
|
66
|
+
}
|
|
67
|
+
|
|
49
68
|
const shells = ['pwsh', 'powershell'];
|
|
69
|
+
let hasRetried = false;
|
|
70
|
+
|
|
71
|
+
function retryWithoutQuiet(shellCmd) {
|
|
72
|
+
if (hasRetried) {
|
|
73
|
+
showErrorMessage();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
hasRetried = true;
|
|
77
|
+
console.log('\nInstalacao falhou. Re-executando com output detalhado...\n');
|
|
78
|
+
const retryChild = spawn(shellCmd, [...baseFlags, ...retryFlags], {
|
|
79
|
+
stdio: 'inherit', shell: false, timeout: 60000
|
|
80
|
+
});
|
|
81
|
+
retryChild.on('error', () => showErrorMessage());
|
|
82
|
+
retryChild.on('exit', (retryCode) => {
|
|
83
|
+
if (retryCode === 0) {
|
|
84
|
+
showUsageMessage();
|
|
85
|
+
} else {
|
|
86
|
+
showErrorMessage();
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
50
91
|
function tryShell(index) {
|
|
51
92
|
if (index >= shells.length) {
|
|
52
93
|
showUsageMessage();
|
|
53
94
|
return;
|
|
54
95
|
}
|
|
55
|
-
const child = spawn(shells[index], [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
], { stdio: 'inherit', shell: false });
|
|
96
|
+
const child = spawn(shells[index], [...baseFlags, ...quietFlags], {
|
|
97
|
+
stdio: 'inherit', shell: false
|
|
98
|
+
});
|
|
59
99
|
|
|
60
100
|
child.on('error', () => tryShell(index + 1));
|
|
61
|
-
child.on('exit', () => {
|
|
101
|
+
child.on('exit', (code) => {
|
|
102
|
+
if (code === 0) {
|
|
103
|
+
showUsageMessage();
|
|
104
|
+
} else {
|
|
105
|
+
retryWithoutQuiet(shells[index]);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
62
108
|
}
|
|
63
109
|
tryShell(0);
|
|
64
110
|
} else {
|
|
@@ -71,19 +117,55 @@ function runInstaller() {
|
|
|
71
117
|
|
|
72
118
|
try { fs.chmodSync(scriptPath, '755'); } catch { /* ignore */ }
|
|
73
119
|
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
120
|
+
const quietArgs = [scriptPath, '--yes', '--quiet', '--skip-project'];
|
|
121
|
+
const retryArgs = [scriptPath, '--yes', '--skip-project'];
|
|
122
|
+
if (debugMode) {
|
|
123
|
+
quietArgs.push('--debug');
|
|
124
|
+
retryArgs.push('--debug');
|
|
125
|
+
}
|
|
126
|
+
let hasRetried = false;
|
|
127
|
+
|
|
128
|
+
function retryUnixWithoutQuiet(shellCmd) {
|
|
129
|
+
if (hasRetried) {
|
|
130
|
+
showErrorMessage();
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
hasRetried = true;
|
|
134
|
+
console.log('\nInstalacao falhou. Re-executando com output detalhado...\n');
|
|
135
|
+
const retryChild = spawn(shellCmd, retryArgs, {
|
|
136
|
+
stdio: 'inherit', shell: false, timeout: 60000
|
|
137
|
+
});
|
|
138
|
+
retryChild.on('error', () => showErrorMessage());
|
|
139
|
+
retryChild.on('exit', (retryCode) => {
|
|
140
|
+
if (retryCode === 0) {
|
|
141
|
+
showUsageMessage();
|
|
142
|
+
} else {
|
|
143
|
+
showErrorMessage();
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const child = spawn('bash', quietArgs, { stdio: 'inherit', shell: false });
|
|
77
149
|
|
|
78
150
|
child.on('error', () => {
|
|
79
151
|
// Fallback to sh
|
|
80
|
-
const shChild = spawn('sh',
|
|
81
|
-
scriptPath, '--yes', '--quiet', '--skip-project'
|
|
82
|
-
], { stdio: 'inherit', shell: false });
|
|
152
|
+
const shChild = spawn('sh', quietArgs, { stdio: 'inherit', shell: false });
|
|
83
153
|
shChild.on('error', () => showUsageMessage());
|
|
84
|
-
shChild.on('exit', () => {
|
|
154
|
+
shChild.on('exit', (code) => {
|
|
155
|
+
if (code === 0) {
|
|
156
|
+
showUsageMessage();
|
|
157
|
+
} else {
|
|
158
|
+
retryUnixWithoutQuiet('sh');
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
child.on('exit', (code) => {
|
|
163
|
+
if (code === 0) {
|
|
164
|
+
showUsageMessage();
|
|
165
|
+
} else {
|
|
166
|
+
retryUnixWithoutQuiet('bash');
|
|
167
|
+
}
|
|
85
168
|
});
|
|
86
|
-
child.on('exit', () => { /* always succeed */ });
|
|
87
169
|
}
|
|
88
170
|
}
|
|
89
171
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v3.9.
|
|
3
|
+
description: "🧠 Neocortex v3.9.29 (Free) | OrNexus Team"
|
|
4
4
|
model: opus
|
|
5
5
|
color: blue
|
|
6
6
|
tools:
|
|
@@ -56,7 +56,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
56
56
|
┌────────────────────────────────────────────────────────────┐
|
|
57
57
|
│ │
|
|
58
58
|
│ ####### N E O C O R T E X │
|
|
59
|
-
│ ### ######## v3.9.
|
|
59
|
+
│ ### ######## v3.9.29 │
|
|
60
60
|
│ ######### ##### │
|
|
61
61
|
│ ## ############## Development Orchestrator │
|
|
62
62
|
│ ## ### ###### ## OrNexus Team (Free) │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v3.9.
|
|
3
|
+
description: "🧠 Neocortex v3.9.29 (Free) | OrNexus Team"
|
|
4
4
|
model: fast
|
|
5
5
|
readonly: false
|
|
6
6
|
is_background: false
|
|
@@ -18,7 +18,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
18
18
|
┌────────────────────────────────────────────────────────────┐
|
|
19
19
|
│ │
|
|
20
20
|
│ ####### N E O C O R T E X │
|
|
21
|
-
│ ### ######## v3.9.
|
|
21
|
+
│ ### ######## v3.9.29 │
|
|
22
22
|
│ ######### ##### │
|
|
23
23
|
│ ## ############## Development Orchestrator │
|
|
24
24
|
│ ## ### ###### ## OrNexus Team (Free) │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "🧠 Neocortex v3.9.
|
|
3
|
+
description: "🧠 Neocortex v3.9.29 (Free) | OrNexus Team"
|
|
4
4
|
kind: local
|
|
5
5
|
tools:
|
|
6
6
|
- read_file
|
|
@@ -25,7 +25,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
25
25
|
┌────────────────────────────────────────────────────────────┐
|
|
26
26
|
│ │
|
|
27
27
|
│ ####### N E O C O R T E X │
|
|
28
|
-
│ ### ######## v3.9.
|
|
28
|
+
│ ### ######## v3.9.29 │
|
|
29
29
|
│ ######### ##### │
|
|
30
30
|
│ ## ############## Development Orchestrator │
|
|
31
31
|
│ ## ### ###### ## OrNexus Team (Free) │
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "neocortex"
|
|
3
|
-
description: "🧠 Neocortex v3.9.
|
|
3
|
+
description: "🧠 Neocortex v3.9.29 (Free) | OrNexus Team"
|
|
4
4
|
tools:
|
|
5
5
|
- readFile
|
|
6
6
|
- editFiles
|
|
@@ -26,7 +26,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
|
|
|
26
26
|
┌────────────────────────────────────────────────────────────┐
|
|
27
27
|
│ │
|
|
28
28
|
│ ####### N E O C O R T E X │
|
|
29
|
-
│ ### ######## v3.9.
|
|
29
|
+
│ ### ######## v3.9.29 │
|
|
30
30
|
│ ######### ##### │
|
|
31
31
|
│ ## ############## Development Orchestrator │
|
|
32
32
|
│ ## ### ###### ## OrNexus Team (Free) │
|