@cleocode/core 2026.9.23 → 2026.9.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (865) hide show
  1. package/dist/admin/import-tasks.d.ts.map +1 -1
  2. package/dist/admin/import-tasks.js +35 -6
  3. package/dist/admin/import-tasks.js.map +1 -1
  4. package/dist/admin/import.d.ts.map +1 -1
  5. package/dist/admin/import.js +25 -6
  6. package/dist/admin/import.js.map +1 -1
  7. package/dist/audit-prune.d.ts +32 -0
  8. package/dist/audit-prune.d.ts.map +1 -1
  9. package/dist/audit-prune.js +37 -3
  10. package/dist/audit-prune.js.map +1 -1
  11. package/dist/build-provenance.json +2 -2
  12. package/dist/cloud/crypto.d.ts +1 -2
  13. package/dist/cloud/crypto.d.ts.map +1 -1
  14. package/dist/cloud/crypto.js +1 -11
  15. package/dist/cloud/crypto.js.map +1 -1
  16. package/dist/cloud/http.d.ts +8 -0
  17. package/dist/cloud/http.d.ts.map +1 -1
  18. package/dist/cloud/http.js +8 -1
  19. package/dist/cloud/http.js.map +1 -1
  20. package/dist/cloud/index.d.ts +6 -1
  21. package/dist/cloud/index.d.ts.map +1 -1
  22. package/dist/cloud/index.js +6 -1
  23. package/dist/cloud/index.js.map +1 -1
  24. package/dist/cloud/nexus-auth.d.ts +169 -0
  25. package/dist/cloud/nexus-auth.d.ts.map +1 -0
  26. package/dist/cloud/nexus-auth.js +372 -0
  27. package/dist/cloud/nexus-auth.js.map +1 -0
  28. package/dist/cloud/nexus-credentials.d.ts +188 -0
  29. package/dist/cloud/nexus-credentials.d.ts.map +1 -0
  30. package/dist/cloud/nexus-credentials.js +323 -0
  31. package/dist/cloud/nexus-credentials.js.map +1 -0
  32. package/dist/cloud/nexus-link.d.ts +85 -0
  33. package/dist/cloud/nexus-link.d.ts.map +1 -0
  34. package/dist/cloud/nexus-link.js +226 -0
  35. package/dist/cloud/nexus-link.js.map +1 -0
  36. package/dist/cloud/presence.d.ts +88 -0
  37. package/dist/cloud/presence.d.ts.map +1 -0
  38. package/dist/cloud/presence.js +137 -0
  39. package/dist/cloud/presence.js.map +1 -0
  40. package/dist/cloud/projects.d.ts +3 -1
  41. package/dist/cloud/projects.d.ts.map +1 -1
  42. package/dist/cloud/projects.js +4 -2
  43. package/dist/cloud/projects.js.map +1 -1
  44. package/dist/cloud/uuidv7.d.ts +9 -0
  45. package/dist/cloud/uuidv7.d.ts.map +1 -0
  46. package/dist/cloud/uuidv7.js +19 -0
  47. package/dist/cloud/uuidv7.js.map +1 -0
  48. package/dist/crypto/credentials.d.ts +14 -4
  49. package/dist/crypto/credentials.d.ts.map +1 -1
  50. package/dist/crypto/credentials.js +15 -1
  51. package/dist/crypto/credentials.js.map +1 -1
  52. package/dist/decide/bench/dataset.d.ts +125 -0
  53. package/dist/decide/bench/dataset.d.ts.map +1 -0
  54. package/dist/decide/bench/dataset.js +457 -0
  55. package/dist/decide/bench/dataset.js.map +1 -0
  56. package/dist/decide/bench/index.d.ts +23 -0
  57. package/dist/decide/bench/index.d.ts.map +1 -0
  58. package/dist/decide/bench/index.js +23 -0
  59. package/dist/decide/bench/index.js.map +1 -0
  60. package/dist/decide/bench/metrics.d.ts +55 -0
  61. package/dist/decide/bench/metrics.d.ts.map +1 -0
  62. package/dist/decide/bench/metrics.js +100 -0
  63. package/dist/decide/bench/metrics.js.map +1 -0
  64. package/dist/decide/bench/operation.d.ts +119 -0
  65. package/dist/decide/bench/operation.d.ts.map +1 -0
  66. package/dist/decide/bench/operation.js +171 -0
  67. package/dist/decide/bench/operation.js.map +1 -0
  68. package/dist/decide/bench/profiles.d.ts +102 -0
  69. package/dist/decide/bench/profiles.d.ts.map +1 -0
  70. package/dist/decide/bench/profiles.js +175 -0
  71. package/dist/decide/bench/profiles.js.map +1 -0
  72. package/dist/decide/bench/questions.d.ts +40 -0
  73. package/dist/decide/bench/questions.d.ts.map +1 -0
  74. package/dist/decide/bench/questions.js +107 -0
  75. package/dist/decide/bench/questions.js.map +1 -0
  76. package/dist/decide/bench/report.d.ts +21 -0
  77. package/dist/decide/bench/report.d.ts.map +1 -0
  78. package/dist/decide/bench/report.js +125 -0
  79. package/dist/decide/bench/report.js.map +1 -0
  80. package/dist/decide/bench/runner.d.ts +208 -0
  81. package/dist/decide/bench/runner.d.ts.map +1 -0
  82. package/dist/decide/bench/runner.js +336 -0
  83. package/dist/decide/bench/runner.js.map +1 -0
  84. package/dist/decide/bench/source.d.ts +21 -0
  85. package/dist/decide/bench/source.d.ts.map +1 -0
  86. package/dist/decide/bench/source.js +67 -0
  87. package/dist/decide/bench/source.js.map +1 -0
  88. package/dist/decide/bench/spot-check.d.ts +117 -0
  89. package/dist/decide/bench/spot-check.d.ts.map +1 -0
  90. package/dist/decide/bench/spot-check.js +221 -0
  91. package/dist/decide/bench/spot-check.js.map +1 -0
  92. package/dist/decide/bench/stats.d.ts +57 -0
  93. package/dist/decide/bench/stats.d.ts.map +1 -0
  94. package/dist/decide/bench/stats.js +82 -0
  95. package/dist/decide/bench/stats.js.map +1 -0
  96. package/dist/decide/bench/types.d.ts +216 -0
  97. package/dist/decide/bench/types.d.ts.map +1 -0
  98. package/dist/decide/bench/types.js +104 -0
  99. package/dist/decide/bench/types.js.map +1 -0
  100. package/dist/decide/client.d.ts +35 -1
  101. package/dist/decide/client.d.ts.map +1 -1
  102. package/dist/decide/client.js +135 -35
  103. package/dist/decide/client.js.map +1 -1
  104. package/dist/decide/credentials.d.ts +177 -17
  105. package/dist/decide/credentials.d.ts.map +1 -1
  106. package/dist/decide/credentials.js +505 -41
  107. package/dist/decide/credentials.js.map +1 -1
  108. package/dist/decide/index.d.ts +8 -8
  109. package/dist/decide/index.d.ts.map +1 -1
  110. package/dist/decide/index.js +8 -8
  111. package/dist/decide/index.js.map +1 -1
  112. package/dist/decide/jev-wire.d.ts +55 -19
  113. package/dist/decide/jev-wire.d.ts.map +1 -1
  114. package/dist/decide/jev-wire.js +116 -37
  115. package/dist/decide/jev-wire.js.map +1 -1
  116. package/dist/decide/operations.d.ts +63 -12
  117. package/dist/decide/operations.d.ts.map +1 -1
  118. package/dist/decide/operations.js +116 -58
  119. package/dist/decide/operations.js.map +1 -1
  120. package/dist/decide/provider-state.d.ts +85 -12
  121. package/dist/decide/provider-state.d.ts.map +1 -1
  122. package/dist/decide/provider-state.js +154 -21
  123. package/dist/decide/provider-state.js.map +1 -1
  124. package/dist/decide/provider.d.ts +5 -0
  125. package/dist/decide/provider.d.ts.map +1 -1
  126. package/dist/decide/provider.js.map +1 -1
  127. package/dist/decide/providers.d.ts +15 -2
  128. package/dist/decide/providers.d.ts.map +1 -1
  129. package/dist/decide/providers.js +22 -6
  130. package/dist/decide/providers.js.map +1 -1
  131. package/dist/decide/sites/registry.d.ts +22 -0
  132. package/dist/decide/sites/registry.d.ts.map +1 -1
  133. package/dist/decide/sites/registry.js +23 -0
  134. package/dist/decide/sites/registry.js.map +1 -1
  135. package/dist/decide/wizard.d.ts +12 -4
  136. package/dist/decide/wizard.d.ts.map +1 -1
  137. package/dist/decide/wizard.js +79 -26
  138. package/dist/decide/wizard.js.map +1 -1
  139. package/dist/dispatch/mvi-projection.d.ts +15 -2
  140. package/dist/dispatch/mvi-projection.d.ts.map +1 -1
  141. package/dist/dispatch/mvi-projection.js +73 -12
  142. package/dist/dispatch/mvi-projection.js.map +1 -1
  143. package/dist/docs/adr-allocator.d.ts +2 -2
  144. package/dist/docs/adr-allocator.d.ts.map +1 -1
  145. package/dist/docs/adr-allocator.js +17 -4
  146. package/dist/docs/adr-allocator.js.map +1 -1
  147. package/dist/docs/blob-consolidation.js +1 -1
  148. package/dist/docs/blob-consolidation.js.map +1 -1
  149. package/dist/docs/display-alias.d.ts +1 -1
  150. package/dist/docs/display-alias.d.ts.map +1 -1
  151. package/dist/docs/display-alias.js +7 -4
  152. package/dist/docs/display-alias.js.map +1 -1
  153. package/dist/docs/docs-inconsistency-detector.js +1 -1
  154. package/dist/docs/docs-inconsistency-detector.js.map +1 -1
  155. package/dist/docs/docs-update.d.ts.map +1 -1
  156. package/dist/docs/docs-update.js +6 -1
  157. package/dist/docs/docs-update.js.map +1 -1
  158. package/dist/docs/export-document.js +18058 -14538
  159. package/dist/docs/export-document.js.map +3 -3
  160. package/dist/docs/numbering.js +1 -1
  161. package/dist/docs/numbering.js.map +1 -1
  162. package/dist/docs/supersede.d.ts.map +1 -1
  163. package/dist/docs/supersede.js +6 -3
  164. package/dist/docs/supersede.js.map +1 -1
  165. package/dist/docs/version-ssot.js +1 -1
  166. package/dist/docs/version-ssot.js.map +1 -1
  167. package/dist/doctor/db-substrate.d.ts.map +1 -1
  168. package/dist/doctor/db-substrate.js +39 -24
  169. package/dist/doctor/db-substrate.js.map +1 -1
  170. package/dist/doctor/knowledge-summary.d.ts +10 -3
  171. package/dist/doctor/knowledge-summary.d.ts.map +1 -1
  172. package/dist/doctor/knowledge-summary.js +10 -3
  173. package/dist/doctor/knowledge-summary.js.map +1 -1
  174. package/dist/doctor/orphan-ac-bindings.d.ts +64 -0
  175. package/dist/doctor/orphan-ac-bindings.d.ts.map +1 -0
  176. package/dist/doctor/orphan-ac-bindings.js +59 -0
  177. package/dist/doctor/orphan-ac-bindings.js.map +1 -0
  178. package/dist/doctor/project-identity.d.ts +128 -37
  179. package/dist/doctor/project-identity.d.ts.map +1 -1
  180. package/dist/doctor/project-identity.js +476 -63
  181. package/dist/doctor/project-identity.js.map +1 -1
  182. package/dist/doctor/projects.d.ts.map +1 -1
  183. package/dist/doctor/projects.js +43 -29
  184. package/dist/doctor/projects.js.map +1 -1
  185. package/dist/doctor/row-identity.d.ts +31 -0
  186. package/dist/doctor/row-identity.d.ts.map +1 -0
  187. package/dist/doctor/row-identity.js +93 -0
  188. package/dist/doctor/row-identity.js.map +1 -0
  189. package/dist/doctor/twin-collapse.d.ts +108 -2
  190. package/dist/doctor/twin-collapse.d.ts.map +1 -1
  191. package/dist/doctor/twin-collapse.js +309 -7
  192. package/dist/doctor/twin-collapse.js.map +1 -1
  193. package/dist/error-catalog.js +2 -2
  194. package/dist/error-catalog.js.map +1 -1
  195. package/dist/error-registry.js +1 -1
  196. package/dist/error-registry.js.map +1 -1
  197. package/dist/gateway-client/generated/types.gen.d.ts +22 -2
  198. package/dist/gateway-client/generated/types.gen.d.ts.map +1 -1
  199. package/dist/index.d.ts +1 -1
  200. package/dist/index.d.ts.map +1 -1
  201. package/dist/index.js +1 -1
  202. package/dist/index.js.map +1 -1
  203. package/dist/init.d.ts.map +1 -1
  204. package/dist/init.js +20 -11
  205. package/dist/init.js.map +1 -1
  206. package/dist/inject/index.d.ts.map +1 -1
  207. package/dist/inject/index.js +2 -3
  208. package/dist/inject/index.js.map +1 -1
  209. package/dist/internal.d.ts +5 -4
  210. package/dist/internal.d.ts.map +1 -1
  211. package/dist/internal.js +6 -4
  212. package/dist/internal.js.map +1 -1
  213. package/dist/lifecycle/verification/satisfies-validator.d.ts.map +1 -1
  214. package/dist/lifecycle/verification/satisfies-validator.js +10 -0
  215. package/dist/lifecycle/verification/satisfies-validator.js.map +1 -1
  216. package/dist/llm/credential-remove-entry.d.ts +59 -0
  217. package/dist/llm/credential-remove-entry.d.ts.map +1 -0
  218. package/dist/llm/credential-remove-entry.js +101 -0
  219. package/dist/llm/credential-remove-entry.js.map +1 -0
  220. package/dist/llm/oauth/device-code.d.ts +26 -6
  221. package/dist/llm/oauth/device-code.d.ts.map +1 -1
  222. package/dist/llm/oauth/device-code.js +44 -12
  223. package/dist/llm/oauth/device-code.js.map +1 -1
  224. package/dist/llm/plugin-facade.js +18202 -14682
  225. package/dist/llm/plugin-facade.js.map +3 -3
  226. package/dist/memory/attention.d.ts.map +1 -1
  227. package/dist/memory/attention.js +5 -3
  228. package/dist/memory/attention.js.map +1 -1
  229. package/dist/memory/decisions.d.ts +48 -3
  230. package/dist/memory/decisions.d.ts.map +1 -1
  231. package/dist/memory/decisions.js +98 -14
  232. package/dist/memory/decisions.js.map +1 -1
  233. package/dist/memory/index.d.ts.map +1 -1
  234. package/dist/memory/index.js +19 -10
  235. package/dist/memory/index.js.map +1 -1
  236. package/dist/memory/learnings.d.ts +6 -6
  237. package/dist/memory/manifest-identity.d.ts +171 -0
  238. package/dist/memory/manifest-identity.d.ts.map +1 -0
  239. package/dist/memory/manifest-identity.js +345 -0
  240. package/dist/memory/manifest-identity.js.map +1 -0
  241. package/dist/memory/mental-model-queue.d.ts +14 -4
  242. package/dist/memory/mental-model-queue.d.ts.map +1 -1
  243. package/dist/memory/mental-model-queue.js +64 -35
  244. package/dist/memory/mental-model-queue.js.map +1 -1
  245. package/dist/memory/patterns.d.ts +4 -4
  246. package/dist/memory/pipeline-manifest-sqlite.d.ts +47 -5
  247. package/dist/memory/pipeline-manifest-sqlite.d.ts.map +1 -1
  248. package/dist/memory/pipeline-manifest-sqlite.js +130 -14
  249. package/dist/memory/pipeline-manifest-sqlite.js.map +1 -1
  250. package/dist/memory/retrieval/observe.d.ts.map +1 -1
  251. package/dist/memory/retrieval/observe.js +2 -0
  252. package/dist/memory/retrieval/observe.js.map +1 -1
  253. package/dist/memory/transcript-scanner.js +1 -1
  254. package/dist/migration/manual/T10165-backfill-adr-index.d.ts.map +1 -1
  255. package/dist/migration/manual/T10165-backfill-adr-index.js +5 -1
  256. package/dist/migration/manual/T10165-backfill-adr-index.js.map +1 -1
  257. package/dist/nexus/deps.d.ts.map +1 -1
  258. package/dist/nexus/deps.js +7 -14
  259. package/dist/nexus/deps.js.map +1 -1
  260. package/dist/nexus/discover.d.ts.map +1 -1
  261. package/dist/nexus/discover.js +6 -9
  262. package/dist/nexus/discover.js.map +1 -1
  263. package/dist/nexus/fleet-status.d.ts +83 -0
  264. package/dist/nexus/fleet-status.d.ts.map +1 -0
  265. package/dist/nexus/fleet-status.js +414 -0
  266. package/dist/nexus/fleet-status.js.map +1 -0
  267. package/dist/nexus/git-state.d.ts +15 -0
  268. package/dist/nexus/git-state.d.ts.map +1 -1
  269. package/dist/nexus/git-state.js +77 -3
  270. package/dist/nexus/git-state.js.map +1 -1
  271. package/dist/nexus/identity.d.ts.map +1 -1
  272. package/dist/nexus/identity.js +4 -0
  273. package/dist/nexus/identity.js.map +1 -1
  274. package/dist/nexus/index.d.ts +4 -1
  275. package/dist/nexus/index.d.ts.map +1 -1
  276. package/dist/nexus/index.js +7 -1
  277. package/dist/nexus/index.js.map +1 -1
  278. package/dist/nexus/migrate-json-to-sqlite.d.ts +3 -2
  279. package/dist/nexus/migrate-json-to-sqlite.d.ts.map +1 -1
  280. package/dist/nexus/migrate-json-to-sqlite.js +9 -17
  281. package/dist/nexus/migrate-json-to-sqlite.js.map +1 -1
  282. package/dist/nexus/ops.d.ts +1 -0
  283. package/dist/nexus/ops.d.ts.map +1 -1
  284. package/dist/nexus/project-activity.d.ts +104 -0
  285. package/dist/nexus/project-activity.d.ts.map +1 -0
  286. package/dist/nexus/project-activity.js +150 -0
  287. package/dist/nexus/project-activity.js.map +1 -0
  288. package/dist/nexus/projects-clean.d.ts.map +1 -1
  289. package/dist/nexus/projects-clean.js +22 -11
  290. package/dist/nexus/projects-clean.js.map +1 -1
  291. package/dist/nexus/projects-scan.d.ts.map +1 -1
  292. package/dist/nexus/projects-scan.js +8 -13
  293. package/dist/nexus/projects-scan.js.map +1 -1
  294. package/dist/nexus/query.d.ts +2 -2
  295. package/dist/nexus/query.d.ts.map +1 -1
  296. package/dist/nexus/query.js +8 -31
  297. package/dist/nexus/query.js.map +1 -1
  298. package/dist/nexus/registry-errors.d.ts +61 -0
  299. package/dist/nexus/registry-errors.d.ts.map +1 -0
  300. package/dist/nexus/registry-errors.js +85 -0
  301. package/dist/nexus/registry-errors.js.map +1 -0
  302. package/dist/nexus/registry-roots.d.ts +5 -2
  303. package/dist/nexus/registry-roots.d.ts.map +1 -1
  304. package/dist/nexus/registry-roots.js +8 -10
  305. package/dist/nexus/registry-roots.js.map +1 -1
  306. package/dist/nexus/registry.d.ts +48 -5
  307. package/dist/nexus/registry.d.ts.map +1 -1
  308. package/dist/nexus/registry.js +151 -85
  309. package/dist/nexus/registry.js.map +1 -1
  310. package/dist/orchestrate/pivot.d.ts +4 -0
  311. package/dist/orchestrate/pivot.d.ts.map +1 -1
  312. package/dist/orchestrate/pivot.js +75 -12
  313. package/dist/orchestrate/pivot.js.map +1 -1
  314. package/dist/orchestrate/query-ops.d.ts.map +1 -1
  315. package/dist/orchestrate/query-ops.js +29 -27
  316. package/dist/orchestrate/query-ops.js.map +1 -1
  317. package/dist/orchestrate/spawn-ops.d.ts.map +1 -1
  318. package/dist/orchestrate/spawn-ops.js +29 -3
  319. package/dist/orchestrate/spawn-ops.js.map +1 -1
  320. package/dist/orchestrate/worktree-complete.d.ts.map +1 -1
  321. package/dist/orchestrate/worktree-complete.js +40 -2
  322. package/dist/orchestrate/worktree-complete.js.map +1 -1
  323. package/dist/orchestration/bootstrap.d.ts.map +1 -1
  324. package/dist/orchestration/bootstrap.js +20 -14
  325. package/dist/orchestration/bootstrap.js.map +1 -1
  326. package/dist/orchestration/index.d.ts +15 -1
  327. package/dist/orchestration/index.d.ts.map +1 -1
  328. package/dist/orchestration/index.js +25 -6
  329. package/dist/orchestration/index.js.map +1 -1
  330. package/dist/orchestration/lead-rollup.d.ts +7 -1
  331. package/dist/orchestration/lead-rollup.d.ts.map +1 -1
  332. package/dist/orchestration/lead-rollup.js +6 -3
  333. package/dist/orchestration/lead-rollup.js.map +1 -1
  334. package/dist/orchestration/spawn-prompt.d.ts +26 -0
  335. package/dist/orchestration/spawn-prompt.d.ts.map +1 -1
  336. package/dist/orchestration/spawn-prompt.js +63 -92
  337. package/dist/orchestration/spawn-prompt.js.map +1 -1
  338. package/dist/orchestration/waves.d.ts +21 -10
  339. package/dist/orchestration/waves.d.ts.map +1 -1
  340. package/dist/orchestration/waves.js +38 -35
  341. package/dist/orchestration/waves.js.map +1 -1
  342. package/dist/paths.d.ts +9 -2
  343. package/dist/paths.d.ts.map +1 -1
  344. package/dist/paths.js +30 -13
  345. package/dist/paths.js.map +1 -1
  346. package/dist/phases/index.d.ts +1 -1
  347. package/dist/phases/index.d.ts.map +1 -1
  348. package/dist/phases/index.js +3 -4
  349. package/dist/phases/index.js.map +1 -1
  350. package/dist/project-info.d.ts +40 -3
  351. package/dist/project-info.d.ts.map +1 -1
  352. package/dist/project-info.js +74 -6
  353. package/dist/project-info.js.map +1 -1
  354. package/dist/project-lifecycle.d.ts +28 -7
  355. package/dist/project-lifecycle.d.ts.map +1 -1
  356. package/dist/project-lifecycle.js +114 -47
  357. package/dist/project-lifecycle.js.map +1 -1
  358. package/dist/project-scope.d.ts +70 -3
  359. package/dist/project-scope.d.ts.map +1 -1
  360. package/dist/project-scope.js +154 -15
  361. package/dist/project-scope.js.map +1 -1
  362. package/dist/release/ci-evidence.d.ts +190 -0
  363. package/dist/release/ci-evidence.d.ts.map +1 -1
  364. package/dist/release/ci-evidence.js +436 -4
  365. package/dist/release/ci-evidence.js.map +1 -1
  366. package/dist/release/open.d.ts +12 -2
  367. package/dist/release/open.d.ts.map +1 -1
  368. package/dist/release/open.js +32 -3
  369. package/dist/release/open.js.map +1 -1
  370. package/dist/release/preflight-skip.d.ts +73 -0
  371. package/dist/release/preflight-skip.d.ts.map +1 -0
  372. package/dist/release/preflight-skip.js +254 -0
  373. package/dist/release/preflight-skip.js.map +1 -0
  374. package/dist/render/decide/index.d.ts +51 -0
  375. package/dist/render/decide/index.d.ts.map +1 -0
  376. package/dist/render/decide/index.js +289 -0
  377. package/dist/render/decide/index.js.map +1 -0
  378. package/dist/render/index.d.ts +1 -0
  379. package/dist/render/index.d.ts.map +1 -1
  380. package/dist/render/index.js +1 -0
  381. package/dist/render/index.js.map +1 -1
  382. package/dist/render/nexus/graph/index.d.ts +5 -0
  383. package/dist/render/nexus/graph/index.d.ts.map +1 -1
  384. package/dist/render/nexus/graph/index.js +53 -0
  385. package/dist/render/nexus/graph/index.js.map +1 -1
  386. package/dist/scaffold/ensure-config.d.ts +14 -6
  387. package/dist/scaffold/ensure-config.d.ts.map +1 -1
  388. package/dist/scaffold/ensure-config.js +39 -17
  389. package/dist/scaffold/ensure-config.js.map +1 -1
  390. package/dist/scaffold/project-identity.d.ts +115 -23
  391. package/dist/scaffold/project-identity.d.ts.map +1 -1
  392. package/dist/scaffold/project-identity.js +196 -44
  393. package/dist/scaffold/project-identity.js.map +1 -1
  394. package/dist/sdk/validator-ac-pull.d.ts.map +1 -1
  395. package/dist/sdk/validator-ac-pull.js +2 -1
  396. package/dist/sdk/validator-ac-pull.js.map +1 -1
  397. package/dist/selfimprove/fix-gen.js +18221 -14701
  398. package/dist/selfimprove/fix-gen.js.map +3 -3
  399. package/dist/sentient/cross-project-hygiene.d.ts +17 -6
  400. package/dist/sentient/cross-project-hygiene.d.ts.map +1 -1
  401. package/dist/sentient/cross-project-hygiene.js +22 -11
  402. package/dist/sentient/cross-project-hygiene.js.map +1 -1
  403. package/dist/sentient/propose-tick.d.ts.map +1 -1
  404. package/dist/sentient/propose-tick.js +2 -3
  405. package/dist/sentient/propose-tick.js.map +1 -1
  406. package/dist/sentient/stage-drift-tick.d.ts.map +1 -1
  407. package/dist/sentient/stage-drift-tick.js +2 -3
  408. package/dist/sentient/stage-drift-tick.js.map +1 -1
  409. package/dist/session/engine-ops.d.ts +13 -4
  410. package/dist/session/engine-ops.d.ts.map +1 -1
  411. package/dist/session/engine-ops.js +38 -45
  412. package/dist/session/engine-ops.js.map +1 -1
  413. package/dist/sessions/briefing.d.ts +7 -3
  414. package/dist/sessions/briefing.d.ts.map +1 -1
  415. package/dist/sessions/briefing.js +10 -10
  416. package/dist/sessions/briefing.js.map +1 -1
  417. package/dist/sessions/drift-watchdog.d.ts.map +1 -1
  418. package/dist/sessions/drift-watchdog.js +11 -19
  419. package/dist/sessions/drift-watchdog.js.map +1 -1
  420. package/dist/sessions/focus-state-store.d.ts +103 -26
  421. package/dist/sessions/focus-state-store.d.ts.map +1 -1
  422. package/dist/sessions/focus-state-store.js +166 -37
  423. package/dist/sessions/focus-state-store.js.map +1 -1
  424. package/dist/sessions/handoff.d.ts.map +1 -1
  425. package/dist/sessions/handoff.js +9 -18
  426. package/dist/sessions/handoff.js.map +1 -1
  427. package/dist/sessions/index.d.ts +4 -2
  428. package/dist/sessions/index.d.ts.map +1 -1
  429. package/dist/sessions/index.js +35 -6
  430. package/dist/sessions/index.js.map +1 -1
  431. package/dist/sessions/session-drift.d.ts.map +1 -1
  432. package/dist/sessions/session-drift.js +4 -2
  433. package/dist/sessions/session-drift.js.map +1 -1
  434. package/dist/sessions/session-view.d.ts +8 -1
  435. package/dist/sessions/session-view.d.ts.map +1 -1
  436. package/dist/sessions/session-view.js +9 -2
  437. package/dist/sessions/session-view.js.map +1 -1
  438. package/dist/setup/config-json-merge.d.ts.map +1 -1
  439. package/dist/setup/config-json-merge.js +1 -0
  440. package/dist/setup/config-json-merge.js.map +1 -1
  441. package/dist/setup/index.d.ts +4 -2
  442. package/dist/setup/index.d.ts.map +1 -1
  443. package/dist/setup/index.js +6 -2
  444. package/dist/setup/index.js.map +1 -1
  445. package/dist/setup/sections/nexus-account.d.ts +32 -0
  446. package/dist/setup/sections/nexus-account.d.ts.map +1 -0
  447. package/dist/setup/sections/nexus-account.js +64 -0
  448. package/dist/setup/sections/nexus-account.js.map +1 -0
  449. package/dist/setup/wizard.d.ts +1 -1
  450. package/dist/setup/wizard.d.ts.map +1 -1
  451. package/dist/setup/wizard.js.map +1 -1
  452. package/dist/skills/manifests/research.js +2 -0
  453. package/dist/skills/manifests/research.js.map +1 -1
  454. package/dist/skills/orchestrator/startup.d.ts.map +1 -1
  455. package/dist/skills/orchestrator/startup.js +18 -31
  456. package/dist/skills/orchestrator/startup.js.map +1 -1
  457. package/dist/skills/orchestrator/validator.d.ts.map +1 -1
  458. package/dist/skills/orchestrator/validator.js +9 -2
  459. package/dist/skills/orchestrator/validator.js.map +1 -1
  460. package/dist/skills/validation.d.ts +4 -1
  461. package/dist/skills/validation.d.ts.map +1 -1
  462. package/dist/skills/validation.js +11 -3
  463. package/dist/skills/validation.js.map +1 -1
  464. package/dist/snapshot/index.d.ts.map +1 -1
  465. package/dist/snapshot/index.js +60 -53
  466. package/dist/snapshot/index.js.map +1 -1
  467. package/dist/spawn/agent-identity.d.ts +33 -1
  468. package/dist/spawn/agent-identity.d.ts.map +1 -1
  469. package/dist/spawn/agent-identity.js +53 -1
  470. package/dist/spawn/agent-identity.js.map +1 -1
  471. package/dist/spawn/branch-lock.d.ts +111 -7
  472. package/dist/spawn/branch-lock.d.ts.map +1 -1
  473. package/dist/spawn/branch-lock.js +296 -8
  474. package/dist/spawn/branch-lock.js.map +1 -1
  475. package/dist/spawn/index.d.ts +1 -1
  476. package/dist/spawn/index.d.ts.map +1 -1
  477. package/dist/spawn/index.js +1 -1
  478. package/dist/spawn/index.js.map +1 -1
  479. package/dist/stats/index.d.ts.map +1 -1
  480. package/dist/stats/index.js +3 -4
  481. package/dist/stats/index.js.map +1 -1
  482. package/dist/status/index.d.ts +12 -3
  483. package/dist/status/index.d.ts.map +1 -1
  484. package/dist/status/index.js +47 -5
  485. package/dist/status/index.js.map +1 -1
  486. package/dist/store/ac-binding-prune.d.ts +144 -0
  487. package/dist/store/ac-binding-prune.d.ts.map +1 -0
  488. package/dist/store/ac-binding-prune.js +293 -0
  489. package/dist/store/ac-binding-prune.js.map +1 -0
  490. package/dist/store/agent-registry-store.d.ts.map +1 -1
  491. package/dist/store/agent-registry-store.js +3 -2
  492. package/dist/store/agent-registry-store.js.map +1 -1
  493. package/dist/store/attachment-repair.d.ts.map +1 -1
  494. package/dist/store/attachment-repair.js +42 -3
  495. package/dist/store/attachment-repair.js.map +1 -1
  496. package/dist/store/attachment-store.d.ts.map +1 -1
  497. package/dist/store/attachment-store.js +30 -46
  498. package/dist/store/attachment-store.js.map +1 -1
  499. package/dist/store/backup-recover-brain.d.ts +4 -0
  500. package/dist/store/backup-recover-brain.d.ts.map +1 -1
  501. package/dist/store/backup-recover-brain.js +2 -0
  502. package/dist/store/backup-recover-brain.js.map +1 -1
  503. package/dist/store/backup-recover.d.ts +9 -0
  504. package/dist/store/backup-recover.d.ts.map +1 -1
  505. package/dist/store/backup-recover.js +28 -1
  506. package/dist/store/backup-recover.js.map +1 -1
  507. package/dist/store/backup-sidecar.d.ts +115 -2
  508. package/dist/store/backup-sidecar.d.ts.map +1 -1
  509. package/dist/store/backup-sidecar.js +263 -3
  510. package/dist/store/backup-sidecar.js.map +1 -1
  511. package/dist/store/blob-keep.d.ts +135 -0
  512. package/dist/store/blob-keep.d.ts.map +1 -0
  513. package/dist/store/blob-keep.js +283 -0
  514. package/dist/store/blob-keep.js.map +1 -0
  515. package/dist/store/conduit-sqlite.d.ts.map +1 -1
  516. package/dist/store/conduit-sqlite.js +3 -2
  517. package/dist/store/conduit-sqlite.js.map +1 -1
  518. package/dist/store/converters.d.ts.map +1 -1
  519. package/dist/store/converters.js +11 -0
  520. package/dist/store/converters.js.map +1 -1
  521. package/dist/store/credential-transfer.d.ts +37 -5
  522. package/dist/store/credential-transfer.d.ts.map +1 -1
  523. package/dist/store/credential-transfer.js +76 -18
  524. package/dist/store/credential-transfer.js.map +1 -1
  525. package/dist/store/data-accessor.d.ts +1 -1
  526. package/dist/store/data-accessor.d.ts.map +1 -1
  527. package/dist/store/data-accessor.js.map +1 -1
  528. package/dist/store/db-helpers.d.ts +35 -11
  529. package/dist/store/db-helpers.d.ts.map +1 -1
  530. package/dist/store/db-helpers.js +107 -38
  531. package/dist/store/db-helpers.js.map +1 -1
  532. package/dist/store/display-id-alias.d.ts +529 -0
  533. package/dist/store/display-id-alias.d.ts.map +1 -0
  534. package/dist/store/display-id-alias.js +1063 -0
  535. package/dist/store/display-id-alias.js.map +1 -0
  536. package/dist/store/dual-scope-db.d.ts.map +1 -1
  537. package/dist/store/dual-scope-db.js +21 -0
  538. package/dist/store/dual-scope-db.js.map +1 -1
  539. package/dist/store/exodus/on-open.d.ts.map +1 -1
  540. package/dist/store/exodus/on-open.js +35 -0
  541. package/dist/store/exodus/on-open.js.map +1 -1
  542. package/dist/store/exodus/reconcile.d.ts.map +1 -1
  543. package/dist/store/exodus/reconcile.js +7 -2
  544. package/dist/store/exodus/reconcile.js.map +1 -1
  545. package/dist/store/exodus/recovery.d.ts.map +1 -1
  546. package/dist/store/exodus/recovery.js +20 -1
  547. package/dist/store/exodus/recovery.js.map +1 -1
  548. package/dist/store/exodus/runtime-targets.d.ts +3 -3
  549. package/dist/store/exodus/runtime-targets.js +3 -3
  550. package/dist/store/import-remap.d.ts +12 -1
  551. package/dist/store/import-remap.d.ts.map +1 -1
  552. package/dist/store/import-remap.js +14 -0
  553. package/dist/store/import-remap.js.map +1 -1
  554. package/dist/store/legacy-tasks-lineage.d.ts +3 -1
  555. package/dist/store/legacy-tasks-lineage.d.ts.map +1 -1
  556. package/dist/store/legacy-tasks-lineage.js +22 -3
  557. package/dist/store/legacy-tasks-lineage.js.map +1 -1
  558. package/dist/store/memory-accessor.js +1 -1
  559. package/dist/store/memory-accessor.js.map +1 -1
  560. package/dist/store/migration-manager.d.ts +61 -0
  561. package/dist/store/migration-manager.d.ts.map +1 -1
  562. package/dist/store/migration-manager.js +102 -4
  563. package/dist/store/migration-manager.js.map +1 -1
  564. package/dist/store/nexus-validation-schemas.d.ts +64 -0
  565. package/dist/store/nexus-validation-schemas.d.ts.map +1 -1
  566. package/dist/store/portable-bundle-import.d.ts +8 -0
  567. package/dist/store/portable-bundle-import.d.ts.map +1 -1
  568. package/dist/store/portable-bundle-import.js +10 -0
  569. package/dist/store/portable-bundle-import.js.map +1 -1
  570. package/dist/store/portable-bundle-scan.d.ts.map +1 -1
  571. package/dist/store/portable-bundle-scan.js +1 -0
  572. package/dist/store/portable-bundle-scan.js.map +1 -1
  573. package/dist/store/portable-bundle.d.ts.map +1 -1
  574. package/dist/store/portable-bundle.js +15 -14
  575. package/dist/store/portable-bundle.js.map +1 -1
  576. package/dist/store/pre-repair-snapshot.d.ts +4 -1
  577. package/dist/store/pre-repair-snapshot.d.ts.map +1 -1
  578. package/dist/store/pre-repair-snapshot.js +5 -1
  579. package/dist/store/pre-repair-snapshot.js.map +1 -1
  580. package/dist/store/regenerators.d.ts +4 -2
  581. package/dist/store/regenerators.d.ts.map +1 -1
  582. package/dist/store/regenerators.js +7 -3
  583. package/dist/store/regenerators.js.map +1 -1
  584. package/dist/store/repair-malformed-dbs.d.ts +4 -0
  585. package/dist/store/repair-malformed-dbs.d.ts.map +1 -1
  586. package/dist/store/repair-malformed-dbs.js +3 -0
  587. package/dist/store/repair-malformed-dbs.js.map +1 -1
  588. package/dist/store/row-identity-flag.d.ts +26 -0
  589. package/dist/store/row-identity-flag.d.ts.map +1 -0
  590. package/dist/store/row-identity-flag.js +31 -0
  591. package/dist/store/row-identity-flag.js.map +1 -0
  592. package/dist/store/row-identity-registry.d.ts +61 -0
  593. package/dist/store/row-identity-registry.d.ts.map +1 -0
  594. package/dist/store/row-identity-registry.js +198 -0
  595. package/dist/store/row-identity-registry.js.map +1 -0
  596. package/dist/store/row-identity.d.ts +390 -0
  597. package/dist/store/row-identity.d.ts.map +1 -0
  598. package/dist/store/row-identity.js +1240 -0
  599. package/dist/store/row-identity.js.map +1 -0
  600. package/dist/store/safety-data-accessor.d.ts +10 -3
  601. package/dist/store/safety-data-accessor.d.ts.map +1 -1
  602. package/dist/store/safety-data-accessor.js +15 -4
  603. package/dist/store/safety-data-accessor.js.map +1 -1
  604. package/dist/store/schema/attachments.d.ts +1 -1
  605. package/dist/store/schema/audit.d.ts +4 -4
  606. package/dist/store/schema/background-jobs.d.ts +1 -1
  607. package/dist/store/schema/cleo-global/nexus.d.ts +49 -1
  608. package/dist/store/schema/cleo-global/nexus.d.ts.map +1 -1
  609. package/dist/store/schema/cleo-global/nexus.js +17 -0
  610. package/dist/store/schema/cleo-global/nexus.js.map +1 -1
  611. package/dist/store/schema/cleo-global/skills.d.ts +2 -2
  612. package/dist/store/schema/cleo-project/audit.d.ts +4 -4
  613. package/dist/store/schema/cleo-project/docs.d.ts +17 -1
  614. package/dist/store/schema/cleo-project/docs.d.ts.map +1 -1
  615. package/dist/store/schema/cleo-project/docs.js +10 -0
  616. package/dist/store/schema/cleo-project/docs.js.map +1 -1
  617. package/dist/store/schema/cleo-project/lifecycle.d.ts +4 -4
  618. package/dist/store/schema/cleo-project/nexus-graph.d.ts +3 -3
  619. package/dist/store/schema/cleo-project/provenance-commits.d.ts +2 -2
  620. package/dist/store/schema/cleo-project/provenance-rest.d.ts +3 -3
  621. package/dist/store/schema/cleo-project/runtime.d.ts +3 -3
  622. package/dist/store/schema/cleo-project/tasks-core-batch2.d.ts +87 -1
  623. package/dist/store/schema/cleo-project/tasks-core-batch2.d.ts.map +1 -1
  624. package/dist/store/schema/cleo-project/tasks-core-batch2.js +35 -0
  625. package/dist/store/schema/cleo-project/tasks-core-batch2.js.map +1 -1
  626. package/dist/store/schema/cleo-project/tasks-core.d.ts +263 -7
  627. package/dist/store/schema/cleo-project/tasks-core.d.ts.map +1 -1
  628. package/dist/store/schema/cleo-project/tasks-core.js +77 -2
  629. package/dist/store/schema/cleo-project/tasks-core.js.map +1 -1
  630. package/dist/store/schema/cleo-shared/brain.d.ts +7 -7
  631. package/dist/store/schema/lifecycle.d.ts +4 -4
  632. package/dist/store/schema/manifest.d.ts +1 -1
  633. package/dist/store/schema/memory-schema.d.ts +6 -6
  634. package/dist/store/schema/nexus-schema.d.ts +51 -3
  635. package/dist/store/schema/nexus-schema.d.ts.map +1 -1
  636. package/dist/store/schema/nexus-schema.js +28 -7
  637. package/dist/store/schema/nexus-schema.js.map +1 -1
  638. package/dist/store/schema/provenance/releases.d.ts +1 -1
  639. package/dist/store/schema/skills-schema.d.ts +2 -2
  640. package/dist/store/schema/tasks.d.ts +6 -6
  641. package/dist/store/session-store.d.ts +65 -0
  642. package/dist/store/session-store.d.ts.map +1 -1
  643. package/dist/store/session-store.js +108 -7
  644. package/dist/store/session-store.js.map +1 -1
  645. package/dist/store/split-brain-import.d.ts +2 -14
  646. package/dist/store/split-brain-import.d.ts.map +1 -1
  647. package/dist/store/split-brain-import.js +4 -19
  648. package/dist/store/split-brain-import.js.map +1 -1
  649. package/dist/store/sqlite-data-accessor.d.ts +279 -2
  650. package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
  651. package/dist/store/sqlite-data-accessor.js +789 -91
  652. package/dist/store/sqlite-data-accessor.js.map +1 -1
  653. package/dist/store/sqlite.d.ts +15 -3
  654. package/dist/store/sqlite.d.ts.map +1 -1
  655. package/dist/store/sqlite.js +52 -20
  656. package/dist/store/sqlite.js.map +1 -1
  657. package/dist/store/store-write-guard.d.ts +9 -3
  658. package/dist/store/store-write-guard.d.ts.map +1 -1
  659. package/dist/store/store-write-guard.js +25 -4
  660. package/dist/store/store-write-guard.js.map +1 -1
  661. package/dist/store/sync/clock-store.d.ts +67 -0
  662. package/dist/store/sync/clock-store.d.ts.map +1 -0
  663. package/dist/store/sync/clock-store.js +117 -0
  664. package/dist/store/sync/clock-store.js.map +1 -0
  665. package/dist/store/sync/flags.d.ts +51 -0
  666. package/dist/store/sync/flags.d.ts.map +1 -0
  667. package/dist/store/sync/flags.js +81 -0
  668. package/dist/store/sync/flags.js.map +1 -0
  669. package/dist/store/sync/hlc.d.ts +115 -0
  670. package/dist/store/sync/hlc.d.ts.map +1 -0
  671. package/dist/store/sync/hlc.js +172 -0
  672. package/dist/store/sync/hlc.js.map +1 -0
  673. package/dist/store/sync/index.d.ts +20 -0
  674. package/dist/store/sync/index.d.ts.map +1 -0
  675. package/dist/store/sync/index.js +20 -0
  676. package/dist/store/sync/index.js.map +1 -0
  677. package/dist/store/sync/replica-registry.d.ts +85 -0
  678. package/dist/store/sync/replica-registry.d.ts.map +1 -0
  679. package/dist/store/sync/replica-registry.js +147 -0
  680. package/dist/store/sync/replica-registry.js.map +1 -0
  681. package/dist/store/sync/replica.d.ts +181 -0
  682. package/dist/store/sync/replica.d.ts.map +1 -0
  683. package/dist/store/sync/replica.js +305 -0
  684. package/dist/store/sync/replica.js.map +1 -0
  685. package/dist/store/sync/schema.d.ts +68 -0
  686. package/dist/store/sync/schema.d.ts.map +1 -0
  687. package/dist/store/sync/schema.js +130 -0
  688. package/dist/store/sync/schema.js.map +1 -0
  689. package/dist/store/sync/skew-hold.d.ts +71 -0
  690. package/dist/store/sync/skew-hold.d.ts.map +1 -0
  691. package/dist/store/sync/skew-hold.js +89 -0
  692. package/dist/store/sync/skew-hold.js.map +1 -0
  693. package/dist/store/table-classification.d.ts +11 -9
  694. package/dist/store/table-classification.d.ts.map +1 -1
  695. package/dist/store/table-classification.js +127 -33
  696. package/dist/store/table-classification.js.map +1 -1
  697. package/dist/store/task-claim.d.ts +144 -0
  698. package/dist/store/task-claim.d.ts.map +1 -0
  699. package/dist/store/task-claim.js +195 -0
  700. package/dist/store/task-claim.js.map +1 -0
  701. package/dist/store/task-version.d.ts +43 -5
  702. package/dist/store/task-version.d.ts.map +1 -1
  703. package/dist/store/task-version.js +113 -17
  704. package/dist/store/task-version.js.map +1 -1
  705. package/dist/store/tasks-schema.d.ts +2 -0
  706. package/dist/store/tasks-schema.d.ts.map +1 -1
  707. package/dist/store/tasks-schema.js +1 -0
  708. package/dist/store/tasks-schema.js.map +1 -1
  709. package/dist/store/tasks-sqlite.d.ts.map +1 -1
  710. package/dist/store/tasks-sqlite.js +10 -2
  711. package/dist/store/tasks-sqlite.js.map +1 -1
  712. package/dist/store/twin-collapse.d.ts +450 -22
  713. package/dist/store/twin-collapse.d.ts.map +1 -1
  714. package/dist/store/twin-collapse.js +1552 -49
  715. package/dist/store/twin-collapse.js.map +1 -1
  716. package/dist/store/umbrella-data-accessor.d.ts +10 -3
  717. package/dist/store/umbrella-data-accessor.d.ts.map +1 -1
  718. package/dist/store/umbrella-data-accessor.js +14 -4
  719. package/dist/store/umbrella-data-accessor.js.map +1 -1
  720. package/dist/store/validation-schemas.d.ts +402 -50
  721. package/dist/store/validation-schemas.d.ts.map +1 -1
  722. package/dist/store/with-retry.d.ts +36 -0
  723. package/dist/store/with-retry.d.ts.map +1 -1
  724. package/dist/store/with-retry.js +51 -0
  725. package/dist/store/with-retry.js.map +1 -1
  726. package/dist/store/worktree-build-guard.d.ts +13 -4
  727. package/dist/store/worktree-build-guard.d.ts.map +1 -1
  728. package/dist/store/worktree-build-guard.js +21 -10
  729. package/dist/store/worktree-build-guard.js.map +1 -1
  730. package/dist/store/worktree-isolation-guard.d.ts +121 -10
  731. package/dist/store/worktree-isolation-guard.d.ts.map +1 -1
  732. package/dist/store/worktree-isolation-guard.js +155 -34
  733. package/dist/store/worktree-isolation-guard.js.map +1 -1
  734. package/dist/system/backup.d.ts +7 -0
  735. package/dist/system/backup.d.ts.map +1 -1
  736. package/dist/system/backup.js +5 -0
  737. package/dist/system/backup.js.map +1 -1
  738. package/dist/system/health.d.ts.map +1 -1
  739. package/dist/system/health.js +6 -1
  740. package/dist/system/health.js.map +1 -1
  741. package/dist/system/inject-generate.d.ts.map +1 -1
  742. package/dist/system/inject-generate.js +23 -10
  743. package/dist/system/inject-generate.js.map +1 -1
  744. package/dist/system/project-health.d.ts +17 -2
  745. package/dist/system/project-health.d.ts.map +1 -1
  746. package/dist/system/project-health.js +19 -6
  747. package/dist/system/project-health.js.map +1 -1
  748. package/dist/task-tools/index.d.ts +1 -1
  749. package/dist/task-tools/index.d.ts.map +1 -1
  750. package/dist/task-tools/index.js +1 -1
  751. package/dist/task-tools/index.js.map +1 -1
  752. package/dist/task-tools/score-task-priority.d.ts +38 -0
  753. package/dist/task-tools/score-task-priority.d.ts.map +1 -1
  754. package/dist/task-tools/score-task-priority.js +51 -0
  755. package/dist/task-tools/score-task-priority.js.map +1 -1
  756. package/dist/task-work/claims.d.ts +215 -0
  757. package/dist/task-work/claims.d.ts.map +1 -0
  758. package/dist/task-work/claims.js +272 -0
  759. package/dist/task-work/claims.js.map +1 -0
  760. package/dist/task-work/index.d.ts +47 -3
  761. package/dist/task-work/index.d.ts.map +1 -1
  762. package/dist/task-work/index.js +74 -41
  763. package/dist/task-work/index.js.map +1 -1
  764. package/dist/tasks/ac-coverage-gate.d.ts.map +1 -1
  765. package/dist/tasks/ac-coverage-gate.js +3 -0
  766. package/dist/tasks/ac-coverage-gate.js.map +1 -1
  767. package/dist/tasks/ac-table.d.ts +35 -7
  768. package/dist/tasks/ac-table.d.ts.map +1 -1
  769. package/dist/tasks/ac-table.js +119 -14
  770. package/dist/tasks/ac-table.js.map +1 -1
  771. package/dist/tasks/add.d.ts.map +1 -1
  772. package/dist/tasks/add.js +51 -4
  773. package/dist/tasks/add.js.map +1 -1
  774. package/dist/tasks/analyze.d.ts.map +1 -1
  775. package/dist/tasks/analyze.js +3 -4
  776. package/dist/tasks/analyze.js.map +1 -1
  777. package/dist/tasks/backfill-child-projections.js +47 -6
  778. package/dist/tasks/backfill-child-projections.js.map +1 -1
  779. package/dist/tasks/change-set.d.ts +5 -0
  780. package/dist/tasks/change-set.d.ts.map +1 -1
  781. package/dist/tasks/change-set.js +59 -3
  782. package/dist/tasks/change-set.js.map +1 -1
  783. package/dist/tasks/complete.d.ts +16 -0
  784. package/dist/tasks/complete.d.ts.map +1 -1
  785. package/dist/tasks/complete.js +33 -8
  786. package/dist/tasks/complete.js.map +1 -1
  787. package/dist/tasks/completion-evaluation.d.ts.map +1 -1
  788. package/dist/tasks/completion-evaluation.js +3 -0
  789. package/dist/tasks/completion-evaluation.js.map +1 -1
  790. package/dist/tasks/component-pr.d.ts +162 -1
  791. package/dist/tasks/component-pr.d.ts.map +1 -1
  792. package/dist/tasks/component-pr.js +560 -59
  793. package/dist/tasks/component-pr.js.map +1 -1
  794. package/dist/tasks/done-record.d.ts +14 -1
  795. package/dist/tasks/done-record.d.ts.map +1 -1
  796. package/dist/tasks/done-record.js +37 -0
  797. package/dist/tasks/done-record.js.map +1 -1
  798. package/dist/tasks/duplicate-detector.d.ts +20 -1
  799. package/dist/tasks/duplicate-detector.d.ts.map +1 -1
  800. package/dist/tasks/duplicate-detector.js +10 -2
  801. package/dist/tasks/duplicate-detector.js.map +1 -1
  802. package/dist/tasks/engine-wrap-ops.d.ts +19 -10
  803. package/dist/tasks/engine-wrap-ops.d.ts.map +1 -1
  804. package/dist/tasks/engine-wrap-ops.js +38 -10
  805. package/dist/tasks/engine-wrap-ops.js.map +1 -1
  806. package/dist/tasks/evidence.d.ts.map +1 -1
  807. package/dist/tasks/evidence.js +14 -3
  808. package/dist/tasks/evidence.js.map +1 -1
  809. package/dist/tasks/graph-ops.d.ts +9 -2
  810. package/dist/tasks/graph-ops.d.ts.map +1 -1
  811. package/dist/tasks/graph-ops.js +24 -32
  812. package/dist/tasks/graph-ops.js.map +1 -1
  813. package/dist/tasks/plan.d.ts.map +1 -1
  814. package/dist/tasks/plan.js +16 -60
  815. package/dist/tasks/plan.js.map +1 -1
  816. package/dist/tasks/task-context.d.ts.map +1 -1
  817. package/dist/tasks/task-context.js +13 -0
  818. package/dist/tasks/task-context.js.map +1 -1
  819. package/dist/tasks/task-import.d.ts.map +1 -1
  820. package/dist/tasks/task-import.js +21 -12
  821. package/dist/tasks/task-import.js.map +1 -1
  822. package/dist/tasks/task-next.d.ts +25 -2
  823. package/dist/tasks/task-next.d.ts.map +1 -1
  824. package/dist/tasks/task-next.js +32 -13
  825. package/dist/tasks/task-next.js.map +1 -1
  826. package/dist/tasks/update.d.ts.map +1 -1
  827. package/dist/tasks/update.js +7 -5
  828. package/dist/tasks/update.js.map +1 -1
  829. package/dist/upgrade.d.ts +1 -1
  830. package/dist/upgrade.d.ts.map +1 -1
  831. package/dist/upgrade.js +48 -9
  832. package/dist/upgrade.js.map +1 -1
  833. package/dist/validation/compliance.d.ts +5 -1
  834. package/dist/validation/compliance.d.ts.map +1 -1
  835. package/dist/validation/compliance.js +24 -3
  836. package/dist/validation/compliance.js.map +1 -1
  837. package/dist/validation/doctor/checks.d.ts +20 -6
  838. package/dist/validation/doctor/checks.d.ts.map +1 -1
  839. package/dist/validation/doctor/checks.js +51 -8
  840. package/dist/validation/doctor/checks.js.map +1 -1
  841. package/dist/validation/index.d.ts +1 -1
  842. package/dist/validation/index.d.ts.map +1 -1
  843. package/dist/validation/index.js +1 -1
  844. package/dist/validation/index.js.map +1 -1
  845. package/dist/validation/protocol-common.d.ts +47 -2
  846. package/dist/validation/protocol-common.d.ts.map +1 -1
  847. package/dist/validation/protocol-common.js +86 -21
  848. package/dist/validation/protocol-common.js.map +1 -1
  849. package/dist/validation/validate-ops.d.ts.map +1 -1
  850. package/dist/validation/validate-ops.js +2 -3
  851. package/dist/validation/validate-ops.js.map +1 -1
  852. package/migrations/README.md +12 -0
  853. package/migrations/drizzle-cleo-global/20260929010000_t12512-registry-probed-opened/migration.sql +35 -0
  854. package/migrations/drizzle-cleo-global/20260929020000_t12721-git-state-head-committed-at/migration.sql +25 -0
  855. package/migrations/drizzle-cleo-project/20260928120000_t12341-row-uids/migration.sql +169 -0
  856. package/migrations/drizzle-cleo-project/20260929000000_t12535-docs-attachments-union-shape/migration.sql +21 -0
  857. package/migrations/drizzle-cleo-project/20260929120000_t12502-task-claim-leases/migration.sql +77 -0
  858. package/migrations/drizzle-cleo-project/20260929130000_t12736-claim-lease-iso-repair/migration.sql +37 -0
  859. package/migrations/sync-journal/20260929140000_t12342-sync-clock/migration.sql +42 -0
  860. package/package.json +23 -13
  861. package/schemas/project-info.schema.json +10 -4
  862. package/templates/CLEO-INJECTION.md +1 -1
  863. package/templates/CLEO-REFERENCE.md +7 -3
  864. package/templates/cleo-gitignore +11 -0
  865. package/templates/workflows/release-prepare.yml.tmpl +156 -10
