@ornexus/neocortex 3.9.7 → 3.9.8
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 +1 -1
- package/install.sh +43 -1
- package/package.json +2 -2
- package/packages/client/dist/agent/update-description.d.ts +36 -0
- package/packages/client/dist/agent/update-description.d.ts.map +1 -0
- package/packages/client/dist/agent/update-description.js +143 -0
- package/packages/client/dist/agent/update-description.js.map +1 -0
- package/packages/client/dist/commands/activate.d.ts.map +1 -1
- package/packages/client/dist/commands/activate.js +26 -2
- package/packages/client/dist/commands/activate.js.map +1 -1
- 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 +17 -2
- package/targets-stubs/codex/agents.md +1 -1
- package/targets-stubs/cursor/agent.md +1 -1
- package/targets-stubs/gemini-cli/agent.md +1 -1
- package/targets-stubs/vscode/agent.md +1 -1
package/install.ps1
CHANGED
package/install.sh
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# Epic & Story Development Orchestrator
|
|
5
5
|
|
|
6
6
|
# Versao do instalador
|
|
7
|
-
VERSION="3.9.
|
|
7
|
+
VERSION="3.9.8"
|
|
8
8
|
|
|
9
9
|
# Flags
|
|
10
10
|
MIGRATION_DETECTED=false
|
|
@@ -202,6 +202,33 @@ copy_dir() {
|
|
|
202
202
|
[ -d "$src" ] && cp -r "$src" "$dest" 2>/dev/null
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
# Patch description tier in any agent file (YAML frontmatter or Markdown H1)
|
|
206
|
+
# Usage: patch_description_tier <file>
|
|
207
|
+
# Reads tier from ~/.neocortex/config.json and replaces (Free) with actual tier
|
|
208
|
+
patch_description_tier() {
|
|
209
|
+
local target_file="$1"
|
|
210
|
+
local config_file="${HOME}/.neocortex/config.json"
|
|
211
|
+
|
|
212
|
+
[ -f "$target_file" ] || return 0
|
|
213
|
+
[ -f "$config_file" ] || return 0
|
|
214
|
+
|
|
215
|
+
local tier
|
|
216
|
+
tier=$(cat "$config_file" 2>/dev/null | grep -o '"tier"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*"\([^"]*\)"$/\1/')
|
|
217
|
+
[ -n "$tier" ] || return 0
|
|
218
|
+
|
|
219
|
+
local tier_label
|
|
220
|
+
case "$tier" in
|
|
221
|
+
pro) tier_label="Pro" ;;
|
|
222
|
+
enterprise) tier_label="Enterprise" ;;
|
|
223
|
+
*) return 0 ;; # Already Free, no patch needed
|
|
224
|
+
esac
|
|
225
|
+
|
|
226
|
+
# Replace any tier label: (Free), (Pro), or (Enterprise)
|
|
227
|
+
sed -i.bak "s/| OrNexus Team ([^)]*)/| OrNexus Team (${tier_label})/" "$target_file" 2>/dev/null
|
|
228
|
+
rm -f "${target_file}.bak" 2>/dev/null
|
|
229
|
+
debug "Description tier patched: ${tier_label} in $(basename "$target_file")"
|
|
230
|
+
}
|
|
231
|
+
|
|
205
232
|
# =============================================================================
|
|
206
233
|
# DETECCAO DE VERSAO ANTIGA
|
|
207
234
|
# =============================================================================
|
|
@@ -653,6 +680,9 @@ install_agent() {
|
|
|
653
680
|
copy_file "$CLAUDE_TARGET_DIR/neocortex.md" "$DEST_DIR/" || ((errors++))
|
|
654
681
|
copy_file "$CLAUDE_TARGET_DIR/neocortex.agent.yaml" "$DEST_DIR/" || ((errors++))
|
|
655
682
|
|
|
683
|
+
# Dynamic description: patch tier from existing config (if activated)
|
|
684
|
+
patch_description_tier "$DEST_DIR/neocortex.md"
|
|
685
|
+
|
|
656
686
|
# Cleanup: remover workflow.md de instalacoes anteriores (v3.8 -> v3.9)
|
|
657
687
|
if [ -f "$DEST_DIR/workflow.md" ]; then
|
|
658
688
|
rm -f "$DEST_DIR/workflow.md"
|
|
@@ -1126,6 +1156,9 @@ create_project_dirs() {
|
|
|
1126
1156
|
# Cleanup workflow.md from previous versions
|
|
1127
1157
|
rm -f "$project_dir/.claude/agents/neocortex/workflow.md" 2>/dev/null
|
|
1128
1158
|
|
|
1159
|
+
# Dynamic description: patch tier
|
|
1160
|
+
patch_description_tier "$project_dir/.claude/agents/neocortex/neocortex.md"
|
|
1161
|
+
|
|
1129
1162
|
# Thin-client: cleanup legacy IP from previous installs
|
|
1130
1163
|
auto_cleanup_legacy_project "$project_dir"
|
|
1131
1164
|
target_summary="${target_summary}claude-code, "
|
|
@@ -1137,6 +1170,7 @@ create_project_dirs() {
|
|
|
1137
1170
|
if [ -f "$stub_adapter" ]; then
|
|
1138
1171
|
. "$stub_adapter"
|
|
1139
1172
|
install_cursor "$SOURCE_DIR" "$project_dir"
|
|
1173
|
+
patch_description_tier "$project_dir/.cursor/agents/neocortex.md"
|
|
1140
1174
|
target_summary="${target_summary}cursor, "
|
|
1141
1175
|
fi
|
|
1142
1176
|
;;
|
|
@@ -1145,6 +1179,7 @@ create_project_dirs() {
|
|
|
1145
1179
|
if [ -f "$stub_adapter" ]; then
|
|
1146
1180
|
. "$stub_adapter"
|
|
1147
1181
|
install_vscode "$SOURCE_DIR" "$project_dir"
|
|
1182
|
+
patch_description_tier "$project_dir/.github/agents/neocortex.md"
|
|
1148
1183
|
target_summary="${target_summary}vscode, "
|
|
1149
1184
|
fi
|
|
1150
1185
|
;;
|
|
@@ -1153,6 +1188,8 @@ create_project_dirs() {
|
|
|
1153
1188
|
if [ -f "$stub_adapter" ]; then
|
|
1154
1189
|
. "$stub_adapter"
|
|
1155
1190
|
install_gemini "$SOURCE_DIR" "$project_dir"
|
|
1191
|
+
local gemini_home="${GEMINI_HOME:-$HOME/.gemini}"
|
|
1192
|
+
patch_description_tier "$gemini_home/agents/neocortex.md"
|
|
1156
1193
|
target_summary="${target_summary}gemini-cli, "
|
|
1157
1194
|
fi
|
|
1158
1195
|
;;
|
|
@@ -1161,6 +1198,9 @@ create_project_dirs() {
|
|
|
1161
1198
|
if [ -f "$stub_adapter" ]; then
|
|
1162
1199
|
. "$stub_adapter"
|
|
1163
1200
|
install_codex "$SOURCE_DIR" "$project_dir"
|
|
1201
|
+
patch_description_tier "$project_dir/AGENTS.md"
|
|
1202
|
+
local codex_home="${CODEX_HOME:-$HOME/.codex}"
|
|
1203
|
+
patch_description_tier "$codex_home/AGENTS.md"
|
|
1164
1204
|
target_summary="${target_summary}codex, "
|
|
1165
1205
|
fi
|
|
1166
1206
|
;;
|
|
@@ -1169,6 +1209,8 @@ create_project_dirs() {
|
|
|
1169
1209
|
if [ -f "$stub_adapter" ]; then
|
|
1170
1210
|
. "$stub_adapter"
|
|
1171
1211
|
install_antigravity "$SOURCE_DIR" "$project_dir"
|
|
1212
|
+
patch_description_tier "$project_dir/.agent/skills/neocortex/SKILL.md"
|
|
1213
|
+
patch_description_tier "$project_dir/GEMINI.md"
|
|
1172
1214
|
target_summary="${target_summary}antigravity, "
|
|
1173
1215
|
fi
|
|
1174
1216
|
;;
|
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.8",
|
|
4
|
+
"description": "Neocortex v3.9.8 - Orquestrador de Desenvolvimento de Epics & Stories para Claude Code",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
7
7
|
"claude-code",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license FSL-1.1
|
|
3
|
+
* Copyright (c) 2026 OrNexus AI
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Neocortex CLI, licensed under the
|
|
6
|
+
* Functional Source License, Version 1.1 (FSL-1.1).
|
|
7
|
+
*
|
|
8
|
+
* Change Date: February 20, 2029
|
|
9
|
+
* Change License: MIT
|
|
10
|
+
*
|
|
11
|
+
* See the LICENSE file in the project root for full license text.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Build the dynamic description string (without quotes/prefix).
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildDescription(version: string, tier: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Read the current tier from ~/.neocortex/config.json.
|
|
19
|
+
* Returns 'free' if config doesn't exist or tier is missing.
|
|
20
|
+
*/
|
|
21
|
+
export declare function readTierFromConfig(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Update agent descriptions across ALL home-directory platform files.
|
|
24
|
+
*
|
|
25
|
+
* Never throws — description update is non-critical.
|
|
26
|
+
* Returns count of files updated.
|
|
27
|
+
*/
|
|
28
|
+
export declare function updateAgentDescription(version: string, tier?: string): number;
|
|
29
|
+
/**
|
|
30
|
+
* Update agent description for a specific file path (used by install scripts
|
|
31
|
+
* for project-level files where paths are dynamic).
|
|
32
|
+
*
|
|
33
|
+
* Never throws — description update is non-critical.
|
|
34
|
+
*/
|
|
35
|
+
export declare function updateAgentDescriptionAt(filePath: string, type: 'yaml' | 'h1', version: string, tier?: string): boolean;
|
|
36
|
+
//# sourceMappingURL=update-description.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-description.d.ts","sourceRoot":"","sources":["../../src/agent/update-description.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA0DH;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAW3C;AA6CD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAW7E;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAIT"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license FSL-1.1
|
|
3
|
+
* Copyright (c) 2026 OrNexus AI
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Neocortex CLI, licensed under the
|
|
6
|
+
* Functional Source License, Version 1.1 (FSL-1.1).
|
|
7
|
+
*
|
|
8
|
+
* Change Date: February 20, 2029
|
|
9
|
+
* Change License: MIT
|
|
10
|
+
*
|
|
11
|
+
* See the LICENSE file in the project root for full license text.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* @neocortex/client - Agent Description Updater (Multi-Platform)
|
|
15
|
+
*
|
|
16
|
+
* Updates the installed agent description across ALL supported platforms
|
|
17
|
+
* with dynamic values: version, tier, and branding.
|
|
18
|
+
*
|
|
19
|
+
* Supported platforms:
|
|
20
|
+
* - Claude Code: ~/.claude/agents/neocortex/neocortex.md (YAML frontmatter)
|
|
21
|
+
* - Gemini CLI: ~/.gemini/agents/agent.md (YAML frontmatter)
|
|
22
|
+
*
|
|
23
|
+
* Project-level platforms (Cursor, VSCode, Codex, Antigravity) are handled
|
|
24
|
+
* by install.sh at install time, since their paths vary per project.
|
|
25
|
+
*
|
|
26
|
+
* Called after:
|
|
27
|
+
* - License activation (activate.ts)
|
|
28
|
+
* - Install (install.sh via sed fallback for all platforms)
|
|
29
|
+
*
|
|
30
|
+
* Format: 🧠 Neocortex vX.X.X - Development Orchestrator | OrNexus Team (Tier)
|
|
31
|
+
*/
|
|
32
|
+
import { readFileSync, writeFileSync, existsSync } from 'node:fs';
|
|
33
|
+
import { join } from 'node:path';
|
|
34
|
+
import { homedir } from 'node:os';
|
|
35
|
+
// ── Constants ─────────────────────────────────────────────────────────────
|
|
36
|
+
const CONFIG_FILE = join(homedir(), '.neocortex', 'config.json');
|
|
37
|
+
const TIER_LABELS = {
|
|
38
|
+
free: 'Free',
|
|
39
|
+
pro: 'Pro',
|
|
40
|
+
enterprise: 'Enterprise',
|
|
41
|
+
};
|
|
42
|
+
// YAML frontmatter: description: "..."
|
|
43
|
+
const YAML_DESCRIPTION_PATTERN = /^description:\s*".*"$/m;
|
|
44
|
+
// Markdown H1: # 🧠 Neocortex vX.X.X - ... (Tier)
|
|
45
|
+
const H1_DESCRIPTION_PATTERN = /^# 🧠 Neocortex v[\d.]+ - Development Orchestrator \| OrNexus Team \([^)]+\)$/m;
|
|
46
|
+
/**
|
|
47
|
+
* All known home-directory agent files, grouped by description format.
|
|
48
|
+
* Project-level files are patched by install.sh (paths vary per project).
|
|
49
|
+
*/
|
|
50
|
+
const HOME_AGENT_FILES = [
|
|
51
|
+
// Claude Code (home-level)
|
|
52
|
+
{ path: join(homedir(), '.claude', 'agents', 'neocortex', 'neocortex.md'), type: 'yaml' },
|
|
53
|
+
// Gemini CLI (home-level)
|
|
54
|
+
{ path: join(homedir(), '.gemini', 'agents', 'agent.md'), type: 'yaml' },
|
|
55
|
+
];
|
|
56
|
+
// ── Public API ────────────────────────────────────────────────────────────
|
|
57
|
+
/**
|
|
58
|
+
* Build the dynamic description string (without quotes/prefix).
|
|
59
|
+
*/
|
|
60
|
+
export function buildDescription(version, tier) {
|
|
61
|
+
const label = TIER_LABELS[tier.toLowerCase()] ?? 'Free';
|
|
62
|
+
return `🧠 Neocortex v${version} - Development Orchestrator | OrNexus Team (${label})`;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Read the current tier from ~/.neocortex/config.json.
|
|
66
|
+
* Returns 'free' if config doesn't exist or tier is missing.
|
|
67
|
+
*/
|
|
68
|
+
export function readTierFromConfig() {
|
|
69
|
+
try {
|
|
70
|
+
if (existsSync(CONFIG_FILE)) {
|
|
71
|
+
const raw = readFileSync(CONFIG_FILE, 'utf-8');
|
|
72
|
+
const config = JSON.parse(raw);
|
|
73
|
+
return config.tier ?? 'free';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
// Config missing or corrupted
|
|
78
|
+
}
|
|
79
|
+
return 'free';
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Update a single file's description. Supports both YAML frontmatter and H1 header.
|
|
83
|
+
*
|
|
84
|
+
* Never throws — description update is non-critical.
|
|
85
|
+
*/
|
|
86
|
+
function updateFile(filePath, type, description) {
|
|
87
|
+
try {
|
|
88
|
+
if (!existsSync(filePath)) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
const content = readFileSync(filePath, 'utf-8');
|
|
92
|
+
let updated;
|
|
93
|
+
if (type === 'yaml') {
|
|
94
|
+
if (!YAML_DESCRIPTION_PATTERN.test(content)) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
updated = content.replace(YAML_DESCRIPTION_PATTERN, `description: "${description}"`);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
if (!H1_DESCRIPTION_PATTERN.test(content)) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
updated = content.replace(H1_DESCRIPTION_PATTERN, `# ${description}`);
|
|
104
|
+
}
|
|
105
|
+
if (updated === content) {
|
|
106
|
+
return false; // Already up to date
|
|
107
|
+
}
|
|
108
|
+
writeFileSync(filePath, updated, 'utf-8');
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Update agent descriptions across ALL home-directory platform files.
|
|
117
|
+
*
|
|
118
|
+
* Never throws — description update is non-critical.
|
|
119
|
+
* Returns count of files updated.
|
|
120
|
+
*/
|
|
121
|
+
export function updateAgentDescription(version, tier) {
|
|
122
|
+
const resolvedTier = tier ?? readTierFromConfig();
|
|
123
|
+
const description = buildDescription(version, resolvedTier);
|
|
124
|
+
let updated = 0;
|
|
125
|
+
for (const { path, type } of HOME_AGENT_FILES) {
|
|
126
|
+
if (updateFile(path, type, description)) {
|
|
127
|
+
updated++;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return updated;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Update agent description for a specific file path (used by install scripts
|
|
134
|
+
* for project-level files where paths are dynamic).
|
|
135
|
+
*
|
|
136
|
+
* Never throws — description update is non-critical.
|
|
137
|
+
*/
|
|
138
|
+
export function updateAgentDescriptionAt(filePath, type, version, tier) {
|
|
139
|
+
const resolvedTier = tier ?? readTierFromConfig();
|
|
140
|
+
const description = buildDescription(version, resolvedTier);
|
|
141
|
+
return updateFile(filePath, type, description);
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=update-description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-description.js","sourceRoot":"","sources":["../../src/agent/update-description.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,6EAA6E;AAE7E,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;AAEjE,MAAM,WAAW,GAA2B;IAC1C,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,YAAY;CACzB,CAAC;AAEF,uCAAuC;AACvC,MAAM,wBAAwB,GAAG,wBAAwB,CAAC;AAE1D,kDAAkD;AAClD,MAAM,sBAAsB,GAAG,gFAAgF,CAAC;AAEhH;;;GAGG;AACH,MAAM,gBAAgB,GAGjB;IACH,2BAA2B;IAC3B,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;IACzF,0BAA0B;IAC1B,EA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AAC;AACjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activate.d.ts","sourceRoot":"","sources":["../../src/commands/activate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"activate.d.ts","sourceRoot":"","sources":["../../src/commands/activate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAoDH,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,uDAAuD;IACvD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,8BAA8B;IAC9B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAaD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAmBxF;AA8BD;;;;;;;;;GASG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAoHhF"}
|
|
@@ -20,11 +20,32 @@
|
|
|
20
20
|
* Story 43.3 - AC1, AC3, AC4, AC5
|
|
21
21
|
*/
|
|
22
22
|
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'node:fs';
|
|
23
|
-
import { join } from 'node:path';
|
|
23
|
+
import { join, dirname } from 'node:path';
|
|
24
24
|
import { homedir } from 'node:os';
|
|
25
|
+
import { fileURLToPath } from 'node:url';
|
|
25
26
|
import { LicenseClient } from '../license/license-client.js';
|
|
26
27
|
import { EncryptedCache } from '../cache/encrypted-cache.js';
|
|
27
28
|
import { getMachineFingerprint } from '../machine/fingerprint.js';
|
|
29
|
+
import { updateAgentDescription } from '../agent/update-description.js';
|
|
30
|
+
// ── Version Resolution ────────────────────────────────────────────────────
|
|
31
|
+
function getInstalledVersion() {
|
|
32
|
+
try {
|
|
33
|
+
const thisFile = fileURLToPath(import.meta.url);
|
|
34
|
+
let dir = dirname(thisFile);
|
|
35
|
+
for (let i = 0; i < 5; i++) {
|
|
36
|
+
try {
|
|
37
|
+
const pkg = JSON.parse(readFileSync(join(dir, 'package.json'), 'utf-8'));
|
|
38
|
+
if (pkg.name === '@ornexus/neocortex' || pkg.name === '@neocortex/client') {
|
|
39
|
+
return pkg.version ?? '0.0.0';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch { /* no package.json at this level */ }
|
|
43
|
+
dir = dirname(dir);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
catch { /* fallback */ }
|
|
47
|
+
return '0.0.0';
|
|
48
|
+
}
|
|
28
49
|
// ── Constants ─────────────────────────────────────────────────────────────
|
|
29
50
|
const CONFIG_DIR = join(homedir(), '.neocortex');
|
|
30
51
|
const CONFIG_FILE = join(CONFIG_DIR, 'config.json');
|
|
@@ -173,7 +194,10 @@ export async function activate(options) {
|
|
|
173
194
|
message: `Failed to save config to ${CONFIG_FILE}: ${err instanceof Error ? err.message : String(err)}`,
|
|
174
195
|
};
|
|
175
196
|
}
|
|
176
|
-
// 5.
|
|
197
|
+
// 5. Update agent description with activated tier and version
|
|
198
|
+
const cliVersion = getInstalledVersion();
|
|
199
|
+
updateAgentDescription(cliVersion, tier);
|
|
200
|
+
// 6. Return success
|
|
177
201
|
return {
|
|
178
202
|
success: true,
|
|
179
203
|
message: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activate.js","sourceRoot":"","sources":["../../src/commands/activate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"activate.js","sourceRoot":"","sources":["../../src/commands/activate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,6EAA6E;AAE7E,SAAS,mBAAmB;IAC1B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChD,IAAI,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3B,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;gBACzE,I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ator | OrNexus Team (Free)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Neocortex - Thin Client Interface
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: neocortex
|
|
3
|
-
description: "Neocortex -
|
|
3
|
+
description: "🧠 Neocortex v3.9.8 - Development Orchestrator | OrNexus Team (Free)"
|
|
4
4
|
model: opus
|
|
5
|
+
color: blue
|
|
5
6
|
tools:
|
|
6
|
-
- Bash
|
|
7
7
|
- Read
|
|
8
8
|
- Write
|
|
9
9
|
- Edit
|
|
10
10
|
- Glob
|
|
11
11
|
- Grep
|
|
12
|
+
- Task
|
|
13
|
+
- "Bash(git:*)"
|
|
14
|
+
- "Bash(gh:*)"
|
|
15
|
+
- "Bash(jq:*)"
|
|
16
|
+
- "Bash(mkdir:*)"
|
|
17
|
+
- "Bash(rm:*)"
|
|
18
|
+
- "Bash(mv:*)"
|
|
19
|
+
- "Bash(cp:*)"
|
|
20
|
+
- "Bash(ls:*)"
|
|
21
|
+
- "Bash(cat:*)"
|
|
22
|
+
- "Bash(date:*)"
|
|
23
|
+
- "Bash(stat:*)"
|
|
24
|
+
- "Bash(hostname:*)"
|
|
25
|
+
- "Bash(mktemp:*)"
|
|
26
|
+
- "Bash(ps:*)"
|
|
12
27
|
---
|
|
13
28
|
|
|
14
29
|
# Neocortex - Thin Client Interface
|