@ornexus/neocortex 4.60.23 → 4.60.25

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 (86) hide show
  1. package/dist/sbom.cdx.json +23 -23
  2. package/install.js +67 -10
  3. package/install.ps1 +39 -8
  4. package/install.sh +18 -6
  5. package/package.json +5 -2
  6. package/packages/client/dist/adapters/adapter-registry.d.ts +2 -2
  7. package/packages/client/dist/adapters/adapter-registry.js +1 -1
  8. package/packages/client/dist/adapters/grok-adapter.d.ts +11 -0
  9. package/packages/client/dist/adapters/grok-adapter.js +2 -0
  10. package/packages/client/dist/adapters/index.d.ts +1 -0
  11. package/packages/client/dist/adapters/index.js +1 -1
  12. package/packages/client/dist/adapters/platform-detector.d.ts +1 -1
  13. package/packages/client/dist/adapters/platform-detector.js +1 -1
  14. package/packages/client/dist/agent/refresh-stubs.js +2 -2
  15. package/packages/client/dist/cli.js +21 -2
  16. package/packages/client/dist/commands/invoke.d.ts +20 -21
  17. package/packages/client/dist/commands/invoke.js +59 -55
  18. package/packages/client/dist/commands/story-checkpoint.d.ts +15 -0
  19. package/packages/client/dist/commands/story-checkpoint.js +1 -0
  20. package/packages/client/dist/config.js +1 -1
  21. package/packages/client/dist/generated/command-registry.generated.d.ts +18 -52
  22. package/packages/client/dist/generated/command-registry.generated.js +1 -1
  23. package/packages/client/dist/git/direct-yolo-checkpoint.d.ts +67 -0
  24. package/packages/client/dist/git/direct-yolo-checkpoint.js +3 -0
  25. package/packages/client/dist/git/git-lifecycle-step-ids.d.ts +2 -0
  26. package/packages/client/dist/git/git-lifecycle-step-ids.js +1 -0
  27. package/packages/client/dist/git/git-lifecycle-store.d.ts +198 -0
  28. package/packages/client/dist/git/git-lifecycle-store.js +4 -0
  29. package/packages/client/dist/git/secure-filesystem-boundary.d.ts +26 -0
  30. package/packages/client/dist/git/secure-filesystem-boundary.js +123 -0
  31. package/packages/client/dist/graph-retrieval/shared-graph-retrieval-contract.js +1 -1
  32. package/packages/client/dist/index.d.ts +2 -0
  33. package/packages/client/dist/index.js +1 -1
  34. package/packages/client/dist/memory/shared-project-memory-types.d.ts +29 -2
  35. package/packages/client/dist/memory/shared-project-memory-types.js +2 -2
  36. package/packages/client/dist/policy/subagent-approval-policy.js +1 -1
  37. package/packages/client/dist/runner/headless/continuous-story-workspace.d.ts +131 -0
  38. package/packages/client/dist/runner/headless/continuous-story-workspace.js +58 -0
  39. package/packages/client/dist/runner/headless/epic-git-reconciliation-inventory.d.ts +23 -0
  40. package/packages/client/dist/runner/headless/epic-git-reconciliation-inventory.js +1 -0
  41. package/packages/client/dist/runner/headless/epic-merge-candidate-qa.d.ts +15 -0
  42. package/packages/client/dist/runner/headless/epic-merge-candidate-qa.js +28 -0
  43. package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.d.ts +12 -0
  44. package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +8 -0
  45. package/packages/client/dist/runner/headless/epic-terminal-git-runner.d.ts +134 -0
  46. package/packages/client/dist/runner/headless/epic-terminal-git-runner.js +2 -0
  47. package/packages/client/dist/runner/headless/prepared-story-bundle.js +1 -1
  48. package/packages/client/dist/runner/headless/run-yolo.js +1 -1
  49. package/packages/client/dist/runner/headless/run-yoloop.d.ts +7 -2
  50. package/packages/client/dist/runner/headless/run-yoloop.js +8 -1
  51. package/packages/client/dist/runner/headless/types.d.ts +1 -1
  52. package/packages/client/dist/runner/headless/types.js +2 -2
  53. package/packages/client/dist/runner-cli.js +0 -0
  54. package/packages/client/dist/state/project-state-snapshot.js +1 -1
  55. package/packages/client/dist/state/state-json-repair.d.ts +9 -0
  56. package/packages/client/dist/state/state-json-repair.js +3 -3
  57. package/packages/client/dist/tier/tier-aware-client.js +1 -1
  58. package/packages/client/dist/yoloop/invoke-hooks.d.ts +13 -10
  59. package/packages/client/dist/yoloop/invoke-hooks.js +8 -5
  60. package/packages/client/dist/yoloop/shared-discover-epics.js +1 -1
  61. package/packages/shared/dist/generated/command-registry.generated.js +18 -66
  62. package/packages/shared/dist/generated/invocation-schema.generated.js +5 -25
  63. package/packages/shared/dist/invocation/index.d.ts +1 -1
  64. package/packages/shared/dist/yoloop/epic-terminal-git.js +227 -0
  65. package/packages/shared/dist/yoloop/planning-graph.js +119 -0
  66. package/packages/shared/dist/yoloop/public-story-write-set.js +27 -0
  67. package/packages/shared/dist/yoloop/wave-decision-receipt.js +19 -0
  68. package/targets-stubs/antigravity/gemini.md +1 -1
  69. package/targets-stubs/antigravity/neocortex.md +18 -0
  70. package/targets-stubs/antigravity/skill/SKILL.md +1 -1
  71. package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
  72. package/targets-stubs/claude-code/neocortex-root.md +21 -2
  73. package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
  74. package/targets-stubs/claude-code/neocortex.md +2 -2
  75. package/targets-stubs/codex/AGENTS.md +20 -1
  76. package/targets-stubs/cursor/agent.md +20 -2
  77. package/targets-stubs/gemini-cli/agent.md +2 -2
  78. package/targets-stubs/gemini-cli/gemini.md +18 -0
  79. package/targets-stubs/grok/README.md +13 -0
  80. package/targets-stubs/grok/SKILL.md +50 -0
  81. package/targets-stubs/grok/config-mcp.toml +22 -0
  82. package/targets-stubs/grok/install-grok.sh +31 -0
  83. package/targets-stubs/kimi/neocortex.md +18 -0
  84. package/targets-stubs/openclaw/SKILL.md +18 -0
  85. package/targets-stubs/opencode/neocortex-root.md +20 -1
  86. package/targets-stubs/vscode/neocortex.agent.md +20 -2
