@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
@@ -16,10 +16,14 @@
16
16
  import {
17
17
  negatedFlag
18
18
  } from "./chunk-47JYZAMS.js";
19
+ import {
20
+ warnConduitDeprecated
21
+ } from "./chunk-IGM44F43.js";
19
22
  import {
20
23
  dispatchFromCli,
21
- dispatchRaw
22
- } from "./chunk-L3W2NVWA.js";
24
+ dispatchRaw,
25
+ reportRawError
26
+ } from "./chunk-VBTCULVY.js";
23
27
  import "./chunk-6N6WGLXE.js";
24
28
  import "./chunk-4VASFLUW.js";
25
29
  import {
@@ -36,13 +40,13 @@ import {
36
40
  cliOutput,
37
41
  humanInfo,
38
42
  humanWarn
39
- } from "./chunk-4RGSNUUP.js";
43
+ } from "./chunk-6UGBRRKY.js";
40
44
  import {
41
45
  getFormatContext,
42
46
  setFormatContext
43
47
  } from "./chunk-6JSJNYH2.js";
44
48
  import "./chunk-D7BAQNV2.js";
45
- import "./chunk-GAMCDPPS.js";
49
+ import "./chunk-BFRYJSL5.js";
46
50
 
47
51
  // packages/cleo/src/cli/commands/nexus.ts
48
52
  import { statSync } from "node:fs";
@@ -61,11 +65,14 @@ import {
61
65
  } from "@cleocode/core/nexus/assessment-projection.js";
62
66
  import { exportNexusGraph } from "@cleocode/core/nexus/export.js";
63
67
  import {
68
+ answerFreshness,
64
69
  assessNexusFreshnessForQuery,
65
70
  assessNexusIndexFreshness,
66
71
  discloseNexusFreshness,
67
72
  judgeSymbolFiles,
68
73
  querySymbolFiles,
74
+ readNexusStalePolicy,
75
+ staleIndexRefusal,
69
76
  withNexusFreshnessMeta
70
77
  } from "@cleocode/core/nexus/freshness.js";
71
78
  import { KnowledgeSymbolAmbiguityError } from "@cleocode/core/nexus/knowledge.js";
@@ -343,6 +350,9 @@ The code-intelligence graph is project-scoped (ADR-090 \xB7 T11648): one store p
343
350
  const projected = summary && projectAssessmentFiles(summary, filesRequest);
344
351
  const referencePage = projected && referencesRequest ? await readKnowledgeIndexReferencePage(currentRoot, referencesRequest) : null;
345
352
  const assessment = projected && referencePage ? withReferencePage(projected, referencePage) : projected;
353
+ const { summarizeRegistryHealth } = await import("@cleocode/core/nexus/registry");
354
+ const registry = await summarizeRegistryHealth().catch(() => void 0);
355
+ const { readReindexOnMergeOutcome } = await import("@cleocode/core/nexus/reindex-on-merge");
346
356
  const durationMs = Date.now() - startTime;
