@cleocode/cleo 2026.10.21 → 2026.10.22

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 (314) hide show
  1. package/bin/cleo.js +5 -1
  2. package/dist/cli/{adapter-O3IXUY2O.js → adapter-2LBGQENJ.js} +4 -4
  3. package/dist/cli/{add-X25TVFAO.js → add-JKD32F5Y.js} +4 -4
  4. package/dist/cli/{add-batch-I2OLBMHE.js → add-batch-GZLTZJJS.js} +4 -4
  5. package/dist/cli/{admin-TGZIJYCC.js → admin-4C5UGT6N.js} +3 -3
  6. package/dist/cli/{admin-QU46DUBD.js → admin-P3XJMRKL.js} +16 -5
  7. package/dist/cli/{adr-4K6XFCL3.js → adr-5VVCQKCL.js} +4 -4
  8. package/dist/cli/{agent-TAFPIYUU.js → agent-WJMBY7QZ.js} +10 -2
  9. package/dist/cli/{agent-outputs-HVJJIPS4.js → agent-outputs-YXT4PBX5.js} +2 -2
  10. package/dist/cli/{analyze-5VFYZGSQ.js → analyze-E7A3UYF6.js} +4 -4
  11. package/dist/cli/{archive-XAAH7B2V.js → archive-7YOOFH7I.js} +4 -4
  12. package/dist/cli/{archive-stats-NLWOUJNW.js → archive-stats-GTOCA7SV.js} +4 -4
  13. package/dist/cli/{attention-5FVE65TR.js → attention-7EKWYNIN.js} +4 -4
  14. package/dist/cli/{audit-ICA2SEFN.js → audit-AGMVVXN4.js} +2 -2
  15. package/dist/cli/{auth-BWFZNJWE.js → auth-AMVLVI7Z.js} +5 -5
  16. package/dist/cli/{backfill-LBSYBWLR.js → backfill-ZT2Z6NEJ.js} +2 -2
  17. package/dist/cli/{backup-LUVQBQ6U.js → backup-ZJJSZKDJ.js} +6 -6
  18. package/dist/cli/{backup-inspect-PDRXI45A.js → backup-inspect-JMN74BT5.js} +3 -3
  19. package/dist/cli/{backup-recover-TVKAPERB.js → backup-recover-AAQAEZUQ.js} +3 -3
  20. package/dist/cli/{blockers-5NKNH3WL.js → blockers-KVTMU2LH.js} +4 -4
  21. package/dist/cli/{brain-EJOBKL4A.js → brain-QIOFNBGJ.js} +37 -2
  22. package/dist/cli/{briefing-KZULJ4VK.js → briefing-KXTNRYL6.js} +4 -4
  23. package/dist/cli/{caamp-Z3XPKEHB.js → caamp-6YYOQCXL.js} +2 -2
  24. package/dist/cli/{cancel-LNXWLZI7.js → cancel-ZVS26BZN.js} +4 -4
  25. package/dist/cli/{cant-CHNN6O57.js → cant-UQA6ZVO5.js} +2 -2
  26. package/dist/cli/{changeset-RYPHPN2B.js → changeset-YMNHAYNY.js} +2 -2
  27. package/dist/cli/{check-DGQFVMB3.js → check-NPEXUPXQ.js} +4 -4
  28. package/dist/cli/{check-2J2OFIAN.js → check-V2GHT5Q5.js} +2 -2
  29. package/dist/cli/{checkpoint-UWDFOGYQ.js → checkpoint-BG6NOZPE.js} +2 -2
  30. package/dist/cli/{chunk-ZMGDZMSJ.js → chunk-2DYTDINW.js} +2 -2
  31. package/dist/cli/{chunk-EUGB6P5V.js → chunk-4IGUPM7A.js} +2 -2
  32. package/dist/cli/{chunk-7ZYPQV4N.js → chunk-4YUTW7V6.js} +2 -2
  33. package/dist/cli/{chunk-CAPAGD5E.js → chunk-5DEQEHQQ.js} +2 -2
  34. package/dist/cli/{chunk-RMJILHBI.js → chunk-5F43COYL.js} +3 -3
  35. package/dist/cli/{chunk-VKANU4TX.js → chunk-5HESOFB4.js} +2 -2
  36. package/dist/cli/{chunk-DEOLUUQW.js → chunk-64PAGS3P.js} +2 -2
  37. package/dist/cli/{chunk-CGOF3GJE.js → chunk-6MYVSVE5.js} +2 -2
  38. package/dist/cli/{chunk-4RGSNUUP.js → chunk-6UGBRRKY.js} +10 -1
  39. package/dist/cli/{chunk-BQK6XTOH.js → chunk-7V7JOHJK.js} +2 -2
  40. package/dist/cli/{chunk-HFLLZE6A.js → chunk-A6PBHQII.js} +2 -2
  41. package/dist/cli/{chunk-CYSM44YT.js → chunk-ADAXUXQC.js} +2 -2
  42. package/dist/cli/{chunk-GAMCDPPS.js → chunk-BFRYJSL5.js} +11 -11
  43. package/dist/cli/{chunk-75UH3BLS.js → chunk-CCYYFZAY.js} +2 -2
  44. package/dist/cli/{chunk-HIL7ZFB4.js → chunk-CIZJNRKG.js} +2 -2
  45. package/dist/cli/{chunk-5PNI276X.js → chunk-DYEYDQO5.js} +2 -2
  46. package/dist/cli/{chunk-4JYHPP4C.js → chunk-ESANVWAI.js} +2 -2
  47. package/dist/cli/{chunk-TLQ37HRE.js → chunk-EVOP37GN.js} +2 -2
  48. package/dist/cli/{chunk-ILWWL462.js → chunk-EZO2L7JF.js} +2 -2
  49. package/dist/cli/{chunk-ZEJB6GAB.js → chunk-FKVXKYD3.js} +2 -2
  50. package/dist/cli/{chunk-QJJWWCIC.js → chunk-G2YFY2Q6.js} +2 -2
  51. package/dist/cli/{chunk-7SINJXB6.js → chunk-HKRZ6QBS.js} +2 -2
  52. package/dist/cli/{chunk-PN4WW5VX.js → chunk-I4APLJMN.js} +2 -2
  53. package/dist/cli/chunk-IGM44F43.js +33 -0
  54. package/dist/cli/{chunk-7M7ZEQXG.js → chunk-JX5BMIP4.js} +3 -3
  55. package/dist/cli/{chunk-IIOGUY3B.js → chunk-LLIRCDQX.js} +2 -2
  56. package/dist/cli/{chunk-5BQTAAJ5.js → chunk-LQVRS7NG.js} +2 -2
  57. package/dist/cli/{chunk-22YPFZYB.js → chunk-M4WHEKWT.js} +2 -2
  58. package/dist/cli/{chunk-QWUFFDL3.js → chunk-M55K46WZ.js} +2 -2
  59. package/dist/cli/{chunk-FSKN4DWC.js → chunk-NU2L7VCO.js} +2 -2
  60. package/dist/cli/{chunk-IGCXGDPI.js → chunk-OCX7XRKE.js} +3 -3
  61. package/dist/cli/{chunk-7ACK4EIN.js → chunk-OE2MBXX3.js} +2 -2
  62. package/dist/cli/{chunk-GKRFH2YG.js → chunk-OSMQ6VAS.js} +2 -2
  63. package/dist/cli/{chunk-7NMKLVMI.js → chunk-P3Z4VKAO.js} +2 -2
  64. package/dist/cli/{chunk-FVKLULL7.js → chunk-P6AOFVE3.js} +2 -2
  65. package/dist/cli/{chunk-4PEODTHY.js → chunk-QIO35C2C.js} +2 -2
  66. package/dist/cli/{chunk-KZTPVED2.js → chunk-S4SCH3H7.js} +2 -2
  67. package/dist/cli/{chunk-J5USPJKZ.js → chunk-SQ2FFNK4.js} +2 -2
  68. package/dist/cli/{chunk-U3RT24TC.js → chunk-TE4S4DEH.js} +2 -2
  69. package/dist/cli/{chunk-2MGFDMDF.js → chunk-U53YDZST.js} +2 -2
  70. package/dist/cli/{chunk-T6GZJYL3.js → chunk-UR56DYPF.js} +2 -2
  71. package/dist/cli/{chunk-L3W2NVWA.js → chunk-VBTCULVY.js} +22 -7
  72. package/dist/cli/{chunk-HXRXT3XU.js → chunk-VDJCSFVP.js} +2 -2
  73. package/dist/cli/{chunk-CHGEDCKG.js → chunk-VSKOSO5R.js} +2 -2
  74. package/dist/cli/{chunk-IJGR4AY4.js → chunk-WBQSX3R6.js} +2 -2
  75. package/dist/cli/{chunk-PSJ33WVO.js → chunk-WIY2JK5R.js} +2 -2
  76. package/dist/cli/{chunk-COXFJ3PT.js → chunk-WS6CHPMP.js} +2 -2
  77. package/dist/cli/{chunk-TPTNEJZJ.js → chunk-XCWR7M7C.js} +2 -2
  78. package/dist/cli/{chunk-7UARFJYS.js → chunk-XODCC3GD.js} +2 -2
  79. package/dist/cli/{chunk-XA5WISNV.js → chunk-ZGDPFG3K.js} +2 -2
  80. package/dist/cli/{claim-TMBJCKR4.js → claim-NMXNWCWL.js} +4 -4
  81. package/dist/cli/{classify-MG4N7GMQ.js → classify-CBBXU7SL.js} +2 -2
  82. package/dist/cli/{cli-OO2NRFIJ.js → cli-UUQQISGE.js} +6 -4
  83. package/dist/cli/{cloud-XG3W6TGJ.js → cloud-HMSEMYM7.js} +4 -4
  84. package/dist/cli/{code-H2FQCVMW.js → code-EYQUYZ3K.js} +2 -2
  85. package/dist/cli/{complete-243AFWSP.js → complete-DJZEEYOM.js} +5 -5
  86. package/dist/cli/{complexity-RHDJMI54.js → complexity-SNUU3KEJ.js} +4 -4
  87. package/dist/cli/{compliance-MXJKPV3Y.js → compliance-RHDUGJLO.js} +4 -4
  88. package/dist/cli/{conduit-TW3QF4MU.js → conduit-I46ODALF.js} +15 -4
  89. package/dist/cli/{config-7PGRFZF2.js → config-7BIE4XAN.js} +6 -6
  90. package/dist/cli/{consensus-PQTTBWL2.js → consensus-A6PSE5CY.js} +4 -4
  91. package/dist/cli/{context-RMHKVVTQ.js → context-WYQGEVLG.js} +4 -4
  92. package/dist/cli/{contribution-UK2ZJFHY.js → contribution-VQXAJHB2.js} +4 -4
  93. package/dist/cli/{curator-HKZJCVRL.js → curator-RH3RVTIH.js} +2 -2
  94. package/dist/cli/{current-CE7UOH7N.js → current-PITF56L3.js} +4 -4
  95. package/dist/cli/{daemon-6W5XOZWK.js → daemon-OIIIHUJH.js} +4 -4
  96. package/dist/cli/{dash-RIUV5XIY.js → dash-OMWVG2HR.js} +4 -4
  97. package/dist/cli/{decide-26SXC2V6.js → decide-A2DN54P5.js} +2 -2
  98. package/dist/cli/{decompose-3FLHTIE3.js → decompose-6VCCWKVY.js} +4 -4
  99. package/dist/cli/{decomposition-QRC4UFQZ.js → decomposition-MTTGJXOO.js} +4 -4
  100. package/dist/cli/{delete-7VHV52XD.js → delete-NM77Y5EE.js} +4 -4
  101. package/dist/cli/{deps-FTAHKVRK.js → deps-ROHF5XZJ.js} +4 -4
  102. package/dist/cli/{detect-MVBWUVCY.js → detect-SXKMHTST.js} +4 -4
  103. package/dist/cli/{detect-drift-TVCJOFYJ.js → detect-drift-4MPUU6A4.js} +2 -2
  104. package/dist/cli/{diagnostics-PJNCYUMR.js → diagnostics-LHRCTVB5.js} +4 -4
  105. package/dist/cli/{docs-H2QZVO2Z.js → docs-W6QTMF4I.js} +4 -4
  106. package/dist/cli/{docs-LCDKTLUE.js → docs-WTUMWAU3.js} +2 -2
  107. package/dist/cli/{doctor-OSHAG6CQ.js → doctor-5SEHDPGJ.js} +39 -39
  108. package/dist/cli/{doctor-ac-bindings-S3IOEFP4.js → doctor-ac-bindings-FLKIKO4H.js} +3 -3
  109. package/dist/cli/{doctor-acceptance-drift-VNFKPBSQ.js → doctor-acceptance-drift-RNFRZ3DE.js} +3 -3
  110. package/dist/cli/{doctor-credentials-A5H4JMTF.js → doctor-credentials-N43LWYX3.js} +3 -3
  111. package/dist/cli/{doctor-db-substrate-FGCISE4Z.js → doctor-db-substrate-Z7T5WMR3.js} +3 -3
  112. package/dist/cli/{doctor-dep-cycles-BKKKHHYG.js → doctor-dep-cycles-WNVBBXDT.js} +3 -3
  113. package/dist/cli/{doctor-exodus-B6HXP67T.js → doctor-exodus-7N3WQJZP.js} +3 -3
  114. package/dist/cli/{doctor-exodus-residue-4EMRYMEQ.js → doctor-exodus-residue-AIIDUJSP.js} +3 -3
  115. package/dist/cli/{doctor-fk-check-VY3RIQV3.js → doctor-fk-check-3YYDN4T5.js} +3 -3
  116. package/dist/cli/{doctor-global-delivery-JN6IGHUL.js → doctor-global-delivery-RRHVTLOL.js} +3 -3
  117. package/dist/cli/{doctor-goal-runtime-Y27ROXHD.js → doctor-goal-runtime-EO46MPO6.js} +3 -3
  118. package/dist/cli/{doctor-heavy-command-hook-XSN44WXU.js → doctor-heavy-command-hook-Q3DCQURJ.js} +3 -3
  119. package/dist/cli/{doctor-hooks-VTASOKQO.js → doctor-hooks-BSDMLXPX.js} +3 -3
  120. package/dist/cli/{doctor-legacy-backups-QAG5NHYP.js → doctor-legacy-backups-LIRMLZHT.js} +3 -3
  121. package/dist/cli/{doctor-legacy-reaper-CIRGFE6R.js → doctor-legacy-reaper-BTAI65PK.js} +3 -3
  122. package/dist/cli/{doctor-malformed-ids-WL7HT4TB.js → doctor-malformed-ids-DACGP6TL.js} +3 -3
  123. package/dist/cli/{doctor-manifest-rows-SMQCKJ2T.js → doctor-manifest-rows-AAWVCJJ3.js} +3 -3
  124. package/dist/cli/{doctor-memory-guard-LJDOJG76.js → doctor-memory-guard-IPIBIHFX.js} +3 -3
  125. package/dist/cli/{doctor-migrations-ETQPFNUP.js → doctor-migrations-HB62VALK.js} +3 -3
  126. package/dist/cli/{doctor-nexus-residency-A4JMKBEJ.js → doctor-nexus-residency-KUFJE3ED.js} +3 -3
  127. package/dist/cli/{doctor-project-identity-FFQJ5LNX.js → doctor-project-identity-EVRRBIEZ.js} +3 -3
  128. package/dist/cli/{doctor-projects-MFUTKRHP.js → doctor-projects-FIHYQU2U.js} +3 -3
  129. package/dist/cli/{doctor-projects-registry-76X6VTGM.js → doctor-projects-registry-2QGDUVUF.js} +3 -3
  130. package/dist/cli/{doctor-release-readiness-QJCOPFTK.js → doctor-release-readiness-H3QUNBSM.js} +3 -3
  131. package/dist/cli/{doctor-repair-AU76FIKY.js → doctor-repair-HLC7JYLG.js} +3 -3
  132. package/dist/cli/{doctor-row-identity-2UOB2ACK.js → doctor-row-identity-YZHJRDZV.js} +3 -3
  133. package/dist/cli/{doctor-skill-fixtures-G3T7JUHS.js → doctor-skill-fixtures-TAMZML44.js} +3 -3
  134. package/dist/cli/{doctor-split-brain-FUW6L7FS.js → doctor-split-brain-WZ7WMB4T.js} +3 -3
  135. package/dist/cli/{doctor-superseded-store-2LMDHD7O.js → doctor-superseded-store-G665KUUB.js} +3 -3
  136. package/dist/cli/{doctor-sync-journal-SXMUIKF7.js → doctor-sync-journal-EHW57HXU.js} +3 -3
  137. package/dist/cli/{doctor-sync-triggers-6WNJZFRM.js → doctor-sync-triggers-7YYEU2VK.js} +3 -3
  138. package/dist/cli/{doctor-system-B2PRQGNB.js → doctor-system-YFE77ELJ.js} +3 -3
  139. package/dist/cli/{doctor-tool-locks-WQX3XUXI.js → doctor-tool-locks-JSQVDNSJ.js} +3 -3
  140. package/dist/cli/{doctor-twin-collapse-AYBYBFC4.js → doctor-twin-collapse-Z75563NR.js} +3 -3
  141. package/dist/cli/{doctor-worktree-stores-C5XEH5OG.js → doctor-worktree-stores-C7MY7OEP.js} +3 -3
  142. package/dist/cli/{done-HE32ZT37.js → done-FXKV4QEW.js} +5 -5
  143. package/dist/cli/{event-45KEWV5H.js → event-QULN5EJE.js} +2 -2
  144. package/dist/cli/{exists-BEDZS5RI.js → exists-BCTPCSZL.js} +2 -2
  145. package/dist/cli/{exodus-KDJWY3JP.js → exodus-7RTLNI2W.js} +2 -2
  146. package/dist/cli/{export-J2H2KJRO.js → export-MK7JBCQB.js} +4 -4
  147. package/dist/cli/{export-tasks-EGHYFLC2.js → export-tasks-YY2Z62J2.js} +4 -4
  148. package/dist/cli/{federation-ESM35EGG.js → federation-S7A4NKGL.js} +2 -2
  149. package/dist/cli/{find-OBPSVHRP.js → find-4GNX4GOX.js} +4 -4
  150. package/dist/cli/{focus-5CGB6LM6.js → focus-AIOPJAQT.js} +4 -4
  151. package/dist/cli/{gateway-2GW2KTK3.js → gateway-C2Z7R7SI.js} +2 -2
  152. package/dist/cli/{gc-EPESVPAT.js → gc-QEBWFYPQ.js} +2 -2
  153. package/dist/cli/{go-26KHAC5E.js → go-3B6NXYE4.js} +2 -2
  154. package/dist/cli/{goal-FWFMJ6SJ.js → goal-DX7Z3X2O.js} +3 -3
  155. package/dist/cli/{grade-2PRX3B7O.js → grade-FBDRCW4I.js} +4 -4
  156. package/dist/cli/{graph-UHLLQVML.js → graph-VGZCPBXN.js} +39 -54
  157. package/dist/cli/{history-BPCCLWL2.js → history-TGMBFN3F.js} +4 -4
  158. package/dist/cli/{hook-VOHU4YPF.js → hook-7L73CHBZ.js} +40 -4
  159. package/dist/cli/hook-entry.js +31 -5
  160. package/dist/cli/{import-T4QOIUUK.js → import-SD2NNIKN.js} +4 -4
  161. package/dist/cli/{import-tasks-X34KUSKM.js → import-tasks-BMESEONQ.js} +4 -4
  162. package/dist/cli/index.js +200 -200
  163. package/dist/cli/{init-3SJPZ6MM.js → init-AAZ2I4YX.js} +5 -5
  164. package/dist/cli/{inject-2O4N6H2R.js → inject-Z5HJZEYF.js} +4 -4
  165. package/dist/cli/{install-global-2BRCR5N6.js → install-global-4LJUM3HU.js} +2 -2
  166. package/dist/cli/{intelligence-Z3WNZCS7.js → intelligence-LXPNC4O7.js} +4 -4
  167. package/dist/cli/{issue-YM33LU6N.js → issue-U6AOXJ3Q.js} +4 -4
  168. package/dist/cli/{janitor-ZNCFQ7E3.js → janitor-JQ7T4RDV.js} +2 -2
  169. package/dist/cli/{labels-7GMNYZKZ.js → labels-FVPC6JIB.js} +4 -4
  170. package/dist/cli/{lean-KJPRFQ4Q.js → lean-QCMFH72I.js} +2 -2
  171. package/dist/cli/{lifecycle-TKWJR6KU.js → lifecycle-P7OFMMOT.js} +5 -5
  172. package/dist/cli/{list-JS7X7A5F.js → list-XFQKWZAG.js} +4 -4
  173. package/dist/cli/{llm-GBSRKPLE.js → llm-MSE4F6WS.js} +8 -8
  174. package/dist/cli/{llm-cost-MLMXEAR4.js → llm-cost-EDEJMV2C.js} +3 -3
  175. package/dist/cli/{llm-stream-AAEUNKRP.js → llm-stream-BH6NCVNX.js} +3 -3
  176. package/dist/cli/{log-MPSBKCHP.js → log-6JI6CUMQ.js} +4 -4
  177. package/dist/cli/{login-ITARNNB6.js → login-MGZCYIMG.js} +4 -4
  178. package/dist/cli/{logout-TB3EKA2J.js → logout-O72COSFE.js} +4 -4
  179. package/dist/cli/{manifest-4PDLGPJM.js → manifest-K6UTQ2NO.js} +4 -4
  180. package/dist/cli/{map-4ADENETR.js → map-OA452V4K.js} +25 -4
  181. package/dist/cli/{memory-VF44IXEA.js → memory-SJBDMOYJ.js} +197 -6
  182. package/dist/cli/{memory-CYS36LY4.js → memory-T3YAA2OK.js} +83 -73
  183. package/dist/cli/{migrate-agents-v2-A52QIYNJ.js → migrate-agents-v2-RGJ63UHD.js} +3 -3
  184. package/dist/cli/{migrate-claude-mem-VC4GOHLG.js → migrate-claude-mem-GI75LXGS.js} +5 -5
  185. package/dist/cli/{next-HZVSZRHJ.js → next-24SKEZYV.js} +4 -4
  186. package/dist/cli/{nexus-IRYPIFMK.js → nexus-BDLNXC46.js} +178 -126
  187. package/dist/cli/{nexus-E46KEPJZ.js → nexus-SAELNTDV.js} +50 -4
  188. package/dist/cli/{nexus-vault-cli-H3NIWJDV.js → nexus-vault-cli-PDCIZ7YS.js} +4 -4
  189. package/dist/cli/{ops-TBJCOI3Z.js → ops-ULZUGBNF.js} +4 -4
  190. package/dist/cli/{orchestrate-FBAGXT4U.js → orchestrate-5V5M63TD.js} +18 -4
  191. package/dist/cli/{orchestrate-BVCEXORY.js → orchestrate-AREFH5WJ.js} +18 -5
  192. package/dist/cli/{otel-JCNPVJLZ.js → otel-UGAKFUDZ.js} +2 -2
  193. package/dist/cli/{owner-override-cap-33U23MZF.js → owner-override-cap-BY2WGQNS.js} +3 -3
  194. package/dist/cli/{owner-password-NWLUNXP2.js → owner-password-V6FMTGM4.js} +3 -3
  195. package/dist/cli/{phase-FODWN7YD.js → phase-W24CZBWG.js} +4 -4
  196. package/dist/cli/{pipeline-QBP5XKZN.js → pipeline-45EZNRJF.js} +2 -2
  197. package/dist/cli/{pivot-ZITFZTCB.js → pivot-TLXKJOEA.js} +4 -4
  198. package/dist/cli/{plan-KLCTLCSV.js → plan-Y7MYBEHV.js} +4 -4
  199. package/dist/cli/{playbook-QLINKIY4.js → playbook-34ST346V.js} +4 -4
  200. package/dist/cli/{project-57IVZLHK.js → project-WSP7S4X4.js} +3 -3
  201. package/dist/cli/project-hook-entry.js +1 -1
  202. package/dist/cli/{promote-T5JTI6UY.js → promote-7LPFHDHP.js} +4 -4
  203. package/dist/cli/{provenance-CM37L7VC.js → provenance-HDP4X6Z3.js} +4 -4
  204. package/dist/cli/{provider-6OCRYX5B.js → provider-C6WQPP2W.js} +4 -4
  205. package/dist/cli/{reason-XUZXRWP6.js → reason-QGHRFFRE.js} +4 -4
  206. package/dist/cli/{reconcile-OHR4VIXG.js → reconcile-EWUDAYMO.js} +4 -4
  207. package/dist/cli/{refresh-memory-3OSTRAVK.js → refresh-memory-VEJZUVW2.js} +2 -2
  208. package/dist/cli/{relates-ZUPKETZM.js → relates-JX5FIOE7.js} +4 -4
  209. package/dist/cli/{release-7P2KBM53.js → release-CVQBN25B.js} +4 -4
  210. package/dist/cli/{remote-VIULU2T5.js → remote-UUA6ZT2E.js} +2 -2
  211. package/dist/cli/{renderers-TGSW77J4.js → renderers-6MMBI6EU.js} +2 -2
  212. package/dist/cli/{reorder-ESVHT4LA.js → reorder-KJ5RMRIS.js} +4 -4
  213. package/dist/cli/{reparent-X7RRPVKY.js → reparent-XHFMOY4Y.js} +4 -4
  214. package/dist/cli/{req-PDFDIYX7.js → req-AHDYUCIB.js} +4 -4
  215. package/dist/cli/{research-CZ52DOP5.js → research-WEJZQRRP.js} +4 -4
  216. package/dist/cli/{restore-BGYZO2Z5.js → restore-I43D3NUC.js} +4 -4
  217. package/dist/cli/{revert-32LDNSGP.js → revert-N3GZYBQI.js} +2 -2
  218. package/dist/cli/{roadmap-M5UR54IU.js → roadmap-AC3VHFKJ.js} +4 -4
  219. package/dist/cli/{run-N2URAGAR.js → run-KMAAAVCL.js} +11 -8
  220. package/dist/cli/{safestop-5L65XFLX.js → safestop-SP34BEA4.js} +4 -4
  221. package/dist/cli/{saga-UAKINUOV.js → saga-NZ27XHVT.js} +4 -4
  222. package/dist/cli/{schema-OOOKLWUE.js → schema-JVY6DDSU.js} +2 -2
  223. package/dist/cli/{self-update-7EU6N5FM.js → self-update-PWKOSL4N.js} +2 -2
  224. package/dist/cli/{selfimprove-PHZBOJQC.js → selfimprove-5U3VQKP4.js} +4 -4
  225. package/dist/cli/{selfimprove-Y3OKEPAH.js → selfimprove-GB22FKJL.js} +2 -2
  226. package/dist/cli/{sentient-RGMWR4XJ.js → sentient-N2QXH6TV.js} +2 -2
  227. package/dist/cli/{sequence-NSM6QIAM.js → sequence-MIKUOQBH.js} +4 -4
  228. package/dist/cli/{service-ZXENYLTA.js → service-KMAXRDST.js} +4 -4
  229. package/dist/cli/{session-T4S66N5E.js → session-76ZRKMTV.js} +2 -2
  230. package/dist/cli/{session-YLNX37J3.js → session-DKG3LI56.js} +5 -5
  231. package/dist/cli/{setup-TT2M62LC.js → setup-PTBHB54E.js} +4 -4
  232. package/dist/cli/{show-UFAP3H3H.js → show-F7AYDZAJ.js} +4 -4
  233. package/dist/cli/{skill-F2KR6HW5.js → skill-CXDBQWYS.js} +2 -2
  234. package/dist/cli/{skills-AEQ2ZZCO.js → skills-3P3HJGOK.js} +6 -6
  235. package/dist/cli/{snapshot-MCHJNLVE.js → snapshot-XBRVDB4U.js} +4 -4
  236. package/dist/cli/{start-S7LFBVJS.js → start-FQUSOZW2.js} +4 -4
  237. package/dist/cli/{stats-GK4IXBZX.js → stats-FPQDTW7F.js} +4 -4
  238. package/dist/cli/{status-XLKYLN42.js → status-QMBW57AN.js} +2 -2
  239. package/dist/cli/{sticky-I3BIFYY6.js → sticky-MECM6J6E.js} +4 -4
  240. package/dist/cli/{stop-TRLZLLS3.js → stop-V2E5LQT3.js} +4 -4
  241. package/dist/cli/{stop-dispatch-entry-RT3MJTWD.js → stop-dispatch-entry-2CA4IGQN.js} +19 -34
  242. package/dist/cli/subagent-start-entry-EAXMODIE.js +61 -0
  243. package/dist/cli/{sync-SLHZKQUD.js → sync-4R7474RE.js} +5 -5
  244. package/dist/cli/{tasks-YQWFUVT2.js → tasks-47UC2UUC.js} +4 -4
  245. package/dist/cli/{tasks-6IYTR6H4.js → tasks-CCPUTPXJ.js} +2 -2
  246. package/dist/cli/{telemetry-CU7W5WAY.js → telemetry-C4O6AETS.js} +2 -2
  247. package/dist/cli/{templates-G42JBUY4.js → templates-PDD2BCGA.js} +2 -2
  248. package/dist/cli/{testing-VTYS7XXQ.js → testing-6XOV2362.js} +4 -4
  249. package/dist/cli/{token-C7J4PJ2Y.js → token-7OCAM4IU.js} +4 -4
  250. package/dist/cli/{transcript-RGK7RSGQ.js → transcript-IVLJ4ELW.js} +2 -2
  251. package/dist/cli/{tui-BPUFHYKK.js → tui-UHSMZXKX.js} +5 -1
  252. package/dist/cli/{update-MT7LQJUZ.js → update-DNIOGIXN.js} +4 -4
  253. package/dist/cli/{upgrade-FOHI6DDB.js → upgrade-W6XBO7XD.js} +5 -5
  254. package/dist/cli/{verify-2NHBNDVG.js → verify-QJJIQPRX.js} +4 -4
  255. package/dist/cli/{web-NJ3P67EU.js → web-76HZ6QVF.js} +2 -2
  256. package/dist/cli/{workgraph-OHJ2VKJD.js → workgraph-XZAJZ3BP.js} +6 -6
  257. package/dist/cli/{worktree-7LSLZD53.js → worktree-KUYFIDLP.js} +4 -4
  258. package/package.json +14 -14
  259. package/studio-dist/client/_app/immutable/chunks/B5x1mkux.js +1 -0
  260. package/studio-dist/client/_app/immutable/chunks/{CP4KThjV.js → BUfM4H7r.js} +1 -1
  261. package/studio-dist/client/_app/immutable/chunks/BpaT49r4.js +3 -0
  262. package/studio-dist/client/_app/immutable/chunks/{BZCivYpn.js → DIdUQ1Oe.js} +1 -1
  263. package/studio-dist/client/_app/immutable/entry/{app.CmuD0x-_.js → app.CcwyEhKJ.js} +2 -2
  264. package/studio-dist/client/_app/immutable/entry/start.B2qYeZ9C.js +1 -0
  265. package/studio-dist/client/_app/immutable/nodes/{0.BVHuQ0hm.js → 0.DGfIESU7.js} +1 -1
  266. package/studio-dist/client/_app/immutable/nodes/{1.C6jrx7CS.js → 1.BHNNlSO-.js} +1 -1
  267. package/studio-dist/client/_app/immutable/nodes/{15.CORcdOBM.js → 15.DhfJmhoJ.js} +1 -1
  268. package/studio-dist/client/_app/immutable/nodes/{16.CF50qAKD.js → 16.kORYt4IA.js} +1 -1
  269. package/studio-dist/client/_app/immutable/nodes/{17.CDlLLHAf.js → 17.DHogecS1.js} +1 -1
  270. package/studio-dist/client/_app/immutable/nodes/{18.BUbs8r2J.js → 18.CUDzjzsF.js} +1 -1
  271. package/studio-dist/client/_app/immutable/nodes/{20.k_dI9B32.js → 20.BNIEAZM5.js} +1 -1
  272. package/studio-dist/client/_app/immutable/nodes/{24.Bo3WiId-.js → 24.D9-hvGx3.js} +1 -1
  273. package/studio-dist/client/_app/immutable/nodes/{25.CK5Uk3gO.js → 25.BXC7Y_sR.js} +2 -2
  274. package/studio-dist/client/_app/immutable/nodes/{26.CSkIMarj.js → 26.BGhGLcTZ.js} +1 -1
  275. package/studio-dist/client/_app/immutable/nodes/{3.BzVKu0Dq.js → 3.CuV8xo2N.js} +1 -1
  276. package/studio-dist/client/_app/version.json +1 -1
  277. package/studio-dist/server/chunks/{0-DEIfjSBt.js → 0-DKovvmjz.js} +3 -3
  278. package/studio-dist/server/chunks/1-CemcM2zo.js +9 -0
  279. package/studio-dist/server/chunks/{15-n_meKqQa.js → 15-ZGParbZs.js} +3 -3
  280. package/studio-dist/server/chunks/{16-CqVd9ir4.js → 16-CDePF7Ss.js} +3 -3
  281. package/studio-dist/server/chunks/{17-bXcWHPRW.js → 17-CS_un7Xm.js} +3 -3
  282. package/studio-dist/server/chunks/{18-Bcuek3Uk.js → 18-D0yqD1ux.js} +3 -3
  283. package/studio-dist/server/chunks/{20-DjVbXoml.js → 20-Dm5vnjNw.js} +3 -3
  284. package/studio-dist/server/chunks/{24-DcedNKCs.js → 24-Csg0Sedx.js} +3 -3
  285. package/studio-dist/server/chunks/{25-Dzpy1h54.js → 25-BbvW193Q.js} +34 -8
  286. package/studio-dist/server/chunks/{26-D5awbRU7.js → 26-DxqP8yNG.js} +3 -3
  287. package/studio-dist/server/chunks/{3-DFje4KvB.js → 3-Cb10azou.js} +3 -3
  288. package/studio-dist/server/chunks/{_layout.svelte-BCS2htYO.js → _layout.svelte-DUpXT9SM.js} +4 -4
  289. package/studio-dist/server/chunks/{_page.svelte-Dq2FQF3L.js → _page.svelte-86UtFyVn.js} +3 -3
  290. package/studio-dist/server/chunks/{_page.svelte-Dl6VyLjQ.js → _page.svelte-B2YVodBY.js} +3 -3
  291. package/studio-dist/server/chunks/{_page.svelte-Bkz--htI.js → _page.svelte-BgtGMgmI.js} +3 -3
  292. package/studio-dist/server/chunks/{_page.svelte-CCm1q6vq.js → _page.svelte-CLGT_XI_.js} +3 -3
  293. package/studio-dist/server/chunks/{_page.svelte-BQIDi1c4.js → _page.svelte-CtA4ztK8.js} +3 -3
  294. package/studio-dist/server/chunks/{_page.svelte-CriO2eRM.js → _page.svelte-DWM6376-.js} +3 -3
  295. package/studio-dist/server/chunks/{_page.svelte-D6XFECOw.js → _page.svelte-DbX5Giat.js} +3 -3
  296. package/studio-dist/server/chunks/{_page.svelte-CYTEnztF.js → _page.svelte-L7GSWQ1G.js} +6 -6
  297. package/studio-dist/server/chunks/{_page.svelte-Cjy_dnsJ.js → _page.svelte-hRSJpVfr.js} +4 -4
  298. package/studio-dist/server/chunks/{_server.ts-JAeH5Mds.js → _server.ts-CCEy1Czs.js} +3 -3
  299. package/studio-dist/server/chunks/{_server.ts-BGBet--r.js → _server.ts-CFxXLpY3.js} +3 -3
  300. package/studio-dist/server/chunks/{_server.ts-Dkffekz1.js → _server.ts-DH-oJdkf.js} +3 -3
  301. package/studio-dist/server/chunks/{_server.ts-Bd-DDdja.js → _server.ts-ENku2nUl.js} +3 -3
  302. package/studio-dist/server/chunks/{_server.ts-C5rdTyhe.js → _server.ts-X_KMvzcG.js} +2 -2
  303. package/studio-dist/server/chunks/{client-Ye7ChL5U.js → client-BeipKxhJ.js} +2 -2
  304. package/studio-dist/server/chunks/{error.svelte-Di-_tAgW.js → error.svelte-CYqHwzjR.js} +3 -3
  305. package/studio-dist/server/chunks/{http-C02RnABR.js → http-CyEG3kWa.js} +2 -2
  306. package/studio-dist/server/chunks/{internal-CDhTKhM5.js → internal-UB2Nujfl.js} +2 -2
  307. package/studio-dist/server/chunks/{operations-registry-DtRhMtMw.js → operations-registry-DiANWvt1.js} +22 -1
  308. package/studio-dist/server/chunks/{stores-DVInU5BF.js → stores-ClQv6o3x.js} +2 -2
  309. package/studio-dist/server/index.js +1 -1
  310. package/studio-dist/server/manifest.js +17 -17
  311. package/studio-dist/client/_app/immutable/chunks/ChR_R99k.js +0 -3
  312. package/studio-dist/client/_app/immutable/chunks/DHX4nPLH.js +0 -1
  313. package/studio-dist/client/_app/immutable/entry/start.DfBbEDEY.js +0 -1
  314. package/studio-dist/server/chunks/1-CKD6KSVQ.js +0 -9
