@ornexus/neocortex-cli 4.5.1 → 4.5.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/package.json +5 -3
- package/sync-version.js +0 -200
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ornexus/neocortex-cli",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.2",
|
|
4
4
|
"description": "Neocortex CLI - AI Agent Orchestrator for multi-platform development (Claude Code, Cursor, VS Code, Gemini, Codex)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
@@ -43,13 +43,12 @@
|
|
|
43
43
|
"files": [
|
|
44
44
|
"README.md",
|
|
45
45
|
"install.js",
|
|
46
|
-
"sync-version.js",
|
|
47
46
|
".env.example"
|
|
48
47
|
],
|
|
49
48
|
"scripts": {
|
|
50
49
|
"postinstall": "node -e \"console.log('\\nNeocortex CLI v'+require('./package.json').version+' instalado!\\n\\nSetup: npx @ornexus/neocortex-cli\\nBinarios: https://github.com/OrNexus-AI/neocortex-cli/releases\\n')\"",
|
|
51
50
|
"sync": "node sync-version.js",
|
|
52
|
-
"prepublishOnly": "node
|
|
51
|
+
"prepublishOnly": "node -e \"console.log('Publishing Neocortex CLI v'+require('./package.json').version)\"",
|
|
53
52
|
"version": "npm run sync && echo '🔖 Nova versão:' && cat package.json | grep version",
|
|
54
53
|
"test": "vitest run",
|
|
55
54
|
"typecheck": "tsc --noEmit",
|
|
@@ -64,6 +63,9 @@
|
|
|
64
63
|
"compile:darwin-x64": "bun build packages/cli/src/index.ts --compile --target=bun-darwin-x64 --outfile dist/bin/neocortex-cli-darwin-x64",
|
|
65
64
|
"compile:windows-x64": "bun build packages/cli/src/index.ts --compile --target=bun-windows-x64 --outfile dist/bin/neocortex-cli-windows-x64.exe",
|
|
66
65
|
"build:publish": "bun run scripts/build-publish.ts",
|
|
66
|
+
"validate:npm": "bun run scripts/validate-npm-package.ts",
|
|
67
|
+
"validate:binaries": "bun run scripts/validate-binaries.ts",
|
|
68
|
+
"validate:release": "bun run scripts/validate-npm-package.ts && bun run scripts/validate-binaries.ts",
|
|
67
69
|
"release": "bun run scripts/release.ts",
|
|
68
70
|
"check": "bun run lint && bun run typecheck && bun run test"
|
|
69
71
|
},
|
package/sync-version.js
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Neocortex - Version Sync Script
|
|
4
|
-
*
|
|
5
|
-
* Sincroniza a versão do package.json em todos os arquivos do projeto.
|
|
6
|
-
* Executado automaticamente no prepublishOnly.
|
|
7
|
-
*
|
|
8
|
-
* Uso: node sync-version.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
const fs = require('fs');
|
|
12
|
-
const path = require('path');
|
|
13
|
-
|
|
14
|
-
// Ler versão do package.json (fonte única de verdade)
|
|
15
|
-
const pkg = require('./package.json');
|
|
16
|
-
const VERSION = pkg.version;
|
|
17
|
-
const VERSION_MAJOR_MINOR = VERSION.split('.').slice(0, 2).join('.');
|
|
18
|
-
|
|
19
|
-
console.log(`\n🔄 Sincronizando versão ${VERSION} em todos os arquivos...\n`);
|
|
20
|
-
|
|
21
|
-
// Definição dos arquivos e padrões a substituir
|
|
22
|
-
const replacements = [
|
|
23
|
-
// Sub-package versions (shared, core, cli)
|
|
24
|
-
{
|
|
25
|
-
file: 'packages/shared/package.json',
|
|
26
|
-
patterns: [
|
|
27
|
-
[/"version": "[\d.]+"/g, `"version": "${VERSION}"`],
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
file: 'packages/core/package.json',
|
|
32
|
-
patterns: [
|
|
33
|
-
[/"version": "[\d.]+"/g, `"version": "${VERSION}"`],
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
file: 'packages/cli/package.json',
|
|
38
|
-
patterns: [
|
|
39
|
-
[/"version": "[\d.]+"/g, `"version": "${VERSION}"`],
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
// neocortex-cli.md
|
|
43
|
-
{
|
|
44
|
-
file: 'targets/claude-code/neocortex-cli.md',
|
|
45
|
-
patterns: [
|
|
46
|
-
[/# Neocortex v[\d.]+ -/g, `# Neocortex v${VERSION} -`],
|
|
47
|
-
[/NEOCORTEX-CLI v[\d.]+ \(state\.json\)/g, `NEOCORTEX-CLI v${VERSION} (state.json)`],
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
// neocortex-cli.agent.yaml
|
|
51
|
-
{
|
|
52
|
-
file: 'targets/claude-code/neocortex-cli.agent.yaml',
|
|
53
|
-
patterns: [
|
|
54
|
-
[/version: '[\d.]+'/g, `version: '${VERSION}'`],
|
|
55
|
-
[/NEOCORTEX-CLI v[\d.]+ \(External Claude CLI\)/g, `NEOCORTEX-CLI v${VERSION} (External Claude CLI)`],
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
|
-
// install.sh
|
|
59
|
-
{
|
|
60
|
-
file: 'install.sh',
|
|
61
|
-
patterns: [
|
|
62
|
-
[/VERSION="[\d.]+"/g, `VERSION="${VERSION}"`],
|
|
63
|
-
]
|
|
64
|
-
},
|
|
65
|
-
// install.ps1
|
|
66
|
-
{
|
|
67
|
-
file: 'install.ps1',
|
|
68
|
-
patterns: [
|
|
69
|
-
[/\$VERSION = "[\d.]+"/g, `$VERSION = "${VERSION}"`],
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
// core/data/state-template.json
|
|
73
|
-
{
|
|
74
|
-
file: 'core/data/state-template.json',
|
|
75
|
-
patterns: [
|
|
76
|
-
[/"version": "[\d.]+"/g, `"version": "${VERSION}"`],
|
|
77
|
-
[/"neocortex_cli_version": "[\d.]+"/g, `"neocortex_cli_version": "${VERSION}"`],
|
|
78
|
-
]
|
|
79
|
-
},
|
|
80
|
-
// core/data/step-registry.json
|
|
81
|
-
{
|
|
82
|
-
file: 'core/data/step-registry.json',
|
|
83
|
-
patterns: [
|
|
84
|
-
[/"version": "[\d.]+"/g, `"version": "${VERSION}"`],
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
// core/data/state-utils.md
|
|
88
|
-
{
|
|
89
|
-
file: 'core/data/state-utils.md',
|
|
90
|
-
patterns: [
|
|
91
|
-
[/# State Utilities - Neocortex v[\d.]+/g, `# State Utilities - Neocortex v${VERSION}`],
|
|
92
|
-
]
|
|
93
|
-
},
|
|
94
|
-
// core/data/worktree-sync.md
|
|
95
|
-
{
|
|
96
|
-
file: 'core/data/worktree-sync.md',
|
|
97
|
-
patterns: [
|
|
98
|
-
[/# Worktree Synchronization Utilities - Neocortex v[\d.]+/g, `# Worktree Synchronization Utilities - Neocortex v${VERSION}`],
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
|
-
// core/data/worktree-sync-functions.sh
|
|
102
|
-
{
|
|
103
|
-
file: 'core/data/worktree-sync-functions.sh',
|
|
104
|
-
patterns: [
|
|
105
|
-
[/# Neocortex - Worktree Sync Functions v[\d.]+/g, `# Neocortex - Worktree Sync Functions v${VERSION}`],
|
|
106
|
-
]
|
|
107
|
-
},
|
|
108
|
-
// targets/claude-code/workflow.md
|
|
109
|
-
{
|
|
110
|
-
file: 'targets/claude-code/workflow.md',
|
|
111
|
-
patterns: [
|
|
112
|
-
[/Neocortex v[\d.]+/g, `Neocortex v${VERSION}`],
|
|
113
|
-
]
|
|
114
|
-
},
|
|
115
|
-
// Platform agent files
|
|
116
|
-
{
|
|
117
|
-
file: 'targets/cursor/agent.md',
|
|
118
|
-
patterns: [
|
|
119
|
-
[/# Neocortex v[\d.]+ -/g, `# Neocortex v${VERSION} -`],
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
file: 'targets/vscode/agent.md',
|
|
124
|
-
patterns: [
|
|
125
|
-
[/# Neocortex v[\d.]+ -/g, `# Neocortex v${VERSION} -`],
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
file: 'targets/gemini-cli/agent.md',
|
|
130
|
-
patterns: [
|
|
131
|
-
[/# Neocortex v[\d.]+ -/g, `# Neocortex v${VERSION} -`],
|
|
132
|
-
]
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
file: 'targets/codex/agents.md',
|
|
136
|
-
patterns: [
|
|
137
|
-
[/# Neocortex v[\d.]+ -/g, `# Neocortex v${VERSION} -`],
|
|
138
|
-
]
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
file: 'targets/antigravity/gemini.md',
|
|
142
|
-
patterns: [
|
|
143
|
-
[/Neocortex v[\d.]+/g, `Neocortex v${VERSION}`],
|
|
144
|
-
]
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
file: 'targets/antigravity/skill/SKILL.md',
|
|
148
|
-
patterns: [
|
|
149
|
-
[/Neocortex v[\d.]+/g, `Neocortex v${VERSION}`],
|
|
150
|
-
]
|
|
151
|
-
},
|
|
152
|
-
// Source code VERSION constant
|
|
153
|
-
{
|
|
154
|
-
file: 'packages/shared/src/index.ts',
|
|
155
|
-
patterns: [
|
|
156
|
-
[/export const VERSION = '[\d.]+' as const;/g, `export const VERSION = '${VERSION}' as const;`],
|
|
157
|
-
]
|
|
158
|
-
},
|
|
159
|
-
// Init memory command version
|
|
160
|
-
{
|
|
161
|
-
file: 'packages/cli/src/commands/init-memory.ts',
|
|
162
|
-
patterns: [
|
|
163
|
-
[/const NEOCORTEX_VERSION = '[\d.]+';/g, `const NEOCORTEX_VERSION = '${VERSION}';`],
|
|
164
|
-
]
|
|
165
|
-
},
|
|
166
|
-
];
|
|
167
|
-
|
|
168
|
-
let filesUpdated = 0;
|
|
169
|
-
let totalReplacements = 0;
|
|
170
|
-
|
|
171
|
-
for (const { file, patterns } of replacements) {
|
|
172
|
-
const filePath = path.join(__dirname, file);
|
|
173
|
-
|
|
174
|
-
if (!fs.existsSync(filePath)) {
|
|
175
|
-
console.log(` ⚠️ ${file} não encontrado, pulando...`);
|
|
176
|
-
continue;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
let content = fs.readFileSync(filePath, 'utf8');
|
|
180
|
-
let fileReplacements = 0;
|
|
181
|
-
|
|
182
|
-
for (const [pattern, replacement] of patterns) {
|
|
183
|
-
const matches = content.match(pattern);
|
|
184
|
-
if (matches) {
|
|
185
|
-
content = content.replace(pattern, replacement);
|
|
186
|
-
fileReplacements += matches.length;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
if (fileReplacements > 0) {
|
|
191
|
-
fs.writeFileSync(filePath, content);
|
|
192
|
-
console.log(` ✅ ${file} (${fileReplacements} substituição(ões))`);
|
|
193
|
-
filesUpdated++;
|
|
194
|
-
totalReplacements += fileReplacements;
|
|
195
|
-
} else {
|
|
196
|
-
console.log(` ⏭️ ${file} (já atualizado)`);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
console.log(`\n✨ Sincronização completa: ${filesUpdated} arquivo(s), ${totalReplacements} substituição(ões)\n`);
|