@@ -9,6 +9,7 @@ Commands:
9
9
  invoke Send orchestration request to server
10
10
  activate Activate license key
11
11
  refresh-memory Create/repair canonical NEOCORTEX.md links and wrappers
12
+ story-checkpoint Root-owned direct-*yolo commit/checkpoint boundary
12
13
  config Inspect or change managed subagent approval mode
13
14
  cache-status Show cache and circuit breaker status
14
15
  update Update to latest version (use 'neocortex update' instead)
@@ -32,6 +33,21 @@ Refresh Memory Options:
32
33
  --targets <csv> Target ids (default: all project-memory targets)
33
34
  --dry-run, --preview Print files that would change without writing
34
35
 
36
+ Story Checkpoint Actions:
37
+ handoff Bind the live setup owner to staged content using a private one-time token
38
+ begin Validate staged story evidence, acquire the writer lease, emit trailers
39
+ finalize Validate HEAD and local gates, optionally push, persist the checkpoint
40
+ recover Migrate one published legacy direct-*yolo commit using immutable evidence
41
+
42
+ Story Checkpoint Options:
43
+ --story <id> Canonical story id (required)
44
+ --project-root <path> Project root directory (default: cwd)
45
+ --commit <sha> Legacy commit for recover
46
+ --push Non-force push during finalize
47
+ --require-remote Require published ancestry during recover
48
+ --remote <name> Git remote (default: origin)
49
+ --format json|plain Public result format (default: plain)
50
+
35
51
  Config Actions:
36
52
  status Show requested/effective/source/scope (default)
37
53
  max Request managed maximum approvals
@@ -63,6 +79,9 @@ Examples:
63
79
  neocortex-client cache-status
64
80
  neocortex-client config status
65
81
  neocortex-client config standard --platform-target claude-code
82
+ neocortex-client story-checkpoint handoff --story P174.03.913359 --format json
83
+ neocortex-client story-checkpoint begin --story P174.03.913359 --format json
84
+ neocortex-client story-checkpoint finalize --story P174.03.913359 --push --format json
66
85
 
