@cleocode/cleo 2026.10.3 → 2026.10.4

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 (307) hide show
  1. package/bin/cleo.js +11 -1
  2. package/dist/cli/adapter-LVXHFBC4.js +158 -0
  3. package/dist/cli/add-WUAV7LDT.js +443 -0
  4. package/dist/cli/add-batch-U2DLKAQC.js +163 -0
  5. package/dist/cli/admin-I7BQYVZD.js +340 -0
  6. package/dist/cli/adr-K2THMQBS.js +171 -0
  7. package/dist/cli/agent-WQ6XY2DW.js +2366 -0
  8. package/dist/cli/agent-outputs-BJIYLVTU.js +84 -0
  9. package/dist/cli/analyze-PGQZWGOC.js +48 -0
  10. package/dist/cli/archive-5LZPF7C3.js +64 -0
  11. package/dist/cli/archive-stats-U6CYC6JM.js +100 -0
  12. package/dist/cli/attention-SOURWCNI.js +167 -0
  13. package/dist/cli/audit-FO2Y4LH2.js +122 -0
  14. package/dist/cli/auth-ED7TAIXI.js +491 -0
  15. package/dist/cli/backfill-32TRAYRD.js +156 -0
  16. package/dist/cli/backup-LEJMZJKL.js +587 -0
  17. package/dist/cli/backup-inspect-6HPLUEI2.js +26 -0
  18. package/dist/cli/backup-recover-2BTYBZU2.js +29 -0
  19. package/dist/cli/blockers-5JULUJTV.js +54 -0
  20. package/dist/cli/brain-273N3FW4.js +400 -0
  21. package/dist/cli/briefing-7H6OLECX.js +212 -0
  22. package/dist/cli/caamp-MFQVN6VU.js +181 -0
  23. package/dist/cli/cancel-SCMJTXZB.js +84 -0
  24. package/dist/cli/canon-NPF5RODM.js +142 -0
  25. package/dist/cli/canon-docs-2GTOLF7Y.js +26 -0
  26. package/dist/cli/cant-46XCUP4P.js +239 -0
  27. package/dist/cli/changeset-32NMBGG2.js +248 -0
  28. package/dist/cli/check-RWJLBCI2.js +907 -0
  29. package/dist/cli/checkpoint-37HMMKD7.js +128 -0
  30. package/dist/cli/chunk-2JIJD2I7.js +108 -0
  31. package/dist/cli/chunk-37NU2XDP.js +171 -0
  32. package/dist/cli/chunk-3IOQVUO7.js +17308 -0
  33. package/dist/cli/chunk-3PGH67MT.js +175 -0
  34. package/dist/cli/chunk-3ZO3M37V.js +1002 -0
  35. package/dist/cli/chunk-47JYZAMS.js +30 -0
  36. package/dist/cli/chunk-5J2VH3BC.js +66 -0
  37. package/dist/cli/chunk-5ZFFUFH7.js +92 -0
  38. package/dist/cli/chunk-6JSJNYH2.js +114 -0
  39. package/dist/cli/chunk-7INMKEAD.js +85 -0
  40. package/dist/cli/chunk-A2IUEIM5.js +278 -0
  41. package/dist/cli/chunk-AWCQH2W5.js +35 -0
  42. package/dist/cli/chunk-AYA6F4ZT.js +56 -0
  43. package/dist/cli/chunk-BCEXRFA2.js +76 -0
  44. package/dist/cli/chunk-BPEVD37G.js +124 -0
  45. package/dist/cli/chunk-C3B7C43W.js +16 -0
  46. package/dist/cli/chunk-DVTPIZJM.js +72 -0
  47. package/dist/cli/chunk-DYABOIHB.js +96 -0
  48. package/dist/cli/chunk-EBRZ76HS.js +51 -0
  49. package/dist/cli/chunk-EGOTK2HA.js +57 -0
  50. package/dist/cli/chunk-EOPQFCSR.js +148 -0
  51. package/dist/cli/chunk-FORFDPP5.js +288 -0
  52. package/dist/cli/chunk-GFGLLDXX.js +110 -0
  53. package/dist/cli/chunk-GH37QXW5.js +280 -0
  54. package/dist/cli/chunk-GZFVDR44.js +320 -0
  55. package/dist/cli/chunk-I3CRQQAD.js +225 -0
  56. package/dist/cli/chunk-J3ZFM3UQ.js +754 -0
  57. package/dist/cli/chunk-JNZJPIPJ.js +90 -0
  58. package/dist/cli/chunk-KHB52JNB.js +209 -0
  59. package/dist/cli/chunk-KJDWWQFY.js +46 -0
  60. package/dist/cli/chunk-LKNUA3SB.js +83 -0
  61. package/dist/cli/chunk-LVGIFMCV.js +163 -0
  62. package/dist/cli/chunk-LWQBJQSE.js +67 -0
  63. package/dist/cli/chunk-MNJRLSEQ.js +107 -0
  64. package/dist/cli/chunk-NRKWJLMS.js +91 -0
  65. package/dist/cli/chunk-NSHV2JNM.js +48 -0
  66. package/dist/cli/chunk-NWTATTEQ.js +210 -0
  67. package/dist/cli/chunk-OAPN46TC.js +89 -0
  68. package/dist/cli/chunk-OGV57L4J.js +59 -0
  69. package/dist/cli/chunk-OILHT47L.js +252 -0
  70. package/dist/cli/chunk-OPTEQKBB.js +258 -0
  71. package/dist/cli/chunk-PKKZPOOP.js +352 -0
  72. package/dist/cli/chunk-QA6T2LQ5.js +71 -0
  73. package/dist/cli/chunk-QFFQSKRC.js +4497 -0
  74. package/dist/cli/chunk-QPUY2HQZ.js +74 -0
  75. package/dist/cli/chunk-REUTEW3O.js +258 -0
  76. package/dist/cli/chunk-S24YI723.js +88 -0
  77. package/dist/cli/chunk-SXXOC6KZ.js +209 -0
  78. package/dist/cli/chunk-ULN4OKQQ.js +259 -0
  79. package/dist/cli/chunk-V5GBGOGM.js +46 -0
  80. package/dist/cli/chunk-VLEYOOPH.js +31 -0
  81. package/dist/cli/chunk-W33Q3FBH.js +66 -0
  82. package/dist/cli/chunk-W3JLYKKY.js +140 -0
  83. package/dist/cli/chunk-XRAX6XFP.js +48 -0
  84. package/dist/cli/chunk-YGKEECTI.js +78 -0
  85. package/dist/cli/chunk-YUZJI67I.js +108 -0
  86. package/dist/cli/chunk-YY66LFZF.js +29 -0
  87. package/dist/cli/chunk-ZBISIPCK.js +78 -0
  88. package/dist/cli/chunk-ZZTHTMQP.js +77 -0
  89. package/dist/cli/claim-KPENYHIQ.js +96 -0
  90. package/dist/cli/classify-DRVMCFQU.js +117 -0
  91. package/dist/cli/cli-T3CR7J57.js +48 -0
  92. package/dist/cli/cloud-PPQ4O5TX.js +565 -0
  93. package/dist/cli/cockpit-RZKLGYPN.js +790 -0
  94. package/dist/cli/code-Z5CTMVTD.js +178 -0
  95. package/dist/cli/complete-UBOCOBRB.js +34 -0
  96. package/dist/cli/complexity-BV2AGQRZ.js +56 -0
  97. package/dist/cli/compliance-32PD5Y47.js +276 -0
  98. package/dist/cli/conduit-VDKCH33F.js +307 -0
  99. package/dist/cli/config-I72JAXK4.js +516 -0
  100. package/dist/cli/consensus-LFILLSTK.js +121 -0
  101. package/dist/cli/context-XUUVFVTP.js +141 -0
  102. package/dist/cli/contribution-37NQ4N5R.js +111 -0
  103. package/dist/cli/curator-TFDXU2EX.js +139 -0
  104. package/dist/cli/current-C4SN5BWV.js +42 -0
  105. package/dist/cli/daemon-DV25JQ62.js +451 -0
  106. package/dist/cli/dash-TFU4RLQW.js +70 -0
  107. package/dist/cli/decide-5VPMNTSI.js +419 -0
  108. package/dist/cli/decompose-KOYEZNJL.js +77 -0
  109. package/dist/cli/decomposition-7OHUFIQN.js +121 -0
  110. package/dist/cli/delete-Q7YCAFY5.js +68 -0
  111. package/dist/cli/deps-6UZKLDGJ.js +463 -0
  112. package/dist/cli/detect-FERY35UL.js +45 -0
  113. package/dist/cli/detect-drift-UL2JTPUK.js +408 -0
  114. package/dist/cli/diagnostics-TI5QAZXR.js +132 -0
  115. package/dist/cli/docs-QI2PRN3T.js +3095 -0
  116. package/dist/cli/doctor-AX5TICQO.js +1253 -0
  117. package/dist/cli/doctor-ac-bindings-YPMYHU2G.js +26 -0
  118. package/dist/cli/doctor-acceptance-drift-PYNFGMKB.js +26 -0
  119. package/dist/cli/doctor-credentials-UZRIADKM.js +26 -0
  120. package/dist/cli/doctor-db-substrate-Q2TOYM2S.js +27 -0
  121. package/dist/cli/doctor-dep-cycles-GCVYZY6F.js +26 -0
  122. package/dist/cli/doctor-exodus-RO5SUTC2.js +26 -0
  123. package/dist/cli/doctor-exodus-residue-EM2AWQXP.js +26 -0
  124. package/dist/cli/doctor-fk-check-Q3FOLECE.js +26 -0
  125. package/dist/cli/doctor-global-delivery-TNOAQ3NP.js +26 -0
  126. package/dist/cli/doctor-heavy-command-hook-IO3QAQLG.js +26 -0
  127. package/dist/cli/doctor-legacy-backups-O2YH5VLS.js +26 -0
  128. package/dist/cli/doctor-legacy-reaper-VSEJEIFA.js +26 -0
  129. package/dist/cli/doctor-malformed-ids-LQ766V5K.js +26 -0
  130. package/dist/cli/doctor-manifest-rows-6FQDNHLH.js +26 -0
  131. package/dist/cli/doctor-memory-guard-J4PSEKB5.js +26 -0
  132. package/dist/cli/doctor-migrations-ONOH56YM.js +26 -0
  133. package/dist/cli/doctor-nexus-residency-FUQAX7PV.js +26 -0
  134. package/dist/cli/doctor-project-identity-GUDK3HYX.js +26 -0
  135. package/dist/cli/doctor-projects-7L3BNL4O.js +30 -0
  136. package/dist/cli/doctor-projects-registry-TEAVHFQU.js +26 -0
  137. package/dist/cli/doctor-release-readiness-IEGHX6SL.js +26 -0
  138. package/dist/cli/doctor-repair-NBONOSZU.js +26 -0
  139. package/dist/cli/doctor-skill-fixtures-7Y6L34A3.js +26 -0
  140. package/dist/cli/doctor-split-brain-TUKIGVHF.js +26 -0
  141. package/dist/cli/doctor-superseded-store-BHZY2B2L.js +26 -0
  142. package/dist/cli/doctor-tool-locks-REQMIVYK.js +26 -0
  143. package/dist/cli/doctor-twin-collapse-222GOSPE.js +26 -0
  144. package/dist/cli/doctor-worktree-stores-J7TCRVJ3.js +26 -0
  145. package/dist/cli/done-V3AOO65B.js +195 -0
  146. package/dist/cli/dynamic-RR4HB7BB.js +29 -0
  147. package/dist/cli/event-EGNPGE5A.js +372 -0
  148. package/dist/cli/exists-H4SDCBPL.js +65 -0
  149. package/dist/cli/exodus-KALO3B3X.js +401 -0
  150. package/dist/cli/export-ROFOCG4M.js +92 -0
  151. package/dist/cli/export-tasks-US3WBIEQ.js +96 -0
  152. package/dist/cli/federation-SUIB5QWT.js +145 -0
  153. package/dist/cli/find-YICG4BG6.js +177 -0
  154. package/dist/cli/focus-TKCZPKOM.js +55 -0
  155. package/dist/cli/gateway-H4HFDC3E.js +77 -0
  156. package/dist/cli/gateway-auto-start-EDK7XI6E.js +36 -0
  157. package/dist/cli/gc-5R2TUY5T.js +291 -0
  158. package/dist/cli/go-PRQFK5YG.js +206 -0
  159. package/dist/cli/goal-7CZRMLHC.js +212 -0
  160. package/dist/cli/grade-PY2YRPUS.js +56 -0
  161. package/dist/cli/graph-XIXMCFKG.js +878 -0
  162. package/dist/cli/history-EIXADPAD.js +137 -0
  163. package/dist/cli/hook-UF7J7R6D.js +57 -0
  164. package/dist/cli/hook-entry.js +244 -19
  165. package/dist/cli/hygiene-3QZ2NI7P.js +55 -0
  166. package/dist/cli/import-R73SO444.js +88 -0
  167. package/dist/cli/import-tasks-O22FZJ4U.js +108 -0
  168. package/dist/cli/index.js +419 -94612
  169. package/dist/cli/init-IHEJDQWU.js +40 -0
  170. package/dist/cli/inject-LSRVWNCP.js +82 -0
  171. package/dist/cli/install-global-4AZUCH6U.js +95 -0
  172. package/dist/cli/intelligence-2OSFOGD2.js +181 -0
  173. package/dist/cli/issue-IIWEDNFC.js +158 -0
  174. package/dist/cli/janitor-GPMC7VOR.js +111 -0
  175. package/dist/cli/labels-5NPOIQXN.js +87 -0
  176. package/dist/cli/lifecycle-4FFS2K2T.js +272 -0
  177. package/dist/cli/list-47KEUGPQ.js +108 -0
  178. package/dist/cli/llm-G5B3I6GD.js +703 -0
  179. package/dist/cli/llm-cost-S7RS6BVA.js +25 -0
  180. package/dist/cli/llm-stream-24A45NTS.js +27 -0
  181. package/dist/cli/log-XF6H2XSD.js +75 -0
  182. package/dist/cli/login-LBPLGHYG.js +43 -0
  183. package/dist/cli/logout-SX4JSJIV.js +74 -0
  184. package/dist/cli/manifest-NMCW4PIW.js +353 -0
  185. package/dist/cli/map-BU72KMGF.js +52 -0
  186. package/dist/cli/memory-UHYIVGVM.js +1956 -0
  187. package/dist/cli/migrate-agents-v2-OO7OILZK.js +33 -0
  188. package/dist/cli/migrate-claude-mem-EDNYUY3K.js +201 -0
  189. package/dist/cli/next-RZFRG5X7.js +56 -0
  190. package/dist/cli/nexus-4S4Z5EVU.js +2923 -0
  191. package/dist/cli/ops-KR7AWCG3.js +51 -0
  192. package/dist/cli/orchestrate-HOYZY3VX.js +948 -0
  193. package/dist/cli/otel-U7IIRBCT.js +188 -0
  194. package/dist/cli/phase-NYZFHUE5.js +220 -0
  195. package/dist/cli/pivot-FF2CVUZL.js +87 -0
  196. package/dist/cli/plan-3SL2NTRV.js +48 -0
  197. package/dist/cli/playbook-2FCBV7N3.js +229 -0
  198. package/dist/cli/project-WDX2TGMC.js +330 -0
  199. package/dist/cli/promote-YINYFBZY.js +52 -0
  200. package/dist/cli/provenance-C7AYD7WG.js +128 -0
  201. package/dist/cli/provider-QLJEDQBR.js +212 -0
  202. package/dist/cli/reason-JF5BHBM5.js +137 -0
  203. package/dist/cli/reconcile-NMISHDGX.js +127 -0
  204. package/dist/cli/refresh-memory-EY5YNICV.js +45 -0
  205. package/dist/cli/relates-R3ZPICAY.js +259 -0
  206. package/dist/cli/release-4ZJTMUUT.js +524 -0
  207. package/dist/cli/remote-QSONJDIK.js +279 -0
  208. package/dist/cli/renderers-64OR3IWX.js +37 -0
  209. package/dist/cli/reorder-J3DOE7ST.js +86 -0
  210. package/dist/cli/reparent-2OUMKEZX.js +58 -0
  211. package/dist/cli/req-TZB7OFKO.js +129 -0
  212. package/dist/cli/research-MTD7EX45.js +365 -0
  213. package/dist/cli/restore-VEUOX7NF.js +423 -0
  214. package/dist/cli/revert-3YF2IL5G.js +240 -0
  215. package/dist/cli/roadmap-7OOQLXKG.js +61 -0
  216. package/dist/cli/run-2U5NZV5Z.js +211 -0
  217. package/dist/cli/safestop-VR4VK56D.js +88 -0
  218. package/dist/cli/saga-SEWPIOX2.js +285 -0
  219. package/dist/cli/schema-C52WZ35V.js +195 -0
  220. package/dist/cli/self-update-GQIGUDPS.js +504 -0
  221. package/dist/cli/selfimprove-3Y5L4ECT.js +88 -0
  222. package/dist/cli/sentient-M4YMAVGV.js +1088 -0
  223. package/dist/cli/sequence-6UBMA4IF.js +93 -0
  224. package/dist/cli/service-5R7SILZ7.js +155 -0
  225. package/dist/cli/session-3C6AAC4Y.js +707 -0
  226. package/dist/cli/setup-BTUBW5PU.js +323 -0
  227. package/dist/cli/show-MXT2V7TF.js +122 -0
  228. package/dist/cli/skill-GFUZOU2C.js +84 -0
  229. package/dist/cli/skills-EDWLKAF3.js +928 -0
  230. package/dist/cli/smoke-provider-SKUFMZXU.js +218 -0
  231. package/dist/cli/snapshot-GUWMURCM.js +119 -0
  232. package/dist/cli/src-66GAKPXR.js +80 -0
  233. package/dist/cli/start-QFG56RGN.js +67 -0
  234. package/dist/cli/stats-GW55P7RR.js +95 -0
  235. package/dist/cli/status-46HTKNRR.js +157 -0
  236. package/dist/cli/sticky-2DUZOUGI.js +338 -0
  237. package/dist/cli/stop-J2QEUKHX.js +42 -0
  238. package/dist/cli/sync-GJP2QYT5.js +154 -0
  239. package/dist/cli/tasks-BNXTM7PB.js +174 -0
  240. package/dist/cli/telemetry-55Z2XJWL.js +120 -0
  241. package/dist/cli/templates-7O77TKPV.js +611 -0
  242. package/dist/cli/testing-37YTBNKP.js +146 -0
  243. package/dist/cli/token-UAVJMNUI.js +220 -0
  244. package/dist/cli/transcript-LORQTV5Z.js +440 -0
  245. package/dist/cli/tui-BPUFHYKK.js +51 -0
  246. package/dist/cli/update-NVCYV2FT.js +476 -0
  247. package/dist/cli/upgrade-OXJXOGEF.js +243 -0
  248. package/dist/cli/verify-LYLDHPT2.js +190 -0
  249. package/dist/cli/web-QP2RP266.js +275 -0
  250. package/dist/cli/workgraph-FXBSZDQE.js +232 -0
  251. package/dist/cli/worktree-6RXAJIST.js +370 -0
  252. package/package.json +13 -13
  253. package/studio-dist/client/_app/immutable/chunks/{DMj27Pxj.js → Btgeq_wq.js} +1 -1
  254. package/studio-dist/client/_app/immutable/chunks/{qq3pe1aT.js → CgBjxmu6.js} +1 -1
  255. package/studio-dist/client/_app/immutable/chunks/{Dc2owyvE.js → DgEKqO6r.js} +1 -1
  256. package/studio-dist/client/_app/immutable/chunks/t81h7afa.js +1 -0
  257. package/studio-dist/client/_app/immutable/entry/{app.CHWXLeE9.js → app.a02HWaRB.js} +2 -2
  258. package/studio-dist/client/_app/immutable/entry/start.BreMSngo.js +1 -0
  259. package/studio-dist/client/_app/immutable/nodes/{0.DmKQGvFh.js → 0.nTXyRfc-.js} +1 -1
  260. package/studio-dist/client/_app/immutable/nodes/{1.DqJk_REO.js → 1.4zrWeHtl.js} +1 -1
  261. package/studio-dist/client/_app/immutable/nodes/{15.GUy6kdW1.js → 15.D9mk4JyY.js} +1 -1
  262. package/studio-dist/client/_app/immutable/nodes/{16.CcnKZ8f9.js → 16._-wt-sQf.js} +1 -1
  263. package/studio-dist/client/_app/immutable/nodes/{17.DAlQF3lQ.js → 17.CUu6LQDj.js} +1 -1
  264. package/studio-dist/client/_app/immutable/nodes/{18.vQFr-vFj.js → 18.Dz4QRTkX.js} +1 -1
  265. package/studio-dist/client/_app/immutable/nodes/{20.GVOj5j_r.js → 20.CJ2_EB0U.js} +1 -1
  266. package/studio-dist/client/_app/immutable/nodes/{24.2-wC6DOh.js → 24.Igj2FS7k.js} +1 -1
  267. package/studio-dist/client/_app/immutable/nodes/{25.D1vYaH8g.js → 25.BnATjVGN.js} +2 -2
  268. package/studio-dist/client/_app/immutable/nodes/{26.C3rNqzZF.js → 26.6iPyjT44.js} +1 -1
  269. package/studio-dist/client/_app/immutable/nodes/{3.b-7pzc3M.js → 3.AA5GwNgP.js} +1 -1
  270. package/studio-dist/client/_app/version.json +1 -1
  271. package/studio-dist/server/chunks/{0-BaCce-O1.js → 0-DGmsoBYm.js} +3 -3
  272. package/studio-dist/server/chunks/1-8PfxPvlK.js +9 -0
  273. package/studio-dist/server/chunks/{15-DRMOSIC9.js → 15-Bg6YTndh.js} +3 -3
  274. package/studio-dist/server/chunks/{16-BulXhoZZ.js → 16-BObLwgyD.js} +3 -3
  275. package/studio-dist/server/chunks/{17-DUEOCM0H.js → 17-BNXGyAHX.js} +3 -3
  276. package/studio-dist/server/chunks/{18-DP7Q8zPs.js → 18-UqQFRIID.js} +3 -3
  277. package/studio-dist/server/chunks/{20-9ta6MI7q.js → 20-CMn8a_yP.js} +3 -3
  278. package/studio-dist/server/chunks/{24-DysdL1ab.js → 24-BuOTDzib.js} +3 -3
  279. package/studio-dist/server/chunks/{25-CYsps38R.js → 25-CIMSmjVx.js} +4 -4
  280. package/studio-dist/server/chunks/{26-Df4YXgg0.js → 26-DWGObn2T.js} +3 -3
  281. package/studio-dist/server/chunks/{3-BEhOhYpL.js → 3-CyiffdJZ.js} +3 -3
  282. package/studio-dist/server/chunks/{_layout.svelte-CnLcXYG-.js → _layout.svelte-DYtClaIk.js} +4 -4
  283. package/studio-dist/server/chunks/{_page.svelte-HUqTICJR.js → _page.svelte-1h9E6s_f.js} +3 -3
  284. package/studio-dist/server/chunks/{_page.svelte-DOl0DGOO.js → _page.svelte-BNNF62Nm.js} +3 -3
  285. package/studio-dist/server/chunks/{_page.svelte-DzcZljiy.js → _page.svelte-BT1EUadj.js} +5 -5
  286. package/studio-dist/server/chunks/{_page.svelte-Dv8tmDEC.js → _page.svelte-Bip079LT.js} +3 -3
  287. package/studio-dist/server/chunks/{_page.svelte-DGhXqeRc.js → _page.svelte-CEATWp_5.js} +3 -3
  288. package/studio-dist/server/chunks/{_page.svelte-C0qgUvzA.js → _page.svelte-CV3xiD1y.js} +4 -4
  289. package/studio-dist/server/chunks/{_page.svelte-CbyEPj2j.js → _page.svelte-Cv_KVJDV.js} +3 -3
  290. package/studio-dist/server/chunks/{_page.svelte-ui7LnWkL.js → _page.svelte-DSSy6LuK.js} +3 -3
  291. package/studio-dist/server/chunks/{_page.svelte-Da4q5l93.js → _page.svelte-TF795TAS.js} +3 -3
  292. package/studio-dist/server/chunks/{_server.ts-CnKVmf_s.js → _server.ts-BlhRFLY3.js} +2 -2
  293. package/studio-dist/server/chunks/{_server.ts-Cr57EKWf.js → _server.ts-C4w6UdU0.js} +3 -3
  294. package/studio-dist/server/chunks/{_server.ts-P4wVVksg.js → _server.ts-CzrwbhkQ.js} +3 -3
  295. package/studio-dist/server/chunks/{_server.ts-2BazvYRP.js → _server.ts-DWt8Dziu.js} +3 -3
  296. package/studio-dist/server/chunks/{_server.ts-C0evMKCk.js → _server.ts-Db6mEile.js} +3 -3
  297. package/studio-dist/server/chunks/{client-CPM4LrO2.js → client-D8f2k-H_.js} +2 -2
  298. package/studio-dist/server/chunks/{dist-CdoCt9zT.js → dist-B8xbIrdB.js} +3 -1
  299. package/studio-dist/server/chunks/{error.svelte-ShcZo43D.js → error.svelte-DbbOwIme.js} +3 -3
  300. package/studio-dist/server/chunks/{http-BiQjEmVU.js → http-1ftNGTs5.js} +2 -2
  301. package/studio-dist/server/chunks/{internal-Cgsrya1j.js → internal-CTULuLPB.js} +2 -2
  302. package/studio-dist/server/chunks/{stores-BGrpEDMK.js → stores-CS5XOReX.js} +2 -2
  303. package/studio-dist/server/index.js +1 -1
  304. package/studio-dist/server/manifest.js +17 -17
  305. package/studio-dist/client/_app/immutable/chunks/Bw6J8NDM.js +0 -1
  306. package/studio-dist/client/_app/immutable/entry/start.C9bwPpvc.js +0 -1
  307. package/studio-dist/server/chunks/1-CVo7Nk6d.js +0 -9
