@ornexus/neocortex 4.61.5 → 4.62.0

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 (279) hide show
  1. package/dist/release-source.json +1 -1
  2. package/dist/sbom.cdx.json +1193 -1193
  3. package/install.ps1 +31 -34
  4. package/install.sh +1 -1
  5. package/package.json +5 -2
  6. package/packages/client/dist/adapters/adapter-registry.js +1 -108
  7. package/packages/client/dist/adapters/antigravity-adapter.js +2 -77
  8. package/packages/client/dist/adapters/claude-code-adapter.js +3 -79
  9. package/packages/client/dist/adapters/codex-adapter.js +2 -80
  10. package/packages/client/dist/adapters/cursor-adapter.js +4 -115
  11. package/packages/client/dist/adapters/gemini-adapter.js +2 -71
  12. package/packages/client/dist/adapters/grok-adapter.js +2 -42
  13. package/packages/client/dist/adapters/index.js +1 -22
  14. package/packages/client/dist/adapters/platform-detector.js +1 -220
  15. package/packages/client/dist/adapters/target-adapter.js +0 -12
  16. package/packages/client/dist/adapters/vscode-adapter.js +2 -72
  17. package/packages/client/dist/agent/refresh-stubs.js +2 -443
  18. package/packages/client/dist/agent/update-agent-yaml.js +1 -102
  19. package/packages/client/dist/agent/update-description.d.ts +8 -1
  20. package/packages/client/dist/agent/update-description.js +2 -260
  21. package/packages/client/dist/cache/crypto-utils.js +1 -78
  22. package/packages/client/dist/cache/encrypted-cache.js +1 -338
  23. package/packages/client/dist/cache/in-memory-asset-cache.js +1 -73
  24. package/packages/client/dist/cache/index.js +1 -13
  25. package/packages/client/dist/cache/protected-pi-boundary.js +1 -44
  26. package/packages/client/dist/checkpoint/checkpoint-client-reader.js +2 -127
  27. package/packages/client/dist/checkpoint/index.js +1 -11
  28. package/packages/client/dist/checkpoint/shared-checkpoint-types.js +1 -32
  29. package/packages/client/dist/cli.js +5 -364
  30. package/packages/client/dist/commands/activate.js +8 -394
  31. package/packages/client/dist/commands/architecture-answers.js +7 -274
  32. package/packages/client/dist/commands/architecture-memory-terminal.js +4 -253
  33. package/packages/client/dist/commands/architecture-non-ui-continuation.js +1 -100
  34. package/packages/client/dist/commands/architecture-root-binding.js +1 -51
  35. package/packages/client/dist/commands/cache-status.js +2 -112
  36. package/packages/client/dist/commands/config.js +1 -88
  37. package/packages/client/dist/commands/doctor.js +2 -635
  38. package/packages/client/dist/commands/invoke.d.ts +17 -0
  39. package/packages/client/dist/commands/invoke.js +148 -7822
  40. package/packages/client/dist/commands/legacy-epic-terminal.js +1 -71
  41. package/packages/client/dist/commands/legacy-story-branch.js +1 -96
  42. package/packages/client/dist/commands/legacy-story-pr.js +1 -276
  43. package/packages/client/dist/commands/mutation-qa-checkpoint.js +5 -285
  44. package/packages/client/dist/commands/mutation-qa-gate.js +1 -54
  45. package/packages/client/dist/commands/mutation-qa-git.js +1 -41
  46. package/packages/client/dist/commands/mutation-qa-policy.js +1 -102
  47. package/packages/client/dist/commands/mutation-qa-run.js +3 -219
  48. package/packages/client/dist/commands/mutation-qa-verdict.js +1 -149
  49. package/packages/client/dist/commands/mutation-qa.js +1 -220
  50. package/packages/client/dist/commands/native-agent.js +2 -136
  51. package/packages/client/dist/commands/planning-diagnosis.js +1 -43
  52. package/packages/client/dist/commands/planning-generation.js +1 -53
  53. package/packages/client/dist/commands/planning-memory.js +1 -40
  54. package/packages/client/dist/commands/planning-research.js +1 -42
  55. package/packages/client/dist/commands/private-session.js +1 -75
  56. package/packages/client/dist/commands/property-qa.js +1 -139
  57. package/packages/client/dist/commands/qa-control.js +1 -16
  58. package/packages/client/dist/commands/qa-scan-browser-launch.js +1 -55
  59. package/packages/client/dist/commands/qa-scan-browser-route.js +1 -28
  60. package/packages/client/dist/commands/qa-scan-capture.js +5 -663
  61. package/packages/client/dist/commands/qa-scan-discovery.js +3 -376
  62. package/packages/client/dist/commands/qa-scan-review.js +5 -826
  63. package/packages/client/dist/commands/qa-synthetic-backend-capture.js +1 -266
  64. package/packages/client/dist/commands/qa-synthetic-backend-review.js +1 -297
  65. package/packages/client/dist/commands/qa-synthetic-backend.js +2 -340
  66. package/packages/client/dist/commands/qa-synthetic-broker-port.js +1 -85
  67. package/packages/client/dist/commands/qa-synthetic-browser.js +1 -39
  68. package/packages/client/dist/commands/refactor-characterization.js +21 -671
  69. package/packages/client/dist/commands/refactor-commit.js +13 -399
  70. package/packages/client/dist/commands/refactor-control.js +3 -142
  71. package/packages/client/dist/commands/refactor-cpp-assertions.js +3 -93
  72. package/packages/client/dist/commands/refactor-review.js +5 -283
  73. package/packages/client/dist/commands/refactor-root.js +7 -588
  74. package/packages/client/dist/commands/refresh-memory.js +3 -174
  75. package/packages/client/dist/commands/shared-architecture-non-ui.js +1 -24
  76. package/packages/client/dist/commands/story-checkpoint.d.ts +5 -1
  77. package/packages/client/dist/commands/story-checkpoint.js +1 -203
  78. package/packages/client/dist/commands/story-worktree.js +5 -258
  79. package/packages/client/dist/config/host-auth-broker.js +1 -60
  80. package/packages/client/dist/config/host-auth-reference.js +1 -93
  81. package/packages/client/dist/config/profile-directory.js +1 -13
  82. package/packages/client/dist/config/resolver-selection.js +1 -278
  83. package/packages/client/dist/config/secure-config.js +12 -281
  84. package/packages/client/dist/config.js +2 -224
  85. package/packages/client/dist/constants.js +1 -25
  86. package/packages/client/dist/context/context-collector.js +2 -222
  87. package/packages/client/dist/context/context-sanitizer.js +1 -145
  88. package/packages/client/dist/continuity/autonomous-governance.js +1 -285
  89. package/packages/client/dist/continuity/continuity-client-state-store.js +1 -1587
  90. package/packages/client/dist/continuity/invoke-hooks.js +1 -129
  91. package/packages/client/dist/continuity/migrations/001-initial-schema.js +2 -12
  92. package/packages/client/dist/continuity/migrations/002-processing-output-summary-indexes.js +2 -12
  93. package/packages/client/dist/continuity/migrations/003-headless-execution-attempts.js +2 -12
  94. package/packages/client/dist/continuity/migrations/004-outbox-delivery-state.js +2 -12
  95. package/packages/client/dist/continuity/migrations/005-bounded-headless-queue.js +2 -12
  96. package/packages/client/dist/continuity/migrations/006-native-agent-dispatches.js +2 -10
  97. package/packages/client/dist/continuity/native-agent-store.js +1 -69
  98. package/packages/client/dist/continuity/native-agent-types.js +1 -105
  99. package/packages/client/dist/continuity/outbox.js +1 -117
  100. package/packages/client/dist/continuity/runner-bootstrap-policy.js +1 -172
  101. package/packages/client/dist/continuity/sqlite-store.js +81 -2612
  102. package/packages/client/dist/effects/invoke-effect-gateways.js +1 -62
  103. package/packages/client/dist/errors/error-messages.js +2 -258
  104. package/packages/client/dist/errors/frontmatter-diagnostics.d.ts +10 -1
  105. package/packages/client/dist/errors/frontmatter-diagnostics.js +1 -125
  106. package/packages/client/dist/evidence/collector.js +1 -347
  107. package/packages/client/dist/evidence/index.js +1 -1
  108. package/packages/client/dist/evidence/types.js +0 -2
  109. package/packages/client/dist/fs/atomic-state-replace.js +1 -152
  110. package/packages/client/dist/generated/command-registry.generated.js +1 -4076
  111. package/packages/client/dist/generated/public-projections.generated.js +1 -149
  112. package/packages/client/dist/git/direct-yolo-c01-retry.js +4 -138
  113. package/packages/client/dist/git/direct-yolo-checkpoint.d.ts +94 -9
  114. package/packages/client/dist/git/direct-yolo-checkpoint.js +3 -1592
  115. package/packages/client/dist/git/epic-operational-state.js +2 -672
  116. package/packages/client/dist/git/git-lifecycle-step-ids.js +1 -14
  117. package/packages/client/dist/git/git-lifecycle-store.d.ts +88 -0
  118. package/packages/client/dist/git/git-lifecycle-store.js +9 -2529
  119. package/packages/client/dist/git/legacy-story-branch-checkpoint.js +9 -259
  120. package/packages/client/dist/git/legacy-story-branch-setup.js +4 -348
  121. package/packages/client/dist/git/legacy-story-pr.js +70 -3538
  122. package/packages/client/dist/git/neocortex-trailers.js +2 -53
  123. package/packages/client/dist/git/release-gate-env.d.ts +62 -0
  124. package/packages/client/dist/git/release-gate-env.js +1 -0
  125. package/packages/client/dist/git/secure-filesystem-boundary.d.ts +24 -0
  126. package/packages/client/dist/git/secure-filesystem-boundary.js +20 -186
  127. package/packages/client/dist/git/story-worktree-cleanup.js +4 -1058
  128. package/packages/client/dist/git/story-worktree-integration.d.ts +62 -0
  129. package/packages/client/dist/git/story-worktree-integration.js +3 -603
  130. package/packages/client/dist/git/story-worktree-manager.js +3 -843
  131. package/packages/client/dist/git/story-worktree-paths.js +1 -150
  132. package/packages/client/dist/git/story-write-set-extension.d.ts +44 -0
  133. package/packages/client/dist/git/story-write-set-extension.js +1 -0
  134. package/packages/client/dist/graph-retrieval/pre-command-hook.js +1 -284
  135. package/packages/client/dist/graph-retrieval/shared-graph-retrieval-contract.js +1 -237
  136. package/packages/client/dist/i18n/first-run.js +2 -60
  137. package/packages/client/dist/index.js +1 -50
  138. package/packages/client/dist/invocation/invoke-input.js +1 -24
  139. package/packages/client/dist/license/host-auth-recovery.js +1 -401
  140. package/packages/client/dist/license/index.js +1 -5
  141. package/packages/client/dist/license/license-client.js +1 -337
  142. package/packages/client/dist/machine/fingerprint.js +2 -163
  143. package/packages/client/dist/machine/index.js +1 -5
  144. package/packages/client/dist/memory/project-memory-path-scope.js +1 -62
  145. package/packages/client/dist/memory/project-memory-writer.js +41 -1117
  146. package/packages/client/dist/memory/shared-project-memory-types.js +2 -259
  147. package/packages/client/dist/migrations/epic-lifecycle-backfill.js +3 -1060
  148. package/packages/client/dist/migrations/project-identity-capability.js +1 -50
  149. package/packages/client/dist/migrations/project-identity.js +7 -493
  150. package/packages/client/dist/migrations/state-json.js +4 -393
  151. package/packages/client/dist/policy/architecture-policy.js +2 -184
  152. package/packages/client/dist/policy/index.js +1 -7
  153. package/packages/client/dist/policy/shared-policy-types.js +0 -38
  154. package/packages/client/dist/policy/subagent-approval-policy.js +1 -57
  155. package/packages/client/dist/private-execution/clean-baseline.js +2 -279
  156. package/packages/client/dist/private-execution/codex-executor.js +4 -574
  157. package/packages/client/dist/private-execution/codex-host-runtime.js +1 -137
  158. package/packages/client/dist/private-execution/codex-lifecycle-guard.js +1 -97
  159. package/packages/client/dist/private-execution/codex-scoped-permissions.js +1 -128
  160. package/packages/client/dist/private-execution/delivery.js +13 -410
  161. package/packages/client/dist/private-execution/diagnosis-root-review.js +2 -294
  162. package/packages/client/dist/private-execution/frozen-handoff.js +6 -19
  163. package/packages/client/dist/private-execution/implementation-validation.js +2 -106
  164. package/packages/client/dist/private-execution/isolated-admission.js +23 -1432
  165. package/packages/client/dist/private-execution/isolated-session.js +5 -725
  166. package/packages/client/dist/private-execution/isolated-workspace.js +1 -122
  167. package/packages/client/dist/private-execution/pact-consumer-runtime.js +3 -409
  168. package/packages/client/dist/private-execution/pact-test-source.js +1 -258
  169. package/packages/client/dist/private-execution/pact-toolchain.js +3 -290
  170. package/packages/client/dist/private-execution/pact-write-set.js +1 -172
  171. package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.js +5 -406
  172. package/packages/client/dist/private-execution/planning-generation-checkpoint.js +5 -462
  173. package/packages/client/dist/private-execution/planning-memory-checkpoint.js +3 -139
  174. package/packages/client/dist/private-execution/planning-research-checkpoint.js +4 -325
  175. package/packages/client/dist/private-execution/private-report-store.js +1 -42
  176. package/packages/client/dist/private-execution/property-test-candidate.js +1 -103
  177. package/packages/client/dist/private-execution/property-test-choices.js +3 -147
  178. package/packages/client/dist/private-execution/property-test-plan.js +7 -271
  179. package/packages/client/dist/private-execution/property-test-review.js +4 -258
  180. package/packages/client/dist/private-execution/property-test-runtime.js +9 -372
  181. package/packages/client/dist/private-execution/property-test-source.js +1 -139
  182. package/packages/client/dist/private-execution/root-checkpoint.js +1 -80
  183. package/packages/client/dist/private-execution/root-memory-git-evidence.js +3 -135
  184. package/packages/client/dist/private-execution/root-memory-recovery.js +1 -93
  185. package/packages/client/dist/private-execution/root-memory-request.js +1 -29
  186. package/packages/client/dist/private-execution/root-memory-scope.js +1 -178
  187. package/packages/client/dist/private-execution/root-memory-writer.js +1 -102
  188. package/packages/client/dist/private-execution/session-lease.js +1 -63
  189. package/packages/client/dist/private-execution/shared-private-admission-types.js +1 -50
  190. package/packages/client/dist/private-execution/shared-project-validation.js +1 -66
  191. package/packages/client/dist/private-execution/shared-root-memory-types.js +1 -61
  192. package/packages/client/dist/private-execution/ux-source-validation.js +1 -372
  193. package/packages/client/dist/private-execution/ux-write-set.js +2 -191
  194. package/packages/client/dist/registry/registry-reconciliation.js +1 -234
  195. package/packages/client/dist/resilience/circuit-breaker.js +1 -170
  196. package/packages/client/dist/resilience/degradation-manager.js +1 -164
  197. package/packages/client/dist/resilience/freshness-indicator.js +1 -100
  198. package/packages/client/dist/resilience/index.js +1 -8
  199. package/packages/client/dist/resilience/recovery-detector.js +1 -74
  200. package/packages/client/dist/resolvers/asset-resolver.js +0 -13
  201. package/packages/client/dist/resolvers/local-resolver.js +8 -255
  202. package/packages/client/dist/resolvers/remote-resolver.js +1 -233
  203. package/packages/client/dist/runner/binary.js +1 -404
  204. package/packages/client/dist/runner/cli.js +17 -1571
  205. package/packages/client/dist/runner/epic-background-dispatcher.js +1 -124
  206. package/packages/client/dist/runner/headless/adapters.js +1 -49
  207. package/packages/client/dist/runner/headless/background-root.js +1 -85
  208. package/packages/client/dist/runner/headless/child-env.d.ts +92 -0
  209. package/packages/client/dist/runner/headless/child-env.js +1 -0
  210. package/packages/client/dist/runner/headless/claude-code-adapter.js +1 -79
  211. package/packages/client/dist/runner/headless/continuous-story-workspace.js +11 -1776
  212. package/packages/client/dist/runner/headless/epic-git-reconciliation-inventory.js +1 -69
  213. package/packages/client/dist/runner/headless/epic-merge-candidate-qa.js +2 -111
  214. package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.d.ts +1 -0
  215. package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +10 -1464
  216. package/packages/client/dist/runner/headless/epic-terminal-git-runner.js +2 -357
  217. package/packages/client/dist/runner/headless/fake-adapter.js +1 -62
  218. package/packages/client/dist/runner/headless/managed-environment-cleanup.js +1 -274
  219. package/packages/client/dist/runner/headless/managed-profile.js +1 -149
  220. package/packages/client/dist/runner/headless/opencode-adapter.js +2 -145
  221. package/packages/client/dist/runner/headless/prepared-story-bundle.js +1 -43
  222. package/packages/client/dist/runner/headless/resolver.js +1 -231
  223. package/packages/client/dist/runner/headless/run-yolo.js +1 -886
  224. package/packages/client/dist/runner/headless/run-yoloop.js +2 -2657
  225. package/packages/client/dist/runner/headless/types.js +2 -575
  226. package/packages/client/dist/runner/host-capacity.js +1 -59
  227. package/packages/client/dist/runner/local-console.js +13 -396
  228. package/packages/client/dist/runner/portal-sync-worker.js +1 -1487
  229. package/packages/client/dist/runner/project-identity.js +1 -106
  230. package/packages/client/dist/runner/scheduler.js +7 -995
  231. package/packages/client/dist/runner-cli.js +2 -18
  232. package/packages/client/dist/state/invocation-shape.js +1 -13
  233. package/packages/client/dist/state/project-state-snapshot.js +1 -1754
  234. package/packages/client/dist/state/state-json-repair.js +3 -785
  235. package/packages/client/dist/state/structural-dag-projection.js +1 -118
  236. package/packages/client/dist/telemetry/index.js +1 -5
  237. package/packages/client/dist/telemetry/offline-queue.js +1 -131
  238. package/packages/client/dist/tier/index.js +1 -5
  239. package/packages/client/dist/tier/tier-aware-client.js +1 -405
  240. package/packages/client/dist/types/index.js +1 -38
  241. package/packages/client/dist/version.js +1 -27
  242. package/packages/client/dist/yolo/change-evidence-collector.d.ts +10 -0
  243. package/packages/client/dist/yolo/change-evidence-collector.js +1 -262
  244. package/packages/client/dist/yolo/invoke-envelope-capability.d.ts +2 -0
  245. package/packages/client/dist/yolo/invoke-envelope-capability.js +1 -65
  246. package/packages/client/dist/yolo/project-manifest-projection-collector.d.ts +28 -0
  247. package/packages/client/dist/yolo/project-manifest-projection-collector.js +1 -0
  248. package/packages/client/dist/yolo/spec-envelope-collector.d.ts +9 -0
  249. package/packages/client/dist/yolo/spec-envelope-collector.js +5 -184
  250. package/packages/client/dist/yoloop/discovery-hook.js +2 -300
  251. package/packages/client/dist/yoloop/index.js +1 -8
  252. package/packages/client/dist/yoloop/invoke-hooks.js +12 -669
  253. package/packages/client/dist/yoloop/shared-discover-epics.d.ts +16 -0
  254. package/packages/client/dist/yoloop/shared-discover-epics.js +1 -1007
  255. package/packages/client/dist/yoloop/shared-yoloop-types.js +1 -33
  256. package/packages/client/dist/yoloop/target-normalization.js +1 -180
  257. package/packages/client/dist/yoloop/yoloop-client-state-store.js +1 -1920
  258. package/packages/shared/dist/frontmatter-context-contract.js +164 -52
  259. package/packages/shared/dist/project-manifest-projection.js +199 -0
  260. package/packages/shared/dist/project-validation-commands.js +14 -6
  261. package/packages/shared/dist/yolo/spec-envelope-rules.js +85 -0
  262. package/packages/shared/dist/yolo/spec-envelope.js +33 -7
  263. package/packages/shared/dist/yoloop/epic-terminal-git.js +94 -6
  264. package/packages/shared/dist/yoloop/story-write-scope.js +212 -0
  265. package/targets-stubs/antigravity/gemini.md +1 -1
  266. package/targets-stubs/antigravity/install-antigravity.sh +13 -4
  267. package/targets-stubs/antigravity/skill/SKILL.md +1 -1
  268. package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
  269. package/targets-stubs/claude-code/neocortex-root.md +2 -2
  270. package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
  271. package/targets-stubs/claude-code/neocortex.md +5 -5
  272. package/targets-stubs/codex/AGENTS.md +1 -1
  273. package/targets-stubs/cursor/agent.md +2 -2
  274. package/targets-stubs/gemini-cli/agent.md +2 -2
  275. package/targets-stubs/lib/managed-config-merge.js +77 -1
  276. package/targets-stubs/lib/managed-profile.sh +7 -0
  277. package/targets-stubs/opencode/neocortex-root.md +1 -1
  278. package/targets-stubs/vscode/install-vscode.sh +21 -0
  279. package/targets-stubs/vscode/neocortex.agent.md +2 -2
