@ornexus/neocortex 4.60.70 → 4.60.71

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.60.70"
20
+ $VERSION = "4.60.71"
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.60.70"
7
+ VERSION="4.60.71"
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.60.70",
4
- "description": "Neocortex v4.60.70",
3
+ "version": "4.60.71",
4
+ "description": "Neocortex v4.60.71",
5
5
  "keywords": [
6
6
  "claude",
7
7
  "claude-code",
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{getClientVersion as p}from"./version.js";const l=`
2
+ import{getClientVersion as l}from"./version.js";import{spawnSync as v}from"node:child_process";import{COMMAND_REGISTRY_CHECKSUM as p,COMMAND_REGISTRY_VERSION as d}from"./generated/command-registry.generated.js";import{readProjectRegistryIdentity as j,reconcileRegistry as m,RegistryReconciliationError as u,REGISTRY_RECONCILIATION_REASON_CODES as h}from"./registry/registry-reconciliation.js";const f=`
3
3
  neocortex-client - Neocortex Client CLI
4
4
 
5
5
  Usage:
@@ -30,6 +30,7 @@ Commands:
30
30
  config Inspect or change managed subagent approval mode
31
31
  cache-status Show cache and circuit breaker status
32
32
  doctor Read-only compatibility and release diagnostics
33
+ reconcile-registry Reconcile the installed client with a trusted local/public registry
33
34
  update Update to latest version (use 'neocortex update' instead)
34
35
 
35
36
  Options:
@@ -94,6 +95,10 @@ Doctor Options:
94
95
  Exit 0: healthy or observationally degraded; exit 1: incompatible/malformed/required blocker;
95
96
  exit 2: invalid usage. Doctor never repairs, updates, deploys, logs in, or rewrites state.
96
97
 
98
+ Registry Reconciliation Options:
99
+ --project-root <path> Trusted local Neocortex checkout (default: cwd)
100
+ --check-latest Upgrade only when npm latest is strictly newer; never downgrade
101
+
97
102
  Activate Options:
98
103
  <license-key> License key (e.g., NX-PRO-ABC-123)
99
104
  --server-url <url> Server URL override
@@ -214,5 +219,7 @@ Invocation payload boundary:
214
219
 
215
220
  License:
216
221
  Licensed under BSL-1.1 (Business Source License 1.1)
217
- `.trim(),d=new Set(["pm","install","postinstall","preinstall","prepublish","postpublish","preuninstall","postuninstall","preprepare","prepare","postprepare"]);async function m(){const c=process.argv.slice(2),n=c[0];n&&d.has(n.toLowerCase())&&process.exit(0),(!n||n==="--help"||n==="-h")&&(console.log(l),process.exit(0)),(n==="--version"||n==="-v")&&(console.log(p()),process.stderr.write(`Licensed under BSL-1.1 (Business Source License 1.1)
218
- `),process.exit(0));const o=c.slice(1);switch(n){case"invoke":{const{invokeCliHandler:e,flushInvokeCliOutput:t}=await import("./commands/invoke.js"),r=await e(o),s=await t();process.exitCode=s?r:1;break}case"activate":{const{activate:e}=await import("./commands/activate.js");let t,r,s=!1;for(let a=0;a<o.length;a++){const i=o[a];i==="--server-url"?r=o[++a]:i==="--non-interactive"?s=!0:i==="--help"||i==="-h"?(console.log(l),process.exit(0)):i.startsWith("-")||(t=i)}t||(console.error("Error: License key is required."),console.error("Usage: neocortex-client activate <license-key>"),console.error("Example: neocortex-client activate NX-PRO-ABC-123"),process.exit(1));try{const a=await e({licenseKey:t,serverUrl:r,nonInteractive:s});a.success?(console.log(a.message),process.exit(0)):(console.error(a.message),process.exit(1))}catch(a){const i=a instanceof Error?a.message:String(a);console.error(`Activation failed: ${i}`),process.exit(1)}break}case"cache-status":{console.log("Cache status requires an active client session."),console.log("Use this command within a running Neocortex client context."),process.exit(0);break}case"doctor":{const{doctorCliHandler:e}=await import("./commands/doctor.js"),t=await e(o);process.exit(t);break}case"config":{const{configCliHandler:e}=await import("./commands/config.js"),t=await e(o);process.exit(t);break}case"refresh-memory":{const{refreshMemoryCliHandler:e}=await import("./commands/refresh-memory.js"),t=await e(o);process.exit(t);break}case"architecture-memory":{const{architectureMemoryTerminalCliHandler:e}=await import("./commands/architecture-memory-terminal.js"),t=await e(o);process.exit(t);break}case"planning-diagnosis":{const{planningDiagnosisCliHandler:e}=await import("./commands/planning-diagnosis.js"),t=await e(o);process.exit(t);break}case"planning-research":{const{planningResearchCliHandler:e}=await import("./commands/planning-research.js"),t=await e(o);process.exit(t);break}case"private-session":{const{privateSessionCliHandler:e}=await import("./commands/private-session.js"),t=await e(o);process.exit(t);break}case"planning-memory":{const{planningMemoryCliHandler:e}=await import("./commands/planning-memory.js"),t=await e(o);process.exit(t);break}case"planning-generation":{const{planningGenerationCliHandler:e}=await import("./commands/planning-generation.js"),t=await e(o);process.exit(t);break}case"story-checkpoint":{const{storyCheckpointCliHandler:e}=await import("./commands/story-checkpoint.js"),t=await e(o);process.exit(t);break}case"legacy-story-branch":{const{legacyStoryBranchCliHandler:e}=await import("./commands/legacy-story-branch.js"),t=await e(o);process.exit(t);break}case"legacy-story-pr":{const{legacyStoryPrCliHandler:e}=await import("./commands/legacy-story-pr.js"),t=await e(o);process.exit(t);break}case"legacy-epic-terminal":{const{legacyEpicTerminalCliHandler:e}=await import("./commands/legacy-epic-terminal.js"),t=await e(o);process.exit(t);break}case"mutation-qa":{const{mutationQaCliHandler:e}=await import("./commands/mutation-qa.js"),t=await e(o);process.exit(t);break}case"property-qa":{const{propertyQaCliHandler:e}=await import("./commands/property-qa.js"),t=await e(o);process.exit(t);break}case"qa-synthetic-backend":{const{syntheticBackendCliHandler:e}=await import("./commands/qa-synthetic-backend.js");process.exitCode=await e(c.slice(1));break}case"qa-scan-review":{const{qaScanReviewCliHandler:e}=await import("./commands/qa-scan-review.js"),t=await e(o);process.exit(t);break}case"qa-root":{const{qaControlCliHandler:e}=await import("./commands/qa-control.js");process.exit(await e(o));break}case"refactor-root":{if(o[0]==="control"){const{refactorControlCliHandler:r}=await import("./commands/refactor-control.js");process.exit(await r(o))}if(o[0]==="characterize"){const{refactorCharacterizationCliHandler:r}=await import("./commands/refactor-characterization.js");process.exit(r(o))}if(o[0]==="review-accept"||o[0]==="review-status"){const{refactorReviewCliHandler:r}=await import("./commands/refactor-review.js");process.exit(await r(o))}if(o[0]?.startsWith("commit-")){const{refactorCommitCliHandler:r}=await import("./commands/refactor-commit.js");process.exit(r(o))}const{refactorRootCliHandler:e}=await import("./commands/refactor-root.js"),t=e(o);process.exit(t);break}case"native-agent":{const{nativeAgentCliHandler:e}=await import("./commands/native-agent.js"),t=await e(o);process.exit(t);break}case"architecture-answers":{const{architectureAnswersCliHandler:e}=await import("./commands/architecture-answers.js"),t=await e(o);process.exit(t);break}case"update":{console.log("To update Neocortex, run:"),console.log(" neocortex update"),console.log(""),console.log("Or manually:"),console.log(" npm install -g @ornexus/neocortex@latest"),process.exit(0);break}default:console.error(`Unknown command: ${n}`),console.error('Run "neocortex-client --help" for usage information.'),process.exit(1)}}m().catch(c=>{console.error(`Fatal error: ${c instanceof Error?c.message:String(c)}`),process.exit(1)});
222
+ `.trim(),w=new Set(["pm","install","postinstall","preinstall","prepublish","postpublish","preuninstall","postuninstall","preprepare","prepare","postprepare"]);function y(r,a){const o=r.indexOf(a);return o>=0?r[o+1]:void 0}function g(r){if(r instanceof u){process.stderr.write(`[Neocortex] ${r.reasonCode}: ${r.remediation}
223
+ `);return}process.stderr.write(`[Neocortex] ${h.ARTIFACT_UNAVAILABLE}: registry reconciliation could not be completed safely; no invoke request was sent.
224
+ `)}function x(){return{version:d,checksum:p}}function b(r){const a=j(r);return!a||a.version===d&&a.checksum===p}function k(r,a){const o=y(a,"--project-root")||process.cwd();try{if(process.env.NEOCORTEX_REGISTRY_REEXECUTED==="1"&&!b(o))throw new u(h.ARTIFACT_MISMATCH,"The reinstalled client still does not match the trusted local projection; no invoke request was sent.");if(m({projectRoot:o,installedVersion:l(),installedIdentity:x()}).status!=="updated")return;const t=v(process.execPath,[process.argv[1],...r],{stdio:"inherit",env:{...process.env,NEOCORTEX_REGISTRY_REEXECUTED:"1"},shell:!1});return t.error?1:t.status??1}catch(e){return g(e),1}}async function C(){const r=process.argv.slice(2),a=r[0];a&&w.has(a.toLowerCase())&&process.exit(0),(!a||a==="--help"||a==="-h")&&(console.log(f),process.exit(0)),(a==="--version"||a==="-v")&&(console.log(l()),process.stderr.write(`Licensed under BSL-1.1 (Business Source License 1.1)
225
+ `),process.exit(0));const o=r.slice(1);switch(a){case"invoke":{const e=k(r,o);if(e!==void 0){process.exitCode=e;break}const{invokeCliHandler:t,flushInvokeCliOutput:c}=await import("./commands/invoke.js"),s=await t(o),n=await c();process.exitCode=n?s:1;break}case"reconcile-registry":{const e=y(o,"--project-root")||process.cwd();try{m({projectRoot:e,installedVersion:l(),installedIdentity:x(),checkLatest:o.includes("--check-latest")}),process.exitCode=0}catch(t){g(t),process.exitCode=1}break}case"activate":{const{activate:e}=await import("./commands/activate.js");let t,c,s=!1;for(let n=0;n<o.length;n++){const i=o[n];i==="--server-url"?c=o[++n]:i==="--non-interactive"?s=!0:i==="--help"||i==="-h"?(console.log(f),process.exit(0)):i.startsWith("-")||(t=i)}t||(console.error("Error: License key is required."),console.error("Usage: neocortex-client activate <license-key>"),console.error("Example: neocortex-client activate NX-PRO-ABC-123"),process.exit(1));try{const n=await e({licenseKey:t,serverUrl:c,nonInteractive:s});n.success?(console.log(n.message),process.exit(0)):(console.error(n.message),process.exit(1))}catch(n){const i=n instanceof Error?n.message:String(n);console.error(`Activation failed: ${i}`),process.exit(1)}break}case"cache-status":{console.log("Cache status requires an active client session."),console.log("Use this command within a running Neocortex client context."),process.exit(0);break}case"doctor":{const{doctorCliHandler:e}=await import("./commands/doctor.js"),t=await e(o);process.exit(t);break}case"config":{const{configCliHandler:e}=await import("./commands/config.js"),t=await e(o);process.exit(t);break}case"refresh-memory":{const{refreshMemoryCliHandler:e}=await import("./commands/refresh-memory.js"),t=await e(o);process.exit(t);break}case"architecture-memory":{const{architectureMemoryTerminalCliHandler:e}=await import("./commands/architecture-memory-terminal.js"),t=await e(o);process.exit(t);break}case"planning-diagnosis":{const{planningDiagnosisCliHandler:e}=await import("./commands/planning-diagnosis.js"),t=await e(o);process.exit(t);break}case"planning-research":{const{planningResearchCliHandler:e}=await import("./commands/planning-research.js"),t=await e(o);process.exit(t);break}case"private-session":{const{privateSessionCliHandler:e}=await import("./commands/private-session.js"),t=await e(o);process.exit(t);break}case"planning-memory":{const{planningMemoryCliHandler:e}=await import("./commands/planning-memory.js"),t=await e(o);process.exit(t);break}case"planning-generation":{const{planningGenerationCliHandler:e}=await import("./commands/planning-generation.js"),t=await e(o);process.exit(t);break}case"story-checkpoint":{const{storyCheckpointCliHandler:e}=await import("./commands/story-checkpoint.js"),t=await e(o);process.exit(t);break}case"legacy-story-branch":{const{legacyStoryBranchCliHandler:e}=await import("./commands/legacy-story-branch.js"),t=await e(o);process.exit(t);break}case"legacy-story-pr":{const{legacyStoryPrCliHandler:e}=await import("./commands/legacy-story-pr.js"),t=await e(o);process.exit(t);break}case"legacy-epic-terminal":{const{legacyEpicTerminalCliHandler:e}=await import("./commands/legacy-epic-terminal.js"),t=await e(o);process.exit(t);break}case"mutation-qa":{const{mutationQaCliHandler:e}=await import("./commands/mutation-qa.js"),t=await e(o);process.exit(t);break}case"property-qa":{const{propertyQaCliHandler:e}=await import("./commands/property-qa.js"),t=await e(o);process.exit(t);break}case"qa-synthetic-backend":{const{syntheticBackendCliHandler:e}=await import("./commands/qa-synthetic-backend.js");process.exitCode=await e(r.slice(1));break}case"qa-scan-review":{const{qaScanReviewCliHandler:e}=await import("./commands/qa-scan-review.js"),t=await e(o);process.exit(t);break}case"qa-root":{const{qaControlCliHandler:e}=await import("./commands/qa-control.js");process.exit(await e(o));break}case"refactor-root":{if(o[0]==="control"){const{refactorControlCliHandler:c}=await import("./commands/refactor-control.js");process.exit(await c(o))}if(o[0]==="characterize"){const{refactorCharacterizationCliHandler:c}=await import("./commands/refactor-characterization.js");process.exit(c(o))}if(o[0]==="review-accept"||o[0]==="review-status"){const{refactorReviewCliHandler:c}=await import("./commands/refactor-review.js");process.exit(await c(o))}if(o[0]?.startsWith("commit-")){const{refactorCommitCliHandler:c}=await import("./commands/refactor-commit.js");process.exit(c(o))}const{refactorRootCliHandler:e}=await import("./commands/refactor-root.js"),t=e(o);process.exit(t);break}case"native-agent":{const{nativeAgentCliHandler:e}=await import("./commands/native-agent.js"),t=await e(o);process.exit(t);break}case"architecture-answers":{const{architectureAnswersCliHandler:e}=await import("./commands/architecture-answers.js"),t=await e(o);process.exit(t);break}case"update":{console.log("To update Neocortex, run:"),console.log(" neocortex update"),console.log(""),console.log("Or manually:"),console.log(" npm install -g @ornexus/neocortex@latest"),process.exit(0);break}default:console.error(`Unknown command: ${a}`),console.error('Run "neocortex-client --help" for usage information.'),process.exit(1)}}C().catch(r=>{console.error(`Fatal error: ${r instanceof Error?r.message:String(r)}`),process.exit(1)});
@@ -84,6 +84,13 @@ export interface InvokeResult {
84
84
  readonly errorCode?: string;
85
85
  readonly exitCode: number;
86
86
  }
87
+ /**
88
+ * Convert the server's drift observation into a local, actionable hard stop.
89
+ * The response is evidence that the request was rejected, never authority for
90
+ * selecting or installing a registry. Selection remains local/public in the
91
+ * registry reconciliation module.
92
+ */
93
+ export declare function projectRegistryDriftInvokeFailure(errorCode: string | undefined): InvokeResult | undefined;
87
94
  /** P223.03 -- convert a valid server terminal into a non-zero CLI/API result. */
88
95
  export declare function projectReleaseBlockedInvokeResult(response: {
89
96
  readonly instructions?: string;