@ornexus/neocortex 4.0.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.
Potentially problematic release.
This version of @ornexus/neocortex might be problematic. Click here for more details.
- package/LICENSE +56 -0
- package/README.md +32 -0
- package/install.js +486 -0
- package/install.ps1 +1790 -0
- package/install.sh +1587 -0
- package/package.json +104 -0
- package/packages/client/dist/adapters/adapter-registry.d.ts +61 -0
- package/packages/client/dist/adapters/adapter-registry.js +106 -0
- package/packages/client/dist/adapters/antigravity-adapter.d.ts +18 -0
- package/packages/client/dist/adapters/antigravity-adapter.js +77 -0
- package/packages/client/dist/adapters/claude-code-adapter.d.ts +19 -0
- package/packages/client/dist/adapters/claude-code-adapter.js +79 -0
- package/packages/client/dist/adapters/codex-adapter.d.ts +19 -0
- package/packages/client/dist/adapters/codex-adapter.js +80 -0
- package/packages/client/dist/adapters/cursor-adapter.d.ts +19 -0
- package/packages/client/dist/adapters/cursor-adapter.js +115 -0
- package/packages/client/dist/adapters/gemini-adapter.d.ts +18 -0
- package/packages/client/dist/adapters/gemini-adapter.js +71 -0
- package/packages/client/dist/adapters/index.d.ts +19 -0
- package/packages/client/dist/adapters/index.js +21 -0
- package/packages/client/dist/adapters/platform-detector.d.ts +46 -0
- package/packages/client/dist/adapters/platform-detector.js +106 -0
- package/packages/client/dist/adapters/target-adapter.d.ts +70 -0
- package/packages/client/dist/adapters/target-adapter.js +12 -0
- package/packages/client/dist/adapters/vscode-adapter.d.ts +19 -0
- package/packages/client/dist/adapters/vscode-adapter.js +72 -0
- package/packages/client/dist/agent/refresh-stubs.d.ts +65 -0
- package/packages/client/dist/agent/refresh-stubs.js +234 -0
- package/packages/client/dist/agent/update-agent-yaml.d.ts +26 -0
- package/packages/client/dist/agent/update-agent-yaml.js +102 -0
- package/packages/client/dist/agent/update-description.d.ts +45 -0
- package/packages/client/dist/agent/update-description.js +251 -0
- package/packages/client/dist/cache/crypto-utils.d.ts +30 -0
- package/packages/client/dist/cache/crypto-utils.js +76 -0
- package/packages/client/dist/cache/encrypted-cache.d.ts +30 -0
- package/packages/client/dist/cache/encrypted-cache.js +94 -0
- package/packages/client/dist/cache/in-memory-asset-cache.d.ts +59 -0
- package/packages/client/dist/cache/in-memory-asset-cache.js +70 -0
- package/packages/client/dist/cache/index.d.ts +13 -0
- package/packages/client/dist/cache/index.js +13 -0
- package/packages/client/dist/cli.d.ts +14 -0
- package/packages/client/dist/cli.js +194 -0
- package/packages/client/dist/commands/activate.d.ts +55 -0
- package/packages/client/dist/commands/activate.js +390 -0
- package/packages/client/dist/commands/cache-status.d.ts +39 -0
- package/packages/client/dist/commands/cache-status.js +112 -0
- package/packages/client/dist/commands/invoke.d.ts +70 -0
- package/packages/client/dist/commands/invoke.js +490 -0
- package/packages/client/dist/config/resolver-selection.d.ts +40 -0
- package/packages/client/dist/config/resolver-selection.js +278 -0
- package/packages/client/dist/config/secure-config.d.ts +78 -0
- package/packages/client/dist/config/secure-config.js +269 -0
- package/packages/client/dist/constants.d.ts +25 -0
- package/packages/client/dist/constants.js +25 -0
- package/packages/client/dist/context/context-collector.d.ts +28 -0
- package/packages/client/dist/context/context-collector.js +222 -0
- package/packages/client/dist/context/context-sanitizer.d.ts +28 -0
- package/packages/client/dist/context/context-sanitizer.js +145 -0
- package/packages/client/dist/index.d.ts +55 -0
- package/packages/client/dist/index.js +38 -0
- package/packages/client/dist/license/index.d.ts +5 -0
- package/packages/client/dist/license/index.js +5 -0
- package/packages/client/dist/license/license-client.d.ts +79 -0
- package/packages/client/dist/license/license-client.js +257 -0
- package/packages/client/dist/machine/fingerprint.d.ts +34 -0
- package/packages/client/dist/machine/fingerprint.js +160 -0
- package/packages/client/dist/machine/index.d.ts +5 -0
- package/packages/client/dist/machine/index.js +5 -0
- package/packages/client/dist/resilience/circuit-breaker.d.ts +70 -0
- package/packages/client/dist/resilience/circuit-breaker.js +170 -0
- package/packages/client/dist/resilience/degradation-manager.d.ts +67 -0
- package/packages/client/dist/resilience/degradation-manager.js +164 -0
- package/packages/client/dist/resilience/freshness-indicator.d.ts +59 -0
- package/packages/client/dist/resilience/freshness-indicator.js +100 -0
- package/packages/client/dist/resilience/index.d.ts +8 -0
- package/packages/client/dist/resilience/index.js +8 -0
- package/packages/client/dist/resilience/recovery-detector.d.ts +59 -0
- package/packages/client/dist/resilience/recovery-detector.js +74 -0
- package/packages/client/dist/resolvers/asset-resolver.d.ts +79 -0
- package/packages/client/dist/resolvers/asset-resolver.js +13 -0
- package/packages/client/dist/resolvers/local-resolver.d.ts +26 -0
- package/packages/client/dist/resolvers/local-resolver.js +218 -0
- package/packages/client/dist/resolvers/remote-resolver.d.ts +91 -0
- package/packages/client/dist/resolvers/remote-resolver.js +282 -0
- package/packages/client/dist/telemetry/index.d.ts +5 -0
- package/packages/client/dist/telemetry/index.js +5 -0
- package/packages/client/dist/telemetry/offline-queue.d.ts +57 -0
- package/packages/client/dist/telemetry/offline-queue.js +131 -0
- package/packages/client/dist/tier/index.d.ts +5 -0
- package/packages/client/dist/tier/index.js +5 -0
- package/packages/client/dist/tier/tier-aware-client.d.ts +97 -0
- package/packages/client/dist/tier/tier-aware-client.js +260 -0
- package/packages/client/dist/types/index.d.ts +140 -0
- package/packages/client/dist/types/index.js +38 -0
- package/postinstall.js +272 -0
- package/targets-stubs/antigravity/README.md +36 -0
- package/targets-stubs/antigravity/gemini.md +22 -0
- package/targets-stubs/antigravity/install-antigravity.sh +44 -0
- package/targets-stubs/antigravity/mcp-config.json +9 -0
- package/targets-stubs/antigravity/skill/SKILL.md +67 -0
- package/targets-stubs/claude-code/README.md +20 -0
- package/targets-stubs/claude-code/neocortex.agent.yaml +24 -0
- package/targets-stubs/claude-code/neocortex.md +125 -0
- package/targets-stubs/codex/README.md +32 -0
- package/targets-stubs/codex/agents.md +61 -0
- package/targets-stubs/codex/config-mcp.toml +6 -0
- package/targets-stubs/codex/install-codex.sh +61 -0
- package/targets-stubs/cursor/README.md +33 -0
- package/targets-stubs/cursor/agent.md +94 -0
- package/targets-stubs/cursor/install-cursor.sh +35 -0
- package/targets-stubs/cursor/mcp.json +11 -0
- package/targets-stubs/gemini-cli/README.md +34 -0
- package/targets-stubs/gemini-cli/agent.md +101 -0
- package/targets-stubs/gemini-cli/gemini.md +16 -0
- package/targets-stubs/gemini-cli/install-gemini.sh +56 -0
- package/targets-stubs/gemini-cli/settings-mcp.json +11 -0
- package/targets-stubs/vscode/README.md +34 -0
- package/targets-stubs/vscode/agent.md +102 -0
- package/targets-stubs/vscode/copilot-instructions.md +16 -0
- package/targets-stubs/vscode/install-vscode.sh +42 -0
- package/targets-stubs/vscode/mcp.json +13 -0
package/postinstall.js
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Neocortex - Postinstall Hook
|
|
5
|
+
*
|
|
6
|
+
* For global installs: auto-runs the installer in quiet/auto mode.
|
|
7
|
+
* For local installs: prints usage message.
|
|
8
|
+
*
|
|
9
|
+
* NEVER fails npm install -- always exits 0.
|
|
10
|
+
*
|
|
11
|
+
* Epic 62 - GAP 6
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const { spawn } = require('child_process');
|
|
15
|
+
const path = require('path');
|
|
16
|
+
const os = require('os');
|
|
17
|
+
const fs = require('fs');
|
|
18
|
+
|
|
19
|
+
function isGlobalInstall() {
|
|
20
|
+
// npm sets npm_config_global=true for global installs
|
|
21
|
+
if (process.env.npm_config_global === 'true') return true;
|
|
22
|
+
// Fallback: check if our location is in a global prefix
|
|
23
|
+
try {
|
|
24
|
+
const globalPrefix = process.env.npm_config_prefix || '';
|
|
25
|
+
if (globalPrefix && __dirname.startsWith(globalPrefix)) return true;
|
|
26
|
+
} catch { /* ignore */ }
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function showUsageMessage() {
|
|
31
|
+
console.log('\nNeocortex instalado!\n');
|
|
32
|
+
console.log('Uso:');
|
|
33
|
+
console.log(' @neocortex @docs/stories/1.1.story.md');
|
|
34
|
+
console.log(' @neocortex @epic-1');
|
|
35
|
+
console.log(' @neocortex *status\n');
|
|
36
|
+
|
|
37
|
+
// Story 32.09: Force stub refresh after successful install
|
|
38
|
+
forceStubRefresh();
|
|
39
|
+
|
|
40
|
+
// Story 32.07: Check server compatibility (fire-and-forget)
|
|
41
|
+
checkServerCompatibility();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function showErrorMessage() {
|
|
45
|
+
console.error('\n[x] Neocortex installation failed.\n');
|
|
46
|
+
console.error('Troubleshooting:');
|
|
47
|
+
console.error(' 1. Try again: npm install -g @ornexus/neocortex');
|
|
48
|
+
console.error(' 2. Check file permissions in your home directory');
|
|
49
|
+
console.error(' 3. Report at: https://github.com/OrNexus-AI/neocortex/issues\n');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function runInstaller() {
|
|
53
|
+
const platform = os.platform();
|
|
54
|
+
|
|
55
|
+
// Epic 64: Check NEOCORTEX_DEBUG env var for debug mode
|
|
56
|
+
const debugMode = process.env.NEOCORTEX_DEBUG === '1';
|
|
57
|
+
|
|
58
|
+
if (platform === 'win32') {
|
|
59
|
+
// Windows: run install.ps1
|
|
60
|
+
const scriptPath = path.join(__dirname, 'install.ps1');
|
|
61
|
+
if (!fs.existsSync(scriptPath)) {
|
|
62
|
+
showUsageMessage();
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const baseFlags = ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', scriptPath];
|
|
67
|
+
const quietFlags = ['-Yes', '-Quiet', '-SkipProject'];
|
|
68
|
+
const retryFlags = ['-Yes', '-SkipProject'];
|
|
69
|
+
if (debugMode) {
|
|
70
|
+
quietFlags.push('-Debug');
|
|
71
|
+
retryFlags.push('-Debug');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const shells = ['pwsh', 'powershell'];
|
|
75
|
+
let hasRetried = false;
|
|
76
|
+
|
|
77
|
+
function retryWithoutQuiet(shellCmd) {
|
|
78
|
+
if (hasRetried) {
|
|
79
|
+
showErrorMessage();
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
hasRetried = true;
|
|
83
|
+
console.log('\nInstalacao falhou. Re-executando com output detalhado...\n');
|
|
84
|
+
const retryChild = spawn(shellCmd, [...baseFlags, ...retryFlags], {
|
|
85
|
+
stdio: 'inherit', shell: false, timeout: 60000
|
|
86
|
+
});
|
|
87
|
+
retryChild.on('error', () => showErrorMessage());
|
|
88
|
+
retryChild.on('exit', (retryCode) => {
|
|
89
|
+
if (retryCode === 0) {
|
|
90
|
+
showUsageMessage();
|
|
91
|
+
} else {
|
|
92
|
+
showErrorMessage();
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function tryShell(index) {
|
|
98
|
+
if (index >= shells.length) {
|
|
99
|
+
// Epic 65: Don't show "Neocortex instalado!" when no shell was found
|
|
100
|
+
console.error('\n[!] PowerShell nao encontrado (pwsh ou powershell).');
|
|
101
|
+
console.error(' Instale manualmente: npx @ornexus/neocortex\n');
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const child = spawn(shells[index], [...baseFlags, ...quietFlags], {
|
|
105
|
+
stdio: 'inherit', shell: false
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
child.on('error', () => tryShell(index + 1));
|
|
109
|
+
child.on('exit', (code) => {
|
|
110
|
+
if (code === 0) {
|
|
111
|
+
showUsageMessage();
|
|
112
|
+
} else {
|
|
113
|
+
retryWithoutQuiet(shells[index]);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
tryShell(0);
|
|
118
|
+
} else {
|
|
119
|
+
// Unix: run install.sh
|
|
120
|
+
const scriptPath = path.join(__dirname, 'install.sh');
|
|
121
|
+
if (!fs.existsSync(scriptPath)) {
|
|
122
|
+
showUsageMessage();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
try { fs.chmodSync(scriptPath, '755'); } catch { /* ignore */ }
|
|
127
|
+
|
|
128
|
+
const quietArgs = [scriptPath, '--yes', '--quiet', '--skip-project'];
|
|
129
|
+
const retryArgs = [scriptPath, '--yes', '--skip-project'];
|
|
130
|
+
if (debugMode) {
|
|
131
|
+
quietArgs.push('--debug');
|
|
132
|
+
retryArgs.push('--debug');
|
|
133
|
+
}
|
|
134
|
+
let hasRetried = false;
|
|
135
|
+
|
|
136
|
+
function retryUnixWithoutQuiet(shellCmd) {
|
|
137
|
+
if (hasRetried) {
|
|
138
|
+
showErrorMessage();
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
hasRetried = true;
|
|
142
|
+
console.log('\nInstalacao falhou. Re-executando com output detalhado...\n');
|
|
143
|
+
const retryChild = spawn(shellCmd, retryArgs, {
|
|
144
|
+
stdio: 'inherit', shell: false, timeout: 60000
|
|
145
|
+
});
|
|
146
|
+
retryChild.on('error', () => showErrorMessage());
|
|
147
|
+
retryChild.on('exit', (retryCode) => {
|
|
148
|
+
if (retryCode === 0) {
|
|
149
|
+
showUsageMessage();
|
|
150
|
+
} else {
|
|
151
|
+
showErrorMessage();
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const child = spawn('bash', quietArgs, { stdio: 'inherit', shell: false });
|
|
157
|
+
|
|
158
|
+
child.on('error', () => {
|
|
159
|
+
// Fallback to sh
|
|
160
|
+
const shChild = spawn('sh', quietArgs, { stdio: 'inherit', shell: false });
|
|
161
|
+
shChild.on('error', () => showUsageMessage());
|
|
162
|
+
shChild.on('exit', (code) => {
|
|
163
|
+
if (code === 0) {
|
|
164
|
+
showUsageMessage();
|
|
165
|
+
} else {
|
|
166
|
+
retryUnixWithoutQuiet('sh');
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
child.on('exit', (code) => {
|
|
171
|
+
if (code === 0) {
|
|
172
|
+
showUsageMessage();
|
|
173
|
+
} else {
|
|
174
|
+
retryUnixWithoutQuiet('bash');
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Story 32.09: Force stub refresh by deleting .version files from target directories.
|
|
182
|
+
* This ensures next invoke detects version mismatch and copies updated stubs.
|
|
183
|
+
* Fire-and-forget, fail-open.
|
|
184
|
+
*/
|
|
185
|
+
function forceStubRefresh() {
|
|
186
|
+
try {
|
|
187
|
+
const homeDir = os.homedir();
|
|
188
|
+
const targets = [
|
|
189
|
+
path.join(homeDir, '.claude', 'agents', 'neocortex', '.version'),
|
|
190
|
+
path.join(homeDir, '.cursor', 'agents', '.version'),
|
|
191
|
+
path.join(homeDir, '.gemini', 'agents', '.version'),
|
|
192
|
+
path.join(homeDir, '.codex', '.version'),
|
|
193
|
+
path.join(homeDir, '.vscode', '.version'),
|
|
194
|
+
path.join(homeDir, '.agent', 'skills', 'neocortex', '.version'),
|
|
195
|
+
];
|
|
196
|
+
|
|
197
|
+
for (const versionFile of targets) {
|
|
198
|
+
try {
|
|
199
|
+
if (fs.existsSync(versionFile)) {
|
|
200
|
+
fs.unlinkSync(versionFile);
|
|
201
|
+
}
|
|
202
|
+
} catch { /* ignore per-file errors */ }
|
|
203
|
+
}
|
|
204
|
+
} catch { /* ignore */ }
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Story 32.07: Check server compatibility after install.
|
|
209
|
+
* Informative only -- never blocks. Timeout 5s, all errors ignored.
|
|
210
|
+
*/
|
|
211
|
+
function checkServerCompatibility() {
|
|
212
|
+
try {
|
|
213
|
+
const https = require('https');
|
|
214
|
+
let clientVersion;
|
|
215
|
+
try {
|
|
216
|
+
const pkg = require('./package.json');
|
|
217
|
+
clientVersion = pkg.version;
|
|
218
|
+
} catch { return; }
|
|
219
|
+
|
|
220
|
+
const serverUrl = 'https://api.neocortex.sh/health';
|
|
221
|
+
|
|
222
|
+
const req = https.get(serverUrl, { timeout: 5000 }, (res) => {
|
|
223
|
+
let data = '';
|
|
224
|
+
res.on('data', (chunk) => { data += chunk; });
|
|
225
|
+
res.on('end', () => {
|
|
226
|
+
try {
|
|
227
|
+
const health = JSON.parse(data);
|
|
228
|
+
if (health.minClientVersion && !isVersionAtLeastInline(clientVersion, health.minClientVersion)) {
|
|
229
|
+
console.log('\n[!] Aviso: esta versao do client (' + clientVersion + ') pode nao ser compativel.');
|
|
230
|
+
console.log(' Versao minima do server: ' + health.minClientVersion);
|
|
231
|
+
console.log(' Atualize: npm install -g @ornexus/neocortex@latest\n');
|
|
232
|
+
}
|
|
233
|
+
} catch { /* ignore */ }
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
req.on('error', () => { /* ignore - network may not be available */ });
|
|
238
|
+
req.on('timeout', () => { req.destroy(); });
|
|
239
|
+
} catch { /* ignore */ }
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Story 32.07: Inline semver comparison (no external deps).
|
|
244
|
+
*/
|
|
245
|
+
function isVersionAtLeastInline(version, minVersion) {
|
|
246
|
+
try {
|
|
247
|
+
const parse = (v) => {
|
|
248
|
+
const m = v.replace(/^v/, '').match(/^(\d+)\.(\d+)\.(\d+)/);
|
|
249
|
+
return m ? [parseInt(m[1]), parseInt(m[2]), parseInt(m[3])] : null;
|
|
250
|
+
};
|
|
251
|
+
const v = parse(version);
|
|
252
|
+
const min = parse(minVersion);
|
|
253
|
+
if (!v || !min) return true;
|
|
254
|
+
if (v[0] !== min[0]) return v[0] > min[0];
|
|
255
|
+
if (v[1] !== min[1]) return v[1] > min[1];
|
|
256
|
+
return v[2] >= min[2];
|
|
257
|
+
} catch { return true; }
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
try {
|
|
261
|
+
if (isGlobalInstall()) {
|
|
262
|
+
runInstaller();
|
|
263
|
+
} else {
|
|
264
|
+
showUsageMessage();
|
|
265
|
+
}
|
|
266
|
+
} catch {
|
|
267
|
+
// NEVER fail npm install
|
|
268
|
+
showUsageMessage();
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Always exit 0
|
|
272
|
+
process.on('exit', () => { process.exitCode = 0; });
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Target Stub: Google Antigravity
|
|
2
|
+
|
|
3
|
+
**Thin Client Mode** | Remote content delivery
|
|
4
|
+
|
|
5
|
+
> **EXPERIMENTAL**: Google Antigravity is in public preview.
|
|
6
|
+
|
|
7
|
+
This is a thin-client stub. The full target configuration, agent definitions,
|
|
8
|
+
and pipeline instructions are delivered securely via the Neocortex remote
|
|
9
|
+
content delivery system.
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Install Neocortex
|
|
15
|
+
npx @ornexus/neocortex
|
|
16
|
+
|
|
17
|
+
# Activate license for remote content
|
|
18
|
+
neocortex activate YOUR-LICENSE-KEY # Get yours at https://neocortex.ornexus.com/login
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Contents
|
|
22
|
+
|
|
23
|
+
| File | Description |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `skill/SKILL.md` | Thin-client skill stub (delegates to neocortex-client) |
|
|
26
|
+
| `gemini.md` | Thin-client GEMINI.md (no @import directives) |
|
|
27
|
+
| `mcp-config.json` | MCP server configuration (Playwright + Context7) |
|
|
28
|
+
|
|
29
|
+
## How It Works
|
|
30
|
+
|
|
31
|
+
1. The stub skill receives user invocations
|
|
32
|
+
2. It calls `neocortex-client invoke` with the user's arguments
|
|
33
|
+
3. The server returns full pipeline instructions
|
|
34
|
+
4. The agent follows the returned instructions exactly
|
|
35
|
+
|
|
36
|
+
For more information, visit: https://github.com/OrNexus-AI/neocortex
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# 🧠 Neocortex v4.0.1 | OrNexus Team
|
|
2
|
+
|
|
3
|
+
This project uses Neocortex, a Development Orchestrator.
|
|
4
|
+
|
|
5
|
+
All orchestration logic, standards, skills, and workflows are delivered by the remote Neocortex server.
|
|
6
|
+
Use the Neocortex skill to interact with the pipeline.
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
|
|
10
|
+
Invoke the Neocortex skill with your command. The skill will call `neocortex-client invoke` to fetch instructions from the server.
|
|
11
|
+
|
|
12
|
+
### Examples
|
|
13
|
+
|
|
14
|
+
- `@neocortex *menu` - Show interactive menu with all available commands
|
|
15
|
+
- `@neocortex *status` - Show project status dashboard
|
|
16
|
+
- `@neocortex *implement @docs/stories/1.1.story.md` - Implement a story
|
|
17
|
+
|
|
18
|
+
## Activation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
neocortex activate YOUR-LICENSE-KEY # Get yours at https://neocortex.ornexus.com/login
|
|
22
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Neocortex - Google Antigravity Install Adapter (Thin Client)
|
|
3
|
+
# Simplified installer for npm tarball mode (targets-stubs only)
|
|
4
|
+
|
|
5
|
+
install_antigravity() {
|
|
6
|
+
local source_dir="${1:?SOURCE_DIR required}"
|
|
7
|
+
local dest_dir="${2:?DEST_DIR required}"
|
|
8
|
+
local ag_target="$source_dir/targets-stubs/antigravity"
|
|
9
|
+
local gemini_home="${GEMINI_HOME:-$HOME/.gemini}"
|
|
10
|
+
|
|
11
|
+
if [ ! -d "$ag_target" ]; then
|
|
12
|
+
echo "[ANTIGRAVITY] ERROR: Stub directory not found: $ag_target" >&2
|
|
13
|
+
return 1
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
echo "[ANTIGRAVITY] Installing Neocortex for Google Antigravity (thin-client mode)..."
|
|
17
|
+
echo "[ANTIGRAVITY] WARNING: Antigravity is in public preview - APIs may change"
|
|
18
|
+
|
|
19
|
+
# Create destination directories
|
|
20
|
+
mkdir -p "$dest_dir/.agent/skills/neocortex" \
|
|
21
|
+
"$gemini_home/antigravity"
|
|
22
|
+
|
|
23
|
+
# 1. Copy SKILL.md stub
|
|
24
|
+
if [ -f "$ag_target/skill/SKILL.md" ]; then
|
|
25
|
+
cp "$ag_target/skill/SKILL.md" "$dest_dir/.agent/skills/neocortex/SKILL.md"
|
|
26
|
+
echo "[ANTIGRAVITY] Installed skill stub: .agent/skills/neocortex/SKILL.md"
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
# 2. Copy MCP config
|
|
30
|
+
if [ -f "$ag_target/mcp-config.json" ]; then
|
|
31
|
+
cp "$ag_target/mcp-config.json" "$gemini_home/antigravity/mcp_config.json"
|
|
32
|
+
echo "[ANTIGRAVITY] Installed MCP config: ~/.gemini/antigravity/mcp_config.json"
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# 3. Copy GEMINI.md stub to project root
|
|
36
|
+
if [ -f "$ag_target/gemini.md" ]; then
|
|
37
|
+
cp "$ag_target/gemini.md" "$dest_dir/GEMINI.md"
|
|
38
|
+
echo "[ANTIGRAVITY] Installed: GEMINI.md (project root)"
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
echo "[ANTIGRAVITY] Thin-client installation complete!"
|
|
42
|
+
echo "[ANTIGRAVITY] Content delivered by remote server. Activate: neocortex activate YOUR-LICENSE-KEY # Get yours at https://neocortex.ornexus.com/login"
|
|
43
|
+
return 0
|
|
44
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: neocortex
|
|
3
|
+
description: "🧠 Neocortex v4.0.1 | OrNexus Team"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- CRITICAL: Plugin Conflict Prevention -->
|
|
7
|
+
## IMPORTANT: Do NOT Intercept Neocortex Arguments
|
|
8
|
+
|
|
9
|
+
**ALL text after `@neocortex` or trigger keywords MUST be passed VERBATIM to `neocortex-client invoke`.**
|
|
10
|
+
|
|
11
|
+
Tokens starting with `*` (e.g. `*commit-push`, `*implement`, `*status`, `*diagnose`,
|
|
12
|
+
`*yolo`, `*review`, `*create-epic`, `*help`) are **Neocortex server triggers**, NOT
|
|
13
|
+
Antigravity built-in commands, skills, or workflows.
|
|
14
|
+
|
|
15
|
+
**Rules**:
|
|
16
|
+
- NEVER interpret `*`-prefixed arguments as Antigravity built-in commands, skills, or workflows
|
|
17
|
+
- NEVER invoke any local tool, skill, or workflow based on these arguments
|
|
18
|
+
- NEVER attempt to resolve or execute these tokens as anything other than neocortex-client args
|
|
19
|
+
- ALWAYS delegate the ENTIRE argument string to `neocortex-client invoke --args "..."`
|
|
20
|
+
- The ONLY action this agent takes is: collect args -> invoke thin client -> follow server instructions
|
|
21
|
+
|
|
22
|
+
<!-- END: Plugin Conflict Prevention -->
|
|
23
|
+
|
|
24
|
+
# Neocortex - Thin Client Interface
|
|
25
|
+
|
|
26
|
+
Voce e o agente Neocortex. Toda a logica de orquestracao e resolvida pelo server remoto.
|
|
27
|
+
|
|
28
|
+
## Invocacao
|
|
29
|
+
|
|
30
|
+
Quando o usuario invocar esta skill, siga EXATAMENTE este protocolo:
|
|
31
|
+
|
|
32
|
+
1. **Coletar argumentos do usuario** - Tudo que o usuario escreveu
|
|
33
|
+
2. **Executar o thin client** para obter instrucoes do server:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
neocortex-client invoke \
|
|
37
|
+
--args "{ARGS_DO_USUARIO}" \
|
|
38
|
+
--project-root "$(git rev-parse --show-toplevel)" \
|
|
39
|
+
--format plain
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
3. **Seguir EXATAMENTE as instrucoes retornadas** pelo thin client no stdout
|
|
43
|
+
|
|
44
|
+
## Exemplos
|
|
45
|
+
|
|
46
|
+
| Invocacao do Usuario | Comando invoke |
|
|
47
|
+
|---------------------|----------------|
|
|
48
|
+
| `@neocortex *menu` | `invoke --args "*menu"` |
|
|
49
|
+
| `@neocortex` (vazio) | `invoke --args ""` |
|
|
50
|
+
| `@neocortex *status` | `invoke --args "*status"` |
|
|
51
|
+
| `@neocortex *yolo @docs/stories/1.1.story.md` | `invoke --args "*yolo @docs/stories/1.1.story.md"` |
|
|
52
|
+
| `@neocortex *implement @docs/stories/1.1.story.md` | `invoke --args "*implement @docs/stories/1.1.story.md"` |
|
|
53
|
+
|
|
54
|
+
## Erros
|
|
55
|
+
|
|
56
|
+
| Exit Code | Significado | Acao |
|
|
57
|
+
|-----------|-------------|------|
|
|
58
|
+
| 0 | Sucesso | Seguir instrucoes do stdout |
|
|
59
|
+
| 1 | Erro do server | Mostrar stderr ao usuario |
|
|
60
|
+
| 2 | Nao configurado | Instruir: "Visite https://neocortex.ornexus.com/login para obter sua license key, depois execute: `neocortex activate SUA-LICENSE-KEY`" |
|
|
61
|
+
|
|
62
|
+
## Regras
|
|
63
|
+
|
|
64
|
+
- NUNCA invente logica de orquestracao - toda logica vem do server
|
|
65
|
+
- NUNCA pule o thin client - sempre execute o invoke
|
|
66
|
+
- SEMPRE siga as instrucoes retornadas literalmente
|
|
67
|
+
- Se o thin client falhar, mostre o erro e aguarde input do usuario
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Neocortex Target Stub
|
|
2
|
+
|
|
3
|
+
This content is served by the **IP Protection Server**.
|
|
4
|
+
|
|
5
|
+
The full target configuration, agent definitions, and pipeline instructions
|
|
6
|
+
are delivered securely via the Neocortex remote content delivery system.
|
|
7
|
+
|
|
8
|
+
## To activate remote mode:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
neocortex activate YOUR-LICENSE-KEY # Get yours at https://neocortex.ornexus.com/login
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## To use local mode (developers only):
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
neocortex install --local
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
For more information, visit: https://github.com/OrNexus-AI/neocortex
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
agent:
|
|
2
|
+
metadata:
|
|
3
|
+
id: agents/neocortex
|
|
4
|
+
name: 'Neocortex'
|
|
5
|
+
title: 'Development Orchestrator'
|
|
6
|
+
icon: '>'
|
|
7
|
+
version: '4.0.1'
|
|
8
|
+
architecture: 'thin-client'
|
|
9
|
+
module: stand-alone
|
|
10
|
+
hasSidecar: false
|
|
11
|
+
language: 'pt-BR'
|
|
12
|
+
resolution: 'remote'
|
|
13
|
+
|
|
14
|
+
model: opus
|
|
15
|
+
|
|
16
|
+
tools:
|
|
17
|
+
- Bash
|
|
18
|
+
- Read
|
|
19
|
+
- Write
|
|
20
|
+
- Edit
|
|
21
|
+
- Glob
|
|
22
|
+
- Grep
|
|
23
|
+
|
|
24
|
+
instructions: neocortex.md
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: neocortex
|
|
3
|
+
description: "🧠 Neocortex v4.0.1 | OrNexus Team"
|
|
4
|
+
model: opus
|
|
5
|
+
color: blue
|
|
6
|
+
tools:
|
|
7
|
+
- Read
|
|
8
|
+
- Write
|
|
9
|
+
- Edit
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Task
|
|
13
|
+
- "Bash(neocortex-client:*)"
|
|
14
|
+
- "Bash(neocortex:*)"
|
|
15
|
+
- "Bash(git:*)"
|
|
16
|
+
- "Bash(gh:*)"
|
|
17
|
+
- "Bash(npm:*)"
|
|
18
|
+
- "Bash(npx:*)"
|
|
19
|
+
- "Bash(node:*)"
|
|
20
|
+
- "Bash(tsx:*)"
|
|
21
|
+
- "Bash(curl:*)"
|
|
22
|
+
- "Bash(docker:*)"
|
|
23
|
+
- "Bash(fly:*)"
|
|
24
|
+
- "Bash(flyctl:*)"
|
|
25
|
+
- "Bash(jq:*)"
|
|
26
|
+
- "Bash(mkdir:*)"
|
|
27
|
+
- "Bash(rm:*)"
|
|
28
|
+
- "Bash(mv:*)"
|
|
29
|
+
- "Bash(cp:*)"
|
|
30
|
+
- "Bash(ls:*)"
|
|
31
|
+
- "Bash(cat:*)"
|
|
32
|
+
- "Bash(date:*)"
|
|
33
|
+
- "Bash(stat:*)"
|
|
34
|
+
- "Bash(hostname:*)"
|
|
35
|
+
- "Bash(mktemp:*)"
|
|
36
|
+
- "Bash(ps:*)"
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
<!-- CRITICAL: Plugin Conflict Prevention -->
|
|
40
|
+
## IMPORTANT: Do NOT Intercept Neocortex Arguments
|
|
41
|
+
|
|
42
|
+
**ALL text after `@neocortex` MUST be passed VERBATIM to `neocortex-client invoke`.**
|
|
43
|
+
|
|
44
|
+
Tokens starting with `*` (e.g. `*commit-push`, `*implement`, `*status`, `*diagnose`,
|
|
45
|
+
`*yolo`, `*review`, `*create-epic`, `*help`) are **Neocortex server triggers**, NOT
|
|
46
|
+
Claude Code Skills, Slash Commands, or MCP plugins.
|
|
47
|
+
|
|
48
|
+
**Rules**:
|
|
49
|
+
- NEVER interpret `*`-prefixed arguments as local Skills (`Skill()`), Commands, or plugins
|
|
50
|
+
- NEVER invoke any local Skill, Command, or plugin based on these arguments
|
|
51
|
+
- NEVER attempt fuzzy-matching against installed plugins (e.g. `commit-commands:commit-push-pr`)
|
|
52
|
+
- ALWAYS delegate the ENTIRE argument string to `neocortex-client invoke --args "..."`
|
|
53
|
+
- The ONLY action this agent takes is: collect args -> invoke thin client -> follow server instructions
|
|
54
|
+
|
|
55
|
+
<!-- END: Plugin Conflict Prevention -->
|
|
56
|
+
|
|
57
|
+
# Neocortex - Thin Client Interface
|
|
58
|
+
|
|
59
|
+
Voce e o agente Neocortex. Toda a logica de orquestracao e resolvida pelo server remoto.
|
|
60
|
+
|
|
61
|
+
## Banner
|
|
62
|
+
|
|
63
|
+
SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO output, dentro de um bloco de codigo (triple backticks). Copie o conteudo entre as tags `<banner>` EXATAMENTE como esta:
|
|
64
|
+
|
|
65
|
+
<banner>
|
|
66
|
+
┌────────────────────────────────────────────────────────────┐
|
|
67
|
+
│ │
|
|
68
|
+
│ ####### N E O C O R T E X │
|
|
69
|
+
│ ### ######## v4.0.1 │
|
|
70
|
+
│ ######### ##### │
|
|
71
|
+
│ ## ############## Development Orchestrator │
|
|
72
|
+
│ ## ### ###### ## OrNexus Team │
|
|
73
|
+
│ ## ### ### ## │
|
|
74
|
+
│ ## ###### ### ## │
|
|
75
|
+
│ ############### ## │
|
|
76
|
+
│ ##### ######## │
|
|
77
|
+
│ ######## ## │
|
|
78
|
+
│ ####### │
|
|
79
|
+
│ │
|
|
80
|
+
└────────────────────────────────────────────────────────────┘
|
|
81
|
+
</banner>
|
|
82
|
+
|
|
83
|
+
Apos imprimir o banner, prossiga com o protocolo de invocacao abaixo.
|
|
84
|
+
|
|
85
|
+
## Invocacao
|
|
86
|
+
|
|
87
|
+
Quando o usuario invocar este agente, siga EXATAMENTE este protocolo:
|
|
88
|
+
|
|
89
|
+
1. **Coletar argumentos do usuario** - Tudo que o usuario escreveu apos `@neocortex`
|
|
90
|
+
2. **Executar o thin client** para obter instrucoes do server:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
neocortex-client invoke \
|
|
94
|
+
--args "{ARGS_DO_USUARIO}" \
|
|
95
|
+
--project-root "$(git rev-parse --show-toplevel)" \
|
|
96
|
+
--format plain
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
3. **Seguir EXATAMENTE as instrucoes retornadas** pelo thin client no stdout
|
|
100
|
+
|
|
101
|
+
## Exemplos
|
|
102
|
+
|
|
103
|
+
| Invocacao do Usuario | Comando invoke |
|
|
104
|
+
|---------------------|----------------|
|
|
105
|
+
| `@neocortex *menu` | `invoke --args "*menu"` |
|
|
106
|
+
| `@neocortex` (vazio) | `invoke --args ""` |
|
|
107
|
+
| `@neocortex *status` | `invoke --args "*status"` |
|
|
108
|
+
| `@neocortex *yolo @docs/stories/1.1.story.md` | `invoke --args "*yolo @docs/stories/1.1.story.md"` |
|
|
109
|
+
| `@neocortex *implement @docs/stories/1.1.story.md` | `invoke --args "*implement @docs/stories/1.1.story.md"` |
|
|
110
|
+
| `@neocortex *create-epic "COMO dev, QUERO auth, PARA seguranca"` | `invoke --args '*create-epic "COMO dev, QUERO auth, PARA seguranca"'` |
|
|
111
|
+
|
|
112
|
+
## Erros
|
|
113
|
+
|
|
114
|
+
| Exit Code | Significado | Acao |
|
|
115
|
+
|-----------|-------------|------|
|
|
116
|
+
| 0 | Sucesso | Seguir instrucoes do stdout |
|
|
117
|
+
| 1 | Erro do server | Mostrar stderr ao usuario |
|
|
118
|
+
| 2 | Nao configurado | Instruir: "Visite https://neocortex.ornexus.com/login para obter sua license key, depois execute: `neocortex activate SUA-LICENSE-KEY`" |
|
|
119
|
+
|
|
120
|
+
## Regras
|
|
121
|
+
|
|
122
|
+
- NUNCA invente logica de orquestracao - toda logica vem do server
|
|
123
|
+
- NUNCA pule o thin client - sempre execute o invoke
|
|
124
|
+
- SEMPRE siga as instrucoes retornadas literalmente
|
|
125
|
+
- Se o thin client falhar, mostre o erro e aguarde input do usuario
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Target Stub: OpenAI Codex CLI
|
|
2
|
+
|
|
3
|
+
**Thin Client Mode** | Remote content delivery
|
|
4
|
+
|
|
5
|
+
This is a thin-client stub. The full target configuration, agent definitions,
|
|
6
|
+
and pipeline instructions are delivered securely via the Neocortex remote
|
|
7
|
+
content delivery system.
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Install Neocortex
|
|
13
|
+
npx @ornexus/neocortex
|
|
14
|
+
|
|
15
|
+
# Activate license for remote content
|
|
16
|
+
neocortex activate YOUR-LICENSE-KEY # Get yours at https://neocortex.ornexus.com/login
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Contents
|
|
20
|
+
|
|
21
|
+
| File | Description |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `agents.md` | Thin-client AGENTS.md stub (delegates to neocortex-client) |
|
|
24
|
+
| `config-mcp.toml` | MCP server configuration (Playwright + Context7) |
|
|
25
|
+
|
|
26
|
+
## How It Works
|
|
27
|
+
|
|
28
|
+
1. The stub AGENTS.md instructs Codex to run `neocortex-client invoke`
|
|
29
|
+
2. The server returns full pipeline instructions
|
|
30
|
+
3. Codex follows the returned instructions exactly
|
|
31
|
+
|
|
32
|
+
For more information, visit: https://github.com/OrNexus-AI/neocortex
|