@cleocode/core 2026.9.20 → 2026.9.21

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 (855) hide show
  1. package/dist/adapters/discovery.d.ts.map +1 -1
  2. package/dist/adapters/discovery.js +3 -10
  3. package/dist/adapters/discovery.js.map +1 -1
  4. package/dist/adrs/link-pipeline.js +2 -2
  5. package/dist/adrs/link-pipeline.js.map +1 -1
  6. package/dist/adrs/parse.js +3 -3
  7. package/dist/adrs/parse.js.map +1 -1
  8. package/dist/agents/invoke-meta-agent.d.ts.map +1 -1
  9. package/dist/agents/invoke-meta-agent.js +8 -4
  10. package/dist/agents/invoke-meta-agent.js.map +1 -1
  11. package/dist/bootstrap.d.ts +5 -1
  12. package/dist/bootstrap.d.ts.map +1 -1
  13. package/dist/bootstrap.js +41 -21
  14. package/dist/bootstrap.js.map +1 -1
  15. package/dist/cloud/crypto.d.ts +47 -0
  16. package/dist/cloud/crypto.d.ts.map +1 -0
  17. package/dist/cloud/crypto.js +223 -0
  18. package/dist/cloud/crypto.js.map +1 -0
  19. package/dist/cloud/http.d.ts +52 -0
  20. package/dist/cloud/http.d.ts.map +1 -0
  21. package/dist/cloud/http.js +98 -0
  22. package/dist/cloud/http.js.map +1 -0
  23. package/dist/cloud/index.d.ts +19 -0
  24. package/dist/cloud/index.d.ts.map +1 -0
  25. package/dist/cloud/index.js +19 -0
  26. package/dist/cloud/index.js.map +1 -0
  27. package/dist/cloud/journal.d.ts +169 -0
  28. package/dist/cloud/journal.d.ts.map +1 -0
  29. package/dist/cloud/journal.js +428 -0
  30. package/dist/cloud/journal.js.map +1 -0
  31. package/dist/cloud/keys.d.ts +213 -0
  32. package/dist/cloud/keys.d.ts.map +1 -0
  33. package/dist/cloud/keys.js +362 -0
  34. package/dist/cloud/keys.js.map +1 -0
  35. package/dist/cloud/manifest-check.d.ts +36 -0
  36. package/dist/cloud/manifest-check.d.ts.map +1 -0
  37. package/dist/cloud/manifest-check.js +70 -0
  38. package/dist/cloud/manifest-check.js.map +1 -0
  39. package/dist/cloud/projects.d.ts +13 -0
  40. package/dist/cloud/projects.d.ts.map +1 -0
  41. package/dist/cloud/projects.js +11 -0
  42. package/dist/cloud/projects.js.map +1 -0
  43. package/dist/cloud/signing.d.ts +105 -0
  44. package/dist/cloud/signing.d.ts.map +1 -0
  45. package/dist/cloud/signing.js +117 -0
  46. package/dist/cloud/signing.js.map +1 -0
  47. package/dist/cloud/streams.d.ts +6 -0
  48. package/dist/cloud/streams.d.ts.map +1 -0
  49. package/dist/cloud/streams.js +5 -0
  50. package/dist/cloud/streams.js.map +1 -0
  51. package/dist/decide/audit.d.ts +131 -0
  52. package/dist/decide/audit.d.ts.map +1 -0
  53. package/dist/decide/audit.js +98 -0
  54. package/dist/decide/audit.js.map +1 -0
  55. package/dist/decide/budget.d.ts +91 -0
  56. package/dist/decide/budget.d.ts.map +1 -0
  57. package/dist/decide/budget.js +194 -0
  58. package/dist/decide/budget.js.map +1 -0
  59. package/dist/decide/cache.d.ts +49 -0
  60. package/dist/decide/cache.d.ts.map +1 -0
  61. package/dist/decide/cache.js +87 -0
  62. package/dist/decide/cache.js.map +1 -0
  63. package/dist/decide/client.d.ts +103 -0
  64. package/dist/decide/client.d.ts.map +1 -0
  65. package/dist/decide/client.js +262 -0
  66. package/dist/decide/client.js.map +1 -0
  67. package/dist/decide/credentials.d.ts +159 -0
  68. package/dist/decide/credentials.d.ts.map +1 -0
  69. package/dist/decide/credentials.js +383 -0
  70. package/dist/decide/credentials.js.map +1 -0
  71. package/dist/decide/index.d.ts +18 -0
  72. package/dist/decide/index.d.ts.map +1 -0
  73. package/dist/decide/index.js +18 -0
  74. package/dist/decide/index.js.map +1 -0
  75. package/dist/decide/jev-wire.d.ts +155 -0
  76. package/dist/decide/jev-wire.d.ts.map +1 -0
  77. package/dist/decide/jev-wire.js +420 -0
  78. package/dist/decide/jev-wire.js.map +1 -0
  79. package/dist/decide/operations.d.ts +152 -0
  80. package/dist/decide/operations.d.ts.map +1 -0
  81. package/dist/decide/operations.js +199 -0
  82. package/dist/decide/operations.js.map +1 -0
  83. package/dist/decide/provider.d.ts +90 -0
  84. package/dist/decide/provider.d.ts.map +1 -0
  85. package/dist/decide/provider.js +43 -0
  86. package/dist/decide/provider.js.map +1 -0
  87. package/dist/decide/site.d.ts +148 -0
  88. package/dist/decide/site.d.ts.map +1 -0
  89. package/dist/decide/site.js +181 -0
  90. package/dist/decide/site.js.map +1 -0
  91. package/dist/decide/transport.d.ts +67 -0
  92. package/dist/decide/transport.d.ts.map +1 -0
  93. package/dist/decide/transport.js +350 -0
  94. package/dist/decide/transport.js.map +1 -0
  95. package/dist/docs/export-document.js +5908 -2436
  96. package/dist/docs/export-document.js.map +3 -3
  97. package/dist/docs/index.d.ts +2 -2
  98. package/dist/docs/index.d.ts.map +1 -1
  99. package/dist/docs/index.js +1 -1
  100. package/dist/docs/index.js.map +1 -1
  101. package/dist/docs/projection.d.ts.map +1 -1
  102. package/dist/docs/projection.js +2 -3
  103. package/dist/docs/projection.js.map +1 -1
  104. package/dist/docs/publish-pr.d.ts +69 -1
  105. package/dist/docs/publish-pr.d.ts.map +1 -1
  106. package/dist/docs/publish-pr.js +112 -10
  107. package/dist/docs/publish-pr.js.map +1 -1
  108. package/dist/doctor/db-substrate.d.ts +13 -8
  109. package/dist/doctor/db-substrate.d.ts.map +1 -1
  110. package/dist/doctor/db-substrate.js +39 -26
  111. package/dist/doctor/db-substrate.js.map +1 -1
  112. package/dist/doctor/index.d.ts +2 -0
  113. package/dist/doctor/index.d.ts.map +1 -1
  114. package/dist/doctor/index.js +1 -0
  115. package/dist/doctor/index.js.map +1 -1
  116. package/dist/doctor/knowledge.d.ts.map +1 -1
  117. package/dist/doctor/knowledge.js +5 -15
  118. package/dist/doctor/knowledge.js.map +1 -1
  119. package/dist/doctor/nexus-schema-residency.d.ts +1 -1
  120. package/dist/doctor/nexus-schema-residency.d.ts.map +1 -1
  121. package/dist/doctor/nexus-schema-residency.js +3 -0
  122. package/dist/doctor/nexus-schema-residency.js.map +1 -1
  123. package/dist/doctor/project-identity.d.ts +44 -1
  124. package/dist/doctor/project-identity.d.ts.map +1 -1
  125. package/dist/doctor/project-identity.js +237 -10
  126. package/dist/doctor/project-identity.js.map +1 -1
  127. package/dist/doctor/projects.d.ts +170 -0
  128. package/dist/doctor/projects.d.ts.map +1 -0
  129. package/dist/doctor/projects.js +1075 -0
  130. package/dist/doctor/projects.js.map +1 -0
  131. package/dist/doctor/twin-collapse.d.ts +97 -0
  132. package/dist/doctor/twin-collapse.d.ts.map +1 -0
  133. package/dist/doctor/twin-collapse.js +168 -0
  134. package/dist/doctor/twin-collapse.js.map +1 -0
  135. package/dist/doctor/worktree-orphans.d.ts.map +1 -1
  136. package/dist/doctor/worktree-orphans.js +13 -29
  137. package/dist/doctor/worktree-orphans.js.map +1 -1
  138. package/dist/doctor/worktree-stores.d.ts +128 -0
  139. package/dist/doctor/worktree-stores.d.ts.map +1 -0
  140. package/dist/doctor/worktree-stores.js +374 -0
  141. package/dist/doctor/worktree-stores.js.map +1 -0
  142. package/dist/error-catalog.d.ts.map +1 -1
  143. package/dist/error-catalog.js +21 -0
  144. package/dist/error-catalog.js.map +1 -1
  145. package/dist/error-registry.d.ts.map +1 -1
  146. package/dist/error-registry.js +40 -0
  147. package/dist/error-registry.js.map +1 -1
  148. package/dist/gc/cleanup.d.ts.map +1 -1
  149. package/dist/gc/cleanup.js +32 -19
  150. package/dist/gc/cleanup.js.map +1 -1
  151. package/dist/git/bounded-git.d.ts +170 -0
  152. package/dist/git/bounded-git.d.ts.map +1 -0
  153. package/dist/git/bounded-git.js +371 -0
  154. package/dist/git/bounded-git.js.map +1 -0
  155. package/dist/git/work-tree.d.ts +20 -0
  156. package/dist/git/work-tree.d.ts.map +1 -1
  157. package/dist/git/work-tree.js +20 -2
  158. package/dist/git/work-tree.js.map +1 -1
  159. package/dist/hooks/handlers/session-hooks.d.ts +11 -26
  160. package/dist/hooks/handlers/session-hooks.d.ts.map +1 -1
  161. package/dist/hooks/handlers/session-hooks.js +18 -47
  162. package/dist/hooks/handlers/session-hooks.js.map +1 -1
  163. package/dist/hooks/payload-schemas.d.ts +2 -2
  164. package/dist/index.d.ts +6 -5
  165. package/dist/index.d.ts.map +1 -1
  166. package/dist/index.js +5 -3
  167. package/dist/index.js.map +1 -1
  168. package/dist/init/engine-ops.d.ts.map +1 -1
  169. package/dist/init/engine-ops.js +23 -1
  170. package/dist/init/engine-ops.js.map +1 -1
  171. package/dist/init.d.ts +158 -1
  172. package/dist/init.d.ts.map +1 -1
  173. package/dist/init.js +527 -42
  174. package/dist/init.js.map +1 -1
  175. package/dist/injection.d.ts +55 -0
  176. package/dist/injection.d.ts.map +1 -1
  177. package/dist/injection.js +102 -6
  178. package/dist/injection.js.map +1 -1
  179. package/dist/internal.d.ts +9 -5
  180. package/dist/internal.d.ts.map +1 -1
  181. package/dist/internal.js +8 -4
  182. package/dist/internal.js.map +1 -1
  183. package/dist/issue/diagnostics.d.ts.map +1 -1
  184. package/dist/issue/diagnostics.js +2 -1
  185. package/dist/issue/diagnostics.js.map +1 -1
  186. package/dist/lib/concurrency.d.ts +25 -0
  187. package/dist/lib/concurrency.d.ts.map +1 -0
  188. package/dist/lib/concurrency.js +43 -0
  189. package/dist/lib/concurrency.js.map +1 -0
  190. package/dist/lib/index.d.ts +1 -0
  191. package/dist/lib/index.d.ts.map +1 -1
  192. package/dist/lib/index.js +1 -0
  193. package/dist/lib/index.js.map +1 -1
  194. package/dist/lifecycle/engine-ops.d.ts.map +1 -1
  195. package/dist/lifecycle/engine-ops.js +4 -2
  196. package/dist/lifecycle/engine-ops.js.map +1 -1
  197. package/dist/lifecycle/stage-guidance.d.ts +5 -0
  198. package/dist/lifecycle/stage-guidance.d.ts.map +1 -1
  199. package/dist/lifecycle/stage-guidance.js +14 -4
  200. package/dist/lifecycle/stage-guidance.js.map +1 -1
  201. package/dist/llm/catalog-cache.d.ts +3 -2
  202. package/dist/llm/catalog-cache.d.ts.map +1 -1
  203. package/dist/llm/catalog-cache.js +5 -5
  204. package/dist/llm/catalog-cache.js.map +1 -1
  205. package/dist/llm/credentials.d.ts +4 -4
  206. package/dist/llm/credentials.js +6 -6
  207. package/dist/llm/credentials.js.map +1 -1
  208. package/dist/llm/plugin-facade.js +4312 -1798
  209. package/dist/llm/plugin-facade.js.map +3 -3
  210. package/dist/llm/stable-device-id.d.ts.map +1 -1
  211. package/dist/llm/stable-device-id.js +3 -5
  212. package/dist/llm/stable-device-id.js.map +1 -1
  213. package/dist/memory/attention.d.ts.map +1 -1
  214. package/dist/memory/attention.js +30 -30
  215. package/dist/memory/attention.js.map +1 -1
  216. package/dist/memory/decision-contradiction.d.ts +152 -0
  217. package/dist/memory/decision-contradiction.d.ts.map +1 -0
  218. package/dist/memory/decision-contradiction.js +273 -0
  219. package/dist/memory/decision-contradiction.js.map +1 -0
  220. package/dist/memory/decisions.d.ts +42 -11
  221. package/dist/memory/decisions.d.ts.map +1 -1
  222. package/dist/memory/decisions.js +153 -56
  223. package/dist/memory/decisions.js.map +1 -1
  224. package/dist/memory/dialectic-evaluator.d.ts +7 -0
  225. package/dist/memory/dialectic-evaluator.d.ts.map +1 -1
  226. package/dist/memory/dialectic-evaluator.js +23 -8
  227. package/dist/memory/dialectic-evaluator.js.map +1 -1
  228. package/dist/memory/dispatch-trace-format.d.ts +39 -0
  229. package/dist/memory/dispatch-trace-format.d.ts.map +1 -0
  230. package/dist/memory/dispatch-trace-format.js +54 -0
  231. package/dist/memory/dispatch-trace-format.js.map +1 -0
  232. package/dist/memory/dispatch-trace.d.ts.map +1 -1
  233. package/dist/memory/dispatch-trace.js +1 -27
  234. package/dist/memory/dispatch-trace.js.map +1 -1
  235. package/dist/memory/engine-compat.d.ts +2 -0
  236. package/dist/memory/engine-compat.d.ts.map +1 -1
  237. package/dist/memory/engine-compat.js +1 -0
  238. package/dist/memory/engine-compat.js.map +1 -1
  239. package/dist/memory/import-from-provider.js +3 -3
  240. package/dist/memory/import-from-provider.js.map +1 -1
  241. package/dist/memory/learnings.d.ts +2 -2
  242. package/dist/memory/observation-type-decision.d.ts +96 -0
  243. package/dist/memory/observation-type-decision.d.ts.map +1 -0
  244. package/dist/memory/observation-type-decision.js +218 -0
  245. package/dist/memory/observation-type-decision.js.map +1 -0
  246. package/dist/memory/redaction.js +2 -0
  247. package/dist/memory/redaction.js.map +1 -1
  248. package/dist/memory/retrieval/build-retrieval-bundle.d.ts +9 -2
  249. package/dist/memory/retrieval/build-retrieval-bundle.d.ts.map +1 -1
  250. package/dist/memory/retrieval/build-retrieval-bundle.js +42 -11
  251. package/dist/memory/retrieval/build-retrieval-bundle.js.map +1 -1
  252. package/dist/memory/retrieval/get-current-session-id.d.ts +5 -0
  253. package/dist/memory/retrieval/get-current-session-id.d.ts.map +1 -1
  254. package/dist/memory/retrieval/get-current-session-id.js +7 -2
  255. package/dist/memory/retrieval/get-current-session-id.js.map +1 -1
  256. package/dist/memory/retrieval/observe.d.ts.map +1 -1
  257. package/dist/memory/retrieval/observe.js +30 -29
  258. package/dist/memory/retrieval/observe.js.map +1 -1
  259. package/dist/nexus/analyze-orchestrator.d.ts.map +1 -1
  260. package/dist/nexus/analyze-orchestrator.js +42 -29
  261. package/dist/nexus/analyze-orchestrator.js.map +1 -1
  262. package/dist/nexus/assessment-projection.d.ts +76 -0
  263. package/dist/nexus/assessment-projection.d.ts.map +1 -0
  264. package/dist/nexus/assessment-projection.js +143 -0
  265. package/dist/nexus/assessment-projection.js.map +1 -0
  266. package/dist/nexus/assessment-store.d.ts +14 -2
  267. package/dist/nexus/assessment-store.d.ts.map +1 -1
  268. package/dist/nexus/assessment-store.js +21 -3
  269. package/dist/nexus/assessment-store.js.map +1 -1
  270. package/dist/nexus/checkout-nonce.d.ts +48 -0
  271. package/dist/nexus/checkout-nonce.d.ts.map +1 -0
  272. package/dist/nexus/checkout-nonce.js +84 -0
  273. package/dist/nexus/checkout-nonce.js.map +1 -0
  274. package/dist/nexus/devices.d.ts +93 -0
  275. package/dist/nexus/devices.d.ts.map +1 -0
  276. package/dist/nexus/devices.js +141 -0
  277. package/dist/nexus/devices.js.map +1 -0
  278. package/dist/nexus/freshness.d.ts.map +1 -1
  279. package/dist/nexus/freshness.js +25 -6
  280. package/dist/nexus/freshness.js.map +1 -1
  281. package/dist/nexus/git-state.d.ts +225 -0
  282. package/dist/nexus/git-state.d.ts.map +1 -0
  283. package/dist/nexus/git-state.js +677 -0
  284. package/dist/nexus/git-state.js.map +1 -0
  285. package/dist/nexus/graph-manifest.d.ts +20 -4
  286. package/dist/nexus/graph-manifest.d.ts.map +1 -1
  287. package/dist/nexus/graph-manifest.js +40 -5
  288. package/dist/nexus/graph-manifest.js.map +1 -1
  289. package/dist/nexus/identity.d.ts +68 -23
  290. package/dist/nexus/identity.d.ts.map +1 -1
  291. package/dist/nexus/identity.js +99 -22
  292. package/dist/nexus/identity.js.map +1 -1
  293. package/dist/nexus/index.d.ts +5 -2
  294. package/dist/nexus/index.d.ts.map +1 -1
  295. package/dist/nexus/index.js +10 -4
  296. package/dist/nexus/index.js.map +1 -1
  297. package/dist/nexus/knowledge.d.ts +5 -0
  298. package/dist/nexus/knowledge.d.ts.map +1 -1
  299. package/dist/nexus/knowledge.js +26 -2
  300. package/dist/nexus/knowledge.js.map +1 -1
  301. package/dist/nexus/legacy-alias.d.ts +60 -0
  302. package/dist/nexus/legacy-alias.d.ts.map +1 -0
  303. package/dist/nexus/legacy-alias.js +68 -0
  304. package/dist/nexus/legacy-alias.js.map +1 -0
  305. package/dist/nexus/migrate-json-to-sqlite.js +2 -2
  306. package/dist/nexus/migrate-json-to-sqlite.js.map +1 -1
  307. package/dist/nexus/ops.d.ts +1 -0
  308. package/dist/nexus/ops.d.ts.map +1 -1
  309. package/dist/nexus/path-map.d.ts +264 -20
  310. package/dist/nexus/path-map.d.ts.map +1 -1
  311. package/dist/nexus/path-map.js +580 -44
  312. package/dist/nexus/path-map.js.map +1 -1
  313. package/dist/nexus/projects-clean.d.ts +9 -1
  314. package/dist/nexus/projects-clean.d.ts.map +1 -1
  315. package/dist/nexus/projects-clean.js +126 -14
  316. package/dist/nexus/projects-clean.js.map +1 -1
  317. package/dist/nexus/projects-scan.d.ts +56 -1
  318. package/dist/nexus/projects-scan.d.ts.map +1 -1
  319. package/dist/nexus/projects-scan.js +144 -3
  320. package/dist/nexus/projects-scan.js.map +1 -1
  321. package/dist/nexus/registry-hygiene.d.ts +18 -2
  322. package/dist/nexus/registry-hygiene.d.ts.map +1 -1
  323. package/dist/nexus/registry-hygiene.js +37 -11
  324. package/dist/nexus/registry-hygiene.js.map +1 -1
  325. package/dist/nexus/registry-roots.d.ts +47 -0
  326. package/dist/nexus/registry-roots.d.ts.map +1 -0
  327. package/dist/nexus/registry-roots.js +79 -0
  328. package/dist/nexus/registry-roots.js.map +1 -0
  329. package/dist/nexus/registry.d.ts +50 -9
  330. package/dist/nexus/registry.d.ts.map +1 -1
  331. package/dist/nexus/registry.js +311 -156
  332. package/dist/nexus/registry.js.map +1 -1
  333. package/dist/nexus/stored-roots.d.ts +106 -0
  334. package/dist/nexus/stored-roots.d.ts.map +1 -0
  335. package/dist/nexus/stored-roots.js +180 -0
  336. package/dist/nexus/stored-roots.js.map +1 -0
  337. package/dist/nexus/transfer.d.ts.map +1 -1
  338. package/dist/nexus/transfer.js +3 -0
  339. package/dist/nexus/transfer.js.map +1 -1
  340. package/dist/nexus/user-profile-hygiene.d.ts +168 -0
  341. package/dist/nexus/user-profile-hygiene.d.ts.map +1 -0
  342. package/dist/nexus/user-profile-hygiene.js +305 -0
  343. package/dist/nexus/user-profile-hygiene.js.map +1 -0
  344. package/dist/nexus/user-profile.d.ts +53 -2
  345. package/dist/nexus/user-profile.d.ts.map +1 -1
  346. package/dist/nexus/user-profile.js +106 -4
  347. package/dist/nexus/user-profile.js.map +1 -1
  348. package/dist/orchestrate/pivot.d.ts.map +1 -1
  349. package/dist/orchestrate/pivot.js +5 -1
  350. package/dist/orchestrate/pivot.js.map +1 -1
  351. package/dist/orchestrate/spawn-ops.d.ts +12 -0
  352. package/dist/orchestrate/spawn-ops.d.ts.map +1 -1
  353. package/dist/orchestrate/spawn-ops.js +152 -57
  354. package/dist/orchestrate/spawn-ops.js.map +1 -1
  355. package/dist/orchestration/classify-readiness.d.ts +37 -1
  356. package/dist/orchestration/classify-readiness.d.ts.map +1 -1
  357. package/dist/orchestration/classify-readiness.js +48 -19
  358. package/dist/orchestration/classify-readiness.js.map +1 -1
  359. package/dist/orchestration/index.d.ts +3 -2
  360. package/dist/orchestration/index.d.ts.map +1 -1
  361. package/dist/orchestration/index.js +2 -1
  362. package/dist/orchestration/index.js.map +1 -1
  363. package/dist/orchestration/owner-decision-readiness.d.ts +88 -0
  364. package/dist/orchestration/owner-decision-readiness.d.ts.map +1 -0
  365. package/dist/orchestration/owner-decision-readiness.js +152 -0
  366. package/dist/orchestration/owner-decision-readiness.js.map +1 -0
  367. package/dist/orchestration/psyche-memory-budget.d.ts +105 -0
  368. package/dist/orchestration/psyche-memory-budget.d.ts.map +1 -0
  369. package/dist/orchestration/psyche-memory-budget.js +383 -0
  370. package/dist/orchestration/psyche-memory-budget.js.map +1 -0
  371. package/dist/orchestration/spawn-prompt.d.ts +12 -1
  372. package/dist/orchestration/spawn-prompt.d.ts.map +1 -1
  373. package/dist/orchestration/spawn-prompt.js +141 -179
  374. package/dist/orchestration/spawn-prompt.js.map +1 -1
  375. package/dist/orchestration/spawn.d.ts +7 -0
  376. package/dist/orchestration/spawn.d.ts.map +1 -1
  377. package/dist/orchestration/spawn.js +1 -0
  378. package/dist/orchestration/spawn.js.map +1 -1
  379. package/dist/paths.d.ts +24 -8
  380. package/dist/paths.d.ts.map +1 -1
  381. package/dist/paths.js +135 -71
  382. package/dist/paths.js.map +1 -1
  383. package/dist/platform.d.ts +6 -1
  384. package/dist/platform.d.ts.map +1 -1
  385. package/dist/platform.js +8 -19
  386. package/dist/platform.js.map +1 -1
  387. package/dist/project-info.d.ts +18 -0
  388. package/dist/project-info.d.ts.map +1 -1
  389. package/dist/project-info.js +29 -1
  390. package/dist/project-info.js.map +1 -1
  391. package/dist/project-lifecycle.d.ts +91 -32
  392. package/dist/project-lifecycle.d.ts.map +1 -1
  393. package/dist/project-lifecycle.js +639 -75
  394. package/dist/project-lifecycle.js.map +1 -1
  395. package/dist/project-scope.d.ts +86 -4
  396. package/dist/project-scope.d.ts.map +1 -1
  397. package/dist/project-scope.js +226 -13
  398. package/dist/project-scope.js.map +1 -1
  399. package/dist/project-tombstone.d.ts +111 -0
  400. package/dist/project-tombstone.d.ts.map +1 -0
  401. package/dist/project-tombstone.js +220 -0
  402. package/dist/project-tombstone.js.map +1 -0
  403. package/dist/release/artifacts.d.ts.map +1 -1
  404. package/dist/release/artifacts.js +14 -9
  405. package/dist/release/artifacts.js.map +1 -1
  406. package/dist/release/ci-evidence.d.ts +223 -0
  407. package/dist/release/ci-evidence.d.ts.map +1 -0
  408. package/dist/release/ci-evidence.js +652 -0
  409. package/dist/release/ci-evidence.js.map +1 -0
  410. package/dist/release/engine-ops.d.ts.map +1 -1
  411. package/dist/release/engine-ops.js +3 -3
  412. package/dist/release/engine-ops.js.map +1 -1
  413. package/dist/release/plan.d.ts.map +1 -1
  414. package/dist/release/plan.js +7 -6
  415. package/dist/release/plan.js.map +1 -1
  416. package/dist/release/pr-evidence.d.ts +38 -0
  417. package/dist/release/pr-evidence.d.ts.map +1 -1
  418. package/dist/release/pr-evidence.js +67 -11
  419. package/dist/release/pr-evidence.js.map +1 -1
  420. package/dist/release/reconcile.d.ts.map +1 -1
  421. package/dist/release/reconcile.js +3 -2
  422. package/dist/release/reconcile.js.map +1 -1
  423. package/dist/release/release-manifest.d.ts +2 -1
  424. package/dist/release/release-manifest.d.ts.map +1 -1
  425. package/dist/release/release-manifest.js +6 -5
  426. package/dist/release/release-manifest.js.map +1 -1
  427. package/dist/render/nexus/graph/index.d.ts +4 -0
  428. package/dist/render/nexus/graph/index.d.ts.map +1 -1
  429. package/dist/render/nexus/graph/index.js +57 -0
  430. package/dist/render/nexus/graph/index.js.map +1 -1
  431. package/dist/resources/spawn-wrapper.d.ts +8 -1
  432. package/dist/resources/spawn-wrapper.d.ts.map +1 -1
  433. package/dist/resources/spawn-wrapper.js +42 -5
  434. package/dist/resources/spawn-wrapper.js.map +1 -1
  435. package/dist/routing/build-command-groups.d.ts.map +1 -1
  436. package/dist/routing/build-command-groups.js +1 -0
  437. package/dist/routing/build-command-groups.js.map +1 -1
  438. package/dist/sagas/index.d.ts +1 -1
  439. package/dist/sagas/index.d.ts.map +1 -1
  440. package/dist/sagas/index.js +1 -1
  441. package/dist/sagas/index.js.map +1 -1
  442. package/dist/sagas/reconcile.d.ts +24 -4
  443. package/dist/sagas/reconcile.d.ts.map +1 -1
  444. package/dist/sagas/reconcile.js +226 -100
  445. package/dist/sagas/reconcile.js.map +1 -1
  446. package/dist/scaffold/ensure-config.d.ts.map +1 -1
  447. package/dist/scaffold/ensure-config.js +31 -1
  448. package/dist/scaffold/ensure-config.js.map +1 -1
  449. package/dist/scaffold/project-identity.d.ts +2 -8
  450. package/dist/scaffold/project-identity.d.ts.map +1 -1
  451. package/dist/scaffold/project-identity.js +5 -21
  452. package/dist/scaffold/project-identity.js.map +1 -1
  453. package/dist/security/input-sanitization.d.ts +9 -1
  454. package/dist/security/input-sanitization.d.ts.map +1 -1
  455. package/dist/security/input-sanitization.js +12 -2
  456. package/dist/security/input-sanitization.js.map +1 -1
  457. package/dist/selfimprove/fix-gen.js +4321 -1807
  458. package/dist/selfimprove/fix-gen.js.map +3 -3
  459. package/dist/sentient/propose-tick.d.ts.map +1 -1
  460. package/dist/sentient/propose-tick.js +4 -2
  461. package/dist/sentient/propose-tick.js.map +1 -1
  462. package/dist/sequence/index.d.ts.map +1 -1
  463. package/dist/sequence/index.js +6 -23
  464. package/dist/sequence/index.js.map +1 -1
  465. package/dist/session/engine-ops.d.ts +9 -0
  466. package/dist/session/engine-ops.d.ts.map +1 -1
  467. package/dist/session/engine-ops.js +110 -18
  468. package/dist/session/engine-ops.js.map +1 -1
  469. package/dist/sessions/assumptions.d.ts.map +1 -1
  470. package/dist/sessions/assumptions.js +7 -4
  471. package/dist/sessions/assumptions.js.map +1 -1
  472. package/dist/sessions/briefing.d.ts +6 -0
  473. package/dist/sessions/briefing.d.ts.map +1 -1
  474. package/dist/sessions/briefing.js +12 -1
  475. package/dist/sessions/briefing.js.map +1 -1
  476. package/dist/sessions/decisions.d.ts +38 -3
  477. package/dist/sessions/decisions.d.ts.map +1 -1
  478. package/dist/sessions/decisions.js +235 -21
  479. package/dist/sessions/decisions.js.map +1 -1
  480. package/dist/sessions/drift-watchdog.d.ts.map +1 -1
  481. package/dist/sessions/drift-watchdog.js +4 -2
  482. package/dist/sessions/drift-watchdog.js.map +1 -1
  483. package/dist/sessions/index.d.ts.map +1 -1
  484. package/dist/sessions/index.js +33 -4
  485. package/dist/sessions/index.js.map +1 -1
  486. package/dist/sessions/session-end-snapshot-entry.d.ts +26 -0
  487. package/dist/sessions/session-end-snapshot-entry.d.ts.map +1 -0
  488. package/dist/sessions/session-end-snapshot-entry.js +59 -0
  489. package/dist/sessions/session-end-snapshot-entry.js.map +1 -0
  490. package/dist/sessions/session-end-snapshot.d.ts +114 -0
  491. package/dist/sessions/session-end-snapshot.d.ts.map +1 -0
  492. package/dist/sessions/session-end-snapshot.js +446 -0
  493. package/dist/sessions/session-end-snapshot.js.map +1 -0
  494. package/dist/sessions/session-manifest-mirror.d.ts.map +1 -1
  495. package/dist/sessions/session-manifest-mirror.js +10 -17
  496. package/dist/sessions/session-manifest-mirror.js.map +1 -1
  497. package/dist/sessions/session-switch.d.ts.map +1 -1
  498. package/dist/sessions/session-switch.js +5 -3
  499. package/dist/sessions/session-switch.js.map +1 -1
  500. package/dist/sessions/snapshot.d.ts.map +1 -1
  501. package/dist/sessions/snapshot.js +5 -4
  502. package/dist/sessions/snapshot.js.map +1 -1
  503. package/dist/sessions/terminal-identity.d.ts +169 -0
  504. package/dist/sessions/terminal-identity.d.ts.map +1 -0
  505. package/dist/sessions/terminal-identity.js +273 -0
  506. package/dist/sessions/terminal-identity.js.map +1 -0
  507. package/dist/setup/sections/verification.d.ts +1 -1
  508. package/dist/setup/sections/verification.d.ts.map +1 -1
  509. package/dist/setup/sections/verification.js +11 -15
  510. package/dist/setup/sections/verification.js.map +1 -1
  511. package/dist/skills/discovery.d.ts +8 -2
  512. package/dist/skills/discovery.d.ts.map +1 -1
  513. package/dist/skills/discovery.js +15 -3
  514. package/dist/skills/discovery.js.map +1 -1
  515. package/dist/skills/dispatch.d.ts +5 -2
  516. package/dist/skills/dispatch.d.ts.map +1 -1
  517. package/dist/skills/dispatch.js +5 -2
  518. package/dist/skills/dispatch.js.map +1 -1
  519. package/dist/skills/doctor.d.ts.map +1 -1
  520. package/dist/skills/doctor.js +5 -1
  521. package/dist/skills/doctor.js.map +1 -1
  522. package/dist/skills/federated-search.js +2 -2
  523. package/dist/skills/federated-search.js.map +1 -1
  524. package/dist/skills/index.d.ts +3 -3
  525. package/dist/skills/index.d.ts.map +1 -1
  526. package/dist/skills/index.js +1 -1
  527. package/dist/skills/index.js.map +1 -1
  528. package/dist/skills/migration.d.ts +5 -5
  529. package/dist/skills/migration.d.ts.map +1 -1
  530. package/dist/skills/migration.js +7 -9
  531. package/dist/skills/migration.js.map +1 -1
  532. package/dist/skills/orchestrator/startup.d.ts.map +1 -1
  533. package/dist/skills/orchestrator/startup.js +4 -2
  534. package/dist/skills/orchestrator/startup.js.map +1 -1
  535. package/dist/skills/skill-paths.d.ts +30 -3
  536. package/dist/skills/skill-paths.d.ts.map +1 -1
  537. package/dist/skills/skill-paths.js +28 -9
  538. package/dist/skills/skill-paths.js.map +1 -1
  539. package/dist/skills/skill-root.d.ts +60 -11
  540. package/dist/skills/skill-root.d.ts.map +1 -1
  541. package/dist/skills/skill-root.js +100 -14
  542. package/dist/skills/skill-root.js.map +1 -1
  543. package/dist/skills/skills-guard.js +5 -5
  544. package/dist/skills/skills-guard.js.map +1 -1
  545. package/dist/skills/types.d.ts +23 -0
  546. package/dist/skills/types.d.ts.map +1 -1
  547. package/dist/skills/types.js.map +1 -1
  548. package/dist/spawn/agent-identity.d.ts +51 -2
  549. package/dist/spawn/agent-identity.d.ts.map +1 -1
  550. package/dist/spawn/agent-identity.js +89 -26
  551. package/dist/spawn/agent-identity.js.map +1 -1
  552. package/dist/spawn/branch-lock.d.ts.map +1 -1
  553. package/dist/spawn/branch-lock.js +56 -79
  554. package/dist/spawn/branch-lock.js.map +1 -1
  555. package/dist/spawn/index.d.ts +2 -2
  556. package/dist/spawn/index.d.ts.map +1 -1
  557. package/dist/spawn/index.js +1 -1
  558. package/dist/spawn/index.js.map +1 -1
  559. package/dist/spawn/worktree-lock-holder.d.ts +37 -0
  560. package/dist/spawn/worktree-lock-holder.d.ts.map +1 -0
  561. package/dist/spawn/worktree-lock-holder.js +41 -0
  562. package/dist/spawn/worktree-lock-holder.js.map +1 -0
  563. package/dist/sticky/convert.d.ts.map +1 -1
  564. package/dist/sticky/convert.js +16 -4
  565. package/dist/sticky/convert.js.map +1 -1
  566. package/dist/store/attachment-store.d.ts +14 -0
  567. package/dist/store/attachment-store.d.ts.map +1 -1
  568. package/dist/store/attachment-store.js +11 -1
  569. package/dist/store/attachment-store.js.map +1 -1
  570. package/dist/store/backup-inspect.d.ts +7 -3
  571. package/dist/store/backup-inspect.d.ts.map +1 -1
  572. package/dist/store/backup-inspect.js +18 -7
  573. package/dist/store/backup-inspect.js.map +1 -1
  574. package/dist/store/backup-sidecar.d.ts +60 -0
  575. package/dist/store/backup-sidecar.d.ts.map +1 -0
  576. package/dist/store/backup-sidecar.js +96 -0
  577. package/dist/store/backup-sidecar.js.map +1 -0
  578. package/dist/store/data-accessor.d.ts +1 -1
  579. package/dist/store/data-accessor.d.ts.map +1 -1
  580. package/dist/store/data-accessor.js +6 -6
  581. package/dist/store/data-accessor.js.map +1 -1
  582. package/dist/store/data-safety-central.d.ts +13 -4
  583. package/dist/store/data-safety-central.d.ts.map +1 -1
  584. package/dist/store/data-safety-central.js +31 -4
  585. package/dist/store/data-safety-central.js.map +1 -1
  586. package/dist/store/dual-scope-db.d.ts.map +1 -1
  587. package/dist/store/dual-scope-db.js +10 -0
  588. package/dist/store/dual-scope-db.js.map +1 -1
  589. package/dist/store/exodus/__fixtures__/representative-fixture.d.ts.map +1 -1
  590. package/dist/store/exodus/__fixtures__/representative-fixture.js +4 -0
  591. package/dist/store/exodus/__fixtures__/representative-fixture.js.map +1 -1
  592. package/dist/store/exodus/migrate.js +1 -1
  593. package/dist/store/exodus/migrate.js.map +1 -1
  594. package/dist/store/exodus/reconcile.js +1 -1
  595. package/dist/store/exodus/reconcile.js.map +1 -1
  596. package/dist/store/exodus/runtime-targets.d.ts +4 -3
  597. package/dist/store/exodus/runtime-targets.d.ts.map +1 -1
  598. package/dist/store/exodus/runtime-targets.js +4 -3
  599. package/dist/store/exodus/runtime-targets.js.map +1 -1
  600. package/dist/store/import-logging.d.ts.map +1 -1
  601. package/dist/store/import-logging.js +5 -4
  602. package/dist/store/import-logging.js.map +1 -1
  603. package/dist/store/legacy-tasks-lineage.d.ts.map +1 -1
  604. package/dist/store/legacy-tasks-lineage.js +2 -7
  605. package/dist/store/legacy-tasks-lineage.js.map +1 -1
  606. package/dist/store/lock.d.ts +1 -0
  607. package/dist/store/lock.d.ts.map +1 -1
  608. package/dist/store/lock.js +1 -0
  609. package/dist/store/lock.js.map +1 -1
  610. package/dist/store/memory-accessor.d.ts +8 -3
  611. package/dist/store/memory-accessor.d.ts.map +1 -1
  612. package/dist/store/memory-accessor.js +29 -13
  613. package/dist/store/memory-accessor.js.map +1 -1
  614. package/dist/store/memory-sqlite.d.ts.map +1 -1
  615. package/dist/store/memory-sqlite.js +5 -0
  616. package/dist/store/memory-sqlite.js.map +1 -1
  617. package/dist/store/open-cleo-db.d.ts.map +1 -1
  618. package/dist/store/open-cleo-db.js +11 -6
  619. package/dist/store/open-cleo-db.js.map +1 -1
  620. package/dist/store/portable-bundle-relocate.d.ts +13 -8
  621. package/dist/store/portable-bundle-relocate.d.ts.map +1 -1
  622. package/dist/store/portable-bundle-relocate.js +75 -31
  623. package/dist/store/portable-bundle-relocate.js.map +1 -1
  624. package/dist/store/portable-bundle-scan.d.ts.map +1 -1
  625. package/dist/store/portable-bundle-scan.js +2 -1
  626. package/dist/store/portable-bundle-scan.js.map +1 -1
  627. package/dist/store/portable-bundle.d.ts.map +1 -1
  628. package/dist/store/portable-bundle.js +7 -3
  629. package/dist/store/portable-bundle.js.map +1 -1
  630. package/dist/store/pre-repair-snapshot.d.ts +77 -0
  631. package/dist/store/pre-repair-snapshot.d.ts.map +1 -0
  632. package/dist/store/pre-repair-snapshot.js +122 -0
  633. package/dist/store/pre-repair-snapshot.js.map +1 -0
  634. package/dist/store/regenerators.d.ts +2 -1
  635. package/dist/store/regenerators.d.ts.map +1 -1
  636. package/dist/store/regenerators.js +17 -3
  637. package/dist/store/regenerators.js.map +1 -1
  638. package/dist/store/relocated-store-guard.d.ts +71 -0
  639. package/dist/store/relocated-store-guard.d.ts.map +1 -0
  640. package/dist/store/relocated-store-guard.js +138 -0
  641. package/dist/store/relocated-store-guard.js.map +1 -0
  642. package/dist/store/safety-data-accessor.d.ts +2 -2
  643. package/dist/store/safety-data-accessor.d.ts.map +1 -1
  644. package/dist/store/safety-data-accessor.js +2 -2
  645. package/dist/store/safety-data-accessor.js.map +1 -1
  646. package/dist/store/schema/attachments.d.ts +2 -2
  647. package/dist/store/schema/audit.d.ts +5 -5
  648. package/dist/store/schema/background-jobs.d.ts +1 -1
  649. package/dist/store/schema/cleo-global/models-catalog.d.ts +1 -1
  650. package/dist/store/schema/cleo-global/nexus.d.ts +686 -0
  651. package/dist/store/schema/cleo-global/nexus.d.ts.map +1 -1
  652. package/dist/store/schema/cleo-global/nexus.js +175 -7
  653. package/dist/store/schema/cleo-global/nexus.js.map +1 -1
  654. package/dist/store/schema/cleo-global/skills.d.ts +2 -2
  655. package/dist/store/schema/cleo-project/audit.d.ts +5 -5
  656. package/dist/store/schema/cleo-project/docs.d.ts +3 -3
  657. package/dist/store/schema/cleo-project/lifecycle.d.ts +3 -3
  658. package/dist/store/schema/cleo-project/provenance-commits.d.ts +2 -2
  659. package/dist/store/schema/cleo-project/provenance-rest.d.ts +3 -3
  660. package/dist/store/schema/cleo-project/tasks-core-batch2.d.ts +1 -1
  661. package/dist/store/schema/cleo-project/tasks-core.d.ts +6 -6
  662. package/dist/store/schema/cleo-shared/brain.d.ts +26 -26
  663. package/dist/store/schema/lifecycle.d.ts +3 -3
  664. package/dist/store/schema/manifest.d.ts +1 -1
  665. package/dist/store/schema/memory-schema.d.ts +26 -26
  666. package/dist/store/schema/nexus-schema.d.ts +696 -2
  667. package/dist/store/schema/nexus-schema.d.ts.map +1 -1
  668. package/dist/store/schema/nexus-schema.js +175 -19
  669. package/dist/store/schema/nexus-schema.js.map +1 -1
  670. package/dist/store/schema/provenance/releases.d.ts +1 -1
  671. package/dist/store/schema/skills-schema.d.ts +2 -2
  672. package/dist/store/schema/tasks.d.ts +5 -5
  673. package/dist/store/session-binding-schema.d.ts +132 -0
  674. package/dist/store/session-binding-schema.d.ts.map +1 -0
  675. package/dist/store/session-binding-schema.js +53 -0
  676. package/dist/store/session-binding-schema.js.map +1 -0
  677. package/dist/store/session-store.d.ts +262 -4
  678. package/dist/store/session-store.d.ts.map +1 -1
  679. package/dist/store/session-store.js +486 -26
  680. package/dist/store/session-store.js.map +1 -1
  681. package/dist/store/snapshot-gate.d.ts +239 -0
  682. package/dist/store/snapshot-gate.d.ts.map +1 -0
  683. package/dist/store/snapshot-gate.js +398 -0
  684. package/dist/store/snapshot-gate.js.map +1 -0
  685. package/dist/store/split-brain-import.js +2 -2
  686. package/dist/store/split-brain-import.js.map +1 -1
  687. package/dist/store/sqlite-backup.d.ts +55 -13
  688. package/dist/store/sqlite-backup.d.ts.map +1 -1
  689. package/dist/store/sqlite-backup.js +414 -106
  690. package/dist/store/sqlite-backup.js.map +1 -1
  691. package/dist/store/sqlite-data-accessor.d.ts +15 -0
  692. package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
  693. package/dist/store/sqlite-data-accessor.js +63 -4
  694. package/dist/store/sqlite-data-accessor.js.map +1 -1
  695. package/dist/store/sqlite.d.ts +1 -1
  696. package/dist/store/sqlite.d.ts.map +1 -1
  697. package/dist/store/sqlite.js +53 -5
  698. package/dist/store/sqlite.js.map +1 -1
  699. package/dist/store/store-write-guard.d.ts +28 -0
  700. package/dist/store/store-write-guard.d.ts.map +1 -0
  701. package/dist/store/store-write-guard.js +50 -0
  702. package/dist/store/store-write-guard.js.map +1 -0
  703. package/dist/store/table-classification.d.ts +143 -0
  704. package/dist/store/table-classification.d.ts.map +1 -0
  705. package/dist/store/table-classification.js +1866 -0
  706. package/dist/store/table-classification.js.map +1 -0
  707. package/dist/store/task-version.d.ts +72 -0
  708. package/dist/store/task-version.d.ts.map +1 -0
  709. package/dist/store/task-version.js +93 -0
  710. package/dist/store/task-version.js.map +1 -0
  711. package/dist/store/tasks-schema.d.ts +1 -0
  712. package/dist/store/tasks-schema.d.ts.map +1 -1
  713. package/dist/store/tasks-schema.js +13 -0
  714. package/dist/store/tasks-schema.js.map +1 -1
  715. package/dist/store/tasks-sqlite.d.ts +10 -3
  716. package/dist/store/tasks-sqlite.d.ts.map +1 -1
  717. package/dist/store/tasks-sqlite.js +12 -3
  718. package/dist/store/tasks-sqlite.js.map +1 -1
  719. package/dist/store/twin-collapse.d.ts +275 -0
  720. package/dist/store/twin-collapse.d.ts.map +1 -0
  721. package/dist/store/twin-collapse.js +805 -0
  722. package/dist/store/twin-collapse.js.map +1 -0
  723. package/dist/store/umbrella-data-accessor.d.ts +2 -2
  724. package/dist/store/umbrella-data-accessor.d.ts.map +1 -1
  725. package/dist/store/umbrella-data-accessor.js +2 -2
  726. package/dist/store/umbrella-data-accessor.js.map +1 -1
  727. package/dist/store/validation-schemas.d.ts +63 -63
  728. package/dist/store/worktree-isolation-guard.d.ts +46 -24
  729. package/dist/store/worktree-isolation-guard.d.ts.map +1 -1
  730. package/dist/store/worktree-isolation-guard.js +69 -50
  731. package/dist/store/worktree-isolation-guard.js.map +1 -1
  732. package/dist/system/backup.d.ts.map +1 -1
  733. package/dist/system/backup.js +3 -67
  734. package/dist/system/backup.js.map +1 -1
  735. package/dist/system/cleo-link.d.ts +163 -0
  736. package/dist/system/cleo-link.d.ts.map +1 -0
  737. package/dist/system/cleo-link.js +246 -0
  738. package/dist/system/cleo-link.js.map +1 -0
  739. package/dist/system/dependencies.d.ts.map +1 -1
  740. package/dist/system/dependencies.js +3 -6
  741. package/dist/system/dependencies.js.map +1 -1
  742. package/dist/system/global-delivery.d.ts +205 -0
  743. package/dist/system/global-delivery.d.ts.map +1 -0
  744. package/dist/system/global-delivery.js +320 -0
  745. package/dist/system/global-delivery.js.map +1 -0
  746. package/dist/system/health.d.ts.map +1 -1
  747. package/dist/system/health.js +29 -6
  748. package/dist/system/health.js.map +1 -1
  749. package/dist/system/project-health.d.ts.map +1 -1
  750. package/dist/system/project-health.js +1 -20
  751. package/dist/system/project-health.js.map +1 -1
  752. package/dist/system/runtime.d.ts.map +1 -1
  753. package/dist/system/runtime.js +2 -12
  754. package/dist/system/runtime.js.map +1 -1
  755. package/dist/system/safestop.d.ts.map +1 -1
  756. package/dist/system/safestop.js +5 -2
  757. package/dist/system/safestop.js.map +1 -1
  758. package/dist/system/skill-fixtures.d.ts +200 -0
  759. package/dist/system/skill-fixtures.d.ts.map +1 -0
  760. package/dist/system/skill-fixtures.js +331 -0
  761. package/dist/system/skill-fixtures.js.map +1 -0
  762. package/dist/tasks/add.d.ts.map +1 -1
  763. package/dist/tasks/add.js +4 -2
  764. package/dist/tasks/add.js.map +1 -1
  765. package/dist/tasks/affected-packages.d.ts +173 -0
  766. package/dist/tasks/affected-packages.d.ts.map +1 -0
  767. package/dist/tasks/affected-packages.js +389 -0
  768. package/dist/tasks/affected-packages.js.map +1 -0
  769. package/dist/tasks/change-set.d.ts +151 -0
  770. package/dist/tasks/change-set.d.ts.map +1 -0
  771. package/dist/tasks/change-set.js +634 -0
  772. package/dist/tasks/change-set.js.map +1 -0
  773. package/dist/tasks/complete.d.ts.map +1 -1
  774. package/dist/tasks/complete.js +10 -5
  775. package/dist/tasks/complete.js.map +1 -1
  776. package/dist/tasks/done-plan.d.ts +103 -0
  777. package/dist/tasks/done-plan.d.ts.map +1 -0
  778. package/dist/tasks/done-plan.js +541 -0
  779. package/dist/tasks/done-plan.js.map +1 -0
  780. package/dist/tasks/done-record.d.ts +127 -0
  781. package/dist/tasks/done-record.d.ts.map +1 -0
  782. package/dist/tasks/done-record.js +373 -0
  783. package/dist/tasks/done-record.js.map +1 -0
  784. package/dist/tasks/duplicate-detector.d.ts +68 -11
  785. package/dist/tasks/duplicate-detector.d.ts.map +1 -1
  786. package/dist/tasks/duplicate-detector.js +314 -58
  787. package/dist/tasks/duplicate-detector.js.map +1 -1
  788. package/dist/tasks/evidence-paths.d.ts +78 -0
  789. package/dist/tasks/evidence-paths.d.ts.map +1 -0
  790. package/dist/tasks/evidence-paths.js +150 -0
  791. package/dist/tasks/evidence-paths.js.map +1 -0
  792. package/dist/tasks/evidence.d.ts +55 -0
  793. package/dist/tasks/evidence.d.ts.map +1 -1
  794. package/dist/tasks/evidence.js +223 -26
  795. package/dist/tasks/evidence.js.map +1 -1
  796. package/dist/tasks/gate-preview.d.ts +5 -0
  797. package/dist/tasks/gate-preview.d.ts.map +1 -1
  798. package/dist/tasks/gate-preview.js +25 -21
  799. package/dist/tasks/gate-preview.js.map +1 -1
  800. package/dist/tasks/gate-result-cache.d.ts +205 -0
  801. package/dist/tasks/gate-result-cache.d.ts.map +1 -0
  802. package/dist/tasks/gate-result-cache.js +285 -0
  803. package/dist/tasks/gate-result-cache.js.map +1 -0
  804. package/dist/tasks/gate-runner.d.ts +126 -3
  805. package/dist/tasks/gate-runner.d.ts.map +1 -1
  806. package/dist/tasks/gate-runner.js +483 -28
  807. package/dist/tasks/gate-runner.js.map +1 -1
  808. package/dist/tasks/session-scope.d.ts +3 -1
  809. package/dist/tasks/session-scope.d.ts.map +1 -1
  810. package/dist/tasks/session-scope.js +18 -3
  811. package/dist/tasks/session-scope.js.map +1 -1
  812. package/dist/tasks/tool-resolver.d.ts +23 -6
  813. package/dist/tasks/tool-resolver.d.ts.map +1 -1
  814. package/dist/tasks/tool-resolver.js +146 -8
  815. package/dist/tasks/tool-resolver.js.map +1 -1
  816. package/dist/tasks/tool-vacuity.d.ts +71 -0
  817. package/dist/tasks/tool-vacuity.d.ts.map +1 -0
  818. package/dist/tasks/tool-vacuity.js +334 -0
  819. package/dist/tasks/tool-vacuity.js.map +1 -0
  820. package/dist/tasks/update.d.ts +8 -0
  821. package/dist/tasks/update.d.ts.map +1 -1
  822. package/dist/tasks/update.js +159 -78
  823. package/dist/tasks/update.js.map +1 -1
  824. package/dist/upgrade.d.ts.map +1 -1
  825. package/dist/upgrade.js +18 -2
  826. package/dist/upgrade.js.map +1 -1
  827. package/dist/validation/doctor/checks.d.ts +20 -2
  828. package/dist/validation/doctor/checks.d.ts.map +1 -1
  829. package/dist/validation/doctor/checks.js +64 -4
  830. package/dist/validation/doctor/checks.js.map +1 -1
  831. package/dist/validation/doctor/index.d.ts +1 -1
  832. package/dist/validation/doctor/index.d.ts.map +1 -1
  833. package/dist/validation/doctor/index.js +1 -1
  834. package/dist/validation/doctor/index.js.map +1 -1
  835. package/dist/validation/doctor/utils.d.ts.map +1 -1
  836. package/dist/validation/doctor/utils.js +7 -2
  837. package/dist/validation/doctor/utils.js.map +1 -1
  838. package/dist/validation/engine-ops.d.ts +15 -0
  839. package/dist/validation/engine-ops.d.ts.map +1 -1
  840. package/dist/validation/engine-ops.js +249 -98
  841. package/dist/validation/engine-ops.js.map +1 -1
  842. package/migrations/drizzle-cleo-global/20260927000000_t12469-project-locations/migration.sql +121 -0
  843. package/migrations/drizzle-cleo-global/20260927010000_t12543-user-profile-project-scope/migration.sql +23 -0
  844. package/migrations/drizzle-cleo-global/20260928010000_t12470-location-candidates/migration.sql +72 -0
  845. package/migrations/drizzle-cleo-global/20260928020000_t12510-nexus-devices/migration.sql +34 -0
  846. package/migrations/drizzle-cleo-global/20260928030000_t12511-project-git-state/migration.sql +62 -0
  847. package/migrations/drizzle-cleo-project/20260927000000_t12499-session-terminal-bindings/migration.sql +34 -0
  848. package/migrations/drizzle-cleo-project/20260928000000_t12500-binding-provider-flag/migration.sql +15 -0
  849. package/package.json +23 -13
  850. package/schemas/config.schema.json +54 -0
  851. package/schemas/project-context.schema.json +51 -3
  852. package/schemas/project-info.schema.json +28 -1
  853. package/templates/CLEO-INJECTION.md +40 -332
  854. package/templates/CLEO-REFERENCE.md +303 -0
  855. package/templates/workflows/README.md +36 -14
