@ornexus/neocortex 4.60.72 → 4.60.73

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 (243) hide show
  1. package/dist/release-source.json +1 -1
  2. package/dist/sbom.cdx.json +24 -24
  3. package/install.ps1 +1 -1
  4. package/install.sh +1 -1
  5. package/package.json +2 -2
  6. package/packages/client/dist/adapters/adapter-registry.js +108 -1
  7. package/packages/client/dist/adapters/antigravity-adapter.js +77 -2
  8. package/packages/client/dist/adapters/claude-code-adapter.js +79 -3
  9. package/packages/client/dist/adapters/codex-adapter.js +80 -2
  10. package/packages/client/dist/adapters/cursor-adapter.js +115 -4
  11. package/packages/client/dist/adapters/gemini-adapter.js +71 -2
  12. package/packages/client/dist/adapters/grok-adapter.js +42 -2
  13. package/packages/client/dist/adapters/index.js +22 -1
  14. package/packages/client/dist/adapters/platform-detector.js +212 -1
  15. package/packages/client/dist/adapters/target-adapter.js +12 -0
  16. package/packages/client/dist/adapters/vscode-adapter.js +72 -2
  17. package/packages/client/dist/agent/refresh-stubs.js +417 -2
  18. package/packages/client/dist/agent/update-agent-yaml.js +102 -1
  19. package/packages/client/dist/agent/update-description.js +251 -1
  20. package/packages/client/dist/cache/crypto-utils.js +78 -1
  21. package/packages/client/dist/cache/encrypted-cache.js +108 -1
  22. package/packages/client/dist/cache/in-memory-asset-cache.js +73 -1
  23. package/packages/client/dist/cache/index.js +13 -1
  24. package/packages/client/dist/cache/protected-pi-boundary.js +44 -1
  25. package/packages/client/dist/checkpoint/checkpoint-client-reader.js +127 -2
  26. package/packages/client/dist/checkpoint/index.js +11 -1
  27. package/packages/client/dist/checkpoint/shared-checkpoint-types.js +32 -1
  28. package/packages/client/dist/cli.js +358 -5
  29. package/packages/client/dist/commands/activate.js +394 -8
  30. package/packages/client/dist/commands/architecture-answers.js +274 -7
  31. package/packages/client/dist/commands/architecture-memory-terminal.js +253 -4
  32. package/packages/client/dist/commands/architecture-non-ui-continuation.js +100 -1
  33. package/packages/client/dist/commands/architecture-root-binding.js +51 -1
  34. package/packages/client/dist/commands/cache-status.js +112 -2
  35. package/packages/client/dist/commands/config.js +88 -1
  36. package/packages/client/dist/commands/doctor.js +635 -2
  37. package/packages/client/dist/commands/invoke.js +7200 -143
  38. package/packages/client/dist/commands/legacy-epic-terminal.js +71 -1
  39. package/packages/client/dist/commands/legacy-story-branch.js +96 -1
  40. package/packages/client/dist/commands/legacy-story-pr.js +276 -1
  41. package/packages/client/dist/commands/mutation-qa-checkpoint.js +285 -5
  42. package/packages/client/dist/commands/mutation-qa-gate.js +54 -1
  43. package/packages/client/dist/commands/mutation-qa-git.js +41 -1
  44. package/packages/client/dist/commands/mutation-qa-policy.js +102 -1
  45. package/packages/client/dist/commands/mutation-qa-run.js +219 -3
  46. package/packages/client/dist/commands/mutation-qa-verdict.js +149 -1
  47. package/packages/client/dist/commands/mutation-qa.js +220 -1
  48. package/packages/client/dist/commands/native-agent.js +136 -2
  49. package/packages/client/dist/commands/planning-diagnosis.js +43 -1
  50. package/packages/client/dist/commands/planning-generation.js +53 -1
  51. package/packages/client/dist/commands/planning-memory.js +40 -1
  52. package/packages/client/dist/commands/planning-research.js +42 -1
  53. package/packages/client/dist/commands/private-session.js +75 -1
  54. package/packages/client/dist/commands/property-qa.js +139 -1
  55. package/packages/client/dist/commands/qa-control.js +16 -1
  56. package/packages/client/dist/commands/qa-scan-browser-launch.js +55 -1
  57. package/packages/client/dist/commands/qa-scan-browser-route.js +28 -1
  58. package/packages/client/dist/commands/qa-scan-capture.js +663 -5
  59. package/packages/client/dist/commands/qa-scan-discovery.js +376 -3
  60. package/packages/client/dist/commands/qa-scan-review.js +826 -5
  61. package/packages/client/dist/commands/qa-synthetic-backend-capture.js +266 -1
  62. package/packages/client/dist/commands/qa-synthetic-backend-review.js +297 -1
  63. package/packages/client/dist/commands/qa-synthetic-backend.js +340 -2
  64. package/packages/client/dist/commands/qa-synthetic-broker-port.js +85 -1
  65. package/packages/client/dist/commands/qa-synthetic-browser.js +39 -1
  66. package/packages/client/dist/commands/refactor-characterization.js +671 -21
  67. package/packages/client/dist/commands/refactor-commit.js +399 -13
  68. package/packages/client/dist/commands/refactor-control.js +142 -3
  69. package/packages/client/dist/commands/refactor-cpp-assertions.js +93 -3
  70. package/packages/client/dist/commands/refactor-review.js +283 -5
  71. package/packages/client/dist/commands/refactor-root.js +588 -7
  72. package/packages/client/dist/commands/refresh-memory.js +156 -3
  73. package/packages/client/dist/commands/shared-architecture-non-ui.js +24 -1
  74. package/packages/client/dist/commands/story-checkpoint.js +171 -1
  75. package/packages/client/dist/config/profile-directory.js +13 -1
  76. package/packages/client/dist/config/resolver-selection.js +278 -1
  77. package/packages/client/dist/config/secure-config.js +281 -12
  78. package/packages/client/dist/config.js +223 -2
  79. package/packages/client/dist/constants.js +25 -1
  80. package/packages/client/dist/context/context-collector.js +222 -2
  81. package/packages/client/dist/context/context-sanitizer.js +145 -1
  82. package/packages/client/dist/continuity/autonomous-governance.js +285 -1
  83. package/packages/client/dist/continuity/continuity-client-state-store.js +1587 -1
  84. package/packages/client/dist/continuity/invoke-hooks.js +129 -1
  85. package/packages/client/dist/continuity/migrations/001-initial-schema.js +12 -2
  86. package/packages/client/dist/continuity/migrations/002-processing-output-summary-indexes.js +12 -2
  87. package/packages/client/dist/continuity/migrations/003-headless-execution-attempts.js +12 -2
  88. package/packages/client/dist/continuity/migrations/004-outbox-delivery-state.js +12 -2
  89. package/packages/client/dist/continuity/migrations/005-bounded-headless-queue.js +12 -2
  90. package/packages/client/dist/continuity/migrations/006-native-agent-dispatches.js +10 -2
  91. package/packages/client/dist/continuity/native-agent-store.js +69 -1
  92. package/packages/client/dist/continuity/native-agent-types.js +90 -1
  93. package/packages/client/dist/continuity/outbox.js +117 -1
  94. package/packages/client/dist/continuity/runner-bootstrap-policy.js +172 -1
  95. package/packages/client/dist/continuity/sqlite-store.d.ts +22 -1
  96. package/packages/client/dist/continuity/sqlite-store.js +2612 -81
  97. package/packages/client/dist/effects/invoke-effect-gateways.js +62 -1
  98. package/packages/client/dist/errors/error-messages.js +228 -2
  99. package/packages/client/dist/errors/frontmatter-diagnostics.js +125 -1
  100. package/packages/client/dist/evidence/collector.js +347 -1
  101. package/packages/client/dist/evidence/index.js +1 -1
  102. package/packages/client/dist/evidence/types.js +2 -0
  103. package/packages/client/dist/fs/atomic-state-replace.js +152 -1
  104. package/packages/client/dist/generated/command-registry.generated.js +4076 -1
  105. package/packages/client/dist/generated/public-projections.generated.js +149 -1
  106. package/packages/client/dist/git/direct-yolo-c01-retry.js +138 -4
  107. package/packages/client/dist/git/direct-yolo-checkpoint.js +1234 -4
  108. package/packages/client/dist/git/epic-operational-state.d.ts +198 -0
  109. package/packages/client/dist/git/epic-operational-state.js +672 -0
  110. package/packages/client/dist/git/git-lifecycle-step-ids.js +14 -1
  111. package/packages/client/dist/git/git-lifecycle-store.d.ts +9 -1
  112. package/packages/client/dist/git/git-lifecycle-store.js +1981 -9
  113. package/packages/client/dist/git/legacy-story-branch-checkpoint.js +259 -9
  114. package/packages/client/dist/git/legacy-story-branch-setup.js +348 -4
  115. package/packages/client/dist/git/legacy-story-pr.js +3538 -70
  116. package/packages/client/dist/git/secure-filesystem-boundary.js +182 -5
  117. package/packages/client/dist/graph-retrieval/pre-command-hook.js +284 -1
  118. package/packages/client/dist/graph-retrieval/shared-graph-retrieval-contract.js +237 -1
  119. package/packages/client/dist/i18n/first-run.js +60 -2
  120. package/packages/client/dist/index.js +47 -1
  121. package/packages/client/dist/invocation/invoke-input.js +24 -1
  122. package/packages/client/dist/license/index.js +5 -1
  123. package/packages/client/dist/license/license-client.js +304 -1
  124. package/packages/client/dist/machine/fingerprint.js +163 -2
  125. package/packages/client/dist/machine/index.js +5 -1
  126. package/packages/client/dist/memory/project-memory-path-scope.js +62 -1
  127. package/packages/client/dist/memory/project-memory-writer.js +1007 -40
  128. package/packages/client/dist/memory/shared-project-memory-types.js +253 -2
  129. package/packages/client/dist/migrations/epic-lifecycle-backfill.d.ts +97 -0
  130. package/packages/client/dist/migrations/epic-lifecycle-backfill.js +1060 -0
  131. package/packages/client/dist/migrations/project-identity-capability.js +50 -1
  132. package/packages/client/dist/migrations/project-identity.js +493 -7
  133. package/packages/client/dist/migrations/state-json.d.ts +22 -0
  134. package/packages/client/dist/migrations/state-json.js +393 -4
  135. package/packages/client/dist/policy/architecture-policy.js +184 -2
  136. package/packages/client/dist/policy/index.js +7 -1
  137. package/packages/client/dist/policy/shared-policy-types.js +38 -0
  138. package/packages/client/dist/policy/subagent-approval-policy.js +55 -1
  139. package/packages/client/dist/private-execution/clean-baseline.js +279 -2
  140. package/packages/client/dist/private-execution/codex-executor.js +574 -4
  141. package/packages/client/dist/private-execution/codex-host-runtime.js +137 -1
  142. package/packages/client/dist/private-execution/codex-lifecycle-guard.js +97 -1
  143. package/packages/client/dist/private-execution/codex-scoped-permissions.js +128 -1
  144. package/packages/client/dist/private-execution/delivery.js +410 -13
  145. package/packages/client/dist/private-execution/diagnosis-root-review.js +294 -2
  146. package/packages/client/dist/private-execution/frozen-handoff.js +19 -6
  147. package/packages/client/dist/private-execution/implementation-validation.js +106 -2
  148. package/packages/client/dist/private-execution/isolated-admission.js +1432 -23
  149. package/packages/client/dist/private-execution/isolated-session.js +725 -5
  150. package/packages/client/dist/private-execution/isolated-workspace.js +122 -1
  151. package/packages/client/dist/private-execution/pact-consumer-runtime.js +409 -3
  152. package/packages/client/dist/private-execution/pact-test-source.js +258 -1
  153. package/packages/client/dist/private-execution/pact-toolchain.js +290 -3
  154. package/packages/client/dist/private-execution/pact-write-set.js +172 -1
  155. package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.js +406 -5
  156. package/packages/client/dist/private-execution/planning-generation-checkpoint.js +462 -5
  157. package/packages/client/dist/private-execution/planning-memory-checkpoint.js +139 -3
  158. package/packages/client/dist/private-execution/planning-research-checkpoint.js +325 -4
  159. package/packages/client/dist/private-execution/private-report-store.js +42 -1
  160. package/packages/client/dist/private-execution/property-test-candidate.js +103 -1
  161. package/packages/client/dist/private-execution/property-test-choices.js +147 -3
  162. package/packages/client/dist/private-execution/property-test-plan.js +271 -7
  163. package/packages/client/dist/private-execution/property-test-review.js +258 -4
  164. package/packages/client/dist/private-execution/property-test-runtime.js +372 -9
  165. package/packages/client/dist/private-execution/property-test-source.js +139 -1
  166. package/packages/client/dist/private-execution/root-checkpoint.js +80 -1
  167. package/packages/client/dist/private-execution/root-memory-git-evidence.js +135 -3
  168. package/packages/client/dist/private-execution/root-memory-recovery.js +93 -1
  169. package/packages/client/dist/private-execution/root-memory-request.js +29 -1
  170. package/packages/client/dist/private-execution/root-memory-scope.js +178 -1
  171. package/packages/client/dist/private-execution/root-memory-writer.js +102 -1
  172. package/packages/client/dist/private-execution/session-lease.js +63 -1
  173. package/packages/client/dist/private-execution/shared-private-admission-types.js +50 -1
  174. package/packages/client/dist/private-execution/shared-project-validation.js +66 -1
  175. package/packages/client/dist/private-execution/shared-root-memory-types.js +61 -1
  176. package/packages/client/dist/private-execution/ux-source-validation.js +372 -1
  177. package/packages/client/dist/private-execution/ux-write-set.js +191 -2
  178. package/packages/client/dist/registry/registry-reconciliation.js +234 -1
  179. package/packages/client/dist/resilience/circuit-breaker.js +170 -1
  180. package/packages/client/dist/resilience/degradation-manager.js +164 -1
  181. package/packages/client/dist/resilience/freshness-indicator.js +100 -1
  182. package/packages/client/dist/resilience/index.js +8 -1
  183. package/packages/client/dist/resilience/recovery-detector.js +74 -1
  184. package/packages/client/dist/resolvers/asset-resolver.js +13 -0
  185. package/packages/client/dist/resolvers/local-resolver.js +255 -8
  186. package/packages/client/dist/resolvers/remote-resolver.js +233 -1
  187. package/packages/client/dist/runner/binary.js +404 -1
  188. package/packages/client/dist/runner/cli.js +1571 -17
  189. package/packages/client/dist/runner/headless/adapters.js +49 -1
  190. package/packages/client/dist/runner/headless/claude-code-adapter.js +79 -1
  191. package/packages/client/dist/runner/headless/continuous-story-workspace.js +1628 -11
  192. package/packages/client/dist/runner/headless/epic-git-reconciliation-inventory.js +69 -1
  193. package/packages/client/dist/runner/headless/epic-merge-candidate-qa.js +110 -2
  194. package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +1236 -8
  195. package/packages/client/dist/runner/headless/epic-terminal-git-runner.js +318 -2
  196. package/packages/client/dist/runner/headless/fake-adapter.js +62 -1
  197. package/packages/client/dist/runner/headless/managed-profile.js +132 -1
  198. package/packages/client/dist/runner/headless/opencode-adapter.js +145 -2
  199. package/packages/client/dist/runner/headless/prepared-story-bundle.js +43 -1
  200. package/packages/client/dist/runner/headless/resolver.js +231 -1
  201. package/packages/client/dist/runner/headless/run-yolo.js +885 -1
  202. package/packages/client/dist/runner/headless/run-yoloop.js +2574 -2
  203. package/packages/client/dist/runner/headless/types.js +574 -2
  204. package/packages/client/dist/runner/local-console.js +396 -13
  205. package/packages/client/dist/runner/portal-sync-worker.js +1487 -1
  206. package/packages/client/dist/runner/project-identity.js +106 -1
  207. package/packages/client/dist/runner/scheduler.js +995 -7
  208. package/packages/client/dist/runner-cli.js +18 -2
  209. package/packages/client/dist/state/invocation-shape.js +13 -1
  210. package/packages/client/dist/state/project-state-snapshot.d.ts +8 -0
  211. package/packages/client/dist/state/project-state-snapshot.js +1731 -1
  212. package/packages/client/dist/state/state-json-repair.js +785 -3
  213. package/packages/client/dist/state/structural-dag-projection.js +118 -1
  214. package/packages/client/dist/telemetry/index.js +5 -1
  215. package/packages/client/dist/telemetry/offline-queue.js +131 -1
  216. package/packages/client/dist/tier/index.js +5 -1
  217. package/packages/client/dist/tier/tier-aware-client.js +405 -1
  218. package/packages/client/dist/types/index.js +38 -1
  219. package/packages/client/dist/version.js +27 -1
  220. package/packages/client/dist/yolo/change-evidence-collector.js +126 -1
  221. package/packages/client/dist/yolo/invoke-envelope-capability.js +62 -1
  222. package/packages/client/dist/yolo/spec-envelope-collector.js +184 -5
  223. package/packages/client/dist/yoloop/discovery-hook.js +300 -2
  224. package/packages/client/dist/yoloop/index.js +8 -1
  225. package/packages/client/dist/yoloop/invoke-hooks.js +669 -12
  226. package/packages/client/dist/yoloop/shared-discover-epics.js +1007 -1
  227. package/packages/client/dist/yoloop/shared-yoloop-types.d.ts +65 -1
  228. package/packages/client/dist/yoloop/shared-yoloop-types.js +33 -1
  229. package/packages/client/dist/yoloop/target-normalization.js +180 -1
  230. package/packages/client/dist/yoloop/yoloop-client-state-store.d.ts +8 -0
  231. package/packages/client/dist/yoloop/yoloop-client-state-store.js +1920 -1
  232. package/packages/shared/dist/yolo/spec-envelope.js +3 -6
  233. package/targets-stubs/antigravity/gemini.md +1 -1
  234. package/targets-stubs/antigravity/skill/SKILL.md +1 -1
  235. package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
  236. package/targets-stubs/claude-code/neocortex-root.md +2 -2
  237. package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
  238. package/targets-stubs/claude-code/neocortex.md +2 -2
  239. package/targets-stubs/codex/AGENTS.md +1 -1
  240. package/targets-stubs/cursor/agent.md +2 -2
  241. package/targets-stubs/gemini-cli/agent.md +2 -2
  242. package/targets-stubs/opencode/neocortex-root.md +1 -1
  243. package/targets-stubs/vscode/neocortex.agent.md +2 -2