@@ -17,7 +17,7 @@ import {
17
17
  dispatchFromCli,
18
18
  dispatchRaw,
19
19
  handleRawError
20
- } from "./chunk-L3W2NVWA.js";
20
+ } from "./chunk-VBTCULVY.js";
21
21
  import {
22
22
  CLEO_DIR_NAME,
23
23
  MIGRATE_MEMORY_HASHES_JSON
@@ -31,12 +31,13 @@ import "./chunk-QKMBWYAS.js";
31
31
  import {
32
32
  cliError,
33
33
  cliOutput
34
- } from "./chunk-4RGSNUUP.js";
34
+ } from "./chunk-6UGBRRKY.js";
35
35
  import "./chunk-6JSJNYH2.js";
36
36
  import "./chunk-D7BAQNV2.js";
37
- import "./chunk-GAMCDPPS.js";
37
+ import "./chunk-BFRYJSL5.js";
38
38
 
39
39
  // packages/cleo/src/cli/commands/memory.ts
40
+ import { existsSync, readFileSync } from "node:fs";
40
41
  import { runConsolidation } from "@cleocode/core/memory/brain-lifecycle";
41
42
  import { getDreamStatus, triggerManualDream } from "@cleocode/core/memory/dream-cycle";
42
43
  import { importMemoryFiles } from "@cleocode/core/memory/import-from-provider.js";