@@ -0,0 +1,1866 @@
1
+ /**
2
+ * Table classification registry — the replication class of every physical
3
+ * table in the project and global `cleo.db` (Gate A).
4
+ *
5
+ * Every table a store can hold is either classified here (by an explicit
6
+ * entry or a pattern rule) or listed as pending an owner ruling. A table in
7
+ * neither place is UNCLASSIFIED, and the Gate A test
8
+ * (`__tests__/table-classification-gate.test.ts`) fails on it. That test
9
+ * enumerates `sqlite_master` of freshly migrated stores and of the committed
10
+ * live-store shape, so a table born in a migration, in runtime DDL, or in a
11
+ * legacy lineage cannot slip through.
12
+ *
13
+ * ## Keyed on physical names, not the Drizzle schema
14
+ *
15
+ * The runtime often writes the BARE legacy twin (`attachments`,
16
+ * `architecture_decisions`, `session_narrative`, …) rather than the prefixed
17
+ * table, while other bare twins are frozen copies nobody reads. A registry
18
+ * keyed on the Drizzle schema would classify the frozen copy and miss the
19
+ * live one, so both twins are listed here and the frozen ones carry
20
+ * `status: 'frozen-legacy'`, `liveTwin` and `dropTask` (T12535 collapses them).
21
+ *
22
+ * ## Two tiers: every table is backed up, portable tables also sync
23
+ *
24
+ * - **Tier 1, backup (the invariant).** Every table in both stores, with every
25
+ * row, whatever its class (including `local-only`, `derived`, pending and
26
+ * even unclassified tables), is backed up: encrypted client-side and
27
+ * versioned per device, so any machine can be restored bit-for-bit. A class
28
+ * NEVER exempts a table from backup. {@link TABLE_CLASS_POLICY} encodes this
29
+ * as `backup: true` for every class, and the Gate A test asserts it.
30
+ * - **Tier 2, sync/merge across the owner's devices.** Only the portable
31
+ * classes. `portable-personal` merges across the owner's own devices;
32
+ * `portable-project` also merges into the project's shared space for
33
+ * collaborators; `portable-secret` travels sealed end-to-end. `peer_scope`
34
+ * governs sharing with OTHER people, never the owner's own machines.
35
+ *
36
+ * The test for a table: if this device died and the owner opened a new one,
37
+ * would an agent have to redo work or lose knowledge? If yes, it is portable.
38
+ *
39
+ * `derived` is deliberately NARROW: only what is rebuilt deterministically,
40
+ * cheaply and without an LLM. That is the FTS5/sqlite-vec shadow tables and
41
+ * the nexus code graph (rebuilt from source by `cleo nexus analyze`).
42
+ * Embeddings, sleep-cycle output and anything an LLM produced are NOT
43
+ * derived: regenerating them costs money or time. `local-only` is for state
44
+ * that is meaningless off-device: leases, queues, pids, paths, locations and
45
+ * fs-keyed caches.
46
+ *
47
+ * ## Follow-up: current learned weights (does not block Gate A)
48
+ *
49
+ * `brain_plasticity_events` and `brain_weight_history` are local-only for row
50
+ * sync (they are STDP event history, 14M+ inserts). A new device still needs
51
+ * the CURRENT learned weights. Deliver them either as a compacted
52
+ * "current weights" projection that syncs as `portable-personal`, or as a
53
+ * periodic compacted snapshot blob. Until then a new device restores them
54
+ * only from the tier-1 backup.
55
+ *
56
+ * ## Sources
57
+ *
58
+ * The classes come from the classification draft
59
+ * (`docs/research/table-classification-draft.md` in the cleo-nexus repo), the
60
+ * core owner's rulings in its §F, and the core owner's two-tier ruling of
61
+ * 2026-09-28 plus its follow-up ruling on the STDP tables. Table
62
+ * classification was delegated to agents by the owner, so these are cleo-dev
63
+ * rulings; the ruling supersedes earlier ones where they conflict (each such
64
+ * entry carries the old reasoning in its `note`). Rows marked
65
+ * `needs-owner-call` are provisional. Tables on the `pending` list have no
66
+ * class and never sync (they are still backed up), and the Gate A test fails
67
+ * while the list is non-empty: pending is a working state, never a merged
68
+ * one.
69
+ *
70
+ * @task T12332
71
+ * @epic T12322
72
+ * @module store/table-classification
73
+ */
74
+ const PROJECT_TABLES = {
75
+ __drizzle_migrations: {
76
+ class: 'local-only',
77
+ status: 'draft',
78
+ source: 'table-classification-draft.md',
79
+ },
80
+ _conduit_meta: { class: 'local-only', status: 'draft', source: 'table-classification-draft.md' },
81
+ _conduit_migrations: {
82
+ class: 'local-only',
83
+ status: 'draft',
84
+ source: 'table-classification-draft.md',
85
+ },
86
+ _exodus_database_identity: {
87
+ class: 'local-only',
88
+ status: 'optional-transient',
89
+ source: 'table-classification-draft.md',
90
+ },
91
+ _fts5_check: {
92
+ class: 'local-only',
93
+ status: 'optional-transient',
94
+ source: 'table-classification-draft.md',
95
+ },
96
+ _nexus_meta: { class: 'local-only', status: 'draft', source: 'table-classification-draft.md' },
97
+ _nexus_parse_cache: {
98
+ class: 'local-only',
99
+ status: 'draft',
100
+ source: 'table-classification-draft.md',
101
+ },
102
+ _writer_leases: { class: 'local-only', status: 'draft', source: 'table-classification-draft.md' },
103
+ _writer_queue: { class: 'local-only', status: 'draft', source: 'table-classification-draft.md' },
104
+ acceptance_projection_dirty: {
105
+ class: 'local-only',
106
+ status: 'frozen-legacy',
107
+ source: 'draft §2.2',
108
+ dropTask: 'T12535',
109
+ liveTwin: 'tasks_acceptance_projection_dirty',
110
+ },
111
+ acceptance_projection_state: {
112
+ class: 'local-only',
113
+ status: 'frozen-legacy',
114
+ source: 'draft §2.2',
115
+ dropTask: 'T12535',
116
+ liveTwin: 'tasks_acceptance_projection_state',
117
+ },
118
+ adr_relations: {
119
+ class: 'portable-project',
120
+ status: 'draft',
121
+ source: 'table-classification-draft.md',
122
+ },
123
+ adr_task_links: {
124
+ class: 'portable-project',
125
+ status: 'draft',
126
+ source: 'table-classification-draft.md',
127
+ },
128
+ agent_credentials: {
129
+ class: 'local-only',
130
+ status: 'frozen-legacy',
131
+ source: 'draft §2.2',
132
+ dropTask: 'T12535',
133
+ liveTwin: 'tasks_agent_credentials',
134
+ columns: [
135
+ {
136
+ column: 'api_key_encrypted',
137
+ class: 'portable-secret',
138
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
139
+ },
140
+ ],
141
+ },
142
+ agent_error_log: {
143
+ class: 'portable-project',
144
+ status: 'resolved',
145
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
146
+ note: 'bare twin of tasks_agent_error_log (exodus map); same ruling',
147
+ },
148
+ agent_instances: {
149
+ class: 'local-only',
150
+ status: 'draft',
151
+ source: 'table-classification-draft.md',
152
+ },
153
+ architecture_decisions: {
154
+ class: 'portable-project',
155
+ status: 'draft',
156
+ source: 'table-classification-draft.md',
157
+ },
158
+ attachment_refs: {
159
+ class: 'portable-project',
160
+ status: 'draft',
161
+ source: 'table-classification-draft.md',
162
+ },
163
+ attachments: {
164
+ class: 'portable-project',
165
+ status: 'draft',
166
+ source: 'table-classification-draft.md',
167
+ },
168
+ audit_log: {
169
+ class: 'portable-project',
170
+ status: 'resolved',
171
+ source: 'cleo-dev §F.8 (union into tasks_audit_log by T12535)',
172
+ },
173
+ background_jobs: {
174
+ class: 'local-only',
175
+ status: 'draft',
176
+ source: 'table-classification-draft.md',
177
+ },
178
+ brain_attention: {
179
+ class: 'portable-personal',
180
+ status: 'resolved',
181
+ source: 'cleo-dev ruling 2026-09-28',
182
+ note: 'named in the ruling',
183
+ },
184
+ brain_backfill_runs: {
185
+ class: 'portable-personal',
186
+ status: 'resolved',
187
+ source: 'cleo-dev ruling 2026-09-28',
188
+ note: 'operator workflow history',
189
+ },
190
+ brain_consolidation_events: {
191
+ class: 'portable-personal',
192
+ status: 'resolved',
193
+ source: 'cleo-dev ruling 2026-09-28',
194
+ note: 'sleep-cycle run history',
195
+ },
196
+ brain_decisions: {
197
+ class: 'portable-project',
198
+ status: 'resolved',
199
+ source: 'cleo-dev §F.9 (brain_decisions defaults to project)',
200
+ rowRouting: {
201
+ column: 'peer_scope',
202
+ routes: {},
203
+ reason: "draft §0.3 / §F.9: peer_scope is the per-row personal/project switch. The value→class map is pending: the column defaults to 'project' on every row today, so a value route would promote every memory",
204
+ },
205
+ },
206
+ brain_decisions_fts: {
207
+ class: 'derived',
208
+ status: 'draft',
209
+ source: 'table-classification-draft.md',
210
+ },
211
+ brain_deriver_queue: {
212
+ class: 'local-only',
213
+ status: 'draft',
214
+ source: 'table-classification-draft.md',
215
+ },
216
+ brain_embeddings: {
217
+ class: 'portable-personal',
218
+ status: 'needs-owner-call',
219
+ source: 'cleo-dev ruling 2026-09-28',
220
+ note: 'embeddings are NOT derived under the ruling (they cost money to regenerate). vec0 is a virtual table the session extension cannot capture, so it must ship as a content-addressed cache blob; its _rowids/_chunks/_vector_chunks/_info shadows stay derived by pattern',
221
+ },
222
+ brain_learnings: {
223
+ class: 'portable-personal',
224
+ status: 'draft',
225
+ source: 'table-classification-draft.md',
226
+ rowRouting: {
227
+ column: 'peer_scope',
228
+ routes: {},
229
+ reason: "draft §0.3 / §F.9: peer_scope is the per-row personal/project switch. The value→class map is pending: the column defaults to 'project' on every row today, so a value route would promote every memory",
230
+ },
231
+ },
232
+ brain_learnings_fts: {
233
+ class: 'derived',
234
+ status: 'draft',
235
+ source: 'table-classification-draft.md',
236
+ },
237
+ brain_memory_links: {
238
+ class: 'portable-personal',
239
+ status: 'resolved',
240
+ source: 'cleo-dev ruling 2026-09-28',
241
+ note: 'named in the ruling',
242
+ },
243
+ brain_memory_trees: {
244
+ class: 'portable-personal',
245
+ status: 'needs-owner-call',
246
+ source: 'cleo-dev ruling 2026-09-28',
247
+ note: 'surprisal clustering output, so not derived under the ruling. Its id is an INTEGER autoincrement, so rows need a uid before they can merge; brain_observations.tree_id keeps its strip override until then',
248
+ },
249
+ brain_modulators: {
250
+ class: 'portable-personal',
251
+ status: 'resolved',
252
+ source: 'cleo-dev ruling 2026-09-28',
253
+ note: 'cleo-dev ruling (final, 2026-09-28): learned modulator state syncs',
254
+ },
255
+ brain_observations: {
256
+ class: 'portable-personal',
257
+ status: 'draft',
258
+ source: 'table-classification-draft.md',
259
+ rowRouting: {
260
+ column: 'peer_scope',
261
+ routes: {},
262
+ reason: "draft §0.3 / §F.9: peer_scope is the per-row personal/project switch. The value→class map is pending: the column defaults to 'project' on every row today, so a value route would promote every memory",
263
+ },
264
+ columns: [
265
+ {
266
+ column: 'tree_id',
267
+ class: 'strip',
268
+ reason: '§F.10: points at derived brain_memory_trees (AI id); null it in ops and recompute',
269
+ },
270
+ ],
271
+ },
272
+ brain_observations_fts: {
273
+ class: 'derived',
274
+ status: 'draft',
275
+ source: 'table-classification-draft.md',
276
+ },
277
+ brain_observations_staging: {
278
+ class: 'portable-personal',
279
+ status: 'resolved',
280
+ source: 'cleo-dev ruling 2026-09-28',
281
+ note: 'sweep staging; same family as brain_v2_candidate, which the ruling names',
282
+ },
283
+ brain_page_edges: {
284
+ class: 'portable-personal',
285
+ status: 'resolved',
286
+ source: 'cleo-dev ruling 2026-09-28',
287
+ note: 'brain graph written by consolidation (163,969 rows live); weight/reinforcement_count are in-place counters',
288
+ },
289
+ brain_page_nodes: {
290
+ class: 'portable-personal',
291
+ status: 'resolved',
292
+ source: 'cleo-dev ruling 2026-09-28',
293
+ note: 'brain graph written by consolidation and graph-auto-populate, not by nexus analyze; carries reinforcement counters',
294
+ },
295
+ brain_patterns: {
296
+ class: 'portable-personal',
297
+ status: 'resolved',
298
+ source: 'cleo-dev ruling 2026-09-28',
299
+ note: 'writer verified: memory/specialists.ts (LLM Induction/CodePattern specialists) and sleep-consolidation.ts',
300
+ },
301
+ brain_patterns_fts: {
302
+ class: 'derived',
303
+ status: 'draft',
304
+ source: 'table-classification-draft.md',
305
+ },
306
+ brain_plasticity_events: {
307
+ class: 'local-only',
308
+ status: 'resolved',
309
+ source: 'cleo-dev ruling 2026-09-28',
310
+ note: 'cleo-dev ruling (final, 2026-09-28): local-only for row sync (14M+ inserts ever, draft §D); still tier-1 backed up. A new device gets the CURRENT learned weights through a follow-up projection or snapshot blob (see the module doc), not this event history',
311
+ },
312
+ brain_promotion_log: {
313
+ class: 'portable-personal',
314
+ status: 'resolved',
315
+ source: 'cleo-dev ruling 2026-09-28',
316
+ note: 'named in the ruling',
317
+ },
318
+ brain_release_links: {
319
+ class: 'local-only',
320
+ status: 'frozen-legacy',
321
+ source: 'draft §2.2',
322
+ dropTask: 'T12535',
323
+ liveTwin: 'tasks_brain_release_links',
324
+ },
325
+ brain_retrieval_log: {
326
+ class: 'portable-personal',
327
+ status: 'needs-owner-call',
328
+ source: 'cleo-dev ruling 2026-09-28',
329
+ note: '"all brain_*" per the ruling, but it is retrieval telemetry (2,030 rows); confirm it carries knowledge',
330
+ },
331
+ brain_schema_meta: {
332
+ class: 'local-only',
333
+ status: 'draft',
334
+ source: 'table-classification-draft.md',
335
+ },
336
+ brain_session_narrative: {
337
+ class: 'portable-personal',
338
+ status: 'draft',
339
+ source: 'table-classification-draft.md',
340
+ },
341
+ brain_sticky_notes: {
342
+ class: 'portable-personal',
343
+ status: 'draft',
344
+ source: 'table-classification-draft.md',
345
+ },
346
+ brain_sticky_tags: {
347
+ class: 'portable-personal',
348
+ status: 'draft',
349
+ source: 'table-classification-draft.md',
350
+ },
351
+ brain_task_observations: {
352
+ class: 'portable-personal',
353
+ status: 'resolved',
354
+ source: 'cleo-dev ruling 2026-09-28',
355
+ note: 'named in the ruling; INTEGER autoincrement PK needs a uid before merge',
356
+ },
357
+ brain_transcript_events: {
358
+ class: 'portable-personal',
359
+ status: 'resolved',
360
+ source: 'cleo-dev ruling 2026-09-28',
361
+ note: 'named in the ruling; raw transcripts are PII-heavy',
362
+ },
363
+ brain_usage_log: {
364
+ class: 'portable-personal',
365
+ status: 'needs-owner-call',
366
+ source: 'cleo-dev ruling 2026-09-28',
367
+ note: '"all brain_*" per the ruling, but it is feedback telemetry (10,152 rows) that drives quality scores; confirm',
368
+ },
369
+ brain_v2_candidate: {
370
+ class: 'portable-personal',
371
+ status: 'resolved',
372
+ source: 'cleo-dev ruling 2026-09-28',
373
+ note: 'named in the ruling; pre-T1402 name of brain_observations_staging, dropped by T12535',
374
+ },
375
+ brain_weight_history: {
376
+ class: 'local-only',
377
+ status: 'resolved',
378
+ source: 'cleo-dev ruling 2026-09-28',
379
+ note: 'cleo-dev ruling (final, 2026-09-28): local-only for row sync (14M+ inserts ever, draft §D); still tier-1 backed up. A new device gets the CURRENT learned weights through a follow-up projection or snapshot blob (see the module doc), not this event history',
380
+ },
381
+ commit_files: {
382
+ class: 'local-only',
383
+ status: 'frozen-legacy',
384
+ source: 'draft §2.2',
385
+ dropTask: 'T12535',
386
+ liveTwin: 'tasks_commit_files',
387
+ },
388
+ commits: {
389
+ class: 'local-only',
390
+ status: 'frozen-legacy',
391
+ source: 'draft §2.2',
392
+ dropTask: 'T12535',
393
+ liveTwin: 'tasks_commits',
394
+ },
395
+ conduit_attachment_approvals: {
396
+ class: 'portable-project',
397
+ status: 'needs-owner-call',
398
+ source: 'cleo-dev ruling 2026-09-28',
399
+ note: 'ruling: conduit_* sync (agents need handoff history across devices). No secret column found. Merge scope project (not personal) is my proposal',
400
+ },
401
+ conduit_attachment_contributors: {
402
+ class: 'portable-project',
403
+ status: 'needs-owner-call',
404
+ source: 'cleo-dev ruling 2026-09-28',
405
+ note: 'ruling: conduit_* sync (agents need handoff history across devices). No secret column found. Merge scope project (not personal) is my proposal',
406
+ },
407
+ conduit_attachment_versions: {
408
+ class: 'portable-project',
409
+ status: 'needs-owner-call',
410
+ source: 'cleo-dev ruling 2026-09-28',
411
+ note: 'ruling: conduit_* sync (agents need handoff history across devices). No secret column found. Merge scope project (not personal) is my proposal',
412
+ },
413
+ conduit_attachments: {
414
+ class: 'portable-project',
415
+ status: 'needs-owner-call',
416
+ source: 'cleo-dev ruling 2026-09-28',
417
+ note: 'ruling: conduit_* sync (agents need handoff history across devices). No secret column found. Merge scope project (not personal) is my proposal',
418
+ },
419
+ conduit_conversations: {
420
+ class: 'portable-project',
421
+ status: 'needs-owner-call',
422
+ source: 'cleo-dev ruling 2026-09-28',
423
+ note: 'ruling: conduit_* sync (agents need handoff history across devices). No secret column found. Merge scope project (not personal) is my proposal',
424
+ },
425
+ conduit_dead_letters: {
426
+ class: 'local-only',
427
+ status: 'resolved',
428
+ source: 'cleo-dev ruling 2026-09-28',
429
+ note: 'ruling keeps queues/delivery state device-local',
430
+ },
431
+ conduit_delivery_jobs: {
432
+ class: 'local-only',
433
+ status: 'resolved',
434
+ source: 'cleo-dev ruling 2026-09-28',
435
+ note: 'ruling keeps queues/delivery state device-local',
436
+ },
437
+ conduit_message_pins: {
438
+ class: 'portable-project',
439
+ status: 'needs-owner-call',
440
+ source: 'cleo-dev ruling 2026-09-28',
441
+ note: 'ruling: conduit_* sync (agents need handoff history across devices). No secret column found. Merge scope project (not personal) is my proposal',
442
+ },
443
+ conduit_messages: {
444
+ class: 'portable-project',
445
+ status: 'needs-owner-call',
446
+ source: 'cleo-dev ruling 2026-09-28',
447
+ note: 'ruling: conduit_* sync (agents need handoff history across devices). No secret column found. Merge scope project (not personal) is my proposal',
448
+ },
449
+ conduit_messages_fts: {
450
+ class: 'derived',
451
+ status: 'draft',
452
+ source: 'table-classification-draft.md',
453
+ },
454
+ conduit_project_agent_refs: {
455
+ class: 'portable-project',
456
+ status: 'needs-owner-call',
457
+ source: 'cleo-dev ruling 2026-09-28',
458
+ note: 'ruling: conduit_* sync (agents need handoff history across devices). No secret column found. Merge scope project (not personal) is my proposal',
459
+ },
460
+ conduit_topic_message_acks: {
461
+ class: 'portable-personal',
462
+ status: 'resolved',
463
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
464
+ note: "supersedes the first ruling (queues device-local): an ack is the owner's read state, and a message acked on one device must not re-deliver on another",
465
+ },
466
+ conduit_topic_messages: {
467
+ class: 'portable-project',
468
+ status: 'needs-owner-call',
469
+ source: 'cleo-dev ruling 2026-09-28',
470
+ note: 'ruling: conduit_* sync (agents need handoff history across devices). No secret column found. Merge scope project (not personal) is my proposal',
471
+ },
472
+ conduit_topic_subscriptions: {
473
+ class: 'portable-project',
474
+ status: 'needs-owner-call',
475
+ source: 'cleo-dev ruling 2026-09-28',
476
+ note: 'ruling: conduit_* sync (agents need handoff history across devices). No secret column found. Merge scope project (not personal) is my proposal',
477
+ },
478
+ conduit_topics: {
479
+ class: 'portable-project',
480
+ status: 'needs-owner-call',
481
+ source: 'cleo-dev ruling 2026-09-28',
482
+ note: 'ruling: conduit_* sync (agents need handoff history across devices). No secret column found. Merge scope project (not personal) is my proposal',
483
+ },
484
+ deriver_queue: { class: 'local-only', status: 'draft', source: 'table-classification-draft.md' },
485
+ docs_attachment_refs: {
486
+ class: 'portable-project',
487
+ status: 'draft',
488
+ source: 'table-classification-draft.md',
489
+ },
490
+ docs_attachments: {
491
+ class: 'portable-project',
492
+ status: 'draft',
493
+ source: 'table-classification-draft.md',
494
+ },
495
+ docs_manifest_entries: {
496
+ class: 'portable-project',
497
+ status: 'needs-owner-call',
498
+ source: 'cleo-dev ruling 2026-09-28',
499
+ note: 'ruling: manifests. output_file was not verified to be repo-relative, so it is held device-local until confirmed',
500
+ columns: [
501
+ {
502
+ column: 'output_file',
503
+ class: 'local-only',
504
+ reason: 'may hold an absolute path; unverified',
505
+ },
506
+ ],
507
+ },
508
+ docs_pipeline_manifest: {
509
+ class: 'portable-project',
510
+ status: 'resolved',
511
+ source: 'cleo-dev ruling 2026-09-28',
512
+ note: 'ruling: manifests; source_file is written repo-relative (memory/manifest-ingestion.ts)',
513
+ },
514
+ docs_wikilinks: {
515
+ class: 'portable-project',
516
+ status: 'resolved',
517
+ source: 'cleo-dev ruling 2026-09-28',
518
+ note: 'ruling: docs_*; parsed links are not in the narrow derived set',
519
+ },
520
+ evidence_ac_bindings: {
521
+ class: 'local-only',
522
+ status: 'frozen-legacy',
523
+ source: 'draft §2.2',
524
+ dropTask: 'T12535',
525
+ liveTwin: 'tasks_evidence_ac_bindings',
526
+ },
527
+ experiments: {
528
+ class: 'portable-project',
529
+ status: 'resolved',
530
+ source: 'cleo-dev ruling 2026-09-28',
531
+ note: 'ruling: experiments (both twins)',
532
+ },
533
+ external_task_links: {
534
+ class: 'local-only',
535
+ status: 'frozen-legacy',
536
+ source: 'draft §2.2',
537
+ dropTask: 'T12535',
538
+ liveTwin: 'tasks_external_task_links',
539
+ },
540
+ lifecycle_evidence: {
541
+ class: 'local-only',
542
+ status: 'frozen-legacy',
543
+ source: 'draft §2.2',
544
+ dropTask: 'T12535',
545
+ liveTwin: 'tasks_lifecycle_evidence',
546
+ },
547
+ lifecycle_gate_results: {
548
+ class: 'local-only',
549
+ status: 'frozen-legacy',
550
+ source: 'draft §2.2',
551
+ dropTask: 'T12535',
552
+ liveTwin: 'tasks_lifecycle_gate_results',
553
+ },
554
+ lifecycle_pipelines: {
555
+ class: 'local-only',
556
+ status: 'frozen-legacy',
557
+ source: 'draft §2.2',
558
+ dropTask: 'T12535',
559
+ liveTwin: 'tasks_lifecycle_pipelines',
560
+ },
561
+ lifecycle_stages: {
562
+ class: 'local-only',
563
+ status: 'frozen-legacy',
564
+ source: 'draft §2.2',
565
+ dropTask: 'T12535',
566
+ liveTwin: 'tasks_lifecycle_stages',
567
+ },
568
+ lifecycle_transitions: {
569
+ class: 'local-only',
570
+ status: 'frozen-legacy',
571
+ source: 'draft §2.2',
572
+ dropTask: 'T12535',
573
+ liveTwin: 'tasks_lifecycle_transitions',
574
+ },
575
+ manifest_entries: {
576
+ class: 'portable-project',
577
+ status: 'needs-owner-call',
578
+ source: 'cleo-dev ruling 2026-09-28',
579
+ note: 'ruling: manifests. output_file was not verified to be repo-relative, so it is held device-local until confirmed',
580
+ columns: [
581
+ {
582
+ column: 'output_file',
583
+ class: 'local-only',
584
+ reason: 'may hold an absolute path; unverified',
585
+ },
586
+ ],
587
+ },
588
+ nexus_code_index: {
589
+ class: 'derived',
590
+ status: 'draft',
591
+ source: 'draft §1.9 (rebuilt by cleo nexus analyze)',
592
+ },
593
+ nexus_contracts: {
594
+ class: 'derived',
595
+ status: 'draft',
596
+ source: 'draft §1.9 (rebuilt by cleo nexus analyze)',
597
+ },
598
+ nexus_nodes: {
599
+ class: 'derived',
600
+ status: 'draft',
601
+ source: 'draft §1.9 (rebuilt by cleo nexus analyze)',
602
+ },
603
+ nexus_relation_weights: {
604
+ class: 'portable-personal',
605
+ status: 'needs-owner-call',
606
+ source: 'cleo-dev ruling 2026-09-28',
607
+ note: 'co-access weights come from usage, not from `nexus analyze`, so they are outside the narrow derived set; confirm whether they carry knowledge',
608
+ },
609
+ nexus_relations: {
610
+ class: 'derived',
611
+ status: 'draft',
612
+ source: 'draft §1.9 (rebuilt by cleo nexus analyze)',
613
+ },
614
+ nexus_symbols_fts: { class: 'derived', status: 'draft', source: 'table-classification-draft.md' },
615
+ pi_session_entries: {
616
+ class: 'portable-personal',
617
+ status: 'resolved',
618
+ source: 'cleo-dev ruling 2026-09-28',
619
+ note: 'ruling: agent session history; personal like sessions',
620
+ },
621
+ pi_session_leaf: {
622
+ class: 'portable-personal',
623
+ status: 'resolved',
624
+ source: 'cleo-dev ruling 2026-09-28',
625
+ note: 'ruling: agent session history; personal like sessions',
626
+ },
627
+ pipeline_manifest: {
628
+ class: 'portable-project',
629
+ status: 'resolved',
630
+ source: 'cleo-dev ruling 2026-09-28',
631
+ note: 'live bare twin; ruling: pipeline_manifest',
632
+ },
633
+ playbook_approvals: {
634
+ class: 'portable-project',
635
+ status: 'resolved',
636
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
637
+ note: 'both twins carry the ruling (the exodus map pairs playbook_approvals with tasks_playbook_approvals)',
638
+ columns: [
639
+ {
640
+ column: 'token',
641
+ class: 'portable-secret',
642
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
643
+ },
644
+ ],
645
+ },
646
+ playbook_runs: {
647
+ class: 'portable-project',
648
+ status: 'resolved',
649
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
650
+ note: 'both twins carry the ruling (exodus map: playbook_runs ↔ tasks_playbook_runs)',
651
+ },
652
+ pr_commits: {
653
+ class: 'local-only',
654
+ status: 'frozen-legacy',
655
+ source: 'draft §2.2',
656
+ dropTask: 'T12535',
657
+ liveTwin: 'tasks_pr_commits',
658
+ },
659
+ pr_tasks: {
660
+ class: 'local-only',
661
+ status: 'frozen-legacy',
662
+ source: 'draft §2.2',
663
+ dropTask: 'T12535',
664
+ liveTwin: 'tasks_pr_tasks',
665
+ },
666
+ pull_requests: {
667
+ class: 'local-only',
668
+ status: 'frozen-legacy',
669
+ source: 'draft §2.2',
670
+ dropTask: 'T12535',
671
+ liveTwin: 'tasks_pull_requests',
672
+ },
673
+ release_artifacts: {
674
+ class: 'local-only',
675
+ status: 'frozen-legacy',
676
+ source: 'draft §2.2',
677
+ dropTask: 'T12535',
678
+ liveTwin: 'tasks_release_artifacts',
679
+ note: 'The JSON seed applied §F.11 to this bare twin; §F.11 rules on the live prefixed tasks_release_artifacts, and §2.2 lists the bare table as frozen',
680
+ },
681
+ release_changes: {
682
+ class: 'local-only',
683
+ status: 'frozen-legacy',
684
+ source: 'draft §2.2',
685
+ dropTask: 'T12535',
686
+ liveTwin: 'tasks_release_changes',
687
+ note: 'The JSON seed applied §F.11 to this bare twin; §F.11 rules on the live prefixed tasks_release_changes, and §2.2 lists the bare table as frozen',
688
+ },
689
+ release_changesets: {
690
+ class: 'local-only',
691
+ status: 'frozen-legacy',
692
+ source: 'draft §2.2',
693
+ dropTask: 'T12535',
694
+ liveTwin: 'tasks_release_changesets',
695
+ },
696
+ release_commits: {
697
+ class: 'local-only',
698
+ status: 'frozen-legacy',
699
+ source: 'draft §2.2',
700
+ dropTask: 'T12535',
701
+ liveTwin: 'tasks_release_commits',
702
+ },
703
+ releases: {
704
+ class: 'local-only',
705
+ status: 'frozen-legacy',
706
+ source: 'draft §2.2',
707
+ dropTask: 'T12535',
708
+ liveTwin: 'tasks_releases',
709
+ },
710
+ schedules: {
711
+ class: 'portable-project',
712
+ status: 'resolved',
713
+ source: 'cleo-dev ruling 2026-09-28',
714
+ note: 'ruling: definitions sync. The table has no lease/claim column (schedule_id, cron_expr, title, description, enabled, timestamps); execution claims live elsewhere',
715
+ },
716
+ schema_meta: {
717
+ class: 'local-only',
718
+ status: 'frozen-legacy',
719
+ source: 'T12535 PR 1 (atomic twin collapse)',
720
+ dropTask: 'T12535',
721
+ liveTwin: 'tasks_schema_meta',
722
+ note: 'physically identical to its live twin; store/twin-collapse.ts carries its rows there at every open (initial collapse, then incremental re-merge while an older build still writes it) and never writes this table',
723
+ },
724
+ selfimprove_dhq: {
725
+ class: 'portable-project',
726
+ status: 'resolved',
727
+ source: 'cleo-dev ruling 2026-09-28',
728
+ note: 'ruling: selfimprove_dhq; INTEGER id, key the uid on dhq_id',
729
+ },
730
+ session_handoff_entries: {
731
+ class: 'local-only',
732
+ status: 'frozen-legacy',
733
+ source: 'draft §2.2',
734
+ dropTask: 'T12535',
735
+ liveTwin: 'tasks_session_handoff_entries',
736
+ },
737
+ session_narrative: {
738
+ class: 'portable-personal',
739
+ status: 'draft',
740
+ source: 'table-classification-draft.md',
741
+ },
742
+ session_terminal_bindings: {
743
+ class: 'local-only',
744
+ status: 'resolved',
745
+ source: 'cleo-dev ruling 2026-09-28',
746
+ note: 'terminal identity keys (env/ppid) are meaningless off-device',
747
+ },
748
+ sessions: {
749
+ class: 'local-only',
750
+ status: 'frozen-legacy',
751
+ source: 'draft §2.2',
752
+ dropTask: 'T12535',
753
+ liveTwin: 'tasks_sessions',
754
+ columns: [
755
+ {
756
+ column: 'owner_auth_token',
757
+ class: 'portable-secret',
758
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
759
+ },
760
+ ],
761
+ },
762
+ sqlite_sequence: {
763
+ class: 'local-only',
764
+ status: 'draft',
765
+ source: 'table-classification-draft.md',
766
+ },
767
+ status_registry: {
768
+ class: 'local-only',
769
+ status: 'resolved',
770
+ source: 'cleo-dev ruling 2026-09-28',
771
+ note: 'static seed recreated by migrations; not in the narrow derived set',
772
+ },
773
+ sticky_tags: {
774
+ class: 'local-only',
775
+ status: 'frozen-legacy',
776
+ source: 'T12535 PR 1 (atomic twin collapse)',
777
+ dropTask: 'T12535',
778
+ liveTwin: 'brain_sticky_tags',
779
+ note: 'physically identical to its live twin (was portable-personal while live); store/twin-collapse.ts carries its rows there at every open (initial collapse, then incremental re-merge while an older build still writes it) and never writes this table',
780
+ },
781
+ task_acceptance_criteria: {
782
+ class: 'local-only',
783
+ status: 'frozen-legacy',
784
+ source: 'draft §2.2',
785
+ dropTask: 'T12535',
786
+ liveTwin: 'tasks_task_acceptance_criteria',
787
+ },
788
+ task_acceptance_criteria_history: {
789
+ class: 'local-only',
790
+ status: 'frozen-legacy',
791
+ source: 'draft §2.2',
792
+ dropTask: 'T12535',
793
+ liveTwin: 'tasks_task_acceptance_criteria_history',
794
+ },
795
+ task_commits: {
796
+ class: 'local-only',
797
+ status: 'frozen-legacy',
798
+ source: 'draft §2.2',
799
+ dropTask: 'T12535',
800
+ liveTwin: 'tasks_task_commits',
801
+ },
802
+ task_dependencies: {
803
+ class: 'local-only',
804
+ status: 'frozen-legacy',
805
+ source: 'draft §2.2',
806
+ dropTask: 'T12535',
807
+ liveTwin: 'tasks_task_dependencies',
808
+ },
809
+ task_labels: {
810
+ class: 'local-only',
811
+ status: 'frozen-legacy',
812
+ source: 'draft §2.2',
813
+ dropTask: 'T12535',
814
+ liveTwin: 'tasks_task_labels',
815
+ },
816
+ task_relations: {
817
+ class: 'local-only',
818
+ status: 'frozen-legacy',
819
+ source: 'draft §2.2',
820
+ dropTask: 'T12535',
821
+ liveTwin: 'tasks_task_relations',
822
+ },
823
+ task_work_history: {
824
+ class: 'local-only',
825
+ status: 'frozen-legacy',
826
+ source: 'draft §2.2',
827
+ dropTask: 'T12535',
828
+ liveTwin: 'tasks_task_work_history',
829
+ },
830
+ tasks: {
831
+ class: 'local-only',
832
+ status: 'frozen-legacy',
833
+ source: 'draft §2.2',
834
+ dropTask: 'T12535',
835
+ liveTwin: 'tasks_tasks',
836
+ },
837
+ tasks_acceptance_projection_dirty: {
838
+ class: 'portable-project',
839
+ status: 'resolved',
840
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
841
+ note: 'derived only if a deterministic rebuild path exists, and none does: the only writer is the seed INSERT in migrations/drizzle-tasks/20260525000070_t10570-acceptance-projection-state/migration.sql:27; tasks/ac-table.ts:531 rebuildChildProjectionAc rebuilds child_task criterion rows, never this table, and doctor/acceptance-drift.ts:46 documents it as unmaintained since 2026-05-26',
842
+ },
843
+ tasks_acceptance_projection_state: {
844
+ class: 'portable-project',
845
+ status: 'resolved',
846
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
847
+ note: 'derived only if a deterministic rebuild path exists, and none does: the only writer is the seed INSERT in migrations/drizzle-tasks/20260525000070_t10570-acceptance-projection-state/migration.sql:27; tasks/ac-table.ts:531 rebuildChildProjectionAc rebuilds child_task criterion rows, never this table, and doctor/acceptance-drift.ts:46 documents it as unmaintained since 2026-05-26',
848
+ },
849
+ tasks_adr_relations: {
850
+ class: 'portable-project',
851
+ status: 'draft',
852
+ source: 'table-classification-draft.md',
853
+ },
854
+ tasks_adr_task_links: {
855
+ class: 'portable-project',
856
+ status: 'draft',
857
+ source: 'table-classification-draft.md',
858
+ },
859
+ tasks_agent_credentials: {
860
+ class: 'portable-secret',
861
+ status: 'draft',
862
+ source: 'table-classification-draft.md',
863
+ columns: [
864
+ {
865
+ column: 'api_key_encrypted',
866
+ class: 'portable-secret',
867
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
868
+ },
869
+ ],
870
+ },
871
+ tasks_agent_error_log: {
872
+ class: 'portable-project',
873
+ status: 'resolved',
874
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
875
+ },
876
+ tasks_agent_instances: {
877
+ class: 'local-only',
878
+ status: 'draft',
879
+ source: 'table-classification-draft.md',
880
+ },
881
+ tasks_architecture_decisions: {
882
+ class: 'portable-project',
883
+ status: 'draft',
884
+ source: 'table-classification-draft.md',
885
+ },
886
+ tasks_audit_log: { class: 'portable-project', status: 'resolved', source: 'cleo-dev §F.8' },
887
+ tasks_background_jobs: {
888
+ class: 'local-only',
889
+ status: 'draft',
890
+ source: 'table-classification-draft.md',
891
+ },
892
+ tasks_brain_release_links: {
893
+ class: 'portable-project',
894
+ status: 'draft',
895
+ source: 'table-classification-draft.md',
896
+ },
897
+ tasks_commit_files: {
898
+ class: 'portable-project',
899
+ status: 'resolved',
900
+ source: 'cleo-dev ruling 2026-09-28',
901
+ note: 'ruling: PR/commit/release links replicate, ALL rows (history is cheap)',
902
+ },
903
+ tasks_commits: {
904
+ class: 'portable-project',
905
+ status: 'resolved',
906
+ source: 'cleo-dev ruling 2026-09-28',
907
+ note: 'ruling: PR/commit/release links replicate, ALL rows (history is cheap)',
908
+ columns: [
909
+ {
910
+ column: 'project_hash',
911
+ class: 'local-only',
912
+ reason: 'path-derived hash of the project root on this device (ADR-094)',
913
+ },
914
+ ],
915
+ },
916
+ tasks_evidence_ac_bindings: {
917
+ class: 'portable-project',
918
+ status: 'draft',
919
+ source: 'table-classification-draft.md',
920
+ },
921
+ tasks_experiments: {
922
+ class: 'portable-project',
923
+ status: 'resolved',
924
+ source: 'cleo-dev ruling 2026-09-28',
925
+ note: 'ruling: experiments (both twins)',
926
+ },
927
+ tasks_external_task_links: {
928
+ class: 'portable-project',
929
+ status: 'draft',
930
+ source: 'table-classification-draft.md',
931
+ },
932
+ tasks_goal: {
933
+ class: 'portable-project',
934
+ status: 'resolved',
935
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
936
+ note: 'per-agent goal state (turn budget, verdict); an agent resuming on another device needs it. No bare `goal` twin exists',
937
+ },
938
+ tasks_lifecycle_evidence: {
939
+ class: 'portable-project',
940
+ status: 'draft',
941
+ source: 'table-classification-draft.md',
942
+ },
943
+ tasks_lifecycle_gate_results: {
944
+ class: 'portable-project',
945
+ status: 'draft',
946
+ source: 'table-classification-draft.md',
947
+ },
948
+ tasks_lifecycle_pipelines: {
949
+ class: 'portable-project',
950
+ status: 'draft',
951
+ source: 'table-classification-draft.md',
952
+ },
953
+ tasks_lifecycle_stages: {
954
+ class: 'portable-project',
955
+ status: 'draft',
956
+ source: 'table-classification-draft.md',
957
+ },
958
+ tasks_lifecycle_transitions: {
959
+ class: 'portable-project',
960
+ status: 'draft',
961
+ source: 'table-classification-draft.md',
962
+ },
963
+ tasks_playbook_approvals: {
964
+ class: 'portable-project',
965
+ status: 'resolved',
966
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
967
+ columns: [
968
+ {
969
+ column: 'token',
970
+ class: 'portable-secret',
971
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
972
+ },
973
+ ],
974
+ },
975
+ tasks_playbook_runs: {
976
+ class: 'portable-project',
977
+ status: 'resolved',
978
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
979
+ },
980
+ tasks_pr_commits: {
981
+ class: 'portable-project',
982
+ status: 'resolved',
983
+ source: 'cleo-dev ruling 2026-09-28',
984
+ note: 'ruling: PR/commit/release links replicate, ALL rows (history is cheap)',
985
+ },
986
+ tasks_pr_tasks: {
987
+ class: 'portable-project',
988
+ status: 'resolved',
989
+ source: 'cleo-dev ruling 2026-09-28',
990
+ note: 'ruling: PR/commit/release links replicate, ALL rows (history is cheap)',
991
+ },
992
+ tasks_pull_requests: {
993
+ class: 'portable-project',
994
+ status: 'resolved',
995
+ source: 'cleo-dev ruling 2026-09-28',
996
+ note: 'ruling: PR/commit/release links replicate, ALL rows (history is cheap)',
997
+ columns: [
998
+ {
999
+ column: 'project_hash',
1000
+ class: 'local-only',
1001
+ reason: 'path-derived hash of the project root on this device (ADR-094)',
1002
+ },
1003
+ ],
1004
+ },
1005
+ tasks_release_artifacts: {
1006
+ class: 'portable-project',
1007
+ status: 'resolved',
1008
+ source: 'cleo-dev §F.11',
1009
+ },
1010
+ tasks_release_changes: {
1011
+ class: 'portable-project',
1012
+ status: 'resolved',
1013
+ source: 'cleo-dev §F.11',
1014
+ },
1015
+ tasks_release_changesets: {
1016
+ class: 'portable-project',
1017
+ status: 'resolved',
1018
+ source: 'cleo-dev ruling 2026-09-28',
1019
+ note: 'ruling: PR/commit/release links replicate, ALL rows (history is cheap)',
1020
+ },
1021
+ tasks_release_commits: {
1022
+ class: 'portable-project',
1023
+ status: 'resolved',
1024
+ source: 'cleo-dev ruling 2026-09-28',
1025
+ note: 'ruling: PR/commit/release links replicate, ALL rows (history is cheap)',
1026
+ },
1027
+ tasks_releases: {
1028
+ class: 'portable-project',
1029
+ status: 'resolved',
1030
+ source: 'cleo-dev §F.11',
1031
+ columns: [
1032
+ {
1033
+ column: 'project_hash',
1034
+ class: 'local-only',
1035
+ reason: 'path-derived hash of the project root on this device (ADR-094)',
1036
+ },
1037
+ ],
1038
+ },
1039
+ tasks_schema_meta: {
1040
+ class: 'local-only',
1041
+ status: 'draft',
1042
+ source: 'table-classification-draft.md',
1043
+ },
1044
+ tasks_session_handoff_entries: {
1045
+ class: 'portable-personal',
1046
+ status: 'draft',
1047
+ source: 'table-classification-draft.md',
1048
+ },
1049
+ tasks_sessions: {
1050
+ class: 'portable-personal',
1051
+ status: 'resolved',
1052
+ source: 'cleo-dev §F.7',
1053
+ columns: [
1054
+ {
1055
+ column: 'owner_auth_token',
1056
+ class: 'portable-secret',
1057
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1058
+ },
1059
+ ],
1060
+ },
1061
+ tasks_status_registry: {
1062
+ class: 'local-only',
1063
+ status: 'resolved',
1064
+ source: 'cleo-dev ruling 2026-09-28',
1065
+ note: 'static seed recreated by migrations; not in the narrow derived set',
1066
+ },
1067
+ tasks_task_acceptance_criteria: {
1068
+ class: 'portable-project',
1069
+ status: 'draft',
1070
+ source: 'table-classification-draft.md',
1071
+ },
1072
+ tasks_task_acceptance_criteria_history: {
1073
+ class: 'portable-project',
1074
+ status: 'draft',
1075
+ source: 'table-classification-draft.md',
1076
+ },
1077
+ tasks_task_commits: {
1078
+ class: 'portable-project',
1079
+ status: 'resolved',
1080
+ source: 'cleo-dev ruling 2026-09-28',
1081
+ note: 'ruling: PR/commit/release links replicate, ALL rows (history is cheap)',
1082
+ },
1083
+ tasks_task_dependencies: {
1084
+ class: 'portable-project',
1085
+ status: 'draft',
1086
+ source: 'table-classification-draft.md',
1087
+ },
1088
+ tasks_task_labels: {
1089
+ class: 'portable-project',
1090
+ status: 'draft',
1091
+ source: 'table-classification-draft.md',
1092
+ },
1093
+ tasks_task_relations: {
1094
+ class: 'portable-project',
1095
+ status: 'draft',
1096
+ source: 'table-classification-draft.md',
1097
+ },
1098
+ tasks_task_work_history: {
1099
+ class: 'portable-personal',
1100
+ status: 'resolved',
1101
+ source: 'cleo-dev ruling 2026-09-28',
1102
+ note: 'ruling: work history syncs; personal per §F.7 (sessions are personal)',
1103
+ },
1104
+ tasks_tasks: {
1105
+ class: 'portable-project',
1106
+ status: 'draft',
1107
+ source: 'table-classification-draft.md',
1108
+ columns: [
1109
+ {
1110
+ column: 'verification_json',
1111
+ class: 'strip',
1112
+ jsonPath: '$.evidence.*.atoms[*].resolvedPath',
1113
+ reason: '§F.14 / PR #1570: evidence resolvedPath is an absolute path on the verifying device (ADR-094)',
1114
+ },
1115
+ ],
1116
+ },
1117
+ tasks_token_usage: {
1118
+ class: 'portable-personal',
1119
+ status: 'needs-owner-call',
1120
+ source: 'cleo-dev ruling 2026-09-28',
1121
+ note: 'ruling: token_usage is portable (cost history). Merge scope personal is my proposal (keyed by session, and sessions are personal)',
1122
+ },
1123
+ tasks_warp_chain_instances: {
1124
+ class: 'portable-project',
1125
+ status: 'resolved',
1126
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
1127
+ },
1128
+ tasks_warp_chains: {
1129
+ class: 'portable-project',
1130
+ status: 'draft',
1131
+ source: 'table-classification-draft.md',
1132
+ },
1133
+ token_usage: {
1134
+ class: 'portable-personal',
1135
+ status: 'needs-owner-call',
1136
+ source: 'cleo-dev ruling 2026-09-28',
1137
+ note: 'live bare twin of tasks_token_usage; same ruling',
1138
+ },
1139
+ warp_chain_instances: {
1140
+ class: 'portable-project',
1141
+ status: 'resolved',
1142
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
1143
+ note: 'supersedes draft §2.1 (P / L): running chain instances resume on another device. Both twins carry the ruling',
1144
+ },
1145
+ warp_chains: {
1146
+ class: 'portable-project',
1147
+ status: 'draft',
1148
+ source: 'table-classification-draft.md',
1149
+ },
1150
+ };
1151
+ const GLOBAL_TABLES = {
1152
+ __catalog_meta: {
1153
+ class: 'local-only',
1154
+ status: 'optional-transient',
1155
+ source: 'draft §3',
1156
+ note: 'created lazily by llm/catalog-seeder.ts',
1157
+ },
1158
+ __drizzle_migrations: { class: 'local-only', status: 'draft', source: 'draft §3' },
1159
+ _agent_registry_meta: { class: 'local-only', status: 'draft', source: 'draft §3' },
1160
+ _agent_registry_migrations: { class: 'local-only', status: 'draft', source: 'draft §3' },
1161
+ _writer_leases: { class: 'local-only', status: 'draft', source: 'draft §3' },
1162
+ _writer_queue: { class: 'local-only', status: 'draft', source: 'draft §3' },
1163
+ accounts: {
1164
+ class: 'portable-secret',
1165
+ status: 'draft',
1166
+ source: 'draft §3',
1167
+ columns: [
1168
+ {
1169
+ column: 'secret_enc',
1170
+ class: 'portable-secret',
1171
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1172
+ },
1173
+ {
1174
+ column: 'refresh_enc',
1175
+ class: 'portable-secret',
1176
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1177
+ },
1178
+ ],
1179
+ },
1180
+ agent_registry_accounts: {
1181
+ class: 'portable-secret',
1182
+ status: 'draft',
1183
+ source: 'draft §3',
1184
+ columns: [
1185
+ {
1186
+ column: 'access_token',
1187
+ class: 'portable-secret',
1188
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1189
+ },
1190
+ {
1191
+ column: 'refresh_token',
1192
+ class: 'portable-secret',
1193
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1194
+ },
1195
+ {
1196
+ column: 'id_token',
1197
+ class: 'portable-secret',
1198
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1199
+ },
1200
+ {
1201
+ column: 'password',
1202
+ class: 'portable-secret',
1203
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1204
+ },
1205
+ ],
1206
+ },
1207
+ agent_registry_agent_capabilities: {
1208
+ class: 'portable-personal',
1209
+ status: 'draft',
1210
+ source: 'draft §3',
1211
+ },
1212
+ agent_registry_agent_connections: { class: 'local-only', status: 'draft', source: 'draft §3' },
1213
+ agent_registry_agent_skills: { class: 'portable-personal', status: 'draft', source: 'draft §3' },
1214
+ agent_registry_agents: {
1215
+ class: 'portable-personal',
1216
+ status: 'draft',
1217
+ source: 'draft §3',
1218
+ columns: [
1219
+ {
1220
+ column: 'cant_path',
1221
+ class: 'local-only',
1222
+ reason: 'draft §3: device path or per-device counter',
1223
+ },
1224
+ {
1225
+ column: 'messages_sent',
1226
+ class: 'local-only',
1227
+ reason: 'draft §3: device path or per-device counter',
1228
+ },
1229
+ {
1230
+ column: 'messages_received',
1231
+ class: 'local-only',
1232
+ reason: 'draft §3: device path or per-device counter',
1233
+ },
1234
+ {
1235
+ column: 'conversation_count',
1236
+ class: 'local-only',
1237
+ reason: 'draft §3: device path or per-device counter',
1238
+ },
1239
+ {
1240
+ column: 'friend_count',
1241
+ class: 'local-only',
1242
+ reason: 'draft §3: device path or per-device counter',
1243
+ },
1244
+ {
1245
+ column: 'last_seen',
1246
+ class: 'local-only',
1247
+ reason: 'draft §3: device path or per-device counter',
1248
+ },
1249
+ {
1250
+ column: 'last_used_at',
1251
+ class: 'local-only',
1252
+ reason: 'draft §3: device path or per-device counter',
1253
+ },
1254
+ {
1255
+ column: 'webhook_secret',
1256
+ class: 'portable-secret',
1257
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1258
+ },
1259
+ {
1260
+ column: 'api_key_hash',
1261
+ class: 'portable-secret',
1262
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1263
+ },
1264
+ {
1265
+ column: 'api_key_encrypted',
1266
+ class: 'portable-secret',
1267
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1268
+ },
1269
+ ],
1270
+ },
1271
+ agent_registry_capabilities: { class: 'portable-personal', status: 'draft', source: 'draft §3' },
1272
+ agent_registry_claim_codes: {
1273
+ class: 'local-only',
1274
+ status: 'draft',
1275
+ source: 'draft §3',
1276
+ note: 'dormant better-auth mirror; server-authoritative if ever used',
1277
+ },
1278
+ agent_registry_org_agent_keys: { class: 'portable-secret', status: 'draft', source: 'draft §3' },
1279
+ agent_registry_organization: {
1280
+ class: 'local-only',
1281
+ status: 'draft',
1282
+ source: 'draft §3',
1283
+ note: 'dormant better-auth mirror; server-authoritative if ever used',
1284
+ },
1285
+ agent_registry_sessions: {
1286
+ class: 'local-only',
1287
+ status: 'draft',
1288
+ source: 'draft §3',
1289
+ note: 'dormant better-auth mirror; server-authoritative if ever used',
1290
+ columns: [
1291
+ {
1292
+ column: 'token',
1293
+ class: 'portable-secret',
1294
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1295
+ },
1296
+ ],
1297
+ },
1298
+ agent_registry_skills: { class: 'portable-personal', status: 'draft', source: 'draft §3' },
1299
+ agent_registry_users: {
1300
+ class: 'local-only',
1301
+ status: 'draft',
1302
+ source: 'draft §3',
1303
+ note: 'dormant better-auth mirror; server-authoritative if ever used',
1304
+ columns: [
1305
+ {
1306
+ column: 'password_hash',
1307
+ class: 'portable-secret',
1308
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1309
+ },
1310
+ ],
1311
+ },
1312
+ agent_registry_verifications: {
1313
+ class: 'local-only',
1314
+ status: 'draft',
1315
+ source: 'draft §3',
1316
+ note: 'dormant better-auth mirror; server-authoritative if ever used',
1317
+ },
1318
+ agent_service_grants: { class: 'portable-secret', status: 'draft', source: 'draft §3' },
1319
+ brain_attention: {
1320
+ class: 'portable-personal',
1321
+ status: 'resolved',
1322
+ source: 'cleo-dev ruling 2026-09-28',
1323
+ note: 'named in the ruling',
1324
+ },
1325
+ brain_backfill_runs: {
1326
+ class: 'portable-personal',
1327
+ status: 'resolved',
1328
+ source: 'cleo-dev ruling 2026-09-28',
1329
+ note: 'operator workflow history',
1330
+ },
1331
+ brain_consolidation_events: {
1332
+ class: 'portable-personal',
1333
+ status: 'resolved',
1334
+ source: 'cleo-dev ruling 2026-09-28',
1335
+ note: 'sleep-cycle run history',
1336
+ },
1337
+ brain_decisions: {
1338
+ class: 'portable-personal',
1339
+ status: 'draft',
1340
+ source: "draft §3 (the global brain is the user's)",
1341
+ rowRouting: {
1342
+ column: 'peer_scope',
1343
+ routes: {},
1344
+ reason: "draft §0.3 / §F.9: peer_scope is the per-row personal/project switch. The value→class map is pending: the column defaults to 'project' on every row today, so a value route would promote every memory",
1345
+ },
1346
+ },
1347
+ brain_deriver_queue: {
1348
+ class: 'local-only',
1349
+ status: 'draft',
1350
+ source: 'draft §3 (same split as project §1.8)',
1351
+ },
1352
+ brain_embeddings: {
1353
+ class: 'portable-personal',
1354
+ status: 'optional-transient',
1355
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
1356
+ note: 'no global binder creates the vec0 table today (store/memory-sqlite.ts initializeBrainVec runs for the project brain only), so this entry is pinned optional-transient by the Gate A test. It exists so a future global vec0 table is portable-personal like its project twin, never derived by a name pattern: embeddings cost money to regenerate',
1357
+ },
1358
+ brain_learnings: {
1359
+ class: 'portable-personal',
1360
+ status: 'draft',
1361
+ source: "draft §3 (the global brain is the user's)",
1362
+ rowRouting: {
1363
+ column: 'peer_scope',
1364
+ routes: {},
1365
+ reason: "draft §0.3 / §F.9: peer_scope is the per-row personal/project switch. The value→class map is pending: the column defaults to 'project' on every row today, so a value route would promote every memory",
1366
+ },
1367
+ },
1368
+ brain_memory_links: {
1369
+ class: 'portable-personal',
1370
+ status: 'resolved',
1371
+ source: 'cleo-dev ruling 2026-09-28',
1372
+ note: 'named in the ruling',
1373
+ },
1374
+ brain_memory_trees: {
1375
+ class: 'portable-personal',
1376
+ status: 'needs-owner-call',
1377
+ source: 'cleo-dev ruling 2026-09-28',
1378
+ note: 'surprisal clustering output, so not derived under the ruling. Its id is an INTEGER autoincrement, so rows need a uid before they can merge; brain_observations.tree_id keeps its strip override until then',
1379
+ },
1380
+ brain_modulators: {
1381
+ class: 'portable-personal',
1382
+ status: 'resolved',
1383
+ source: 'cleo-dev ruling 2026-09-28',
1384
+ note: 'cleo-dev ruling (final, 2026-09-28): learned modulator state syncs',
1385
+ },
1386
+ brain_observations: {
1387
+ class: 'portable-personal',
1388
+ status: 'draft',
1389
+ source: "draft §3 (the global brain is the user's)",
1390
+ rowRouting: {
1391
+ column: 'peer_scope',
1392
+ routes: {},
1393
+ reason: "draft §0.3 / §F.9: peer_scope is the per-row personal/project switch. The value→class map is pending: the column defaults to 'project' on every row today, so a value route would promote every memory",
1394
+ },
1395
+ columns: [
1396
+ {
1397
+ column: 'tree_id',
1398
+ class: 'strip',
1399
+ reason: '§F.10: points at derived brain_memory_trees (AI id); null it in ops and recompute',
1400
+ },
1401
+ ],
1402
+ },
1403
+ brain_observations_staging: {
1404
+ class: 'portable-personal',
1405
+ status: 'resolved',
1406
+ source: 'cleo-dev ruling 2026-09-28',
1407
+ note: 'sweep staging; same family as brain_v2_candidate, which the ruling names',
1408
+ },
1409
+ brain_page_edges: {
1410
+ class: 'portable-personal',
1411
+ status: 'resolved',
1412
+ source: 'cleo-dev ruling 2026-09-28',
1413
+ note: 'brain graph written by consolidation (163,969 rows live); weight/reinforcement_count are in-place counters',
1414
+ },
1415
+ brain_page_nodes: {
1416
+ class: 'portable-personal',
1417
+ status: 'resolved',
1418
+ source: 'cleo-dev ruling 2026-09-28',
1419
+ note: 'brain graph written by consolidation and graph-auto-populate, not by nexus analyze; carries reinforcement counters',
1420
+ },
1421
+ brain_patterns: {
1422
+ class: 'portable-personal',
1423
+ status: 'resolved',
1424
+ source: 'cleo-dev ruling 2026-09-28',
1425
+ note: 'writer verified: memory/specialists.ts (LLM Induction/CodePattern specialists) and sleep-consolidation.ts',
1426
+ },
1427
+ brain_plasticity_events: {
1428
+ class: 'local-only',
1429
+ status: 'resolved',
1430
+ source: 'cleo-dev ruling 2026-09-28',
1431
+ note: 'cleo-dev ruling (final, 2026-09-28): local-only for row sync (14M+ inserts ever, draft §D); still tier-1 backed up. A new device gets the CURRENT learned weights through a follow-up projection or snapshot blob (see the module doc), not this event history',
1432
+ },
1433
+ brain_promotion_log: {
1434
+ class: 'portable-personal',
1435
+ status: 'resolved',
1436
+ source: 'cleo-dev ruling 2026-09-28',
1437
+ note: 'named in the ruling',
1438
+ },
1439
+ brain_retrieval_log: {
1440
+ class: 'portable-personal',
1441
+ status: 'needs-owner-call',
1442
+ source: 'cleo-dev ruling 2026-09-28',
1443
+ note: '"all brain_*" per the ruling, but it is retrieval telemetry (2,030 rows); confirm it carries knowledge',
1444
+ },
1445
+ brain_schema_meta: {
1446
+ class: 'local-only',
1447
+ status: 'draft',
1448
+ source: 'draft §3 (same split as project §1.8)',
1449
+ },
1450
+ brain_session_narrative: {
1451
+ class: 'portable-personal',
1452
+ status: 'draft',
1453
+ source: "draft §3 (the global brain is the user's)",
1454
+ },
1455
+ brain_sticky_notes: {
1456
+ class: 'portable-personal',
1457
+ status: 'draft',
1458
+ source: "draft §3 (the global brain is the user's)",
1459
+ },
1460
+ brain_sticky_tags: {
1461
+ class: 'portable-personal',
1462
+ status: 'draft',
1463
+ source: "draft §3 (the global brain is the user's)",
1464
+ },
1465
+ brain_transcript_events: {
1466
+ class: 'portable-personal',
1467
+ status: 'resolved',
1468
+ source: 'cleo-dev ruling 2026-09-28',
1469
+ note: 'named in the ruling; raw transcripts are PII-heavy',
1470
+ },
1471
+ brain_usage_log: {
1472
+ class: 'portable-personal',
1473
+ status: 'needs-owner-call',
1474
+ source: 'cleo-dev ruling 2026-09-28',
1475
+ note: '"all brain_*" per the ruling, but it is feedback telemetry (10,152 rows) that drives quality scores; confirm',
1476
+ },
1477
+ brain_weight_history: {
1478
+ class: 'local-only',
1479
+ status: 'resolved',
1480
+ source: 'cleo-dev ruling 2026-09-28',
1481
+ note: 'cleo-dev ruling (final, 2026-09-28): local-only for row sync (14M+ inserts ever, draft §D); still tier-1 backed up. A new device gets the CURRENT learned weights through a follow-up projection or snapshot blob (see the module doc), not this event history',
1482
+ },
1483
+ models_catalog: {
1484
+ class: 'local-only',
1485
+ status: 'resolved',
1486
+ source: 'cleo-dev ruling 2026-09-28',
1487
+ note: 'seeded from models.dev by llm/catalog-seeder.ts; not in the narrow derived set',
1488
+ },
1489
+ nexus_audit_log: {
1490
+ class: 'portable-personal',
1491
+ status: 'resolved',
1492
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
1493
+ note: "the owner's nexus audit history; supersedes draft §3 (local-only)",
1494
+ },
1495
+ nexus_code_index: {
1496
+ class: 'derived',
1497
+ status: 'draft',
1498
+ source: 'draft §3',
1499
+ note: 'orphaned global copy (ADR-090); the graph lives in project scope',
1500
+ },
1501
+ nexus_contracts: {
1502
+ class: 'derived',
1503
+ status: 'draft',
1504
+ source: 'draft §3',
1505
+ note: 'orphaned global copy (ADR-090); the graph lives in project scope',
1506
+ },
1507
+ nexus_nodes: {
1508
+ class: 'derived',
1509
+ status: 'draft',
1510
+ source: 'draft §3',
1511
+ note: 'orphaned global copy (ADR-090); the graph lives in project scope',
1512
+ },
1513
+ nexus_project_id_aliases: {
1514
+ class: 'portable-personal',
1515
+ status: 'resolved',
1516
+ source: 'cleo-dev ruling 2026-09-28 (round 2)',
1517
+ note: 'old project ids resolve on every device the owner uses; supersedes draft §3 (local-only)',
1518
+ },
1519
+ nexus_devices: {
1520
+ class: 'portable-personal',
1521
+ status: 'resolved',
1522
+ source: 'cleo-dev ruling 2026-09-28 (round 2); drizzle-cleo-global t12510 (T12510, epic T12496)',
1523
+ note: "the owner's device list: one row per machine, so each device sees the others",
1524
+ },
1525
+ nexus_project_git_state: {
1526
+ class: 'portable-personal',
1527
+ status: 'resolved',
1528
+ source: 'drizzle-cleo-global t12511 (T12511)',
1529
+ note: 'per-device probe rows; other-device view requires sync',
1530
+ columns: [
1531
+ {
1532
+ column: 'remote_url',
1533
+ class: 'strip',
1534
+ reason: 'cleo-dev ruling 2026-09-28 (round 2): a remote URL can embed credentials (https://user:token@host); stripped from outgoing ops and re-probed on the receiver',
1535
+ },
1536
+ ],
1537
+ },
1538
+ nexus_project_locations: {
1539
+ class: 'portable-personal',
1540
+ status: 'resolved',
1541
+ source: 'cleo-dev ruling 2026-09-28 (round 2); drizzle-cleo-global t12469 / t12470 (T12469)',
1542
+ note: "per-device rows keyed (project_id, device_id, path): each device syncs its own rows so the owner can see where a project lives elsewhere; a peer never overwrites this device's path",
1543
+ },
1544
+ nexus_project_paths: { class: 'local-only', status: 'draft', source: 'draft §3' },
1545
+ nexus_project_registry: {
1546
+ class: 'portable-personal',
1547
+ status: 'draft',
1548
+ source: 'draft §3',
1549
+ columns: [
1550
+ {
1551
+ column: 'project_path',
1552
+ class: 'local-only',
1553
+ reason: 'draft §3: path, host or per-device health/counter value',
1554
+ },
1555
+ {
1556
+ column: 'brain_db_path',
1557
+ class: 'local-only',
1558
+ reason: 'draft §3: path, host or per-device health/counter value',
1559
+ },
1560
+ {
1561
+ column: 'tasks_db_path',
1562
+ class: 'local-only',
1563
+ reason: 'draft §3: path, host or per-device health/counter value',
1564
+ },
1565
+ {
1566
+ column: 'project_hash',
1567
+ class: 'local-only',
1568
+ reason: 'draft §3: path, host or per-device health/counter value',
1569
+ },
1570
+ {
1571
+ column: 'stats_json',
1572
+ class: 'local-only',
1573
+ reason: 'draft §3: path, host or per-device health/counter value',
1574
+ },
1575
+ {
1576
+ column: 'last_indexed',
1577
+ class: 'local-only',
1578
+ reason: 'draft §3: path, host or per-device health/counter value',
1579
+ },
1580
+ {
1581
+ column: 'last_seen',
1582
+ class: 'local-only',
1583
+ reason: 'draft §3: path, host or per-device health/counter value',
1584
+ },
1585
+ {
1586
+ column: 'last_sync',
1587
+ class: 'local-only',
1588
+ reason: 'draft §3: path, host or per-device health/counter value',
1589
+ },
1590
+ {
1591
+ column: 'task_count',
1592
+ class: 'local-only',
1593
+ reason: 'draft §3: path, host or per-device health/counter value',
1594
+ },
1595
+ ],
1596
+ },
1597
+ nexus_relations: {
1598
+ class: 'derived',
1599
+ status: 'draft',
1600
+ source: 'draft §3',
1601
+ note: 'orphaned global copy (ADR-090); the graph lives in project scope',
1602
+ },
1603
+ nexus_schema_meta: { class: 'local-only', status: 'draft', source: 'draft §3' },
1604
+ nexus_sigils: { class: 'portable-personal', status: 'draft', source: 'draft §3' },
1605
+ nexus_user_profile: { class: 'portable-personal', status: 'draft', source: 'draft §3' },
1606
+ pi_session_entries: {
1607
+ class: 'local-only',
1608
+ status: 'draft',
1609
+ source: 'draft §3',
1610
+ note: 'global copy exists only for DDL convergence; the store opens project scope',
1611
+ },
1612
+ pi_session_leaf: {
1613
+ class: 'local-only',
1614
+ status: 'draft',
1615
+ source: 'draft §3',
1616
+ note: 'global copy exists only for DDL convergence; the store opens project scope',
1617
+ },
1618
+ providers: {
1619
+ class: 'local-only',
1620
+ status: 'needs-owner-call',
1621
+ source: 'cleo-dev ruling 2026-09-28',
1622
+ note: 'seeded from models.dev and recreated locally; not in the narrow derived set. User-added rows (source column) would need portable-personal',
1623
+ },
1624
+ schedules: {
1625
+ class: 'local-only',
1626
+ status: 'draft',
1627
+ source: 'draft §3',
1628
+ note: 'global copy exists only for DDL convergence; the store opens project scope',
1629
+ },
1630
+ selfimprove_dhq: {
1631
+ class: 'local-only',
1632
+ status: 'draft',
1633
+ source: 'draft §3',
1634
+ note: 'global copy exists only for DDL convergence; the store opens project scope',
1635
+ },
1636
+ service_configs: {
1637
+ class: 'portable-secret',
1638
+ status: 'draft',
1639
+ source: 'draft §3',
1640
+ columns: [
1641
+ {
1642
+ column: 'client_secret_enc',
1643
+ class: 'portable-secret',
1644
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1645
+ },
1646
+ ],
1647
+ },
1648
+ service_connections: {
1649
+ class: 'portable-secret',
1650
+ status: 'draft',
1651
+ source: 'draft §3',
1652
+ columns: [
1653
+ {
1654
+ column: 'credentials_enc',
1655
+ class: 'portable-secret',
1656
+ reason: 'credential column (CREDENTIAL_COLUMNS, store/portable-bundle-scan.ts)',
1657
+ },
1658
+ ],
1659
+ },
1660
+ session_manifest: {
1661
+ class: 'local-only',
1662
+ status: 'resolved',
1663
+ source: 'cleo-dev ruling 2026-09-28',
1664
+ note: 'mirror of project sessions (which sync via the project store); carries project_path',
1665
+ },
1666
+ skills_skill_patches: { class: 'portable-personal', status: 'draft', source: 'draft §3' },
1667
+ skills_skill_reviews: {
1668
+ class: 'portable-personal',
1669
+ status: 'needs-owner-call',
1670
+ source: 'draft §3',
1671
+ },
1672
+ skills_skill_usage: {
1673
+ class: 'portable-personal',
1674
+ status: 'needs-owner-call',
1675
+ source: 'cleo-dev ruling 2026-09-28',
1676
+ note: 'usage history, by analogy with token_usage (cost history is portable); confirm',
1677
+ },
1678
+ skills_skills: {
1679
+ class: 'portable-personal',
1680
+ status: 'draft',
1681
+ source: 'draft §3',
1682
+ columns: [
1683
+ {
1684
+ column: 'install_path',
1685
+ class: 'local-only',
1686
+ reason: 'draft §3: install path on this device',
1687
+ },
1688
+ {
1689
+ column: 'canonical_path',
1690
+ class: 'local-only',
1691
+ reason: 'draft §3: install path on this device',
1692
+ },
1693
+ {
1694
+ column: 'archived_from_path',
1695
+ class: 'local-only',
1696
+ reason: 'draft §3: install path on this device',
1697
+ },
1698
+ ],
1699
+ },
1700
+ sqlite_sequence: { class: 'local-only', status: 'draft', source: 'draft §3' },
1701
+ telemetry_events: { class: 'local-only', status: 'draft', source: 'draft §3' },
1702
+ telemetry_schema_meta: { class: 'local-only', status: 'draft', source: 'draft §3' },
1703
+ };
1704
+ /**
1705
+ * FTS5 tables by their explicit base names. A pattern never classifies by a
1706
+ * bare `_fts` suffix: a future table that merely ends in `_fts` must fail
1707
+ * Gate A until someone decides it is really an index. Each base covers the
1708
+ * FTS5 virtual table itself plus its five known shadow tables.
1709
+ */
1710
+ const FTS5_BASES = [
1711
+ 'brain_decisions_fts',
1712
+ 'brain_learnings_fts',
1713
+ 'brain_observations_fts',
1714
+ 'brain_patterns_fts',
1715
+ 'conduit_messages_fts',
1716
+ 'nexus_symbols_fts',
1717
+ ];
1718
+ /** The FTS5 virtual tables above and their `_config/_content/_data/_docsize/_idx` shadows. */
1719
+ const FTS5_RULE = {
1720
+ match: `^(${FTS5_BASES.join('|')})(_(config|content|data|docsize|idx))?$`,
1721
+ class: 'derived',
1722
+ reason: 'FTS5 virtual table or shadow; rebuilt by triggers on the replica',
1723
+ };
1724
+ /**
1725
+ * The sqlite-vec (vec0) shadow tables of `brain_embeddings`, by their known
1726
+ * names. The `brain_embeddings` virtual table itself is an explicit
1727
+ * portable-personal entry in both scopes: embeddings are not derived.
1728
+ */
1729
+ const VEC0_SHADOW_RULE = {
1730
+ match: '^brain_embeddings_(chunks|info|rowids|vector_chunks[0-9]{2})$',
1731
+ class: 'derived',
1732
+ reason: 'sqlite-vec shadow table of brain_embeddings; rebuilt from the virtual table',
1733
+ };
1734
+ /** FTS5 and sqlite-vec shadow families plus exodus recovery scratch (project). */
1735
+ const PROJECT_PATTERNS = [
1736
+ FTS5_RULE,
1737
+ VEC0_SHADOW_RULE,
1738
+ {
1739
+ match: '^_exodus_recovery_.+$',
1740
+ class: 'local-only',
1741
+ reason: 'exodus recovery scratch (draft §2.3)',
1742
+ },
1743
+ ];
1744
+ /** FTS5 and sqlite-vec shadow families (global). */
1745
+ const GLOBAL_PATTERNS = [FTS5_RULE, VEC0_SHADOW_RULE];
1746
+ /** Project tables that exist but await an owner ruling; they have no class. */
1747
+ const PROJECT_PENDING = [];
1748
+ /** Global tables that exist but await an owner ruling; they have no class. */
1749
+ const GLOBAL_PENDING = [];
1750
+ /**
1751
+ * The classification registry for the project `cleo.db`.
1752
+ *
1753
+ * @task T12332
1754
+ */
1755
+ export const PROJECT_TABLE_REGISTRY = {
1756
+ scope: 'project',
1757
+ tables: PROJECT_TABLES,
1758
+ patterns: PROJECT_PATTERNS,
1759
+ pending: PROJECT_PENDING,
1760
+ };
1761
+ /**
1762
+ * The classification registry for the global `cleo.db`.
1763
+ *
1764
+ * @task T12332
1765
+ */
1766
+ export const GLOBAL_TABLE_REGISTRY = {
1767
+ scope: 'global',
1768
+ tables: GLOBAL_TABLES,
1769
+ patterns: GLOBAL_PATTERNS,
1770
+ pending: GLOBAL_PENDING,
1771
+ };
1772
+ /**
1773
+ * Every class a table can carry, in a stable order for reports.
1774
+ *
1775
+ * @task T12332
1776
+ */
1777
+ export const TABLE_CLASSES = [
1778
+ 'portable-project',
1779
+ 'portable-personal',
1780
+ 'portable-secret',
1781
+ 'local-only',
1782
+ 'derived',
1783
+ ];
1784
+ /**
1785
+ * What each class means for the two tiers.
1786
+ *
1787
+ * `backup` is `true` for EVERY class: that is the tier-1 invariant, and it is
1788
+ * typed as the literal `true` so a class can never opt out. `sync` is tier 2.
1789
+ *
1790
+ * @task T12332
1791
+ */
1792
+ export const TABLE_CLASS_POLICY = {
1793
+ 'portable-project': { backup: true, sync: true },
1794
+ 'portable-personal': { backup: true, sync: true },
1795
+ 'portable-secret': { backup: true, sync: true },
1796
+ 'local-only': { backup: true, sync: false },
1797
+ derived: { backup: true, sync: false },
1798
+ };
1799
+ /**
1800
+ * Return the registry for a scope.
1801
+ *
1802
+ * @param scope - Which `cleo.db` the table lives in.
1803
+ * @returns That scope's registry.
1804
+ * @task T12332
1805
+ */
1806
+ export function getTableRegistry(scope) {
1807
+ return scope === 'project' ? PROJECT_TABLE_REGISTRY : GLOBAL_TABLE_REGISTRY;
1808
+ }
1809
+ /** Compiled pattern rules, built once per scope. */
1810
+ const compiledPatterns = new Map();
1811
+ function patternsFor(scope) {
1812
+ let compiled = compiledPatterns.get(scope);
1813
+ if (!compiled) {
1814
+ compiled = getTableRegistry(scope).patterns.map((rule) => [new RegExp(rule.match), rule]);
1815
+ compiledPatterns.set(scope, compiled);
1816
+ }
1817
+ return compiled;
1818
+ }
1819
+ /**
1820
+ * Classify one physical table name.
1821
+ *
1822
+ * Lookup order: explicit entry, then pattern rule, then the pending list.
1823
+ * Pure: no database is opened.
1824
+ *
1825
+ * @param scope - Which `cleo.db` the table lives in.
1826
+ * @param name - The physical name as `sqlite_master` reports it.
1827
+ * @returns The classification; `kind: 'unclassified'` fails Gate A.
1828
+ *
1829
+ * @example
1830
+ * ```ts
1831
+ * classifyTable('project', 'tasks_tasks'); // { kind: 'entry', class: 'portable-project', … }
1832
+ * classifyTable('project', 'brain_observations_fts_idx'); // { kind: 'pattern', class: 'derived', … }
1833
+ * ```
1834
+ * @task T12332
1835
+ */
1836
+ export function classifyTable(scope, name) {
1837
+ const registry = getTableRegistry(scope);
1838
+ const entry = Object.hasOwn(registry.tables, name)
1839
+ ? registry.tables[name]
1840
+ : undefined;
1841
+ if (entry)
1842
+ return { kind: 'entry', scope, table: name, class: entry.class, entry };
1843
+ for (const [re, rule] of patternsFor(scope)) {
1844
+ if (re.test(name))
1845
+ return { kind: 'pattern', scope, table: name, class: rule.class, rule };
1846
+ }
1847
+ const pending = registry.pending.find((p) => p.table === name);
1848
+ if (pending)
1849
+ return { kind: 'pending', scope, table: name, pending };
1850
+ return { kind: 'unclassified', scope, table: name };
1851
+ }
1852
+ /**
1853
+ * Whether a class syncs across devices (tier 2; sealed for secrets).
1854
+ *
1855
+ * A sync journal includes a table only when this is true for its class.
1856
+ * Pending and unclassified tables have no class and never sync. Backup
1857
+ * (tier 1) is not gated by this: every table is backed up.
1858
+ *
1859
+ * @param tableClass - The class to test.
1860
+ * @returns `true` for the three portable classes.
1861
+ * @task T12332
1862
+ */
1863
+ export function isPortableTableClass(tableClass) {
1864
+ return TABLE_CLASS_POLICY[tableClass].sync;
1865
+ }
1866
+ //# sourceMappingURL=table-classification.js.map