@ornexus/neocortex 4.61.3 → 4.61.4

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 CHANGED
@@ -17,7 +17,7 @@ param(
17
17
  [string]$ServerUrl = ('https://{0}.{1}.{2}' -f 'api','neocortex','sh')
18
18
  )
19
19
 
20
- $VERSION = "4.61.3"
20
+ $VERSION = "4.61.4"
21
21
 
22
22
  # =============================================================================
23
23
  # CONFIGURACOES
package/install.sh CHANGED
@@ -4,7 +4,7 @@
4
4
  # Development Orchestrator
5
5
 
6
6
  # Versao do instalador
7
- VERSION="4.61.3"
7
+ VERSION="4.61.4"
8
8
 
9
9
  # Flags
10
10
  MIGRATION_DETECTED=false
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ornexus/neocortex",
3
- "version": "4.61.3",
4
- "description": "Neocortex v4.61.3",
3
+ "version": "4.61.4",
4
+ "description": "Neocortex v4.61.4",
5
5
  "keywords": [
6
6
  "claude",
7
7
  "claude-code",
@@ -792,6 +792,14 @@ export interface StoryWorktreeBarrierPollingOptions {
792
792
  * phase-1 prompt, which resumes at C05.
793
793
  */
794
794
  export declare function pollStoryWorktreeSpecBarrier(args: string, attempt: (args: string) => Promise<InvokeResult>, options?: StoryWorktreeBarrierPollingOptions): Promise<InvokeResult>;
795
+ /**
796
+ * 4.61.4: persist the server-returned C04 spec acceptance and phase-one receipt
797
+ * into the shared runtime evidence (git common dir), so the server can see
798
+ * every story's acceptance through any child's snapshot and open the barrier.
799
+ * The server re-validates both on every read; a persistence failure is
800
+ * reported, never fatal to the step result.
801
+ */
802
+ export declare function persistStoryWorktreePhaseEvidence(projectRoot: string, result: InvokeResult): Promise<void>;
795
803
  export declare function invoke(options: InvokeOptions): Promise<InvokeResult>;
796
804
  /**
797
805
  * Extract the canonical trigger for client-side pre-flight checks.
@@ -72,7 +72,7 @@ import { probeProjectIdentityMigrationCapability } from '../migrations/project-i
72
72
  import { normalizeYoloopStoryPlanningEvidence } from '../../../shared/dist/yoloop/planning-graph.js';
73
73
  import { normalizeContinuousWriteRef } from '../../../shared/dist/yoloop/wave-decision-receipt.js';
74
74
  import { epicHeadReconciliationInputDigest, epicHeadReconciliationPathsDigest, epicHeadReconciliationRangeDigest, } from '../../../shared/dist/yoloop/epic-terminal-git.js';
75
- import { applyGitLifecycleRuntimeOverlay, classifyGitLifecycleStoryCheckpointProjectionSync, ensureRuntimeEpic, ensureGitLifecycleRuntimeInitialized, executeP205TransientAuthorities, persistGitLifecycleGraphAuthority, P205_COMPLETE_COMMAND, gitLifecycleStoryWriteSet, isStoryWorktreeEvidenceContainer, mutateGitLifecycleRuntime, projectP205TransientExecutionEvidence, readGitLifecycleRuntimeSync, verifyLegacyCheckpointMigrationCandidateSync, } from '../git/git-lifecycle-store.js';
75
+ import { applyGitLifecycleRuntimeOverlay, classifyGitLifecycleStoryCheckpointProjectionSync, ensureRuntimeEpic, ensureGitLifecycleRuntimeInitialized, executeP205TransientAuthorities, persistGitLifecycleGraphAuthority, P205_COMPLETE_COMMAND, gitLifecycleStoryWriteSet, appendStoryWorktreeEvidence, isStoryWorktreeEvidenceContainer, mutateGitLifecycleRuntime, projectP205TransientExecutionEvidence, readGitLifecycleRuntimeSync, verifyLegacyCheckpointMigrationCandidateSync, } from '../git/git-lifecycle-store.js';
76
76
  import { verifyRootMemoryPhysicalWriteSet } from '../private-execution/root-memory-git-evidence.js';
77
77
  import { isRootProjectMemoryEffect } from '../private-execution/shared-root-memory-types.js';
78
78
  import { probeYoloInvokeEnvelopeCapability } from '../yolo/invoke-envelope-capability.js';
@@ -4836,10 +4836,46 @@ export async function pollStoryWorktreeSpecBarrier(args, attempt, options = {})
4836
4836
  await sleep(retryAfter);
4837
4837
  }
4838
4838
  }
4839
+ /**
4840
+ * 4.61.4: persist the server-returned C04 spec acceptance and phase-one receipt
4841
+ * into the shared runtime evidence (git common dir), so the server can see
4842
+ * every story's acceptance through any child's snapshot and open the barrier.
4843
+ * The server re-validates both on every read; a persistence failure is
4844
+ * reported, never fatal to the step result.
4845
+ */
4846
+ export async function persistStoryWorktreePhaseEvidence(projectRoot, result) {
4847
+ const phase = result.metadata?.storyWorktreePhase;
4848
+ if (!result.success || !phase || typeof phase !== 'object' || Array.isArray(phase))
4849
+ return;
4850
+ const record = phase;
4851
+ const acceptance = record.specAcceptance;
4852
+ const receipt = record.phaseOneReceipt;
4853
+ const storyId = typeof record.storyId === 'string' ? record.storyId : undefined;
4854
+ const epicId = storyId && /^P[0-9]{1,12}\./.test(storyId) ? storyId.split('.')[0] : undefined;
4855
+ if (!epicId || (acceptance === undefined && receipt === undefined))
4856
+ return;
4857
+ try {
4858
+ await mutateGitLifecycleRuntime(projectRoot, (document) => {
4859
+ appendStoryWorktreeEvidence(document, epicId, {
4860
+ ...(acceptance !== undefined ? { specAcceptances: [acceptance] } : {}),
4861
+ ...(receipt !== undefined ? { receipts: [receipt] } : {}),
4862
+ });
4863
+ });
4864
+ }
4865
+ catch (error) {
4866
+ const reason = error instanceof Error && /^[a-z0-9-]{1,80}$/.test(error.message) ? error.message : 'story-worktree-evidence-persist-failed';
4867
+ process.stderr.write(`[Neocortex] story-worktree evidence not persisted (${reason}); the root must re-dispatch this phase-1 prompt.\n`);
4868
+ }
4869
+ }
4839
4870
  export async function invoke(options) {
4840
4871
  if (!isStoryWorktreePhaseOneInvocation(options.args))
4841
4872
  return invokeOnce(options);
4842
- return pollStoryWorktreeSpecBarrier(options.args, () => invokeOnce(options));
4873
+ const projectRoot = options.projectRoot ?? process.cwd();
4874
+ return pollStoryWorktreeSpecBarrier(options.args, async () => {
4875
+ const result = await invokeOnce(options);
4876
+ await persistStoryWorktreePhaseEvidence(projectRoot, result);
4877
+ return result;
4878
+ });
4843
4879
  }
4844
4880
  async function invokeOnce(options) {
4845
4881
  // P205.07: admission is physically first. A rejected envelope cannot reach
@@ -21,7 +21,10 @@ export async function probeYoloInvokeEnvelopeCapability(serverUrl, fetcher = glo
21
21
  const timeout = setTimeout(() => controller.abort(), 5_000);
22
22
  timeout.unref?.();
23
23
  try {
24
- const response = await fetcher(`${serverUrl.replace(/\/+$/, '')}/api/v1/health`, {
24
+ // `/health` serves the same handler as `/api/v1/health` but is exempt from
25
+ // the API rate limit, so parallel story-worktree children cannot turn a
26
+ // 429 into a false `capability-missing`.
27
+ const response = await fetcher(`${serverUrl.replace(/\/+$/, '')}/health`, {
25
28
  method: 'GET',
26
29
  headers: { accept: 'application/json' },
27
30
  signal: controller.signal,
@@ -1,4 +1,4 @@
1
- # 🧠 Neocortex v4.61.3 | OrNexus Team
1
+ # 🧠 Neocortex v4.61.4 | OrNexus Team
2
2
 
3
3
  This project uses Neocortex, a Development Orchestrator.
4
4
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: neocortex
3
- description: "🧠 Neocortex v4.61.3 | OrNexus Team"
3
+ description: "🧠 Neocortex v4.61.4 | OrNexus Team"
4
4
  ---
5
5
 
6
6
  <!--
@@ -4,7 +4,7 @@ agent:
4
4
  name: 'Neocortex Root Agent'
5
5
  title: 'Development Orchestrator (Root)'
6
6
  icon: '>'
7
- version: '4.61.3'
7
+ version: '4.61.4'
8
8
  architecture: 'thin-client'
9
9
  module: stand-alone
10
10
  hasSidecar: false
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: neocortex-root
3
- description: "🧠 Neocortex Root Agent v4.61.3 | OrNexus Team"
3
+ description: "🧠 Neocortex Root Agent v4.61.4 | OrNexus Team"
4
4
  model: opus
5
5
  color: blue
6
6
  tools:
@@ -108,7 +108,7 @@ SEMPRE que este agente for invocado, imprima o banner abaixo como PRIMEIRO outpu
108
108
  ┌────────────────────────────────────────────────────────────┐
109
109
  │ │
110
110
  │ ####### N E O C O R T E X │
111
- │ ### ######## v4.61.3 │
111
+ │ ### ######## v4.61.4 │
112
112
  │ ######### ##### │
113
113
  │ ## ############## Development Orchestrator │
114
114
  │ ## ### ###### ## OrNexus Team │
@@ -4,7 +4,7 @@ agent:
4
4
  name: 'Neocortex'
5
5
  title: 'Development Orchestrator'
6
6
  icon: '>'
7
- version: '4.61.3'
7
+ version: '4.61.4'
8
8
  architecture: 'thin-client'
9
9
  module: stand-alone
10
10
  hasSidecar: false
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: neocortex
3
- description: "🧠 Neocortex v4.61.3 | OrNexus Team"
3
+ description: "🧠 Neocortex v4.61.4 | 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.3 │
109
+ │ ### ######## v4.61.4 │
110
110
  │ ######### ##### │
111
111
  │ ## ############## Development Orchestrator │
112
112
  │ ## ### ###### ## OrNexus Team │
@@ -32,7 +32,7 @@ Codex built-in commands or actions.
32
32
 
33
33
  <!-- END: Plugin Conflict Prevention -->
34
34
 
35
- # Neocortex v4.61.3 | OrNexus Team
35
+ # Neocortex v4.61.4 | 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.3 | OrNexus Team"
3
+ description: "🧠 Neocortex v4.61.4 | 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.3 │
107
+ │ ### ######## v4.61.4 │
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.3 | OrNexus Team"
3
+ description: "🧠 Neocortex v4.61.4 | 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.3 │
65
+ │ ### ######## v4.61.4 │
66
66
  │ ######### ##### │
67
67
  │ ## ############## Development Orchestrator │
68
68
  │ ## ### ###### ## OrNexus Team │
@@ -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.3 │
67
+ │ ### ######## v4.61.4 │
68
68
  │ ######### ##### │
69
69
  │ ## ############## Development Orchestrator │
70
70
  │ ## ### ###### ## OrNexus Team │
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "neocortex"
3
- description: "Neocortex v4.61.3 | OrNexus Team"
3
+ description: "Neocortex v4.61.4 | 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.3 │
75
+ │ ### ######## v4.61.4 │
76
76
  │ ######### ##### │
77
77
  │ ## ############## Development Orchestrator │
78
78
  │ ## ### ###### ## OrNexus Team │