@ornexus/neocortex 4.66.49 → 4.66.51
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/dist/release-source.json +1 -1
- package/dist/sbom.cdx.json +1191 -1191
- package/install.js +8 -8
- package/install.ps1 +188 -162
- package/install.sh +1 -1
- package/package.json +2 -2
- package/packages/client/dist/commands/activate.js +6 -7
- package/packages/client/dist/commands/invoke.js +82 -82
- package/packages/client/dist/config/secure-config.d.ts +4 -0
- package/packages/client/dist/config/secure-config.js +6 -6
- package/packages/client/dist/git/git-lifecycle-store.d.ts +3 -1
- package/packages/client/dist/git/git-lifecycle-store.js +8 -8
- package/packages/client/dist/git/story-worktree-manager.d.ts +2 -0
- package/packages/client/dist/git/story-worktree-manager.js +3 -3
- package/packages/client/dist/migrations/project-identity.d.ts +3 -0
- package/packages/client/dist/migrations/project-identity.js +7 -7
- package/packages/client/dist/private-execution/isolated-admission.js +11 -11
- package/packages/client/dist/private-execution/isolated-workspace.js +1 -1
- package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.js +5 -5
- package/packages/client/dist/private-execution/planning-memory-checkpoint.js +3 -3
- package/packages/client/dist/runner/headless/run-yoloop.d.ts +2 -0
- package/packages/client/dist/runner/headless/run-yoloop.js +4 -4
- package/packages/shared/dist/invocation/semantic-gate-remediation.d.ts +45 -0
- package/packages/shared/dist/invocation/semantic-gate-remediation.js +51 -0
- package/targets-stubs/antigravity/gemini.md +1 -1
- package/targets-stubs/antigravity/neocortex.md +1 -1
- package/targets-stubs/antigravity/skill/SKILL.md +1 -1
- package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
- package/targets-stubs/claude-code/neocortex-root.md +2 -2
- package/targets-stubs/claude-code/neocortex-sentinel.md +1 -1
- package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
- package/targets-stubs/claude-code/neocortex.md +2 -2
- package/targets-stubs/codex/AGENTS.md +1 -1
- package/targets-stubs/codex/neocortex.toml +1 -1
- package/targets-stubs/cursor/agent.md +2 -2
- package/targets-stubs/deepseek-harness/SKILL.md +1 -1
- package/targets-stubs/gemini-cli/agent.md +2 -2
- package/targets-stubs/gemini-cli/agents/neocortex.md +2 -2
- package/targets-stubs/grok/SKILL.md +1 -1
- package/targets-stubs/kimi/neocortex.md +1 -1
- package/targets-stubs/lib/managed-config-merge.js +12 -4
- package/targets-stubs/openclaw/SKILL.md +1 -1
- package/targets-stubs/opencode/neocortex-root.md +2 -2
- package/targets-stubs/opencode/neocortex.md +2 -2
- package/targets-stubs/vscode/neocortex.agent.md +2 -2
|
@@ -23,6 +23,10 @@ export interface SecureConfig {
|
|
|
23
23
|
/** Key type: 'license' (NX-...) or 'api_key' (nxk_...). undefined = legacy (treat as license). Story 29.04 */
|
|
24
24
|
readonly keyType?: KeyType;
|
|
25
25
|
}
|
|
26
|
+
export declare class SecureConfigError extends Error {
|
|
27
|
+
readonly code: 'AUTH_PROFILE_CONFIG_INVALID' | 'AUTH_PROFILE_CONFIG_CHANGED';
|
|
28
|
+
constructor(code: 'AUTH_PROFILE_CONFIG_INVALID' | 'AUTH_PROFILE_CONFIG_CHANGED');
|
|
29
|
+
}
|
|
26
30
|
/**
|
|
27
31
|
* Encrypt a license key using the machine fingerprint as passphrase.
|
|
28
32
|
* Returns the encrypted envelope string.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{existsSync as
|
|
1
|
+
import{existsSync as F,readFileSync as u,writeFileSync as N,mkdirSync as x,chmodSync as m,closeSync as h,constants as d,fstatSync as g,fsyncSync as A,lstatSync as K,openSync as I,renameSync as T,unlinkSync as k}from"node:fs";import{execFileSync as E}from"node:child_process";import{randomUUID as D}from"node:crypto";import{join as v,win32 as f}from"node:path";import{encrypt as G,decrypt as $}from"../cache/crypto-utils.js";import{getMachineFingerprint as p}from"../machine/fingerprint.js";import{DEFAULT_SERVER_URL as H}from"../constants.js";import{neocortexProfileDirectory as V}from"./profile-directory.js";const a=V(),s=v(a,"config.json"),j=["api","neocortex","ornexus","com"].join("."),w=1;class l extends Error{code;constructor(t){super(t),this.code=t}}function L(r){let t;try{t=JSON.parse(r.replace(/^\uFEFF/,""))}catch{throw new l("AUTH_PROFILE_CONFIG_INVALID")}if(!t||typeof t!="object"||Array.isArray(t))throw new l("AUTH_PROFILE_CONFIG_INVALID");return t}function O(r,t={}){const e=p(t);return G(r,e)}function W(r,t={}){try{const e=p(t);return $(r,e).plaintext}catch{return null}}let y;function S(r,t){const e=f.join(process.env.SystemRoot??"C:\\Windows","System32");if(!y){const o=E(f.join(e,"whoami.exe"),["/user","/fo","csv","/nh"],{encoding:"utf8",timeout:5e3,windowsHide:!0});y=/,\s*"(S-1-(?:\d+-)+\d+)"\s*$/i.exec(o.trim())?.[1]}y&&E(f.join(e,"icacls.exe"),[r,"/inheritance:r","/grant:r",`*${y}:${t}`],{stdio:"pipe",timeout:5e3,windowsHide:!0})}function P(r){try{process.platform==="win32"?S(r,"(F)"):m(r,384)}catch{}}function Y(r){try{process.platform==="win32"?S(r,"(OI)(CI)(F)"):m(r,448)}catch{}}let U=!1;function b(r){if(U)return;const t=r.serverUrl;if(!t)return;/^https?:\/\/(localhost|127\.0\.0\.1|0\.0\.0\.0)(:\d+)?/i.test(t)&&(U=!0,console.warn(`
|
|
2
2
|
[!] Warning: connected to local server (`+t+`).
|
|
3
3
|
To use production, run: neocortex activate YOUR-LICENSE-KEY
|
|
4
4
|
Get yours at https://neocortex.sh/portal/login
|
|
5
|
-
`))}function
|
|
6
|
-
[!] Machine fingerprint changed (was: ${e.machineId.slice(0,12)}..., now: ${
|
|
5
|
+
`))}function X(r){const t=r.match(/^(https?:\/\/)([^/]+)(.*)$/i);if(!t)return null;const[,e,o,n=""]=t;return o.toLowerCase()!==j?null:`${e}api.neocortex.sh${n}`}function re(r={}){try{if(!F(s))return null;const t=u(s,"utf-8"),e=L(t);if(e.licenseKey&&!e.encryptedLicenseKey){const i=O(e.licenseKey,r),c={...e},C=c.licenseKey;return delete c.licenseKey,c.encryptedLicenseKey=i,c.configVersion||(c.configVersion=w),r.strictReadOnly||R(c,t),{serverUrl:e.serverUrl,mode:e.mode,machineId:e.machineId,activatedAt:e.activatedAt,tier:e.tier,licenseKey:C,keyType:e.keyType}}let o;if(e.encryptedLicenseKey){const i=W(e.encryptedLicenseKey,r);i&&(o=i)}const n={serverUrl:e.serverUrl,mode:e.mode,machineId:e.machineId,activatedAt:e.activatedAt,tier:e.tier,licenseKey:o,keyType:e.keyType};if(e.machineId&&!o&&e.encryptedLicenseKey){const i=p(r);e.machineId!==i&&console.warn(`
|
|
6
|
+
[!] Machine fingerprint changed (was: ${e.machineId.slice(0,12)}..., now: ${i.slice(0,12)}...).
|
|
7
7
|
Your encrypted credentials are no longer valid.
|
|
8
8
|
Re-activate with: neocortex activate YOUR-LICENSE-KEY
|
|
9
|
-
`)}if(
|
|
9
|
+
`)}if(b(n),n.serverUrl&&!process.env.NEOCORTEX_SERVER_URL&&/^https?:\/\/(localhost|127\.0\.0\.1|0\.0\.0\.0)(:\d+)?/i.test(n.serverUrl)){const c=H;return console.warn(`[neocortex] Auto-repairing serverUrl: ${n.serverUrl} -> ${c}
|
|
10
10
|
[neocortex] To keep localhost, set NEOCORTEX_SERVER_URL=${n.serverUrl}
|
|
11
|
-
`),{...n,serverUrl:
|
|
12
|
-
`,"
|
|
11
|
+
`),{...n,serverUrl:c}}if(n.serverUrl&&!process.env.NEOCORTEX_SERVER_URL){const i=X(n.serverUrl);if(i)return{...n,serverUrl:i}}return n}catch{return null}}function _(){try{const r=K(s);if(!r.isFile()||r.isSymbolicLink())throw new l("AUTH_PROFILE_CONFIG_INVALID");const t=I(s,d.O_RDWR|d.O_NOFOLLOW|d.O_NONBLOCK);try{const e=g(t);if(!e.isFile()||e.dev!==r.dev||e.ino!==r.ino)throw new l("AUTH_PROFILE_CONFIG_CHANGED");return u(t,"utf8")}finally{h(t)}}catch(r){if(r.code==="ENOENT")return null;throw r}}function R(r,t){x(a,{recursive:!0,mode:448})!==void 0&&Y(a);const e=v(a,`.config.json.${D()}.tmp`),o=I(e,"wx",384);let n=!1;try{try{P(e),N(o,JSON.stringify(r,null,2)+`
|
|
12
|
+
`,"utf8"),A(o)}finally{h(o)}if(_()!==t)throw new l("AUTH_PROFILE_CONFIG_CHANGED");T(e,s),n=!0}finally{if(!n)try{k(e)}catch{}}}function te(r){const t=_(),e=t===null?{}:L(t),o=O(r.licenseKey),n=r.keyType??(r.licenseKey.startsWith("nxk_")?"api_key":"license"),i={...e,configVersion:w,serverUrl:r.serverUrl,mode:r.mode,machineId:r.machineId,activatedAt:r.activatedAt,tier:r.tier,encryptedLicenseKey:o,keyType:n};delete i.licenseKey,delete i.apiKey,R(i,t)}export{l as SecureConfigError,W as decryptLicenseKey,O as encryptLicenseKey,re as loadSecureConfig,te as saveSecureConfig,Y as setSecureDirPermissions,P as setSecureFilePermissions};
|
|
@@ -549,11 +549,13 @@ export type GitLifecyclePhysicalIntegrationLockResult = {
|
|
|
549
549
|
readonly ok: false;
|
|
550
550
|
readonly reasonCode: 'git-lifecycle-integration-backpressure' | 'git-lifecycle-integration-lock-failed';
|
|
551
551
|
};
|
|
552
|
+
export declare const YOLOOP_RUNNER_LOCK_SCOPE = "yoloop-runner";
|
|
553
|
+
type PhysicalIntegrationLockScope = 'integration' | typeof YOLOOP_RUNNER_LOCK_SCOPE;
|
|
552
554
|
/** One physical writer lock shared by direct `*yolo` and continuous DAG integration. */
|
|
553
555
|
export declare function acquireGitLifecyclePhysicalIntegrationLock(projectRoot: string, requested: Omit<GitLifecyclePhysicalIntegrationLockOwner, 'schemaVersion' | 'pid' | 'createdAt' | 'ownerNonce'> & {
|
|
554
556
|
readonly createdAt?: string;
|
|
555
557
|
readonly ownerNonce?: string;
|
|
556
|
-
}, scope?:
|
|
558
|
+
}, scope?: PhysicalIntegrationLockScope): Promise<GitLifecyclePhysicalIntegrationLockResult>;
|
|
557
559
|
/** P227.06 (ADR-3): bounded, jittered wait on the physical integration lock. */
|
|
558
560
|
export interface GitLifecyclePhysicalIntegrationLockWait {
|
|
559
561
|
/** Total scheduled wait in ms; default 2000, clamped to [0, 5000]. */
|