@ornexus/neocortex 4.61.6 → 4.62.0

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.
Files changed (55) hide show
  1. package/dist/release-source.json +1 -1
  2. package/dist/sbom.cdx.json +1193 -1193
  3. package/install.ps1 +31 -34
  4. package/install.sh +1 -1
  5. package/package.json +5 -2
  6. package/packages/client/dist/agent/update-description.d.ts +8 -1
  7. package/packages/client/dist/agent/update-description.js +2 -1
  8. package/packages/client/dist/commands/invoke.d.ts +17 -0
  9. package/packages/client/dist/commands/invoke.js +72 -72
  10. package/packages/client/dist/errors/frontmatter-diagnostics.d.ts +10 -1
  11. package/packages/client/dist/errors/frontmatter-diagnostics.js +1 -1
  12. package/packages/client/dist/git/direct-yolo-checkpoint.d.ts +24 -9
  13. package/packages/client/dist/git/direct-yolo-checkpoint.js +3 -4
  14. package/packages/client/dist/git/git-lifecycle-store.d.ts +66 -0
  15. package/packages/client/dist/git/git-lifecycle-store.js +8 -7
  16. package/packages/client/dist/git/release-gate-env.d.ts +62 -0
  17. package/packages/client/dist/git/release-gate-env.js +1 -0
  18. package/packages/client/dist/git/secure-filesystem-boundary.d.ts +24 -0
  19. package/packages/client/dist/git/secure-filesystem-boundary.js +20 -9
  20. package/packages/client/dist/runner/headless/child-env.d.ts +92 -0
  21. package/packages/client/dist/runner/headless/child-env.js +1 -0
  22. package/packages/client/dist/runner/headless/continuous-story-workspace.js +11 -11
  23. package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.d.ts +1 -0
  24. package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +10 -10
  25. package/packages/client/dist/runner/headless/run-yoloop.js +2 -2
  26. package/packages/client/dist/yolo/invoke-envelope-capability.d.ts +2 -0
  27. package/packages/client/dist/yolo/invoke-envelope-capability.js +1 -1
  28. package/packages/client/dist/yolo/project-manifest-projection-collector.d.ts +28 -0
  29. package/packages/client/dist/yolo/project-manifest-projection-collector.js +1 -0
  30. package/packages/client/dist/yolo/spec-envelope-collector.d.ts +9 -0
  31. package/packages/client/dist/yolo/spec-envelope-collector.js +3 -3
  32. package/packages/client/dist/yoloop/shared-discover-epics.d.ts +16 -0
  33. package/packages/client/dist/yoloop/shared-discover-epics.js +1 -1
  34. package/packages/shared/dist/frontmatter-context-contract.js +164 -52
  35. package/packages/shared/dist/project-manifest-projection.js +199 -0
  36. package/packages/shared/dist/project-validation-commands.js +14 -6
  37. package/packages/shared/dist/yolo/spec-envelope-rules.js +85 -0
  38. package/packages/shared/dist/yolo/spec-envelope.js +33 -7
  39. package/packages/shared/dist/yoloop/epic-terminal-git.js +94 -6
  40. package/packages/shared/dist/yoloop/story-write-scope.js +212 -0
  41. package/targets-stubs/antigravity/gemini.md +1 -1
  42. package/targets-stubs/antigravity/install-antigravity.sh +13 -4
  43. package/targets-stubs/antigravity/skill/SKILL.md +1 -1
  44. package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
  45. package/targets-stubs/claude-code/neocortex-root.md +2 -2
  46. package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
  47. package/targets-stubs/claude-code/neocortex.md +5 -5
  48. package/targets-stubs/codex/AGENTS.md +1 -1
  49. package/targets-stubs/cursor/agent.md +2 -2
  50. package/targets-stubs/gemini-cli/agent.md +2 -2
  51. package/targets-stubs/lib/managed-config-merge.js +77 -1
  52. package/targets-stubs/lib/managed-profile.sh +7 -0
  53. package/targets-stubs/opencode/neocortex-root.md +1 -1
  54. package/targets-stubs/vscode/install-vscode.sh +21 -0
  55. package/targets-stubs/vscode/neocortex.agent.md +2 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: neocortex
3
- description: "🧠 Neocortex v4.61.6 | OrNexus Team"
3
+ description: "🧠 Neocortex v4.62.0 | OrNexus Team"
4
4
  model: opus
5
5
  color: blue
6
6
  permissionMode: bypassPermissions
@@ -106,7 +106,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
106
106
  ┌────────────────────────────────────────────────────────────┐
107
107
  │ │
108
108
  │ ####### N E O C O R T E X │