@@ -0,0 +1,1002 @@
1
+ (() => {
2
+ const _installed = Symbol.for('cleocode.cli.sqliteWarningFilter');
3
+ if (globalThis[_installed]) return;
4
+ globalThis[_installed] = true;
5
+ const _origEmitWarning = process.emitWarning;
6
+ process.emitWarning = function(warning, type, code, ctor) {
7
+ if (typeof warning === 'object' && warning.name === 'ExperimentalWarning' && typeof warning.message === 'string' && /SQLite is an experimental feature/i.test(warning.message)) {
8
+ return;
9
+ }
10
+ if (typeof warning === 'string' && /SQLite is an experimental feature/i.test(warning)) {
11
+ return;
12
+ }
13
+ return _origEmitWarning.call(process, warning, type, code, ctor);
14
+ };
15
+ })();
16
+ import {
17
+ getFieldContext,
18
+ getFormatContext,
19
+ getOutputMode,
20
+ getSummaryMode
21
+ } from "./chunk-6JSJNYH2.js";
22
+
23
+ // packages/cleo/src/cli/renderers/index.ts
24
+ import { randomUUID } from "node:crypto";
25
+ import { getOutputContract } from "@cleocode/core/dispatch/contracts/output-contracts";
26
+ import {
27
+ extractByJsonPointer,
28
+ isJsonPointer,
29
+ serializePointerValue
30
+ } from "@cleocode/core/dispatch/projection";
31
+ import { drainWarnings, formatSuccess } from "@cleocode/core/output";
32
+ import {
33
+ metaFooter,
34
+ pagerFooter,
35
+ renderAuditReconstruct,
36
+ renderBlockers,
37
+ renderBrainBackfill,
38
+ renderBrainExport,
39
+ renderBrainMaintenance,
40
+ renderBrainPlasticityStats,
41
+ renderBrainPurge,
42
+ renderBrainQuality,
43
+ renderBriefing,
44
+ renderCurrent,
45
+ renderDecideAsk,
46
+ renderDecideConfig,
47
+ renderDecideProfiles,
48
+ renderDecideStatus,
49
+ renderDoctor,
50
+ renderGeneric,
51
+ renderNext,
52
+ renderNexusAnalyze,
53
+ renderNexusBrainAnchors,
54
+ renderNexusClusters,
55
+ renderNexusColdSymbols,
56
+ renderNexusConduitScan,
57
+ renderNexusContext as renderNexusContextResult,
58
+ renderNexusContractsLinkTasks,
59
+ renderNexusContractsShow,
60
+ renderNexusContractsSync,
61
+ renderNexusDiff,
62
+ renderNexusExport,
63
+ renderNexusFlows,
64
+ renderNexusFullContext,
65
+ renderNexusHotNodes,
66
+ renderNexusHotPaths,
67
+ renderNexusImpact,
68
+ renderNexusImpactFull,
69
+ renderNexusProjectsClean,
70
+ renderNexusProjectsCleanPreview,
71
+ renderNexusProjectsFleet,
72
+ renderNexusProjectsList,
73
+ renderNexusProjectsRegister,
74
+ renderNexusProjectsRemove,
75
+ renderNexusProjectsScan,
76
+ renderNexusProjectsStatus,
77
+ renderNexusQuery,
78
+ renderNexusRefreshBridge,
79
+ renderNexusRouteMap,
80
+ renderNexusSearchCode,
81
+ renderNexusSetup,
82
+ renderNexusShapeCheck,
83
+ renderNexusStatus,
84
+ renderNexusTaskFootprint,
85
+ renderNexusTaskSymbols,
86
+ renderNexusWhy,
87
+ renderNexusWiki,
88
+ renderPlan,
89
+ renderSchemaCommand,
90
+ renderSession,
91
+ renderStart,
92
+ renderStats,
93
+ renderStop,
94
+ renderTree,
95
+ renderVersion,
96
+ renderWaves
97
+ } from "@cleocode/core/render/index";
98
+ import { applyFieldFilter, extractFieldFromResult } from "@cleocode/lafs";
99
+
100
+ // packages/cleo/src/cli/renderers/lafs-validator.ts
101
+ import { ExitCode } from "@cleocode/contracts/exit-codes.js";
102
+ var ENVELOPE_SUCCESS_KEY = "success";
103
+ var ENVELOPE_DATA_KEY = "data";
104
+ var ENVELOPE_META_KEY = "meta";
105
+ function validateLafsShape(envelope) {
106
+ const report = {
107
+ isObject: false,
108
+ hasSuccessField: false,
109
+ successIsBoolean: false,
110
+ hasMeta: false,
111
+ resultOrErrorValid: false,
112
+ reasons: []
113
+ };
114
+ let parsed = envelope;
115
+ if (typeof envelope === "string") {
116
+ try {
117
+ parsed = JSON.parse(envelope);
118
+ } catch {
119
+ report.reasons.push("Envelope is not valid JSON");
120
+ return report;
121
+ }
122
+ }
123
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
124
+ report.reasons.push("Envelope is not a JSON object");
125
+ return report;
126
+ }
127
+ report.isObject = true;
128
+ const obj = parsed;
129
+ if (!(ENVELOPE_SUCCESS_KEY in obj)) {
130
+ report.reasons.push(`Envelope missing success indicator \u2014 expected: "${ENVELOPE_SUCCESS_KEY}"`);
131
+ return report;
132
+ }
133
+ report.hasSuccessField = true;
134
+ const successValue = obj[ENVELOPE_SUCCESS_KEY];
135
+ if (typeof successValue !== "boolean") {
136
+ report.reasons.push(
137
+ `Envelope "${ENVELOPE_SUCCESS_KEY}" field must be boolean, got ${typeof successValue}`
138
+ );
139
+ return report;
140
+ }
141
+ report.successIsBoolean = true;
142
+ report.hasMeta = ENVELOPE_META_KEY in obj && typeof obj[ENVELOPE_META_KEY] === "object";
143
+ if (!report.hasMeta) {
144
+ report.reasons.push(
145
+ `Envelope missing required "${ENVELOPE_META_KEY}" object (ADR-039 \u2014 every envelope must carry meta)`
146
+ );
147
+ }
148
+ if (successValue === true) {
149
+ const hasData = ENVELOPE_DATA_KEY in obj;
150
+ if (!hasData) {
151
+ report.reasons.push(
152
+ `Successful envelope missing "${ENVELOPE_DATA_KEY}" field (legacy "result" / "r" are no longer valid \u2014 ADR-039)`
153
+ );
154
+ } else {
155
+ report.resultOrErrorValid = true;
156
+ }
157
+ } else {
158
+ const errorField = obj["error"];
159
+ if (typeof errorField !== "object" || errorField === null) {
160
+ report.reasons.push('Failed envelope missing "error" object');
161
+ } else {
162
+ const err = errorField;
163
+ const hasCode = "code" in err;
164
+ const hasMessage = "message" in err && typeof err["message"] === "string";
165
+ if (!hasCode || !hasMessage) {
166
+ report.reasons.push(
167
+ 'Failed envelope "error" object must contain "code" and "message" (string)'
168
+ );
169
+ } else {
170
+ report.resultOrErrorValid = true;
171
+ }
172
+ }
173
+ }
174
+ return report;
175
+ }
176
+ var LafsViolationError = class extends Error {
177
+ code = ExitCode.LAFS_VIOLATION;
178
+ report;
179
+ constructor(message, report) {
180
+ super(message);
181
+ this.name = "LafsViolationError";
182
+ this.report = report;
183
+ }
184
+ };
185
+ function emitLafsViolation(err) {
186
+ const envelope = {
187
+ success: false,
188
+ error: {
189
+ code: ExitCode.LAFS_VIOLATION,
190
+ codeName: "E_LAFS_VIOLATION",
191
+ message: err.message,
192
+ details: {
193
+ report: err.report
194
+ }
195
+ },
196
+ meta: {
197
+ operation: "cli.lafs-validator",
198
+ requestId: "lafs-validator-emit",
199
+ duration_ms: 0,
200
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
201
+ }
202
+ };
203
+ if (process.env["CLEO_DEBUG"]) {
204
+ process.stderr.write(`${JSON.stringify(envelope)}
205
+ `);
206
+ }
207
+ process.exitCode = ExitCode.LAFS_VIOLATION;
208
+ }
209
+
210
+ // packages/cleo/src/cli/renderers/normalizer.ts
211
+ function normalizeForHuman(command, data) {
212
+ switch (command) {
213
+ case "show":
214
+ return normalizeTaskWrapper(data);
215
+ case "list":
216
+ case "ls":
217
+ return normalizeTaskList(data);
218
+ case "find":
219
+ case "search":
220
+ return normalizeFindResults(data);
221
+ case "add":
222
+ return normalizeTaskWrapper(data);
223
+ case "update":
224
+ return normalizeTaskWrapper(data);
225
+ case "complete":
226
+ case "done":
227
+ return normalizeTaskWrapper(data);
228
+ case "delete":
229
+ case "rm":
230
+ return normalizeDeleteResult(data);
231
+ case "archive":
232
+ return normalizeArchiveResult(data);
233
+ default:
234
+ return data;
235
+ }
236
+ }
237
+ function normalizeTaskWrapper(data) {
238
+ if (data["task"]) return data;
239
+ if (data["id"] && typeof data["id"] === "string") {
240
+ return { task: data };
241
+ }
242
+ return data;
243
+ }
244
+ function normalizeTaskList(data) {
245
+ if (data["tasks"]) return data;
246
+ if (Array.isArray(data)) {
247
+ return { tasks: data, total: data.length };
248
+ }
249
+ return data;
250
+ }
251
+ function normalizeFindResults(data) {
252
+ if (data["results"]) return data;
253
+ if (Array.isArray(data)) {
254
+ return { results: data, total: data.length };
255
+ }
256
+ return data;
257
+ }
258
+ function normalizeDeleteResult(data) {
259
+ if (data["deletedTask"]) return data;
260
+ if (data["taskId"]) {
261
+ return { ...data, deletedTask: { id: data["taskId"] } };
262
+ }
263
+ return data;
264
+ }
265
+ function normalizeArchiveResult(data) {
266
+ if (data["archivedCount"] !== void 0) return data;
267
+ if (data["archived"] !== void 0 && typeof data["archived"] === "number") {
268
+ return {
269
+ ...data,
270
+ archivedCount: data["archived"],
271
+ archivedTasks: data["taskIds"]?.map((id) => ({ id }))
272
+ };
273
+ }
274
+ return data;
275
+ }
276
+
277
+ // packages/cleo/src/cli/renderers/output-mode.ts
278
+ import {
279
+ COLLECTION_IDENTITY_FIELDS,
280
+ COLLECTION_KEYS as CONTRACT_COLLECTION_KEYS,
281
+ DEFAULT_IDENTITY_FIELD
282
+ } from "@cleocode/contracts/collection-keys.js";
283
+ import { truncateString } from "@cleocode/core/render/helpers";
284
+ var COLLECTION_KEYS = CONTRACT_COLLECTION_KEYS;
285
+ function pickCollectionEntry(rec) {
286
+ for (const key of COLLECTION_KEYS) {
287
+ const value = rec[key];
288
+ if (Array.isArray(value)) return { key, rows: value };
289
+ }
290
+ const candidates = Object.entries(rec).filter(
291
+ ([, value]) => Array.isArray(value) && value.length > 0 && value.every((row) => row !== null && typeof row === "object" && !Array.isArray(row))
292
+ );
293
+ if (candidates.length === 1) {
294
+ const [key, value] = candidates[0];
295
+ return { key, rows: value };
296
+ }
297
+ return void 0;
298
+ }
299
+ function pickCollection(rec) {
300
+ return pickCollectionEntry(rec)?.rows;
301
+ }
302
+ function identityFieldFor(key) {
303
+ return COLLECTION_IDENTITY_FIELDS[key] ?? DEFAULT_IDENTITY_FIELD;
304
+ }
305
+ function identityOf(row, key) {
306
+ if (row === null || typeof row !== "object") return void 0;
307
+ const value = row[identityFieldFor(key)];
308
+ return typeof value === "string" ? value : void 0;
309
+ }
310
+ function extractIds(data) {
311
+ if (data === null || typeof data !== "object") return [];
312
+ const rec = data;
313
+ const task = rec["task"];
314
+ if (task && typeof task === "object") {
315
+ const id2 = task["id"];
316
+ if (typeof id2 === "string") return [id2];
317
+ }
318
+ const entry = pickCollectionEntry(rec);
319
+ if (entry) {
320
+ return entry.rows.map((row) => identityOf(row, entry.key)).filter((id2) => id2 !== void 0);
321
+ }
322
+ const created = rec["created"];
323
+ const updated = rec["updated"];
324
+ const deleted = rec["deleted"];
325
+ if (typeof rec["count"] === "number" && Array.isArray(created) && Array.isArray(updated) && Array.isArray(deleted)) {
326
+ const affected = [...created, ...updated, ...deleted];
327
+ if (affected.every((id2) => typeof id2 === "string")) {
328
+ return [...new Set(affected)];
329
+ }
330
+ }
331
+ const id = rec["id"];
332
+ if (typeof id === "string") return [id];
333
+ return [];
334
+ }
335
+ function extractCount(data) {
336
+ if (data === null || typeof data !== "object") return 0;
337
+ const rec = data;
338
+ const population = taskPopulationFacts(data);
339
+ if (population) return population.returned;
340
+ const filtered = rec["filtered"];
341
+ if (typeof filtered === "number" && Number.isFinite(filtered)) return filtered;
342
+ const total = rec["total"];
343
+ if (typeof total === "number" && Number.isFinite(total)) return total;
344
+ const count = rec["count"];
345
+ if (typeof count === "number" && Number.isFinite(count)) return count;
346
+ const collection = pickCollection(rec);
347
+ if (collection) return collection.length;
348
+ if (rec["task"] && typeof rec["task"] === "object") return 1;
349
+ if (typeof rec["id"] === "string") return 1;
350
+ return 0;
351
+ }
352
+ function taskPopulationFacts(data) {
353
+ if (!data || typeof data !== "object" || !("population" in data)) return void 0;
354
+ const facts = data.population;
355
+ if (!facts || typeof facts !== "object" || !("matched" in facts) || !("returned" in facts) || !("truncated" in facts) || !("archive" in facts) || !("limit" in facts) || !("offset" in facts))
356
+ return void 0;
357
+ if (typeof facts.matched !== "number" || typeof facts.returned !== "number" || typeof facts.truncated !== "boolean" || typeof facts.offset !== "number" || facts.limit !== null && typeof facts.limit !== "number" || !["included", "excluded", "only"].includes(String(facts.archive)))
358
+ return void 0;
359
+ return {
360
+ matched: facts.matched,
361
+ returned: facts.returned,
362
+ truncated: facts.truncated,
363
+ archive: facts.archive,
364
+ limit: facts.limit,
365
+ offset: facts.offset
366
+ };
367
+ }
368
+ function formatTaskMatching(data) {
369
+ if (!data || typeof data !== "object" || !("searchType" in data)) return void 0;
370
+ if (typeof data.searchType !== "string") return void 0;
371
+ const lines = [`cleo: searchType=${data.searchType}`];
372
+ if (data.searchType === "fuzzy") {
373
+ for (const row of pickCollection(data) ?? []) {
374
+ if (!row || typeof row !== "object" || !("match" in row) || !("id" in row)) continue;
375
+ const match = row.match;
376
+ if (!match || typeof match !== "object" || !("kind" in match) || !("fields" in match) || !Array.isArray(match.fields))
377
+ continue;
378
+ lines.push(
379
+ `cleo: match id=${String(row.id)} kind=${String(match.kind)} fields=${match.fields.filter((field) => typeof field === "string").join(",")}`
380
+ );
381
+ }
382
+ }
383
+ return lines.join("\n");
384
+ }
385
+ function formatTaskPopulation(data) {
386
+ const facts = taskPopulationFacts(data);
387
+ if (!facts) return void 0;
388
+ return `cleo: population matched=${facts.matched} returned=${facts.returned} truncated=${facts.truncated} archive=${facts.archive} limit=${facts.limit ?? "all"} offset=${facts.offset}`;
389
+ }
390
+ function renderTableList(tasks, identityField = DEFAULT_IDENTITY_FIELD) {
391
+ if (tasks.length === 0) return "";
392
+ const COL_TITLE_MAX = 60;
393
+ const rows = tasks.map((t) => ({
394
+ id: typeof t[identityField] === "string" ? t[identityField] : "",
395
+ status: typeof t["status"] === "string" ? t["status"] : "",
396
+ priority: typeof t["priority"] === "string" ? t["priority"] : "",
397
+ title: truncateString(typeof t["title"] === "string" ? t["title"] : "", COL_TITLE_MAX)
398
+ }));
399
+ const widths = {
400
+ id: Math.max(2, ...rows.map((r) => r.id.length)),
401
+ status: Math.max(6, ...rows.map((r) => r.status.length)),
402
+ priority: Math.max(8, ...rows.map((r) => r.priority.length)),
403
+ title: Math.max(5, ...rows.map((r) => r.title.length))
404
+ };
405
+ const pad = (s, w) => s + " ".repeat(Math.max(0, w - s.length));
406
+ const header = `${pad("id", widths.id)} ${pad("status", widths.status)} ${pad(
407
+ "priority",
408
+ widths.priority
409
+ )} ${pad("title", widths.title)}`;
410
+ const sep = `${"-".repeat(widths.id)} ${"-".repeat(widths.status)} ${"-".repeat(
411
+ widths.priority
412
+ )} ${"-".repeat(widths.title)}`;
413
+ const body = rows.map(
414
+ (r) => `${pad(r.id, widths.id)} ${pad(r.status, widths.status)} ${pad(
415
+ r.priority,
416
+ widths.priority
417
+ )} ${pad(r.title, widths.title)}`
418
+ ).join("\n");
419
+ return `${header}
420
+ ${sep}
421
+ ${body}`;
422
+ }
423
+ function renderTableGeneric(data) {
424
+ const entries = Object.entries(data);
425
+ if (entries.length === 0) return "(empty)";
426
+ const rows = entries.map(([k, v]) => ({
427
+ field: k,
428
+ value: v === null || v === void 0 ? "" : typeof v === "object" ? JSON.stringify(v) : String(v)
429
+ }));
430
+ const VAL_MAX = 80;
431
+ for (const r of rows) r.value = truncateString(r.value, VAL_MAX);
432
+ const widths = {
433
+ field: Math.max(5, ...rows.map((r) => r.field.length)),
434
+ value: Math.max(5, ...rows.map((r) => r.value.length))
435
+ };
436
+ const pad = (s, w) => s + " ".repeat(Math.max(0, w - s.length));
437
+ const header = `${pad("field", widths.field)} ${pad("value", widths.value)}`;
438
+ const sep = `${"-".repeat(widths.field)} ${"-".repeat(widths.value)}`;
439
+ const body = rows.map((r) => `${pad(r.field, widths.field)} ${pad(r.value, widths.value)}`).join("\n");
440
+ return `${header}
441
+ ${sep}
442
+ ${body}`;
443
+ }
444
+ var UnsupportedRendererError = class extends Error {
445
+ code = "E_RENDERER_UNSUPPORTED";
446
+ constructor(mode) {
447
+ super(`Unsupported output renderer: ${mode}`);
448
+ this.name = "UnsupportedRendererError";
449
+ }
450
+ };
451
+ function renderSummary(data) {
452
+ if (data === null || typeof data !== "object") {
453
+ return { text: "", emptyReason: "no-renderable-records" };
454
+ }
455
+ const rec = data;
456
+ const entry = pickCollectionEntry(rec);
457
+ if (entry) {
458
+ return renderSummaryList(entry.rows, identityFieldFor(entry.key));
459
+ }
460
+ const task = rec["task"];
461
+ if (task && typeof task === "object") {
462
+ return { text: renderSummaryRow(task) };
463
+ }
464
+ if (typeof rec["id"] === "string") {
465
+ return { text: renderSummaryRow(rec) };
466
+ }
467
+ return { text: "", emptyReason: "no-renderable-records" };
468
+ }
469
+ function renderSummaryRow(record, identityField = DEFAULT_IDENTITY_FIELD) {
470
+ const id = typeof record[identityField] === "string" ? record[identityField] : "";
471
+ const status = typeof record["status"] === "string" ? record["status"] : "";
472
+ const title = truncateString(typeof record["title"] === "string" ? record["title"] : "", 60);
473
+ return `${id} [${status}] ${title}`;
474
+ }
475
+ function renderSummaryList(rows, identityField = DEFAULT_IDENTITY_FIELD) {
476
+ if (rows.length === 0) return { text: "", emptyReason: "no-renderable-records" };
477
+ const lines = [];
478
+ for (const row of rows) {
479
+ if (!row || typeof row !== "object") continue;
480
+ const rec = row;
481
+ if (typeof rec[identityField] !== "string") continue;
482
+ lines.push(renderSummaryRow(rec, identityField));
483
+ }
484
+ return lines.length === 0 ? { text: "", emptyReason: "no-renderable-records" } : { text: lines.join("\n") };
485
+ }
486
+ function detectTruncation(data, page) {
487
+ const population = taskPopulationFacts(data);
488
+ if (population)
489
+ return population.truncated ? { returned: population.returned, total: population.matched } : null;
490
+ if (data === null || typeof data !== "object") return null;
491
+ const rec = data;
492
+ const collection = pickCollection(rec);
493
+ if (!collection) return null;
494
+ const returned = collection.length;
495
+ if (page !== null && typeof page === "object") {
496
+ const pageRec = page;
497
+ const total2 = pageRec["total"];
498
+ if (pageRec["hasMore"] === true && typeof total2 === "number" && total2 > returned) {
499
+ return { returned, total: total2 };
500
+ }
501
+ }
502
+ const filtered = rec["filtered"];
503
+ if (typeof filtered === "number" && filtered > returned) {
504
+ return { returned, total: filtered };
505
+ }
506
+ const total = rec["total"];
507
+ if (typeof total === "number" && total > returned && rec["filtered"] === void 0) {
508
+ return { returned, total };
509
+ }
510
+ return null;
511
+ }
512
+ function formatTruncationWarning(facts, mode, enumerateAllFlag) {
513
+ const surface = mode === "summary" ? "--summary" : `--output ${mode}`;
514
+ const head = `cleo: TRUNCATED \u2014 ${surface} returned ${facts.returned} of ${facts.total} matching rows. `;
515
+ if (enumerateAllFlag) {
516
+ return `${head}Re-run with ${enumerateAllFlag} to enumerate every match, or pass --limit/--offset to page deliberately.`;
517
+ }
518
+ return `${head}Pass --limit <n> / --offset <n> to page deliberately, or narrow the query.`;
519
+ }
520
+ function renderOutputMode(mode, data) {
521
+ switch (mode) {
522
+ case "id": {
523
+ const ids = extractIds(data);
524
+ if (ids.length > 0) return { text: ids.join("\n") };
525
+ const entry = data && typeof data === "object" ? pickCollectionEntry(data) : void 0;
526
+ if (entry && entry.rows.length > 0) {
527
+ return {
528
+ text: null,
529
+ refusal: {
530
+ code: "E_OUTPUT_IDENTITY_UNDECLARED",
531
+ message: `--output id cannot project the ${entry.rows.length} record(s) under "${entry.key}": no record carries "${identityFieldFor(entry.key)}". Refusing to emit an empty stream, which would be indistinguishable from a result set with no rows.`,
532
+ fix: `Declare the identity for "${entry.key}" in COLLECTION_IDENTITY_FIELDS (packages/contracts/src/collection-keys.ts), or use --field /data/${entry.key} to project the field you need.`
533
+ }
534
+ };
535
+ }
536
+ return { text: "", emptyReason: "no-renderable-ids" };
537
+ }
538
+ case "count": {
539
+ return { text: String(extractCount(data)) };
540
+ }
541
+ case "table": {
542
+ if (data && typeof data === "object") {
543
+ const rec = data;
544
+ const entry = pickCollectionEntry(rec);
545
+ if (entry) {
546
+ const text = renderTableList(
547
+ entry.rows,
548
+ identityFieldFor(entry.key)
549
+ );
550
+ return text.length === 0 ? { text: "", emptyReason: "no-renderable-records" } : { text };
551
+ }
552
+ return { text: renderTableGeneric(rec) };
553
+ }
554
+ return data === null || data === void 0 ? { text: "", emptyReason: "no-renderable-records" } : { text: String(data) };
555
+ }
556
+ case "silent": {
557
+ return { text: null, emptyReason: "silent-mode" };
558
+ }
559
+ case "envelope":
560
+ throw new UnsupportedRendererError(mode);
561
+ default:
562
+ throw new UnsupportedRendererError(String(mode));
563
+ }
564
+ }
565
+
566
+ // packages/cleo/src/cli/renderers/index.ts
567
+ import {
568
+ renderAdd,
569
+ renderArchive,
570
+ renderComplete,
571
+ renderDelete,
572
+ renderFind,
573
+ renderList,
574
+ renderRestore,
575
+ renderShow,
576
+ renderUpdate
577
+ } from "@cleocode/core/render/index";
578
+ function generateRequestId() {
579
+ return randomUUID();
580
+ }
581
+ var renderers = {
582
+ // Task CRUD
583
+ show: renderShow,
584
+ list: renderList,
585
+ ls: renderList,
586
+ find: renderFind,
587
+ search: renderFind,
588
+ add: renderAdd,
589
+ update: renderUpdate,
590
+ complete: renderComplete,
591
+ done: renderComplete,
592
+ delete: renderDelete,
593
+ rm: renderDelete,
594
+ archive: renderArchive,
595
+ restore: renderRestore,
596
+ // Task work
597
+ start: renderStart,
598
+ stop: renderStop,
599
+ current: renderCurrent,
600
+ // System
601
+ doctor: renderDoctor,
602
+ stats: renderStats,
603
+ next: renderNext,
604
+ plan: renderPlan,
605
+ blockers: renderBlockers,
606
+ tree: renderTree,
607
+ depends: renderTree,
608
+ deps: renderTree,
609
+ // Orchestration — `cleo orchestrate waves` emits { waves, epicId, ... }
610
+ // which renderTree handles via its data.waves branch (T1194/T1195).
611
+ orchestrate: renderTree,
612
+ session: renderSession,
613
+ version: renderVersion,
614
+ // T1593 — `cleo briefing` reads tasks.db + brain.db (NEVER markdown handoffs).
615
+ briefing: renderBriefing,
616
+ // Brain subcommands (T1722)
617
+ "brain-maintenance": renderBrainMaintenance,
618
+ "brain-backfill": renderBrainBackfill,
619
+ "brain-purge": renderBrainPurge,
620
+ "brain-plasticity-stats": renderBrainPlasticityStats,
621
+ "brain-quality": renderBrainQuality,
622
+ "brain-export": renderBrainExport,
623
+ // Audit subcommand renderers (T1729)
624
+ "audit-reconstruct": renderAuditReconstruct,
625
+ // Schema command renderer (T1729)
626
+ schema: renderSchemaCommand,
627
+ // Nexus subcommand renderers (T1720)
628
+ "nexus-status": renderNexusStatus,
629
+ "nexus-setup": renderNexusSetup,
630
+ // System One (T12733): human blocks for config / status / ask / profiles.
631
+ "decide-config": renderDecideConfig,
632
+ "decide-status": renderDecideStatus,
633
+ "decide-ask": renderDecideAsk,
634
+ "decide-profiles": renderDecideProfiles,
635
+ "nexus-clusters": renderNexusClusters,
636
+ "nexus-flows": renderNexusFlows,
637
+ "nexus-context": renderNexusContextResult,
638
+ "nexus-impact": renderNexusImpact,
639
+ "nexus-analyze": renderNexusAnalyze,
640
+ "nexus-projects-list": renderNexusProjectsList,
641
+ "nexus-projects-register": renderNexusProjectsRegister,
642
+ "nexus-projects-remove": renderNexusProjectsRemove,
643
+ "nexus-projects-scan": renderNexusProjectsScan,
644
+ "nexus-projects-status": renderNexusProjectsStatus,
645
+ "nexus-projects-fleet": renderNexusProjectsFleet,
646
+ "nexus-projects-clean": renderNexusProjectsClean,
647
+ "nexus-projects-clean-preview": renderNexusProjectsCleanPreview,
648
+ "nexus-refresh-bridge": renderNexusRefreshBridge,
649
+ "nexus-diff": renderNexusDiff,
650
+ "nexus-query": renderNexusQuery,
651
+ "nexus-route-map": renderNexusRouteMap,
652
+ "nexus-shape-check": renderNexusShapeCheck,
653
+ "nexus-full-context": renderNexusFullContext,
654
+ "nexus-task-footprint": renderNexusTaskFootprint,
655
+ "nexus-brain-anchors": renderNexusBrainAnchors,
656
+ "nexus-why": renderNexusWhy,
657
+ "nexus-impact-full": renderNexusImpactFull,
658
+ "nexus-conduit-scan": renderNexusConduitScan,
659
+ "nexus-task-symbols": renderNexusTaskSymbols,
660
+ "nexus-search-code": renderNexusSearchCode,
661
+ "nexus-contracts-sync": renderNexusContractsSync,
662
+ "nexus-contracts-show": renderNexusContractsShow,
663
+ "nexus-contracts-link-tasks": renderNexusContractsLinkTasks,
664
+ "nexus-export": renderNexusExport,
665
+ "nexus-wiki": renderNexusWiki,
666
+ "nexus-hot-paths": renderNexusHotPaths,
667
+ "nexus-hot-nodes": renderNexusHotNodes,
668
+ "nexus-cold-symbols": renderNexusColdSymbols
669
+ };
670
+ function pickDecoratorMetaExtensionsLocal(responseMeta) {
671
+ if (!responseMeta) return {};
672
+ const out = {};
673
+ if (responseMeta["_nexus"] !== void 0) out["_nexus"] = responseMeta["_nexus"];
674
+ if (responseMeta["deprecated"] !== void 0) out["deprecated"] = responseMeta["deprecated"];
675
+ if (responseMeta.sessionId !== void 0) out["sessionId"] = responseMeta.sessionId;
676
+ if (responseMeta.originSessionId !== void 0) {
677
+ out["originSessionId"] = responseMeta.originSessionId;
678
+ }
679
+ if (responseMeta.executionSessionId !== void 0) {
680
+ out["executionSessionId"] = responseMeta.executionSessionId;
681
+ }
682
+ if (responseMeta["suggestedNext"] !== void 0) {
683
+ out["suggestedNext"] = responseMeta["suggestedNext"];
684
+ }
685
+ if (responseMeta["projection"] !== void 0) {
686
+ out["projection"] = responseMeta["projection"];
687
+ }
688
+ return out;
689
+ }
690
+ function buildEnvelopeForPointer(data, opts) {
691
+ const decoratorExt = pickDecoratorMetaExtensionsLocal(opts.responseMeta);
692
+ const meta = {
693
+ ...decoratorExt,
694
+ ...opts.extensions ?? {},
695
+ operation: opts.operation ?? "cli.output"
696
+ };
697
+ if (opts.message) meta["message"] = opts.message;
698
+ const envelope = {
699
+ success: true,
700
+ data,
701
+ meta
702
+ };
703
+ if (opts.page) envelope["page"] = opts.page;
704
+ return envelope;
705
+ }
706
+ function writeMachineOutput(text, emptyReason) {
707
+ if (text.length > 0) {
708
+ process.stdout.write(`${text}
709
+ `);
710
+ return;
711
+ }
712
+ process.stderr.write(`No output (${emptyReason ?? "empty"}).
713
+ `);
714
+ }
715
+ function cliOutput(data, opts) {
716
+ const ctx = getFormatContext();
717
+ const fieldCtx = getFieldContext();
718
+ const outputMode = getOutputMode();
719
+ const summary = getSummaryMode();
720
+ const matching = formatTaskMatching(data);
721
+ if (matching && (outputMode !== "envelope" || summary || fieldCtx.field || ctx.format === "human")) {
722
+ process.stderr.write(`${matching}
723
+ `);
724
+ }
725
+ const population = formatTaskPopulation(data);
726
+ if (population && (outputMode !== "envelope" || summary || fieldCtx.field || ctx.format === "human")) {
727
+ process.stderr.write(`${population}
728
+ `);
729
+ }
730
+ if (outputMode !== "envelope" && !fieldCtx.field) {
731
+ const out = renderOutputMode(outputMode, data);
732
+ if (out.refusal) {
733
+ cliError(
734
+ out.refusal.message,
735
+ 2,
736
+ { name: out.refusal.code, fix: out.refusal.fix },
737
+ {
738
+ operation: opts.operation ?? opts.command
739
+ }
740
+ );
741
+ process.exit(2);
742
+ }
743
+ if (out.text !== null) {
744
+ writeMachineOutput(out.text, out.emptyReason);
745
+ }
746
+ if (outputMode === "id" || outputMode === "table") {
747
+ const facts = detectTruncation(data, opts.page);
748
+ if (facts)
749
+ process.stderr.write(
750
+ `${formatTruncationWarning(facts, outputMode, opts.enumerateAllFlag)}
751
+ `
752
+ );
753
+ }
754
+ return;
755
+ }
756
+ if (summary && !fieldCtx.field) {
757
+ const out = renderSummary(data);
758
+ if (out.text !== null) {
759
+ writeMachineOutput(out.text, out.emptyReason);
760
+ }
761
+ const facts = detectTruncation(data, opts.page);
762
+ if (facts)
763
+ process.stderr.write(`${formatTruncationWarning(facts, "summary", opts.enumerateAllFlag)}
764
+ `);
765
+ return;
766
+ }
767
+ if (fieldCtx.field && isJsonPointer(fieldCtx.field)) {
768
+ const envelope = buildEnvelopeForPointer(data, opts);
769
+ const value = extractByJsonPointer(envelope, fieldCtx.field);
770
+ if (value === void 0) {
771
+ const contract = opts.operation ? getOutputContract(opts.operation) : null;
772
+ const fix = contract ? `Valid pointers for ${opts.operation}: ${contract.fieldPointers.join(", ")}` + (contract.shapeNote ? ` \u2014 ${contract.shapeNote}` : "") : `Run: cleo ${opts.command} --describe`;
773
+ const alternatives = contract ? contract.fieldPointers.slice(0, 5).map((pointer) => ({
774
+ action: `extract ${pointer}`,
775
+ command: `cleo ${opts.command} --field ${pointer}`
776
+ })) : void 0;
777
+ if (opts.responseMeta?.gateway === "mutate") {
778
+ process.stderr.write(
779
+ `E_FIELD_NOT_FOUND: pointer "${fieldCtx.field}" did not resolve. The ${opts.operation ?? "operation"} itself SUCCEEDED \u2014 do not retry it. ${fix}
780
+ `
781
+ );
782
+ return;
783
+ }
784
+ cliError(`Pointer "${fieldCtx.field}" did not resolve`, 4, {
785
+ name: "E_FIELD_NOT_FOUND",
786
+ fix,
787
+ alternatives
788
+ });
789
+ process.exit(4);
790
+ }
791
+ process.stdout.write(`${serializePointerValue(value)}
792
+ `);
793
+ return;
794
+ }
795
+ if (ctx.format === "human") {
796
+ let dataToRender = data;
797
+ let fieldExtracted = false;
798
+ if (fieldCtx.field) {
799
+ const extracted = extractFieldFromResult(
800
+ data,
801
+ fieldCtx.field
802
+ );
803
+ if (extracted === void 0) {
804
+ cliError(`Field "${fieldCtx.field}" not found`, 4, { name: "E_NOT_FOUND" });
805
+ process.exit(4);
806
+ }
807
+ if (typeof extracted !== "object" || extracted === null) {
808
+ process.stdout.write(String(extracted) + "\n");
809
+ return;
810
+ }
811
+ if (Array.isArray(extracted)) {
812
+ dataToRender = { [fieldCtx.field]: extracted };
813
+ } else {
814
+ dataToRender = extracted;
815
+ }
816
+ fieldExtracted = true;
817
+ }
818
+ const normalized = normalizeForHuman(opts.command, dataToRender);
819
+ const renderer = fieldExtracted ? renderGeneric : renderers[opts.command] ?? renderGeneric;
820
+ const text = renderer(normalized, ctx.quiet);
821
+ if (text) {
822
+ process.stdout.write(text + "\n");
823
+ }
824
+ if (!ctx.quiet) {
825
+ const pagerData = data;
826
+ const pagerArrays = pagerData && typeof pagerData === "object" ? Object.values(pagerData).filter((v) => Array.isArray(v)) : [];
827
+ const shown = pagerArrays.reduce((max, arr) => Math.max(max, arr.length), 0);
828
+ if (shown > 0 && opts.page) {
829
+ const pager = pagerFooter({
830
+ shown,
831
+ page: opts.page,
832
+ total: pagerData?.["total"],
833
+ filtered: pagerData?.["filtered"]
834
+ });
835
+ if (pager) process.stdout.write(`${pager}
836
+ `);
837
+ }
838
+ const combinedMeta = {
839
+ ...opts.responseMeta ?? {},
840
+ ...opts.extensions ?? {}
841
+ };
842
+ const footer = metaFooter(combinedMeta);
843
+ if (footer) process.stdout.write(`${footer}
844
+ `);
845
+ }
846
+ return;
847
+ }
848
+ if (fieldCtx.field) {
849
+ const value = extractFieldFromResult(
850
+ data,
851
+ fieldCtx.field
852
+ );
853
+ if (value === void 0) {
854
+ cliError(`Field "${fieldCtx.field}" not found`, 4, { name: "E_NOT_FOUND" });
855
+ process.exit(4);
856
+ }
857
+ const out = value !== null && typeof value === "object" ? JSON.stringify(value) : String(value);
858
+ process.stdout.write(out + "\n");
859
+ return;
860
+ }
861
+ let filteredData = data;
862
+ if (fieldCtx.fields?.length && data !== void 0 && data !== null) {
863
+ try {
864
+ const stub = {
865
+ $schema: "https://lafs.dev/schemas/v1/envelope.schema.json",
866
+ _meta: {
867
+ specVersion: "",
868
+ schemaVersion: "",
869
+ timestamp: "",
870
+ operation: "",
871
+ requestId: "",
872
+ transport: "cli",
873
+ strict: false,
874
+ mvi: "standard",
875
+ contextVersion: 0
876
+ },
877
+ success: true,
878
+ result: data
879
+ };
880
+ const filtered = applyFieldFilter(
881
+ stub,
882
+ fieldCtx.fields
883
+ );
884
+ filteredData = filtered.result;
885
+ } catch {
886
+ }
887
+ }
888
+ const formatOpts = {};
889
+ if (opts.operation) formatOpts.operation = opts.operation;
890
+ if (opts.page) formatOpts.page = opts.page;
891
+ const decoratorExt = pickDecoratorMetaExtensionsLocal(opts.responseMeta);
892
+ const mergedExt = opts.extensions || Object.keys(decoratorExt).length > 0 ? { ...decoratorExt, ...opts.extensions ?? {} } : void 0;
893
+ if (mergedExt) formatOpts.extensions = mergedExt;
894
+ if (fieldCtx.mvi) formatOpts.mvi = fieldCtx.mvi;
895
+ const envelopeString = formatSuccess(
896
+ filteredData,
897
+ opts.message,
898
+ Object.keys(formatOpts).length > 0 ? formatOpts : opts.operation
899
+ );
900
+ if (process.env["CLEO_LAFS_VALIDATE"] !== "off") {
901
+ try {
902
+ const report = validateLafsShape(envelopeString);
903
+ if (report.reasons.length > 0) {
904
+ emitLafsViolation(
905
+ new LafsViolationError(`cliOutput: envelope failed LAFS shape validation`, report)
906
+ );
907
+ }
908
+ } catch (err) {
909
+ if (err instanceof LafsViolationError) {
910
+ emitLafsViolation(err);
911
+ }
912
+ }
913
+ }
914
+ process.stdout.write(envelopeString + "\n");
915
+ }
916
+ function humanEnabled() {
917
+ const ctx = getFormatContext();
918
+ return ctx.format === "human" && !ctx.quiet;
919
+ }
920
+ function humanInfo(message) {
921
+ if (!humanEnabled()) return;
922
+ process.stderr.write(`${message}
923
+ `);
924
+ }
925
+ function humanWarn(message) {
926
+ if (!humanEnabled()) return;
927
+ process.stderr.write(`${message}
928
+ `);
929
+ }
930
+ function humanLine(message) {
931
+ if (!humanEnabled()) return;
932
+ process.stdout.write(`${message}
933
+ `);
934
+ }
935
+ function humanProgress(text) {
936
+ if (!humanEnabled() || !process.stdout.isTTY) return;
937
+ process.stdout.write(text);
938
+ }
939
+ function isHumanOutput() {
940
+ return humanEnabled();
941
+ }
942
+ function cliError(message, code, details, meta, options) {
943
+ const ctx = getFormatContext();
944
+ const outputMode = getOutputMode();
945
+ if (outputMode === "silent") {
946
+ process.stderr.write(`Error: ${message}${code ? ` (${code})` : ""}
947
+ `);
948
+ return;
949
+ }
950
+ if (ctx.format === "human") {
951
+ process.stderr.write(`Error: ${message}${code ? ` (${code})` : ""}
952
+ `);
953
+ if (typeof details?.fix === "string") {
954
+ process.stderr.write(`Fix: ${details.fix}
955
+ `);
956
+ }
957
+ return;
958
+ }
959
+ const errorObj = {
960
+ code: code ?? 1,
961
+ message
962
+ };
963
+ if (details?.name !== void 0) errorObj["codeName"] = details.name;
964
+ if (details?.fix !== void 0) errorObj["fix"] = details.fix;
965
+ if (details?.alternatives !== void 0) errorObj["alternatives"] = details.alternatives;
966
+ if (details?.details !== void 0) errorObj["details"] = details.details;
967
+ const errorMeta = {
968
+ operation: meta?.operation ?? "cli.error",
969
+ requestId: meta?.requestId ?? generateRequestId(),
970
+ duration_ms: meta?.duration_ms ?? 0,
971
+ timestamp: meta?.timestamp ?? (/* @__PURE__ */ new Date()).toISOString(),
972
+ ...meta
973
+ };
974
+ const drained = drainWarnings();
975
+ if (drained && drained.length > 0) {
976
+ const existing = errorMeta.warnings;
977
+ errorMeta.warnings = Array.isArray(existing) ? [...existing, ...drained] : drained;
978
+ }
979
+ const envelope = {
980
+ success: false,
981
+ error: errorObj,
982
+ meta: errorMeta
983
+ };
984
+ if (options?.stderr === true) {
985
+ process.stderr.write(`${JSON.stringify(envelope)}
986
+ `);
987
+ return;
988
+ }
989
+ process.stdout.write(JSON.stringify(envelope) + "\n");
990
+ }
991
+
992
+ export {
993
+ renderWaves,
994
+ cliOutput,
995
+ humanInfo,
996
+ humanWarn,
997
+ humanLine,
998
+ humanProgress,
999
+ isHumanOutput,
1000
+ cliError
1001
+ };
1002
+ //# sourceMappingURL=chunk-3ZO3M37V.js.map