@@ -276,7 +277,7 @@ var observeCommand = defineCommand({
276
277
  },
277
278
  type: {
278
279
  type: "string",
279
- description: "Category: discovery (found something new), decision (choice made), bugfix (bug found/fixed), refactor (code restructured), feature (feature added), change (general change), diary (journal entry), session-summary (end-of-session recap auto-created by cleo session end)"
280
+ description: "Category: discovery (found something new), decision (choice made), bugfix (bug found/fixed), refactor (code restructured), feature (feature added), change (general change), diary (journal entry), session-summary (end-of-session recap auto-created by cleo session end), lesson (--title is the one-line rule, the text is why; defaults to --scope global)"
280
281
  },
281
282
  agent: {
282
283
  type: "string",
@@ -1064,6 +1065,170 @@ var reflectCommand = defineCommand({
1064
1065
  }
1065
1066
  }
1066
1067
  });
1068
+ var quarantineAutoRowsCommand = defineCommand({
1069
+ meta: {
1070
+ name: "quarantine-auto-rows",
1071
+ description: "Report (default), quarantine (--apply --expect \u2026 --expect-digest \u2026) or restore (--restore <receipt>) auto-generated BRAIN rows: dispatch traces, Doc attached records and task stubs. Sets invalid_at only; nothing is deleted."
1072
+ },
1073
+ args: {
1074
+ apply: {
1075
+ type: "boolean",
1076
+ description: "Quarantine the matched rows (requires --expect and --expect-digest)"
1077
+ },
1078
+ expect: {
1079
+ type: "string",
1080
+ description: "Counts from the approved dry run: project:patterns=N,project:observations=N,global:patterns=N,global:observations=N"
1081
+ },
1082
+ "expect-digest": {
1083
+ type: "string",
1084
+ description: "Id-set digest from the approved dry run"
1085
+ },
1086
+ restore: {
1087
+ type: "string",
1088
+ description: "Restore the rows recorded in this receipt file"
1089
+ }
1090
+ },
1091
+ async run({ args }) {
1092
+ const output = {
1093
+ command: "memory-quarantine-auto-rows",
1094
+ operation: "memory.quarantine-auto-rows"
1095
+ };
1096
+ const restore = typeof args.restore === "string" ? args.restore : void 0;
1097
+ const expectText = typeof args.expect === "string" ? args.expect : void 0;
1098
+ const expectDigest = typeof args["expect-digest"] === "string" ? args["expect-digest"] : void 0;
1099
+ if (restore !== void 0 && args.apply) {
1100
+ cliError("--restore and --apply cannot be combined", 6, { name: "E_INVALID_INPUT" });
1101
+ return;
1102
+ }
1103
+ if (!args.apply && (expectText !== void 0 || expectDigest !== void 0)) {
1104
+ cliError("--expect and --expect-digest only apply with --apply", 6, {
1105
+ name: "E_INVALID_INPUT"
1106
+ });
1107
+ return;
1108
+ }
1109
+ const root = getProjectRoot();
1110
+ const q = await import("@cleocode/core/memory/auto-row-quarantine");
1111
+ const now = /* @__PURE__ */ new Date();
1112
+ const receiptPath = q.defaultQuarantineReceiptPath(root, now.toISOString());
1113
+ try {
1114
+ const stores = await q.openQuarantineStores(root);
1115
+ if (restore !== void 0) {
1116
+ const restored = await q.restoreAutoRowQuarantine(stores, restore);
1117
+ cliOutput({ receipt: restore, restored }, output);
1118
+ return;
1119
+ }
1120
+ if (!args.apply) {
1121
+ const { counts, predicates, digest } = q.planAutoRowQuarantine(stores);
1122
+ cliOutput({ dryRun: true, counts, digest, predicates }, output);
1123
+ return;
1124
+ }
1125
+ if (expectText === void 0 || expectDigest === void 0) {
1126
+ cliError("--apply needs --expect and --expect-digest from the approved dry run", 6, {
1127
+ name: "E_INVALID_INPUT"
1128
+ });
1129
+ return;
1130
+ }
1131
+ const expect = q.parseQuarantineExpect(expectText);
1132
+ const receipt = await q.applyAutoRowQuarantine(stores, expect, expectDigest, receiptPath, {
1133
+ now
1134
+ });
1135
+ cliOutput({ receipt: receiptPath, ...receipt, ids: void 0 }, output);
1136
+ } catch (err) {
1137
+ const code = err instanceof q.AutoRowQuarantineError ? err.code : "E_QUARANTINE";
1138
+ const details = existsSync(receiptPath) ? { receiptPath } : void 0;
1139
+ cliError(err instanceof Error ? err.message : String(err), 6, { name: code, details });
1140
+ }
1141
+ }
1142
+ });
1143
+ var importLessonsCommand = defineCommand({
1144
+ meta: {
1145
+ name: "import-lessons",
1146
+ description: "Plan (default) or apply (--apply --expect-digest \u2026) a one-time import of a Claude Code memory directory as lessons in the main brain: feedback and project memories become lessons (description = rule, body = why), with source provenance per row. Never deletes or edits a source file."
1147
+ },
1148
+ args: {
1149
+ from: {
1150
+ type: "string",
1151
+ description: "Memory directory (default: ~/.claude/projects/<this project root>/memory)"
1152
+ },
1153
+ apply: {
1154
+ type: "boolean",
1155
+ description: "Write the planned lessons (requires --expect-digest)"
1156
+ },
1157
+ "expect-digest": {
1158
+ type: "string",
1159
+ description: "Plan digest from the approved dry run"
1160
+ },
1161
+ exclude: {
1162
+ type: "string",
1163
+ description: "Comma-separated memory file names to leave out (applied before the digest)"
1164
+ },
1165
+ "exclude-from": {
1166
+ type: "string",
1167
+ description: "File listing memory file names to leave out, one per line (# comments)"
1168
+ }
1169
+ },
1170
+ async run({ args }) {
1171
+ const output = { command: "memory-import-lessons", operation: "memory.import-lessons" };
1172
+ const exclude = [
1173
+ ...typeof args.exclude === "string" ? args.exclude.split(",") : [],
1174
+ ...typeof args["exclude-from"] === "string" ? readFileSync(args["exclude-from"], "utf-8").split("\n") : []
1175
+ ].map((line) => line.replace(/#.*$/, "").trim()).filter((line) => line.length > 0);
1176
+ const expectDigest = typeof args["expect-digest"] === "string" ? args["expect-digest"] : void 0;
1177
+ if (!args.apply && expectDigest !== void 0) {
1178
+ cliError("--expect-digest only applies with --apply", 6, { name: "E_INVALID_INPUT" });
1179
+ return;
1180
+ }
1181
+ const root = getProjectRoot();
1182
+ const lessons = await import("@cleocode/core/memory/lessons-import");
1183
+ const sourceDir = typeof args.from === "string" ? args.from : lessons.defaultLessonImportDir(root);
1184
+ try {
1185
+ if (!args.apply) {
1186
+ const plan = lessons.planLessonImport(sourceDir, { exclude });
1187
+ cliOutput(
1188
+ {
1189
+ dryRun: true,
1190
+ sourceDir: plan.sourceDir,
1191
+ digest: plan.digest,
1192
+ excluded: exclude,
1193
+ lessons: plan.candidates.length,
1194
+ globalLessons: plan.candidates.filter((c) => c.scope === "global").length,
1195
+ projectLessons: plan.candidates.filter((c) => c.scope === "project").length,
1196
+ skipped: plan.skipped.length,
1197
+ candidates: plan.candidates.map(({ text: _text, ...rest }) => rest),
1198
+ skippedFiles: plan.skipped
1199
+ },
1200
+ output
1201
+ );
1202
+ return;
1203
+ }
1204
+ if (expectDigest === void 0) {
1205
+ cliError("--apply needs --expect-digest from the approved dry run", 6, {
1206
+ name: "E_INVALID_INPUT"
1207
+ });
1208
+ return;
1209
+ }
1210
+ const now = /* @__PURE__ */ new Date();
1211
+ const receiptPath = lessons.defaultLessonImportReceiptPath(root, now.toISOString());
1212
+ const receipt = await lessons.applyLessonImport(root, sourceDir, expectDigest, receiptPath, {
1213
+ exclude,
1214
+ now
1215
+ });
1216
+ cliOutput(
1217
+ {
1218
+ receipt: receiptPath,
1219
+ digest: receipt.digest,
1220
+ stored: receipt.written.filter((w) => w.stored).length,
1221
+ alreadyPresent: receipt.written.filter((w) => !w.stored).length,
1222
+ written: receipt.written
1223
+ },
1224
+ output
1225
+ );
1226
+ } catch (err) {
1227
+ const code = err instanceof lessons.LessonImportError ? err.code : "E_LESSON_IMPORT";
1228
+ cliError(err instanceof Error ? err.message : String(err), 6, { name: code });
1229
+ }
1230
+ }
1231
+ });
1067
1232
  var pruneStubsCommand = defineCommand({
1068
1233
  meta: {
1069
1234
  name: "prune-stubs",
@@ -1222,7 +1387,9 @@ var importCommand = defineCommand({
1222
1387
  projectRoot,
1223
1388
  cleoDirName: CLEO_DIR_NAME,
1224
1389
  hasheFileName: MIGRATE_MEMORY_HASHES_JSON,
1225
- dispatch: dispatchFromCli
1390
+ // dispatchRaw: one failing (or duplicate) entry must not print an
1391
+ // envelope or exit the whole import (T13949).
1392
+ dispatch: dispatchRaw
1226
1393
  });
1227
1394
  cliOutput(
1228
1395
  {
@@ -1750,6 +1917,27 @@ var diaryWriteCommand = makeMemorySubcommand({
1750
1917
  ...args["agent"] !== void 0 && { agent: args["agent"] }
1751
1918
  })
1752
1919
  });
1920
+ var lessonsCommand = makeMemorySubcommand({
1921
+ name: "lessons",
1922
+ description: 'List lessons (one-line rule + why) newest first, superseded hidden. Write one with: cleo memory observe "<why>" --type lesson --title "<rule>"',
1923
+ args: {
1924
+ scope: {
1925
+ type: "string",
1926
+ description: "Store to read: project, global (the main brain) or all (default)"
1927
+ },
1928
+ limit: {
1929
+ type: "string",
1930
+ description: "Maximum number of lessons to return (default: 50)."
1931
+ }
1932
+ },
1933
+ gateway: "query",
1934
+ operation: "lessons",
1935
+ output: { command: "memory-lessons", operation: "memory.lessons" },
1936
+ paramBuilder: (args) => ({
1937
+ ...args["scope"] !== void 0 && { scope: args["scope"] },
1938
+ ...args["limit"] !== void 0 && { limit: parseInt(args["limit"], 10) }
1939
+ })
1940
+ });
1753
1941
  var diaryCommand = defineCommand({
1754
1942
  meta: {
1755
1943
  name: "diary",
@@ -1932,6 +2120,9 @@ var memoryCommand = defineCommand({
1932
2120
  reflect: reflectCommand,
1933
2121
  "dedup-scan": dedupScanCommand,
1934
2122
  "prune-stubs": pruneStubsCommand,
2123
+ lessons: lessonsCommand,
2124
+ "quarantine-auto-rows": quarantineAutoRowsCommand,
2125
+ "import-lessons": importLessonsCommand,
1935
2126
  "prune-traits": pruneTraitsCommand,
1936
2127
  "set-trait-scope": setTraitScopeCommand,
1937
2128
  import: importCommand,
@@ -1959,4 +2150,4 @@ var memoryCommand = defineCommand({
1959
2150
  export {
1960
2151
  memoryCommand
1961
2152
  };
1962
- //# sourceMappingURL=memory-VF44IXEA.js.map
2153
+ //# sourceMappingURL=memory-SJBDMOYJ.js.map
@@ -15,7 +15,7 @@
15
15
  })();
16
16
  import {
17
17
  lazyOperation
18
- } from "./chunk-GAMCDPPS.js";
18
+ } from "./chunk-BFRYJSL5.js";
19
19
  import {
20
20
  errorResult,
21
21
  handleErrorResult,
@@ -52,6 +52,9 @@ var generateMemoryBridgeContent = lazyOperation(
52
52
  var getBrainDb = lazyOperation(
53
53
  async () => (await import("@cleocode/core/store/memory-sqlite")).getBrainDb
54
54
  );
55
+ var listLessons = lazyOperation(
56
+ async () => (await import("@cleocode/core/memory/lessons")).listLessons
57
+ );
55
58
  var memoryDecisionFind = lazyOperation(
56
59
  async () => (await import("@cleocode/core/memory/engine-compat")).memoryDecisionFind
57
60
  );
@@ -741,18 +744,19 @@ var MemoryHandler = class {
741
744
  startTime
742
745
  );
743
746
  }
747
+ const { autoRowExclusionClause } = await import("@cleocode/core/memory/eligibility");
744
748
  let rows = [];
745
749
  try {
746
750
  const rawRows = nativeDb.prepare(
747
751
  `SELECT id,
748
752
  title,
749
- text,
753
+ narrative AS text,
750
754
  citation_count,
751
755
  quality_score,
752
756
  memory_tier,
753
757
  created_at
754
758
  FROM brain_observations
755
- WHERE invalid_at IS NULL
759
+ WHERE invalid_at IS NULL${autoRowExclusionClause("observations")}
756
760
  ORDER BY citation_count DESC, quality_score DESC
757
761
  LIMIT ?`
758
762
  ).all(limitVal);
@@ -884,6 +888,45 @@ var MemoryHandler = class {
884
888
  return handleErrorResult("query", "memory", operation, dbErr, startTime);
885
889
  }
886
890
  }
891
+ // T13949 — curated lessons index, newest first, superseded hidden
892
+ case "lessons": {
893
+ const scopeParam = paramString(params, "scope") ?? "all";
894
+ if (scopeParam !== "project" && scopeParam !== "global" && scopeParam !== "all") {
895
+ return errorResult(
896
+ "query",
897
+ "memory",
898
+ operation,
899
+ // @sync-invariant none:input-shape an unknown lessons scope is refused; a read writes nothing
900
+ "E_INVALID_INPUT",
901
+ `scope must be project, global or all (got '${scopeParam}')`,
902
+ startTime
903
+ );
904
+ }
905
+ const limit = paramNumber(params, "limit") ?? 50;
906
+ if (!Number.isInteger(limit) || limit < 1) {
907
+ return errorResult(
908
+ "query",
909
+ "memory",
910
+ operation,
911
+ // @sync-invariant none:input-shape an invalid lessons limit is refused; a read writes nothing
912
+ "E_INVALID_INPUT",
913
+ "limit must be a positive integer",
914
+ startTime
915
+ );
916
+ }
917
+ try {
918
+ const lessons = await listLessons(projectRoot, { scope: scopeParam, limit });
919
+ return wrapResult(
920
+ { success: true, data: { count: lessons.length, scope: scopeParam, lessons } },
921
+ "query",
922
+ "memory",
923
+ operation,
924
+ startTime
925
+ );
926
+ } catch (err) {
927
+ return handleErrorResult("query", "memory", operation, err, startTime);
928
+ }
929
+ }
887
930
  // T1006 — read diary-typed observations
888
931
  case "diary": {
889
932
  const limitVal = paramNumber(params, "limit") ?? 20;
@@ -1264,6 +1307,34 @@ var MemoryHandler = class {
1264
1307
  },
1265
1308
  projectRoot
1266
1309
  );
1310
+ const observed = result.success ? result.data : void 0;
1311
+ if (observed?.stored === false) {
1312
+ const action = observed.gateAction ?? "declined";
1313
+ const into = observed.gateAction === "merged" ? ` into ${observed.id}` : "";
1314
+ const why = observed.gateReason ? ` (${observed.gateReason})` : "";
1315
+ const refused = errorResult(
1316
+ "mutate",
1317
+ "memory",
1318
+ operation,
1319
+ // @sync-invariant none:input-shape the gate stored nothing; this only reports it
1320
+ "E_OBSERVE_NOT_STORED",
1321
+ `Nothing stored: the extraction gate ${action} the observation${into}${why}`,
1322
+ startTime
1323
+ );
1324
+ return {
1325
+ ...refused,
1326
+ error: {
1327
+ // @sync-invariant none:input-shape the gate stored nothing; this only reports it
1328
+ code: "E_OBSERVE_NOT_STORED",
1329
+ message: refused.error?.message ?? "Nothing stored",
1330
+ details: {
1331
+ id: observed.id,
1332
+ ...observed.gateAction ? { gateAction: observed.gateAction } : {},
1333
+ ...observed.gateReason ? { gateReason: observed.gateReason } : {}
1334
+ }
1335
+ }
1336
+ };
1337
+ }
1267
1338
  return wrapResult(result, "mutate", "memory", operation, startTime);
1268
1339
  }
1269
1340
  case "decision.store": {
@@ -1717,81 +1788,18 @@ var MemoryHandler = class {
1717
1788
  // which already handles all sweep sub-commands via a unified case block.
1718
1789
  case "sweep":
1719
1790
  return this.query(operation, params);
1720
- // T9976 — backfill: emit memory observations for existing doc attachments
1721
- // that do not yet have a corresponding brain observation.
1791
+ // T9976/T13985 (D11180) — backfill: write the `llmtxt --documents--> owner`
1792
+ // edge for existing doc attachments that do not have it yet.
1722
1793
  case "backfill-docs": {
1723
1794
  try {
1724
- const store = createAttachmentStore();
1725
- const allAttachments = await store.listAllInProject();
1726
- await getBrainDb(projectRoot);
1727
- const nativeDb = getBrainNativeDb(projectRoot);
1728
- const existingAttachmentIds = /* @__PURE__ */ new Set();
1729
- if (nativeDb) {
1730
- try {
1731
- const existing = nativeDb.prepare(
1732
- `SELECT narrative FROM brain_observations
1733
- WHERE narrative LIKE '%"kind":"doc-attachment"%'
1734
- AND invalid_at IS NULL`
1735
- ).all();
1736
- for (const row of existing) {
1737
- if (!row.narrative) continue;
1738
- try {
1739
- const p = JSON.parse(row.narrative);
1740
- if (p.kind === "doc-attachment" && typeof p.attachmentId === "string") {
1741
- existingAttachmentIds.add(p.attachmentId);
1742
- }
1743
- } catch {
1744
- }
1745
- }
1746
- } catch {
1747
- }
1748
- }
1749
- let emitted = 0;
1750
- let skipped = 0;
1751
- const emittedIds = [];
1752
- for (const item of allAttachments) {
1753
- const attId = item.metadata.id;
1754
- if (existingAttachmentIds.has(attId)) {
1755
- skipped++;
1756
- continue;
1757
- }
1758
- const extras = await store.getExtras(attId);
1759
- const slug = extras?.slug ?? void 0;
1760
- const type = extras?.type ?? void 0;
1761
- const payload = {
1762
- kind: "doc-attachment",
1763
- attachmentId: attId,
1764
- ownerId: item.ownerId,
1765
- addedAt: item.metadata.createdAt,
1766
- ...slug !== void 0 ? { slug } : {},
1767
- ...type !== void 0 ? { type } : {}
1768
- };
1769
- const { memoryObserve: brainObserve } = await import("@cleocode/core/memory/engine-compat");
1770
- await brainObserve(
1771
- {
1772
- text: JSON.stringify(payload),
1773
- title: `Doc attached: ${slug ?? attId}`,
1774
- type: "feature",
1775
- // sourceType: 'manual' avoids the mental-model queue (5s flush interval).
1776
- // The mental-model queue is only entered when `agent` is set + type is in
1777
- // MENTAL_MODEL_TYPES. Using 'manual' bypasses this path entirely.
1778
- sourceType: "manual"
1779
- },
1780
- projectRoot
1781
- ).catch(() => {
1782
- });
1783
- emittedIds.push(attId);
1784
- emitted++;
1785
- }
1795
+ const { backfillDocumentEdges } = await import("@cleocode/core/docs/document-edges");
1796
+ const backfill = await backfillDocumentEdges(projectRoot);
1786
1797
  return wrapResult(
1787
1798
  {
1788
1799
  success: true,
1789
1800
  data: {
1790
- total: allAttachments.length,
1791
- emitted,
1792
- skipped,
1793
- emittedAttachmentIds: emittedIds,
1794
- hint: emitted === 0 ? "All existing attachments already have memory observations \u2014 nothing to backfill." : `Emitted ${emitted} new doc-attachment observations. Use 'cleo memory find <slug>' to verify.`
1801
+ ...backfill,
1802
+ hint: backfill.written === 0 ? "Every attachment already has its documents edge \u2014 nothing to backfill." : `Wrote ${backfill.written} missing documents edge(s).`
1795
1803
  }
1796
1804
  },
1797
1805
  "mutate",
@@ -1858,6 +1866,8 @@ var MemoryHandler = class {
1858
1866
  "recent",
1859
1867
  // T1006 — diary-typed observations (requires diary enum from T1005)
1860
1868
  "diary",
1869
+ // T13949 — curated lessons index
1870
+ "lessons",
1861
1871
  // T1006 — long-poll stream of recent brain writes (SSE-style polling stub)
1862
1872
  "watch",
1863
1873
  // T1003 — list staged backfill runs
@@ -1894,4 +1904,4 @@ var MemoryHandler = class {
1894
1904
  export {
1895
1905
  MemoryHandler
1896
1906
  };
1897
- //# sourceMappingURL=memory-CYS36LY4.js.map
1907
+ //# sourceMappingURL=memory-T3YAA2OK.js.map
@@ -19,9 +19,9 @@ import {
19
19
  readMigrationConflicts,
20
20
  runMigrateAgentsV2,
21
21
  walkAgentsDir
22
- } from "./chunk-IIOGUY3B.js";
22
+ } from "./chunk-LLIRCDQX.js";
23
23
  import "./chunk-PKKZPOOP.js";
24
- import "./chunk-4RGSNUUP.js";
24
+ import "./chunk-6UGBRRKY.js";
25
25
  import "./chunk-6JSJNYH2.js";
26
26
  export {
27
27
  extractAgentName,
@@ -30,4 +30,4 @@ export {
30
30
  runMigrateAgentsV2,
31
31
  walkAgentsDir
32
32
  };
33
- //# sourceMappingURL=migrate-agents-v2-A52QIYNJ.js.map
33
+ //# sourceMappingURL=migrate-agents-v2-RGJ63UHD.js.map
@@ -15,10 +15,10 @@
15
15
  })();
16
16
  import {
17
17
  migrateAgentsV2Command
18
- } from "./chunk-IIOGUY3B.js";
18
+ } from "./chunk-LLIRCDQX.js";
19
19
  import {
20
20
  dispatchFromCli
21
- } from "./chunk-L3W2NVWA.js";
21
+ } from "./chunk-VBTCULVY.js";
22
22
  import "./chunk-6N6WGLXE.js";
23
23
  import "./chunk-4VASFLUW.js";
24
24
  import {
@@ -30,10 +30,10 @@ import {
30
30
  cliError,
31
31
  cliOutput,
32
32
  humanLine
33
- } from "./chunk-4RGSNUUP.js";
33
+ } from "./chunk-6UGBRRKY.js";
34
34
  import "./chunk-6JSJNYH2.js";
35
35
  import "./chunk-D7BAQNV2.js";
36
- import "./chunk-GAMCDPPS.js";
36
+ import "./chunk-BFRYJSL5.js";
37
37
 
38
38
  // packages/cleo/src/cli/commands/migrate-claude-mem.ts
39
39
  import { migrateClaudeMem } from "@cleocode/core/memory/claude-mem-migration";
@@ -203,4 +203,4 @@ var migrateClaudeMemCommand = defineCommand({
203
203
  export {
204
204
  migrateClaudeMemCommand
205
205
  };
206
- //# sourceMappingURL=migrate-claude-mem-VC4GOHLG.js.map
206
+ //# sourceMappingURL=migrate-claude-mem-GI75LXGS.js.map
@@ -15,17 +15,17 @@
15
15
  })();
16
16
  import {
17
17
  dispatchFromCli
18
- } from "./chunk-L3W2NVWA.js";
18
+ } from "./chunk-VBTCULVY.js";
19
19
  import "./chunk-6N6WGLXE.js";
20
20
  import "./chunk-4VASFLUW.js";
21
21
  import {
22
22
  defineCommand
23
23
  } from "./chunk-PKKZPOOP.js";
24
24
  import "./chunk-QKMBWYAS.js";
25
- import "./chunk-4RGSNUUP.js";
25
+ import "./chunk-6UGBRRKY.js";
26
26
  import "./chunk-6JSJNYH2.js";
27
27
  import "./chunk-D7BAQNV2.js";
28
- import "./chunk-GAMCDPPS.js";
28
+ import "./chunk-BFRYJSL5.js";
29
29
 
30
30
  // packages/cleo/src/cli/commands/next.ts
31
31
  var nextCommand = defineCommand({
@@ -54,4 +54,4 @@ var nextCommand = defineCommand({
54
54
  export {
55
55
  nextCommand
56
56
  };
57
- //# sourceMappingURL=next-HZVSZRHJ.js.map
57
+ //# sourceMappingURL=next-24SKEZYV.js.map