67
86
  Command-level watch inside --args:
68
87
  Supported: exactly one final unquoted --watch for *goal create/start/resume
@@ -92,5 +111,5 @@ Invocation payload boundary:
92
111
 
93
112
  License:
94
113
  Licensed under BSL-1.1 (Business Source License 1.1)
95
- `.trim(),p=new Set(["pm","install","postinstall","preinstall","prepublish","postpublish","preuninstall","postuninstall","preprepare","prepare","postprepare"]);async function u(){const a=process.argv.slice(2),t=a[0];t&&p.has(t.toLowerCase())&&process.exit(0),(!t||t==="--help"||t==="-h")&&(console.log(l),process.exit(0)),(t==="--version"||t==="-v")&&(console.log(d()),process.stderr.write(`Licensed under BSL-1.1 (Business Source License 1.1)
96
- `),process.exit(0));const n=a.slice(1);switch(t){case"invoke":{const{invokeCliHandler:s}=await import("./commands/invoke.js"),o=await s(n);process.exit(o);break}case"activate":{const{activate:s}=await import("./commands/activate.js");let o,i,c=!1;for(let e=0;e<n.length;e++){const r=n[e];r==="--server-url"?i=n[++e]:r==="--non-interactive"?c=!0:r==="--help"||r==="-h"?(console.log(l),process.exit(0)):r.startsWith("-")||(o=r)}o||(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 e=await s({licenseKey:o,serverUrl:i,nonInteractive:c});e.success?(console.log(e.message),process.exit(0)):(console.error(e.message),process.exit(1))}catch(e){const r=e instanceof Error?e.message:String(e);console.error(`Activation failed: ${r}`),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"config":{const{configCliHandler:s}=await import("./commands/config.js"),o=await s(n);process.exit(o);break}case"refresh-memory":{const{refreshMemoryCliHandler:s}=await import("./commands/refresh-memory.js"),o=await s(n);process.exit(o);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: ${t}`),console.error('Run "neocortex-client --help" for usage information.'),process.exit(1)}}u().catch(a=>{console.error(`Fatal error: ${a instanceof Error?a.message:String(a)}`),process.exit(1)});
114
+ `.trim(),p=new Set(["pm","install","postinstall","preinstall","prepublish","postpublish","preuninstall","postuninstall","preprepare","prepare","postprepare"]);async function u(){const a=process.argv.slice(2),o=a[0];o&&p.has(o.toLowerCase())&&process.exit(0),(!o||o==="--help"||o==="-h")&&(console.log(l),process.exit(0)),(o==="--version"||o==="-v")&&(console.log(d()),process.stderr.write(`Licensed under BSL-1.1 (Business Source License 1.1)
115
+ `),process.exit(0));const n=a.slice(1);switch(o){case"invoke":{const{invokeCliHandler:r}=await import("./commands/invoke.js"),t=await r(n);process.exit(t);break}case"activate":{const{activate:r}=await import("./commands/activate.js");let t,i,c=!1;for(let e=0;e<n.length;e++){const s=n[e];s==="--server-url"?i=n[++e]:s==="--non-interactive"?c=!0:s==="--help"||s==="-h"?(console.log(l),process.exit(0)):s.startsWith("-")||(t=s)}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 e=await r({licenseKey:t,serverUrl:i,nonInteractive:c});e.success?(console.log(e.message),process.exit(0)):(console.error(e.message),process.exit(1))}catch(e){const s=e instanceof Error?e.message:String(e);console.error(`Activation failed: ${s}`),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"config":{const{configCliHandler:r}=await import("./commands/config.js"),t=await r(n);process.exit(t);break}case"refresh-memory":{const{refreshMemoryCliHandler:r}=await import("./commands/refresh-memory.js"),t=await r(n);process.exit(t);break}case"story-checkpoint":{const{storyCheckpointCliHandler:r}=await import("./commands/story-checkpoint.js"),t=await r(n);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: ${o}`),console.error('Run "neocortex-client --help" for usage information.'),process.exit(1)}}u().catch(a=>{console.error(`Fatal error: ${a instanceof Error?a.message:String(a)}`),process.exit(1)});
@@ -17,6 +17,7 @@ import { type ContinuityProcessingSummaryCursorTarget } from '../continuity/cont
17
17
  import type { ProjectEvidenceEnvelope } from '../evidence/types.js';
