@cleocode/cleo 2026.10.27 → 2026.11.1-canary.11

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 (356) hide show
  1. package/README.md +28 -365
  2. package/dist/.source-stamp.json +4 -0
  3. package/dist/cli/{adapter-ZIB3OAPD.js → adapter-JZET3CDA.js} +5 -5
  4. package/dist/cli/{add-TBJUMJW7.js → add-W23ZQJ2U.js} +5 -5
  5. package/dist/cli/{add-batch-GGKVPTS5.js → add-batch-MNLEUT24.js} +5 -5
  6. package/dist/cli/{admin-NGPG2LSO.js → admin-3NN6QIJE.js} +5 -5
  7. package/dist/cli/{admin-PEYBYMZN.js → admin-LOGL2TBY.js} +16 -6
  8. package/dist/cli/{adr-2XVNDYZ7.js → adr-QYUJRVHW.js} +5 -5
  9. package/dist/cli/{agent-B23GPWYM.js → agent-KKMNGKR2.js} +3 -548
  10. package/dist/cli/{agent-outputs-SZ45UZVC.js → agent-outputs-ZEKMONK2.js} +2 -2
  11. package/dist/cli/{analyze-A44RDCSX.js → analyze-VUEJUV24.js} +5 -5
  12. package/dist/cli/{archive-QQB6M2RF.js → archive-I2XT6DGU.js} +5 -5
  13. package/dist/cli/{archive-stats-K4YKKYQV.js → archive-stats-J5AMTF7W.js} +5 -5
  14. package/dist/cli/{attention-KAHDF6KD.js → attention-736TGLSO.js} +5 -5
  15. package/dist/cli/{audit-ALSFSHEI.js → audit-JTEHB556.js} +2 -2
  16. package/dist/cli/{auth-5L3XPCXL.js → auth-QNFL6SIX.js} +5 -5
  17. package/dist/cli/{backfill-5B2FWBIB.js → backfill-QCEV5ZJR.js} +2 -2
  18. package/dist/cli/{backup-IYFULQTM.js → backup-6D6Y7S4X.js} +39 -10
  19. package/dist/cli/{backup-inspect-SYI6JWYI.js → backup-inspect-YS4HJUFF.js} +3 -3
  20. package/dist/cli/{backup-recover-I64KKABA.js → backup-recover-6RRWTZUF.js} +3 -3
  21. package/dist/cli/{blockers-KYNJJKZQ.js → blockers-TXOHUIQZ.js} +5 -5
  22. package/dist/cli/{brain-3E6GWG33.js → brain-MPZZ73RR.js} +2 -2
  23. package/dist/cli/{briefing-J6PDDZ2C.js → briefing-HR7WKAP7.js} +5 -5
  24. package/dist/cli/{caamp-4GLHZPAB.js → caamp-6BHIZIRC.js} +2 -2
  25. package/dist/cli/{cancel-A4OCUVDI.js → cancel-RPBL7XNS.js} +16 -6
  26. package/dist/cli/{canon-NPF5RODM.js → canon-UQKCAL3J.js} +13 -8
  27. package/dist/cli/{chunk-SXXOC6KZ.js → canon-docs-ZXWC4AFI.js} +51 -4
  28. package/dist/cli/{cant-JZXHRLE2.js → cant-7YDYKDCE.js} +2 -2
  29. package/dist/cli/{changeset-WTR2KKML.js → changeset-XDMWUH4W.js} +2 -2
  30. package/dist/cli/{check-HHT4J5ZM.js → check-ALYB2DED.js} +43 -5
  31. package/dist/cli/{check-ZT6O5JDS.js → check-BNV2Z7NL.js} +45 -23
  32. package/dist/cli/{checkpoint-THR2KML7.js → checkpoint-WGT5Q4IV.js} +2 -2
  33. package/dist/cli/{chunk-6G43T2BO.js → chunk-2DRYEF4Q.js} +2 -2
  34. package/dist/cli/{chunk-4FO2MCCU.js → chunk-2EBQ2UPV.js} +2 -2
  35. package/dist/cli/{chunk-G63BB37P.js → chunk-2FVSEFH6.js} +3 -3
  36. package/dist/cli/{chunk-6N6WGLXE.js → chunk-2NXQCE4N.js} +10 -2
  37. package/dist/cli/{chunk-BXEMLY6P.js → chunk-367CXLZW.js} +2 -2
  38. package/dist/cli/{chunk-DNR7ZPOW.js → chunk-3C4ABVIM.js} +2 -2
  39. package/dist/cli/{chunk-YJQL26VS.js → chunk-3FLFKMKA.js} +3 -3
  40. package/dist/cli/{chunk-FBR2NQW4.js → chunk-4C4NJVR3.js} +2 -2
  41. package/dist/cli/{chunk-QITYNI2H.js → chunk-57YMZSNI.js} +2 -2
  42. package/dist/cli/{chunk-HQG5YZCJ.js → chunk-5D5EFJTJ.js} +2 -2
  43. package/dist/cli/{chunk-2LFWGSPE.js → chunk-5OFSGZLM.js} +2 -2
  44. package/dist/cli/{chunk-Y6FHWDNX.js → chunk-6KWKDXMT.js} +2 -2
  45. package/dist/cli/{chunk-RX5F2FUP.js → chunk-6VT7QNQH.js} +2 -2
  46. package/dist/cli/{chunk-D7QZ4WSJ.js → chunk-6ZCDCJB4.js} +2 -2
  47. package/dist/cli/{chunk-4QI7JOPI.js → chunk-762STE53.js} +2 -2
  48. package/dist/cli/{chunk-SP66YNWA.js → chunk-76QLAP54.js} +2 -2
  49. package/dist/cli/{chunk-7VRIP4MD.js → chunk-7AEZ35UT.js} +2 -2
  50. package/dist/cli/{chunk-64OLQ6OH.js → chunk-7VAYYOTQ.js} +2 -2
  51. package/dist/cli/{chunk-YM7QMFFW.js → chunk-AXFIVWJZ.js} +2 -2
  52. package/dist/cli/{chunk-AI4BE3MJ.js → chunk-B3NZQ2Y4.js} +2 -2
  53. package/dist/cli/{chunk-MLUCI3JC.js → chunk-BELA5D4T.js} +15 -6
  54. package/dist/cli/{chunk-2UQB3DWD.js → chunk-BJL3MZUI.js} +2 -2
  55. package/dist/cli/{chunk-UPFW3DRJ.js → chunk-BSIPR5S5.js} +2 -2
  56. package/dist/cli/{chunk-JRDAITPC.js → chunk-D75KPNMP.js} +18 -19
  57. package/dist/cli/{chunk-NBFD6HZX.js → chunk-DA7LGEOB.js} +2 -2
  58. package/dist/cli/{chunk-ESI6Q4OS.js → chunk-FD6EQLV7.js} +1 -2
  59. package/dist/cli/{chunk-5IFMSDWF.js → chunk-FJ5CWNTM.js} +2 -2
  60. package/dist/cli/{chunk-XSURVN6Y.js → chunk-FYS4D5VL.js} +2 -2
  61. package/dist/cli/chunk-HACZVXOL.js +92 -0
  62. package/dist/cli/{chunk-JBLHNKSK.js → chunk-HPRGQCRR.js} +2 -2
  63. package/dist/cli/{chunk-362WHUCT.js → chunk-IC33OPZA.js} +2 -2
  64. package/dist/cli/{chunk-TVNXFYOJ.js → chunk-ICFMF56Q.js} +4 -4
  65. package/dist/cli/{chunk-Y7ZNHNVQ.js → chunk-IDFVCC6T.js} +2 -2
  66. package/dist/cli/{chunk-NDN5LU2T.js → chunk-IDZSVRTW.js} +2 -2
  67. package/dist/cli/{chunk-SLNCIDY5.js → chunk-K3VVRO75.js} +2 -2
  68. package/dist/cli/{owner-override-cap-53HYZHIL.js → chunk-KA636FBJ.js} +45 -5
  69. package/dist/cli/{chunk-GNASLIE2.js → chunk-KNHQAYMR.js} +2 -2
  70. package/dist/cli/{chunk-THHPBHFL.js → chunk-LVPOIHUW.js} +2 -2
  71. package/dist/cli/{chunk-IYP3ACPP.js → chunk-M7L5XJYS.js} +2 -2
  72. package/dist/cli/{chunk-PGR4RWQL.js → chunk-MYBFLQT4.js} +8 -5
  73. package/dist/cli/{chunk-W56TDRLF.js → chunk-OMLSVE5U.js} +2 -2
  74. package/dist/cli/{chunk-TNLB7XJO.js → chunk-QZKOWHXO.js} +2 -2
  75. package/dist/cli/{chunk-5KN6IF7F.js → chunk-SKQG2E6A.js} +2 -2
  76. package/dist/cli/{chunk-J4ZSHCUO.js → chunk-TBIXOLSO.js} +2 -2
  77. package/dist/cli/{chunk-QWNKLLLG.js → chunk-TM72T27J.js} +2 -20
  78. package/dist/cli/{chunk-SHRGWWE2.js → chunk-TRUE5NCE.js} +12 -5
  79. package/dist/cli/{chunk-T2TE45UH.js → chunk-UAHZXF7P.js} +2 -2
  80. package/dist/cli/{chunk-3SWQFMWN.js → chunk-UGEJXSUY.js} +2 -2
  81. package/dist/cli/{chunk-NPEWU2LO.js → chunk-UYNMYQIG.js} +2 -2
  82. package/dist/cli/{chunk-S2IS4DXJ.js → chunk-VR6TPIRF.js} +2 -2
  83. package/dist/cli/{chunk-GL5GCK7T.js → chunk-VV65VS2B.js} +2 -2
  84. package/dist/cli/{chunk-OIS3BDSL.js → chunk-YNBEP6TJ.js} +23 -11
  85. package/dist/cli/{chunk-TUUKU4H7.js → chunk-YQQXHUUN.js} +15 -5
  86. package/dist/cli/{chunk-RBI6IBDF.js → chunk-Z24VFMRA.js} +2 -2
  87. package/dist/cli/{claim-MFFSWD64.js → claim-NJMCYE4S.js} +5 -5
  88. package/dist/cli/{classify-H3W4U76E.js → classify-KWJ3TFEC.js} +2 -2
  89. package/dist/cli/{cli-5PJ2B6ZH.js → cli-FIW3KVGU.js} +5 -5
  90. package/dist/cli/{cloud-IEDKFMLI.js → cloud-2H332MHX.js} +4 -4
  91. package/dist/cli/{code-IUDQNALE.js → code-NB4L5SQS.js} +2 -2
  92. package/dist/cli/{complete-2IN4YEWL.js → complete-ZVXR5WFT.js} +6 -6
  93. package/dist/cli/{complexity-JVEIZE5M.js → complexity-J7QTUVEQ.js} +5 -5
  94. package/dist/cli/{compliance-MC3X2M34.js → compliance-JA6VK45M.js} +5 -5
  95. package/dist/cli/{config-Z5BXGRZB.js → config-G7L2NAIX.js} +12 -7
  96. package/dist/cli/{consensus-T6UARQTD.js → consensus-TMDIZHXI.js} +5 -5
  97. package/dist/cli/{context-M4F3YXZE.js → context-6GLTMU2N.js} +5 -5
  98. package/dist/cli/{contribution-76FJYJKR.js → contribution-HPVDMKN6.js} +5 -5
  99. package/dist/cli/{curator-3YXUY4N7.js → curator-O2FXIQFI.js} +2 -2
  100. package/dist/cli/{current-EFRCVSWL.js → current-QFANPTZ4.js} +5 -5
  101. package/dist/cli/{daemon-UAAMDN6C.js → daemon-XTMW67JG.js} +5 -5
  102. package/dist/cli/{dash-ZEBYLYPV.js → dash-K25EK3MM.js} +5 -5
  103. package/dist/cli/{decide-GQTJOC55.js → decide-7JM6V3MS.js} +2 -2
  104. package/dist/cli/{decompose-XTK2DXSM.js → decompose-D2CI6H4Z.js} +5 -5
  105. package/dist/cli/{decomposition-ZDACSPOU.js → decomposition-HM2POZII.js} +5 -5
  106. package/dist/cli/{delete-6YZADILS.js → delete-WKIEMXKN.js} +5 -5
  107. package/dist/cli/{deps-WTASB2GB.js → deps-2X5EWRGY.js} +5 -5
  108. package/dist/cli/{detect-IITE5EBW.js → detect-SWEMXU4U.js} +5 -5
  109. package/dist/cli/{detect-drift-PVC7IPHL.js → detect-drift-M5C4RFJ5.js} +15 -12
  110. package/dist/cli/{diagnostics-MFUOSLSQ.js → diagnostics-6STQBKON.js} +5 -5
  111. package/dist/cli/{docs-AIZLN3ZE.js → docs-O5A34WJY.js} +172 -101
  112. package/dist/cli/{docs-NF5COLOB.js → docs-SI2YNPSG.js} +216 -30
  113. package/dist/cli/{doctor-4DWCNDOP.js → doctor-45UUXTVQ.js} +57 -52
  114. package/dist/cli/{doctor-ac-bindings-HPTG3DDJ.js → doctor-ac-bindings-PBJQ5AS6.js} +3 -3
  115. package/dist/cli/{doctor-acceptance-drift-P7DOAY54.js → doctor-acceptance-drift-FIV25NRE.js} +3 -3
  116. package/dist/cli/{doctor-credentials-TBRT7RAV.js → doctor-credentials-W7EGOG54.js} +3 -3
  117. package/dist/cli/{doctor-db-substrate-ZMLTPGQF.js → doctor-db-substrate-DQJDPL4K.js} +3 -3
  118. package/dist/cli/{doctor-dep-cycles-QWFYH2JK.js → doctor-dep-cycles-2RK2MAHL.js} +3 -3
  119. package/dist/cli/{doctor-exodus-FYBTDXNQ.js → doctor-exodus-SCIA5CZ5.js} +3 -3
  120. package/dist/cli/{doctor-exodus-residue-S7EKSTZS.js → doctor-exodus-residue-N7R3FRC5.js} +3 -3
  121. package/dist/cli/{doctor-fk-check-CNZCA74C.js → doctor-fk-check-5TND2DZH.js} +3 -3
  122. package/dist/cli/{doctor-global-delivery-FICIWVP6.js → doctor-global-delivery-ENAHOZF7.js} +3 -3
  123. package/dist/cli/{doctor-goal-runtime-UIPZRP5Y.js → doctor-goal-runtime-PN6LJFPN.js} +3 -3
  124. package/dist/cli/{doctor-heavy-command-hook-SJHLYWEI.js → doctor-heavy-command-hook-UK3PLJRM.js} +3 -3
  125. package/dist/cli/{doctor-hooks-GHQIAFOY.js → doctor-hooks-ABHXHN2C.js} +3 -3
  126. package/dist/cli/{doctor-legacy-backups-USISQQ5C.js → doctor-legacy-backups-6NXVR43I.js} +3 -3
  127. package/dist/cli/{doctor-legacy-reaper-54BUE5RK.js → doctor-legacy-reaper-SWQOAPNV.js} +3 -3
  128. package/dist/cli/{doctor-malformed-ids-LZNVED2E.js → doctor-malformed-ids-VPZE6A4O.js} +3 -3
  129. package/dist/cli/{doctor-manifest-rows-3L6RUH3C.js → doctor-manifest-rows-GHPAYQ6I.js} +3 -3
  130. package/dist/cli/{doctor-memory-guard-Z62J6U3O.js → doctor-memory-guard-Z6IMLQ5C.js} +3 -3
  131. package/dist/cli/{doctor-migrations-EYB6XSZ2.js → doctor-migrations-6HICMUH5.js} +3 -3
  132. package/dist/cli/{doctor-nexus-residency-GFS37HCL.js → doctor-nexus-residency-VEOZBSYZ.js} +3 -3
  133. package/dist/cli/{doctor-project-identity-A3C6ZWUQ.js → doctor-project-identity-UPRBKXXU.js} +3 -3
  134. package/dist/cli/{doctor-projects-73UHVECZ.js → doctor-projects-3BKEL6SE.js} +3 -3
  135. package/dist/cli/{doctor-projects-registry-5RGRJMCE.js → doctor-projects-registry-JQRWKMRP.js} +3 -3
  136. package/dist/cli/{doctor-release-readiness-7G3OGH2R.js → doctor-release-readiness-ZAK5RKP7.js} +3 -3
  137. package/dist/cli/{doctor-repair-IK6OSUHA.js → doctor-repair-KP66YRVA.js} +3 -3
  138. package/dist/cli/{doctor-row-identity-2CULRXQ2.js → doctor-row-identity-7BDE6BMR.js} +3 -3
  139. package/dist/cli/{doctor-skill-fixtures-OQ2RMIR6.js → doctor-skill-fixtures-MJQ7BJRE.js} +3 -3
  140. package/dist/cli/{doctor-split-brain-5YQGDVTY.js → doctor-split-brain-FFQ7U2FI.js} +3 -3
  141. package/dist/cli/{doctor-superseded-store-JLATIXXP.js → doctor-superseded-store-FQSFKMEX.js} +3 -3
  142. package/dist/cli/{doctor-sync-journal-MZM3WUIT.js → doctor-sync-journal-AM5M5RGO.js} +3 -3
  143. package/dist/cli/{doctor-sync-triggers-IZFC62D7.js → doctor-sync-triggers-4GSCFCL7.js} +3 -3
  144. package/dist/cli/{doctor-system-TJINX2M3.js → doctor-system-S7KYSUXW.js} +3 -3
  145. package/dist/cli/{doctor-tool-locks-VXKJZKAY.js → doctor-tool-locks-XRRQJ3MK.js} +3 -3
  146. package/dist/cli/{doctor-twin-collapse-C5GLUSAO.js → doctor-twin-collapse-SJM5LNAO.js} +3 -3
  147. package/dist/cli/doctor-type-matrix-6MJXOZI2.js +26 -0
  148. package/dist/cli/{doctor-worktree-stores-WZMB4ZHG.js → doctor-worktree-stores-TIR5ZDJ4.js} +3 -3
  149. package/dist/cli/{done-A7ITQSJT.js → done-TXCQGNT7.js} +91 -8
  150. package/dist/cli/{event-RD4EI52P.js → event-J2A7PIDI.js} +2 -2
  151. package/dist/cli/{exists-U33AFKXF.js → exists-NN5QNXFW.js} +2 -2
  152. package/dist/cli/{exodus-QHAQC5SH.js → exodus-VIV4AX54.js} +2 -2
  153. package/dist/cli/{export-OTDQUAQQ.js → export-T4YD6Q3U.js} +5 -5
  154. package/dist/cli/{export-tasks-BKVXMFLD.js → export-tasks-VB5U3YMC.js} +5 -5
  155. package/dist/cli/{federation-GZCJIYMK.js → federation-7WZTYIX7.js} +2 -2
  156. package/dist/cli/{find-BWKYKZEN.js → find-KMTKZ7FY.js} +5 -5
  157. package/dist/cli/{focus-772SYK7Z.js → focus-3BLWBLBG.js} +5 -5
  158. package/dist/cli/{focus-H5CBCFFV.js → focus-6ZYKBB3X.js} +2 -2
  159. package/dist/cli/{gateway-PJ2A6TNM.js → gateway-WVQ3QQFW.js} +2 -2
  160. package/dist/cli/{gc-KG3D2PSR.js → gc-PZGIBTWQ.js} +3 -3
  161. package/dist/cli/{go-AEDN2TNP.js → go-LK5WEP3M.js} +2 -2
  162. package/dist/cli/{goal-TG74GKBK.js → goal-IRTYU7XD.js} +3 -3
  163. package/dist/cli/{grade-BZYBWDA7.js → grade-GIXFAUVP.js} +5 -5
  164. package/dist/cli/{graph-LB2TBRH6.js → graph-SVPHG4VG.js} +8 -33
  165. package/dist/cli/{history-XIYAXOUF.js → history-LPGGTRI7.js} +5 -5
  166. package/dist/cli/{hook-GS5ZZX46.js → hook-VMFPDWVJ.js} +2 -2
  167. package/dist/cli/hook-entry.js +105 -7
  168. package/dist/cli/hygiene-NJD3GR56.js +142 -0
  169. package/dist/cli/{import-C2QISQC7.js → import-55RUOSXO.js} +5 -5
  170. package/dist/cli/{import-tasks-P6FYXAAS.js → import-tasks-RXPNEFPW.js} +5 -5
  171. package/dist/cli/index.js +256 -204
  172. package/dist/cli/{init-XLIT5JVO.js → init-KNRJ22RZ.js} +5 -5
  173. package/dist/cli/{inject-EDZVSPTW.js → inject-43VJCL2Y.js} +5 -5
  174. package/dist/cli/{install-global-FFNYQ366.js → install-global-GU4F2KKV.js} +2 -2
  175. package/dist/cli/{intelligence-OE7SIVR5.js → intelligence-36SGMEHH.js} +5 -5
  176. package/dist/cli/{issue-S67EZXN7.js → issue-VYWZG6BR.js} +5 -5
  177. package/dist/cli/{janitor-GMTGHNOZ.js → janitor-LU6EA55M.js} +2 -2
  178. package/dist/cli/{labels-M7GIBYAQ.js → labels-X6BEE5ZZ.js} +5 -5
  179. package/dist/cli/{lean-FNQ3D4VT.js → lean-GXLAUNNG.js} +2 -2
  180. package/dist/cli/{lifecycle-NO5QDJ2J.js → lifecycle-5P7AVPSI.js} +6 -6
  181. package/dist/cli/{list-VH6DPZ4V.js → list-5N73FV7H.js} +5 -5
  182. package/dist/cli/{llm-P35U52I5.js → llm-IO53XETC.js} +9 -9
  183. package/dist/cli/{llm-YVC5HL7D.js → llm-J3SYJEGB.js} +2 -2
  184. package/dist/cli/{llm-cost-CRIA3VMB.js → llm-cost-DYY7IC4W.js} +3 -3
  185. package/dist/cli/{llm-stream-YBT4FNWZ.js → llm-stream-G35ANQKL.js} +3 -3
  186. package/dist/cli/{log-XIPOX6UM.js → log-E7XZBG7W.js} +5 -5
  187. package/dist/cli/{login-SYEMTZXY.js → login-IRTRPQTX.js} +4 -4
  188. package/dist/cli/{logout-FVWR2AXZ.js → logout-XEL6AVVB.js} +4 -4
  189. package/dist/cli/{manifest-A5F2YD35.js → manifest-UZDHLWAN.js} +5 -5
  190. package/dist/cli/{map-AOMU72RY.js → map-6J27ZMSH.js} +5 -5
  191. package/dist/cli/{memory-4WNZWJG7.js → memory-CFG7P3MM.js} +65 -18
  192. package/dist/cli/{memory-GK5WDYWT.js → memory-Y2C7HYDJ.js} +4 -3
  193. package/dist/cli/merge-JCDDPQIX.js +65 -0
  194. package/dist/cli/{migrate-agents-v2-IX3IBBIT.js → migrate-agents-v2-4W4ZSHZM.js} +3 -3
  195. package/dist/cli/{migrate-claude-mem-OTSYHYBZ.js → migrate-claude-mem-MDBLLJ22.js} +6 -6
  196. package/dist/cli/{next-YUZ4X7NB.js → next-MSGFEI7M.js} +5 -5
  197. package/dist/cli/{nexus-RYH4IAG3.js → nexus-IK7QLEDF.js} +3 -11
  198. package/dist/cli/{nexus-YHPP3RZU.js → nexus-XULYITP6.js} +98 -63
  199. package/dist/cli/{nexus-vault-cli-2R6ALKUP.js → nexus-vault-cli-G7QY446L.js} +4 -4
  200. package/dist/cli/{ops-XPJK3WBN.js → ops-2XDAGO4L.js} +5 -5
  201. package/dist/cli/{orchestrate-AYBDAVOQ.js → orchestrate-BDU4ZLDN.js} +77 -346
  202. package/dist/cli/{orchestrate-TWV43SAR.js → orchestrate-SUOWHPIU.js} +147 -140
  203. package/dist/cli/{otel-TR54MLYU.js → otel-4AS22352.js} +2 -2
  204. package/dist/cli/owner-override-cap-5XAZD23U.js +31 -0
  205. package/dist/cli/{owner-password-GQO37FBV.js → owner-password-VBK5RHKP.js} +3 -3
  206. package/dist/cli/{phase-CFH2NZU5.js → phase-FF6OMRTY.js} +5 -5
  207. package/dist/cli/{pipeline-LW5HWLBI.js → pipeline-4ATMN26D.js} +3 -3
  208. package/dist/cli/{pivot-LEBKDG22.js → pivot-S6JDBRK4.js} +5 -5
  209. package/dist/cli/{plan-6VK5I4BT.js → plan-AY6CF5VB.js} +5 -5
  210. package/dist/cli/{playbook-YPGSNILZ.js → playbook-JDDX5F3H.js} +3 -3
  211. package/dist/cli/{playbook-4GKDYZYW.js → playbook-LJOLT6MX.js} +5 -5
  212. package/dist/cli/{project-QJM7P2HG.js → project-RCRORK6A.js} +3 -3
  213. package/dist/cli/project-hook-entry.js +1 -1
  214. package/dist/cli/{promote-4V4ZLAL3.js → promote-YAFPAZEH.js} +5 -5
  215. package/dist/cli/{provenance-2SFRY42O.js → provenance-2WVSVXNS.js} +5 -5
  216. package/dist/cli/{provider-G6MBFVHR.js → provider-GJD2MZOF.js} +5 -5
  217. package/dist/cli/{reason-2AYZ6SGZ.js → reason-QJZGRMSL.js} +5 -5
  218. package/dist/cli/{reconcile-7CBD7AHH.js → reconcile-JMYN3BON.js} +6 -5
  219. package/dist/cli/{refresh-memory-JTQYFIC7.js → refresh-memory-XVQE7B7L.js} +2 -2
  220. package/dist/cli/{relates-FP43JAOK.js → relates-NNOSVBIM.js} +5 -5
  221. package/dist/cli/{release-NW7XHRVB.js → release-DB23AFID.js} +136 -6
  222. package/dist/cli/{release-OWPFPUQG.js → release-EI72GMAM.js} +79 -96
  223. package/dist/cli/release-authorize-OPL262T6.js +84 -0
  224. package/dist/cli/{remote-ZCCQGM5A.js → remote-XJGF5MGU.js} +2 -2
  225. package/dist/cli/{renderers-37XPXD3K.js → renderers-AMSXAXLY.js} +2 -2
  226. package/dist/cli/{reorder-M457CQRR.js → reorder-HFTIHYBZ.js} +5 -5
  227. package/dist/cli/{reparent-53T6IUUS.js → reparent-JOBADCH5.js} +5 -5
  228. package/dist/cli/{req-ORMMU5PV.js → req-6JXMXBNA.js} +38 -5
  229. package/dist/cli/{research-LFGCGIEP.js → research-5GRWQLHM.js} +6 -6
  230. package/dist/cli/{restore-ZYRIZQUJ.js → restore-ZZH5EUTG.js} +12 -6
  231. package/dist/cli/{revert-XB7K5DR7.js → revert-2F3RPBGW.js} +2 -2
  232. package/dist/cli/review-LTRABBAL.js +162 -0
  233. package/dist/cli/{roadmap-EK6LXBQ4.js → roadmap-THEKOZ3A.js} +5 -5
  234. package/dist/cli/{run-PZJCIRFD.js → run-LH2KI2BV.js} +57 -4
  235. package/dist/cli/{safestop-NO57J3RK.js → safestop-3BH4GLOW.js} +5 -5
  236. package/dist/cli/{saga-NIJMIJE5.js → saga-SMAWF37G.js} +5 -5
  237. package/dist/cli/{schema-5SBTATBP.js → schema-J4UNFL5K.js} +2 -2
  238. package/dist/cli/{self-update-7747XBHR.js → self-update-OP7X4SV5.js} +2 -2
  239. package/dist/cli/{selfimprove-6HSEV3RG.js → selfimprove-MJXG7BIB.js} +5 -5
  240. package/dist/cli/{selfimprove-IYKG5PF4.js → selfimprove-MQ5WGGVO.js} +2 -2
  241. package/dist/cli/{sentient-U56VMS6D.js → sentient-B7TXJ2XI.js} +2 -2
  242. package/dist/cli/{sentient-Z7W7WO74.js → sentient-W3D6ATW5.js} +2 -2
  243. package/dist/cli/{sequence-T42KPEEQ.js → sequence-VUPNLIB3.js} +5 -5
  244. package/dist/cli/{service-CBEZWGHC.js → service-ZBMCSGAO.js} +5 -5
  245. package/dist/cli/{session-XDADM7O4.js → session-5JTABSZR.js} +6 -6
  246. package/dist/cli/{session-TFVW42XK.js → session-NN655K5R.js} +3 -3
  247. package/dist/cli/{setup-WZVYP7QA.js → setup-JQ3DFC5Q.js} +4 -4
  248. package/dist/cli/{show-I2TEU6MP.js → show-OKAPY3KE.js} +5 -6
  249. package/dist/cli/{skill-YUWT2LC6.js → skill-HOUTOSDX.js} +2 -2
  250. package/dist/cli/{skills-ZBYRPFRL.js → skills-CJ4UY4VG.js} +7 -7
  251. package/dist/cli/{snapshot-GMN7LZ4A.js → snapshot-5AUXE72Q.js} +5 -5
  252. package/dist/cli/{start-FQWDRGJE.js → start-ZB263BD4.js} +5 -5
  253. package/dist/cli/{stats-D2AU77GH.js → stats-QKNT3RCZ.js} +5 -5
  254. package/dist/cli/{status-TNLDBR7K.js → status-7BIMUOCS.js} +2 -2
  255. package/dist/cli/{sticky-FKZFQYNV.js → sticky-IDNWN3F6.js} +5 -5
  256. package/dist/cli/{sticky-EKL5FD2D.js → sticky-Z2BMRSAB.js} +2 -2
  257. package/dist/cli/{stop-ZCL7RZPH.js → stop-OCEFE7PM.js} +5 -5
  258. package/dist/cli/{sync-WM4JLGXF.js → sync-6DQ2OAMG.js} +6 -6
  259. package/dist/cli/{tasks-RU6AAJKD.js → tasks-BIZI4QJF.js} +30 -5
  260. package/dist/cli/{tasks-54WNYQZS.js → tasks-Q2XYKLX6.js} +5 -5
  261. package/dist/cli/{telemetry-RQFRJRBZ.js → telemetry-DCWQTH2I.js} +2 -2
  262. package/dist/cli/{templates-6H4CTUCW.js → templates-Q3QZQZ62.js} +2 -2
  263. package/dist/cli/{testing-S7FCPHW5.js → testing-PTDKLHX3.js} +5 -5
  264. package/dist/cli/{token-BDRGEO3E.js → token-BZEEYQHF.js} +5 -5
  265. package/dist/cli/{transcript-DVV4EFPG.js → transcript-ZY6UF3TU.js} +2 -2
  266. package/dist/cli/{update-BD77ORMO.js → update-E5PECNWK.js} +5 -5
  267. package/dist/cli/{upgrade-EDQ7F6OX.js → upgrade-E6M4ERKP.js} +5 -5
  268. package/dist/cli/{verify-VOJRQQE2.js → verify-474GA75M.js} +12 -7
  269. package/dist/cli/{web-BPCE3X2V.js → web-R7LXSDEG.js} +2 -2
  270. package/dist/cli/{workgraph-ZKOFWUUE.js → workgraph-LWSTY3JY.js} +6 -6
  271. package/dist/cli/{worktree-2UEPNBJC.js → worktree-3B5JR6N7.js} +4 -5
  272. package/dist/cli/{worktree-2HHJT5BS.js → worktree-ZCJAH23Z.js} +12 -14
  273. package/package.json +16 -14
  274. package/studio-dist/client/_app/immutable/chunks/{CwQ8nAoh.js → 6tOJRYtC.js} +1 -1
  275. package/studio-dist/client/_app/immutable/chunks/{C87Q3uxm.js → Bb5_AOYB.js} +1 -1
  276. package/studio-dist/client/_app/immutable/chunks/C2a5FdIt.js +1 -0
  277. package/studio-dist/client/_app/immutable/chunks/{Dv66614U.js → DdIqZ0F-.js} +1 -1
  278. package/studio-dist/client/_app/immutable/chunks/{Js_lZuOv.js → DtBpLaMM.js} +1 -1
  279. package/studio-dist/client/_app/immutable/chunks/{EZwHPWle.js → h4IOtB0S.js} +1 -1
  280. package/studio-dist/client/_app/immutable/entry/{app.C2oQiIiz.js → app.Bu2fyKEV.js} +2 -2
  281. package/studio-dist/client/_app/immutable/entry/start.CBBzjkal.js +1 -0
  282. package/studio-dist/client/_app/immutable/nodes/{0.DaE6eVaG.js → 0.D0Q67wN6.js} +1 -1
  283. package/studio-dist/client/_app/immutable/nodes/{1.D0Mb3i_7.js → 1.Cx9rAK7i.js} +1 -1
  284. package/studio-dist/client/_app/immutable/nodes/{15.ChRO-4dz.js → 15.DnOsli29.js} +1 -1
  285. package/studio-dist/client/_app/immutable/nodes/{16.fltF2wse.js → 16.CrxwCKGy.js} +1 -1
  286. package/studio-dist/client/_app/immutable/nodes/{17.DnYjMhyj.js → 17.Cdh0_9mm.js} +1 -1
  287. package/studio-dist/client/_app/immutable/nodes/{18.DYVIAC9a.js → 18.8GsoNI5O.js} +1 -1
  288. package/studio-dist/client/_app/immutable/nodes/{20.CVBcbjBW.js → 20.BJG6Nl3w.js} +1 -1
  289. package/studio-dist/client/_app/immutable/nodes/{24.Bfswm8Y5.js → 24.j8WC-gjA.js} +1 -1
  290. package/studio-dist/client/_app/immutable/nodes/25.BlW7cJd4.js +39 -0
  291. package/studio-dist/client/_app/immutable/nodes/{26.D3RoTHoD.js → 26.C5RluMQM.js} +1 -1
  292. package/studio-dist/client/_app/immutable/nodes/{28.D64RBcfs.js → 28.B9m_UNTl.js} +1 -1
  293. package/studio-dist/client/_app/immutable/nodes/{29.yfuBeH1x.js → 29.BLFaoK4P.js} +1 -1
  294. package/studio-dist/client/_app/immutable/nodes/{3.ezhkaJvt.js → 3.BhtcETod.js} +1 -1
  295. package/studio-dist/client/_app/version.json +1 -1
  296. package/studio-dist/server/chunks/{0-BKQLYEeE.js → 0-3ISI_Jd4.js} +3 -3
  297. package/studio-dist/server/chunks/1-CM2aVyEP.js +9 -0
  298. package/studio-dist/server/chunks/{15-DuSvkmiZ.js → 15-3X9-99yQ.js} +3 -3
  299. package/studio-dist/server/chunks/{16-DJVePzvS.js → 16-CpB7uymk.js} +3 -3
  300. package/studio-dist/server/chunks/{17-D8K9-EPJ.js → 17-BwPBOkXY.js} +3 -3
  301. package/studio-dist/server/chunks/{18-D5FUPGnv.js → 18-4rPYGgn2.js} +3 -3
  302. package/studio-dist/server/chunks/{2-DQaIET_o.js → 2-q7c9jKfs.js} +6 -6
  303. package/studio-dist/server/chunks/{20-CmHgNZFV.js → 20-BRURJXYm.js} +3 -3
  304. package/studio-dist/server/chunks/{23-D194DGVi.js → 23-DEuC4HS6.js} +3 -2
  305. package/studio-dist/server/chunks/{24-CfuHWHgd.js → 24-guuvcnQd.js} +5 -4
  306. package/studio-dist/server/chunks/{25-bm3BDSum.js → 25-Cu45aO6X.js} +618 -36
  307. package/studio-dist/server/chunks/{26-DRlhAbrf.js → 26-CbjqXxSv.js} +15 -14
  308. package/studio-dist/server/chunks/{28-DeYe2rpm.js → 28-CiVv4jji.js} +3 -3
  309. package/studio-dist/server/chunks/{29-d_lZvJg3.js → 29-CHrYKy9L.js} +6 -5
  310. package/studio-dist/server/chunks/{3-BrE1-gTA.js → 3-dGuWwuGL.js} +4 -4
  311. package/studio-dist/server/chunks/30-CZYg7-qi.js +94 -0
  312. package/studio-dist/server/chunks/{_layout.svelte-BeqNMCvk.js → _layout.svelte-BtFiGIEp.js} +4 -4
  313. package/studio-dist/server/chunks/{_page.svelte-Dm8y5a8S.js → _page.svelte-Bazc0M-R.js} +3 -3
  314. package/studio-dist/server/chunks/{_page.svelte-V7BTZinR.js → _page.svelte-C3zGtsso.js} +9 -8
  315. package/studio-dist/server/chunks/{_page.svelte-CJVF_ySt.js → _page.svelte-C7HQSp26.js} +3 -3
  316. package/studio-dist/server/chunks/{_page.svelte-Bchzzf-O.js → _page.svelte-CGmJXo2R.js} +3 -3
  317. package/studio-dist/server/chunks/{_page.svelte-CkXCx1iz.js → _page.svelte-CQVvPMmQ.js} +3 -3
  318. package/studio-dist/server/chunks/{_page.svelte-DIx7Hcw-.js → _page.svelte-CndKFWTU.js} +3 -3
  319. package/studio-dist/server/chunks/{_page.svelte-Ds0GMs_q.js → _page.svelte-CpWAUdOW.js} +5 -5
  320. package/studio-dist/server/chunks/{_page.svelte-DM-MP-Vl.js → _page.svelte-DWXNbjU9.js} +3 -3
  321. package/studio-dist/server/chunks/{_page.svelte-B7xxx6BP.js → _page.svelte-DciYSvHg.js} +4 -4
  322. package/studio-dist/server/chunks/{_page.svelte-DnmZYECG.js → _page.svelte-FsmVvOW2.js} +3 -3
  323. package/studio-dist/server/chunks/{_page.svelte-Cx9Ptecp.js → _page.svelte-_ePwQLv-.js} +2 -2
  324. package/studio-dist/server/chunks/{_server.ts-B5vYKkI6.js → _server.ts--7OuOtTn.js} +1 -2
  325. package/studio-dist/server/chunks/{_server.ts-Cd_KHxRr.js → _server.ts-BDyyTu-K.js} +2 -2
  326. package/studio-dist/server/chunks/{_server.ts-YtGAClvW.js → _server.ts-Bqqug0HB.js} +10 -8
  327. package/studio-dist/server/chunks/{_server.ts-CcQ0AQoo.js → _server.ts-C_2-lCv8.js} +6 -5
  328. package/studio-dist/server/chunks/{_server.ts-6A72NyG7.js → _server.ts-Cr0M7RVU.js} +2 -2
  329. package/studio-dist/server/chunks/{_server.ts-BKZlM7rp.js → _server.ts-Csp0H96s.js} +2 -2
  330. package/studio-dist/server/chunks/{_server.ts-DdCviCsN.js → _server.ts-CyTTBEcl.js} +4 -4
  331. package/studio-dist/server/chunks/{_server.ts-Ck-oreiA.js → _server.ts-D6VzZhEs.js} +3 -3
  332. package/studio-dist/server/chunks/{_server.ts-b2YIpIsi.js → _server.ts-D9u8o_fg.js} +3 -3
  333. package/studio-dist/server/chunks/{_server.ts-XLV5SvjH.js → _server.ts-NPYD7LXS.js} +2 -2
  334. package/studio-dist/server/chunks/{_server.ts-CqO357sV.js → _server.ts-Te-2tjen.js} +2 -2
  335. package/studio-dist/server/chunks/{_server.ts-OPrTc7WI.js → _server.ts-ZJufMUl-.js} +2 -2
  336. package/studio-dist/server/chunks/{client-DR3j81J8.js → client-DKCgIuPq.js} +2 -2
  337. package/studio-dist/server/chunks/{error.svelte-NY-X_Qdt.js → error.svelte-gYXatkJM.js} +3 -3
  338. package/studio-dist/server/chunks/{explorer-loader-CP09K03H.js → explorer-loader-fHkiu8Z4.js} +8 -6
  339. package/studio-dist/server/chunks/{http-Dz72j56i.js → http-elrAoEmj.js} +2 -2
  340. package/studio-dist/server/chunks/{internal-y7btLoII.js → internal-C4t8_O0Q.js} +2 -2
  341. package/studio-dist/server/chunks/{lane-transition-lM2ngbbc.js → lane-transition-tca216Ny.js} +10 -3
  342. package/studio-dist/server/chunks/{operations-registry-DKEHmggR.js → operations-registry-C9N47F53.js} +350 -471
  343. package/studio-dist/server/chunks/{stores-Cm-Qj76R.js → stores-CLlSxFBW.js} +2 -2
  344. package/studio-dist/server/chunks/{tasks-sWuEmiGW.js → tasks-Ch-fdBjA.js} +2 -2
  345. package/studio-dist/server/index.js +1 -1
  346. package/studio-dist/server/manifest.js +29 -29
  347. package/dist/cli/canon-docs-2GTOLF7Y.js +0 -26
  348. package/dist/cli/chunk-IGM44F43.js +0 -33
  349. package/dist/cli/conduit-STEBYJTU.js +0 -535
  350. package/dist/cli/conduit-XYYPJYUF.js +0 -319
  351. package/dist/cli/hygiene-QVIG57RZ.js +0 -55
  352. package/studio-dist/client/_app/immutable/chunks/BXnpxR_0.js +0 -1
  353. package/studio-dist/client/_app/immutable/entry/start.BolRa540.js +0 -1
  354. package/studio-dist/client/_app/immutable/nodes/25.B_7VqHJ6.js +0 -39
  355. package/studio-dist/server/chunks/1-ClOr3JN3.js +0 -9
  356. package/studio-dist/server/chunks/30-BHsj4oeh.js +0 -105