@@ -45,13 +45,17 @@
45
45
  * | every other key (`schemaVersion`, `version`, `focus_state`, `focus_state:<session>`, `project_meta`, `project`, `parallel_state`, `activeSession`, `reconcile.<task>.release`, any unknown key) | none: the bare value |
46
46
  *
47
47
  * - **Initial collapse**, when the bare table holds at least one carried key:
48
- * every bare key is carried under the rules, and a key only the twin holds
49
- * is a frozen copy and is DROPPED (listed in the receipt, marker and log).
50
- * The exceptions are `task_id_sequence` and `sqlite_snapshot_gate` (a
51
- * counter must not move back) and the collapse keys. `file_meta` is dropped
52
- * only when the bare table lacks it; when both have it the field rule
53
- * applies. When the bare table holds no carried key (a fresh lineage, e.g.
54
- * after exodus landed legacy rows in the twin), nothing is dropped.
48
+ * every bare key is carried under the rules (the bare value wins every key
49
+ * both hold). A key only the twin holds is KEPT, never dropped (the union
50
+ * rule, T12535 audit 2026-09-29): it is listed as `kept` in the receipt and
51
+ * marker. When a key's twin value would be replaced by a different result,
52
+ * the twin value is copied to `twin_collapse_archive:<key>` in
53
+ * `tasks_schema_meta` (listed as `archived`; doctor shows it), so nothing
54
+ * unique is left only in the snapshot. `focus_state` merges instead: the
55
+ * bare value's current fields win and `sessionNotes` is the union of both,
56
+ * deduplicated by `(timestamp, note)` ({@link mergeFocusState}); its twin
57
+ * value is archived as well. The pre-collapse snapshot holds the store
58
+ * before any change and is pinned (never rotated).
55
59
  * - **Incremental re-merge**, per bare key whose hash changed since the last