18
18
  import { type InvokeEffectContext, type StrictReadOnlyInvokeEnvelope } from '../../../shared/dist/strict-readonly.js';
19
19
  import { type InvokeInputEvidenceV1, type InvokeInputEnvelopeV2, type InvokeInputSourceV2, type InvocationMalformedInputReasonV1, type InvocationAdmissionResultV1, type ProjectIdentityMigrationRequestV1 } from '../../../shared/dist/invocation/index.js';
20
+ import { type P205TransientExecutionAuthority } from '../git/git-lifecycle-store.js';
20
21
  export declare const INVOKE_PAYLOAD_LIMIT_BYTES: number;
21
22
  export declare const INVOKE_PAYLOAD_WARNING_THRESHOLD_BYTES: number;
22
23
  export declare function getOrCreatePendingEpicIdempotencyKey(projectRoot: string, args: string): {
@@ -25,26 +26,6 @@ export declare function getOrCreatePendingEpicIdempotencyKey(projectRoot: string
25
26
  };
26
27
  export declare function clearPendingEpicIdempotencyKey(projectRoot: string, fingerprint: string): void;
27
28
  export declare function recordPendingEpicReservation(projectRoot: string, fingerprint: string, claimId: string, epicId: string): void;
28
- interface InitProjectMemoryBootstrapSnapshot {
29
- readonly canonical: {
30
- readonly path: 'NEOCORTEX.md';
31
- readonly exists: boolean;
32
- readonly incompleteReasons: readonly string[];
33
- readonly confidence: 'high' | 'medium' | 'low';
34
- };
35
- readonly permittedSources: {
36
- readonly packageBuildFiles: number;
37
- readonly architectureReadmeDocs: number;
38
- readonly runtimeConfigTemplates: number;
39
- readonly platformWrappers: number;
40
- };
41
- readonly wrapperFiles: readonly string[];
42
- readonly recommendedPreviewCommand: string;
43
- readonly recommendedRefreshCommand: string;
44
- readonly guardrails: readonly string[];
45
- }
46
- export declare function isInitTrigger(args: string): boolean;
47
- export declare function collectInitProjectMemoryBootstrapSnapshot(projectRoot: string): InitProjectMemoryBootstrapSnapshot;
48
29
  export interface InvokeOptions {
49
30
  /** Raw args from the user (e.g., "*yolo @docs/stories/1.1.story.md") */
50
31
  readonly args: string;
@@ -549,7 +530,25 @@ export declare function __resetSchemaDriftWarnedForTests(): void;
549
530
  * Read state.json and construct a sanitized snapshot for the server.
550
531
  * Relative paths only - no absolute paths sent to server.
551
532
  */
552
- export declare function collectStateSnapshot(projectRoot: string): StateSnapshot;
533
+ export interface StateSnapshotCollectionOptions {
534
+ readonly epicAware?: boolean;
535
+ readonly projectless?: boolean;
536
+ /** Process-local proof keyed by story; never read from or written to JSON. */
537
+ readonly p205Authorities?: Readonly<Record<string, P205TransientExecutionAuthority>>;
538
+ }
539
+ export declare class StateSnapshotIntegrityError extends Error {
540
+ readonly reasonCode: string;
541
+ constructor(reasonCode: string);
542
+ }
543
+ export declare function isEpicAwareCommandId(commandId: string | null | undefined): boolean;
544
+ /**
545
+ * Epic-aware commands cannot let generic repair turn a missing/truncated state
546
+ * into authoritative empty collections. This read-only gate runs before repair;
547
+ * structurally valid legacy objects continue through the normal migration path.
548
+ */
549
+ export declare function assertEpicAwareStateShapeBeforeRepair(projectRoot: string): void;
550
+ export declare function collectStateSnapshot(projectRoot: string, options?: StateSnapshotCollectionOptions): StateSnapshot;
551
+ export declare function collectInvokeP205Authorities(projectRoot: string, args: string, commandId: string | null | undefined): Promise<Readonly<Record<string, P205TransientExecutionAuthority>>>;
553
552
  export declare function createFullStateSnapshotScope(trigger: string, snapshot: Pick<StateSnapshot, 'stories' | 'epics'>): FullStateSnapshotScope;
554
553
  interface SendResult {
555
554
  readonly ok: boolean;