@unbrained/pm-cli 2026.7.6 → 2026.7.8

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 (688) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/cli/commands/annotation-command.d.ts +1 -0
  3. package/dist/cli/commands/annotation-command.js +29 -2
  4. package/dist/cli/commands/annotation-command.js.map +1 -1
  5. package/dist/cli/commands/comments.js +3 -4
  6. package/dist/cli/commands/comments.js.map +1 -1
  7. package/dist/cli/commands/completion.js +10 -2
  8. package/dist/cli/commands/completion.js.map +1 -1
  9. package/dist/cli/commands/context.d.ts +1 -0
  10. package/dist/cli/commands/context.js +4 -4
  11. package/dist/cli/commands/context.js.map +1 -1
  12. package/dist/cli/commands/extension/bundled-catalog.d.ts +3 -0
  13. package/dist/cli/commands/extension/bundled-catalog.js +38 -28
  14. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  15. package/dist/cli/commands/extension/install-sources.js +81 -18
  16. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  17. package/dist/cli/commands/extension.d.ts +23 -19
  18. package/dist/cli/commands/extension.js +167 -57
  19. package/dist/cli/commands/extension.js.map +1 -1
  20. package/dist/cli/commands/health.js +9 -5
  21. package/dist/cli/commands/health.js.map +1 -1
  22. package/dist/cli/commands/learnings.js +5 -3
  23. package/dist/cli/commands/learnings.js.map +1 -1
  24. package/dist/cli/commands/notes.js +5 -3
  25. package/dist/cli/commands/notes.js.map +1 -1
  26. package/dist/cli/commands/reindex.js +4 -3
  27. package/dist/cli/commands/reindex.js.map +1 -1
  28. package/dist/cli/commands/search.js +4 -4
  29. package/dist/cli/commands/search.js.map +1 -1
  30. package/dist/cli/commands/test.d.ts +9 -0
  31. package/dist/cli/commands/test.js +144 -105
  32. package/dist/cli/commands/test.js.map +1 -1
  33. package/dist/cli/extension-command-help.js +10 -2
  34. package/dist/cli/extension-command-help.js.map +1 -1
  35. package/dist/cli/help-content.js +28 -2
  36. package/dist/cli/help-content.js.map +1 -1
  37. package/dist/cli/register-list-query.d.ts +1 -1
  38. package/dist/cli/register-list-query.js +19 -27
  39. package/dist/cli/register-list-query.js.map +1 -1
  40. package/dist/cli/register-operations.d.ts +0 -8
  41. package/dist/cli/register-operations.js +41 -46
  42. package/dist/cli/register-operations.js.map +1 -1
  43. package/dist/cli/register-setup.js +119 -13
  44. package/dist/cli/register-setup.js.map +1 -1
  45. package/dist/cli/registration-helpers.d.ts +5 -1
  46. package/dist/cli/registration-helpers.js +14 -2
  47. package/dist/cli/registration-helpers.js.map +1 -1
  48. package/dist/cli-bundle/chunks/append-CDPAYYSB.js +11 -0
  49. package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js → append-RSPHC423.js} +8 -9
  50. package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js → chunk-2BVD4ZD2.js} +288 -233
  51. package/dist/cli-bundle/chunks/chunk-2BVD4ZD2.js.map +7 -0
  52. package/dist/cli-bundle/chunks/{chunk-TKD5VCTD.js → chunk-2RADY7IB.js} +517 -195
  53. package/dist/cli-bundle/chunks/chunk-2RADY7IB.js.map +1 -0
  54. package/dist/cli-bundle/chunks/{chunk-COSPOP7H.js → chunk-3FRNNVWY.js} +518 -196
  55. package/dist/cli-bundle/chunks/chunk-3FRNNVWY.js.map +7 -0
  56. package/dist/cli-bundle/chunks/{chunk-24YG75HI.js → chunk-3FUXM574.js} +8 -8
  57. package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js → chunk-3SHDAKMF.js} +3 -3
  58. package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js → chunk-3UXIMY62.js} +4 -6
  59. package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js.map → chunk-3UXIMY62.js.map} +1 -1
  60. package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js → chunk-3V5C7PUH.js} +2 -2
  61. package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js → chunk-3YJDIJIE.js} +4 -6
  62. package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js.map → chunk-3YJDIJIE.js.map} +1 -1
  63. package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js → chunk-4I7KS5ES.js} +2 -2
  64. package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js → chunk-4OCWJ2AP.js} +13 -17
  65. package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js.map → chunk-4OCWJ2AP.js.map} +1 -1
  66. package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js → chunk-5STY7NVM.js} +8 -8
  67. package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js → chunk-5VAZHYVQ.js} +2 -2
  68. package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js → chunk-6FU5BVRB.js} +12 -14
  69. package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js.map → chunk-6FU5BVRB.js.map} +1 -1
  70. package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js → chunk-6RR4XM5H.js} +3 -3
  71. package/dist/cli-bundle/chunks/{chunk-K46RF36U.js → chunk-6TD5QGIB.js} +7 -7
  72. package/dist/cli-bundle/chunks/chunk-6TD5QGIB.js.map +1 -0
  73. package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js → chunk-6WCXSC5V.js} +12 -16
  74. package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js.map → chunk-6WCXSC5V.js.map} +1 -1
  75. package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js → chunk-6ZKDMEVT.js} +7 -9
  76. package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js.map → chunk-6ZKDMEVT.js.map} +1 -1
  77. package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js → chunk-7QKSLAHB.js} +2 -2
  78. package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js → chunk-7TBUV7XS.js} +8 -12
  79. package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js.map → chunk-7TBUV7XS.js.map} +1 -1
  80. package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js → chunk-7UCBLJDF.js} +2 -2
  81. package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js → chunk-AEOFBBWO.js} +6 -8
  82. package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js.map → chunk-AEOFBBWO.js.map} +1 -1
  83. package/dist/cli-bundle/chunks/chunk-ASMRSIDX.js +10498 -0
  84. package/dist/cli-bundle/chunks/chunk-ASMRSIDX.js.map +7 -0
  85. package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js → chunk-BFNFTHWQ.js} +3 -3
  86. package/dist/cli-bundle/chunks/chunk-BPJ5NYSJ.js +5509 -0
  87. package/dist/cli-bundle/chunks/chunk-BPJ5NYSJ.js.map +7 -0
  88. package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js → chunk-C3YU3TXX.js} +2 -2
  89. package/dist/cli-bundle/chunks/{chunk-VPIM42PC.js → chunk-C6XSTACC.js} +11 -7
  90. package/dist/cli-bundle/chunks/chunk-C6XSTACC.js.map +7 -0
  91. package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js → chunk-CGDUIPJL.js} +3 -3
  92. package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js → chunk-CXH7EMSB.js} +5 -7
  93. package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js.map → chunk-CXH7EMSB.js.map} +1 -1
  94. package/dist/cli-bundle/chunks/{chunk-DMRNBQOI.js → chunk-D63PEJTB.js} +256 -36
  95. package/dist/cli-bundle/chunks/chunk-D63PEJTB.js.map +1 -0
  96. package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js → chunk-D6J5673C.js} +7 -9
  97. package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js.map → chunk-D6J5673C.js.map} +1 -1
  98. package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js → chunk-DUBC6TI3.js} +28 -34
  99. package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js.map → chunk-DUBC6TI3.js.map} +1 -1
  100. package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js → chunk-EEJKHF7M.js} +7 -6
  101. package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js.map → chunk-EEJKHF7M.js.map} +2 -2
  102. package/dist/cli-bundle/chunks/{chunk-XG625QP4.js → chunk-EP2CKDS7.js} +2 -2
  103. package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js → chunk-EYPIUFWJ.js} +24 -32
  104. package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js.map → chunk-EYPIUFWJ.js.map} +1 -1
  105. package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js → chunk-F5DDGY6R.js} +6 -6
  106. package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js.map → chunk-F5DDGY6R.js.map} +1 -1
  107. package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js → chunk-FFB3WITE.js} +10 -16
  108. package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js.map → chunk-FFB3WITE.js.map} +1 -1
  109. package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js → chunk-FJR2S7S4.js} +10 -14
  110. package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js.map → chunk-FJR2S7S4.js.map} +1 -1
  111. package/dist/cli-bundle/chunks/chunk-FL625JJM.js +6792 -0
  112. package/dist/cli-bundle/chunks/chunk-FL625JJM.js.map +7 -0
  113. package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js → chunk-FOJEBRDD.js} +16 -20
  114. package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js.map → chunk-FOJEBRDD.js.map} +1 -1
  115. package/dist/cli-bundle/chunks/{chunk-EOKXK3R3.js → chunk-G4FKP4ID.js} +1220 -398
  116. package/dist/cli-bundle/chunks/chunk-G4FKP4ID.js.map +1 -0
  117. package/dist/cli-bundle/chunks/chunk-GE44TQMC.js +6726 -0
  118. package/dist/cli-bundle/chunks/chunk-GE44TQMC.js.map +1 -0
  119. package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js → chunk-GLMJLBLR.js} +6 -10
  120. package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js.map → chunk-GLMJLBLR.js.map} +1 -1
  121. package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js → chunk-GO2X6ZRB.js} +4 -6
  122. package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js.map → chunk-GO2X6ZRB.js.map} +1 -1
  123. package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js → chunk-GQOKFX2G.js} +22 -26
  124. package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js.map → chunk-GQOKFX2G.js.map} +1 -1
  125. package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js → chunk-GSQVQINP.js} +8 -10
  126. package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js.map → chunk-GSQVQINP.js.map} +1 -1
  127. package/dist/cli-bundle/chunks/chunk-HI27UADG.js +5434 -0
  128. package/dist/cli-bundle/chunks/chunk-HI27UADG.js.map +1 -0
  129. package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js → chunk-HZZ3AC27.js} +6 -6
  130. package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js.map → chunk-HZZ3AC27.js.map} +1 -1
  131. package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js → chunk-IINCZYM3.js} +8 -12
  132. package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js.map → chunk-IINCZYM3.js.map} +1 -1
  133. package/dist/cli-bundle/chunks/{chunk-EKFNL33R.js → chunk-INOWVPUD.js} +37 -16
  134. package/dist/cli-bundle/chunks/chunk-INOWVPUD.js.map +1 -0
  135. package/dist/cli-bundle/chunks/{chunk-4LELACOL.js → chunk-IYRG5AEC.js} +15 -23
  136. package/dist/cli-bundle/chunks/{chunk-4LELACOL.js.map → chunk-IYRG5AEC.js.map} +1 -1
  137. package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js → chunk-J6AD3GWC.js} +2 -2
  138. package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js → chunk-JH5XDDYS.js} +14 -20
  139. package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js.map → chunk-JH5XDDYS.js.map} +1 -1
  140. package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js → chunk-JYVPLGOW.js} +9 -11
  141. package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js.map → chunk-JYVPLGOW.js.map} +1 -1
  142. package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js → chunk-K52C6YPA.js} +12 -18
  143. package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js.map → chunk-K52C6YPA.js.map} +1 -1
  144. package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js → chunk-KFL3XHMA.js} +2 -2
  145. package/dist/cli-bundle/chunks/chunk-KMXVZ2P7.js +10320 -0
  146. package/dist/cli-bundle/chunks/chunk-KMXVZ2P7.js.map +1 -0
  147. package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js → chunk-LD2NBQ5T.js} +6 -8
  148. package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js.map → chunk-LD2NBQ5T.js.map} +1 -1
  149. package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js → chunk-LG4N6YOK.js} +8 -7
  150. package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js.map → chunk-LG4N6YOK.js.map} +1 -1
  151. package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js → chunk-LHDHS4Z6.js} +10 -14
  152. package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js.map → chunk-LHDHS4Z6.js.map} +1 -1
  153. package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js → chunk-MCH6IKK7.js} +4 -6
  154. package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js.map → chunk-MCH6IKK7.js.map} +1 -1
  155. package/dist/cli-bundle/chunks/{chunk-57NWPFF2.js → chunk-MFLLULHU.js} +281 -233
  156. package/dist/cli-bundle/chunks/chunk-MFLLULHU.js.map +1 -0
  157. package/dist/cli-bundle/chunks/{chunk-EGAP5OWD.js → chunk-ML27MHNM.js} +35 -17
  158. package/dist/cli-bundle/chunks/chunk-ML27MHNM.js.map +1 -0
  159. package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js → chunk-MYHFZNBO.js} +20 -24
  160. package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js.map → chunk-MYHFZNBO.js.map} +1 -1
  161. package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js → chunk-NGBWEYNY.js} +12 -18
  162. package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js.map → chunk-NGBWEYNY.js.map} +1 -1
  163. package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js → chunk-NRMDT4OV.js} +10 -14
  164. package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js.map → chunk-NRMDT4OV.js.map} +1 -1
  165. package/dist/cli-bundle/chunks/chunk-NTOOEVJ4.js +5359 -0
  166. package/dist/cli-bundle/chunks/chunk-NTOOEVJ4.js.map +1 -0
  167. package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js → chunk-P2WE5KCU.js} +261 -34
  168. package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js.map → chunk-P2WE5KCU.js.map} +4 -4
  169. package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js → chunk-PAWPLIWW.js} +14 -20
  170. package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js.map → chunk-PAWPLIWW.js.map} +1 -1
  171. package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js → chunk-PCBZ2VJD.js} +7 -7
  172. package/dist/cli-bundle/chunks/{chunk-ZSUS2OD3.js → chunk-PJPZTE7P.js} +1216 -387
  173. package/dist/cli-bundle/chunks/chunk-PJPZTE7P.js.map +7 -0
  174. package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js → chunk-Q3CFSOQZ.js} +7 -7
  175. package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js → chunk-QJZM5WO5.js} +5 -5
  176. package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js.map → chunk-QJZM5WO5.js.map} +2 -2
  177. package/dist/cli-bundle/chunks/{chunk-QLMX7SRD.js → chunk-QLEH6FTQ.js} +6 -6
  178. package/dist/cli-bundle/chunks/chunk-QLEH6FTQ.js.map +7 -0
  179. package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js → chunk-QYZMZD4L.js} +10 -12
  180. package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js.map → chunk-QYZMZD4L.js.map} +1 -1
  181. package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js → chunk-RDJXIAJB.js} +7 -11
  182. package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js.map → chunk-RDJXIAJB.js.map} +1 -1
  183. package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js → chunk-RFHLRMLQ.js} +6 -8
  184. package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js.map → chunk-RFHLRMLQ.js.map} +1 -1
  185. package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js → chunk-RL24NAUX.js} +10 -12
  186. package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js.map → chunk-RL24NAUX.js.map} +1 -1
  187. package/dist/cli-bundle/chunks/{chunk-46CUF5L6.js → chunk-RLHQ3G4M.js} +99 -51
  188. package/dist/cli-bundle/chunks/chunk-RLHQ3G4M.js.map +7 -0
  189. package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js → chunk-SCJPFQQT.js} +12 -18
  190. package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js.map → chunk-SCJPFQQT.js.map} +1 -1
  191. package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js → chunk-SIQGG335.js} +12 -16
  192. package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js.map → chunk-SIQGG335.js.map} +1 -1
  193. package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js → chunk-SN5X5GTU.js} +8 -12
  194. package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js.map → chunk-SN5X5GTU.js.map} +1 -1
  195. package/dist/cli-bundle/chunks/{chunk-CL36D4PC.js → chunk-TKWTJGD6.js} +36 -15
  196. package/dist/cli-bundle/chunks/chunk-TKWTJGD6.js.map +7 -0
  197. package/dist/cli-bundle/chunks/{chunk-VIIUS6N6.js → chunk-TR2C6V5T.js} +37 -19
  198. package/dist/cli-bundle/chunks/chunk-TR2C6V5T.js.map +7 -0
  199. package/dist/cli-bundle/chunks/chunk-TTCJCKUJ.js +5514 -0
  200. package/dist/cli-bundle/chunks/chunk-TTCJCKUJ.js.map +7 -0
  201. package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js → chunk-TU5P744I.js} +4 -4
  202. package/dist/cli-bundle/chunks/{chunk-TULGS6X6.js → chunk-TUDAYIO7.js} +529 -46
  203. package/dist/cli-bundle/chunks/chunk-TUDAYIO7.js.map +1 -0
  204. package/dist/cli-bundle/chunks/{chunk-MLIYFOE7.js → chunk-U72GF3I2.js} +12 -8
  205. package/dist/cli-bundle/chunks/chunk-U72GF3I2.js.map +1 -0
  206. package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js → chunk-UCRYCT5M.js} +30 -36
  207. package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js.map → chunk-UCRYCT5M.js.map} +1 -1
  208. package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js → chunk-UEATYUZW.js} +2 -2
  209. package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js → chunk-UFNFHCAC.js} +2 -2
  210. package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js → chunk-UH6VFRV6.js} +5 -7
  211. package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js.map → chunk-UH6VFRV6.js.map} +1 -1
  212. package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js → chunk-UIHDZS6X.js} +11 -15
  213. package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js.map → chunk-UIHDZS6X.js.map} +1 -1
  214. package/dist/cli-bundle/chunks/{chunk-W572BIEB.js → chunk-UURYLDDC.js} +14 -18
  215. package/dist/cli-bundle/chunks/{chunk-W572BIEB.js.map → chunk-UURYLDDC.js.map} +1 -1
  216. package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js → chunk-UVFJSKTF.js} +9 -13
  217. package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js.map → chunk-UVFJSKTF.js.map} +1 -1
  218. package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js → chunk-W2VFNVSJ.js} +6 -8
  219. package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js.map → chunk-W2VFNVSJ.js.map} +1 -1
  220. package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js → chunk-WVEMZZCR.js} +5 -5
  221. package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js.map → chunk-WVEMZZCR.js.map} +2 -2
  222. package/dist/cli-bundle/chunks/{chunk-3VHSI5FL.js → chunk-XN5BEN2B.js} +94 -53
  223. package/dist/cli-bundle/chunks/chunk-XN5BEN2B.js.map +1 -0
  224. package/dist/cli-bundle/chunks/{chunk-SCUR7K7N.js → chunk-XPSGJ4IV.js} +541 -44
  225. package/dist/cli-bundle/chunks/chunk-XPSGJ4IV.js.map +7 -0
  226. package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js → chunk-YQEKE4FO.js} +13 -21
  227. package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js.map → chunk-YQEKE4FO.js.map} +1 -1
  228. package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js → chunk-YR5R4FMQ.js} +26 -34
  229. package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js.map → chunk-YR5R4FMQ.js.map} +1 -1
  230. package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js → chunk-YSRXFGNV.js} +7 -9
  231. package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js.map → chunk-YSRXFGNV.js.map} +1 -1
  232. package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js → chunk-YUCKM3MD.js} +10 -14
  233. package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js.map → chunk-YUCKM3MD.js.map} +1 -1
  234. package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js → chunk-YUMNZS3X.js} +6 -8
  235. package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js.map → chunk-YUMNZS3X.js.map} +1 -1
  236. package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js → chunk-Z2JQH2MG.js} +2 -2
  237. package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js → chunk-Z6RLSNUX.js} +4 -6
  238. package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js.map → chunk-Z6RLSNUX.js.map} +1 -1
  239. package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js → chunk-ZMOPZFVT.js} +4 -4
  240. package/dist/cli-bundle/chunks/close-E3RLZSP2.js +12 -0
  241. package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js → close-K6BFI3OX.js} +5 -9
  242. package/dist/cli-bundle/chunks/close-many-6NBL3PM4.js +26 -0
  243. package/dist/cli-bundle/chunks/close-many-X4YKS3RO.js +22 -0
  244. package/dist/cli-bundle/chunks/comments-PLFK5ZKK.js +17 -0
  245. package/dist/cli-bundle/chunks/comments-ZNOD5PTV.js +13 -0
  246. package/dist/cli-bundle/chunks/copy-F7BUFY4J.js +9 -0
  247. package/dist/cli-bundle/chunks/{copy-32ROBIDL.js → copy-VH3L4MN2.js} +4 -8
  248. package/dist/cli-bundle/chunks/create-AMBMYP6F.js +25 -0
  249. package/dist/cli-bundle/chunks/{create-E77SDCUP.js → create-TRIBYORN.js} +9 -14
  250. package/dist/cli-bundle/chunks/delete-6KQHZYIP.js +10 -0
  251. package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js → delete-ZNXUNCZR.js} +4 -8
  252. package/dist/cli-bundle/chunks/deps-CVDY7FFK.js +13 -0
  253. package/dist/cli-bundle/chunks/{deps-32SU7HO5.js → deps-SZXQHV73.js} +4 -8
  254. package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js → docs-DR74ITCD.js} +6 -10
  255. package/dist/cli-bundle/chunks/docs-WCVYY6I7.js +14 -0
  256. package/dist/cli-bundle/chunks/files-H5YCA74Z.js +18 -0
  257. package/dist/cli-bundle/chunks/{files-PYKR2UUG.js → files-QEFQ2M3H.js} +6 -10
  258. package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js → focus-55TRYSNA.js} +7 -9
  259. package/dist/cli-bundle/chunks/focus-N2QGNS5D.js +10 -0
  260. package/dist/cli-bundle/chunks/history-compact-GWQ4UOEI.js +21 -0
  261. package/dist/cli-bundle/chunks/{history-compact-3MNXLKAT.js → history-compact-JJZ4EFL3.js} +9 -13
  262. package/dist/cli-bundle/chunks/history-redact-4GJOLXCM.js +17 -0
  263. package/dist/cli-bundle/chunks/{history-redact-P6DYF55G.js → history-redact-TPPUT3A5.js} +7 -11
  264. package/dist/cli-bundle/chunks/history-repair-HVCVCGUF.js +19 -0
  265. package/dist/cli-bundle/chunks/{history-repair-ZJQFMWPD.js → history-repair-J7PIZ6ZP.js} +9 -13
  266. package/dist/cli-bundle/chunks/{append-BGML6VLD.js → learnings-KB6BT4NR.js} +9 -11
  267. package/dist/cli-bundle/chunks/learnings-YYY3U2Y7.js +13 -0
  268. package/dist/cli-bundle/chunks/notes-BGG7VL72.js +13 -0
  269. package/dist/cli-bundle/chunks/notes-ZTHXVOKM.js +17 -0
  270. package/dist/cli-bundle/chunks/{plan-CHVE7PBR.js → plan-CJPKFRBK.js} +10 -15
  271. package/dist/cli-bundle/chunks/plan-MK2QY3GA.js +24 -0
  272. package/dist/cli-bundle/chunks/{profile-ZXGSKBJD.js → profile-AQNHXOYA.js} +9 -13
  273. package/dist/cli-bundle/chunks/{profile-LD23PSI6.js → profile-HTBFINKQ.js} +9 -13
  274. package/dist/cli-bundle/chunks/{register-list-query-B42JCCOI.js → register-list-query-EEF33SUJ.js} +43 -34
  275. package/dist/cli-bundle/chunks/register-list-query-EEF33SUJ.js.map +1 -0
  276. package/dist/cli-bundle/chunks/{register-list-query-OEYQHFXO.js → register-list-query-S4FBWIWN.js} +42 -33
  277. package/dist/cli-bundle/chunks/register-list-query-S4FBWIWN.js.map +7 -0
  278. package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js → register-mutation-L5Q7AUDN.js} +34 -39
  279. package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js.map → register-mutation-L5Q7AUDN.js.map} +1 -1
  280. package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js → register-mutation-QFLRBCI7.js} +36 -41
  281. package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js.map → register-mutation-QFLRBCI7.js.map} +1 -1
  282. package/dist/cli-bundle/chunks/{chunk-5BMM6XQY.js → register-operations-HDE4FVW4.js} +79 -46
  283. package/dist/cli-bundle/chunks/register-operations-HDE4FVW4.js.map +1 -0
  284. package/dist/cli-bundle/chunks/{chunk-Z3U3U5KD.js → register-operations-QDU43FCG.js} +78 -45
  285. package/dist/cli-bundle/chunks/register-operations-QDU43FCG.js.map +7 -0
  286. package/dist/cli-bundle/chunks/{register-setup-Q6KFNIOZ.js → register-setup-EGMTAXDC.js} +134 -32
  287. package/dist/cli-bundle/chunks/register-setup-EGMTAXDC.js.map +1 -0
  288. package/dist/cli-bundle/chunks/{register-setup-3ZVVX2VN.js → register-setup-PNIO3L2P.js} +133 -31
  289. package/dist/cli-bundle/chunks/register-setup-PNIO3L2P.js.map +7 -0
  290. package/dist/cli-bundle/chunks/{restore-5RQHAPMA.js → restore-BTBEZ5CK.js} +7 -11
  291. package/dist/cli-bundle/chunks/restore-EX4UUZL6.js +15 -0
  292. package/dist/cli-bundle/chunks/{schema-HBORFC6B.js → schema-DGSTYYQB.js} +6 -10
  293. package/dist/cli-bundle/chunks/{schema-245WW4G2.js → schema-HAIBEE24.js} +6 -10
  294. package/dist/cli-bundle/chunks/update-MP4XLU56.js +25 -0
  295. package/dist/cli-bundle/chunks/update-SDIRJGSY.js +21 -0
  296. package/dist/cli-bundle/chunks/update-many-34AIU6W7.js +31 -0
  297. package/dist/cli-bundle/chunks/update-many-JUPCNOKV.js +35 -0
  298. package/dist/cli-bundle/main.js +56 -32
  299. package/dist/cli-bundle/main.js.map +2 -2
  300. package/dist/cli-bundle/sdk-runtime.js +161 -107
  301. package/dist/cli-bundle/sdk-testing.js +7 -8
  302. package/dist/cli-bundle/sdk.js +154 -117
  303. package/dist/cli-bundle/sdk.js.map +2 -2
  304. package/dist/core/extensions/extension-types.d.ts +1 -0
  305. package/dist/core/extensions/extension-types.js +2 -2
  306. package/dist/core/extensions/extension-types.js.map +1 -1
  307. package/dist/core/extensions/loader.js +268 -231
  308. package/dist/core/extensions/loader.js.map +1 -1
  309. package/dist/core/history/drift-scan.js +3 -8
  310. package/dist/core/history/drift-scan.js.map +1 -1
  311. package/dist/core/output/mutation-projection.js +11 -5
  312. package/dist/core/output/mutation-projection.js.map +1 -1
  313. package/dist/core/search/cache.js +3 -3
  314. package/dist/core/search/cache.js.map +1 -1
  315. package/dist/core/search/semantic-defaults.d.ts +2 -0
  316. package/dist/core/search/semantic-defaults.js +11 -4
  317. package/dist/core/search/semantic-defaults.js.map +1 -1
  318. package/dist/core/search/vector-stores.d.ts +1 -1
  319. package/dist/core/search/vector-stores.js +33 -7
  320. package/dist/core/search/vector-stores.js.map +1 -1
  321. package/dist/mcp/server.d.ts +1 -1
  322. package/dist/sdk/cli-contracts/commander-types.js +3 -3
  323. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  324. package/dist/sdk/cli-contracts/flag-contracts.js +12 -8
  325. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  326. package/dist/sdk/cli-contracts/tool-parameter-tables.js +10 -2
  327. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  328. package/dist/sdk/cli-contracts/tool-schema.js +14 -8
  329. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  330. package/dist/sdk/index.d.ts +1 -1
  331. package/dist/sdk/index.js +3 -3
  332. package/dist/sdk/index.js.map +1 -1
  333. package/dist/sdk/runtime.d.ts +282 -8
  334. package/dist/sdk/runtime.js +453 -14
  335. package/dist/sdk/runtime.js.map +1 -1
  336. package/dist/sdk/start-task-status.d.ts +13 -0
  337. package/dist/sdk/start-task-status.js +19 -0
  338. package/dist/sdk/start-task-status.js.map +1 -0
  339. package/docs/COMMANDS.md +10 -1
  340. package/docs/EXTENSIONS.md +7 -20
  341. package/docs/RELEASING.md +6 -0
  342. package/docs/SDK.md +65 -0
  343. package/docs/TESTING.md +3 -0
  344. package/package.json +2 -1
  345. package/dist/cli-bundle/chunks/activity-WJCGCYPU.js +0 -18
  346. package/dist/cli-bundle/chunks/activity-Z6QUAUSG.js +0 -22
  347. package/dist/cli-bundle/chunks/aggregate-BDM6EIAR.js +0 -25
  348. package/dist/cli-bundle/chunks/aggregate-VQ2DHU3S.js +0 -21
  349. package/dist/cli-bundle/chunks/append-RKJYPU74.js +0 -15
  350. package/dist/cli-bundle/chunks/chunk-2XG4IZON.js +0 -218
  351. package/dist/cli-bundle/chunks/chunk-2XG4IZON.js.map +0 -7
  352. package/dist/cli-bundle/chunks/chunk-37E72CNS.js +0 -217
  353. package/dist/cli-bundle/chunks/chunk-37E72CNS.js.map +0 -1
  354. package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js +0 -228
  355. package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js.map +0 -1
  356. package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js +0 -2330
  357. package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js.map +0 -7
  358. package/dist/cli-bundle/chunks/chunk-3VHSI5FL.js.map +0 -1
  359. package/dist/cli-bundle/chunks/chunk-425E4QL5.js +0 -278
  360. package/dist/cli-bundle/chunks/chunk-425E4QL5.js.map +0 -7
  361. package/dist/cli-bundle/chunks/chunk-46CUF5L6.js.map +0 -7
  362. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +0 -87
  363. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +0 -7
  364. package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js +0 -249
  365. package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js.map +0 -7
  366. package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js +0 -819
  367. package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js.map +0 -1
  368. package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js +0 -279
  369. package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js.map +0 -1
  370. package/dist/cli-bundle/chunks/chunk-57NWPFF2.js.map +0 -1
  371. package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js +0 -268
  372. package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js.map +0 -1
  373. package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js.map +0 -1
  374. package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js +0 -1868
  375. package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js.map +0 -7
  376. package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js +0 -1749
  377. package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js.map +0 -7
  378. package/dist/cli-bundle/chunks/chunk-64YKRTSV.js +0 -1961
  379. package/dist/cli-bundle/chunks/chunk-64YKRTSV.js.map +0 -1
  380. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +0 -23
  381. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +0 -7
  382. package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js +0 -421
  383. package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js.map +0 -1
  384. package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js +0 -1985
  385. package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js.map +0 -7
  386. package/dist/cli-bundle/chunks/chunk-CL36D4PC.js.map +0 -7
  387. package/dist/cli-bundle/chunks/chunk-COSPOP7H.js.map +0 -7
  388. package/dist/cli-bundle/chunks/chunk-COWTDV6B.js +0 -3461
  389. package/dist/cli-bundle/chunks/chunk-COWTDV6B.js.map +0 -7
  390. package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js +0 -1858
  391. package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js.map +0 -1
  392. package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js.map +0 -1
  393. package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js +0 -1932
  394. package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js.map +0 -1
  395. package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js.map +0 -1
  396. package/dist/cli-bundle/chunks/chunk-EKFNL33R.js.map +0 -1
  397. package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js +0 -1704
  398. package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js.map +0 -1
  399. package/dist/cli-bundle/chunks/chunk-EOKXK3R3.js.map +0 -1
  400. package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js +0 -231
  401. package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js.map +0 -7
  402. package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js +0 -2090
  403. package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js.map +0 -1
  404. package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js +0 -1570
  405. package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js.map +0 -1
  406. package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js +0 -239
  407. package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js.map +0 -1
  408. package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js +0 -530
  409. package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js.map +0 -7
  410. package/dist/cli-bundle/chunks/chunk-GZRDYONU.js +0 -1005
  411. package/dist/cli-bundle/chunks/chunk-GZRDYONU.js.map +0 -7
  412. package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js +0 -277
  413. package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js.map +0 -7
  414. package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js +0 -309
  415. package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js.map +0 -7
  416. package/dist/cli-bundle/chunks/chunk-JINYH2DB.js +0 -371
  417. package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +0 -7
  418. package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js +0 -2257
  419. package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js.map +0 -7
  420. package/dist/cli-bundle/chunks/chunk-K46RF36U.js.map +0 -1
  421. package/dist/cli-bundle/chunks/chunk-KERMZVY5.js +0 -371
  422. package/dist/cli-bundle/chunks/chunk-KERMZVY5.js.map +0 -7
  423. package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js +0 -76
  424. package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js.map +0 -1
  425. package/dist/cli-bundle/chunks/chunk-LK6XLOGP.js.map +0 -7
  426. package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js +0 -140
  427. package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js.map +0 -1
  428. package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js +0 -1601
  429. package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js.map +0 -1
  430. package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js +0 -1031
  431. package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js.map +0 -1
  432. package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js +0 -995
  433. package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js.map +0 -1
  434. package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js +0 -296
  435. package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js.map +0 -1
  436. package/dist/cli-bundle/chunks/chunk-MLIYFOE7.js.map +0 -1
  437. package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js +0 -2043
  438. package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js.map +0 -7
  439. package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js +0 -2033
  440. package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js.map +0 -1
  441. package/dist/cli-bundle/chunks/chunk-N745W3B3.js +0 -1604
  442. package/dist/cli-bundle/chunks/chunk-N745W3B3.js.map +0 -7
  443. package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js +0 -1615
  444. package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js.map +0 -7
  445. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +0 -20
  446. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +0 -1
  447. package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js +0 -143
  448. package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js.map +0 -7
  449. package/dist/cli-bundle/chunks/chunk-QLMX7SRD.js.map +0 -7
  450. package/dist/cli-bundle/chunks/chunk-QX6HM775.js +0 -398
  451. package/dist/cli-bundle/chunks/chunk-QX6HM775.js.map +0 -7
  452. package/dist/cli-bundle/chunks/chunk-QZ342C63.js +0 -220
  453. package/dist/cli-bundle/chunks/chunk-QZ342C63.js.map +0 -7
  454. package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js +0 -368
  455. package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +0 -1
  456. package/dist/cli-bundle/chunks/chunk-RFNYTESG.js +0 -520
  457. package/dist/cli-bundle/chunks/chunk-RFNYTESG.js.map +0 -1
  458. package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js +0 -79
  459. package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js.map +0 -7
  460. package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js +0 -282
  461. package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js.map +0 -7
  462. package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js +0 -274
  463. package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js.map +0 -1
  464. package/dist/cli-bundle/chunks/chunk-SCUR7K7N.js.map +0 -7
  465. package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js +0 -1977
  466. package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js.map +0 -7
  467. package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js +0 -1041
  468. package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js.map +0 -7
  469. package/dist/cli-bundle/chunks/chunk-T42JWV3F.js +0 -822
  470. package/dist/cli-bundle/chunks/chunk-T42JWV3F.js.map +0 -7
  471. package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js.map +0 -1
  472. package/dist/cli-bundle/chunks/chunk-TULGS6X6.js.map +0 -1
  473. package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js +0 -2306
  474. package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js.map +0 -1
  475. package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js.map +0 -7
  476. package/dist/cli-bundle/chunks/chunk-VPIM42PC.js.map +0 -7
  477. package/dist/cli-bundle/chunks/chunk-VQRSPVME.js +0 -368
  478. package/dist/cli-bundle/chunks/chunk-VQRSPVME.js.map +0 -1
  479. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +0 -84
  480. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +0 -1
  481. package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js +0 -3423
  482. package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js.map +0 -1
  483. package/dist/cli-bundle/chunks/chunk-WLSM645P.js +0 -2247
  484. package/dist/cli-bundle/chunks/chunk-WLSM645P.js.map +0 -1
  485. package/dist/cli-bundle/chunks/chunk-WRTENIX3.js +0 -215
  486. package/dist/cli-bundle/chunks/chunk-WRTENIX3.js.map +0 -1
  487. package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js +0 -388
  488. package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js.map +0 -1
  489. package/dist/cli-bundle/chunks/chunk-XC5BURG2.js +0 -306
  490. package/dist/cli-bundle/chunks/chunk-XC5BURG2.js.map +0 -1
  491. package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js +0 -424
  492. package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js.map +0 -7
  493. package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js +0 -2128
  494. package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js.map +0 -7
  495. package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js.map +0 -7
  496. package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js +0 -299
  497. package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js.map +0 -7
  498. package/dist/cli-bundle/chunks/chunk-ZSUS2OD3.js.map +0 -7
  499. package/dist/cli-bundle/chunks/claim-RFS7BROJ.js +0 -19
  500. package/dist/cli-bundle/chunks/claim-XP5AWZ5H.js +0 -23
  501. package/dist/cli-bundle/chunks/close-GEANHQ2J.js +0 -16
  502. package/dist/cli-bundle/chunks/close-many-CMZW7ITN.js +0 -31
  503. package/dist/cli-bundle/chunks/close-many-ZFDIG6M7.js +0 -27
  504. package/dist/cli-bundle/chunks/comments-MFSYVNNU.js +0 -21
  505. package/dist/cli-bundle/chunks/comments-XUBPXDYX.js +0 -17
  506. package/dist/cli-bundle/chunks/config-D7XQMONX.js +0 -18
  507. package/dist/cli-bundle/chunks/config-T4FHBSYN.js +0 -22
  508. package/dist/cli-bundle/chunks/context-DIU275XI.js +0 -48
  509. package/dist/cli-bundle/chunks/context-JCOYB4LZ.js +0 -44
  510. package/dist/cli-bundle/chunks/contracts-BVO7CSLK.js +0 -12
  511. package/dist/cli-bundle/chunks/copy-NAGLGMHZ.js +0 -13
  512. package/dist/cli-bundle/chunks/create-4V7SWNBB.js +0 -30
  513. package/dist/cli-bundle/chunks/delete-NQI5OSKN.js +0 -14
  514. package/dist/cli-bundle/chunks/deps-T7SCWXEX.js +0 -17
  515. package/dist/cli-bundle/chunks/docs-WL2IWGWV.js +0 -18
  516. package/dist/cli-bundle/chunks/eval-NF2J5SHR.js +0 -23
  517. package/dist/cli-bundle/chunks/eval-SKDT3MZU.js +0 -27
  518. package/dist/cli-bundle/chunks/extension-LAXKCAYE.js +0 -42
  519. package/dist/cli-bundle/chunks/extension-ZISPBRBC.js +0 -38
  520. package/dist/cli-bundle/chunks/files-EWRQHGIS.js +0 -22
  521. package/dist/cli-bundle/chunks/focus-4T7TM4MT.js +0 -18
  522. package/dist/cli-bundle/chunks/focus-L3YUASOD.js +0 -14
  523. package/dist/cli-bundle/chunks/gc-2PCTYYRI.js +0 -12
  524. package/dist/cli-bundle/chunks/get-7DMITJ3G.js +0 -23
  525. package/dist/cli-bundle/chunks/get-VKQXCXLL.js +0 -19
  526. package/dist/cli-bundle/chunks/health-CVSTAR2F.js +0 -31
  527. package/dist/cli-bundle/chunks/health-TV3GKTFN.js +0 -35
  528. package/dist/cli-bundle/chunks/history-D4JUX5XV.js +0 -20
  529. package/dist/cli-bundle/chunks/history-D4JUX5XV.js.map +0 -7
  530. package/dist/cli-bundle/chunks/history-LQ2UWZTE.js +0 -24
  531. package/dist/cli-bundle/chunks/history-LQ2UWZTE.js.map +0 -1
  532. package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js.map +0 -1
  533. package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js +0 -25
  534. package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js.map +0 -7
  535. package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js +0 -21
  536. package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js.map +0 -7
  537. package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js.map +0 -1
  538. package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js +0 -23
  539. package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js.map +0 -7
  540. package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js.map +0 -1
  541. package/dist/cli-bundle/chunks/init-C3LJPWQZ.js +0 -30
  542. package/dist/cli-bundle/chunks/init-C3LJPWQZ.js.map +0 -1
  543. package/dist/cli-bundle/chunks/init-J3DPGWQI.js +0 -26
  544. package/dist/cli-bundle/chunks/init-J3DPGWQI.js.map +0 -7
  545. package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js +0 -21
  546. package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js.map +0 -1
  547. package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js +0 -17
  548. package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js.map +0 -7
  549. package/dist/cli-bundle/chunks/list-O5NZVSPN.js +0 -36
  550. package/dist/cli-bundle/chunks/list-O5NZVSPN.js.map +0 -1
  551. package/dist/cli-bundle/chunks/list-Z55YCNTC.js +0 -32
  552. package/dist/cli-bundle/chunks/list-Z55YCNTC.js.map +0 -7
  553. package/dist/cli-bundle/chunks/next-GBNTGXFC.js +0 -28
  554. package/dist/cli-bundle/chunks/next-GBNTGXFC.js.map +0 -7
  555. package/dist/cli-bundle/chunks/next-QKW7PTKE.js +0 -32
  556. package/dist/cli-bundle/chunks/next-QKW7PTKE.js.map +0 -1
  557. package/dist/cli-bundle/chunks/notes-R5FZTKWF.js +0 -17
  558. package/dist/cli-bundle/chunks/notes-R5FZTKWF.js.map +0 -7
  559. package/dist/cli-bundle/chunks/notes-WCGIULVG.js +0 -21
  560. package/dist/cli-bundle/chunks/notes-WCGIULVG.js.map +0 -1
  561. package/dist/cli-bundle/chunks/plan-ADISFYH4.js +0 -29
  562. package/dist/cli-bundle/chunks/plan-ADISFYH4.js.map +0 -7
  563. package/dist/cli-bundle/chunks/plan-CHVE7PBR.js.map +0 -1
  564. package/dist/cli-bundle/chunks/profile-LD23PSI6.js.map +0 -7
  565. package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js.map +0 -1
  566. package/dist/cli-bundle/chunks/register-list-query-B42JCCOI.js.map +0 -1
  567. package/dist/cli-bundle/chunks/register-list-query-OEYQHFXO.js.map +0 -7
  568. package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js +0 -19
  569. package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js.map +0 -7
  570. package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js +0 -23
  571. package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js.map +0 -1
  572. package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js.map +0 -7
  573. package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js.map +0 -1
  574. package/dist/cli-bundle/chunks/restore-5RQHAPMA.js.map +0 -1
  575. package/dist/cli-bundle/chunks/restore-PNEIBBLW.js +0 -19
  576. package/dist/cli-bundle/chunks/restore-PNEIBBLW.js.map +0 -7
  577. package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js +0 -29
  578. package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js.map +0 -1
  579. package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js +0 -25
  580. package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js.map +0 -7
  581. package/dist/cli-bundle/chunks/schema-245WW4G2.js.map +0 -1
  582. package/dist/cli-bundle/chunks/schema-HBORFC6B.js.map +0 -7
  583. package/dist/cli-bundle/chunks/search-AOZC5SIK.js +0 -34
  584. package/dist/cli-bundle/chunks/search-AOZC5SIK.js.map +0 -7
  585. package/dist/cli-bundle/chunks/search-DRXPGHD7.js +0 -38
  586. package/dist/cli-bundle/chunks/search-DRXPGHD7.js.map +0 -1
  587. package/dist/cli-bundle/chunks/stats-NJG4NLHG.js +0 -21
  588. package/dist/cli-bundle/chunks/stats-NJG4NLHG.js.map +0 -1
  589. package/dist/cli-bundle/chunks/stats-RG6AG4N2.js +0 -17
  590. package/dist/cli-bundle/chunks/stats-RG6AG4N2.js.map +0 -7
  591. package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js +0 -14
  592. package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js.map +0 -7
  593. package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js +0 -18
  594. package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js.map +0 -1
  595. package/dist/cli-bundle/chunks/test-6CMOCWUC.js +0 -39
  596. package/dist/cli-bundle/chunks/test-6CMOCWUC.js.map +0 -7
  597. package/dist/cli-bundle/chunks/test-RI7XHBZL.js +0 -43
  598. package/dist/cli-bundle/chunks/test-RI7XHBZL.js.map +0 -1
  599. package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js +0 -29
  600. package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js.map +0 -7
  601. package/dist/cli-bundle/chunks/test-all-QEIORFYW.js +0 -33
  602. package/dist/cli-bundle/chunks/test-all-QEIORFYW.js.map +0 -1
  603. package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js +0 -28
  604. package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js.map +0 -1
  605. package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js +0 -24
  606. package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js.map +0 -7
  607. package/dist/cli-bundle/chunks/update-QVJDFEAP.js +0 -30
  608. package/dist/cli-bundle/chunks/update-QVJDFEAP.js.map +0 -1
  609. package/dist/cli-bundle/chunks/update-VQVHAY6X.js +0 -26
  610. package/dist/cli-bundle/chunks/update-VQVHAY6X.js.map +0 -7
  611. package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js +0 -37
  612. package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js.map +0 -7
  613. package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js +0 -41
  614. package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js.map +0 -1
  615. package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js +0 -24
  616. package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js.map +0 -7
  617. package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js +0 -28
  618. package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js.map +0 -1
  619. package/dist/cli-bundle/chunks/validate-4NTXSB62.js +0 -36
  620. package/dist/cli-bundle/chunks/validate-4NTXSB62.js.map +0 -1
  621. package/dist/cli-bundle/chunks/validate-MUFXQZMI.js +0 -32
  622. package/dist/cli-bundle/chunks/validate-MUFXQZMI.js.map +0 -7
  623. /package/dist/cli-bundle/chunks/{activity-WJCGCYPU.js.map → append-CDPAYYSB.js.map} +0 -0
  624. /package/dist/cli-bundle/chunks/{activity-Z6QUAUSG.js.map → append-RSPHC423.js.map} +0 -0
  625. /package/dist/cli-bundle/chunks/{chunk-24YG75HI.js.map → chunk-3FUXM574.js.map} +0 -0
  626. /package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js.map → chunk-3SHDAKMF.js.map} +0 -0
  627. /package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js.map → chunk-3V5C7PUH.js.map} +0 -0
  628. /package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js.map → chunk-4I7KS5ES.js.map} +0 -0
  629. /package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js.map → chunk-5STY7NVM.js.map} +0 -0
  630. /package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js.map → chunk-5VAZHYVQ.js.map} +0 -0
  631. /package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js.map → chunk-6RR4XM5H.js.map} +0 -0
  632. /package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js.map → chunk-7QKSLAHB.js.map} +0 -0
  633. /package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js.map → chunk-7UCBLJDF.js.map} +0 -0
  634. /package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js.map → chunk-BFNFTHWQ.js.map} +0 -0
  635. /package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js.map → chunk-C3YU3TXX.js.map} +0 -0
  636. /package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js.map → chunk-CGDUIPJL.js.map} +0 -0
  637. /package/dist/cli-bundle/chunks/{chunk-XG625QP4.js.map → chunk-EP2CKDS7.js.map} +0 -0
  638. /package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js.map → chunk-J6AD3GWC.js.map} +0 -0
  639. /package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js.map → chunk-KFL3XHMA.js.map} +0 -0
  640. /package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js.map → chunk-PCBZ2VJD.js.map} +0 -0
  641. /package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js.map → chunk-Q3CFSOQZ.js.map} +0 -0
  642. /package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js.map → chunk-TU5P744I.js.map} +0 -0
  643. /package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js.map → chunk-UEATYUZW.js.map} +0 -0
  644. /package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js.map → chunk-UFNFHCAC.js.map} +0 -0
  645. /package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js.map → chunk-Z2JQH2MG.js.map} +0 -0
  646. /package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js.map → chunk-ZMOPZFVT.js.map} +0 -0
  647. /package/dist/cli-bundle/chunks/{aggregate-VQ2DHU3S.js.map → close-E3RLZSP2.js.map} +0 -0
  648. /package/dist/cli-bundle/chunks/{aggregate-BDM6EIAR.js.map → close-K6BFI3OX.js.map} +0 -0
  649. /package/dist/cli-bundle/chunks/{append-BGML6VLD.js.map → close-many-6NBL3PM4.js.map} +0 -0
  650. /package/dist/cli-bundle/chunks/{append-RKJYPU74.js.map → close-many-X4YKS3RO.js.map} +0 -0
  651. /package/dist/cli-bundle/chunks/{claim-XP5AWZ5H.js.map → comments-PLFK5ZKK.js.map} +0 -0
  652. /package/dist/cli-bundle/chunks/{claim-RFS7BROJ.js.map → comments-ZNOD5PTV.js.map} +0 -0
  653. /package/dist/cli-bundle/chunks/{close-GEANHQ2J.js.map → copy-F7BUFY4J.js.map} +0 -0
  654. /package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js.map → copy-VH3L4MN2.js.map} +0 -0
  655. /package/dist/cli-bundle/chunks/{close-many-ZFDIG6M7.js.map → create-AMBMYP6F.js.map} +0 -0
  656. /package/dist/cli-bundle/chunks/{close-many-CMZW7ITN.js.map → create-TRIBYORN.js.map} +0 -0
  657. /package/dist/cli-bundle/chunks/{comments-XUBPXDYX.js.map → delete-6KQHZYIP.js.map} +0 -0
  658. /package/dist/cli-bundle/chunks/{comments-MFSYVNNU.js.map → delete-ZNXUNCZR.js.map} +0 -0
  659. /package/dist/cli-bundle/chunks/{config-D7XQMONX.js.map → deps-CVDY7FFK.js.map} +0 -0
  660. /package/dist/cli-bundle/chunks/{config-T4FHBSYN.js.map → deps-SZXQHV73.js.map} +0 -0
  661. /package/dist/cli-bundle/chunks/{context-DIU275XI.js.map → docs-DR74ITCD.js.map} +0 -0
  662. /package/dist/cli-bundle/chunks/{context-JCOYB4LZ.js.map → docs-WCVYY6I7.js.map} +0 -0
  663. /package/dist/cli-bundle/chunks/{contracts-BVO7CSLK.js.map → files-H5YCA74Z.js.map} +0 -0
  664. /package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js.map → files-QEFQ2M3H.js.map} +0 -0
  665. /package/dist/cli-bundle/chunks/{copy-32ROBIDL.js.map → focus-55TRYSNA.js.map} +0 -0
  666. /package/dist/cli-bundle/chunks/{copy-NAGLGMHZ.js.map → focus-N2QGNS5D.js.map} +0 -0
  667. /package/dist/cli-bundle/chunks/{create-4V7SWNBB.js.map → history-compact-GWQ4UOEI.js.map} +0 -0
  668. /package/dist/cli-bundle/chunks/{create-E77SDCUP.js.map → history-compact-JJZ4EFL3.js.map} +0 -0
  669. /package/dist/cli-bundle/chunks/{delete-NQI5OSKN.js.map → history-redact-4GJOLXCM.js.map} +0 -0
  670. /package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js.map → history-redact-TPPUT3A5.js.map} +0 -0
  671. /package/dist/cli-bundle/chunks/{deps-T7SCWXEX.js.map → history-repair-HVCVCGUF.js.map} +0 -0
  672. /package/dist/cli-bundle/chunks/{deps-32SU7HO5.js.map → history-repair-J7PIZ6ZP.js.map} +0 -0
  673. /package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js.map → learnings-KB6BT4NR.js.map} +0 -0
  674. /package/dist/cli-bundle/chunks/{docs-WL2IWGWV.js.map → learnings-YYY3U2Y7.js.map} +0 -0
  675. /package/dist/cli-bundle/chunks/{eval-NF2J5SHR.js.map → notes-BGG7VL72.js.map} +0 -0
  676. /package/dist/cli-bundle/chunks/{eval-SKDT3MZU.js.map → notes-ZTHXVOKM.js.map} +0 -0
  677. /package/dist/cli-bundle/chunks/{extension-LAXKCAYE.js.map → plan-CJPKFRBK.js.map} +0 -0
  678. /package/dist/cli-bundle/chunks/{extension-ZISPBRBC.js.map → plan-MK2QY3GA.js.map} +0 -0
  679. /package/dist/cli-bundle/chunks/{files-PYKR2UUG.js.map → profile-AQNHXOYA.js.map} +0 -0
  680. /package/dist/cli-bundle/chunks/{files-EWRQHGIS.js.map → profile-HTBFINKQ.js.map} +0 -0
  681. /package/dist/cli-bundle/chunks/{focus-4T7TM4MT.js.map → restore-BTBEZ5CK.js.map} +0 -0
  682. /package/dist/cli-bundle/chunks/{focus-L3YUASOD.js.map → restore-EX4UUZL6.js.map} +0 -0
  683. /package/dist/cli-bundle/chunks/{gc-2PCTYYRI.js.map → schema-DGSTYYQB.js.map} +0 -0
  684. /package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js.map → schema-HAIBEE24.js.map} +0 -0
  685. /package/dist/cli-bundle/chunks/{get-7DMITJ3G.js.map → update-MP4XLU56.js.map} +0 -0
  686. /package/dist/cli-bundle/chunks/{get-VKQXCXLL.js.map → update-SDIRJGSY.js.map} +0 -0
  687. /package/dist/cli-bundle/chunks/{health-CVSTAR2F.js.map → update-many-34AIU6W7.js.map} +0 -0
  688. /package/dist/cli-bundle/chunks/{health-TV3GKTFN.js.map → update-many-JUPCNOKV.js.map} +0 -0
