@ornexus/neocortex 4.60.68 → 4.60.70

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 (232) hide show
  1. package/dist/release-source.json +1 -1
  2. package/dist/sbom.cdx.json +1194 -1194
  3. package/install.ps1 +1 -1
  4. package/install.sh +1 -1
  5. package/package.json +3 -3
  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 -212
  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 -417
  18. package/packages/client/dist/agent/update-agent-yaml.js +1 -102
  19. package/packages/client/dist/agent/update-description.js +1 -251
  20. package/packages/client/dist/cache/crypto-utils.js +1 -78
  21. package/packages/client/dist/cache/encrypted-cache.js +1 -108
  22. package/packages/client/dist/cache/in-memory-asset-cache.js +1 -73
  23. package/packages/client/dist/cache/index.js +1 -13
  24. package/packages/client/dist/cache/protected-pi-boundary.js +1 -44
  25. package/packages/client/dist/checkpoint/checkpoint-client-reader.js +2 -127
  26. package/packages/client/dist/checkpoint/index.js +1 -11
  27. package/packages/client/dist/checkpoint/shared-checkpoint-types.js +1 -32
  28. package/packages/client/dist/cli.js +3 -290
  29. package/packages/client/dist/commands/activate.js +8 -394
  30. package/packages/client/dist/commands/architecture-answers.js +7 -274
  31. package/packages/client/dist/commands/architecture-memory-terminal.js +4 -253
  32. package/packages/client/dist/commands/architecture-non-ui-continuation.js +1 -100
  33. package/packages/client/dist/commands/architecture-root-binding.js +1 -51
  34. package/packages/client/dist/commands/cache-status.js +2 -112
  35. package/packages/client/dist/commands/config.js +1 -88
  36. package/packages/client/dist/commands/doctor.js +2 -635
  37. package/packages/client/dist/commands/invoke.d.ts +6 -0
  38. package/packages/client/dist/commands/invoke.js +142 -7140
  39. package/packages/client/dist/commands/legacy-epic-terminal.js +1 -71
  40. package/packages/client/dist/commands/legacy-story-branch.js +1 -96
  41. package/packages/client/dist/commands/legacy-story-pr.js +1 -276
  42. package/packages/client/dist/commands/mutation-qa-checkpoint.js +5 -285
  43. package/packages/client/dist/commands/mutation-qa-gate.js +1 -54
  44. package/packages/client/dist/commands/mutation-qa-git.js +1 -41
  45. package/packages/client/dist/commands/mutation-qa-policy.js +1 -102
  46. package/packages/client/dist/commands/mutation-qa-run.js +3 -219
  47. package/packages/client/dist/commands/mutation-qa-verdict.js +1 -149
  48. package/packages/client/dist/commands/mutation-qa.js +1 -220
  49. package/packages/client/dist/commands/native-agent.js +2 -136
  50. package/packages/client/dist/commands/planning-diagnosis.js +1 -43
  51. package/packages/client/dist/commands/planning-generation.js +1 -53
  52. package/packages/client/dist/commands/planning-memory.js +1 -40
  53. package/packages/client/dist/commands/planning-research.js +1 -42
  54. package/packages/client/dist/commands/private-session.js +1 -75
  55. package/packages/client/dist/commands/property-qa.js +1 -139
  56. package/packages/client/dist/commands/qa-control.js +1 -16
  57. package/packages/client/dist/commands/qa-scan-browser-launch.js +1 -55
  58. package/packages/client/dist/commands/qa-scan-browser-route.js +1 -28
  59. package/packages/client/dist/commands/qa-scan-capture.js +5 -663
  60. package/packages/client/dist/commands/qa-scan-discovery.js +3 -376
  61. package/packages/client/dist/commands/qa-scan-review.js +5 -826
  62. package/packages/client/dist/commands/qa-synthetic-backend-capture.js +1 -266
  63. package/packages/client/dist/commands/qa-synthetic-backend-review.js +1 -297
  64. package/packages/client/dist/commands/qa-synthetic-backend.js +2 -340
  65. package/packages/client/dist/commands/qa-synthetic-broker-port.js +1 -85
  66. package/packages/client/dist/commands/qa-synthetic-browser.js +1 -39
  67. package/packages/client/dist/commands/refactor-characterization.js +21 -671
  68. package/packages/client/dist/commands/refactor-commit.js +13 -399
  69. package/packages/client/dist/commands/refactor-control.js +3 -142
  70. package/packages/client/dist/commands/refactor-cpp-assertions.js +3 -93
  71. package/packages/client/dist/commands/refactor-review.js +5 -283
  72. package/packages/client/dist/commands/refactor-root.js +7 -588
  73. package/packages/client/dist/commands/refresh-memory.js +3 -156
  74. package/packages/client/dist/commands/shared-architecture-non-ui.js +1 -24
  75. package/packages/client/dist/commands/story-checkpoint.js +1 -171
  76. package/packages/client/dist/config/profile-directory.js +1 -13
  77. package/packages/client/dist/config/resolver-selection.js +1 -278
  78. package/packages/client/dist/config/secure-config.js +12 -281
  79. package/packages/client/dist/config.js +2 -223
  80. package/packages/client/dist/constants.js +1 -25
  81. package/packages/client/dist/context/context-collector.js +2 -222
  82. package/packages/client/dist/context/context-sanitizer.js +1 -145
  83. package/packages/client/dist/continuity/autonomous-governance.js +1 -285
  84. package/packages/client/dist/continuity/continuity-client-state-store.js +1 -1587
  85. package/packages/client/dist/continuity/invoke-hooks.js +1 -129
  86. package/packages/client/dist/continuity/migrations/001-initial-schema.js +2 -12
  87. package/packages/client/dist/continuity/migrations/002-processing-output-summary-indexes.js +2 -12
  88. package/packages/client/dist/continuity/migrations/003-headless-execution-attempts.js +2 -12
  89. package/packages/client/dist/continuity/migrations/004-outbox-delivery-state.js +2 -12
  90. package/packages/client/dist/continuity/migrations/005-bounded-headless-queue.js +2 -12
  91. package/packages/client/dist/continuity/migrations/006-native-agent-dispatches.js +2 -10
  92. package/packages/client/dist/continuity/native-agent-store.js +1 -69
  93. package/packages/client/dist/continuity/native-agent-types.js +1 -90
  94. package/packages/client/dist/continuity/outbox.js +1 -117
  95. package/packages/client/dist/continuity/runner-bootstrap-policy.js +1 -172
  96. package/packages/client/dist/continuity/sqlite-store.js +81 -2536
  97. package/packages/client/dist/effects/invoke-effect-gateways.js +1 -62
  98. package/packages/client/dist/errors/error-messages.js +2 -228
  99. package/packages/client/dist/errors/frontmatter-diagnostics.js +1 -125
  100. package/packages/client/dist/evidence/collector.js +1 -347
  101. package/packages/client/dist/evidence/index.js +1 -1
  102. package/packages/client/dist/evidence/types.js +0 -2
  103. package/packages/client/dist/fs/atomic-state-replace.js +1 -152
  104. package/packages/client/dist/generated/command-registry.generated.js +1 -4076
  105. package/packages/client/dist/generated/public-projections.generated.js +1 -149
  106. package/packages/client/dist/git/direct-yolo-c01-retry.js +4 -138
  107. package/packages/client/dist/git/direct-yolo-checkpoint.js +4 -1234
  108. package/packages/client/dist/git/git-lifecycle-step-ids.js +1 -14
  109. package/packages/client/dist/git/git-lifecycle-store.js +9 -1938
  110. package/packages/client/dist/git/legacy-story-branch-checkpoint.js +9 -259
  111. package/packages/client/dist/git/legacy-story-branch-setup.js +4 -348
  112. package/packages/client/dist/git/legacy-story-pr.js +70 -3538
  113. package/packages/client/dist/git/secure-filesystem-boundary.js +5 -182
  114. package/packages/client/dist/graph-retrieval/pre-command-hook.js +1 -284
  115. package/packages/client/dist/graph-retrieval/shared-graph-retrieval-contract.js +1 -237
  116. package/packages/client/dist/i18n/first-run.js +2 -60
  117. package/packages/client/dist/index.js +1 -47
  118. package/packages/client/dist/invocation/invoke-input.js +1 -24
  119. package/packages/client/dist/license/index.js +1 -5
  120. package/packages/client/dist/license/license-client.js +1 -304
  121. package/packages/client/dist/machine/fingerprint.js +2 -163
  122. package/packages/client/dist/machine/index.js +1 -5
  123. package/packages/client/dist/memory/project-memory-path-scope.js +1 -62
  124. package/packages/client/dist/memory/project-memory-writer.js +40 -1007
  125. package/packages/client/dist/memory/shared-project-memory-types.js +2 -253
  126. package/packages/client/dist/migrations/project-identity-capability.js +1 -50
  127. package/packages/client/dist/migrations/project-identity.js +7 -493
  128. package/packages/client/dist/migrations/state-json.js +4 -344
  129. package/packages/client/dist/policy/architecture-policy.js +2 -184
  130. package/packages/client/dist/policy/index.js +1 -7
  131. package/packages/client/dist/policy/shared-policy-types.js +0 -38
  132. package/packages/client/dist/policy/subagent-approval-policy.js +1 -55
  133. package/packages/client/dist/private-execution/clean-baseline.js +2 -279
  134. package/packages/client/dist/private-execution/codex-executor.js +4 -574
  135. package/packages/client/dist/private-execution/codex-host-runtime.js +1 -137
  136. package/packages/client/dist/private-execution/codex-lifecycle-guard.js +1 -97
  137. package/packages/client/dist/private-execution/codex-scoped-permissions.js +1 -128
  138. package/packages/client/dist/private-execution/delivery.js +13 -410
  139. package/packages/client/dist/private-execution/diagnosis-root-review.js +2 -294
  140. package/packages/client/dist/private-execution/frozen-handoff.js +6 -19
  141. package/packages/client/dist/private-execution/implementation-validation.js +2 -106
  142. package/packages/client/dist/private-execution/isolated-admission.js +23 -1432
  143. package/packages/client/dist/private-execution/isolated-session.js +5 -725
  144. package/packages/client/dist/private-execution/isolated-workspace.js +1 -122
  145. package/packages/client/dist/private-execution/pact-consumer-runtime.js +3 -409
  146. package/packages/client/dist/private-execution/pact-test-source.js +1 -258
  147. package/packages/client/dist/private-execution/pact-toolchain.js +3 -290
  148. package/packages/client/dist/private-execution/pact-write-set.js +1 -172
  149. package/packages/client/dist/private-execution/planning-diagnosis-checkpoint.js +5 -406
  150. package/packages/client/dist/private-execution/planning-generation-checkpoint.js +5 -462
  151. package/packages/client/dist/private-execution/planning-memory-checkpoint.js +3 -139
  152. package/packages/client/dist/private-execution/planning-research-checkpoint.js +4 -325
  153. package/packages/client/dist/private-execution/private-report-store.js +1 -42
  154. package/packages/client/dist/private-execution/property-test-candidate.js +1 -103
  155. package/packages/client/dist/private-execution/property-test-choices.js +3 -147
  156. package/packages/client/dist/private-execution/property-test-plan.js +7 -271
  157. package/packages/client/dist/private-execution/property-test-review.js +4 -258
  158. package/packages/client/dist/private-execution/property-test-runtime.js +9 -372
  159. package/packages/client/dist/private-execution/property-test-source.js +1 -139
  160. package/packages/client/dist/private-execution/root-checkpoint.js +1 -80
  161. package/packages/client/dist/private-execution/root-memory-git-evidence.js +3 -135
  162. package/packages/client/dist/private-execution/root-memory-recovery.js +1 -93
  163. package/packages/client/dist/private-execution/root-memory-request.js +1 -29
  164. package/packages/client/dist/private-execution/root-memory-scope.js +1 -178
  165. package/packages/client/dist/private-execution/root-memory-writer.js +1 -102
  166. package/packages/client/dist/private-execution/session-lease.js +1 -63
  167. package/packages/client/dist/private-execution/shared-private-admission-types.js +1 -50
  168. package/packages/client/dist/private-execution/shared-project-validation.js +1 -66
  169. package/packages/client/dist/private-execution/shared-root-memory-types.js +1 -61
  170. package/packages/client/dist/private-execution/ux-source-validation.js +1 -372
  171. package/packages/client/dist/private-execution/ux-write-set.js +2 -191
  172. package/packages/client/dist/resilience/circuit-breaker.js +1 -170
  173. package/packages/client/dist/resilience/degradation-manager.js +1 -164
  174. package/packages/client/dist/resilience/freshness-indicator.js +1 -100
  175. package/packages/client/dist/resilience/index.js +1 -8
  176. package/packages/client/dist/resilience/recovery-detector.js +1 -74
  177. package/packages/client/dist/resolvers/asset-resolver.js +0 -13
  178. package/packages/client/dist/resolvers/local-resolver.js +8 -255
  179. package/packages/client/dist/resolvers/remote-resolver.js +1 -233
  180. package/packages/client/dist/runner/binary.js +1 -404
  181. package/packages/client/dist/runner/cli.js +17 -1571
  182. package/packages/client/dist/runner/headless/adapters.js +1 -49
  183. package/packages/client/dist/runner/headless/claude-code-adapter.js +1 -79
  184. package/packages/client/dist/runner/headless/continuous-story-workspace.js +11 -1628
  185. package/packages/client/dist/runner/headless/epic-git-reconciliation-inventory.js +1 -69
  186. package/packages/client/dist/runner/headless/epic-merge-candidate-qa.js +2 -110
  187. package/packages/client/dist/runner/headless/epic-terminal-git-cli-adapter.js +8 -1236
  188. package/packages/client/dist/runner/headless/epic-terminal-git-runner.js +2 -318
  189. package/packages/client/dist/runner/headless/fake-adapter.js +1 -62
  190. package/packages/client/dist/runner/headless/managed-profile.js +1 -132
  191. package/packages/client/dist/runner/headless/opencode-adapter.js +2 -145
  192. package/packages/client/dist/runner/headless/prepared-story-bundle.js +1 -43
  193. package/packages/client/dist/runner/headless/resolver.js +1 -231
  194. package/packages/client/dist/runner/headless/run-yolo.js +1 -885
  195. package/packages/client/dist/runner/headless/run-yoloop.js +2 -2574
  196. package/packages/client/dist/runner/headless/types.js +2 -574
  197. package/packages/client/dist/runner/local-console.js +13 -396
  198. package/packages/client/dist/runner/portal-sync-worker.js +1 -1487
  199. package/packages/client/dist/runner/project-identity.js +1 -106
  200. package/packages/client/dist/runner/scheduler.js +7 -995
  201. package/packages/client/dist/runner-cli.js +2 -18
  202. package/packages/client/dist/state/invocation-shape.js +1 -13
  203. package/packages/client/dist/state/project-state-snapshot.js +1 -1677
  204. package/packages/client/dist/state/state-json-repair.js +3 -785
  205. package/packages/client/dist/state/structural-dag-projection.js +1 -118
  206. package/packages/client/dist/telemetry/index.js +1 -5
  207. package/packages/client/dist/telemetry/offline-queue.js +1 -131
  208. package/packages/client/dist/tier/index.js +1 -5
  209. package/packages/client/dist/tier/tier-aware-client.js +1 -405
  210. package/packages/client/dist/types/index.js +1 -38
  211. package/packages/client/dist/version.js +1 -27
  212. package/packages/client/dist/yolo/change-evidence-collector.js +1 -126
  213. package/packages/client/dist/yolo/invoke-envelope-capability.js +1 -62
  214. package/packages/client/dist/yolo/spec-envelope-collector.js +5 -185
  215. package/packages/client/dist/yoloop/discovery-hook.js +2 -300
  216. package/packages/client/dist/yoloop/index.js +1 -8
  217. package/packages/client/dist/yoloop/invoke-hooks.js +12 -669
  218. package/packages/client/dist/yoloop/shared-discover-epics.js +1 -1007
  219. package/packages/client/dist/yoloop/shared-yoloop-types.js +1 -33
  220. package/packages/client/dist/yoloop/target-normalization.js +1 -180
  221. package/packages/client/dist/yoloop/yoloop-client-state-store.js +1 -1723
  222. package/targets-stubs/antigravity/gemini.md +1 -1
  223. package/targets-stubs/antigravity/skill/SKILL.md +1 -1
  224. package/targets-stubs/claude-code/neocortex-root.agent.yaml +1 -1
  225. package/targets-stubs/claude-code/neocortex-root.md +2 -2
  226. package/targets-stubs/claude-code/neocortex.agent.yaml +1 -1
  227. package/targets-stubs/claude-code/neocortex.md +2 -2
  228. package/targets-stubs/codex/AGENTS.md +1 -1
  229. package/targets-stubs/cursor/agent.md +2 -2
  230. package/targets-stubs/gemini-cli/agent.md +2 -2
  231. package/targets-stubs/opencode/neocortex-root.md +1 -1
  232. 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};