@ornexus/neocortex 4.66.19 → 4.66.21

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 (29) hide show
  1. package/dist/release-source.json +1 -1
  2. package/dist/sbom.cdx.json +1194 -1194
  3. package/install.ps1 +1 -1
  4. package/install.sh +1 -1
  5. package/package.json +3 -2
  6. package/packages/client/dist/runner/headless/resolver.js +1 -1
  7. package/packages/client/dist/runner/headless/run-yoloop.d.ts +1 -6
  8. package/packages/client/dist/runner/headless/run-yoloop.js +4 -4
  9. package/packages/shared/dist/yoloop/execution-plan-v4-contract.js +332 -0
  10. package/targets-stubs/antigravity/gemini.md +1 -1
  11. package/targets-stubs/antigravity/neocortex.md +1 -1
  12. package/targets-stubs/antigravity/skill/SKILL.md +1 -1
  13. package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
  14. package/targets-stubs/claude-code/neocortex-root.md +2 -2
  15. package/targets-stubs/claude-code/neocortex-sentinel.md +1 -1
  16. package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
  17. package/targets-stubs/claude-code/neocortex.md +2 -2
  18. package/targets-stubs/codex/AGENTS.md +1 -1
  19. package/targets-stubs/codex/neocortex.toml +1 -1
  20. package/targets-stubs/cursor/agent.md +2 -2
  21. package/targets-stubs/deepseek-harness/SKILL.md +1 -1
  22. package/targets-stubs/gemini-cli/agent.md +2 -2
  23. package/targets-stubs/gemini-cli/agents/neocortex.md +2 -2
  24. package/targets-stubs/grok/SKILL.md +1 -1
  25. package/targets-stubs/kimi/neocortex.md +1 -1
  26. package/targets-stubs/openclaw/SKILL.md +1 -1
  27. package/targets-stubs/opencode/neocortex-root.md +2 -2
  28. package/targets-stubs/opencode/neocortex.md +2 -2
  29. package/targets-stubs/vscode/neocortex.agent.md +2 -2
package/install.ps1 CHANGED
@@ -19,7 +19,7 @@ param(
19
19
  [string]$ServerUrl = ('https://{0}.{1}.{2}' -f 'api','neocortex','sh')
20
20
  )
21
21
 
22
- $VERSION = "4.66.19"
22
+ $VERSION = "4.66.21"
23
23
 
24
24
  # =============================================================================
25
25
  # CONFIGURACOES
package/install.sh CHANGED
@@ -4,7 +4,7 @@
4
4
  # Development Orchestrator
5
5
 
6
6
  # Versao do instalador