109
- │ ### ######## v4.61.6 │
109
+ │ ### ######## v4.62.0 │
110
110
  │ ######### ##### │
111
111
  │ ## ############## Development Orchestrator │
112
112
  │ ## ### ###### ## OrNexus Team │
@@ -223,7 +223,8 @@ authorizes delegation (`native_safe`) and returns a root-owned plan:
223
223
  - Each child gets only its server-authored prompt, e.g.
224
224
  `*yolo @docs/stories/<id>.story.md` or the `... branchless-preparation`
225
225
  variant. Never pass the outer `@neocortex *yoloop ...` or any root invocation.
226
- - Serial plans keep one child at a time. Children may delegate further.
226
+ - Serial plans keep one child at a time. Children may delegate further:
227
+ max 1 child level below root, 3 levels total; children never run `*yoloop`.
227
228
  - The root agent keeps yoloop ownership: it waits for all children of the wave,
228
229
  then re-invokes `*yoloop`; server output decides integration and the next
229
230
  wave. Never invent workflow steps.
@@ -363,8 +364,7 @@ Agent (correct):
363
364
  4. Child executions complete; agent re-invokes the loop with the next iteration.
364
365
  5. Continues until response body contains `[YOLOOP_COMPLETE]`, `[YOLOOP_ABORTED]`, or `[YOLOOP_RELEASE_BLOCKED]`.
365
366
 
366
- Agent (INCORRECT, pre-P122): reads the body as plain text and sits idle. The
367
- correct path is mandatory whenever the recognition signals are present.
367
+ Agent (INCORRECT, pre-P122): reads the body as plain text and sits idle.
368
368
 
369
369
  ## Regras
370
370
 
@@ -32,7 +32,7 @@ Codex built-in commands or actions.
32
32
 
33
33
  <!-- END: Plugin Conflict Prevention -->
34
34
 
35
- # Neocortex v4.61.6 | OrNexus Team
35
+ # Neocortex v4.62.0 | OrNexus Team
36
36
 
37
37
  You are a Development Orchestrator. All orchestration logic is delivered by the remote Neocortex server.
38
38
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: neocortex
3
- description: "🧠 Neocortex v4.61.6 | OrNexus Team"
3
+ description: "🧠 Neocortex v4.62.0 | OrNexus Team"
4
4
  model: inherit
5
5
  readonly: false
6
6
  is_background: false
@@ -104,7 +104,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
104
104
  ┌────────────────────────────────────────────────────────────┐
105
105
  │ │
106
106
  │ ####### N E O C O R T E X │
107
- │ ### ######## v4.61.6 │
107
+ │ ### ######## v4.62.0 │
108
108
  │ ######### ##### │
109
109
  │ ## ############## Development Orchestrator │
110
110
  │ ## ### ###### ## OrNexus Team │
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: neocortex-root
3
- description: "🧠 Neocortex v4.61.6 | OrNexus Team"
3
+ description: "🧠 Neocortex v4.62.0 | OrNexus Team"
4
4
  kind: local
5
5
  tools:
6
6
  # File operations (Gemini CLI built-ins)
@@ -62,7 +62,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
62
62
  ┌────────────────────────────────────────────────────────────┐
63
63
  │ │
64
64
  │ ####### N E O C O R T E X │
65
- │ ### ######## v4.61.6 │
65
+ │ ### ######## v4.62.0 │
66
66
  │ ######### ##### │
67
67
  │ ## ############## Development Orchestrator │
68
68
  │ ## ### ###### ## OrNexus Team │