347
357
  cliOutput(
348
358
  {
@@ -351,7 +361,10 @@ The code-intelligence graph is project-scoped (ADR-090 \xB7 T11648): one store p
351
361
  ...stats,
352
362
  ...freshness.status === "unknown" ? {} : { staleFileCount: freshness.staleFileCount },
353
363
  freshness,
354
- assessment
364
+ assessment,
365
+ ...registry ? { registry } : {},
366
+ // T14010: what the last background reindex after a merge did.
367
+ reindexOnMerge: readReindexOnMergeOutcome(currentRoot)
355
368
  },
356
369
  {
357
370
  command: "nexus-status",
@@ -864,14 +877,7 @@ var clustersCommand = defineCommand({
864
877
  const response = await dispatchRaw("query", "nexus", "clusters", { projectId, repoPath });
865
878
  const durationMs = Date.now() - startTime;
866
879
  if (!response.success) {
867
- const msg = response.error?.message ?? "Unknown error";
868
- cliError(
869
- msg,
870
- 1,
871
- { name: response.error?.code ?? "E_CLUSTERS_FAILED", details: response.error?.details },
872
- { operation: "nexus.clusters", duration_ms: durationMs }
873
- );
874
- process.exitCode = 1;
880
+ reportRawError(response, { operation: "nexus.clusters", fallbackCode: "E_CLUSTERS_FAILED" });
875
881
  return;
876
882
  }
877
883
  cliOutput(response.data, {
@@ -908,14 +914,7 @@ var flowsCommand = defineCommand({
908
914
  const response = await dispatchRaw("query", "nexus", "flows", { projectId, repoPath });
909
915
  const durationMs = Date.now() - startTime;
910
916
  if (!response.success) {
911
- const msg = response.error?.message ?? "Unknown error";
912
- cliError(
913
- msg,
914
- 1,
915
- { name: response.error?.code ?? "E_FLOWS_FAILED", details: response.error?.details },
916
- { operation: "nexus.flows", duration_ms: durationMs }
917
- );
918
- process.exitCode = 1;
917
+ reportRawError(response, { operation: "nexus.flows", fallbackCode: "E_FLOWS_FAILED" });
919
918
  return;
920
919
  }
921
920
  cliOutput(response.data, {
@@ -944,6 +943,11 @@ var contextCommand = defineCommand({
944
943
  type: "boolean",
945
944
  description: "Answer from the index as it stands, without an inline refresh (T13523)",
946
945
  default: false
946
+ },
947
+ "allow-stale": {
948
+ type: "boolean",
949
+ description: "Answer even when the index is more than nexus.freshness.maxCommitsBehind commits behind the checked-out HEAD (T14008)",
950
+ default: false
947
951
  }
948
952
  },
949
953
  async run({ args }) {
@@ -962,18 +966,24 @@ var contextCommand = defineCommand({
962
966
  limit,
963
967
  content: showContent,
964
968
  ...negatedFlag(args, "refresh") ? { noRefresh: true } : {},
969
+ ...args["allow-stale"] ? { allowStale: true } : {},
965
970
  _legacyAliasFor: "cleo graph context"
966
971
  });
967
972
  const durationMs = Date.now() - startTime;
968
973
  if (!response.success) {
969
974
  const msg = response.error?.message ?? "Unknown error";
975
+ const exitCode = response.error?.code === "E_NEXUS_INDEX_STALE" ? ExitCode.NEXUS_INDEX_STALE : 1;
970
976
  cliError(
971
977
  msg,
972
- 1,
973
- { name: response.error?.code ?? "E_CONTEXT_FAILED", details: response.error?.details },
978
+ exitCode,
979
+ {
980
+ name: response.error?.code ?? "E_CONTEXT_FAILED",
981
+ details: response.error?.details,
982
+ ...response.error?.fix ? { fix: response.error.fix } : {}
983
+ },
974
984
  { operation: "nexus.context", duration_ms: durationMs }
975
985
  );
976
- process.exitCode = 1;
986
+ process.exitCode = exitCode;
977
987
  return;
978
988
  }
979
989
  const result = response.data;
@@ -995,6 +1005,15 @@ var contextCommand = defineCommand({
995
1005
  });
996
1006
  }
997
1007
  });
1008
+ function refuseStaleImpact(refusal, startTime) {
1009
+ cliError(
1010
+ refusal.message,
1011
+ ExitCode.NEXUS_INDEX_STALE,
1012
+ { name: refusal.code, fix: refusal.fix, details: { ...refusal.details } },
1013
+ { operation: "nexus.impact", duration_ms: Date.now() - startTime }
1014
+ );
1015
+ process.exitCode = ExitCode.NEXUS_INDEX_STALE;
1016
+ }
998
1017
  var impactCommand = defineCommand({
999
1018
  meta: {
1000
1019
  name: "impact",
@@ -1013,6 +1032,11 @@ var impactCommand = defineCommand({
1013
1032
  type: "boolean",
1014
1033
  description: "Answer from the index as it stands, without an inline refresh (T13523)",
1015
1034
  default: false
1035
+ },
1036
+ "allow-stale": {
1037
+ type: "boolean",
1038
+ description: "Answer even when the index is more than nexus.freshness.maxCommitsBehind commits behind the checked-out HEAD (T14008)",
1039
+ default: false
1016
1040
  }
1017
1041
  },
1018
1042
  async run({ args }) {
@@ -1024,28 +1048,57 @@ var impactCommand = defineCommand({
1024
1048
  const projectId = await resolveNexusQueryProjectId(repoPath, projectIdOverride);
1025
1049
  const maxDepth = Math.min(parseInt(args.depth, 10), 5);
1026
1050
  const symbolName = args.symbol;
1051
+ let stalePolicy;
1052
+ let staleAssessment;
1053
+ const refusedAsMissing = () => {
1054
+ if (!stalePolicy || !staleAssessment) return false;
1055
+ const missing = staleIndexRefusal(staleAssessment, stalePolicy, {
1056
+ projectRoot: repoPath,
1057
+ targetMissing: true
1058
+ });
1059
+ if (missing) refuseStaleImpact(missing, startTime);
1060
+ return missing !== null;
1061
+ };
1027
1062
  try {
1028
1063
  const assessment = await assessNexusFreshnessForQuery(repoPath, {
1029
1064
  refresh: !negatedFlag(args, "refresh")
1030
1065
  });
1066
+ stalePolicy = await readNexusStalePolicy(repoPath, { allowStale: !!args["allow-stale"] });
1067
+ staleAssessment = assessment.freshness;
1068
+ const tooStale = staleIndexRefusal(assessment.freshness, stalePolicy, {
1069
+ projectRoot: repoPath
1070
+ });
1071
+ if (tooStale) {
1072
+ refuseStaleImpact(tooStale, startTime);
1073
+ return;
1074
+ }
1031
1075
  const result = await getSymbolImpact(symbolName, projectId, repoPath, {
1032
1076
  maxDepth,
1033
1077
  why: whyFlag
1034
1078
  });
1079
+ if (result.targetNodeId === null && refusedAsMissing()) return;
1035
1080
  const freshness = judgeSymbolFiles(assessment, querySymbolFiles(result));
1036
1081
  discloseNexusFreshness("nexus impact", freshness);
1037
1082
  const durationMs = Date.now() - startTime;
1038
- cliOutput({ ...result, _symbolName: symbolName, _why: whyFlag }, {
1039
- command: "nexus-impact",
1040
- operation: "nexus.impact",
1041
- extensions: withNexusFreshnessMeta(
1042
- {
1043
- duration_ms: durationMs,
1044
- ...buildNexusMetaExtensions("impact", { symbol: symbolName, projectId })
1045
- },
1046
- freshness
1047
- )
1048
- });
1083
+ cliOutput(
1084
+ {
1085
+ ...result,
1086
+ freshness: answerFreshness(freshness),
1087
+ _symbolName: symbolName,
1088
+ _why: whyFlag
1089
+ },
1090
+ {
1091
+ command: "nexus-impact",
1092
+ operation: "nexus.impact",
1093
+ extensions: withNexusFreshnessMeta(
1094
+ {
1095
+ duration_ms: durationMs,
1096
+ ...buildNexusMetaExtensions("impact", { symbol: symbolName, projectId })
1097
+ },
1098
+ freshness
1099
+ )
1100
+ }
1101
+ );
1049
1102
  } catch (err) {
1050
1103
  const code = err instanceof Error && "code" in err ? err.code : void 0;
1051
1104
  const msg = err instanceof Error ? err.message : String(err);
@@ -1065,6 +1118,7 @@ var impactCommand = defineCommand({
1065
1118
  return;
1066
1119
  }
1067
1120
  if (code === "E_NOT_FOUND") {
1121
+ if (refusedAsMissing()) return;
1068
1122
  cliError(
1069
1123
  msg,
1070
1124
  4,
@@ -1084,6 +1138,40 @@ var impactCommand = defineCommand({
1084
1138
  }
1085
1139
  }
1086
1140
  });
1141
+ var reindexOnMergeCommand = defineCommand({
1142
+ meta: {
1143
+ name: "reindex-on-merge",
1144
+ description: "Reindex after a merge into the base branch (run by the post-merge hook). Off until --enable"
1145
+ },
1146
+ args: {
1147
+ json: { type: "boolean", description: "Output result as JSON (LAFS envelope format)" },
1148
+ enable: {
1149
+ type: "boolean",
1150
+ description: "Turn it on: set nexus.reindexOnMerge.enabled and the git marker the post-merge hook checks"
1151
+ },
1152
+ disable: { type: "boolean", description: "Turn it off (config and git marker)" }
1153
+ },
1154
+ async run({ args }) {
1155
+ applyJsonFlag(args.json);
1156
+ const { runReindexOnMerge, setReindexOnMerge } = await import("@cleocode/core/nexus/reindex-on-merge");
1157
+ if (args.enable || args.disable) {
1158
+ await setReindexOnMerge(getProjectRoot(), !!args.enable);
1159
+ cliOutput(
1160
+ { reindexOnMerge: !!args.enable },
1161
+ { command: "nexus-reindex-on-merge", operation: "nexus.reindex-on-merge" }
1162
+ );
1163
+ return;
1164
+ }
1165
+ const outcome = await runReindexOnMerge(getProjectRoot());
1166
+ cliOutput(
1167
+ { ...outcome },
1168
+ {
1169
+ command: "nexus-reindex-on-merge",
1170
+ operation: "nexus.reindex-on-merge"
1171
+ }
1172
+ );
1173
+ }
1174
+ });
1087
1175
  var analyzeCommand = defineCommand({
1088
1176
  meta: {
1089
1177
  name: "analyze",
@@ -1420,7 +1508,7 @@ var projectsCleanCommand = defineCommand({
1420
1508
  },
1421
1509
  unhealthy: {
1422
1510
  type: "boolean",
1423
- description: 'Also match rows where health_status is "unhealthy"'
1511
+ description: "Also match rows recorded unreachable whose path no longer answers (moved or unreadable rows are kept)"
1424
1512
  },
1425
1513
  "never-indexed": {
1426
1514
  type: "boolean",
@@ -1498,7 +1586,8 @@ var projectsCleanCommand = defineCommand({
1498
1586
  classification,
1499
1587
  ...preview.relocated ? { relocated: preview.relocated } : {},
1500
1588
  ...preview.unreadable ? { unreadable: preview.unreadable } : {},
1501
- ...preview.idMismatch ? { idMismatch: preview.idMismatch } : {}
1589
+ ...preview.idMismatch ? { idMismatch: preview.idMismatch } : {},
1590
+ ...preview.otherHost ? { otherHost: preview.otherHost } : {}
1502
1591
  },
1503
1592
  {
1504
1593
  command: "nexus-projects-clean-preview",
@@ -1520,7 +1609,8 @@ var projectsCleanCommand = defineCommand({
1520
1609
  matchedByReason,
1521
1610
  ...preview.relocated ? { relocated: preview.relocated } : {},
1522
1611
  ...preview.unreadable ? { unreadable: preview.unreadable } : {},
1523
- ...preview.idMismatch ? { idMismatch: preview.idMismatch } : {}
1612
+ ...preview.idMismatch ? { idMismatch: preview.idMismatch } : {},
1613
+ ...preview.otherHost ? { otherHost: preview.otherHost } : {}
1524
1614
  },
1525
1615
  {
1526
1616
  command: "nexus-projects-clean",
@@ -1586,7 +1676,8 @@ var projectsCleanCommand = defineCommand({
1586
1676
  receipt: result.receipt,
1587
1677
  ...result.relocated ? { relocated: result.relocated } : {},
1588
1678
  ...result.unreadable ? { unreadable: result.unreadable } : {},
1589
- ...result.idMismatch ? { idMismatch: result.idMismatch } : {}
1679
+ ...result.idMismatch ? { idMismatch: result.idMismatch } : {},
1680
+ ...result.otherHost ? { otherHost: result.otherHost } : {}
1590
1681
  },
1591
1682
  {
1592
1683
  command: "nexus-projects-clean",
@@ -1943,6 +2034,10 @@ var queryCommand = defineCommand({
1943
2034
  params
1944
2035
  });
1945
2036
  const durationMs = Date.now() - startTime;
2037
+ if (!response.success && response.error?.code === "E_NEXUS_INDEX_STALE") {
2038
+ reportRawError(response, { operation: "nexus.query-cte" });
2039
+ return;
2040
+ }
1946
2041
  if (!response.success) {
1947
2042
  const code = response.error?.code;
1948
2043
  const msg = response.error?.message ?? "Unknown error";
@@ -2009,14 +2104,10 @@ var routeMapCommand = defineCommand({
2009
2104
  const response = await dispatchRaw("query", "nexus", "route-map", { projectId });
2010
2105
  const durationMs = Date.now() - startTime;
2011
2106
  if (!response.success) {
2012
- const msg = response.error?.message ?? "Unknown error";
2013
- cliError(
2014
- msg,
2015
- 1,
2016
- { name: response.error?.code ?? "E_ROUTE_MAP_FAILED", details: response.error?.details },
2017
- { operation: "nexus.route-map", duration_ms: durationMs }
2018
- );
2019
- process.exitCode = 1;
2107
+ reportRawError(response, {
2108
+ operation: "nexus.route-map",
2109
+ fallbackCode: "E_ROUTE_MAP_FAILED"
2110
+ });
2020
2111
  return;
2021
2112
  }
2022
2113
  cliOutput(
@@ -2065,14 +2156,10 @@ var shapeCheckCommand = defineCommand({
2065
2156
  const response = await dispatchRaw("query", "nexus", "shape-check", { routeSymbol, projectId });
2066
2157
  const durationMs = Date.now() - startTime;
2067
2158
  if (!response.success) {
2068
- const msg = response.error?.message ?? "Unknown error";
2069
- cliError(
2070
- msg,
2071
- 1,
2072
- { name: response.error?.code ?? "E_SHAPE_CHECK_FAILED", details: response.error?.details },
2073
- { operation: "nexus.shape-check", duration_ms: durationMs }
2074
- );
2075
- process.exitCode = 1;
2159
+ reportRawError(response, {
2160
+ operation: "nexus.shape-check",
2161
+ fallbackCode: "E_SHAPE_CHECK_FAILED"
2162
+ });
2076
2163
  return;
2077
2164
  }
2078
2165
  cliOutput(
@@ -2108,13 +2195,10 @@ var fullContextCommand = defineCommand({
2108
2195
  const symbolId = args.symbol;
2109
2196
  const response = await dispatchRaw("query", "nexus", "full-context", { symbol: symbolId });
2110
2197
  if (!response.success) {
2111
- cliError(
2112
- response.error?.message ?? "Unknown error",
2113
- 1,
2114
- { name: response.error?.code ?? "E_FULL_CONTEXT_FAILED", details: response.error?.details },
2115
- { operation: "nexus.full-context" }
2116
- );
2117
- process.exitCode = 1;
2198
+ reportRawError(response, {
2199
+ operation: "nexus.full-context",
2200
+ fallbackCode: "E_FULL_CONTEXT_FAILED"
2201
+ });
2118
2202
  return;
2119
2203
  }
2120
2204
  const durationMs = Date.now() - startTime;
@@ -2151,16 +2235,10 @@ var taskFootprintCommand = defineCommand({
2151
2235
  const taskId = args.taskId;
2152
2236
  const response = await dispatchRaw("query", "nexus", "task-footprint", { taskId });
2153
2237
  if (!response.success) {
2154
- cliError(
2155
- response.error?.message ?? "Unknown error",
2156
- 1,
2157
- {
2158
- name: response.error?.code ?? "E_TASK_FOOTPRINT_FAILED",
2159
- details: response.error?.details
2160
- },
2161
- { operation: "nexus.task-footprint" }
2162
- );
2163
- process.exitCode = 1;
2238
+ reportRawError(response, {
2239
+ operation: "nexus.task-footprint",
2240
+ fallbackCode: "E_TASK_FOOTPRINT_FAILED"
2241
+ });
2164
2242
  return;
2165
2243
  }
2166
2244
  const durationMs = Date.now() - startTime;
@@ -2197,16 +2275,10 @@ var brainAnchorsCommand = defineCommand({
2197
2275
  const entryId = args.entryId;
2198
2276
  const response = await dispatchRaw("query", "nexus", "brain-anchors", { entryId });
2199
2277
  if (!response.success) {
2200
- cliError(
2201
- response.error?.message ?? "Unknown error",
2202
- 1,
2203
- {
2204
- name: response.error?.code ?? "E_BRAIN_ANCHORS_FAILED",
2205
- details: response.error?.details
2206
- },
2207
- { operation: "nexus.brain-anchors" }
2208
- );
2209
- process.exitCode = 1;
2278
+ reportRawError(response, {
2279
+ operation: "nexus.brain-anchors",
2280
+ fallbackCode: "E_BRAIN_ANCHORS_FAILED"
2281
+ });
2210
2282
  return;
2211
2283
  }
2212
2284
  const durationMs = Date.now() - startTime;
@@ -2243,13 +2315,7 @@ var whyCommand = defineCommand({
2243
2315
  const symbolId = args.symbol;
2244
2316
  const response = await dispatchRaw("query", "nexus", "why", { symbol: symbolId });
2245
2317
  if (!response.success) {
2246
- cliError(
2247
- response.error?.message ?? "Unknown error",
2248
- 1,
2249
- { name: response.error?.code ?? "E_WHY_FAILED", details: response.error?.details },
2250
- { operation: "nexus.why" }
2251
- );
2252
- process.exitCode = 1;
2318
+ reportRawError(response, { operation: "nexus.why", fallbackCode: "E_WHY_FAILED" });
2253
2319
  return;
2254
2320
  }
2255
2321
  const durationMs = Date.now() - startTime;
@@ -2286,13 +2352,10 @@ var impactFullCommand = defineCommand({
2286
2352
  const symbolId = args.symbol;
2287
2353
  const response = await dispatchRaw("query", "nexus", "impact-full", { symbol: symbolId });
2288
2354
  if (!response.success) {
2289
- cliError(
2290
- response.error?.message ?? "Unknown error",
2291
- 1,
2292
- { name: response.error?.code ?? "E_IMPACT_FULL_FAILED", details: response.error?.details },
2293
- { operation: "nexus.impact-full" }
2294
- );
2295
- process.exitCode = 1;
2355
+ reportRawError(response, {
2356
+ operation: "nexus.impact-full",
2357
+ fallbackCode: "E_IMPACT_FULL_FAILED"
2358
+ });
2296
2359
  return;
2297
2360
  }
2298
2361
  const durationMs = Date.now() - startTime;
@@ -2319,6 +2382,7 @@ var conduitScanCommand = defineCommand({
2319
2382
  }
2320
2383
  },
2321
2384
  async run({ args }) {
2385
+ warnConduitDeprecated("nexus conduit-scan");
2322
2386
  applyJsonFlag(args.json);
2323
2387
  const startTime = Date.now();
2324
2388
  const response = await dispatchRaw("mutate", "nexus", "conduit-scan", {});
@@ -2368,14 +2432,10 @@ var taskSymbolsCommand = defineCommand({
2368
2432
  const response = await dispatchRaw("query", "nexus", "task-symbols", { taskId });
2369
2433
  const durationMs = Date.now() - startTime;
2370
2434
  if (!response.success) {
2371
- const msg = response.error?.message ?? "Unknown error";
2372
- cliError(
2373
- msg,
2374
- 1,
2375
- { name: response.error?.code ?? "E_TASK_SYMBOLS_FAILED", details: response.error?.details },
2376
- { operation: "nexus.task-symbols", duration_ms: durationMs }
2377
- );
2378
- process.exitCode = 1;
2435
+ reportRawError(response, {
2436
+ operation: "nexus.task-symbols",
2437
+ fallbackCode: "E_TASK_SYMBOLS_FAILED"
2438
+ });
2379
2439
  return;
2380
2440
  }
2381
2441
  const data = response.data;
@@ -2709,13 +2769,10 @@ var hotPathsCommand = defineCommand({
2709
2769
  const response = await dispatchRaw("query", "nexus", "hot-paths", { limit });
2710
2770
  const durationMs = Date.now() - startTime;
2711
2771
  if (!response.success) {
2712
- cliError(
2713
- response.error?.message ?? "Unknown error",
2714
- 1,
2715
- { name: response.error?.code ?? "E_HOT_PATHS_FAILED", details: response.error?.details },
2716
- { operation: "nexus.hot-paths", duration_ms: durationMs }
2717
- );
2718
- process.exitCode = 1;
2772
+ reportRawError(response, {
2773
+ operation: "nexus.hot-paths",
2774
+ fallbackCode: "E_HOT_PATHS_FAILED"
2775
+ });
2719
2776
  return;
2720
2777
  }
2721
2778
  cliOutput(response.data, {
@@ -2750,13 +2807,10 @@ var hotNodesCommand = defineCommand({
2750
2807
  const response = await dispatchRaw("query", "nexus", "hot-nodes", { limit });
2751
2808
  const durationMs = Date.now() - startTime;
2752
2809
  if (!response.success) {
2753
- cliError(
2754
- response.error?.message ?? "Unknown error",
2755
- 1,
2756
- { name: response.error?.code ?? "E_HOT_NODES_FAILED", details: response.error?.details },
2757
- { operation: "nexus.hot-nodes", duration_ms: durationMs }
2758
- );
2759
- process.exitCode = 1;
2810
+ reportRawError(response, {
2811
+ operation: "nexus.hot-nodes",
2812
+ fallbackCode: "E_HOT_NODES_FAILED"
2813
+ });
2760
2814
  return;
2761
2815
  }
2762
2816
  cliOutput(response.data, {
@@ -2791,13 +2845,10 @@ var coldSymbolsCommand = defineCommand({
2791
2845
  const response = await dispatchRaw("query", "nexus", "cold-symbols", { days: thresholdDays });
2792
2846
  const durationMs = Date.now() - startTime;
2793
2847
  if (!response.success) {
2794
- cliError(
2795
- response.error?.message ?? "Unknown error",
2796
- 1,
2797
- { name: response.error?.code ?? "E_COLD_SYMBOLS_FAILED", details: response.error?.details },
2798
- { operation: "nexus.cold-symbols", duration_ms: durationMs }
2799
- );
2800
- process.exitCode = 1;
2848
+ reportRawError(response, {
2849
+ operation: "nexus.cold-symbols",
2850
+ fallbackCode: "E_COLD_SYMBOLS_FAILED"
2851
+ });
2801
2852
  return;
2802
2853
  }
2803
2854
  cliOutput(response.data, {
@@ -2918,6 +2969,7 @@ var nexusCommand = defineCommand({
2918
2969
  context: contextCommand,
2919
2970
  impact: impactCommand,
2920
2971
  analyze: analyzeCommand,
2972
+ "reindex-on-merge": reindexOnMergeCommand,
2921
2973
  query: queryCommand,
2922
2974
  projects: projectsCommand,
2923
2975
  "refresh-bridge": refreshBridgeCommand,
@@ -2960,4 +3012,4 @@ var nexusCommand = defineCommand({
2960
3012
  export {
2961
3013
  nexusCommand
2962
3014
  };
2963
- //# sourceMappingURL=nexus-IRYPIFMK.js.map
3015
+ //# sourceMappingURL=nexus-BDLNXC46.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
  defineTypedHandler,
21
21
  lafsError,
@@ -38,9 +38,12 @@ import {
38
38
  } from "@cleocode/contracts/operations/nexus-scope-map.js";
39
39
  import { getLogger } from "@cleocode/core/logger";
40
40
  import {
41
+ answerFreshness,
41
42
  discloseNexusFreshness,
42
43
  judgeSymbolFiles,
43
44
  querySymbolFiles,
45
+ readNexusStalePolicy,
46
+ staleIndexRefusal,
44
47
  withNexusFreshnessMeta
45
48
  } from "@cleocode/core/nexus/freshness";
46
49
  import { resolveNexusQueryProjectId } from "@cleocode/core/nexus/registry.js";
@@ -803,11 +806,38 @@ function answersFromGraph(operation) {
803
806
  function withFreshness(response, operation, assessment) {
804
807
  const freshness = judgeSymbolFiles(assessment, querySymbolFiles(response.data));
805
808
  discloseNexusFreshness(`nexus ${operation}`, freshness);
809
+ const data = response.success && response.data && typeof response.data === "object" && !Array.isArray(response.data) ? { ...response.data, freshness: answerFreshness(freshness) } : response.data;
806
810
  return {
807
811
  ...response,
812
+ ...data !== void 0 ? { data } : {},
808
813
  meta: { ...response.meta, ...withNexusFreshnessMeta(response.meta, freshness) }
809
814
  };
810
815
  }
816
+ function targetMissing(response) {
817
+ if (!response.success) return response.error?.code === "E_NOT_FOUND";
818
+ const data = response.data;
819
+ return !!data && typeof data === "object" && !Array.isArray(data) && data["matchCount"] === 0;
820
+ }
821
+ function staleRefusalResponse(operation, refusal, startTime) {
822
+ const refused = errorResult(
823
+ "query",
824
+ "nexus",
825
+ operation,
826
+ refusal.code,
827
+ refusal.message,
828
+ startTime
829
+ );
830
+ return {
831
+ ...refused,
832
+ error: {
833
+ // @sync-invariant none:local-only a refused read; nothing is written
834
+ code: refusal.code,
835
+ message: refusal.message,
836
+ fix: refusal.fix,
837
+ details: { ...refusal.details }
838
+ }
839
+ };
840
+ }
811
841
  var NexusHandler = class {
812
842
  /**
813
843
  * Execute a read-only nexus query operation.
@@ -821,10 +851,26 @@ var NexusHandler = class {
821
851
  return unsupportedOp("query", "nexus", operation, startTime);
822
852
  }
823
853
  if (answersFromGraph(operation)) {
824
- const assessment = await assessNexusFreshnessForQuery(getProjectRoot(), {
854
+ const graphRoot = getProjectRoot();
855
+ const assessment = await assessNexusFreshnessForQuery(graphRoot, {
825
856
  refresh: params?.["noRefresh"] !== true
826
857
  });
827
- return withFreshness(await this.answer(operation, params, startTime), operation, assessment);
858
+ const stalePolicy = await readNexusStalePolicy(graphRoot, {
859
+ allowStale: params?.["allowStale"] === true
860
+ });
861
+ const tooStale = staleIndexRefusal(assessment.freshness, stalePolicy, {
862
+ projectRoot: graphRoot
863
+ });
864
+ if (tooStale) return staleRefusalResponse(operation, tooStale, startTime);
865
+ const graphAnswer = await this.answer(operation, params, startTime);
866
+ if (targetMissing(graphAnswer)) {
867
+ const missingFromStale = staleIndexRefusal(assessment.freshness, stalePolicy, {
868
+ projectRoot: graphRoot,
869
+ targetMissing: true
870
+ });
871
+ if (missingFromStale) return staleRefusalResponse(operation, missingFromStale, startTime);
872
+ }
873
+ return withFreshness(graphAnswer, operation, assessment);
828
874
  }
829
875
  return this.answer(operation, params, startTime);
830
876
  }
@@ -1058,4 +1104,4 @@ async function handleImpact(operation, params, startTime) {
1058
1104
  export {
1059
1105
  NexusHandler
1060
1106
  };
1061
- //# sourceMappingURL=nexus-E46KEPJZ.js.map
1107
+ //# sourceMappingURL=nexus-SAELNTDV.js.map
@@ -27,10 +27,10 @@ import {
27
27
  runCloudVault,
28
28
  runCloudVerify,
29
29
  runSyncEnablePush
30
- } from "./chunk-ZEJB6GAB.js";
31
- import "./chunk-CGOF3GJE.js";
30
+ } from "./chunk-FKVXKYD3.js";
31
+ import "./chunk-6MYVSVE5.js";
32
32
  import "./chunk-47JYZAMS.js";
33
- import "./chunk-4RGSNUUP.js";
33
+ import "./chunk-6UGBRRKY.js";
34
34
  import "./chunk-6JSJNYH2.js";
35
35
  export {
36
36
  cloudRestoreSummary,
@@ -47,4 +47,4 @@ export {
47
47
  runCloudVerify,
48
48
  runSyncEnablePush
49
49
  };
50
- //# sourceMappingURL=nexus-vault-cli-H3NIWJDV.js.map
50
+ //# sourceMappingURL=nexus-vault-cli-PDCIZ7YS.js.map