@@ -1,149 +1 @@
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
+ 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,138 +1,4 @@
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
- }
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,11 +1,15 @@
1
1
  import type { RootProjectMemoryEffect } from '@neocortex/shared';
2
2
  import type { StoryCommitCheckpoint } from '../../../shared/dist/yoloop/branch-unit.js';
3
+ import { type GitLifecyclePhysicalIntegrationLockOwner, type P205TransientExecutionAuthority } from './git-lifecycle-store.js';
4
+ /** P226.08 CON-ORIGIN-08-03: closed public remediation hints; never free text. */
5
+ export type DirectYoloFailureHint = 'fetch-origin-branch' | 'checkout-origin-or-rebase';
3
6
  export type DirectYoloCheckpointResult<T> = {
4
7
  readonly ok: true;
5
8
  readonly value: T;
6
9
  } | {
7
10
  readonly ok: false;
8
11
  readonly reasonCode: string;
12
+ readonly hint?: DirectYoloFailureHint;
9
13
  };
10
14
  export interface DirectYoloCommitPlan {
11
15
  readonly schemaVersion: 1;
@@ -112,14 +116,7 @@ export declare function recoverLegacyDirectYoloStoryCheckpoint(options: DirectYo
112
116
  * C08, required from the root checkout on the execution branch.
113
117
  */
114
118
  export declare function resolveDirectYoloIntegrationAuthority(projectRootInput: string, storyId: string): Promise<{
115
- originBinding: {
116
- schemaVersion: 1;
117
- originBranch: string;
118
- originHeadSha: string;
119
- executionBranch: string;
120
- capturedFromCurrentCheckout: true;
121
- capturedAt: string;
122
- } | undefined;
119
+ originBinding: OriginBinding | undefined;
123
120
  projectRoot: string;
124
121
  storyId: string;
125
122
  story: Record<string, unknown>;
@@ -127,7 +124,7 @@ export declare function resolveDirectYoloIntegrationAuthority(projectRootInput:
127
124
  executionBranch: string;
128
125
  originBranch: string;
129
126
  graphRevision: string;
130
- authorizedWriteSet: string[];
127
+ authorizedWriteSet: readonly string[];
131
128
  rootMemoryEffect: import("../private-execution/shared-root-memory-types.js").RootProjectMemoryEffect | undefined;
132
129
  }>;
133
130
  /** P225.07: the direct C08 write-set rule, shared with root integration. */
@@ -148,9 +145,97 @@ export declare function directYoloCommitIdempotencyKey(input: {
148
145
  readonly claimRevision: string;
149
146
  }): string;
150
147
  export declare const DIRECT_YOLO_STORY_CHECKPOINT_LEASE_MS: number;
148
+ /**
149
+ * P205 wave coverage (hotfix 4.61.6). One canonical complete P205 run at the
150
+ * wave head W covers every story commit C_k of the wave. It is recorded on
151
+ * each checkpoint as the public, additive receipt ref
152
+ * `p205-wave:<W>:<waveDigest>`; the checkpoint shape itself is unchanged.
153
+ */
154
+ export interface DirectYoloWaveQaCoverage {
155
+ readonly kind: 'wave';
156
+ readonly waveHeadSha: string;
157
+ readonly waveStoryIds: readonly string[];
158
+ readonly waveCommitShas: readonly string[];
159
+ readonly waveDigest: string;
160
+ }
161
+ export declare const DIRECT_YOLO_WAVE_RECEIPT_REF_PREFIX: "p205-wave:";
162
+ export declare function directYoloWaveQaCoverage(input: {
163
+ readonly epicId: string;
164
+ readonly executionBranch: string;
165
+ readonly waveHeadSha: string;
166
+ readonly waveStoryIds: readonly string[];
167
+ readonly waveCommitShas: readonly string[];
168
+ }): DirectYoloWaveQaCoverage;
169
+ export declare function directYoloWaveReceiptRef(coverage: DirectYoloWaveQaCoverage): string;
170
+ export type DirectYoloWaveGateResult = {
171
+ readonly ok: true;
172
+ readonly headSha: string;
173
+ readonly authorities: ReadonlyMap<string, P205TransientExecutionAuthority>;
174
+ } | {
175
+ readonly ok: false;
176
+ readonly headSha: string;
177
+ readonly kind: 'gate-failed' | 'infrastructure';
178
+ readonly reasonCode: string;
179
+ };
180
+ /**
181
+ * Run the canonical complete P205 gate once at the current root HEAD. The
182
+ * observer can only veto (a throw is a gate failure); it never supplies or
183
+ * replaces the canonical result. `p205-transient-*` errors are integrity
184
+ * failures (head/producer races), never a story verdict.
185
+ */
186
+ export declare function runDirectYoloWaveP205(input: {
187
+ readonly projectRoot: string;
188
+ readonly headSha: string;
189
+ readonly storyId: string;
190
+ readonly graphRevisions: readonly string[];
191
+ readonly nowIso?: string;
192
+ readonly qaRunner?: DirectYoloCheckpointOptions['qaRunner'];
193
+ }): Promise<DirectYoloWaveGateResult>;
194
+ /** Push the passing wave head once and require the remote branch to equal it exactly. */
195
+ export declare function pushDirectYoloWaveHead(projectRoot: string, remoteInput: string, branch: string, headSha: string): Promise<boolean>;
196
+ /**
197
+ * Persist one wave story checkpoint (C_k, base C_{k-1}) covered by the P205
198
+ * run at the wave head W. Fail-closed: the root HEAD and `epic/<ID>` must
199
+ * equal W, C_k must be an ancestor of W, and the transient authority must have
200
+ * executed at W for the checkpoint graph epoch (the same rule the replay path
201
+ * applies to an accepted checkpoint at a descendant aggregate head).
202
+ */
203
+ export declare function persistDirectYoloWaveStoryCheckpoint(input: {
204
+ readonly projectRoot: string;
205
+ readonly storyId: string;
206
+ readonly headSha: string;
207
+ readonly coverage: DirectYoloWaveQaCoverage;
208
+ readonly authorities: ReadonlyMap<string, P205TransientExecutionAuthority>;
209
+ readonly expectedLease: Record<string, unknown>;
210
+ readonly physicalLock: {
211
+ readonly path: string;
212
+ readonly owner: GitLifecyclePhysicalIntegrationLockOwner;
213
+ };
214
+ readonly remote?: string;
215
+ readonly nowIso?: string;
216
+ }): Promise<DirectYoloCheckpointResult<StoryCommitCheckpoint>>;
217
+ /** P226.08 CON-ORIGIN-08-01: v1 is unchanged; v2 is additive and closed. */
218
+ interface OriginBindingV1 {
219
+ schemaVersion: 1;
220
+ originBranch: string;
221
+ originHeadSha: string;
222
+ executionBranch: string;
223
+ capturedFromCurrentCheckout: true;
224
+ capturedAt: string;
225
+ }
226
+ interface OriginBindingV2 {
227
+ schemaVersion: 2;
228
+ originBranch: string;
229
+ originHeadSha: string;
230
+ executionBranch: string;
231
+ capturedFrom: 'current-checkout' | 'branch-ref';
232
+ capturedAt: string;
233
+ }
234
+ type OriginBinding = OriginBindingV1 | OriginBindingV2;
151
235
  /** Physical observation for a private YOLO agent step; this is not actor attribution. */
152
236
  export declare function captureDirectYoloCheckoutEvidence(projectRootInput: string): Promise<{
153
237
  readonly headSha: string;
154
238
  readonly branch: string;
155
239
  readonly payloadDigest: string;
156
240
  }>;
241
+ export {};