56
60
  * merge:
57
61
  * - twin unchanged since the last merge → the bare value (counter fields
@@ -68,9 +72,13 @@
68
72
  * `sticky_tags` → `brain_sticky_tags` (rows are `(sticky_id, tag)`, both the
69
73
  * key, so a collision is two identical rows and one is kept):
70
74
  *
71
- * - Initial collapse, when the bare table has rows: the twin is made equal to
72
- * the bare set; frozen twin-only rows are dropped and listed. A bare tag whose
73
- * note no longer exists is not carried (`skipped`; it stays in the bare table).
75
+ * - Initial collapse: bare tags are added. A twin-only tag the note's
76
+ * `tags_json` names is kept (listed as `kept`). One it does not name leaves
77
+ * the junction (which follows `tags_json`, the value every reader displays)
78
+ * and is recorded under `twin_collapse_archive:sticky_tags` in
79
+ * `brain_schema_meta` (listed as `archived`); adding it to `tags_json` would
80
+ * change the tags the user sees. A bare tag whose note no longer exists is
81
+ * not carried (`skipped`; it stays in the bare table).
74
82
  * - Incremental re-merge, per sticky id whose bare tag-set hash changed: if
75
83
  * the twin's set for that id is unchanged since the last merge, the twin
76
84
  * set is made equal to the bare set (additions AND removals propagate);
@@ -82,12 +90,58 @@
82
90
  * tag filter can never disagree with the displayed tags. A conflict is still
83
91
  * recorded for `cleo doctor`.
84
92
  *
93
+ * `attachments` + `attachment_refs` → `docs_attachments` + `docs_attachment_refs`
94
+ * merge as ONE pair, in one transaction (a doc and its refs never diverge).
95
+ * The bare rows are authoritative over the columns both tables share, except
96
+ * `ref_count`, which is derived: after every merge it is recomputed as the
97
+ * number of refs in `docs_attachment_refs`, whoever wrote them (never carried,
98
+ * never max'd). Rows are keyed `d:<id>` and `r:<attachment_id, owner_type,
99
+ * owner_id>` in the marker hashes.
100
+ *
101
+ * - Initial collapse: the twins are made equal to the bare tables, even when
102
+ * the bare tables are empty (the older build never showed a twin-only row);
103
+ * frozen twin-only rows are dropped and listed.
104
+ * - Incremental re-merge, per bare doc whose hash moved (see {@link planDocs}):
105
+ * twin changed too → conflict, the twin wins; bare row gone → the twin row
106
+ * goes unless a ref or a supersedes link still names it (`kept`); the
107
+ * content (sha256) already belongs to another twin row → merged into that
108
+ * row: the bare id is aliased to it (`twin_collapse_alias:attachments`) and
109
+ * its refs follow; the slug already belongs to another twin row → carried
110
+ * under `<slug>-<n>` (`renamed`). Natural keys are checked against the state
111
+ * after the merge, so a merge never fails on them. Per bare ref whose hash
112
+ * moved: added → added (aliased), removed → removed unless this build
113
+ * changed it since.
114
+ * - Change detection: AFTER triggers on the bare tables (`t12535_track_*`)
115
+ * bump `twin_collapse_seq:attachments` on every write, the older build's
116
+ * included. An open compares that counter with the marker's instead of
117
+ * re-hashing every doc; a missing trigger falls back to the full compare.
118
+ * - Union shape: migration `20260929000000_t12535-docs-attachments-union-shape`
119
+ * adds the bare-only `display_alias` column and indexes; the UNIQUE slug and
120
+ * sha256 indexes are dropped and re-created by the merge itself around the
121
+ * row changes. Every merge ends with them in place, or rolls back.
122
+ * - The `supersedes` / `superseded_by` self-FKs are checked at commit
123
+ * (`PRAGMA defer_foreign_keys`), so a chain merges in any row order.
124
+ * - A bare row that violates a twin CHECK (e.g. a non-ISO `created_at`) fails
125
+ * the merge; the docs pair opens degraded (docs writes refused, everything
126
+ * else writable) and `cleo doctor twin-collapse` shows the cause.
127
+ * - Blobs: after each merge every twin doc's blob gets a keep-link (and is
128
+ * restored from it if the older build unlinked it), see `blob-keep.ts`.
129
+ * - Freeze (option (a), D11160): every merge installs BEFORE
130
+ * INSERT/UPDATE/DELETE triggers on the bare docs tables that abort an
131
+ * older build's write with the upgrade message ({@link docsFrozenMessage}).
132
+ * This build never writes them, so there is no bypass. Every open checks the freeze and change
133
+ * triggers and re-installs missing ones (a rebuild or restore drops them);
134
+ * `cleo doctor` reports them missing. The (b) defences above cover the time
135
+ * a freeze is missing.
136
+ *
85
137
  * ## Contract
86
138
  *
87
139
  * 1. **Snapshot first** (initial collapse only, only when the merge changes
88
140
  * the twin). The free space is checked before the `VACUUM INTO`. One
89
141
  * snapshot covers every pair collapsing in this open, registered as a
90
- * `migration` backup (`cleo backup list`, rotation).
142
+ * PINNED `migration` backup: `cleo backup list` shows it, rotation never
143
+ * deletes it, and a snapshot an earlier build wrote unpinned is pinned at
144
+ * the next open (`cleo doctor` lists an unpinned one).
91
145
  * 2. **Atomic.** Each pair merges, verifies and writes its marker in one
92
146
  * `BEGIN IMMEDIATE` transaction, the marker re-read under the write lock.
93
147
  * Any failure rolls back: both tables byte-identical.
@@ -125,6 +179,8 @@
125
179
  * @task T12535
126
180
  */
127
181
  import type { DatabaseSync } from 'node:sqlite';
182
+ import type { NodeSQLiteDatabase } from 'drizzle-orm/node-sqlite';
183
+ import { z } from 'zod';
128
184
  import { CleoError } from '../errors.js';
129
185
  /** Prefix of the marker key holding a pair's collapse state. */
130
186
  export declare const TWIN_COLLAPSE_MARKER_PREFIX = "twin_collapse:";
@@ -158,10 +214,22 @@ export interface TwinCollapseReceipt {
158
214
  readonly deleted: number;
159
215
  /** Bare rows not carried by rule (dead keys, tags of deleted notes). */
160
216
  readonly skipped: number;
161
- /** Frozen twin rows the initial collapse dropped (keys, or `sticky_id\ttag`). */
217
+ /** Twin rows the initial collapse dropped (none since the union rule; kept for old markers). */
162
218
  readonly dropped: readonly string[];
163
219
  /** Keys (or sticky ids) both builds changed since the last merge; the twin was kept. */
164
220
  readonly conflicts: readonly string[];
221
+ /** Docs: bare rows merged into the twin row holding the same content (`<bare id> -> <twin id>`). */
222
+ readonly merged: readonly string[];
223
+ /** Docs: rows carried under a free slug because another doc holds theirs. */
224
+ readonly renamed: readonly string[];
225
+ /**
226
+ * Rows kept by the union rule: twin-only keys / sticky tags the initial
227
+ * collapse carried over, and (docs) twin rows the bare side deleted that a
228
+ * ref or link still names.
229
+ */
230
+ readonly kept: readonly string[];
231
+ /** Keys whose replaced twin value was copied to `twin_collapse_archive:<key>`. */
232
+ readonly archived: readonly string[];
165
233
  }
166
234
  /**
167
235
  * The value a `schema_meta` key gets when the bare side is authoritative (the
@@ -206,6 +274,73 @@ export declare function mirrorCounterToBare(db: DatabaseSync, key: string): void
206
274
  * @task T12535
207
275
  */
208
276
  export declare function bareCounterOf(db: DatabaseSync, key: string): number;
277
+ /** Prefix of the key holding a twin value the initial collapse replaced. */
278
+ export declare const TWIN_COLLAPSE_ARCHIVE_PREFIX = "twin_collapse_archive:";
279
+ /**
280
+ * `focus_state` when both tables hold it: the bare value's current fields
281
+ * win, and the session-note history is the union of both
282
+ * (`sessionNotes`, deduplicated by `(timestamp, note)`, sorted by timestamp).
283
+ * The twin may hold months of notes the bare copy never saw (178 KB on the
284
+ * cleocode Linux store). A value that is not a JSON object stays the bare one
285
+ * (the replaced twin value is archived either way).
286
+ *
287
+ * @param bare - The bare value.
288
+ * @param twin - The twin value.
289
+ * @returns The merged value.
290
+ * @task T12535
291
+ */
292
+ export declare function mergeFocusState(bare: string, twin: string): string;
293
+ /** Key of the bare→twin id aliases (bare rows merged into a twin row by sha256). */
294
+ export declare const DOCS_ALIAS_KEY = "twin_collapse_alias:attachments";
295
+ /** Key the bare-side change triggers bump on every write to the bare docs tables. */
296
+ export declare const DOCS_CHANGE_SEQ_KEY = "twin_collapse_seq:attachments";
297
+ /**
298
+ * The message an older build's write to a frozen bare docs table aborts with.
299
+ * It names the release that moved the docs, what fails (docs, changesets, and
300
+ * the IVTR playbook provenance an older build attaches when a playbook run
301
+ * finalises), and the upgrade command.
302
+ *
303
+ * It must never read as contention or corruption to an older build: those
304
+ * retry on `sqlite_busy` / `database is locked` and restore backups on
305
+ * `database disk image is malformed`, so none of those words appear (pinned by
306
+ * a test, see {@link DOCS_FROZEN_FORBIDDEN}).
307
+ */
308
+ export declare function docsFrozenMessage(version: string | null): string;
309
+ /** Key recording the version of the build that first froze this store's bare docs tables. */
310
+ export declare const DOCS_FROZEN_BY_KEY = "twin_collapse_frozen_by:attachments";
311
+ /**
312
+ * The version the freeze message names: the first RELEASE build that froze
313
+ * (or later opened) this store, recorded under {@link DOCS_FROZEN_BY_KEY}.
314
+ *
315
+ * Why recorded, not a literal: the release that ships the freeze was not
316
+ * known when the code was written (2026.9.23 shipped without it). Why not the
317
+ * running build's version: a trigger outlives the build that wrote it, and a
318
+ * development build (a worktree, or the main checkout) reports the PREVIOUS
319
+ * release's version, which cannot read the store. So only a published build
320
+ * (running from an installed package, i.e. under `node_modules`) records its
321
+ * version, and never the unreadable `0.0.0` fallback. Until one does, the
322
+ * message names no version and points at `@latest`; the first release build
323
+ * to open the store records itself and the triggers are re-written.
324
+ *
325
+ * @param db - The project `cleo.db` connection.
326
+ * @returns The version to name, or `null` (no release build has frozen or
327
+ * opened this store yet).
328
+ * @task T12535
329
+ */
330
+ export declare function docsFrozenVersion(db: DatabaseSync): string | null;
331
+ /**
332
+ * Test only: make this process count as a published build with `version`
333
+ * (or restore the real detection with `undefined`).
334
+ *
335
+ * @param override - The build to pretend to be.
336
+ * @task T12535
337
+ */
338
+ export declare function setFreezeBuildForTests(override: {
339
+ published: boolean;
340
+ version: string;
341
+ } | undefined): void;
342
+ /** Phrases the freeze message must never contain (older builds' retry and recovery matchers). */
343
+ export declare const DOCS_FROZEN_FORBIDDEN: readonly string[];
209
344
  /** Why a collapse failed, as carried by `E_TWIN_COLLAPSE_FAILED`. */
210
345
  export interface TwinCollapseFailure {
211
346
  /** The bare tables whose collapse did not complete. */
@@ -233,18 +368,24 @@ export interface TwinCollapseFailure {
233
368
  */
234
369
  export declare function twinCollapseFailureOf(db: DatabaseSync): TwinCollapseFailure | undefined;
235
370
  /**
236
- * Refuse a write before its first statement when the store is degraded by a
237
- * failed twin collapse. The write accessors of the collapsed tables
238
- * (`tasks_schema_meta`, and sticky notes and tags) call it at entry, so a
239
- * degraded store never takes a partial write (e.g. a sticky's `tags_json`
240
- * without its tag rows). The shadows' TEMP triggers stay as the backstop.
241
- *
242
- * @param handle - The connection the write would use (a `DatabaseSync`, or a
243
- * drizzle instance's `$client`); anything else is not checked.
244
- * @throws {CleoError} `E_TWIN_COLLAPSE_FAILED` when the connection is degraded.
371
+ * Refuse a write before its first statement when the collapse of the table it
372
+ * writes failed. The write accessors of the collapsed tables
373
+ * (`tasks_schema_meta`, sticky notes and tags, the docs tables) call it at
374
+ * entry, so a degraded store never takes a partial write (e.g. a sticky's
375
+ * `tags_json` without its tag rows). Only the failed pairs are blocked: a
376
+ * docs merge failure leaves task and sticky writes alone. The shadows' TEMP
377
+ * triggers stay as the backstop.
378
+ *
379
+ * @param handle - The connection the write would use: the native
380
+ * `DatabaseSync`, or a drizzle instance (its `$client` is checked).
381
+ * `null`/`undefined` (no bound handle) is not checked.
382
+ * @param table - The bare table whose pair the write belongs to.
383
+ * @throws {CleoError} `E_TWIN_COLLAPSE_FAILED` when that pair's collapse failed.
245
384
  * @task T12535
246
385
  */
247
- export declare function assertTwinCollapseWritable(handle: unknown): void;
386
+ export declare function assertTwinCollapseWritable(handle: DatabaseSync | NodeSQLiteDatabase | null | undefined, table: TwinCollapseTable): void;
387
+ /** The bare tables a failed collapse can block writes for. */
388
+ export type TwinCollapseTable = 'schema_meta' | 'sticky_tags' | 'attachments';
248
389
  /**
249
390
  * Build the `E_TWIN_COLLAPSE_FAILED` error for a failure.
250
391
  *
@@ -306,6 +447,30 @@ export interface TwinCollapseStatus {
306
447
  readonly conflicts: readonly string[];
307
448
  /** When those conflicts were recorded. */
308
449
  readonly conflictsAt: string | null;
450
+ /** Docs: bare rows the last merge folded into the twin row with the same content. */
451
+ readonly merged: readonly string[];
452
+ /** Docs: rows the last merge carried under a free slug. */
453
+ readonly renamed: readonly string[];
454
+ /** Twin-only rows the initial collapse carried over (union rule). */
455
+ readonly kept: readonly string[];
456
+ /** Keys whose replaced twin value is archived under `twin_collapse_archive:<key>`. */
457
+ readonly archived: readonly string[];
458
+ /**
459
+ * Whether the pair's triggers on the bare tables (the freeze against older
460
+ * builds, the change counter) are all in place; `null` when the pair has
461
+ * none or is not collapsed yet. Missing ones are re-installed at the next open.
462
+ */
463
+ readonly guardsIntact: boolean | null;
464
+ /**
465
+ * Whether the collapse snapshot is pinned (never rotated); `null` when there
466
+ * is no snapshot on disk.
467
+ */
468
+ readonly snapshotPinned: boolean | null;
469
+ /**
470
+ * `true` when the marker names a pre-collapse snapshot that is no longer on
471
+ * disk: the only copy of the store before the collapse is gone.
472
+ */
473
+ readonly snapshotMissing: boolean;
309
474
  /** The recorded failure, when the last attempt failed. */
310
475
  readonly failure: TwinCollapseFailure | null;
311
476
  }
@@ -317,4 +482,267 @@ export interface TwinCollapseStatus {
317
482
  * @task T12535
318
483
  */
319
484
  export declare function inspectTwinCollapse(db: DatabaseSync): TwinCollapseStatus[];
485
+ /** Prefix of a recovery receipt key: `twin_collapse_recovery:<recoveredAt>`. */
486
+ export declare const TWIN_COLLAPSE_RECOVERY_PREFIX = "twin_collapse_recovery:";
487
+ /** Error code of a recovery or rollback that cannot proceed; nothing was written. */
488
+ export declare const E_TWIN_COLLAPSE_RECOVER = "E_TWIN_COLLAPSE_RECOVER";
489
+ /** One twin value the recovery archives. */
490
+ export interface TwinCollapseRecoveryArchive {
491
+ /** The `schema_meta` key. */
492
+ readonly key: string;
493
+ /** Where the value is written (`twin_collapse_archive:<key>`, or a suffixed key). */
494
+ readonly archiveKey: string;
495
+ /** `dropped`: only the twin held the key; `replaced`: the bare value won it. */
496
+ readonly reason: 'dropped' | 'replaced';
497
+ /** Length of the archived value, in characters. */
498
+ readonly length: number;
499
+ }
500
+ /** What {@link planTwinCollapseRecovery} found, and what an apply would write. */
501
+ export interface TwinCollapseRecoveryPlan {
502
+ /** The pre-collapse snapshot the `schema_meta` marker records; `null`: never collapsed. */
503
+ readonly snapshot: string | null;
504
+ /** Whether that snapshot is on disk. */
505
+ readonly snapshotExists: boolean;
506
+ /**
507
+ * Whether that snapshot is pinned (its sidecar says `pinned: true`), so
508
+ * rotation never deletes it. An apply refuses an unpinned snapshot unless
509
+ * the caller pins it first (`--pin-snapshot`).
510
+ */
511
+ readonly snapshotPinned: boolean;
512
+ /** Twin `schema_meta` values to archive. */
513
+ readonly archive: readonly TwinCollapseRecoveryArchive[];
514
+ /** Session notes the live `focus_state` gains from the twin history. */
515
+ readonly focusNotesAdded: number;
516
+ /** Twin-only sticky tags (`sticky_id\ttag`) to archive. */
517
+ readonly stickyArchived: readonly string[];
518
+ /** Where those tags go: `twin_collapse_archive:sticky_tags`, or a suffixed key. */
519
+ readonly stickyArchiveKey: string;
520
+ /** Receipt keys of earlier applies that were not rolled back. */
521
+ readonly receipts: readonly string[];
522
+ /** Whether an apply would write anything. */
523
+ readonly changes: boolean;
524
+ /**
525
+ * The path the markers record, when the store moved (`/mnt` → `/home`,
526
+ * Linux → Mac) and the snapshot was found by file name in the store's own
527
+ * backup directory instead (T12788); `null` otherwise. An apply re-points
528
+ * the markers at {@link snapshot}.
529
+ */
530
+ readonly movedFrom: string | null;
531
+ }
532
+ /** Options of {@link planTwinCollapseRecovery}. */
533
+ export interface TwinCollapseRecoveryPlanOptions {
534
+ /** The snapshot file to use in place of the markers' path (a moved store, T12788). */
535
+ readonly snapshotPath?: string;
536
+ }
537
+ declare const RecoveryReceiptShape: z.ZodObject<{
538
+ task: z.ZodLiteral<"T12727">;
539
+ id: z.ZodString;
540
+ recoveredAt: z.ZodString;
541
+ snapshot: z.ZodNullable<z.ZodString>;
542
+ archived: z.ZodArray<z.ZodObject<{
543
+ key: z.ZodString;
544
+ archiveKey: z.ZodString;
545
+ sha: z.ZodString;
546
+ }, z.core.$strip>>;
547
+ focusNotesAdded: z.ZodNumber;
548
+ stickyArchived: z.ZodArray<z.ZodString>;
549
+ stickyArchiveKey: z.ZodString;
550
+ before: z.ZodObject<{
551
+ focusState: z.ZodNullable<z.ZodString>;
552
+ stickyArchive: z.ZodNullable<z.ZodString>;
553
+ }, z.core.$strip>;
554
+ after: z.ZodObject<{
555
+ focusState: z.ZodNullable<z.ZodString>;
556
+ stickyArchive: z.ZodNullable<z.ZodString>;
557
+ }, z.core.$strip>;
558
+ rolledBackAt: z.ZodNullable<z.ZodString>;
559
+ }, z.core.$strip>;
560
+ /**
561
+ * Receipt an apply records under `twin_collapse_recovery:<recoveredAt>`
562
+ * (never over an earlier one). `before` holds the values the apply replaced,
563
+ * `after` the sha256 of what it wrote, so `--rollback` can undo it.
564
+ */
565
+ export type TwinCollapseRecoveryReceipt = z.infer<typeof RecoveryReceiptShape>;
566
+ /**
567
+ * Plan the recovery of the twin values a 2026.9.21 collapse dropped or
568
+ * replaced, from the pre-collapse snapshot its marker records (T12727).
569
+ *
570
+ * The 9.21 initial collapse was bare-authoritative: it deleted keys and
571
+ * sticky tags only the twin held and overwrote twin values with the bare
572
+ * ones, keeping them only in that snapshot. This compares the snapshot's
573
+ * twin and bare tables (read-only; a pair whose table the snapshot lacks is
574
+ * skipped) and plans, for every twin value that is not live and not archived:
575
+ * - `schema_meta`: the twin value is written to `twin_collapse_archive:<key>`
576
+ * (a suffixed key when that name already holds another value, so nothing is
577
+ * overwritten); for `focus_state` the twin's session notes are also merged
578
+ * into the live value ({@link mergeFocusState}: live current fields win,
579
+ * notes deduplicated by `(timestamp, note)` and sorted);
580
+ * - `sticky_tags`: twin-only tags are added to
581
+ * `twin_collapse_archive:sticky_tags` in `brain_schema_meta` (a suffixed key
582
+ * when that row is not a list of tags).
583
+ * The notes are merged once: not again after an apply that was not rolled
584
+ * back, nor when the twin value is already archived, so notes pruned after a
585
+ * recovery stay pruned. A second apply plans nothing.
586
+ *
587
+ * @param live - The project `cleo.db` connection (read-only is enough).
588
+ * @param snapshot - The snapshot, opened read-only, or `null` when missing.
589
+ * @returns The plan.
590
+ * @task T12727
591
+ */
592
+ export declare function planTwinCollapseRecovery(live: DatabaseSync, snapshot: DatabaseSync | null, options?: TwinCollapseRecoveryPlanOptions): TwinCollapseRecoveryPlan;
593
+ /**
594
+ * Apply a recovery in one `BEGIN IMMEDIATE` transaction on the live store.
595
+ *
596
+ * The plan is recomputed INSIDE the transaction from the live values read
597
+ * under the write lock, so a note written after `plan` was built is merged,
598
+ * never lost; `plan` is the preview the caller showed. Writes the archive
599
+ * keys, the merged `focus_state`, the sticky archive, and a new receipt.
600
+ * Nothing is written when there is nothing to recover. Never touches the
601
+ * snapshot.
602
+ *
603
+ * @param live - The project `cleo.db` connection, outside a transaction.
604
+ * @param plan - From {@link planTwinCollapseRecovery} on the same connection.
605
+ * @returns The plan applied and its receipt (`null` when nothing was written).
606
+ * @throws {CleoError} {@link E_TWIN_COLLAPSE_RECOVER} when the recorded
607
+ * snapshot is missing (nothing is written).
608
+ * @task T12727
609
+ */
610
+ export declare function applyTwinCollapseRecovery(live: DatabaseSync, plan: TwinCollapseRecoveryPlan, onRepoint?: (repoint: TwinCollapseSnapshotRepoint) => void): {
611
+ readonly plan: TwinCollapseRecoveryPlan;
612
+ readonly receipt: TwinCollapseRecoveryReceipt | null;
613
+ readonly repointed: TwinCollapseSnapshotRepoint | null;
614
+ };
615
+ /** Markers re-pointed from a moved store's old snapshot path (T12788). */
616
+ export interface TwinCollapseSnapshotRepoint {
617
+ /** The path the markers recorded. */
618
+ readonly from: string;
619
+ /** The file in the store's own backup directory they name now. */
620
+ readonly to: string;
621
+ /** The marker keys rewritten (`<kvTable>:twin_collapse:<table>`). */
622
+ readonly markers: readonly string[];
623
+ }
624
+ /** The error for a recorded snapshot that is not on disk. */
625
+ export declare function missingSnapshot(path: string | null): CleoError;
626
+ /** The error for a recorded snapshot rotation could still delete. */
627
+ export declare function unpinnedSnapshot(path: string | null): CleoError;
628
+ /**
629
+ * Pin the recorded pre-collapse snapshot before a recovery
630
+ * (`--pin-snapshot`): writes its `.meta.json` sidecar only, never the snapshot.
631
+ *
632
+ * @param path - The snapshot the marker records.
633
+ * @returns Whether it is pinned now.
634
+ * @task T12727
635
+ */
636
+ export declare function pinRecoverySnapshot(path: string): boolean;
637
+ /** What {@link rollbackTwinCollapseRecovery} undid. */
638
+ export interface TwinCollapseRecoveryRollback {
639
+ /** The receipt key. */
640
+ readonly id: string;
641
+ /** Archive keys deleted (they still held what the recovery wrote). */
642
+ readonly archiveDeleted: readonly string[];
643
+ /** Archive keys left alone (changed since; not the recovery's value any more). */
644
+ readonly archiveKept: readonly string[];
645
+ /**
646
+ * `restored`: `focus_state` was unchanged since, so the pre-merge value is
647
+ * back; `notes-removed`: it changed since, so only the notes the recovery
648
+ * added were removed; `none`: the recovery did not touch it.
649
+ */
650
+ readonly focusState: 'restored' | 'notes-removed' | 'none';
651
+ /** Session notes removed from `focus_state`. */
652
+ readonly notesRemoved: number;
653
+ /** Sticky rows removed from the sticky archive. */
654
+ readonly stickyRemoved: number;
655
+ }
656
+ /**
657
+ * Undo one recovery apply (`cleo doctor twin-collapse --rollback <id>`), in
658
+ * one `BEGIN IMMEDIATE` transaction:
659
+ * - archive keys it wrote are deleted when they still hold that value;
660
+ * - `focus_state` is restored to its pre-merge value when unchanged since,
661
+ * else only the notes the recovery added are removed (notes written since
662
+ * stay);
663
+ * - the sticky archive is restored when unchanged since, else only the rows
664
+ * the recovery added are removed;
665
+ * - the receipt is kept, stamped `rolledBackAt`.
666
+ *
667
+ * @param live - The project `cleo.db` connection, outside a transaction.
668
+ * @param id - The receipt key (`twin_collapse_recovery:<recoveredAt>`).
669
+ * @returns What was undone.
670
+ * @throws {CleoError} {@link E_TWIN_COLLAPSE_RECOVER} when the receipt is
671
+ * unknown or already rolled back (nothing is written).
672
+ * @task T12727
673
+ */
674
+ export declare function rollbackTwinCollapseRecovery(live: DatabaseSync, id: string): TwinCollapseRecoveryRollback;
675
+ /** Error code of a snapshot release that cannot proceed; nothing was written. */
676
+ export declare const E_TWIN_COLLAPSE_RELEASE = "E_TWIN_COLLAPSE_RELEASE";
677
+ /** What {@link planSnapshotRelease} found for one pre-collapse snapshot. */
678
+ export interface TwinCollapseSnapshotReleasePlan {
679
+ /** The snapshot path the markers record, or `null` when none matches. */
680
+ readonly snapshot: string | null;
681
+ /** Marker keys that reference it (`<kvTable>:twin_collapse:<table>`). */
682
+ readonly markers: readonly string[];
683
+ /** Whether the snapshot is on disk. */
684
+ readonly exists: boolean;
685
+ /** Bytes reclaimed once it rotates (the file plus any `-wal`/`-shm`). */
686
+ readonly bytes: number;
687
+ /**
688
+ * `recovered`: a recovery apply (not rolled back) read this snapshot and
689
+ * nothing is left to recover; `no-recovery-needed`: it holds nothing the
690
+ * live store lacks; `null`: not releasable (see `blockers`).
691
+ */
692
+ readonly basis: 'recovered' | 'no-recovery-needed' | null;
693
+ /** Recovery receipts (not rolled back) that read this snapshot. */
694
+ readonly receipts: readonly string[];
695
+ /** Why it cannot be released; empty when it can. */
696
+ readonly blockers: readonly string[];
697
+ /** The path the markers record when the store moved and {@link snapshot} is the local file (T12788). */
698
+ readonly movedFrom: string | null;
699
+ }
700
+ /**
701
+ * Plan releasing a pre-collapse snapshot (T12767): which markers reference
702
+ * it, how many bytes it holds, and whether it may be released. It may only
703
+ * after a verified recovery or a no-recovery-needed check: the recovery plan
704
+ * against it ({@link planTwinCollapseRecovery}) must find nothing left to
705
+ * recover, and only the `schema_meta` / `sticky_tags` markers (the pairs the
706
+ * recovery covers) may reference it.
707
+ *
708
+ * @param live - The project `cleo.db` connection (read-only is enough).
709
+ * @param id - The snapshot: its backup id (`migration-<timestamp>`), file name or path.
710
+ * @param snapshot - The snapshot opened read-only, or `null` when it is not on disk.
711
+ * @returns The plan.
712
+ * @task T12767
713
+ */
714
+ export declare function planSnapshotRelease(live: DatabaseSync, id: string, snapshot: DatabaseSync | null, options?: TwinCollapseRecoveryPlanOptions): TwinCollapseSnapshotReleasePlan;
715
+ /** The release refusal for a plan with blockers. */
716
+ export declare function releaseRefused(id: string, plan: TwinCollapseSnapshotReleasePlan): CleoError;
717
+ /** What {@link releaseTwinCollapseSnapshot} did. */
718
+ export interface TwinCollapseSnapshotRelease {
719
+ readonly snapshot: string;
720
+ /** Marker keys whose snapshot reference was cleared. */
721
+ readonly markers: readonly string[];
722
+ readonly basis: 'recovered' | 'no-recovery-needed';
723
+ readonly bytes: number;
724
+ readonly releasedAt: string;
725
+ /** The path the markers recorded, when the store moved (T12788); `null` otherwise. */
726
+ readonly movedFrom: string | null;
727
+ }
728
+ /**
729
+ * Release a pre-collapse snapshot, in one `BEGIN IMMEDIATE` transaction: the
730
+ * plan is re-checked under the write lock, each referencing marker's
731
+ * `snapshot` is cleared (so an open no longer pins it and rotation no longer
732
+ * keeps it), its sidecar pin is released, and `audit` records the release
733
+ * before the commit (a failed audit write refuses it). The snapshot file is
734
+ * never touched; it rotates normally from then on.
735
+ *
736
+ * @param live - The project `cleo.db` connection, outside a transaction.
737
+ * @param id - The snapshot: backup id, file name or path.
738
+ * @param snapshot - The snapshot opened read-only, or `null`.
739
+ * @param audit - Appends the audit row; throws to refuse.
740
+ * @returns What was released.
741
+ * @throws {CleoError} {@link E_TWIN_COLLAPSE_RELEASE} when it may not be released.
742
+ * @task T12767
743
+ */
744
+ export declare function releaseTwinCollapseSnapshot(live: DatabaseSync, id: string, snapshot: DatabaseSync | null, audit: (release: TwinCollapseSnapshotRelease & {
745
+ receipts: readonly string[];
746
+ }) => void, options?: TwinCollapseRecoveryPlanOptions): TwinCollapseSnapshotRelease;
747
+ export {};
320
748
  //# sourceMappingURL=twin-collapse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"twin-collapse.d.ts","sourceRoot":"","sources":["../../src/store/twin-collapse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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