@@ -1,8 +1,9 @@
1
1
  import { g as getTasksDb } from './connections2-DyYEcX2h.js';
2
- import { l as loadExplorerBundle } from './explorer-loader-CP09K03H.js';
3
- import './operations-registry-DKEHmggR.js';
2
+ import { l as loadExplorerBundle } from './explorer-loader-fHkiu8Z4.js';
3
+ import './operations-registry-C9N47F53.js';
4
4
  import 'node:fs';
5
5
  import 'node:path';
6
+ import { derivedStatusSqlAt } from '@cleocode/core/store/task-claim';
6
7
  import { computeTaskRollups } from '@cleocode/core/lifecycle/rollup';
7
8
  import { getTaskAccessor } from '@cleocode/core/store/data-accessor';
8
9
  import { listTasks } from '@cleocode/core/tasks/list';
@@ -4075,7 +4076,8 @@ var gateBaseSchema = object({
4075
4076
  req: string().optional(),
4076
4077
  description: string().min(1),
4077
4078
  advisory: boolean().optional(),
4078
- timeoutMs: number().int().positive().optional()
4079
+ timeoutMs: number().int().positive().optional(),
4080
+ repo: string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/).optional()
4079
4081
  });
4080
4082
  /**
4081
4083
  * Zod schema for {@link FileAssertion}.
@@ -4747,6 +4749,351 @@ object({
4747
4749
  message: "breaking entries must include a non-empty `breaking` migration note",
4748
4750
  path: ["breaking"]
4749
4751
  });
4752
+ //#endregion
4753
+ //#region ../contracts/dist/orca-execution.js
4754
+ /**
4755
+ * Local Orca execution contracts, independent of model/provider registration.
4756
+ *
4757
+ * @task T14455
4758
+ * @packageDocumentation
4759
+ */
4760
+ var identifier = string().min(1);
4761
+ /** Orca server agent ids supported by the local routing contract. */
4762
+ var orcaAgentSchema = _enum([
4763
+ "codex",
4764
+ "opencode2",
4765
+ "claude",
4766
+ "grok"
4767
+ ]);
4768
+ /** Project rotation configuration; duplicates and unsupported ids refuse. */
4769
+ var orchestrateOrcaConfigSchema = object({ agents: array(orcaAgentSchema).min(1).refine((agents) => new Set(agents).size === agents.length, "Agent ids must be unique.").default([
4770
+ "codex",
4771
+ "opencode2",
4772
+ "claude"
4773
+ ]) });
4774
+ /** Explicit execution endpoint and caller; never inferred from the newest Run. */
4775
+ var orcaContextSchema = object({
4776
+ runtimeId: identifier,
4777
+ coordinatorHandle: identifier,
4778
+ executionHostId: literal("local")
4779
+ });
4780
+ object({
4781
+ runId: identifier.nullable(),
4782
+ unconfiguredAgents: array(orcaAgentSchema)
4783
+ });
4784
+ /** Canonically prepared CLEO assignment consumed without allocating another session. */
4785
+ var orcaLaunchSchema = object({
4786
+ projectId: identifier,
4787
+ projectRoot: identifier,
4788
+ taskId: identifier,
4789
+ instanceId: identifier,
4790
+ workerSessionId: identifier,
4791
+ agentId: identifier,
4792
+ role: _enum(["worker", "lead"]),
4793
+ protocol: identifier,
4794
+ worktreePath: identifier,
4795
+ worktreeBranch: identifier,
4796
+ projectHash: identifier,
4797
+ lockToken: identifier,
4798
+ prompt: identifier,
4799
+ harness: _enum([
4800
+ "claude-code",
4801
+ "codex",
4802
+ "opencode",
4803
+ "grok",
4804
+ "kimi"
4805
+ ]),
4806
+ leadMailbox: identifier.nullable(),
4807
+ model: identifier.optional(),
4808
+ effort: identifier.optional(),
4809
+ accountId: identifier.optional()
4810
+ });
4811
+ /** Original launch addressing, retained even when a partial receipt supplies ids. */
4812
+ var orcaStartBindingSchema = object({
4813
+ runId: identifier.nullable(),
4814
+ orcaTaskId: identifier.nullable(),
4815
+ retryOf: identifier.nullable()
4816
+ });
4817
+ object({
4818
+ backend: literal("orca"),
4819
+ version: literal(1),
4820
+ revision: number().int().nonnegative(),
4821
+ context: orcaContextSchema,
4822
+ launch: orcaLaunchSchema,
4823
+ promptDigest: string().regex(/^[a-f0-9]{64}$/),
4824
+ workspaceId: identifier,
4825
+ workspaceSelector: identifier,
4826
+ state: _enum([
4827
+ "prepared",
4828
+ "launching",
4829
+ "ready",
4830
+ "turn_unobserved",
4831
+ "outcome_unknown",
4832
+ "stop_pending",
4833
+ "stop_unknown",
4834
+ "stopped",
4835
+ "failed",
4836
+ "circuit_broken"
4837
+ ]),
4838
+ runId: identifier.nullable(),
4839
+ orcaTaskId: identifier.nullable(),
4840
+ dispatchId: identifier.nullable(),
4841
+ retryOf: identifier.nullable(),
4842
+ startBinding: orcaStartBindingSchema.optional(),
4843
+ startRequestKey: string().uuid().optional(),
4844
+ startRequestId: identifier.nullable(),
4845
+ stopRequestKey: string().uuid().optional(),
4846
+ stopRequestId: identifier.nullable(),
4847
+ stopHelperEvidence: literal("enumerated").optional(),
4848
+ failureCount: number().int().nonnegative(),
4849
+ resourceState: string(),
4850
+ lastReceipt: string().nullable(),
4851
+ lastError: string().nullable(),
4852
+ startRefusal: literal("agent_unconfigured").optional(),
4853
+ observedAt: string()
4854
+ });
4855
+ object({
4856
+ event: object({
4857
+ messageId: identifier,
4858
+ runtimeId: identifier,
4859
+ runId: identifier,
4860
+ orcaTaskId: identifier,
4861
+ dispatchId: identifier,
4862
+ senderHandle: identifier,
4863
+ outcome: _enum(["succeeded", "failed"]),
4864
+ body: string(),
4865
+ reportPath: identifier
4866
+ }),
4867
+ manifestId: identifier,
4868
+ manifestDigest: string().regex(/^[a-f0-9]{64}$/),
4869
+ reportText: string().min(1).max(65536),
4870
+ reportDigest: string().regex(/^[a-f0-9]{64}$/),
4871
+ ingestedAt: string().datetime()
4872
+ });
4873
+ /** Durable AgentMBX outbox state for the first validated report of one Dispatch. */
4874
+ var orcaReportDeliverySchema = object({
4875
+ key: identifier,
4876
+ mailbox: identifier.nullable(),
4877
+ state: _enum(["pending", "delivered"]),
4878
+ messageId: identifier.nullable(),
4879
+ deliveredAt: string().datetime().nullable(),
4880
+ lastError: string().nullable()
4881
+ });
4882
+ object({
4883
+ resourceRelease: object({
4884
+ dispatchId: identifier,
4885
+ releasedAt: string().datetime(),
4886
+ receiptDigest: string().regex(/^[a-f0-9]{64}$/),
4887
+ receipt: identifier
4888
+ }).optional(),
4889
+ retiredAt: string().datetime().optional(),
4890
+ reportDelivery: orcaReportDeliverySchema.optional()
4891
+ });
4892
+ object({
4893
+ id: identifier,
4894
+ run_id: string().nullable(),
4895
+ delivery_contract: string(),
4896
+ from_handle: string(),
4897
+ to_handle: string(),
4898
+ type: string(),
4899
+ body: string(),
4900
+ payload: string().nullable(),
4901
+ sender_pane_key: string().nullable()
4902
+ });
4903
+ object({
4904
+ ok: literal(true),
4905
+ _meta: object({ runtimeId: identifier }),
4906
+ result: object({
4907
+ messages: array(json()).optional(),
4908
+ dispatch: object({
4909
+ id: identifier,
4910
+ run_id: identifier,
4911
+ task_id: identifier,
4912
+ assignee_handle: identifier,
4913
+ assignee_pane_key: string().nullable(),
4914
+ status: string()
4915
+ }).optional()
4916
+ })
4917
+ });
4918
+ object({
4919
+ taskId: identifier,
4920
+ dispatchId: identifier,
4921
+ outcome: _enum(["succeeded", "failed"]),
4922
+ reportPath: identifier
4923
+ });
4924
+ object({
4925
+ action: _enum([
4926
+ "show",
4927
+ "read",
4928
+ "recover-start",
4929
+ "recover-stop",
4930
+ "retry",
4931
+ "stop",
4932
+ "ingest-report",
4933
+ "relay-report"
4934
+ ]),
4935
+ recordId: identifier,
4936
+ cursor: identifier.optional(),
4937
+ messageId: identifier.optional()
4938
+ }).refine(({ action, cursor }) => cursor === void 0 || action === "read", {
4939
+ message: "A source-pinned cursor is accepted only for read.",
4940
+ path: ["cursor"]
4941
+ }).refine(({ action, messageId }) => action === "ingest-report" === (messageId !== void 0), {
4942
+ message: "ingest-report requires an exact message id; other actions do not accept one.",
4943
+ path: ["messageId"]
4944
+ });
4945
+ var effectSchema = object({
4946
+ kind: string(),
4947
+ role: string().optional(),
4948
+ action: string().optional(),
4949
+ id: string().optional()
4950
+ });
4951
+ var selectionSchema = object({
4952
+ agent: string().nullable().optional(),
4953
+ model: string().nullable().optional(),
4954
+ effort: string().nullable().optional()
4955
+ });
4956
+ object({
4957
+ ok: boolean(),
4958
+ _meta: object({ runtimeId: string().nullable() }).optional(),
4959
+ error: object({
4960
+ code: string(),
4961
+ message: string(),
4962
+ data: object({
4963
+ requestId: identifier.optional(),
4964
+ orchestrationRequestId: identifier.optional(),
4965
+ dispatchId: identifier.optional()
4966
+ }).optional()
4967
+ }).optional(),
4968
+ result: object({
4969
+ state: string().optional(),
4970
+ requestId: identifier.optional(),
4971
+ mutation: object({
4972
+ requestId: identifier.optional(),
4973
+ replayed: boolean().optional()
4974
+ }).optional(),
4975
+ stage: string().optional(),
4976
+ turnStart: string().optional(),
4977
+ runId: identifier.optional(),
4978
+ run: object({ id: identifier }).nullable().optional(),
4979
+ taskId: identifier.optional(),
4980
+ dispatchId: identifier.optional(),
4981
+ failureCount: number().int().nonnegative().optional(),
4982
+ effects: array(effectSchema).optional(),
4983
+ residualResources: array(effectSchema).optional(),
4984
+ launch: object({ effective: selectionSchema.optional() }).optional(),
4985
+ lastError: string().nullable().optional(),
4986
+ processAction: string().optional(),
4987
+ helpers: array(object({
4988
+ dispatchId: identifier.optional(),
4989
+ creatorDispatchId: identifier.optional(),
4990
+ outcome: string(),
4991
+ keptOpenBy: identifier.optional(),
4992
+ state: string().optional(),
4993
+ lastError: string().nullable().optional()
4994
+ })).optional(),
4995
+ helperStopError: string().nullable().optional(),
4996
+ status: string().optional(),
4997
+ terminal: object({
4998
+ handle: identifier,
4999
+ connected: boolean(),
5000
+ writable: boolean(),
5001
+ executionHostId: identifier
5002
+ }).optional(),
5003
+ runtime: object({
5004
+ runtimeId: identifier,
5005
+ reachable: boolean(),
5006
+ state: string(),
5007
+ capabilities: array(string())
5008
+ }).optional(),
5009
+ worktree: object({
5010
+ id: identifier,
5011
+ path: identifier,
5012
+ branch: identifier,
5013
+ hostId: identifier,
5014
+ address: object({ worktree: identifier }).optional()
5015
+ }).optional(),
5016
+ dispatch: object({
5017
+ id: identifier,
5018
+ runId: identifier,
5019
+ taskId: identifier,
5020
+ creatorDispatchId: identifier.nullable().optional(),
5021
+ failureCount: number().int().nonnegative()
5022
+ }).optional(),
5023
+ worker: object({
5024
+ dispatchId: identifier,
5025
+ runtimeEpoch: identifier,
5026
+ state: string(),
5027
+ stage: string(),
5028
+ worktreeId: identifier.nullable()
5029
+ }).optional(),
5030
+ observation: object({
5031
+ status: string(),
5032
+ exactWorker: boolean().optional()
5033
+ }).optional(),
5034
+ projection: object({ resource: object({
5035
+ state: string(),
5036
+ terminalState: string(),
5037
+ ownerDispatchId: identifier.optional(),
5038
+ releaseState: string().optional()
5039
+ }).optional() }).optional()
5040
+ }).optional()
5041
+ });
5042
+ object({
5043
+ schemaVersion: number().int().positive(),
5044
+ commands: array(object({
5045
+ command: identifier,
5046
+ flags: array(string())
5047
+ }))
5048
+ });
5049
+ var accountProviderSchema = object({
5050
+ accounts: array(object({})),
5051
+ activeAccountId: identifier.nullable()
5052
+ });
5053
+ object({
5054
+ ok: literal(true),
5055
+ _meta: object({ runtimeId: identifier }),
5056
+ result: object({
5057
+ codex: accountProviderSchema,
5058
+ opencode: accountProviderSchema,
5059
+ claude: accountProviderSchema
5060
+ })
5061
+ });
5062
+ //#endregion
5063
+ //#region ../contracts/dist/config/worker-policy.js
5064
+ /**
5065
+ * Project worker rules; command declarations remain in project-context.json.
5066
+ *
5067
+ * @remarks At most 16 single-line instructions, each at most 512 characters;
5068
+ * control characters and leading headings are rejected, never rendered.
5069
+ * @example
5070
+ * ```typescript
5071
+ * const policy = projectWorkerPolicySchema.parse({
5072
+ * verification: { full: 'ci', local: 'single-file' },
5073
+ * });
5074
+ * ```
5075
+ * @public
5076
+ */
5077
+ var projectWorkerPolicySchema = object({
5078
+ verification: object({
5079
+ full: _enum(["local", "ci"]),
5080
+ local: _enum(["single-file", "affected"])
5081
+ }).strict().optional(),
5082
+ instructions: array(string().min(1).max(512).regex(/\S/).regex(/^(?!\s*#)[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+$/u, "Instructions must be single-line text without control characters or a leading #")).max(16).optional()
5083
+ }).strict();
5084
+ /**
5085
+ * Manifest entry for `<project>/.cleo/config.json` (project-scoped CleoConfig).
5086
+ *
5087
+ * Project scope; precedence 20 — wins over global. Schema-validated.
5088
+ *
5089
+ * @task T9876
5090
+ */
5091
+ ({
5092
+ schema: object({ orchestrate: object({
5093
+ workerPolicy: projectWorkerPolicySchema.optional(),
5094
+ orca: orchestrateOrcaConfigSchema.optional()
5095
+ }).passthrough().optional() }).passthrough()
5096
+ });
4750
5097
  object({
4751
5098
  id: string().min(1),
4752
5099
  scope: union([
@@ -4930,6 +5277,151 @@ object({
4930
5277
  allHealthy: boolean()
4931
5278
  }).strict();
4932
5279
  //#endregion
5280
+ //#region ../contracts/dist/docs/modernize.js
5281
+ /**
5282
+ * Docs modernize contract — the plan and receipt of `cleo docs modernize`.
5283
+ *
5284
+ * `cleo docs modernize <path>` turns a messy docs folder into clean, linked
5285
+ * CleoDocs. A dry run produces a {@link DocsModernizePlan}: one
5286
+ * {@link DocsModernizePlanRow} per markdown or text file, carrying the kind,
5287
+ * the stable slug, the disposition and the reasons (including every System
5288
+ * One judgment that was asked). `--apply` executes a plan and writes a
5289
+ * {@link DocsModernizeReceipt}; every receipt op records the state it
5290
+ * replaced, so `--rollback <runId>` can reverse the run.
5291
+ *
5292
+ * Types only — the planner and applier live in
5293
+ * `packages/core/src/docs/modernize/`.
5294
+ *
5295
+ * @task T14113
5296
+ * @epic T14106
5297
+ */
5298
+ /** What modernize does with one file. */
5299
+ var DOCS_MODERNIZE_DISPOSITIONS = [
5300
+ "keep",
5301
+ "rename",
5302
+ "merge-into",
5303
+ "delete"
5304
+ ];
5305
+ /** The reversible steps an apply run takes. */
5306
+ var DOCS_MODERNIZE_OPS = [
5307
+ "ingest",
5308
+ "merge",
5309
+ "fold",
5310
+ "supersede",
5311
+ "write-file",
5312
+ "remove-file",
5313
+ "link",
5314
+ "rekind",
5315
+ "reslug",
5316
+ "link-task"
5317
+ ];
5318
+ var judgmentSchema = object({
5319
+ question: _enum(["classify", "merge"]),
5320
+ site: string(),
5321
+ mode: _enum([
5322
+ "off",
5323
+ "shadow",
5324
+ "on"
5325
+ ]),
5326
+ ruleAnswer: string(),
5327
+ decidedAnswer: string().nullable(),
5328
+ decidedConfidence: number().nullable(),
5329
+ source: _enum([
5330
+ "provider",
5331
+ "cache",
5332
+ "fallback"
5333
+ ]),
5334
+ acted: string()
5335
+ });
5336
+ var relPath = string().min(1).max(1024);
5337
+ object({
5338
+ root: string().min(1),
5339
+ generatedAt: string(),
5340
+ mode: _enum(["tree", "store-only"]),
5341
+ counts: record(_enum(DOCS_MODERNIZE_DISPOSITIONS), number()),
5342
+ rows: array(object({
5343
+ path: relPath,
5344
+ sha256: string().regex(/^[0-9a-f]{64}$/),
5345
+ kind: string().min(1),
5346
+ slug: string().regex(/^[a-z0-9][a-z0-9-]*$/),
5347
+ title: string(),
5348
+ disposition: _enum(DOCS_MODERNIZE_DISPOSITIONS),
5349
+ target: string().min(1).max(1024).nullable(),
5350
+ reasons: array(string()),
5351
+ judgments: array(judgmentSchema),
5352
+ ownerTasks: array(string().regex(/^[TD]\d+$/)),
5353
+ category: string(),
5354
+ refs: array(string()),
5355
+ overridden: boolean(),
5356
+ covers: array(string()),
5357
+ baselineRemove: boolean()
5358
+ })),
5359
+ linkFixes: array(object({
5360
+ kind: literal("link-fix"),
5361
+ path: relPath,
5362
+ href: string().min(1).max(2048),
5363
+ newHref: string().min(1).max(2048),
5364
+ base: literal("repo").optional(),
5365
+ sha256: string().regex(/^[0-9a-f]{64}$/).optional()
5366
+ })).optional(),
5367
+ repoRoot: string().min(1).optional()
5368
+ });
5369
+ record(relPath, object({
5370
+ disposition: _enum(DOCS_MODERNIZE_DISPOSITIONS),
5371
+ target: string().min(1).max(1024).nullable().optional(),
5372
+ reason: string().min(1),
5373
+ kind: string().min(1).optional(),
5374
+ slug: string().regex(/^[a-z0-9][a-z0-9-]*$/).optional(),
5375
+ covers: array(string()).optional()
5376
+ }));
5377
+ /** Shape check for one receipt op. */
5378
+ var receiptOpSchema = object({
5379
+ op: _enum(DOCS_MODERNIZE_OPS),
5380
+ state: _enum([
5381
+ "pending",
5382
+ "done",
5383
+ "reversed"
5384
+ ]),
5385
+ slug: string().nullable(),
5386
+ path: relPath.nullable(),
5387
+ target: string().nullable(),
5388
+ attachmentId: string().nullable(),
5389
+ ownerId: string().nullable(),
5390
+ beforeSha256: string().regex(/^[0-9a-f]{64}$/).nullable(),
5391
+ afterSha256: string().regex(/^[0-9a-f]{64}$/).nullable(),
5392
+ prior: object({
5393
+ lifecycleStatus: string().nullable().optional(),
5394
+ supersededBy: string().nullable().optional(),
5395
+ supersedes: string().nullable().optional(),
5396
+ previousAttachmentId: string().nullable().optional(),
5397
+ newAttachmentId: string().nullable().optional(),
5398
+ linkTargets: array(string()).optional(),
5399
+ kind: string().nullable().optional()
5400
+ }).optional(),
5401
+ base: literal("repo").optional()
5402
+ });
5403
+ receiptOpSchema.extend({ i: number().int().min(0) });
5404
+ object({
5405
+ runId: string().regex(/^dm-[\w-]+$/),
5406
+ root: string().min(1),
5407
+ appliedAt: string(),
5408
+ planSha256: string(),
5409
+ edgeCount: number(),
5410
+ rolledBackAt: string().nullable(),
5411
+ blobs: array(object({
5412
+ path: relPath,
5413
+ sha256: string()
5414
+ })),
5415
+ moves: array(object({
5416
+ from: relPath,
5417
+ to: relPath
5418
+ })),
5419
+ deleted: array(relPath),
5420
+ ops: array(receiptOpSchema),
5421
+ durationMs: number().optional(),
5422
+ repoRoot: string().min(1).optional()
5423
+ });
5424
+ //#endregion
4933
5425
  //#region ../contracts/dist/docs/provenance.js
4934
5426
  /**
4935
5427
  * Docs Provenance Graph contract — cross-entity nodes + edges.
@@ -5186,7 +5678,8 @@ Object.freeze([
5186
5678
  "Context",
5187
5679
  "State",
5188
5680
  "Next-Steps"
5189
- ]
5681
+ ],
5682
+ storeOnly: true
5190
5683
  },
5191
5684
  {
5192
5685
  kind: "note",
@@ -5253,6 +5746,42 @@ Object.freeze([
5253
5746
  "Schedule",
5254
5747
  "Detection"
5255
5748
  ]
5749
+ },
5750
+ {
5751
+ kind: "guide",
5752
+ label: "Guide",
5753
+ description: "How-to guide: the steps to get a task done (T14107)",
5754
+ defaultOwnerKind: "project",
5755
+ publishDir: "docs/guide",
5756
+ requiresEntityId: false,
5757
+ requiredSections: []
5758
+ },
5759
+ {
5760
+ kind: "concept",
5761
+ label: "Concept",
5762
+ description: "Explanation of how and why the product works (T14107)",
5763
+ defaultOwnerKind: "project",
5764
+ publishDir: "docs/concept",
5765
+ requiresEntityId: false,
5766
+ requiredSections: []
5767
+ },
5768
+ {
5769
+ kind: "reference",
5770
+ label: "Reference",
5771
+ description: "Reference: APIs, CLI, registries and formats (T14107)",
5772
+ defaultOwnerKind: "project",
5773
+ publishDir: "docs/reference",
5774
+ requiresEntityId: false,
5775
+ requiredSections: []
5776
+ },
5777
+ {
5778
+ kind: "migration",
5779
+ label: "Migration",
5780
+ description: "Upgrade or data-migration guide (T14107)",
5781
+ defaultOwnerKind: "project",
5782
+ publishDir: "docs/migration",
5783
+ requiresEntityId: false,
5784
+ requiredSections: []
5256
5785
  }
5257
5786
  ].map((d) => d.kind));
5258
5787
  //#endregion
@@ -5359,6 +5888,15 @@ var ExitCode;
5359
5888
  * (`details.expected`). @task T12800
5360
5889
  */
5361
5890
  ExitCode[ExitCode["TASK_RENAMED"] = 26] = "TASK_RENAMED";
5891
+ /**
5892
+ * A MUTATION came from an unqualified caller (no `CLEO_AGENT_ID`, no
5893
+ * `CLEO_SESSION_ID`) inside a harness session whose provider key has no
5894
+ * binding of its own while two or more agents of that harness hold live
5895
+ * sessions: which agent is calling cannot be told, so the operation refuses
5896
+ * rather than act as one of them. LAFS code `E_SESSION_AMBIGUOUS`; the
5897
+ * details name the live agents. @task T14269
5898
+ */
5899
+ ExitCode[ExitCode["SESSION_AMBIGUOUS"] = 27] = "SESSION_AMBIGUOUS";
5362
5900
  ExitCode[ExitCode["SESSION_EXISTS"] = 30] = "SESSION_EXISTS";
5363
5901
  ExitCode[ExitCode["SESSION_NOT_FOUND"] = 31] = "SESSION_NOT_FOUND";
5364
5902
  ExitCode[ExitCode["SCOPE_CONFLICT"] = 32] = "SCOPE_CONFLICT";
@@ -5644,6 +6182,17 @@ discriminatedUnion("kind", [
5644
6182
  componentPrNumber: number().int().positive().optional(),
5645
6183
  repo: string().regex(/^[a-z0-9._-]+\/[a-z0-9._-]+$/).optional()
5646
6184
  }),
6185
+ object({
6186
+ kind: literal("ci-run"),
6187
+ runId: number().int().positive("ci-run atom requires a positive integer run id")
6188
+ }),
6189
+ object({
6190
+ kind: literal("deploy"),
6191
+ provider: string().regex(/^[a-z0-9][a-z0-9._-]*$/, "deploy atom provider must be a lowercase name"),
6192
+ deploymentId: string().regex(/^[^\s@|]+$/, "deploy atom requires a deployment id"),
6193
+ sha: string().regex(/^[0-9a-f]{7,40}$/, "deploy atom sha must be 7-40 lowercase hex chars"),
6194
+ probeUrl: string().regex(/^https?:\/\/\S+$/, "deploy atom probe url must start with http:// or https://")
6195
+ }),
5647
6196
  object({
5648
6197
  kind: literal("loc-drop"),
5649
6198
  fromLines: number().int().nonnegative("loc-drop fromLines must be ≥ 0"),
@@ -6463,7 +7012,7 @@ Object.freeze([
6463
7012
  "D32",
6464
7013
  "D39",
6465
7014
  "D50"
6466
- ], "superseded is sticky; lifecycle transitions follow a matrix")),
7015
+ ], "superseded is sticky; lifecycle transitions follow a matrix", ["docs_attachments", "conduit_attachments"])),
6467
7016
  rule("docs.versions.append-only", "T13355", "conduit_attachment_versions", ["*"], [], "version rows are append-only and unique by uid; inserts never conflict, so no merge rule fires"),
6468
7017
  rule("docs.approvals.append-only", "T13355", "conduit_attachment_approvals", ["*"], [], "approval rows are append-only; a revoke is a tombstone row, never an UPDATE/DELETE"),
6469
7018
  rule("docs.doc-alias.append-only", "T13355", "conduit_doc_slug_aliases", ["*"], [], "alias rows carry natural identity over (slug, doc_uid); identical aliases merge to one row"),
@@ -6490,6 +7039,25 @@ Object.freeze([
6490
7039
  sites: [],
6491
7040
  reason: "two devices adopting one legacy doc must mint one uid: the shell takes the legacy birth and sentinel facts, so (uid, birth_fp) converge and receive places the peer copy as a duplicate; a lost local write is refused loudly at the writer"
6492
7041
  },
7042
+ {
7043
+ id: "docs.docs-migration.idempotent-import",
7044
+ class: "identity-layer",
7045
+ tables: ["conduit_attachments", "conduit_doc_migration_ledger"],
7046
+ sites: [],
7047
+ reason: "the docs migration imports each legacy doc once: natural uids over the slug make a re-run a verified no-op, and receipts are never updated or deleted"
7048
+ },
7049
+ {
7050
+ id: "docs.slug.rename-keeps-alias",
7051
+ class: "identity-layer",
7052
+ tables: [
7053
+ "docs_attachments",
7054
+ "conduit_attachments",
7055
+ "docs_wikilinks",
7056
+ "conduit_doc_slug_aliases"
7057
+ ],
7058
+ sites: [],
7059
+ reason: "a rename moves the live slug on docs_attachments and conduit_attachments in one transaction and records the old slug as an alias of the immutable doc uid, so every replica resolves the old and the new slug to one doc"
7060
+ },
6493
7061
  implemented(rule("docs.decision-adr-links.revoke-monotonic", "T13597", "decision_adr_links", ["status", "revoked_by"], [], "status flips linked→revoked exactly once (the row is the tombstone, never DELETEd); the merge engine refuses a non-absorbing status write onto a revoked row, so a concurrent re-link can never resurrect the pair")),
6494
7062
  {
6495
7063
  id: "identity.local-minting",
@@ -7927,7 +8495,7 @@ _enum([
7927
8495
  "completed-unverified"
7928
8496
  ]).options;
7929
8497
  //#endregion
7930
- //#region ../contracts/dist/tasks.js
8498
+ //#region ../contracts/dist/tasks/index.js
7931
8499
  /**
7932
8500
  * Shared task-domain result shapes for the operations layer.
7933
8501
  *
@@ -9449,12 +10017,12 @@ function resolveIncludeCancelled(options) {
9449
10017
  */
9450
10018
  function _computeEpicProgress(db, options = {}) {
9451
10019
  const epicFilter = resolveIncludeCancelled(options) ? `status != 'archived'` : `status NOT IN ('archived','cancelled')`;
9452
- return db.prepare(`SELECT id, title, status FROM tasks WHERE type = 'epic' AND ${epicFilter} ORDER BY id`).all().map((epic) => {
9453
- const children = db.prepare(`SELECT status, COUNT(*) as cnt
9454
- FROM tasks
10020
+ return db.prepare(`SELECT id, title, ${derivedStatusSqlAt()} AS status FROM tasks_tasks WHERE type = 'epic' AND ${epicFilter} ORDER BY id`).all().map((epic) => {
10021
+ const children = db.prepare(`SELECT ${derivedStatusSqlAt()} AS status, COUNT(*) as cnt
10022
+ FROM tasks_tasks
9455
10023
  WHERE parent_id = ?
9456
10024
  AND status != 'archived'
9457
- GROUP BY status`).all(epic.id);
10025
+ GROUP BY 1`).all(epic.id);
9458
10026
  const childMap = Object.fromEntries(children.map((r) => [r.status, r.cnt]));
9459
10027
  const total = Object.values(childMap).reduce((a, b) => a + b, 0);
9460
10028
  return {
@@ -9615,6 +10183,39 @@ async function loadExplorerSafe(ctx, includeArchived) {
9615
10183
  return emptyExplorerBundle();
9616
10184
  }
9617
10185
  }
10186
+ /**
10187
+ * Dashboard counts from `tasks_tasks` (T14330: never the empty legacy
10188
+ * `tasks` table). `active` and `pending` are counted as tasks read: from the
10189
+ * claim lease (T14268).
10190
+ *
10191
+ * Exported for tests (T14330).
10192
+ *
10193
+ * @param db - The project store connection.
10194
+ * @returns The dashboard stats.
10195
+ */
10196
+ function _computeDashboardStats(db) {
10197
+ const countByStatus = db.prepare(`SELECT ${derivedStatusSqlAt()} AS status, COUNT(*) as cnt FROM tasks_tasks GROUP BY 1`).all();
10198
+ const countByPriority = db.prepare(`SELECT priority, COUNT(*) as cnt FROM tasks_tasks WHERE status != 'archived' GROUP BY priority`).all();
10199
+ const countByType = db.prepare(`SELECT type, COUNT(*) as cnt FROM tasks_tasks WHERE status != 'archived' GROUP BY type`).all();
10200
+ const statusMap = Object.fromEntries(countByStatus.map((r) => [r.status, r.cnt]));
10201
+ const priorityMap = Object.fromEntries(countByPriority.map((r) => [r.priority, r.cnt]));
10202
+ const typeMap = Object.fromEntries(countByType.map((r) => [r.type, r.cnt]));
10203
+ return {
10204
+ total: (statusMap["pending"] ?? 0) + (statusMap["active"] ?? 0) + (statusMap["done"] ?? 0) + (statusMap["cancelled"] ?? 0),
10205
+ pending: statusMap["pending"] ?? 0,
10206
+ active: statusMap["active"] ?? 0,
10207
+ done: statusMap["done"] ?? 0,
10208
+ cancelled: statusMap["cancelled"] ?? 0,
10209
+ archived: statusMap["archived"] ?? 0,
10210
+ critical: priorityMap["critical"] ?? 0,
10211
+ high: priorityMap["high"] ?? 0,
10212
+ medium: priorityMap["medium"] ?? 0,
10213
+ low: priorityMap["low"] ?? 0,
10214
+ epics: typeMap["epic"] ?? 0,
10215
+ tasks: typeMap["task"] ?? 0,
10216
+ subtasks: typeMap["subtask"] ?? 0
10217
+ };
10218
+ }
9618
10219
  var load = async ({ locals, url }) => {
9619
10220
  const db = getTasksDb(locals.projectCtx);
9620
10221
  const cancelledParam = url.searchParams.get("cancelled") === "1";
@@ -9635,30 +10236,10 @@ var load = async ({ locals, url }) => {
9635
10236
  explorer: await explorerPromise
9636
10237
  };
9637
10238
  try {
9638
- const countByStatus = db.prepare("SELECT status, COUNT(*) as cnt FROM tasks GROUP BY status").all();
9639
- const countByPriority = db.prepare(`SELECT priority, COUNT(*) as cnt FROM tasks WHERE status != 'archived' GROUP BY priority`).all();
9640
- const countByType = db.prepare(`SELECT type, COUNT(*) as cnt FROM tasks WHERE status != 'archived' GROUP BY type`).all();
9641
- const statusMap = Object.fromEntries(countByStatus.map((r) => [r.status, r.cnt]));
9642
- const priorityMap = Object.fromEntries(countByPriority.map((r) => [r.priority, r.cnt]));
9643
- const typeMap = Object.fromEntries(countByType.map((r) => [r.type, r.cnt]));
9644
- const stats = {
9645
- total: (statusMap["pending"] ?? 0) + (statusMap["active"] ?? 0) + (statusMap["done"] ?? 0) + (statusMap["cancelled"] ?? 0),
9646
- pending: statusMap["pending"] ?? 0,
9647
- active: statusMap["active"] ?? 0,
9648
- done: statusMap["done"] ?? 0,
9649
- cancelled: statusMap["cancelled"] ?? 0,
9650
- archived: statusMap["archived"] ?? 0,
9651
- critical: priorityMap["critical"] ?? 0,
9652
- high: priorityMap["high"] ?? 0,
9653
- medium: priorityMap["medium"] ?? 0,
9654
- low: priorityMap["low"] ?? 0,
9655
- epics: typeMap["epic"] ?? 0,
9656
- tasks: typeMap["task"] ?? 0,
9657
- subtasks: typeMap["subtask"] ?? 0
9658
- };
10239
+ const stats = _computeDashboardStats(db);
9659
10240
  const recentStatusFilter = showArchived ? `status IN ('active', 'pending', 'done', 'archived')` : `status IN ('active', 'pending', 'done')`;
9660
- const recentTasks = db.prepare(`SELECT id, title, status, priority, type, pipeline_stage, updated_at
9661
- FROM tasks
10241
+ const recentTasks = db.prepare(`SELECT id, title, ${derivedStatusSqlAt()} AS status, priority, type, pipeline_stage, updated_at
10242
+ FROM tasks_tasks
9662
10243
  WHERE ${recentStatusFilter}
9663
10244
  ORDER BY updated_at DESC
9664
10245
  LIMIT 20`).all().map((row) => ({
@@ -9698,6 +10279,7 @@ var load = async ({ locals, url }) => {
9698
10279
  var _page_server_ts = /*#__PURE__*/Object.freeze({
9699
10280
  __proto__: null,
9700
10281
  __resetLegacyDeferredParamWarningForTests: __resetLegacyDeferredParamWarningForTests,
10282
+ _computeDashboardStats: _computeDashboardStats,
9701
10283
  _computeEpicProgress: _computeEpicProgress,
9702
10284
  _computeEpicProgressViaRollup: _computeEpicProgressViaRollup,
9703
10285
  _epicRowFromRollups: _epicRowFromRollups,
@@ -9706,9 +10288,9 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
9706
10288
 
9707
10289
  const index = 25;
9708
10290
  let component_cache;
9709
- const component = async () => component_cache ??= (await import('./_page.svelte-V7BTZinR.js')).default;
10291
+ const component = async () => component_cache ??= (await import('./_page.svelte-C3zGtsso.js')).default;
9710
10292
  const server_id = "src/routes/tasks/+page.server.ts";
9711
- const imports = ["_app/immutable/nodes/25.B_7VqHJ6.js","_app/immutable/chunks/DGftG5oL.js","_app/immutable/chunks/Js_lZuOv.js","_app/immutable/chunks/BXnpxR_0.js","_app/immutable/chunks/Dv66614U.js","_app/immutable/chunks/EZwHPWle.js","_app/immutable/chunks/CqgtdAx_.js","_app/immutable/chunks/B8WnZMYa.js","_app/immutable/chunks/rUtW7Hx6.js","_app/immutable/chunks/Cge6qiwc.js","_app/immutable/chunks/DZrdToAH.js","_app/immutable/chunks/CTLGzgdN.js"];
10293
+ const imports = ["_app/immutable/nodes/25.BlW7cJd4.js","_app/immutable/chunks/DGftG5oL.js","_app/immutable/chunks/DtBpLaMM.js","_app/immutable/chunks/C2a5FdIt.js","_app/immutable/chunks/DdIqZ0F-.js","_app/immutable/chunks/h4IOtB0S.js","_app/immutable/chunks/CqgtdAx_.js","_app/immutable/chunks/B8WnZMYa.js","_app/immutable/chunks/rUtW7Hx6.js","_app/immutable/chunks/Cge6qiwc.js","_app/immutable/chunks/DZrdToAH.js","_app/immutable/chunks/CTLGzgdN.js"];
9712
10294
  const stylesheets = ["_app/immutable/assets/StatBlock.DX6OXz7z.css","_app/immutable/assets/no-face-up.BlswZ73M.css","_app/immutable/assets/Tabs.CU9_rsWl.css","_app/immutable/assets/ui.CH-9N9-0.css","_app/immutable/assets/tasks.BZWJL4jq.css","_app/immutable/assets/25.BtvG5YXz.css"];
9713
10295
  const fonts = [];
9714
10296
 
@@ -9724,4 +10306,4 @@ var _25 = /*#__PURE__*/Object.freeze({
9724
10306
  });
9725
10307
 
9726
10308
  export { TASK_STATUSES as T, _25 as _ };
9727
- //# sourceMappingURL=25-bm3BDSum.js.map
10309
+ //# sourceMappingURL=25-Cu45aO6X.js.map