@@ -1,2033 +0,0 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f66f8fef-8bf7-5abb-8bc9-a6ee8f93ffb2")}catch(e){}}();
3
- import {
4
- collectRuntimeFilterValues,
5
- matchesRuntimeFilters,
6
- runList
7
- } from "./chunk-3VHSI5FL.js";
8
- import {
9
- runActivity
10
- } from "./chunk-WRTENIX3.js";
11
- import {
12
- parseIntegerLimit,
13
- parsePriority,
14
- parseType
15
- } from "./chunk-22KBU3MW.js";
16
- import {
17
- listAllFrontMatterLight
18
- } from "./chunk-ENGQOEUY.js";
19
- import {
20
- isTerminalStatus,
21
- normalizeStatusForRegistry,
22
- normalizeStatusInput
23
- } from "./chunk-G24G7ZAV.js";
24
- import {
25
- compareTimestampStrings,
26
- nowIso,
27
- resolveIsoOrRelative
28
- } from "./chunk-3GCS5SKL.js";
29
- import {
30
- PmCliError,
31
- getActiveExtensionRegistrations,
32
- readSettings
33
- } from "./chunk-E3SZTQ4K.js";
34
- import {
35
- CONTEXT_DEPTH_VALUES,
36
- CONTEXT_SECTION_VALUES,
37
- EXIT_CODE,
38
- SETTINGS_DEFAULTS,
39
- getSettingsPath,
40
- levenshteinDistanceWithinLimit,
41
- pathExists,
42
- resolveItemTypeRegistry,
43
- resolvePmRoot,
44
- resolveRuntimeFieldRegistry,
45
- resolveRuntimeStatusRegistry,
46
- weekdayOrderIndex
47
- } from "./chunk-57NWPFF2.js";
48
-
49
- // dist/cli/commands/calendar.js
50
- import { encode as encodeToon } from "@toon-format/toon";
51
- var CALENDAR_VIEW_VALUES = ["agenda", "day", "week", "month"];
52
- var CALENDAR_OUTPUT_VALUES = ["markdown", "toon", "json"];
53
- var UTC_DAY_TO_WEEKDAY = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
54
- var DEFAULT_RECURRENCE_LOOKAHEAD_DAYS = 365;
55
- var DEFAULT_RECURRENCE_LOOKBACK_DAYS = 365;
56
- var DEFAULT_EVENTS_ONLY_LOOKAHEAD_DAYS = 28;
57
- var MAX_RECURRENCE_OCCURRENCES = 1e3;
58
- function parseNonNegativeInteger(raw, label) {
59
- if (raw === void 0)
60
- return void 0;
61
- const parsed = Number(raw);
62
- if (!Number.isInteger(parsed) || parsed < 0) {
63
- throw new PmCliError(`${label} must be a non-negative integer`, EXIT_CODE.USAGE);
64
- }
65
- return parsed;
66
- }
67
- function parseIncludeSources(raw) {
68
- if (!raw) {
69
- return /* @__PURE__ */ new Set(["deadlines", "reminders", "events"]);
70
- }
71
- const normalized = raw.trim().toLowerCase();
72
- if (normalized === "all") {
73
- return /* @__PURE__ */ new Set(["deadlines", "reminders", "events"]);
74
- }
75
- const values = normalized.split(/[|,]/).map((value) => value.trim()).filter((value) => value.length > 0);
76
- if (values.length === 0) {
77
- throw new PmCliError("Calendar include filter must not be empty", EXIT_CODE.USAGE);
78
- }
79
- const include = /* @__PURE__ */ new Set();
80
- for (const value of values) {
81
- if (value === "deadlines" || value === "deadline") {
82
- include.add("deadlines");
83
- continue;
84
- }
85
- if (value === "reminders" || value === "reminder") {
86
- include.add("reminders");
87
- continue;
88
- }
89
- if (value === "events" || value === "event" || value === "scheduled") {
90
- include.add("events");
91
- continue;
92
- }
93
- throw new PmCliError("Calendar include filter must be deadlines|reminders|events|scheduled|all", EXIT_CODE.USAGE);
94
- }
95
- return include;
96
- }
97
- function suggestClosestChoice(value, choices) {
98
- let best;
99
- for (const choice of choices) {
100
- const distance = levenshteinDistanceWithinLimit(value, choice, 2);
101
- if (distance !== null && (best === void 0 || distance < best.distance)) {
102
- best = { choice, distance };
103
- }
104
- }
105
- return best?.choice;
106
- }
107
- function parseView(raw) {
108
- if (!raw)
109
- return "agenda";
110
- const normalized = raw.trim().toLowerCase();
111
- if (!CALENDAR_VIEW_VALUES.includes(normalized)) {
112
- const suggestion = suggestClosestChoice(normalized, CALENDAR_VIEW_VALUES);
113
- throw new PmCliError(`Calendar view must be one of ${CALENDAR_VIEW_VALUES.join("|")}${suggestion ? `. Did you mean "${suggestion}"?` : "."}`, EXIT_CODE.USAGE);
114
- }
115
- return normalized;
116
- }
117
- function parseOutputFormat(raw) {
118
- if (!raw)
119
- return void 0;
120
- const normalized = raw.trim().toLowerCase();
121
- if (!CALENDAR_OUTPUT_VALUES.includes(normalized)) {
122
- const suggestion = suggestClosestChoice(normalized, CALENDAR_OUTPUT_VALUES);
123
- throw new PmCliError(`Calendar format must be one of ${CALENDAR_OUTPUT_VALUES.join("|")}${suggestion ? `. Did you mean "${suggestion}"?` : "."}`, EXIT_CODE.USAGE);
124
- }
125
- return normalized;
126
- }
127
- function resolveCalendarOutputFormat(options, global) {
128
- const commandFormat = parseOutputFormat(options.format);
129
- if (global.json && commandFormat && commandFormat !== "json") {
130
- throw new PmCliError("Cannot combine --json with --format markdown|toon", EXIT_CODE.USAGE);
131
- }
132
- if (global.json) {
133
- return "json";
134
- }
135
- return commandFormat ?? "markdown";
136
- }
137
- function parseStatus(raw, statusRegistry) {
138
- if (raw === void 0)
139
- return void 0;
140
- const normalized = normalizeStatusInput(raw, statusRegistry);
141
- if (!normalized) {
142
- const allowedStatuses = statusRegistry.definitions.map((definition) => definition.id);
143
- throw new PmCliError(`Calendar status filter must be one of ${allowedStatuses.join("|")}`, EXIT_CODE.USAGE);
144
- }
145
- return normalized;
146
- }
147
- function parseAssigneeFilter(raw) {
148
- if (raw === void 0) {
149
- return void 0;
150
- }
151
- const normalized = raw.trim().toLowerCase();
152
- if (!normalized) {
153
- throw new PmCliError("Calendar assignee filter must be one of assigned|unassigned", EXIT_CODE.USAGE);
154
- }
155
- if (normalized !== "assigned" && normalized !== "unassigned") {
156
- throw new PmCliError(`Invalid calendar assignee filter "${raw}". Allowed: assigned|unassigned`, EXIT_CODE.USAGE);
157
- }
158
- return normalized;
159
- }
160
- function toUtcDayKey(timestamp) {
161
- return new Date(timestamp).toISOString().slice(0, 10);
162
- }
163
- function toLocalDayKey(timestamp, timezone) {
164
- if (!timezone || timezone === "UTC") {
165
- return toUtcDayKey(timestamp);
166
- }
167
- try {
168
- const parts = new Intl.DateTimeFormat("en-CA", {
169
- timeZone: timezone,
170
- year: "numeric",
171
- month: "2-digit",
172
- day: "2-digit"
173
- }).formatToParts(new Date(timestamp));
174
- const year = parts.find((part) => part.type === "year")?.value;
175
- const month = parts.find((part) => part.type === "month")?.value;
176
- const day = parts.find((part) => part.type === "day")?.value;
177
- if (year && month && day) {
178
- return `${year}-${month}-${day}`;
179
- }
180
- } catch {
181
- }
182
- return toUtcDayKey(timestamp);
183
- }
184
- function startOfUtcDay(timestamp) {
185
- const date = new Date(timestamp);
186
- return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0, 0)).toISOString();
187
- }
188
- function addUtcDays(timestamp, days) {
189
- const date = new Date(timestamp);
190
- return new Date(date.getTime() + days * 24 * 60 * 60 * 1e3).toISOString();
191
- }
192
- function startOfUtcWeekMonday(timestamp) {
193
- const base = new Date(startOfUtcDay(timestamp));
194
- const day = base.getUTCDay();
195
- const delta = day === 0 ? -6 : 1 - day;
196
- return addUtcDays(base.toISOString(), delta);
197
- }
198
- function startOfUtcMonth(timestamp) {
199
- const date = new Date(timestamp);
200
- return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), 1, 0, 0, 0, 0)).toISOString();
201
- }
202
- function startOfNextUtcMonth(timestamp) {
203
- const date = new Date(timestamp);
204
- return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + 1, 1, 0, 0, 0, 0)).toISOString();
205
- }
206
- function maxTimestamp(left, right) {
207
- return compareTimestampStrings(left, right) >= 0 ? left : right;
208
- }
209
- function toSortedCountRecord(values) {
210
- return Object.fromEntries([...values.entries()].sort(([left], [right]) => left.localeCompare(right)));
211
- }
212
- function incrementCount(values, key) {
213
- values.set(key, (values.get(key) ?? 0) + 1);
214
- }
215
- function formatRecurrenceRuleForSummary(rule) {
216
- if (!rule) {
217
- return null;
218
- }
219
- const parts = [`freq=${rule.freq}`];
220
- if (rule.interval !== void 0) {
221
- parts.push(`interval=${rule.interval}`);
222
- }
223
- if (rule.count !== void 0) {
224
- parts.push(`count=${rule.count}`);
225
- }
226
- if (rule.until) {
227
- parts.push(`until=${rule.until}`);
228
- }
229
- if (rule.by_weekday && rule.by_weekday.length > 0) {
230
- const weekdays = [...rule.by_weekday].sort((left, right) => weekdayOrderIndex(left) - weekdayOrderIndex(right));
231
- parts.push(`by_weekday=${weekdays.join("|")}`);
232
- }
233
- if (rule.by_month_day && rule.by_month_day.length > 0) {
234
- const monthDays = [...rule.by_month_day].sort((left, right) => left - right);
235
- parts.push(`by_month_day=${monthDays.join("|")}`);
236
- }
237
- if (rule.exdates && rule.exdates.length > 0) {
238
- const exdates = [...rule.exdates].sort((left, right) => left.localeCompare(right));
239
- parts.push(`exdates=${exdates.join("|")}`);
240
- }
241
- return parts.join(",");
242
- }
243
- function buildUtcTimestamp(year, month, day, timeSource) {
244
- const candidate = new Date(Date.UTC(year, month, day, timeSource.getUTCHours(), timeSource.getUTCMinutes(), timeSource.getUTCSeconds(), timeSource.getUTCMilliseconds()));
245
- if (candidate.getUTCFullYear() !== year || candidate.getUTCMonth() !== month || candidate.getUTCDate() !== day) {
246
- return void 0;
247
- }
248
- return candidate.toISOString();
249
- }
250
- function weekdayToken(timestamp) {
251
- return UTC_DAY_TO_WEEKDAY[new Date(timestamp).getUTCDay()];
252
- }
253
- function normalizeInstantKey(timestamp) {
254
- const parsed = Date.parse(timestamp);
255
- return Number.isFinite(parsed) ? new Date(parsed).toISOString() : null;
256
- }
257
- function buildExcludedInstantSet(exdates) {
258
- const excluded = /* @__PURE__ */ new Set();
259
- for (const exdate of exdates ?? []) {
260
- const instantKey = normalizeInstantKey(exdate);
261
- if (instantKey) {
262
- excluded.add(instantKey);
263
- }
264
- }
265
- return excluded;
266
- }
267
- function buildRecurringEventWindow(start, end, nowValue, lookbackDays, lookaheadDays) {
268
- const windowStart = start ?? addUtcDays(nowValue, -(lookbackDays ?? DEFAULT_RECURRENCE_LOOKBACK_DAYS));
269
- const windowEnd = end ?? addUtcDays(start ?? nowValue, lookaheadDays ?? DEFAULT_RECURRENCE_LOOKAHEAD_DAYS);
270
- return {
271
- start: windowStart,
272
- end: compareTimestampStrings(windowEnd, windowStart) > 0 ? windowEnd : addUtcDays(windowStart, 1)
273
- };
274
- }
275
- function buildRecurrenceExpansionContext(startAt, recurrence, window, occurrenceLimit) {
276
- const recurrenceWeekdays = recurrence.by_weekday !== void 0 ? [...recurrence.by_weekday] : [weekdayToken(startAt)];
277
- const recurrenceMonthDays = recurrence.by_month_day !== void 0 ? [...recurrence.by_month_day] : [new Date(startAt).getUTCDate()];
278
- return {
279
- startAt,
280
- startDate: new Date(startAt),
281
- window,
282
- maxOccurrences: occurrenceLimit ?? MAX_RECURRENCE_OCCURRENCES,
283
- interval: recurrence.interval ?? 1,
284
- countLimit: recurrence.count ?? Number.POSITIVE_INFINITY,
285
- until: recurrence.until,
286
- excluded: buildExcludedInstantSet(recurrence.exdates),
287
- weekdayFilter: recurrence.by_weekday !== void 0 ? new Set(recurrence.by_weekday) : void 0,
288
- monthDayFilter: recurrence.by_month_day !== void 0 ? new Set(recurrence.by_month_day) : void 0,
289
- sortedWeekdays: [...new Set(recurrenceWeekdays)].sort((left, right) => weekdayOrderIndex(left) - weekdayOrderIndex(right)),
290
- sortedMonthDays: [...new Set(recurrenceMonthDays)].sort((left, right) => left - right),
291
- occurrences: [],
292
- produced: 0
293
- };
294
- }
295
- function consumeRecurrenceCandidate(context, candidateAt) {
296
- if (compareTimestampStrings(candidateAt, context.startAt) < 0) {
297
- return "continue";
298
- }
299
- if (context.until && compareTimestampStrings(candidateAt, context.until) > 0) {
300
- return "stop";
301
- }
302
- if (compareTimestampStrings(candidateAt, context.window.end) >= 0) {
303
- return "stop";
304
- }
305
- if (context.excluded.has(candidateAt)) {
306
- return "continue";
307
- }
308
- context.produced += 1;
309
- if (compareTimestampStrings(candidateAt, context.window.start) >= 0) {
310
- context.occurrences.push(candidateAt);
311
- }
312
- return context.produced >= context.countLimit || context.occurrences.length >= context.maxOccurrences ? "stop" : "continue";
313
- }
314
- function recurrenceDayMatchesFilters(context, candidateAt) {
315
- const candidateWeekday = weekdayToken(candidateAt);
316
- const candidateMonthDay = new Date(candidateAt).getUTCDate();
317
- const weekdayMatches = !context.weekdayFilter || context.weekdayFilter.has(candidateWeekday);
318
- const monthDayMatches = !context.monthDayFilter || context.monthDayFilter.has(candidateMonthDay);
319
- return weekdayMatches && monthDayMatches;
320
- }
321
- function expandDailyOccurrences(context) {
322
- let candidateAt = context.startAt;
323
- for (let iteration = 0; iteration < context.maxOccurrences; iteration += 1) {
324
- if (recurrenceDayMatchesFilters(context, candidateAt) && consumeRecurrenceCandidate(context, candidateAt) === "stop") {
325
- break;
326
- }
327
- candidateAt = addUtcDays(candidateAt, context.interval);
328
- }
329
- return context.occurrences;
330
- }
331
- function buildWeeklyCandidateAt(context, candidateWeekStart, weekday) {
332
- const dayOffset = weekdayOrderIndex(weekday);
333
- const candidateDay = addUtcDays(candidateWeekStart, dayOffset);
334
- const dayDate = new Date(candidateDay);
335
- return new Date(Date.UTC(dayDate.getUTCFullYear(), dayDate.getUTCMonth(), dayDate.getUTCDate(), context.startDate.getUTCHours(), context.startDate.getUTCMinutes(), context.startDate.getUTCSeconds(), context.startDate.getUTCMilliseconds())).toISOString();
336
- }
337
- function expandWeeklyOccurrences(context) {
338
- const weekStart = startOfUtcWeekMonday(context.startAt);
339
- for (let step = 0; step < context.maxOccurrences; step += 1) {
340
- const candidateWeekStart = addUtcDays(weekStart, step * context.interval * 7);
341
- for (const weekday of context.sortedWeekdays) {
342
- const candidateAt = buildWeeklyCandidateAt(context, candidateWeekStart, weekday);
343
- if (!recurrenceDayMatchesFilters(context, candidateAt)) {
344
- continue;
345
- }
346
- if (consumeRecurrenceCandidate(context, candidateAt) === "stop") {
347
- return context.occurrences;
348
- }
349
- }
350
- }
351
- return context.occurrences;
352
- }
353
- function expandMonthlyOccurrences(context) {
354
- const startYear = context.startDate.getUTCFullYear();
355
- const startMonth = context.startDate.getUTCMonth();
356
- for (let step = 0; step < context.maxOccurrences; step += 1) {
357
- const monthAnchor = new Date(Date.UTC(startYear, startMonth + step * context.interval, 1, 0, 0, 0, 0));
358
- for (const monthDay of context.sortedMonthDays) {
359
- const candidateAt = buildUtcTimestamp(monthAnchor.getUTCFullYear(), monthAnchor.getUTCMonth(), monthDay, context.startDate);
360
- if (!candidateAt || !recurrenceDayMatchesFilters(context, candidateAt)) {
361
- continue;
362
- }
363
- if (consumeRecurrenceCandidate(context, candidateAt) === "stop") {
364
- return context.occurrences;
365
- }
366
- }
367
- }
368
- return context.occurrences;
369
- }
370
- function expandYearlyOccurrences(context) {
371
- const year = context.startDate.getUTCFullYear();
372
- const month = context.startDate.getUTCMonth();
373
- for (let step = 0; step < context.maxOccurrences; step += 1) {
374
- const candidateYear = year + step * context.interval;
375
- for (const monthDay of context.sortedMonthDays) {
376
- const candidateAt = buildUtcTimestamp(candidateYear, month, monthDay, context.startDate);
377
- if (!candidateAt || !recurrenceDayMatchesFilters(context, candidateAt)) {
378
- continue;
379
- }
380
- if (consumeRecurrenceCandidate(context, candidateAt) === "stop") {
381
- return context.occurrences;
382
- }
383
- }
384
- }
385
- return context.occurrences;
386
- }
387
- function expandRecurringOccurrences(startAt, recurrence, window, occurrenceLimit) {
388
- const context = buildRecurrenceExpansionContext(startAt, recurrence, window, occurrenceLimit);
389
- if (recurrence.freq === "daily") {
390
- return expandDailyOccurrences(context);
391
- }
392
- if (recurrence.freq === "weekly") {
393
- return expandWeeklyOccurrences(context);
394
- }
395
- if (recurrence.freq === "monthly") {
396
- return expandMonthlyOccurrences(context);
397
- }
398
- return expandYearlyOccurrences(context);
399
- }
400
- function sortEvents(values) {
401
- return [...values].sort((a, b) => {
402
- const byAt = compareTimestampStrings(a.at, b.at);
403
- if (byAt !== 0)
404
- return byAt;
405
- const byPriority = a.item_priority - b.item_priority;
406
- if (byPriority !== 0)
407
- return byPriority;
408
- const byId = a.item_id.localeCompare(b.item_id);
409
- if (byId !== 0)
410
- return byId;
411
- const byKind = a.kind.localeCompare(b.kind);
412
- if (byKind !== 0)
413
- return byKind;
414
- const byEventTitle = String(a.event_title).localeCompare(String(b.event_title));
415
- if (byEventTitle !== 0)
416
- return byEventTitle;
417
- return String(a.reminder_text).localeCompare(String(b.reminder_text));
418
- });
419
- }
420
- function buildItemCalendarRowBase(item) {
421
- return {
422
- item_id: item.id,
423
- item_title: item.title,
424
- item_type: item.type,
425
- item_status: item.status,
426
- item_priority: item.priority,
427
- item_assignee: item.assignee ?? null,
428
- item_deadline: item.deadline ?? null,
429
- item_tags: item.tags
430
- };
431
- }
432
- function buildDeadlineRow(item) {
433
- if (!item.deadline) {
434
- return null;
435
- }
436
- return {
437
- at: item.deadline,
438
- date: toUtcDayKey(item.deadline),
439
- kind: "deadline",
440
- reminder_text: null,
441
- event_title: null,
442
- event_end: null,
443
- event_location: null,
444
- event_all_day: null,
445
- event_timezone: null,
446
- event_recurring: null,
447
- event_recurrence_rule: null,
448
- ...buildItemCalendarRowBase(item),
449
- item_deadline: item.deadline
450
- };
451
- }
452
- function buildReminderRows(item) {
453
- return (item.reminders ?? []).map((reminder) => ({
454
- at: reminder.at,
455
- date: toUtcDayKey(reminder.at),
456
- kind: "reminder",
457
- reminder_text: reminder.text,
458
- event_title: null,
459
- event_end: null,
460
- event_location: null,
461
- event_all_day: null,
462
- event_timezone: null,
463
- event_recurring: null,
464
- event_recurrence_rule: null,
465
- ...buildItemCalendarRowBase(item)
466
- }));
467
- }
468
- function recurringDurationMs(startAt, endAt) {
469
- if (!endAt) {
470
- return null;
471
- }
472
- const duration = Date.parse(endAt) - Date.parse(startAt);
473
- return Number.isFinite(duration) && duration > 0 ? duration : null;
474
- }
475
- function eventOccurrenceEnd(occurrenceAt, event, durationMs) {
476
- return event.recurrence && durationMs !== null ? new Date(new Date(occurrenceAt).getTime() + durationMs).toISOString() : event.end_at ?? null;
477
- }
478
- function buildScheduledEventRows(item, event, recurringWindow, occurrenceLimit) {
479
- const recurrenceRuleSummary = formatRecurrenceRuleForSummary(event.recurrence);
480
- const durationMs = recurringDurationMs(event.start_at, event.end_at);
481
- const occurrences = event.recurrence ? expandRecurringOccurrences(event.start_at, event.recurrence, recurringWindow, occurrenceLimit) : [event.start_at];
482
- return occurrences.map((occurrenceAt) => ({
483
- at: occurrenceAt,
484
- // All-day events are timezone-agnostic calendar dates: bucket by the
485
- // literal start date. Timed events bucket by their local day in the
486
- // event's timezone (defaults to UTC when unset).
487
- date: event.all_day === true ? occurrenceAt.slice(0, 10) : toLocalDayKey(occurrenceAt, event.timezone),
488
- kind: "event",
489
- reminder_text: event.description ?? null,
490
- event_title: event.title ?? item.title,
491
- event_end: eventOccurrenceEnd(occurrenceAt, event, durationMs),
492
- event_location: event.location ?? null,
493
- event_all_day: event.all_day ?? null,
494
- event_timezone: event.timezone ?? null,
495
- event_recurring: event.recurrence ? true : false,
496
- event_recurrence_rule: recurrenceRuleSummary,
497
- ...buildItemCalendarRowBase(item)
498
- }));
499
- }
500
- function buildEventSeed(items, recurringWindow, includeSources, occurrenceLimit) {
501
- const events = [];
502
- for (const item of items) {
503
- const deadlineRow = includeSources.has("deadlines") ? buildDeadlineRow(item) : null;
504
- if (deadlineRow) {
505
- events.push(deadlineRow);
506
- }
507
- if (includeSources.has("reminders")) {
508
- events.push(...buildReminderRows(item));
509
- }
510
- for (const event of includeSources.has("events") ? item.events ?? [] : []) {
511
- events.push(...buildScheduledEventRows(item, event, recurringWindow, occurrenceLimit));
512
- }
513
- }
514
- return sortEvents(events);
515
- }
516
- function filterItems(items, options, typeRegistry, statusRegistry, runtimeFieldFilters) {
517
- const typeFilter = parseType(options.type, typeRegistry);
518
- const tagFilter = options.tag?.trim().toLowerCase();
519
- const priorityFilter = parsePriority(options.priority);
520
- const statusFilter = parseStatus(options.status, statusRegistry);
521
- const assigneeFilter = options.assignee?.trim();
522
- const assigneeModeFilter = parseAssigneeFilter(options.assigneeFilter);
523
- const sprintFilter = options.sprint?.trim();
524
- const releaseFilter = options.release?.trim();
525
- if (assigneeFilter && (assigneeFilter.toLowerCase() === "none" || assigneeFilter.toLowerCase() === "null")) {
526
- throw new PmCliError('--assignee no longer accepts "none" or "null". Use --assignee-filter unassigned.', EXIT_CODE.USAGE);
527
- }
528
- if (assigneeFilter !== void 0 && assigneeModeFilter === "unassigned") {
529
- throw new PmCliError("Cannot combine --assignee with --assignee-filter unassigned", EXIT_CODE.USAGE);
530
- }
531
- return items.filter((item) => itemMatchesCalendarFilters(item, {
532
- typeFilter,
533
- tagFilter,
534
- priorityFilter,
535
- statusFilter,
536
- assigneeFilter,
537
- assigneeModeFilter,
538
- sprintFilter,
539
- releaseFilter,
540
- runtimeFieldFilters
541
- }));
542
- }
543
- function itemMatchesCalendarFilters(item, filters) {
544
- return itemMatchesCalendarIdentityFilters(item, filters) && itemMatchesCalendarOwnerFilters(item, filters) && matchesRuntimeFilters(item, filters.runtimeFieldFilters);
545
- }
546
- function itemMatchesCalendarIdentityFilters(item, filters) {
547
- if (filters.typeFilter && item.type !== filters.typeFilter)
548
- return false;
549
- if (filters.tagFilter && !item.tags.some((tag) => tag.trim().toLowerCase() === filters.tagFilter))
550
- return false;
551
- if (filters.priorityFilter !== void 0 && item.priority !== filters.priorityFilter)
552
- return false;
553
- if (filters.statusFilter && item.status !== filters.statusFilter)
554
- return false;
555
- return true;
556
- }
557
- function itemMatchesCalendarOwnerFilters(item, filters) {
558
- if (filters.assigneeModeFilter === "assigned" && !item.assignee)
559
- return false;
560
- if (filters.assigneeModeFilter === "unassigned" && item.assignee)
561
- return false;
562
- if (filters.assigneeFilter !== void 0 && item.assignee !== filters.assigneeFilter)
563
- return false;
564
- if (filters.sprintFilter !== void 0 && item.sprint !== filters.sprintFilter)
565
- return false;
566
- if (filters.releaseFilter !== void 0 && item.release !== filters.releaseFilter)
567
- return false;
568
- return true;
569
- }
570
- function includeEventInWindow(event, start, end) {
571
- if (start && compareTimestampStrings(event.at, start) < 0) {
572
- return false;
573
- }
574
- if (end && compareTimestampStrings(event.at, end) >= 0) {
575
- return false;
576
- }
577
- return true;
578
- }
579
- function resolveCalendarBoundaryInput(raw, nowValue, fieldLabel) {
580
- if (raw.trim().toLowerCase() === "today") {
581
- return startOfUtcDay(nowValue);
582
- }
583
- return resolveIsoOrRelative(raw, new Date(nowValue), fieldLabel);
584
- }
585
- function buildRange(view, options, nowValue) {
586
- const anchor = options.date ? resolveCalendarBoundaryInput(options.date, nowValue, "--date") : nowValue;
587
- const includePast = options.past === true;
588
- const fullPeriodRequested = options.fullPeriod === true;
589
- const from = options.from ? resolveCalendarBoundaryInput(options.from, nowValue, "--from") : void 0;
590
- const to = options.to ? resolveCalendarBoundaryInput(options.to, nowValue, "--to") : void 0;
591
- if (from && to && compareTimestampStrings(from, to) >= 0) {
592
- throw new PmCliError("Calendar --from must be before --to", EXIT_CODE.USAGE);
593
- }
594
- if (view !== "agenda" && (options.from !== void 0 || options.to !== void 0)) {
595
- throw new PmCliError("--from and --to are only supported for --view agenda", EXIT_CODE.USAGE);
596
- }
597
- if (view === "agenda") {
598
- return buildAgendaRange(anchor, options, nowValue, includePast, fullPeriodRequested, from, to);
599
- }
600
- if (view === "day") {
601
- const dayStart = startOfUtcDay(anchor);
602
- return buildFixedPeriodRange(anchor, nowValue, includePast, fullPeriodRequested, dayStart, addUtcDays(dayStart, 1));
603
- }
604
- if (view === "week") {
605
- const weekStart = startOfUtcWeekMonday(anchor);
606
- return buildFixedPeriodRange(anchor, nowValue, includePast, fullPeriodRequested, weekStart, addUtcDays(weekStart, 7));
607
- }
608
- const monthStart = startOfUtcMonth(anchor);
609
- return buildFixedPeriodRange(anchor, nowValue, includePast, fullPeriodRequested, monthStart, startOfNextUtcMonth(anchor));
610
- }
611
- function buildAgendaRange(anchor, options, nowValue, includePast, fullPeriodRequested, from, to) {
612
- if (fullPeriodRequested) {
613
- throw new PmCliError("--full-period is only supported for --view day|week|month. For agenda windows, use --from and --to.", EXIT_CODE.USAGE);
614
- }
615
- return {
616
- anchor,
617
- start: from ?? (options.date ? anchor : includePast ? void 0 : nowValue),
618
- end: to,
619
- fullPeriod: false
620
- };
621
- }
622
- function buildFixedPeriodRange(anchor, nowValue, includePast, fullPeriodRequested, periodStart, periodEnd) {
623
- const fullPeriod = includePast || fullPeriodRequested;
624
- return {
625
- anchor,
626
- start: fullPeriod ? periodStart : maxTimestamp(periodStart, nowValue),
627
- end: periodEnd,
628
- periodStart,
629
- periodEnd,
630
- fullPeriod
631
- };
632
- }
633
- function bucketEventsByDay(events) {
634
- const dayMap = /* @__PURE__ */ new Map();
635
- for (const event of events) {
636
- const list = dayMap.get(event.date) ?? [];
637
- list.push(event);
638
- dayMap.set(event.date, list);
639
- }
640
- return [...dayMap.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([date, dayEvents]) => ({
641
- date,
642
- count: dayEvents.length,
643
- events: sortEvents(dayEvents)
644
- }));
645
- }
646
- function summarize(events) {
647
- const itemIds = /* @__PURE__ */ new Set();
648
- const byType = /* @__PURE__ */ new Map();
649
- const byStatus = /* @__PURE__ */ new Map();
650
- let deadlines = 0;
651
- let reminders = 0;
652
- let scheduled = 0;
653
- let recurringEvents = 0;
654
- for (const event of events) {
655
- itemIds.add(event.item_id);
656
- incrementCount(byType, event.item_type);
657
- incrementCount(byStatus, event.item_status);
658
- if (event.kind === "deadline") {
659
- deadlines += 1;
660
- } else if (event.kind === "reminder") {
661
- reminders += 1;
662
- } else {
663
- scheduled += 1;
664
- if (event.event_recurring === true) {
665
- recurringEvents += 1;
666
- }
667
- }
668
- }
669
- return {
670
- events: events.length,
671
- items: itemIds.size,
672
- deadlines,
673
- reminders,
674
- scheduled,
675
- by_kind: {
676
- deadline: deadlines,
677
- reminder: reminders,
678
- event: scheduled
679
- },
680
- by_type: toSortedCountRecord(byType),
681
- by_status: toSortedCountRecord(byStatus),
682
- recurring_events: recurringEvents
683
- };
684
- }
685
- function formatWindow(range) {
686
- const start = range.start ?? "unbounded";
687
- const end = range.end ?? "unbounded";
688
- return `${start} -> ${end}`;
689
- }
690
- function formatClock(timestamp, timezone) {
691
- if (timezone && timezone !== "UTC") {
692
- try {
693
- const parts = new Intl.DateTimeFormat("en-GB", {
694
- timeZone: timezone,
695
- hour: "2-digit",
696
- minute: "2-digit",
697
- hourCycle: "h23"
698
- }).formatToParts(new Date(timestamp));
699
- const hour = parts.find((part) => part.type === "hour")?.value;
700
- const minute = parts.find((part) => part.type === "minute")?.value;
701
- if (hour && minute) {
702
- return `${hour}:${minute}`;
703
- }
704
- } catch {
705
- }
706
- }
707
- return `${new Date(timestamp).toISOString().slice(11, 16)}Z`;
708
- }
709
- function formatSummaryCountRecord(values) {
710
- const entries = Object.entries(values);
711
- if (entries.length === 0) {
712
- return "empty";
713
- }
714
- return entries.map(([key, value]) => `${key}=${value}`).join(", ");
715
- }
716
- function formatEventEnd(event) {
717
- if (!event.event_end) {
718
- return null;
719
- }
720
- if (event.event_all_day === true) {
721
- return event.event_end.slice(0, 10);
722
- }
723
- if (event.date === toLocalDayKey(event.event_end, event.event_timezone)) {
724
- return formatClock(event.event_end, event.event_timezone);
725
- }
726
- return event.event_end;
727
- }
728
- function formatEventLine(event) {
729
- const core = `${formatClock(event.at, event.event_timezone)} [${event.kind}] ${event.item_id} type=${event.item_type} p${event.item_priority} ${event.item_status} ${event.item_title}`;
730
- if (event.kind === "reminder") {
731
- const reminderText = event.reminder_text ?? "";
732
- return `${core} \u2014 ${reminderText} reminder=${JSON.stringify(reminderText)}`;
733
- }
734
- if (event.kind === "event") {
735
- const details = [];
736
- const title = event.event_title ?? event.item_title;
737
- const titleDiffers = event.event_title !== null && event.event_title !== event.item_title;
738
- if (titleDiffers) {
739
- details.push(title);
740
- details.push(`title=${JSON.stringify(title)}`);
741
- }
742
- if (event.event_recurring) {
743
- details.push("(recurring)");
744
- details.push("recurring=true");
745
- }
746
- const end = formatEventEnd(event);
747
- if (end) {
748
- details.push(`end=${end}`);
749
- }
750
- if (event.event_all_day !== null) {
751
- details.push(`all_day=${event.event_all_day ? "true" : "false"}`);
752
- }
753
- if (event.event_timezone) {
754
- details.push(`timezone=${event.event_timezone}`);
755
- }
756
- if (event.event_location) {
757
- details.push(`@ ${event.event_location}`);
758
- details.push(`location=${JSON.stringify(event.event_location)}`);
759
- }
760
- if (event.event_recurrence_rule) {
761
- details.push(`recurrence=${event.event_recurrence_rule}`);
762
- }
763
- if (event.reminder_text) {
764
- details.push(`description=${JSON.stringify(event.reminder_text)}`);
765
- }
766
- return `${core} \u2014 ${details.join(" ")}`;
767
- }
768
- return core;
769
- }
770
- function renderCalendarMarkdown(result) {
771
- const lines = [];
772
- lines.push(`# pm calendar (${result.view})`);
773
- lines.push("");
774
- lines.push(`- now: ${result.now}`);
775
- lines.push(`- window: ${formatWindow(result.range)}`);
776
- if (result.range.period_start && result.range.period_end) {
777
- lines.push(`- period: ${result.range.period_start} -> ${result.range.period_end}`);
778
- lines.push(`- period-mode: ${result.range.full_period ? "full-period" : "active-window"}`);
779
- }
780
- lines.push(`- events: ${result.summary.events} (deadlines: ${result.summary.deadlines}, reminders: ${result.summary.reminders}, scheduled: ${result.summary.scheduled})`);
781
- lines.push(`- items: ${result.summary.items}`);
782
- lines.push(`- by-kind: ${formatSummaryCountRecord(result.summary.by_kind)}`);
783
- lines.push(`- by-type: ${formatSummaryCountRecord(result.summary.by_type)}`);
784
- lines.push(`- by-status: ${formatSummaryCountRecord(result.summary.by_status)}`);
785
- lines.push(`- recurring-events: ${result.summary.recurring_events}`);
786
- lines.push("");
787
- if (result.events.length === 0) {
788
- lines.push("No calendar events matched the selected filters.");
789
- return lines.join("\n");
790
- }
791
- for (const day of result.days) {
792
- lines.push(`## ${day.date} (${day.count})`);
793
- for (const event of day.events) {
794
- lines.push(`- ${formatEventLine(event)}`);
795
- }
796
- lines.push("");
797
- }
798
- if (result.warnings && result.warnings.length > 0) {
799
- lines.push("### warnings");
800
- for (const warning of result.warnings) {
801
- lines.push(`- ${warning}`);
802
- }
803
- lines.push("");
804
- }
805
- return trimTrailingNewlines(lines.join("\n"));
806
- }
807
- function renderCalendarToon(result) {
808
- return encodeToon(result);
809
- }
810
- function trimTrailingNewlines(value) {
811
- let end = value.length;
812
- while (end > 0 && value[end - 1] === "\n") {
813
- end -= 1;
814
- }
815
- return value.slice(0, end);
816
- }
817
- function resolveCalendarExecutionInputs(options) {
818
- const nowValue = nowIso();
819
- const view = parseView(options.view);
820
- const rangeBounds = buildRange(view, options, nowValue);
821
- const limit = parseIntegerLimit(options.limit);
822
- const includeSources = parseIncludeSources(options.include);
823
- const explicitLookahead = parseNonNegativeInteger(options.recurrenceLookaheadDays, "Calendar recurrence lookahead days");
824
- const recurrenceLookbackDays = parseNonNegativeInteger(options.recurrenceLookbackDays, "Calendar recurrence lookback days");
825
- const occurrenceLimit = parseNonNegativeInteger(options.occurrenceLimit, "Calendar occurrence limit");
826
- if (occurrenceLimit !== void 0 && occurrenceLimit < 1) {
827
- throw new PmCliError("Calendar occurrence limit must be >= 1", EXIT_CODE.USAGE);
828
- }
829
- const eventsOnly = includeSources.has("events") && !includeSources.has("deadlines") && !includeSources.has("reminders");
830
- const hasExplicitBounds = options.to !== void 0 || explicitLookahead !== void 0 || recurrenceLookbackDays !== void 0 || occurrenceLimit !== void 0;
831
- const eventsOnlyCapApplied = eventsOnly && !hasExplicitBounds;
832
- return {
833
- nowValue,
834
- view,
835
- rangeBounds,
836
- limit,
837
- includeSources,
838
- occurrenceLimit,
839
- recurrenceLookaheadDays: eventsOnlyCapApplied ? DEFAULT_EVENTS_ONLY_LOOKAHEAD_DAYS : explicitLookahead,
840
- recurrenceLookbackWindowDays: eventsOnlyCapApplied && recurrenceLookbackDays === void 0 ? 0 : recurrenceLookbackDays,
841
- eventsOnlyCapApplied
842
- };
843
- }
844
- function appendCalendarCapWarning(warnings, capApplied) {
845
- if (!capApplied) {
846
- return;
847
- }
848
- warnings.push(`recurring_events_default_cap_applied:lookback=0d,lookahead=${DEFAULT_EVENTS_ONLY_LOOKAHEAD_DAYS}d -- use --recurrence-lookback-days/--recurrence-lookahead-days or --to for wider range`);
849
- }
850
- function buildCalendarFiltersResult(options, runtimeFieldFilters) {
851
- return {
852
- type: options.type ?? null,
853
- tag: options.tag ?? null,
854
- priority: options.priority ?? null,
855
- status: options.status ?? null,
856
- assignee: options.assignee ?? null,
857
- assignee_filter: options.assigneeFilter ?? null,
858
- sprint: options.sprint ?? null,
859
- release: options.release ?? null,
860
- runtime_filters: runtimeFieldFilters,
861
- limit: options.limit ?? null,
862
- include: options.include ?? null,
863
- full_period: options.fullPeriod === true ? "true" : null,
864
- recurrence_lookahead_days: options.recurrenceLookaheadDays ?? null,
865
- recurrence_lookback_days: options.recurrenceLookbackDays ?? null,
866
- occurrence_limit: options.occurrenceLimit ?? null
867
- };
868
- }
869
- function buildCalendarRangeResult(options, rangeBounds) {
870
- return {
871
- start: rangeBounds.start ?? null,
872
- end: rangeBounds.end ?? null,
873
- period_start: rangeBounds.periodStart ?? null,
874
- period_end: rangeBounds.periodEnd ?? null,
875
- full_period: rangeBounds.fullPeriod,
876
- past: options.past === true,
877
- from: options.from ?? null,
878
- to: options.to ?? null
879
- };
880
- }
881
- async function runCalendar(options, global) {
882
- const pmRoot = resolvePmRoot(process.cwd(), global.path);
883
- if (!await pathExists(getSettingsPath(pmRoot))) {
884
- throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
885
- }
886
- const inputs = resolveCalendarExecutionInputs(options);
887
- const settings = await readSettings(pmRoot);
888
- const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
889
- const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);
890
- const runtimeFieldFilters = collectRuntimeFilterValues(options, runtimeFieldRegistry, "calendar");
891
- const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
892
- const listWarnings = [];
893
- appendCalendarCapWarning(listWarnings, inputs.eventsOnlyCapApplied);
894
- const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, listWarnings, settings.schema);
895
- const filteredItems = filterItems(items, options, typeRegistry, statusRegistry, runtimeFieldFilters);
896
- const recurringWindow = buildRecurringEventWindow(inputs.rangeBounds.start, inputs.rangeBounds.end, inputs.nowValue, inputs.recurrenceLookbackWindowDays, inputs.recurrenceLookaheadDays);
897
- const seededEvents = buildEventSeed(filteredItems, recurringWindow, inputs.includeSources, inputs.occurrenceLimit);
898
- const rangedEvents = seededEvents.filter((event) => includeEventInWindow(event, inputs.rangeBounds.start, inputs.rangeBounds.end));
899
- const limitedEvents = inputs.limit === void 0 ? rangedEvents : rangedEvents.slice(0, inputs.limit);
900
- const days = bucketEventsByDay(limitedEvents);
901
- const warnings = [...new Set(listWarnings)].sort((left, right) => left.localeCompare(right));
902
- return {
903
- view: inputs.view,
904
- output_default: "markdown",
905
- now: inputs.nowValue,
906
- anchor: inputs.rangeBounds.anchor,
907
- range: buildCalendarRangeResult(options, inputs.rangeBounds),
908
- filters: buildCalendarFiltersResult(options, runtimeFieldFilters),
909
- summary: summarize(limitedEvents),
910
- events: limitedEvents,
911
- days,
912
- ...warnings.length > 0 ? { warnings } : {}
913
- };
914
- }
915
-
916
- // dist/cli/commands/context.js
917
- var CONTEXT_OUTPUT_VALUES = ["markdown", "toon", "json"];
918
- var HIGH_LEVEL_TYPES = /* @__PURE__ */ new Set(["Epic", "Feature"]);
919
- var DEFAULT_CONTEXT_LIMIT = 10;
920
- var STANDARD_SECTIONS = ["hierarchy", "activity", "progress", "recently_created", "unparented", "workload"];
921
- var DEEP_SECTIONS = [
922
- ...STANDARD_SECTIONS,
923
- "blockers",
924
- "files",
925
- "staleness",
926
- "tests"
927
- ];
928
- var LEADING_HYPHEN_DATE = /^(\d{4})-(\d{2})-(\d{2})/;
929
- var LEADING_COMPACT_DATE = /^(\d{4})(\d{2})(\d{2})(?:[T ]?\d{2}|$)/;
930
- var COMPACT_DATE = /^(\d{4})(\d{2})(\d{2})$/;
931
- var COMPACT_DATETIME = /^(\d{4})(\d{2})(\d{2})(?:[T\s]?)(\d{2})(\d{2})(\d{2})?(Z|[+-]\d{2}:?\d{2})?$/i;
932
- function parseOutputFormat2(raw) {
933
- if (!raw)
934
- return void 0;
935
- const normalized = raw.trim().toLowerCase();
936
- if (!CONTEXT_OUTPUT_VALUES.includes(normalized)) {
937
- throw new PmCliError("Context format must be one of markdown|toon|json", EXIT_CODE.USAGE);
938
- }
939
- return normalized;
940
- }
941
- var FOCUS_PROJECTION_FIELDS = /* @__PURE__ */ new Set([
942
- "id",
943
- "title",
944
- "type",
945
- "status",
946
- "priority",
947
- "order",
948
- "deadline",
949
- "assignee",
950
- "tags",
951
- "updated_at",
952
- "parent",
953
- "children_total",
954
- "children_closed",
955
- "completion_pct",
956
- "created_at"
957
- ]);
958
- function parseContextFocusFields(raw) {
959
- if (raw === void 0)
960
- return void 0;
961
- const fields = [];
962
- for (const token of raw.split(",")) {
963
- const normalized = token.trim().toLowerCase();
964
- if (normalized.length === 0)
965
- continue;
966
- if (!FOCUS_PROJECTION_FIELDS.has(normalized)) {
967
- throw new PmCliError(`Context --fields value not projectable: ${normalized} (valid: ${[...FOCUS_PROJECTION_FIELDS].join(", ")})`, EXIT_CODE.USAGE);
968
- }
969
- if (!fields.includes(normalized))
970
- fields.push(normalized);
971
- }
972
- if (fields.length === 0) {
973
- throw new PmCliError("Context --fields requires at least one field name", EXIT_CODE.USAGE);
974
- }
975
- return fields;
976
- }
977
- function projectContextFocusRows(rows, fields) {
978
- return rows.map((row) => {
979
- const projected = {};
980
- const source = row;
981
- for (const field of fields) {
982
- projected[field] = source[field] ?? null;
983
- }
984
- return projected;
985
- });
986
- }
987
- function resolveContextOutputFormat(options, global) {
988
- const commandFormat = parseOutputFormat2(options.format);
989
- if (global.json && commandFormat && commandFormat !== "json") {
990
- throw new PmCliError("Cannot combine --json with --format markdown|toon", EXIT_CODE.USAGE);
991
- }
992
- if (global.json) {
993
- return "json";
994
- }
995
- return commandFormat ?? "toon";
996
- }
997
- function parseContextLimit(raw, depth) {
998
- return parseIntegerLimit(raw, "--limit") ?? (depth === "full" ? Number.MAX_SAFE_INTEGER : DEFAULT_CONTEXT_LIMIT);
999
- }
1000
- function parseContextDepth(raw, settings) {
1001
- if (!raw)
1002
- return settings.default_depth;
1003
- const normalized = raw.trim().toLowerCase();
1004
- if (!CONTEXT_DEPTH_VALUES.includes(normalized)) {
1005
- throw new PmCliError(`Context --depth must be one of ${CONTEXT_DEPTH_VALUES.join("|")}`, EXIT_CODE.USAGE);
1006
- }
1007
- return normalized;
1008
- }
1009
- function parseContextSections(raw, depth, settings) {
1010
- if (raw && raw.length > 0) {
1011
- const sections = [];
1012
- for (const value of raw) {
1013
- const normalized = value.trim().toLowerCase();
1014
- if (!CONTEXT_SECTION_VALUES.includes(normalized)) {
1015
- throw new PmCliError(`Context --section must be one of ${CONTEXT_SECTION_VALUES.join("|")}`, EXIT_CODE.USAGE);
1016
- }
1017
- if (!sections.includes(normalized)) {
1018
- sections.push(normalized);
1019
- }
1020
- }
1021
- return sections;
1022
- }
1023
- if (depth === "brief")
1024
- return [];
1025
- if (depth === "full")
1026
- return [...CONTEXT_SECTION_VALUES];
1027
- const pool = depth === "deep" ? DEEP_SECTIONS : STANDARD_SECTIONS;
1028
- return pool.filter((section) => settings.sections[section]);
1029
- }
1030
- function parseActivityLimit(raw, settings) {
1031
- if (!raw)
1032
- return settings.activity_limit;
1033
- const parsed = parseIntegerLimit(raw, "--activity-limit");
1034
- return parsed ?? settings.activity_limit;
1035
- }
1036
- function parseStaleThresholdDays(raw, settings) {
1037
- if (!raw)
1038
- return settings.stale_threshold_days;
1039
- const trimmed = raw.trim().toLowerCase();
1040
- const match = /^(\d+)d?$/.exec(trimmed);
1041
- if (!match) {
1042
- throw new PmCliError("--stale-threshold must be a number of days (e.g. 7 or 7d)", EXIT_CODE.USAGE);
1043
- }
1044
- const days = parseInt(match[1], 10);
1045
- if (days <= 0) {
1046
- throw new PmCliError("--stale-threshold must be positive", EXIT_CODE.USAGE);
1047
- }
1048
- return days;
1049
- }
1050
- function statusRank(status, statusRegistry) {
1051
- const normalizedStatus = normalizeStatusForRegistry(status, statusRegistry);
1052
- const inProgressStatus = normalizeStatusInput("in_progress", statusRegistry);
1053
- const openStatus = normalizeStatusInput("open", statusRegistry);
1054
- const blockedStatus = normalizeStatusInput("blocked", statusRegistry);
1055
- const draftStatus = normalizeStatusInput("draft", statusRegistry);
1056
- if (inProgressStatus && normalizedStatus === inProgressStatus)
1057
- return 0;
1058
- if (openStatus && normalizedStatus === openStatus)
1059
- return 1;
1060
- if (blockedStatus && normalizedStatus === blockedStatus)
1061
- return 2;
1062
- if (draftStatus && normalizedStatus === draftStatus)
1063
- return 3;
1064
- if (statusRegistry.active_statuses.has(normalizedStatus))
1065
- return 4;
1066
- if (statusRegistry.blocked_statuses.has(normalizedStatus))
1067
- return 5;
1068
- if (statusRegistry.terminal_statuses.has(normalizedStatus))
1069
- return 7;
1070
- return 6;
1071
- }
1072
- function isClosedStatus(status, statusRegistry) {
1073
- const closeStatus = normalizeStatusInput("closed", statusRegistry);
1074
- return normalizeStatusForRegistry(status, statusRegistry) === closeStatus;
1075
- }
1076
- function isInProgressStatus(status, statusRegistry) {
1077
- const inProgressStatus = normalizeStatusInput("in_progress", statusRegistry);
1078
- return normalizeStatusForRegistry(status, statusRegistry) === inProgressStatus;
1079
- }
1080
- function isOpenStatus(status, statusRegistry) {
1081
- const openStatus = normalizeStatusInput("open", statusRegistry);
1082
- return normalizeStatusForRegistry(status, statusRegistry) === openStatus;
1083
- }
1084
- function isBlockedStatus(status, statusRegistry) {
1085
- return statusRegistry.blocked_statuses.has(normalizeStatusForRegistry(status, statusRegistry));
1086
- }
1087
- var LIST_PROJECTION_FLAGS = ["compact", "brief", "fields", "includeBody", "include_body", "parent"];
1088
- function stripListProjectionFlags(options) {
1089
- const copy = { ...options };
1090
- for (const key of LIST_PROJECTION_FLAGS) {
1091
- delete copy[key];
1092
- }
1093
- return copy;
1094
- }
1095
- function collectSubtreeIds(corpus, parentId) {
1096
- const target = parentId.trim().toLowerCase();
1097
- const anchor = corpus.find((item) => item.id.trim().toLowerCase() === target);
1098
- if (!anchor) {
1099
- return { ids: /* @__PURE__ */ new Set(), found: false };
1100
- }
1101
- const childrenByParent = buildChildrenByParent(corpus);
1102
- const descendants = collectDescendants(anchor.id, childrenByParent);
1103
- const ids = new Set([anchor.id, ...descendants.map((item) => item.id)].map((id) => id.trim().toLowerCase()));
1104
- return { ids, found: true };
1105
- }
1106
- function parseContextParent(raw) {
1107
- if (raw === void 0)
1108
- return void 0;
1109
- const trimmed = raw.trim();
1110
- if (trimmed.length === 0) {
1111
- throw new PmCliError("Context --parent requires an item id", EXIT_CODE.USAGE);
1112
- }
1113
- return trimmed;
1114
- }
1115
- function compareOptionalOrder(left, right) {
1116
- const leftValue = left ?? null;
1117
- const rightValue = right ?? null;
1118
- if (leftValue === null && rightValue === null)
1119
- return 0;
1120
- if (leftValue === null)
1121
- return 1;
1122
- if (rightValue === null)
1123
- return -1;
1124
- return leftValue - rightValue;
1125
- }
1126
- function compareOptionalDeadline(left, right) {
1127
- const leftValue = left ?? null;
1128
- const rightValue = right ?? null;
1129
- if (leftValue === null && rightValue === null)
1130
- return 0;
1131
- if (leftValue === null)
1132
- return 1;
1133
- if (rightValue === null)
1134
- return -1;
1135
- return compareTimestampStrings(leftValue, rightValue);
1136
- }
1137
- function daysInUtcMonth(year, monthIndex) {
1138
- return new Date(Date.UTC(year, monthIndex + 1, 0)).getUTCDate();
1139
- }
1140
- function hasNoInvalidDatePrefix(value) {
1141
- const match = LEADING_HYPHEN_DATE.exec(value) ?? LEADING_COMPACT_DATE.exec(value);
1142
- if (!match) {
1143
- return true;
1144
- }
1145
- const year = Number.parseInt(match[1], 10);
1146
- const month = Number.parseInt(match[2], 10);
1147
- const day = Number.parseInt(match[3], 10);
1148
- return month >= 1 && month <= 12 && day >= 1 && day <= daysInUtcMonth(year, month - 1);
1149
- }
1150
- function normalizeTimestampCandidate(value) {
1151
- const compactDate = COMPACT_DATE.exec(value);
1152
- if (compactDate) {
1153
- return `${compactDate[1]}-${compactDate[2]}-${compactDate[3]}`;
1154
- }
1155
- const compactDateTime = COMPACT_DATETIME.exec(value);
1156
- if (compactDateTime) {
1157
- const [, year, month, day, hour, minute, secondRaw, offsetRaw] = compactDateTime;
1158
- const second = secondRaw ? `:${secondRaw}` : "";
1159
- const offset = offsetRaw && offsetRaw.length === 5 && offsetRaw !== "Z" ? `${offsetRaw.slice(0, 3)}:${offsetRaw.slice(3)}` : offsetRaw ?? "";
1160
- return `${year}-${month}-${day}T${hour}:${minute}${second}${offset}`;
1161
- }
1162
- return value;
1163
- }
1164
- function parseContextTimestampMs(value) {
1165
- if (typeof value !== "string") {
1166
- return Number.NaN;
1167
- }
1168
- const trimmed = value.trim();
1169
- if (trimmed.length === 0 || !hasNoInvalidDatePrefix(trimmed)) {
1170
- return Number.NaN;
1171
- }
1172
- const parsed = Date.parse(normalizeTimestampCandidate(trimmed));
1173
- return Number.isFinite(parsed) ? parsed : Number.NaN;
1174
- }
1175
- function sortableTimestamp(value) {
1176
- const parsed = parseContextTimestampMs(value);
1177
- return Number.isFinite(parsed) ? new Date(parsed).toISOString() : "";
1178
- }
1179
- function dateTokenForTimestamp(value) {
1180
- const parsed = parseContextTimestampMs(value);
1181
- return Number.isFinite(parsed) ? new Date(parsed).toISOString().slice(0, 10) : "unknown";
1182
- }
1183
- function normalizedParentId(value) {
1184
- if (typeof value !== "string") {
1185
- return null;
1186
- }
1187
- const trimmed = value.trim();
1188
- return trimmed.length > 0 ? trimmed : null;
1189
- }
1190
- function compareCriticalItems(left, right, statusRegistry) {
1191
- const byStatus = statusRank(left.status, statusRegistry) - statusRank(right.status, statusRegistry);
1192
- if (byStatus !== 0)
1193
- return byStatus;
1194
- const byPriority = left.priority - right.priority;
1195
- if (byPriority !== 0)
1196
- return byPriority;
1197
- const byOrder = compareOptionalOrder(left.order, right.order);
1198
- if (byOrder !== 0)
1199
- return byOrder;
1200
- const byDeadline = compareOptionalDeadline(left.deadline, right.deadline);
1201
- if (byDeadline !== 0)
1202
- return byDeadline;
1203
- const byUpdated = compareTimestampStrings(sortableTimestamp(right.updated_at), sortableTimestamp(left.updated_at));
1204
- const byId = left.id.localeCompare(right.id);
1205
- return byUpdated !== 0 ? byUpdated : byId;
1206
- }
1207
- function completionPct(closed, total) {
1208
- return total > 0 ? Math.round(closed / total * 100) : 0;
1209
- }
1210
- function buildChildrenByParent(allItems) {
1211
- const childrenByParent = /* @__PURE__ */ new Map();
1212
- for (const item of allItems) {
1213
- const parent = normalizedParentId(item.parent);
1214
- if (!parent)
1215
- continue;
1216
- const children = childrenByParent.get(parent) ?? [];
1217
- children.push(item);
1218
- childrenByParent.set(parent, children);
1219
- }
1220
- return childrenByParent;
1221
- }
1222
- function toContextFocusItem(item, statusRegistry, childrenByParent) {
1223
- const focus = {
1224
- id: item.id,
1225
- title: item.title,
1226
- type: item.type,
1227
- status: item.status,
1228
- priority: item.priority,
1229
- order: item.order ?? null,
1230
- deadline: item.deadline ?? null,
1231
- assignee: item.assignee ?? null,
1232
- tags: Array.isArray(item.tags) ? [...item.tags] : [],
1233
- updated_at: item.updated_at,
1234
- parent: normalizedParentId(item.parent)
1235
- };
1236
- if (statusRegistry && childrenByParent) {
1237
- const descendants = collectDescendants(item.id, childrenByParent);
1238
- const total = descendants.length;
1239
- if (total > 0) {
1240
- const closed = descendants.filter((desc) => isClosedStatus(desc.status, statusRegistry)).length;
1241
- focus.children_total = total;
1242
- focus.children_closed = closed;
1243
- focus.completion_pct = completionPct(closed, total);
1244
- }
1245
- }
1246
- return focus;
1247
- }
1248
- function summarizeAgenda(events) {
1249
- let deadlines = 0;
1250
- let reminders = 0;
1251
- let scheduled = 0;
1252
- const itemIds = /* @__PURE__ */ new Set();
1253
- for (const event of events) {
1254
- itemIds.add(event.item_id);
1255
- if (event.kind === "deadline") {
1256
- deadlines += 1;
1257
- continue;
1258
- }
1259
- if (event.kind === "reminder") {
1260
- reminders += 1;
1261
- continue;
1262
- }
1263
- scheduled += 1;
1264
- }
1265
- return {
1266
- events: events.length,
1267
- items: itemIds.size,
1268
- deadlines,
1269
- reminders,
1270
- scheduled
1271
- };
1272
- }
1273
- function mergeSortedWarnings(...warningGroups) {
1274
- return [...new Set(warningGroups.flatMap((group) => group ?? []))].sort((left, right) => left.localeCompare(right));
1275
- }
1276
- function filterTerminalCalendarEvents(events, statusRegistry) {
1277
- return events.filter((event) => !statusRegistry.terminal_statuses.has(normalizeStatusForRegistry(event.item_status, statusRegistry)));
1278
- }
1279
- function buildHierarchy(allItems, activeItems, statusRegistry, limit) {
1280
- const itemMap = /* @__PURE__ */ new Map();
1281
- for (const item of allItems) {
1282
- itemMap.set(item.id, item);
1283
- }
1284
- const childrenByParent = buildChildrenByParent(allItems);
1285
- const activeHighLevelIds = new Set(activeItems.filter((item) => HIGH_LEVEL_TYPES.has(item.type)).map((item) => item.id));
1286
- const nodes = [];
1287
- for (const parentId of activeHighLevelIds) {
1288
- const parent = itemMap.get(parentId);
1289
- if (!parent)
1290
- continue;
1291
- const allDescendants = collectDescendants(parentId, childrenByParent);
1292
- const childItems = childrenByParent.get(parentId) ?? [];
1293
- let closedCount = 0;
1294
- let openCount = 0;
1295
- let inProgressCount = 0;
1296
- let blockedCount = 0;
1297
- for (const desc of allDescendants) {
1298
- if (isClosedStatus(desc.status, statusRegistry))
1299
- closedCount++;
1300
- else if (isInProgressStatus(desc.status, statusRegistry))
1301
- inProgressCount++;
1302
- else if (isBlockedStatus(desc.status, statusRegistry))
1303
- blockedCount++;
1304
- else if (isOpenStatus(desc.status, statusRegistry))
1305
- openCount++;
1306
- }
1307
- const children = childItems.sort((a, b) => compareCriticalItems(a, b, statusRegistry)).slice(0, limit).map((child) => {
1308
- const grandchildren = collectDescendants(child.id, childrenByParent);
1309
- const gcClosed = grandchildren.filter((gc) => isClosedStatus(gc.status, statusRegistry)).length;
1310
- return {
1311
- id: child.id,
1312
- title: child.title,
1313
- type: child.type,
1314
- status: child.status,
1315
- children_total: grandchildren.length,
1316
- children_closed: gcClosed
1317
- };
1318
- });
1319
- nodes.push({
1320
- id: parent.id,
1321
- title: parent.title,
1322
- type: parent.type,
1323
- status: parent.status,
1324
- children_total: allDescendants.length,
1325
- children_closed: closedCount,
1326
- children_open: openCount,
1327
- children_in_progress: inProgressCount,
1328
- children_blocked: blockedCount,
1329
- children
1330
- });
1331
- }
1332
- return nodes.sort((a, b) => {
1333
- const aParent = itemMap.get(a.id);
1334
- const bParent = itemMap.get(b.id);
1335
- return compareCriticalItems(aParent, bParent, statusRegistry);
1336
- }).slice(0, limit);
1337
- }
1338
- function collectDescendants(parentId, childrenByParent) {
1339
- const result = [];
1340
- const stack = [parentId];
1341
- const visited = /* @__PURE__ */ new Set();
1342
- while (stack.length > 0) {
1343
- const current = stack.pop();
1344
- if (visited.has(current))
1345
- continue;
1346
- visited.add(current);
1347
- const children = childrenByParent.get(current) ?? [];
1348
- for (const child of children) {
1349
- result.push(child);
1350
- stack.push(child.id);
1351
- }
1352
- }
1353
- return result;
1354
- }
1355
- var _testOnly = {
1356
- buildActivity,
1357
- buildBlockers,
1358
- buildChildrenByParent,
1359
- buildHierarchy,
1360
- buildHotFiles,
1361
- buildProgress,
1362
- buildRecentlyCreated,
1363
- buildStaleness,
1364
- buildTestHealth,
1365
- buildUnparented,
1366
- buildWorkload,
1367
- collectDescendants,
1368
- collectSubtreeIds,
1369
- compareCriticalItems,
1370
- compareOptionalDeadline,
1371
- compareOptionalOrder,
1372
- completionPct,
1373
- dateTokenForTimestamp,
1374
- filterTerminalCalendarEvents,
1375
- isBlockedStatus,
1376
- isClosedStatus,
1377
- isInProgressStatus,
1378
- isOpenStatus,
1379
- mergeSortedWarnings,
1380
- normalizedParentId,
1381
- parseActivityLimit,
1382
- parseContextLimit,
1383
- parseContextParent,
1384
- parseContextTimestampMs,
1385
- parseStaleThresholdDays,
1386
- sortableTimestamp,
1387
- statusRank,
1388
- stripListProjectionFlags,
1389
- summarizeAgenda,
1390
- toContextFocusItem
1391
- };
1392
- async function buildActivity(activityLimit, global) {
1393
- const result = await runActivity({ compact: true, limit: String(activityLimit) }, global);
1394
- return result.compact_activity ?? [];
1395
- }
1396
- function buildProgress(allItems, activeItems, statusRegistry, limit) {
1397
- const childrenByParent = /* @__PURE__ */ new Map();
1398
- for (const item of allItems) {
1399
- if (!item.parent)
1400
- continue;
1401
- const children = childrenByParent.get(item.parent) ?? [];
1402
- children.push(item);
1403
- childrenByParent.set(item.parent, children);
1404
- }
1405
- const activeHighLevel = activeItems.filter((item) => HIGH_LEVEL_TYPES.has(item.type));
1406
- const entries = [];
1407
- for (const parent of activeHighLevel) {
1408
- const descendants = collectDescendants(parent.id, childrenByParent);
1409
- const total = descendants.length;
1410
- if (total === 0)
1411
- continue;
1412
- let closed = 0;
1413
- let open = 0;
1414
- let inProgress = 0;
1415
- let blocked = 0;
1416
- for (const desc of descendants) {
1417
- if (isClosedStatus(desc.status, statusRegistry))
1418
- closed++;
1419
- else if (isInProgressStatus(desc.status, statusRegistry))
1420
- inProgress++;
1421
- else if (isBlockedStatus(desc.status, statusRegistry))
1422
- blocked++;
1423
- else if (isOpenStatus(desc.status, statusRegistry))
1424
- open++;
1425
- }
1426
- entries.push({
1427
- id: parent.id,
1428
- title: parent.title,
1429
- type: parent.type,
1430
- total,
1431
- closed,
1432
- open,
1433
- in_progress: inProgress,
1434
- blocked,
1435
- completion_pct: completionPct(closed, total)
1436
- });
1437
- }
1438
- return entries.sort((a, b) => a.completion_pct - b.completion_pct).slice(0, limit);
1439
- }
1440
- function buildBlockers(blockedItems, itemMap, limit) {
1441
- return blockedItems.slice(0, limit).map((item) => {
1442
- const blockerItem = item.blocked_by ? itemMap.get(item.blocked_by) : void 0;
1443
- return {
1444
- id: item.id,
1445
- title: item.title,
1446
- blocked_by: item.blocked_by ?? null,
1447
- blocked_by_title: blockerItem?.title ?? null,
1448
- blocked_by_status: blockerItem?.status ?? null,
1449
- blocked_reason: item.blocked_reason ?? null,
1450
- unblock_note: item.unblock_note ?? null
1451
- };
1452
- });
1453
- }
1454
- function buildHotFiles(activeItems, limit) {
1455
- const fileMap = /* @__PURE__ */ new Map();
1456
- for (const item of activeItems) {
1457
- for (const file of item.files ?? []) {
1458
- const existing = fileMap.get(file.path) ?? /* @__PURE__ */ new Set();
1459
- existing.add(item.id);
1460
- fileMap.set(file.path, existing);
1461
- }
1462
- }
1463
- return [...fileMap.entries()].map(([filePath, itemIds]) => ({
1464
- path: filePath,
1465
- references: itemIds.size,
1466
- items: [...itemIds].sort()
1467
- })).sort((a, b) => b.references - a.references).slice(0, limit);
1468
- }
1469
- function buildWorkload(activeItems, statusRegistry, limit) {
1470
- const groups = /* @__PURE__ */ new Map();
1471
- for (const item of activeItems) {
1472
- const key = item.assignee ?? null;
1473
- const existing = groups.get(key) ?? [];
1474
- existing.push(item);
1475
- groups.set(key, existing);
1476
- }
1477
- return [...groups.entries()].map(([assignee, items]) => ({
1478
- assignee,
1479
- active: items.length,
1480
- in_progress: items.filter((item) => isInProgressStatus(item.status, statusRegistry)).length,
1481
- items: items.map((item) => item.id).sort()
1482
- })).sort((a, b) => b.active - a.active).slice(0, limit);
1483
- }
1484
- function buildStaleness(allNonTerminal, staleThresholdDays, now, limit) {
1485
- const cutoffMs = new Date(now).getTime() - staleThresholdDays * 24 * 60 * 60 * 1e3;
1486
- return allNonTerminal.filter((item) => new Date(item.updated_at).getTime() < cutoffMs).map((item) => ({
1487
- id: item.id,
1488
- title: item.title,
1489
- status: item.status,
1490
- updated_at: item.updated_at,
1491
- stale_days: Math.floor((new Date(now).getTime() - new Date(item.updated_at).getTime()) / (24 * 60 * 60 * 1e3))
1492
- })).sort((a, b) => b.stale_days - a.stale_days).slice(0, limit);
1493
- }
1494
- function buildRecentlyCreated(allNonTerminal, statusRegistry, childrenByParent, limit) {
1495
- return allNonTerminal.map((item) => ({ item, sortKey: sortableTimestamp(item.created_at) })).sort((left, right) => {
1496
- const byCreated = compareTimestampStrings(right.sortKey, left.sortKey);
1497
- return byCreated !== 0 ? byCreated : left.item.id.localeCompare(right.item.id);
1498
- }).slice(0, limit).map(({ item }) => ({
1499
- ...toContextFocusItem(item, statusRegistry, childrenByParent),
1500
- created_at: item.created_at
1501
- }));
1502
- }
1503
- function buildUnparented(allNonTerminal, statusRegistry, childrenByParent, limit) {
1504
- return allNonTerminal.filter((item) => !normalizedParentId(item.parent) && !HIGH_LEVEL_TYPES.has(item.type)).sort((left, right) => compareCriticalItems(left, right, statusRegistry)).slice(0, limit).map((item) => toContextFocusItem(item, statusRegistry, childrenByParent));
1505
- }
1506
- function buildTestHealth(activeItems) {
1507
- let itemsWithTests = 0;
1508
- let itemsWithRecentRuns = 0;
1509
- let passed = 0;
1510
- let failed = 0;
1511
- let skipped = 0;
1512
- const itemsFailing = [];
1513
- for (const item of activeItems) {
1514
- if ((item.tests ?? []).length > 0) {
1515
- itemsWithTests++;
1516
- }
1517
- const runs = item.test_runs ?? [];
1518
- if (runs.length > 0) {
1519
- itemsWithRecentRuns++;
1520
- let itemHasFailure = false;
1521
- for (const run of runs) {
1522
- passed += run.passed ?? 0;
1523
- failed += run.failed ?? 0;
1524
- skipped += run.skipped ?? 0;
1525
- if ((run.failed ?? 0) > 0) {
1526
- itemHasFailure = true;
1527
- }
1528
- }
1529
- if (itemHasFailure) {
1530
- itemsFailing.push(item.id);
1531
- }
1532
- }
1533
- }
1534
- return {
1535
- items_with_tests: itemsWithTests,
1536
- items_with_recent_runs: itemsWithRecentRuns,
1537
- recent_runs: { passed, failed, skipped },
1538
- items_failing: itemsFailing.sort()
1539
- };
1540
- }
1541
- function formatClock2(timestamp) {
1542
- return `${new Date(timestamp).toISOString().slice(11, 16)}Z`;
1543
- }
1544
- function formatFocusLine(item) {
1545
- const orderToken = item.order === null ? "-" : String(item.order);
1546
- const deadlineToken = item.deadline ?? "-";
1547
- const parentToken = item.parent ? ` parent:${item.parent}` : "";
1548
- const progressToken = item.children_total !== void 0 && item.children_closed !== void 0 && item.completion_pct !== void 0 ? ` children:${item.children_closed}/${item.children_total} done:${item.completion_pct}%` : "";
1549
- return `${item.id} p${item.priority} ${item.status} ${item.type} order:${orderToken} deadline:${deadlineToken}${parentToken}${progressToken} ${item.title}`;
1550
- }
1551
- function formatProjectedFocusLine(item, fields) {
1552
- const source = item;
1553
- return fields.map((field) => {
1554
- const value = source[field];
1555
- if (Array.isArray(value))
1556
- return `${field}:${value.join(",")}`;
1557
- return `${field}:${value ?? "-"}`;
1558
- }).join(" ");
1559
- }
1560
- function formatAgendaLine(event) {
1561
- const base = `${formatClock2(event.at)} [${event.kind}] ${event.item_id} p${event.item_priority} ${event.item_status} ${event.item_title}`;
1562
- if (event.kind === "reminder") {
1563
- return `${base} \u2014 ${event.reminder_text}`;
1564
- }
1565
- if (event.kind === "event") {
1566
- const recurringSuffix = event.event_recurring ? " (recurring)" : "";
1567
- const title = event.event_title ?? event.item_title;
1568
- return `${base} \u2014 ${title}${recurringSuffix}`;
1569
- }
1570
- return base;
1571
- }
1572
- function pushContextFocusSection(lines, title, rows, emptyText, renderFocus) {
1573
- lines.push(`## ${title}`);
1574
- if (rows.length === 0) {
1575
- lines.push(emptyText);
1576
- } else {
1577
- for (const item of rows) {
1578
- lines.push(`- ${renderFocus(item)}`);
1579
- }
1580
- }
1581
- lines.push("");
1582
- }
1583
- function pushBlockedFallbackSection(lines, result, renderFocus) {
1584
- if (result.blocked_fallback.length === 0) {
1585
- return;
1586
- }
1587
- lines.push("## Blocked fallback");
1588
- for (const item of result.blocked_fallback) {
1589
- lines.push(`- ${renderFocus(item)}`);
1590
- }
1591
- lines.push("");
1592
- }
1593
- function pushAgendaSection(lines, result) {
1594
- lines.push("## Agenda");
1595
- lines.push(`- events: ${result.agenda.summary.events} (deadlines: ${result.agenda.summary.deadlines}, reminders: ${result.agenda.summary.reminders}, scheduled: ${result.agenda.summary.scheduled})`);
1596
- if (result.agenda.events.length === 0) {
1597
- lines.push("No agenda events matched the selected filters.");
1598
- } else {
1599
- for (const event of result.agenda.events) {
1600
- lines.push(`- ${formatAgendaLine(event)}`);
1601
- }
1602
- }
1603
- lines.push("");
1604
- }
1605
- function pushHierarchySection(lines, result) {
1606
- if (!result.hierarchy || result.hierarchy.length === 0) {
1607
- return;
1608
- }
1609
- lines.push("## Hierarchy");
1610
- for (const node of result.hierarchy) {
1611
- const pct = node.children_total > 0 ? Math.round(node.children_closed / node.children_total * 100) : 0;
1612
- lines.push(`- ${node.id} ${node.type} ${node.status} "${node.title}" [${node.children_closed}/${node.children_total} done ${pct}%]`);
1613
- for (const child of node.children) {
1614
- const cpct = child.children_total > 0 ? Math.round(child.children_closed / child.children_total * 100) : 0;
1615
- lines.push(` - ${child.id} ${child.type} ${child.status} "${child.title}" [${child.children_closed}/${child.children_total} done ${cpct}%]`);
1616
- }
1617
- }
1618
- lines.push("");
1619
- }
1620
- function pushProgressSection(lines, result) {
1621
- if (!result.progress || result.progress.length === 0) {
1622
- return;
1623
- }
1624
- lines.push("## Progress");
1625
- for (const entry of result.progress) {
1626
- lines.push(`- ${entry.id} "${entry.title}" ${entry.completion_pct}% (${entry.closed}/${entry.total} closed, ${entry.in_progress} wip, ${entry.open} open, ${entry.blocked} blocked)`);
1627
- }
1628
- lines.push("");
1629
- }
1630
- function pushRecentlyCreatedSection(lines, result, focusFields, renderFocus) {
1631
- if (!result.recently_created || result.recently_created.length === 0) {
1632
- return;
1633
- }
1634
- lines.push("## Recently created");
1635
- for (const item of result.recently_created) {
1636
- lines.push(focusFields ? `- ${renderFocus(item)}` : `- ${dateTokenForTimestamp(item.created_at)} ${formatFocusLine(item)}`);
1637
- }
1638
- lines.push("");
1639
- }
1640
- function pushUnparentedSection(lines, result, renderFocus) {
1641
- if (!result.unparented || result.unparented.length === 0) {
1642
- return;
1643
- }
1644
- lines.push("## Unparented");
1645
- for (const item of result.unparented) {
1646
- lines.push(`- ${renderFocus(item)}`);
1647
- }
1648
- lines.push("");
1649
- }
1650
- function pushActivitySection(lines, result) {
1651
- if (!result.activity || result.activity.length === 0) {
1652
- return;
1653
- }
1654
- lines.push("## Recent activity");
1655
- for (const entry of result.activity) {
1656
- const msg = entry.msg ? ` ${entry.msg}` : "";
1657
- lines.push(`- ${entry.ts.slice(0, 16)}Z ${entry.id} ${entry.op} by:${entry.author}${msg}`);
1658
- }
1659
- lines.push("");
1660
- }
1661
- function pushBlockersSection(lines, result) {
1662
- if (!result.blockers || result.blockers.length === 0) {
1663
- return;
1664
- }
1665
- lines.push("## Blockers");
1666
- for (const entry of result.blockers) {
1667
- const by = entry.blocked_by ? `blocked_by:${entry.blocked_by}(${entry.blocked_by_status ?? "?"})` : "blocked_by:-";
1668
- const reason = entry.blocked_reason ? ` reason:"${entry.blocked_reason}"` : "";
1669
- const note = entry.unblock_note ? ` unblock:"${entry.unblock_note}"` : "";
1670
- lines.push(`- ${entry.id} "${entry.title}" ${by}${reason}${note}`);
1671
- }
1672
- lines.push("");
1673
- }
1674
- function pushFilesSection(lines, result) {
1675
- if (!result.files || result.files.length === 0) {
1676
- return;
1677
- }
1678
- lines.push("## Hot files");
1679
- for (const file of result.files) {
1680
- lines.push(`- ${file.path} refs:${file.references} items:[${file.items.join(",")}]`);
1681
- }
1682
- lines.push("");
1683
- }
1684
- function pushWorkloadSection(lines, result) {
1685
- if (!result.workload || result.workload.length === 0) {
1686
- return;
1687
- }
1688
- lines.push("## Workload");
1689
- for (const entry of result.workload) {
1690
- const who = entry.assignee ?? "(unassigned)";
1691
- lines.push(`- ${who} active:${entry.active} wip:${entry.in_progress} items:[${entry.items.join(",")}]`);
1692
- }
1693
- lines.push("");
1694
- }
1695
- function pushStalenessSection(lines, result) {
1696
- if (!result.staleness || result.staleness.length === 0) {
1697
- return;
1698
- }
1699
- lines.push("## Stale items");
1700
- for (const entry of result.staleness) {
1701
- lines.push(`- ${entry.id} ${entry.status} stale:${entry.stale_days}d last:${entry.updated_at.slice(0, 10)} "${entry.title}"`);
1702
- }
1703
- lines.push("");
1704
- }
1705
- function pushTestHealthSection(lines, result) {
1706
- if (!result.tests) {
1707
- return;
1708
- }
1709
- lines.push("## Test health");
1710
- lines.push(`- items_with_tests: ${result.tests.items_with_tests}`);
1711
- lines.push(`- items_with_recent_runs: ${result.tests.items_with_recent_runs}`);
1712
- lines.push(`- passed: ${result.tests.recent_runs.passed}, failed: ${result.tests.recent_runs.failed}, skipped: ${result.tests.recent_runs.skipped}`);
1713
- if (result.tests.items_failing.length > 0) {
1714
- lines.push(`- items_failing: [${result.tests.items_failing.join(",")}]`);
1715
- }
1716
- lines.push("");
1717
- }
1718
- function pushEmptyContextSuggestions(lines, result) {
1719
- const isEmpty = result.summary.active_items === 0 && result.summary.blocked === 0 && result.agenda.summary.events === 0;
1720
- if (!isEmpty) {
1721
- return;
1722
- }
1723
- lines.push("## Suggestions");
1724
- lines.push("No active work items or upcoming events. Consider:");
1725
- lines.push('- `pm create --type Task --title "..."` to add a new work item');
1726
- lines.push("- `pm list --status closed --limit 5` to review recent completions");
1727
- lines.push("- `pm search <keywords>` to find related past work");
1728
- lines.push("- `pm aggregate` for a full project status overview");
1729
- }
1730
- function renderContextMarkdown(result) {
1731
- const lines = [];
1732
- const focusFields = result.focus_fields;
1733
- const renderFocus = (item) => focusFields ? formatProjectedFocusLine(item, focusFields) : formatFocusLine(item);
1734
- lines.push("# pm context");
1735
- lines.push("");
1736
- lines.push(`- now: ${result.now}`);
1737
- lines.push(`- depth: ${result.depth}`);
1738
- if (result.filters.parent) {
1739
- lines.push(`- scope: subtree of ${result.filters.parent}`);
1740
- }
1741
- lines.push(`- active_items: ${result.summary.active_items} (in_progress: ${result.summary.in_progress}, open: ${result.summary.open})`);
1742
- if (result.summary.total_items !== void 0) {
1743
- lines.push(`- total_items: ${result.summary.total_items} (closed: ${result.summary.closed ?? 0}, canceled: ${result.summary.canceled ?? 0})`);
1744
- }
1745
- lines.push(`- agenda_events: ${result.summary.agenda_events}`);
1746
- lines.push(`- blocked_fallback_used: ${result.summary.blocked_fallback_used}`);
1747
- const renderedSections = result.sections_included.filter((section) => section !== "blockers" || (result.blockers?.length ?? 0) > 0);
1748
- if (renderedSections.length > 0) {
1749
- lines.push(`- sections: ${renderedSections.join(", ")}`);
1750
- }
1751
- lines.push("");
1752
- pushContextFocusSection(lines, "High-level focus", result.high_level, "No high-level active items.", renderFocus);
1753
- pushContextFocusSection(lines, "Low-level focus", result.low_level, "No low-level active items.", renderFocus);
1754
- pushBlockedFallbackSection(lines, result, renderFocus);
1755
- pushAgendaSection(lines, result);
1756
- pushHierarchySection(lines, result);
1757
- pushProgressSection(lines, result);
1758
- pushRecentlyCreatedSection(lines, result, focusFields, renderFocus);
1759
- pushUnparentedSection(lines, result, renderFocus);
1760
- pushActivitySection(lines, result);
1761
- pushBlockersSection(lines, result);
1762
- pushFilesSection(lines, result);
1763
- pushWorkloadSection(lines, result);
1764
- pushStalenessSection(lines, result);
1765
- pushTestHealthSection(lines, result);
1766
- pushEmptyContextSuggestions(lines, result);
1767
- return lines.join("\n");
1768
- }
1769
- async function resolveContextRuntime(options, global) {
1770
- const pmRoot = resolvePmRoot(process.cwd(), global.path);
1771
- const settings = await readSettings(pmRoot);
1772
- const contextSettings = settings.context ?? SETTINGS_DEFAULTS.context;
1773
- const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
1774
- const depth = parseContextDepth(options.depth, contextSettings);
1775
- return {
1776
- settings,
1777
- contextSettings,
1778
- statusRegistry,
1779
- depth,
1780
- limit: parseContextLimit(options.limit, depth),
1781
- sectionsIncluded: parseContextSections(options.section, depth, contextSettings),
1782
- activityLimit: parseActivityLimit(options.activityLimit, contextSettings),
1783
- staleThresholdDays: parseStaleThresholdDays(options.staleThreshold, contextSettings),
1784
- parentScope: parseContextParent(options.parent),
1785
- focusFields: parseContextFocusFields(options.fields),
1786
- baseListOptions: stripListProjectionFlags(options)
1787
- };
1788
- }
1789
- function contextNeedsAllItems(sectionsIncluded) {
1790
- return sectionsIncluded.some((section) => ["hierarchy", "progress", "blockers", "staleness", "recently_created", "unparented"].includes(section));
1791
- }
1792
- function buildUnpaginatedContextListOptions(baseListOptions, extra) {
1793
- return {
1794
- ...baseListOptions,
1795
- ...extra,
1796
- noTruncate: true,
1797
- limit: void 0,
1798
- offset: void 0
1799
- };
1800
- }
1801
- async function loadContextCorpus(options, global, runtime) {
1802
- const needsAllItems = contextNeedsAllItems(runtime.sectionsIncluded);
1803
- const listOptions = runtime.parentScope === void 0 ? { ...runtime.baseListOptions, excludeTerminal: true } : buildUnpaginatedContextListOptions(runtime.baseListOptions, { excludeTerminal: true });
1804
- const listed = await runList(void 0, listOptions, global);
1805
- let listedFrontMatter = listed.items;
1806
- let allItems = listedFrontMatter;
1807
- if (needsAllItems || runtime.parentScope !== void 0) {
1808
- const allListed = await runList(void 0, buildUnpaginatedContextListOptions(runtime.baseListOptions, { excludeTerminal: false }), global);
1809
- allItems = allListed.items;
1810
- }
1811
- const fullCorpus = allItems;
1812
- const subtreeIds = resolveContextSubtreeIds(runtime.parentScope, fullCorpus);
1813
- if (subtreeIds) {
1814
- listedFrontMatter = listedFrontMatter.filter((item) => subtreeIds.has(item.id.trim().toLowerCase()));
1815
- allItems = allItems.filter((item) => subtreeIds.has(item.id.trim().toLowerCase()));
1816
- }
1817
- return { listed, listedFrontMatter, allItems, fullCorpus, subtreeIds };
1818
- }
1819
- function resolveContextSubtreeIds(parentScope, fullCorpus) {
1820
- if (parentScope === void 0) {
1821
- return void 0;
1822
- }
1823
- const subtree = collectSubtreeIds(fullCorpus, parentScope);
1824
- if (!subtree.found) {
1825
- throw new PmCliError(`Context --parent item not found: ${parentScope}`, EXIT_CODE.NOT_FOUND);
1826
- }
1827
- return subtree.ids;
1828
- }
1829
- function resolveContextFocusGroups(listedFrontMatter, allItems, statusRegistry, sectionsIncluded, limit) {
1830
- const ranked = [...listedFrontMatter].sort((left, right) => compareCriticalItems(left, right, statusRegistry));
1831
- const activeStatuses = statusRegistry.active_statuses;
1832
- const activeItems = ranked.filter((item) => activeStatuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
1833
- const blockedItems = ranked.filter((item) => statusRegistry.blocked_statuses.has(normalizeStatusForRegistry(item.status, statusRegistry)));
1834
- const childrenByParent = buildChildrenByParent(allItems);
1835
- const focusChildrenByParent = contextNeedsAllItems(sectionsIncluded) ? childrenByParent : void 0;
1836
- const highLevel = activeItems.filter((item) => HIGH_LEVEL_TYPES.has(item.type)).slice(0, limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
1837
- const lowLevel = activeItems.filter((item) => !HIGH_LEVEL_TYPES.has(item.type)).slice(0, limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent));
1838
- const blockedFallbackUsed = activeItems.length === 0;
1839
- return {
1840
- activeItems,
1841
- blockedItems,
1842
- highLevel,
1843
- lowLevel,
1844
- blockedFallback: blockedFallbackUsed ? blockedItems.slice(0, limit).map((item) => toContextFocusItem(item, statusRegistry, focusChildrenByParent)) : [],
1845
- blockedFallbackUsed
1846
- };
1847
- }
1848
- async function buildContextAgenda(options, global, runtime, subtreeIds) {
1849
- const calendarOptions = {
1850
- ...runtime.baseListOptions,
1851
- view: "agenda",
1852
- include: "all",
1853
- limit: runtime.parentScope === void 0 ? String(runtime.limit) : void 0
1854
- };
1855
- const agenda = await runCalendar(calendarOptions, global);
1856
- const scopedAgenda = subtreeIds === void 0 ? agenda.events : agenda.events.filter((event) => subtreeIds.has(event.item_id.trim().toLowerCase()));
1857
- const agendaEvents = filterTerminalCalendarEvents(scopedAgenda, runtime.statusRegistry).slice(0, runtime.limit);
1858
- return { agenda, agendaEvents, agendaSummary: summarizeAgenda(agendaEvents) };
1859
- }
1860
- function countContextStatus(items, status, statusRegistry) {
1861
- const targetStatus = String(status);
1862
- return items.filter((item) => normalizeStatusForRegistry(item.status, statusRegistry) === targetStatus).length;
1863
- }
1864
- async function buildOptionalContextSections(params) {
1865
- const { runtime, allItems, fullCorpus, focusGroups, now, global } = params;
1866
- const childrenByParent = buildChildrenByParent(allItems);
1867
- const itemMap = new Map(fullCorpus.map((item) => [item.id, item]));
1868
- const allNonTerminal = allItems.filter((item) => !isTerminalStatus(item.status, runtime.statusRegistry));
1869
- const has = (section) => runtime.sectionsIncluded.includes(section);
1870
- return {
1871
- hierarchy: has("hierarchy") ? buildHierarchy(allItems, focusGroups.activeItems, runtime.statusRegistry, runtime.limit) : void 0,
1872
- activity: has("activity") ? await buildActivity(runtime.activityLimit, global) : void 0,
1873
- progress: has("progress") ? buildProgress(allItems, focusGroups.activeItems, runtime.statusRegistry, runtime.limit) : void 0,
1874
- blockersSection: has("blockers") ? buildBlockers(focusGroups.blockedItems, itemMap, runtime.limit) : void 0,
1875
- recentlyCreated: has("recently_created") ? buildRecentlyCreated(allNonTerminal, runtime.statusRegistry, childrenByParent, runtime.limit) : void 0,
1876
- unparented: has("unparented") ? buildUnparented(allNonTerminal, runtime.statusRegistry, childrenByParent, runtime.limit) : void 0,
1877
- filesSection: has("files") ? buildHotFiles(focusGroups.activeItems, runtime.limit) : void 0,
1878
- workload: has("workload") ? buildWorkload(focusGroups.activeItems, runtime.statusRegistry, runtime.limit) : void 0,
1879
- staleness: has("staleness") ? buildStaleness(allNonTerminal, runtime.staleThresholdDays, now, runtime.limit) : void 0,
1880
- tests: has("tests") ? buildTestHealth(focusGroups.activeItems) : void 0
1881
- };
1882
- }
1883
- function buildContextSummaryExtras(needsAllItems, allItems, statusRegistry) {
1884
- if (!needsAllItems) {
1885
- return {};
1886
- }
1887
- const canceledStatus = normalizeStatusInput("canceled", statusRegistry);
1888
- return {
1889
- total_items: allItems.length,
1890
- closed: allItems.filter((item) => isClosedStatus(item.status, statusRegistry)).length,
1891
- canceled: allItems.filter((item) => normalizeStatusForRegistry(item.status, statusRegistry) === canceledStatus).length
1892
- };
1893
- }
1894
- function attachOptionalContextSections(result, sections) {
1895
- if (sections.hierarchy)
1896
- result.hierarchy = sections.hierarchy;
1897
- if (sections.activity)
1898
- result.activity = sections.activity;
1899
- if (sections.progress)
1900
- result.progress = sections.progress;
1901
- if (sections.blockersSection)
1902
- result.blockers = sections.blockersSection;
1903
- if (sections.recentlyCreated)
1904
- result.recently_created = sections.recentlyCreated;
1905
- if (sections.unparented)
1906
- result.unparented = sections.unparented;
1907
- if (sections.filesSection)
1908
- result.files = sections.filesSection;
1909
- if (sections.workload)
1910
- result.workload = sections.workload;
1911
- if (sections.staleness)
1912
- result.staleness = sections.staleness;
1913
- if (sections.tests)
1914
- result.tests = sections.tests;
1915
- }
1916
- function applyContextFocusProjection(result, focusFields) {
1917
- if (!focusFields) {
1918
- return;
1919
- }
1920
- result.focus_fields = focusFields;
1921
- result.high_level = projectContextFocusRows(result.high_level, focusFields);
1922
- result.low_level = projectContextFocusRows(result.low_level, focusFields);
1923
- result.blocked_fallback = projectContextFocusRows(result.blocked_fallback, focusFields);
1924
- if (result.recently_created) {
1925
- result.recently_created = projectContextFocusRows(result.recently_created, focusFields);
1926
- }
1927
- if (result.unparented) {
1928
- result.unparented = projectContextFocusRows(result.unparented, focusFields);
1929
- }
1930
- }
1931
- function maybeAttachEmptyContextSuggestions(result, activeItems, blockedItems) {
1932
- if (activeItems.length > 0 || blockedItems.length > 0 || result.agenda.events.length > 0) {
1933
- return;
1934
- }
1935
- result.suggestions = [
1936
- 'pm create --type Task --title "..." to add a new work item',
1937
- "pm list --status closed --limit 5 to review recent completions",
1938
- "pm search <keywords> to find related past work",
1939
- "pm aggregate for a full project status overview"
1940
- ];
1941
- }
1942
- async function runContext(options, global) {
1943
- const runtime = await resolveContextRuntime(options, global);
1944
- const corpus = await loadContextCorpus(options, global, runtime);
1945
- const focusGroups = resolveContextFocusGroups(corpus.listedFrontMatter, corpus.allItems, runtime.statusRegistry, runtime.sectionsIncluded, runtime.limit);
1946
- const agendaContext = await buildContextAgenda(options, global, runtime, corpus.subtreeIds);
1947
- const warnings = mergeSortedWarnings(corpus.listed.warnings, agendaContext.agenda.warnings);
1948
- const inProgressCount = countContextStatus(focusGroups.activeItems, normalizeStatusInput("in_progress", runtime.statusRegistry), runtime.statusRegistry);
1949
- const openCount = countContextStatus(focusGroups.activeItems, normalizeStatusInput("open", runtime.statusRegistry), runtime.statusRegistry);
1950
- const sections = await buildOptionalContextSections({
1951
- runtime,
1952
- allItems: corpus.allItems,
1953
- fullCorpus: corpus.fullCorpus,
1954
- focusGroups,
1955
- now: agendaContext.agenda.now,
1956
- global
1957
- });
1958
- const summaryExtras = buildContextSummaryExtras(contextNeedsAllItems(runtime.sectionsIncluded), corpus.allItems, runtime.statusRegistry);
1959
- const result = {
1960
- output_default: "toon",
1961
- now: agendaContext.agenda.now,
1962
- depth: runtime.depth,
1963
- sections_included: runtime.sectionsIncluded,
1964
- window: {
1965
- anchor: agendaContext.agenda.anchor,
1966
- start: agendaContext.agenda.range.start,
1967
- end: agendaContext.agenda.range.end,
1968
- past: agendaContext.agenda.range.past,
1969
- from: agendaContext.agenda.range.from,
1970
- to: agendaContext.agenda.range.to
1971
- },
1972
- filters: {
1973
- type: options.type ?? null,
1974
- tag: options.tag ?? null,
1975
- priority: options.priority ?? null,
1976
- assignee: options.assignee ?? null,
1977
- assignee_filter: options.assigneeFilter ?? null,
1978
- sprint: options.sprint ?? null,
1979
- release: options.release ?? null,
1980
- limit: options.limit ?? null,
1981
- parent: runtime.parentScope ?? null,
1982
- /* c8 ignore next -- listed/calendar runtime filters are always materialized by their command handlers */
1983
- runtime_filters: corpus.listed.filters.runtime_filters ?? agendaContext.agenda.filters.runtime_filters ?? {}
1984
- },
1985
- summary: {
1986
- active_items: focusGroups.activeItems.length,
1987
- in_progress: inProgressCount,
1988
- open: openCount,
1989
- blocked: focusGroups.blockedItems.length,
1990
- blocked_fallback_used: focusGroups.blockedFallbackUsed,
1991
- high_level: focusGroups.highLevel.length,
1992
- low_level: focusGroups.lowLevel.length,
1993
- agenda_events: agendaContext.agendaSummary.events,
1994
- ...summaryExtras
1995
- },
1996
- high_level: focusGroups.highLevel,
1997
- low_level: focusGroups.lowLevel,
1998
- blocked_fallback: focusGroups.blockedFallback,
1999
- agenda: {
2000
- summary: agendaContext.agendaSummary,
2001
- events: agendaContext.agendaEvents
2002
- }
2003
- };
2004
- attachOptionalContextSections(result, sections);
2005
- applyContextFocusProjection(result, runtime.focusFields);
2006
- if (warnings.length > 0)
2007
- result.warnings = warnings;
2008
- maybeAttachEmptyContextSuggestions(result, focusGroups.activeItems, focusGroups.blockedItems);
2009
- return result;
2010
- }
2011
-
2012
- export {
2013
- resolveCalendarOutputFormat,
2014
- renderCalendarMarkdown,
2015
- renderCalendarToon,
2016
- runCalendar,
2017
- CONTEXT_OUTPUT_VALUES,
2018
- parseContextFocusFields,
2019
- projectContextFocusRows,
2020
- resolveContextOutputFormat,
2021
- parseContextDepth,
2022
- parseContextSections,
2023
- collectSubtreeIds,
2024
- compareCriticalItems,
2025
- buildChildrenByParent,
2026
- toContextFocusItem,
2027
- _testOnly,
2028
- renderContextMarkdown,
2029
- runContext
2030
- };
2031
- //# sourceMappingURL=chunk-MXYA5SAJ.js.map
2032
-
2033
- //# debugId=f66f8fef-8bf7-5abb-8bc9-a6ee8f93ffb2