7
- VERSION="4.66.19"
7
+ VERSION="4.66.21"
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.66.19",
4
- "description": "Neocortex v4.66.19",
3
+ "version": "4.66.21",
4
+ "description": "Neocortex v4.66.21",
5
5
  "keywords": [
6
6
  "claude",
7
7
  "claude-code",
@@ -82,6 +82,7 @@
82
82
  "packages/shared/dist/yoloop/branch-unit.js",
83
83
  "packages/shared/dist/yoloop/canonical.js",
84
84
  "packages/shared/dist/yoloop/epic-terminal-git.js",
85
+ "packages/shared/dist/yoloop/execution-plan-v4-contract.js",
85
86
  "packages/shared/dist/yoloop/operational-budget.js",
86
87
  "packages/shared/dist/yoloop/host-capacity.js",
87
88
  "packages/shared/dist/yoloop/native-launch-retry.js",
@@ -1 +1 @@
1
- import{existsSync as h,readFileSync as T,statSync as _}from"node:fs";import{homedir as k}from"node:os";import{isAbsolute as I,join as S,resolve as R}from"node:path";import{HEADLESS_REASON_CODES as o,boundPublicSummary as D,isHeadlessAdapterId as b,isSafeHeadlessModelId as U,redaction as c}from"./types.js";const N=Object.freeze({runtimeId:"opencode",source:"fallback",publicSafe:!0}),E=".neocortex/headless-runtime.json",A=8*1024,C=new Set(["runtimeId","modelId","source","reasonCode","publicSafe"]),g=/(raw|prompt|private|secret|token|password|authorization|api[_-]?key|license|argv|args|executable|binary|shell|cwd|command|path|url|vendor|stdout|stderr|transcript|workflow|step|customer|pii)/i;function P(e={}){const t=e.registry??O,u=L(e),r=[],d=[];for(const i of u){if(i.value===void 0)continue;const a=M(i,t);if(!a.ok)return a.resolution;d.push(...a.candidate.redactions),r.push(a.candidate)}const n=r.find(i=>i.runtimeId),s=r.find(i=>i.modelId);if(!n?.runtimeId)return{ok:!1,runtimeSource:"unresolved",reasonCode:o.RUNTIME_UNRESOLVED,reasonCodes:[o.RUNTIME_UNRESOLVED],publicSummary:"Headless runtime could not be resolved from explicit, origin, default or fallback sources.",redactionSummary:d,publicSafe:!0};const l=w(n.source);return{ok:!0,runtimeId:n.runtimeId,...s?.modelId?{modelId:s.modelId}:{},runtimeSource:n.source,...s?.source?{modelSource:s.source}:{},reasonCode:l,reasonCodes:[l],publicSummary:`Resolved headless runtime from ${n.source} source.`,redactionSummary:d,publicSafe:!0}}function G(e={}){const t=e.maxBytes??A,u=x(e);for(const r of u)if(h(r.path))try{const d=_(r.path);if(!d.isFile()||d.size>t)return p("Default headless runtime config was not a bounded file.","defaultConfig","unbounded_file");const n=JSON.parse(T(r.path,"utf8")),s=H(n);return s?{ok:!0,defaults:{...s,source:"default",publicSafe:!0},source:r.kind,reasonCodes:[o.RUNTIME_DEFAULT],publicSummary:`Loaded ${r.kind} headless runtime defaults.`,publicSafe:!0}:p("Default headless runtime config did not contain a public object.","defaultConfig","unsafe_key")}catch{return p("Default headless runtime config could not be parsed safely.","defaultConfig","unsafe_key")}return{ok:!0,defaults:void 0,reasonCodes:[],publicSummary:"No headless runtime defaults were found; resolver will continue without guessing.",publicSafe:!0}}function L(e){const t=[{source:"explicit",value:e.explicit},{source:"origin",value:e.origin}];for(const u of v(e))t.push({source:"default",value:u});return e.projectDefault!==void 0&&t.push({source:"default",value:e.projectDefault}),e.userDefault!==void 0&&t.push({source:"default",value:e.userDefault}),e.fallback!==!1&&t.push({source:"fallback",value:e.fallback??N}),t}function v(e){return e.defaults===void 0?[]:Array.isArray(e.defaults)?e.defaults:[e.defaults]}function M(e,t){const u=F(e.value);if(u===void 0)return{ok:!0,candidate:{source:e.source,redactions:[]}};if(!m(u))return f(o.RUNTIME_UNTRUSTED,"Headless runtime hint must be a public object.",e.source,[c("runtime","unsafe_key","value-denied")]);const r=[];for(const a of Object.keys(u))(!C.has(a)||g.test(a))&&r.push(c(`runtime.${a}`,"unsafe_key","key-denied"));u.publicSafe!==!0&&r.push(c("runtime.publicSafe","unsafe_key","value-denied")),(typeof u.source=="string"?u.source:e.source)!==e.source&&r.push(c("runtime.source","unsafe_key","value-denied"));const n=typeof u.runtimeId=="string"?u.runtimeId:void 0,s=typeof u.modelId=="string"?u.modelId:void 0;let l;if(n!==void 0){if(!j(n)||!b(n)||!t.hasAdapter(n))return r.push(c("runtime.runtimeId","unsafe_key","value-denied")),f(o.RUNTIME_UNTRUSTED,"Headless runtime was not trusted or allowlisted.",e.source,r);l=n}let i;if(s!==void 0){if(!U(s))return r.push(c("runtime.modelId","unsafe_key","value-denied")),f(o.MODEL_REJECTED,"Headless model id failed bounded public-safety validation.",e.source,r);i=s}return r.length>0?f(o.RUNTIME_UNTRUSTED,"Headless runtime hint failed public-safety validation.",e.source,r):{ok:!0,candidate:{source:e.source,...l?{runtimeId:l}:{},...i?{modelId:i}:{},redactions:[]}}}function F(e){return m(e)&&e.ok===!0&&"defaults"in e?e.defaults:e}function f(e,t,u,r){return{ok:!1,resolution:{ok:!1,runtimeSource:"unresolved",reasonCode:e,reasonCodes:[e],publicSummary:D(`${t} Source=${u}.`),redactionSummary:r,publicSafe:!0}}}function w(e){switch(e){case"explicit":return o.RUNTIME_EXPLICIT;case"origin":return o.RUNTIME_ORIGIN;case"default":return o.RUNTIME_DEFAULT;case"fallback":return o.RUNTIME_FALLBACK}}function x(e){const t=[],u=y(e.projectRoot);u&&t.push({kind:"project",path:S(u,E)});const r=y(e.homeDir??k());return r&&t.push({kind:"user",path:S(r,E)}),t}function y(e){if(!e||/[\r\n\0]/.test(e))return;const t=I(e)?e:R(e);return I(t)?t:void 0}function H(e){if(!m(e))return;const t=m(e.headless)?e.headless:e;return{...typeof t.runtimeId=="string"?{runtimeId:t.runtimeId}:{},...typeof t.modelId=="string"?{modelId:t.modelId}:{},publicSafe:!0}}function p(e,t,u){return{ok:!1,reasonCode:o.RUNTIME_UNTRUSTED,reasonCodes:[o.RUNTIME_UNTRUSTED],publicSummary:e,redactionSummary:[c(t,u,"value-denied")],publicSafe:!0}}function j(e){return/^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$/.test(e)&&!/[\/\s;&|`$<>]/.test(e)}function m(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const O=Object.freeze({hasAdapter(e){return b(e)}});export{G as loadHeadlessRuntimeDefaults,P as resolveHeadlessRuntime};
1
+ import{existsSync as h,readFileSync as T,statSync as _}from"node:fs";import{homedir as k}from"node:os";import{isAbsolute as I,join as S,resolve as R}from"node:path";import{HEADLESS_REASON_CODES as o,boundPublicSummary as D,isHeadlessAdapterId as b,isSafeHeadlessModelId as U,redaction as c}from"./types.js";const N=Object.freeze({runtimeId:"claude-code",source:"fallback",publicSafe:!0}),E=".neocortex/headless-runtime.json",A=8*1024,C=new Set(["runtimeId","modelId","source","reasonCode","publicSafe"]),g=/(raw|prompt|private|secret|token|password|authorization|api[_-]?key|license|argv|args|executable|binary|shell|cwd|command|path|url|vendor|stdout|stderr|transcript|workflow|step|customer|pii)/i;function P(e={}){const t=e.registry??O,u=L(e),r=[],d=[];for(const i of u){if(i.value===void 0)continue;const a=M(i,t);if(!a.ok)return a.resolution;d.push(...a.candidate.redactions),r.push(a.candidate)}const n=r.find(i=>i.runtimeId),s=r.find(i=>i.modelId);if(!n?.runtimeId)return{ok:!1,runtimeSource:"unresolved",reasonCode:o.RUNTIME_UNRESOLVED,reasonCodes:[o.RUNTIME_UNRESOLVED],publicSummary:"Headless runtime could not be resolved from explicit, origin, default or fallback sources.",redactionSummary:d,publicSafe:!0};const l=w(n.source);return{ok:!0,runtimeId:n.runtimeId,...s?.modelId?{modelId:s.modelId}:{},runtimeSource:n.source,...s?.source?{modelSource:s.source}:{},reasonCode:l,reasonCodes:[l],publicSummary:`Resolved headless runtime from ${n.source} source.`,redactionSummary:d,publicSafe:!0}}function G(e={}){const t=e.maxBytes??A,u=x(e);for(const r of u)if(h(r.path))try{const d=_(r.path);if(!d.isFile()||d.size>t)return p("Default headless runtime config was not a bounded file.","defaultConfig","unbounded_file");const n=JSON.parse(T(r.path,"utf8")),s=H(n);return s?{ok:!0,defaults:{...s,source:"default",publicSafe:!0},source:r.kind,reasonCodes:[o.RUNTIME_DEFAULT],publicSummary:`Loaded ${r.kind} headless runtime defaults.`,publicSafe:!0}:p("Default headless runtime config did not contain a public object.","defaultConfig","unsafe_key")}catch{return p("Default headless runtime config could not be parsed safely.","defaultConfig","unsafe_key")}return{ok:!0,defaults:void 0,reasonCodes:[],publicSummary:"No headless runtime defaults were found; resolver will continue without guessing.",publicSafe:!0}}function L(e){const t=[{source:"explicit",value:e.explicit},{source:"origin",value:e.origin}];for(const u of v(e))t.push({source:"default",value:u});return e.projectDefault!==void 0&&t.push({source:"default",value:e.projectDefault}),e.userDefault!==void 0&&t.push({source:"default",value:e.userDefault}),e.fallback!==!1&&t.push({source:"fallback",value:e.fallback??N}),t}function v(e){return e.defaults===void 0?[]:Array.isArray(e.defaults)?e.defaults:[e.defaults]}function M(e,t){const u=F(e.value);if(u===void 0)return{ok:!0,candidate:{source:e.source,redactions:[]}};if(!m(u))return f(o.RUNTIME_UNTRUSTED,"Headless runtime hint must be a public object.",e.source,[c("runtime","unsafe_key","value-denied")]);const r=[];for(const a of Object.keys(u))(!C.has(a)||g.test(a))&&r.push(c(`runtime.${a}`,"unsafe_key","key-denied"));u.publicSafe!==!0&&r.push(c("runtime.publicSafe","unsafe_key","value-denied")),(typeof u.source=="string"?u.source:e.source)!==e.source&&r.push(c("runtime.source","unsafe_key","value-denied"));const n=typeof u.runtimeId=="string"?u.runtimeId:void 0,s=typeof u.modelId=="string"?u.modelId:void 0;let l;if(n!==void 0){if(!j(n)||!b(n)||!t.hasAdapter(n))return r.push(c("runtime.runtimeId","unsafe_key","value-denied")),f(o.RUNTIME_UNTRUSTED,"Headless runtime was not trusted or allowlisted.",e.source,r);l=n}let i;if(s!==void 0){if(!U(s))return r.push(c("runtime.modelId","unsafe_key","value-denied")),f(o.MODEL_REJECTED,"Headless model id failed bounded public-safety validation.",e.source,r);i=s}return r.length>0?f(o.RUNTIME_UNTRUSTED,"Headless runtime hint failed public-safety validation.",e.source,r):{ok:!0,candidate:{source:e.source,...l?{runtimeId:l}:{},...i?{modelId:i}:{},redactions:[]}}}function F(e){return m(e)&&e.ok===!0&&"defaults"in e?e.defaults:e}function f(e,t,u,r){return{ok:!1,resolution:{ok:!1,runtimeSource:"unresolved",reasonCode:e,reasonCodes:[e],publicSummary:D(`${t} Source=${u}.`),redactionSummary:r,publicSafe:!0}}}function w(e){switch(e){case"explicit":return o.RUNTIME_EXPLICIT;case"origin":return o.RUNTIME_ORIGIN;case"default":return o.RUNTIME_DEFAULT;case"fallback":return o.RUNTIME_FALLBACK}}function x(e){const t=[],u=y(e.projectRoot);u&&t.push({kind:"project",path:S(u,E)});const r=y(e.homeDir??k());return r&&t.push({kind:"user",path:S(r,E)}),t}function y(e){if(!e||/[\r\n\0]/.test(e))return;const t=I(e)?e:R(e);return I(t)?t:void 0}function H(e){if(!m(e))return;const t=m(e.headless)?e.headless:e;return{...typeof t.runtimeId=="string"?{runtimeId:t.runtimeId}:{},...typeof t.modelId=="string"?{modelId:t.modelId}:{},publicSafe:!0}}function p(e,t,u){return{ok:!1,reasonCode:o.RUNTIME_UNTRUSTED,reasonCodes:[o.RUNTIME_UNTRUSTED],publicSummary:e,redactionSummary:[c(t,u,"value-denied")],publicSafe:!0}}function j(e){return/^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$/.test(e)&&!/[\/\s;&|`$<>]/.test(e)}function m(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const O=Object.freeze({hasAdapter(e){return b(e)}});export{G as loadHeadlessRuntimeDefaults,P as resolveHeadlessRuntime};
@@ -291,10 +291,5 @@ export declare function prepareYoloopV4ChildWorkspace(input: {
291
291
  readonly graphRevision: string;
292
292
  readonly temporaryBranch?: string;
293
293
  }): Promise<YoloopV4StoryWorktreeWorkspace>;
294
- /**
295
- * P227.23 (DEC-16): validity of a v4 plan with the semantics of shared
296
- * `validateYoloopExecutionPlanV4(plan).valid`, except that phase and barrier
297
- * step ids are checked by shape (non-empty, unique, step-id pattern) instead of
298
- * against the server-owned closed lists. Exported only for the parity test.
299
- */
294
+ /** Public step identities are checked by shape; the server binds their exact lists. */
300
295
  export declare function isRunnerYoloopV4PlanValid(plan: unknown): boolean;