@@ -1 +1,149 @@
1
- const e={schemaVersion:"PublicProjectionBundle/1.0",generationId:"sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9",sourceHash:"12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9",catalogHash:"78c0271523e9a7dab978370cf6fc9c4abb3692b7fd21b9e8118bff1886b8fa19",publicProjectionHash:"e5022ae52f9241a51faab0e1d6f64c953e402fecaabac2d384298376dc14002d",stageProjectionHash:"f9875354257eb62be4509cd5cbf0b8e5e214a7414e82b8a8e45bc2baea6f0477",compilationHash:"82aeb4d0dceff6954222b15e35f9baf1d0eab7b14b6a994daaa7e7d793d65626",registry:{version:"1.0.0",checksum:"184a2d616e0734fd3173d60889d74bae031280513831ec1f0a3a8c36959d2994"},artifacts:[{kind:"catalog",schemaVersion:"ExecutableGraphCatalogPublicProjection/1.0",relativePath:"catalog.json",sha256:"47bfe074c0e3094296bae58393c801a745b102d548099596ccb3d8e419a3e738",entryCount:97,generationId:"sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9"},{kind:"commands",schemaVersion:"CommandRegistryPublicProjection/1.0",relativePath:"commands.json",sha256:"907c009c7b10ad01eadb7a7f603af8759f348fe444af98a24c4558117bd09146",entryCount:62,generationId:"sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9"},{kind:"progress-view",schemaVersion:"ProgressViewContractProjection/1.0",relativePath:"progress-view.json",sha256:"96f6ca2d3948891efe31fceb031001428190d31cbbbf1bf53446fcaf3be31fbb",entryCount:1,generationId:"sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9"},{kind:"stages",schemaVersion:"ExecutableGraphStageProjection/1.0",relativePath:"stages.json",sha256:"5444c07f918f6b6760d8ba1161a66a7635841dac0da3a52ddb95c600e33e9700",entryCount:85,generationId:"sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9"},{kind:"surfaces",schemaVersion:"PublicProjectionSurfaces/1.0",relativePath:"surfaces.json",sha256:"38b6f572e04f77d0fd8f22bdd43ffd67d7c763e28301160342cd228321f631e6",entryCount:6,generationId:"sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9"}],compatibility:{status:"compatible",routeCount:97,rootCommandCount:62,operationCount:35,aliasCount:199},contractVersions:{catalog:"ExecutableGraphCatalogPublicProjection/1.0",stages:"ExecutableGraphStageProjection/1.0",progress:"ProgressSnapshot/1.0",progressView:"ProgressView/1.0",readiness:"ExecutableGraphReadinessVector/1.0",validation:"ValidationMatrix/1.1"},surfaces:[{kind:"admin",artifactKinds:["catalog","stages","commands","surfaces","progress-view"],progressView:"ProgressView/1.0",authority:"read-only-projection"},{kind:"client",artifactKinds:["catalog","stages","commands","surfaces","progress-view"],progressView:"ProgressView/1.0",authority:"read-only-projection"},{kind:"docs",artifactKinds:["catalog","stages","commands","surfaces","progress-view"],progressView:"ProgressView/1.0",authority:"read-only-projection"},{kind:"metrics",artifactKinds:["catalog","stages","commands","surfaces","progress-view"],progressView:"ProgressView/1.0",authority:"read-only-projection"},{kind:"runtime-preview",artifactKinds:["catalog","stages","commands","surfaces","progress-view"],progressView:"ProgressView/1.0",authority:"read-only-projection"},{kind:"tests",artifactKinds:["catalog","stages","commands","surfaces","progress-view"],progressView:"ProgressView/1.0",authority:"read-only-projection"}],publicSafe:!0,bundleHash:"9a6fd0a7a924a3a1f0406dc607e1c2a1c8a05f5efd55af24de6cb0f3bac25ab5"},a=e.generationId,c=e.bundleHash;export{e as PUBLIC_PROJECTION_BUNDLE,c as PUBLIC_PROJECTION_BUNDLE_HASH,a as PUBLIC_PROJECTION_GENERATION_ID};
1
+ /** Generated by scripts/generate-public-catalog-projections.mjs. Do not edit. */
2
+ export const PUBLIC_PROJECTION_BUNDLE = {
3
+ "schemaVersion": "PublicProjectionBundle/1.0",
4
+ "generationId": "sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9",
5
+ "sourceHash": "12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9",
6
+ "catalogHash": "78c0271523e9a7dab978370cf6fc9c4abb3692b7fd21b9e8118bff1886b8fa19",
7
+ "publicProjectionHash": "e5022ae52f9241a51faab0e1d6f64c953e402fecaabac2d384298376dc14002d",
8
+ "stageProjectionHash": "f9875354257eb62be4509cd5cbf0b8e5e214a7414e82b8a8e45bc2baea6f0477",
9
+ "compilationHash": "82aeb4d0dceff6954222b15e35f9baf1d0eab7b14b6a994daaa7e7d793d65626",
10
+ "registry": {
11
+ "version": "1.0.0",
12
+ "checksum": "184a2d616e0734fd3173d60889d74bae031280513831ec1f0a3a8c36959d2994"
13
+ },
14
+ "artifacts": [
15
+ {
16
+ "kind": "catalog",
17
+ "schemaVersion": "ExecutableGraphCatalogPublicProjection/1.0",
18
+ "relativePath": "catalog.json",
19
+ "sha256": "47bfe074c0e3094296bae58393c801a745b102d548099596ccb3d8e419a3e738",
20
+ "entryCount": 97,
21
+ "generationId": "sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9"
22
+ },
23
+ {
24
+ "kind": "commands",
25
+ "schemaVersion": "CommandRegistryPublicProjection/1.0",
26
+ "relativePath": "commands.json",
27
+ "sha256": "907c009c7b10ad01eadb7a7f603af8759f348fe444af98a24c4558117bd09146",
28
+ "entryCount": 62,
29
+ "generationId": "sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9"
30
+ },
31
+ {
32
+ "kind": "progress-view",
33
+ "schemaVersion": "ProgressViewContractProjection/1.0",
34
+ "relativePath": "progress-view.json",
35
+ "sha256": "96f6ca2d3948891efe31fceb031001428190d31cbbbf1bf53446fcaf3be31fbb",
36
+ "entryCount": 1,
37
+ "generationId": "sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9"
38
+ },
39
+ {
40
+ "kind": "stages",
41
+ "schemaVersion": "ExecutableGraphStageProjection/1.0",
42
+ "relativePath": "stages.json",
43
+ "sha256": "5444c07f918f6b6760d8ba1161a66a7635841dac0da3a52ddb95c600e33e9700",
44
+ "entryCount": 85,
45
+ "generationId": "sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9"
46
+ },
47
+ {
48
+ "kind": "surfaces",
49
+ "schemaVersion": "PublicProjectionSurfaces/1.0",
50
+ "relativePath": "surfaces.json",
51
+ "sha256": "38b6f572e04f77d0fd8f22bdd43ffd67d7c763e28301160342cd228321f631e6",
52
+ "entryCount": 6,
53
+ "generationId": "sha256:12838b51552e283fadffcea062246c8a0ca3b89353ccc01ce42b91361de6e0e9"
54
+ }
55
+ ],
56
+ "compatibility": {
57
+ "status": "compatible",
58
+ "routeCount": 97,
59
+ "rootCommandCount": 62,
60
+ "operationCount": 35,
61
+ "aliasCount": 199
62
+ },
63
+ "contractVersions": {
64
+ "catalog": "ExecutableGraphCatalogPublicProjection/1.0",
65
+ "stages": "ExecutableGraphStageProjection/1.0",
66
+ "progress": "ProgressSnapshot/1.0",
67
+ "progressView": "ProgressView/1.0",
68
+ "readiness": "ExecutableGraphReadinessVector/1.0",
69
+ "validation": "ValidationMatrix/1.1"
70
+ },
71
+ "surfaces": [
72
+ {
73
+ "kind": "admin",
74
+ "artifactKinds": [
75
+ "catalog",
76
+ "stages",
77
+ "commands",
78
+ "surfaces",
79
+ "progress-view"
80
+ ],
81
+ "progressView": "ProgressView/1.0",
82
+ "authority": "read-only-projection"
83
+ },
84
+ {
85
+ "kind": "client",
86
+ "artifactKinds": [
87
+ "catalog",
88
+ "stages",
89
+ "commands",
90
+ "surfaces",
91
+ "progress-view"
92
+ ],
93
+ "progressView": "ProgressView/1.0",
94
+ "authority": "read-only-projection"
95
+ },
96
+ {
97
+ "kind": "docs",
98
+ "artifactKinds": [
99
+ "catalog",
100
+ "stages",
101
+ "commands",
102
+ "surfaces",
103
+ "progress-view"
104
+ ],
105
+ "progressView": "ProgressView/1.0",
106
+ "authority": "read-only-projection"
107
+ },
108
+ {
109
+ "kind": "metrics",
110
+ "artifactKinds": [
111
+ "catalog",
112
+ "stages",
113
+ "commands",
114
+ "surfaces",
115
+ "progress-view"
116
+ ],
117
+ "progressView": "ProgressView/1.0",
118
+ "authority": "read-only-projection"
119
+ },
120
+ {
121
+ "kind": "runtime-preview",
122
+ "artifactKinds": [
123
+ "catalog",
124
+ "stages",
125
+ "commands",
126
+ "surfaces",
127
+ "progress-view"
128
+ ],
129
+ "progressView": "ProgressView/1.0",
130
+ "authority": "read-only-projection"
131
+ },
132
+ {
133
+ "kind": "tests",
134
+ "artifactKinds": [
135
+ "catalog",
136
+ "stages",
137
+ "commands",
138
+ "surfaces",
139
+ "progress-view"
140
+ ],
141
+ "progressView": "ProgressView/1.0",
142
+ "authority": "read-only-projection"
143
+ }
144
+ ],
145
+ "publicSafe": true,
146
+ "bundleHash": "9a6fd0a7a924a3a1f0406dc607e1c2a1c8a05f5efd55af24de6cb0f3bac25ab5"
147
+ };
148
+ export const PUBLIC_PROJECTION_GENERATION_ID = PUBLIC_PROJECTION_BUNDLE.generationId;
149
+ export const PUBLIC_PROJECTION_BUNDLE_HASH = PUBLIC_PROJECTION_BUNDLE.bundleHash;
@@ -1,4 +1,138 @@
1
- import{execFileSync as H}from"node:child_process";import{createHash as P,randomBytes as R}from"node:crypto";import{existsSync as k,readFileSync as E,writeFileSync as D}from"node:fs";import{join as u,resolve as O}from"node:path";import{acquireGitLifecyclePhysicalIntegrationLock as C,assertGitLifecyclePrivateFile as j,ensureGitLifecyclePrivateChildDirectory as L,gitLifecycleRuntimeDirectory as G,readGitLifecycleRuntime as N,releaseGitLifecyclePhysicalIntegrationLock as T}from"./git-lifecycle-store.js";const _=["809db253d486b5d2620d318666219e8a2b4df05016174ba3c8a33fa17b65802a","50224b193dae7ba2a066e54f7091d2656302b849ea7a145a3a4c556d85f3fe3c","f757f6bf1182f23e5d7acbe47cbce9f0fa12f211d290b486892c6722bc42b4e8","9cd927d02ff5979b5077e75b09cb34be275eca0e1c955403235b9ba0fb7a55eb","a3f880e8d5bca9158a88c46f88754c0948237a3e8516c83a762ba1ee22c27d46"];function i(n,r){const o={...process.env};for(const e of["GIT_DIR","GIT_WORK_TREE","GIT_INDEX_FILE","GIT_COMMON_DIR","GIT_NAMESPACE"])delete o[e];return H("git",[...r],{cwd:n,env:o,encoding:"utf8",stdio:["ignore","pipe","pipe"],timeout:3e4,maxBuffer:16*1024*1024}).trim()}function y(n){return P("sha256").update(n).digest("hex")}function c(n){return n&&typeof n=="object"&&!Array.isArray(n)?n:void 0}async function $(n,r){const o=O(n);if(!/^[A-Za-z][A-Za-z0-9_-]*\.[A-Za-z0-9._-]+$/.test(r))throw new Error("direct-yolo-retry-story-invalid");const e=r.split(".")[0],f=i(o,["rev-parse","HEAD"]),s=i(o,["symbolic-ref","--quiet","--short","HEAD"]);if(i(o,["status","--porcelain=v1","--untracked-files=all"]))throw new Error("direct-yolo-retry-checkout-dirty");const t=E(u(o,".neocortex/state.json"),"utf8"),m=c(JSON.parse(t)),a=c(c(m?.stories)?.[r]),d=c(c(m?.epics)?.[e]);if(!a||!d||a.epic_id!==e||d.branch_mode!=="epic"||d.execution_branch!==s||s!==`epic/${e}`)throw new Error("direct-yolo-retry-story-binding-invalid");const p=a.steps_completed;if(a.status!=="create-tasks"||typeof a.last_step!="string"||y(a.last_step)!==_.at(-1)||a.branch_name!==s||!Array.isArray(p)||p.length!==_.length||p.some((S,v)=>typeof S!="string"||y(S)!==_[v])||a.checkpoint||a.pr_number)throw new Error("direct-yolo-retry-progress-ineligible");const h=await N(o,{required:!0}),w=c(h.epics[e]),b=c(w?.branch_lease),l=c(w?.origin_binding);if(c(h.stories[r])&&Object.keys(c(h.stories[r])).length>0||!l||l.executionBranch!==s||typeof l.originHeadSha!="string"||!/^[a-f0-9]{40,64}$/.test(l.originHeadSha)||b&&(!Number.isFinite(Date.parse(String(b.expiresAt)))||Date.parse(String(b.expiresAt))>Date.now()))throw new Error("direct-yolo-retry-runtime-active");i(o,["merge-base","--is-ancestor",String(l.originHeadSha),f]);const g=await L(await G(o),"private-execution"),A=y(r);for(const S of[`session-${A}.json`,`baseline-${A}.json`]){const v=u(g,S);if(k(v))throw await j(v,g),new Error("direct-yolo-retry-private-evidence-present")}const x=`.neocortex/recovery/${r}-c01-${y(`${f}\0${y(t)}`).slice(0,16)}.json`;if(k(u(o,x)))throw new Error("direct-yolo-retry-already-recorded");if(i(o,["rev-parse","HEAD"])!==f||E(u(o,".neocortex/state.json"),"utf8")!==t)throw new Error("direct-yolo-retry-preflight-raced");return Object.freeze({schemaVersion:1,kind:"direct-yolo-c01-retry-plan",storyId:r,epicId:e,executionBranch:s,previousHeadSha:f,previousStateSha256:y(t),runtimeRevision:h.revision,previousStatus:"create-tasks",previousStepsCompleted:[...p],auditPath:x,publicSafe:!0})}async function q(n,r,o){const e=O(n),f=`retry-${R(16).toString("hex")}`,s=await C(e,{kind:"direct",storyId:r,sessionId:f,idempotencyKey:f,expiresAt:new Date(Date.now()+5*6e4).toISOString(),persistent:!1});if(!s.ok)throw new Error(s.reasonCode);try{const t=await $(e,r);if(t.previousHeadSha!==o)throw new Error("direct-yolo-retry-head-mismatch");const m=u(e,".neocortex/state.json"),a=JSON.parse(E(m,"utf8")),d=a.stories[r];d.status="backlog",d.steps_completed=[],d.last_step=null,d.branch_name=null;const p={...t,recordedAt:new Date().toISOString(),reason:"private-session-lost",newAttemptStatus:"backlog",oldProgressAcceptedForNewAttempt:!1};d.last_updated=p.recordedAt;const h=await $(e,r);if(JSON.stringify(h)!==JSON.stringify(t))throw new Error("direct-yolo-retry-apply-raced");if(i(e,["rev-parse","HEAD"])!==o||y(E(m,"utf8"))!==t.previousStateSha256||i(e,["status","--porcelain=v1","--untracked-files=all"]))throw new Error("direct-yolo-retry-apply-raced");const{mkdirSync:w}=await import("node:fs");if(w(u(e,".neocortex/recovery"),{recursive:!0}),D(u(e,t.auditPath),`${JSON.stringify(p,null,2)}
2
- `,{flag:"wx"}),D(m,`${JSON.stringify(a,null,2)}
3
- `),(await N(e,{required:!0})).revision!==t.runtimeRevision)throw new Error("direct-yolo-retry-runtime-raced");i(e,["add","--",".neocortex/state.json",t.auditPath]),i(e,["commit","-m",`chore(${r}): begin audited C01 retry`,"-m",`Neocortex-C01-Retry-From: ${t.previousHeadSha}`,"-m",`Neocortex-C01-Retry-Audit: ${t.auditPath}`]);const l=i(e,["rev-parse","HEAD"]),g=i(e,["diff-tree","--no-commit-id","--name-only","-r",l]).split(`
4
- `).filter(Boolean).sort();if(i(e,["rev-parse",`${l}^`])!==t.previousHeadSha||JSON.stringify(g)!==JSON.stringify([".neocortex/state.json",t.auditPath].sort())||i(e,["status","--porcelain=v1","--untracked-files=all"]))throw new Error("direct-yolo-retry-postcommit-unverified");return{plan:t,newHeadSha:l}}finally{await T(s.path,s.owner).catch(()=>{})}}export{q as applyDirectYoloC01Retry,$ as inspectDirectYoloC01Retry};
1
+ /** Audited restart of a pre-implementation epic story after its private C01 session was lost. */
2
+ import { execFileSync } from 'node:child_process';
3
+ import { createHash, randomBytes } from 'node:crypto';
4
+ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
5
+ import { join, resolve } from 'node:path';
6
+ import { acquireGitLifecyclePhysicalIntegrationLock, assertGitLifecyclePrivateFile, ensureGitLifecyclePrivateChildDirectory, gitLifecycleRuntimeDirectory, readGitLifecycleRuntime, releaseGitLifecyclePhysicalIntegrationLock, } from './git-lifecycle-store.js';
7
+ // Server-owned step identifiers stay outside the published client bundle.
8
+ const COMPLETED_BEFORE_IMPLEMENTATION_SHA256 = [
9
+ '809db253d486b5d2620d318666219e8a2b4df05016174ba3c8a33fa17b65802a',
10
+ '50224b193dae7ba2a066e54f7091d2656302b849ea7a145a3a4c556d85f3fe3c',
11
+ 'f757f6bf1182f23e5d7acbe47cbce9f0fa12f211d290b486892c6722bc42b4e8',
12
+ '9cd927d02ff5979b5077e75b09cb34be275eca0e1c955403235b9ba0fb7a55eb',
13
+ 'a3f880e8d5bca9158a88c46f88754c0948237a3e8516c83a762ba1ee22c27d46',
14
+ ];
15
+ function git(root, args) {
16
+ const env = { ...process.env };
17
+ for (const key of ['GIT_DIR', 'GIT_WORK_TREE', 'GIT_INDEX_FILE', 'GIT_COMMON_DIR', 'GIT_NAMESPACE'])
18
+ delete env[key];
19
+ return execFileSync('git', [...args], { cwd: root, env, encoding: 'utf8',
20
+ stdio: ['ignore', 'pipe', 'pipe'], timeout: 30_000, maxBuffer: 16 * 1024 * 1024 }).trim();
21
+ }
22
+ function digest(value) { return createHash('sha256').update(value).digest('hex'); }
23
+ function record(value) {
24
+ return value && typeof value === 'object' && !Array.isArray(value) ? value : undefined;
25
+ }
26
+ /** No mutation: require missing private session, expired lease, clean Git, and exact C01-C05 progress. */
27
+ export async function inspectDirectYoloC01Retry(projectRoot, storyId) {
28
+ const root = resolve(projectRoot);
29
+ if (!/^[A-Za-z][A-Za-z0-9_-]*\.[A-Za-z0-9._-]+$/.test(storyId))
30
+ throw new Error('direct-yolo-retry-story-invalid');
31
+ const epicId = storyId.split('.')[0];
32
+ const head = git(root, ['rev-parse', 'HEAD']);
33
+ const branch = git(root, ['symbolic-ref', '--quiet', '--short', 'HEAD']);
34
+ if (git(root, ['status', '--porcelain=v1', '--untracked-files=all']))
35
+ throw new Error('direct-yolo-retry-checkout-dirty');
36
+ const stateText = readFileSync(join(root, '.neocortex/state.json'), 'utf8');
37
+ const state = record(JSON.parse(stateText));
38
+ const story = record(record(state?.stories)?.[storyId]);
39
+ const epic = record(record(state?.epics)?.[epicId]);
40
+ if (!story || !epic || story.epic_id !== epicId || epic.branch_mode !== 'epic'
41
+ || epic.execution_branch !== branch || branch !== `epic/${epicId}`)
42
+ throw new Error('direct-yolo-retry-story-binding-invalid');
43
+ const steps = story.steps_completed;
44
+ if (story.status !== 'create-tasks' || typeof story.last_step !== 'string'
45
+ || digest(story.last_step) !== COMPLETED_BEFORE_IMPLEMENTATION_SHA256.at(-1)
46
+ || story.branch_name !== branch || !Array.isArray(steps)
47
+ || steps.length !== COMPLETED_BEFORE_IMPLEMENTATION_SHA256.length
48
+ || steps.some((step, index) => typeof step !== 'string'
49
+ || digest(step) !== COMPLETED_BEFORE_IMPLEMENTATION_SHA256[index])
50
+ || story.checkpoint || story.pr_number)
51
+ throw new Error('direct-yolo-retry-progress-ineligible');
52
+ const runtime = await readGitLifecycleRuntime(root, { required: true });
53
+ const runtimeEpic = record(runtime.epics[epicId]);
54
+ const lease = record(runtimeEpic?.branch_lease);
55
+ const origin = record(runtimeEpic?.origin_binding);
56
+ if (record(runtime.stories[storyId]) && Object.keys(record(runtime.stories[storyId])).length > 0
57
+ || !origin || origin.executionBranch !== branch || typeof origin.originHeadSha !== 'string'
58
+ || !/^[a-f0-9]{40,64}$/.test(origin.originHeadSha)
59
+ || lease && (!Number.isFinite(Date.parse(String(lease.expiresAt)))
60
+ || Date.parse(String(lease.expiresAt)) > Date.now()))
61
+ throw new Error('direct-yolo-retry-runtime-active');
62
+ git(root, ['merge-base', '--is-ancestor', String(origin.originHeadSha), head]);
63
+ const privateRoot = await ensureGitLifecyclePrivateChildDirectory(await gitLifecycleRuntimeDirectory(root), 'private-execution');
64
+ const storyHash = digest(storyId);
65
+ for (const name of [`session-${storyHash}.json`, `baseline-${storyHash}.json`]) {
66
+ const path = join(privateRoot, name);
67
+ if (existsSync(path)) {
68
+ await assertGitLifecyclePrivateFile(path, privateRoot);
69
+ throw new Error('direct-yolo-retry-private-evidence-present');
70
+ }
71
+ }
72
+ const auditPath = `.neocortex/recovery/${storyId}-c01-${digest(`${head}\0${digest(stateText)}`).slice(0, 16)}.json`;
73
+ if (existsSync(join(root, auditPath)))
74
+ throw new Error('direct-yolo-retry-already-recorded');
75
+ if (git(root, ['rev-parse', 'HEAD']) !== head || readFileSync(join(root, '.neocortex/state.json'), 'utf8') !== stateText) {
76
+ throw new Error('direct-yolo-retry-preflight-raced');
77
+ }
78
+ return Object.freeze({ schemaVersion: 1, kind: 'direct-yolo-c01-retry-plan', storyId, epicId,
79
+ executionBranch: branch, previousHeadSha: head, previousStateSha256: digest(stateText),
80
+ runtimeRevision: runtime.revision,
81
+ previousStatus: 'create-tasks', previousStepsCompleted: [...steps],
82
+ auditPath, publicSafe: true });
83
+ }
84
+ /** Commit a new C01 attempt; the prior progress stays reachable in the parent commit. */
85
+ export async function applyDirectYoloC01Retry(projectRoot, storyId, expectedHeadSha) {
86
+ const root = resolve(projectRoot);
87
+ const lockId = `retry-${randomBytes(16).toString('hex')}`;
88
+ const lock = await acquireGitLifecyclePhysicalIntegrationLock(root, {
89
+ kind: 'direct', storyId, sessionId: lockId, idempotencyKey: lockId,
90
+ expiresAt: new Date(Date.now() + 5 * 60_000).toISOString(), persistent: false,
91
+ });
92
+ if (!lock.ok)
93
+ throw new Error(lock.reasonCode);
94
+ try {
95
+ const plan = await inspectDirectYoloC01Retry(root, storyId);
96
+ if (plan.previousHeadSha !== expectedHeadSha)
97
+ throw new Error('direct-yolo-retry-head-mismatch');
98
+ const statePath = join(root, '.neocortex/state.json');
99
+ const state = JSON.parse(readFileSync(statePath, 'utf8'));
100
+ const story = state.stories[storyId];
101
+ story.status = 'backlog';
102
+ story.steps_completed = [];
103
+ story.last_step = null;
104
+ story.branch_name = null;
105
+ const audit = { ...plan, recordedAt: new Date().toISOString(), reason: 'private-session-lost',
106
+ newAttemptStatus: 'backlog', oldProgressAcceptedForNewAttempt: false };
107
+ story.last_updated = audit.recordedAt;
108
+ const reconfirmed = await inspectDirectYoloC01Retry(root, storyId);
109
+ if (JSON.stringify(reconfirmed) !== JSON.stringify(plan))
110
+ throw new Error('direct-yolo-retry-apply-raced');
111
+ if (git(root, ['rev-parse', 'HEAD']) !== expectedHeadSha
112
+ || digest(readFileSync(statePath, 'utf8')) !== plan.previousStateSha256
113
+ || git(root, ['status', '--porcelain=v1', '--untracked-files=all']))
114
+ throw new Error('direct-yolo-retry-apply-raced');
115
+ const { mkdirSync } = await import('node:fs');
116
+ mkdirSync(join(root, '.neocortex/recovery'), { recursive: true });
117
+ writeFileSync(join(root, plan.auditPath), `${JSON.stringify(audit, null, 2)}\n`, { flag: 'wx' });
118
+ writeFileSync(statePath, `${JSON.stringify(state, null, 2)}\n`);
119
+ const runtimeBeforeCommit = await readGitLifecycleRuntime(root, { required: true });
120
+ if (runtimeBeforeCommit.revision !== plan.runtimeRevision)
121
+ throw new Error('direct-yolo-retry-runtime-raced');
122
+ git(root, ['add', '--', '.neocortex/state.json', plan.auditPath]);
123
+ git(root, ['commit', '-m', `chore(${storyId}): begin audited C01 retry`,
124
+ '-m', `Neocortex-C01-Retry-From: ${plan.previousHeadSha}`,
125
+ '-m', `Neocortex-C01-Retry-Audit: ${plan.auditPath}`]);
126
+ const newHeadSha = git(root, ['rev-parse', 'HEAD']);
127
+ const committedPaths = git(root, ['diff-tree', '--no-commit-id', '--name-only', '-r', newHeadSha])
128
+ .split('\n').filter(Boolean).sort();
129
+ if (git(root, ['rev-parse', `${newHeadSha}^`]) !== plan.previousHeadSha
130
+ || JSON.stringify(committedPaths) !== JSON.stringify(['.neocortex/state.json', plan.auditPath].sort())
131
+ || git(root, ['status', '--porcelain=v1', '--untracked-files=all']))
132
+ throw new Error('direct-yolo-retry-postcommit-unverified');
133
+ return { plan, newHeadSha };
134
+ }
135
+ finally {
136
+ await releaseGitLifecyclePhysicalIntegrationLock(lock.path, lock.owner).catch(() => undefined);
137
+ }
138
+ }