@@ -173,6 +173,63 @@ function isKnownLegacyProfile(bytes) {
173
173
  (/architecture:\s*['"]?thin-client/i.test(content) && /id:\s*agents\/neocortex/i.test(content));
174
174
  }
175
175
 
176
+ // P226.12: the managed `description:` line written by the description patch
177
+ // (`🧠 Neocortex v<ver> (<Tier>) | OrNexus Team`, tier optional).
178
+ const DESCRIPTION_LINE_PATTERN = /^description:[ \t]*"(.*)"[ \t]*$/gm;
179
+ const MANAGED_DESCRIPTION_VALUE = /^\u{1F9E0} Neocortex v(\d+(?:\.\d+)*)(?: \((?:Free|Pro|Enterprise)\))? \| OrNexus Team$/u;
180
+ const BANNER_VERSION_LINE = /^│ ### ######## v(\d+(?:\.\d+)*)\s*│$/m;
181
+ const MAX_DESCRIPTION_CANDIDATES = 13;
182
+
183
+ function descriptionLines(text) {
184
+ return [...text.matchAll(DESCRIPTION_LINE_PATTERN)];
185
+ }
186
+
187
+ /**
188
+ * True when the only delta between the current bytes and the installed bytes
189
+ * (known by hash only) is the managed `description:` line. The installed line
190
+ * is reconstructed from a closed, deterministic candidate set; anything else
191
+ * stays user drift (fail closed).
192
+ */
193
+ function isManagedDescriptionOnlyDelta(currentBytes, desiredBytes, installedHash) {
194
+ if (!currentBytes || typeof installedHash !== 'string' || !installedHash) return false;
195
+ const current = currentBytes.toString('utf8');
196
+ const lines = descriptionLines(current);
197
+ if (lines.length !== 1) return false;
198
+ const currentValue = lines[0][1];
199
+ const currentMatch = MANAGED_DESCRIPTION_VALUE.exec(currentValue);
200
+ if (!currentMatch) return false;
201
+
202
+ const desired = desiredBytes ? Buffer.from(desiredBytes).toString('utf8') : '';
203
+ const desiredLines = descriptionLines(desired);
204
+ const desiredValue = desiredLines.length === 1 ? desiredLines[0][1] : null;
205
+
206
+ const versions = [];
207
+ const addVersion = (value) => { if (value && !versions.includes(value)) versions.push(value); };
208
+ addVersion(currentMatch[1]);
209
+ addVersion(BANNER_VERSION_LINE.exec(current)?.[1]);
210
+ addVersion(desiredValue ? MANAGED_DESCRIPTION_VALUE.exec(desiredValue)?.[1] : null);
211
+
212
+ const candidates = [];
213
+ const addCandidate = (value) => {
214
+ if (value !== null && value !== currentValue && !candidates.includes(value)) candidates.push(value);
215
+ };
216
+ addCandidate(desiredValue);
217
+ for (const version of versions) {
218
+ addCandidate(`\u{1F9E0} Neocortex v${version} | OrNexus Team`);
219
+ for (const tier of ['Free', 'Pro', 'Enterprise']) {
220
+ addCandidate(`\u{1F9E0} Neocortex v${version} (${tier}) | OrNexus Team`);
221
+ }
222
+ }
223
+
224
+ const start = lines[0].index;
225
+ const end = start + lines[0][0].length;
226
+ for (const candidate of candidates.slice(0, MAX_DESCRIPTION_CANDIDATES)) {
227
+ const rebuilt = `${current.slice(0, start)}description: "${candidate}"${current.slice(end)}`;
228
+ if (sha256(Buffer.from(rebuilt, 'utf8')) === installedHash) return true;
229
+ }
230
+ return false;
231
+ }
232
+
176
233
  function writeManagedBytes(input) {
177
234
  const {
178
235
  id,
@@ -204,7 +261,15 @@ function writeManagedBytes(input) {
204
261
  const currentBytes = exists ? fs.readFileSync(target.resolved) : null;
205
262
  const currentHash = currentBytes ? sha256(currentBytes) : null;
206
263
 
207
- if (entry && currentHash !== entry.installedHash && !allowOwnedDriftMerge) {
264
+ let ownershipEvidence = null;
265
+ if (
266
+ entry && currentHash !== entry.installedHash && !allowOwnedDriftMerge &&
267
+ kind === 'profile' && isManagedDescriptionOnlyDelta(currentBytes, desiredBytes, entry.installedHash)
268
+ ) {
269
+ ownershipEvidence = 'managed-description-delta';
270
+ }
271
+
272
+ if (entry && currentHash !== entry.installedHash && !allowOwnedDriftMerge && !ownershipEvidence) {
208
273
  return resultFor(safeId, target.relative, 'skipped', 'user-drift-preserved', {
209
274
  beforeHash: currentHash,
210
275
  installedHash: entry.installedHash,
@@ -227,10 +292,19 @@ function writeManagedBytes(input) {
227
292
  updatedAt: nowIso({ now }),
228
293
  };
229
294
  saveManifest(manifestFile, baseDir, manifest, dryRun);
295
+ } else if (ownershipEvidence) {
296
+ manifest.entries[safeId] = {
297
+ ...entry,
298
+ installedHash: desiredHash,
299
+ action: 'post-process-reconciled',
300
+ updatedAt: nowIso({ now }),
301
+ };
302
+ saveManifest(manifestFile, baseDir, manifest, dryRun);
230
303
  }
231
304
  return resultFor(safeId, target.relative, dryRun ? 'planned-noop' : 'noop', 'managed-content-current', {
232
305
  beforeHash: currentHash,
233
306
  installedHash: desiredHash,
307
+ ...(ownershipEvidence ? { ownershipEvidence } : {}),
234
308
  dryRun,
235
309
  });
236
310
  }
@@ -267,6 +341,7 @@ function writeManagedBytes(input) {
267
341
  beforeHash: currentHash,
268
342
  installedHash: desiredHash,
269
343
  backupRelativePath: backup?.backupRelativePath || null,
344
+ ...(ownershipEvidence ? { ownershipEvidence } : {}),
270
345
  dryRun,
271
346
  });
272
347
  }
@@ -545,4 +620,5 @@ module.exports = {
545
620
  runCli,
546
621
  sha256,
547
622
  isKnownLegacyProfile,
623
+ isManagedDescriptionOnlyDelta,
548
624
  };
@@ -36,6 +36,13 @@ neocortex_is_user_home() {
36
36
  [ "$real_candidate" = "$real_home" ]
37
37
  }
38
38
 
39
+ # P226.13: true when the adapter destination is a global install target (the
40
+ # user home). Adapters use it to skip project folders such as .github/agents
41
+ # or .agent/skills; it only guards creation and never removes anything.
42
+ neocortex_is_global_destination() {
43
+ neocortex_is_user_home "$1"
44
+ }
45
+
39
46
  # Extract action/reasonCode from one helper JSON result line.
40
47
  neocortex_managed_parse() {
41
48
  NEOCORTEX_MANAGED_ACTION="$(printf '%s' "$1" | sed -n 's/.*"action":"\([^"]*\)".*/\1/p' | head -n 1)"
@@ -64,7 +64,7 @@ task directive, I keep root-owned inline/shell-loop execution.
64
64
  ┌────────────────────────────────────────────────────────────┐
65
65
  │ │
66
66
  │ ####### N E O C O R T E X │
67
- │ ### ######## v4.61.6 │
67
+ │ ### ######## v4.62.0 │
68
68
  │ ######### ##### │
69
69
  │ ## ############## Development Orchestrator │
70
70
  │ ## ### ###### ## OrNexus Team │
@@ -41,6 +41,27 @@ install_vscode() {
41
41
 
42
42
  echo "[VSCODE] Installing Neocortex for VSCode / GitHub Copilot (thin-client mode)..."
43
43
 
44
+ # P226.13: a global install passes $HOME as the destination. Never create
45
+ # project folders (.github/*, .vscode) there; install the profile only at
46
+ # the supported user location ~/.copilot/agents. Existing folders are kept.
47
+ if neocortex_is_global_destination "$dest_dir"; then
48
+ if [ -f "$vscode_target/neocortex.agent.md" ]; then
49
+ mkdir -p "$HOME/.copilot/agents"
50
+ neocortex_managed_profile "$source_dir" "$vscode_target/neocortex.agent.md" "$HOME/.copilot/agents/neocortex.agent.md" "$HOME" "profile-copilot-neocortex-agent"
51
+ neocortex_managed_report "[VSCODE]" "~/.copilot/agents/neocortex.agent.md (user agent stub)"
52
+ fi
53
+ if [ -f "$vscode_target/mcp.json" ]; then
54
+ _merge_vscode_mcp "$vscode_target/mcp.json" "$(_vscode_user_mcp_path)" || {
55
+ echo "[VSCODE] ERROR: MCP merge blocked; user config was preserved." >&2
56
+ return 1
57
+ }
58
+ fi
59
+ echo "[VSCODE] Global install: project folders (.github, .vscode) skipped in the home directory."
60
+ echo "[VSCODE] Thin-client installation complete!"
61
+ echo "[VSCODE] Content delivered by remote server. Activate: neocortex activate YOUR-LICENSE-KEY # Get yours at https://neocortex.sh/portal/login"
62
+ return 0
63
+ fi
64
+
44
65
  # Create destination directories
45
66
  mkdir -p "$dest_dir/.github/agents" \
46
67
  "$dest_dir/.vscode"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "neocortex"
3
- description: "Neocortex v4.61.6 | OrNexus Team"
3
+ description: "Neocortex v4.62.0 | OrNexus Team"
4
4
  tools:
5
5
  # Read / Edit (built-in tool sets)
6
6
  - read
@@ -72,7 +72,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
72
72
  ┌────────────────────────────────────────────────────────────┐
73
73
  │ │
74
74
  │ ####### N E O C O R T E X │
75
- │ ### ######## v4.61.6 │
75
+ │ ### ######## v4.62.0 │
76
76
  │ ######### ##### │
77
77
  │ ## ############## Development Orchestrator │
78
78
  │ ## ### ###### ## OrNexus Team │