@unbrained/pm-cli 2026.6.5 → 2026.6.6

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 (413) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/CONTRIBUTING.md +1 -0
  3. package/README.md +12 -4
  4. package/dist/cli/commands/completion.js +21 -7
  5. package/dist/cli/commands/completion.js.map +1 -1
  6. package/dist/cli/commands/contracts.js +5 -3
  7. package/dist/cli/commands/contracts.js.map +1 -1
  8. package/dist/cli/commands/gc.d.ts +8 -1
  9. package/dist/cli/commands/gc.js +26 -3
  10. package/dist/cli/commands/gc.js.map +1 -1
  11. package/dist/cli/commands/health.js +15 -2
  12. package/dist/cli/commands/health.js.map +1 -1
  13. package/dist/cli/commands/history.d.ts +4 -1
  14. package/dist/cli/commands/history.js +12 -24
  15. package/dist/cli/commands/history.js.map +1 -1
  16. package/dist/cli/commands/index.d.ts +1 -0
  17. package/dist/cli/commands/index.js +3 -2
  18. package/dist/cli/commands/index.js.map +1 -1
  19. package/dist/cli/commands/stats.d.ts +8 -1
  20. package/dist/cli/commands/stats.js +18 -17
  21. package/dist/cli/commands/stats.js.map +1 -1
  22. package/dist/cli/commands/telemetry.d.ts +8 -0
  23. package/dist/cli/commands/telemetry.js +253 -0
  24. package/dist/cli/commands/telemetry.js.map +1 -0
  25. package/dist/cli/help-content.js +11 -2
  26. package/dist/cli/help-content.js.map +1 -1
  27. package/dist/cli/register-list-query.js +7 -4
  28. package/dist/cli/register-list-query.js.map +1 -1
  29. package/dist/cli/register-operations.js +29 -6
  30. package/dist/cli/register-operations.js.map +1 -1
  31. package/dist/cli-bundle/chunks/activity-CVXTCHYY.js +16 -0
  32. package/dist/cli-bundle/chunks/{activity-3RWRRNOW.js → activity-JM6DTDND.js} +11 -11
  33. package/dist/cli-bundle/chunks/{aggregate-J35K7WZB.js → aggregate-GI7WSZPH.js} +10 -10
  34. package/dist/cli-bundle/chunks/{aggregate-OOAGKWRG.js → aggregate-VNAHUNNF.js} +10 -10
  35. package/dist/cli-bundle/chunks/{append-5JE3YGXU.js → append-7H5N64R2.js} +8 -8
  36. package/dist/cli-bundle/chunks/{append-PNN6UIBZ.js → append-WMKRXKCE.js} +8 -8
  37. package/dist/cli-bundle/chunks/{chunk-D5X7N6FI.js → chunk-23YFZ3IG.js} +12 -12
  38. package/dist/cli-bundle/chunks/{chunk-FVXM3GKS.js → chunk-2HVRUSQA.js} +3 -3
  39. package/dist/cli-bundle/chunks/{chunk-V3JQ4IPL.js → chunk-2RSPZI5H.js} +102 -22
  40. package/dist/cli-bundle/chunks/chunk-2RSPZI5H.js.map +1 -0
  41. package/dist/cli-bundle/chunks/{chunk-SZQCER6S.js → chunk-2VBQ6ZXS.js} +2 -2
  42. package/dist/cli-bundle/chunks/{chunk-A6PEXMYN.js → chunk-2VVCGBNV.js} +9 -9
  43. package/dist/cli-bundle/chunks/{chunk-UOVLWB47.js → chunk-3BWOVLTH.js} +8 -8
  44. package/dist/cli-bundle/chunks/{chunk-5IRA6IYD.js → chunk-3FI4SEFT.js} +5 -5
  45. package/dist/cli-bundle/chunks/{chunk-3OH4DAEB.js → chunk-3LB74A67.js} +6 -6
  46. package/dist/cli-bundle/chunks/{chunk-GFWHHMVV.js → chunk-3VAM3NNM.js} +3 -3
  47. package/dist/cli-bundle/chunks/{chunk-4QCR4QW3.js → chunk-4LL6TK5B.js} +5 -5
  48. package/dist/cli-bundle/chunks/{chunk-TBQVUNVH.js → chunk-52MAOQ6J.js} +4 -4
  49. package/dist/cli-bundle/chunks/{chunk-5KB4X7YY.js → chunk-5FDATVEZ.js} +4 -4
  50. package/dist/cli-bundle/chunks/{chunk-4LTBNUYT.js → chunk-5SFCOO6B.js} +76 -7
  51. package/dist/cli-bundle/chunks/{chunk-4LTBNUYT.js.map → chunk-5SFCOO6B.js.map} +1 -1
  52. package/dist/cli-bundle/chunks/{chunk-GCAVRLGE.js → chunk-6ER6DXH5.js} +9 -9
  53. package/dist/cli-bundle/chunks/{chunk-26KTVXJW.js → chunk-6P6GGMOG.js} +2 -2
  54. package/dist/cli-bundle/chunks/{chunk-MISYRLEP.js → chunk-77GFDHGF.js} +2 -2
  55. package/dist/cli-bundle/chunks/{chunk-HPH6X4ZZ.js → chunk-AO442XLN.js} +3 -3
  56. package/dist/cli-bundle/chunks/{chunk-ORTLYVA4.js → chunk-AY43SBIN.js} +6 -6
  57. package/dist/cli-bundle/chunks/{chunk-D3WUNETC.js → chunk-BQHUILZS.js} +5 -5
  58. package/dist/cli-bundle/chunks/{chunk-KCMIYKTA.js → chunk-E5FJNAZA.js} +3 -3
  59. package/dist/cli-bundle/chunks/{chunk-OIQIXTNB.js → chunk-ECCMVXGM.js} +3 -3
  60. package/dist/cli-bundle/chunks/{chunk-5PAOPUZX.js → chunk-FRAUKRU2.js} +5 -5
  61. package/dist/cli-bundle/chunks/{chunk-JQI2HE55.js → chunk-GCOQW437.js} +3 -3
  62. package/dist/cli-bundle/chunks/{chunk-CWT53EYT.js → chunk-GGYWB3Y2.js} +6 -6
  63. package/dist/cli-bundle/chunks/{chunk-ATBVS6WW.js → chunk-GU2ZJ2VV.js} +5 -5
  64. package/dist/cli-bundle/chunks/{chunk-ASQM3IF5.js → chunk-GXSUPCBV.js} +5 -4
  65. package/dist/cli-bundle/chunks/{chunk-SSFMJCPF.js → chunk-HZGUAH22.js} +2 -2
  66. package/dist/cli-bundle/chunks/{chunk-GPGAYASV.js → chunk-I2HSTRJF.js} +5 -5
  67. package/dist/cli-bundle/chunks/{chunk-RQAWLSUU.js → chunk-I6BNFU5X.js} +3 -3
  68. package/dist/cli-bundle/chunks/{chunk-OUF3ARDX.js → chunk-IJGCZSIQ.js} +12 -12
  69. package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js +1491 -0
  70. package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js.map +1 -0
  71. package/dist/cli-bundle/chunks/{chunk-XX5LRINW.js → chunk-KAG77BY3.js} +2 -2
  72. package/dist/cli-bundle/chunks/{chunk-BNL6S7QH.js → chunk-KJ33AOCY.js} +3 -3
  73. package/dist/cli-bundle/chunks/{chunk-4PJQSECJ.js → chunk-KJE2FOS4.js} +2 -2
  74. package/dist/cli-bundle/chunks/{chunk-GNHVV4SY.js → chunk-KWU6HG75.js} +37 -14
  75. package/dist/cli-bundle/chunks/chunk-KWU6HG75.js.map +1 -0
  76. package/dist/cli-bundle/chunks/{chunk-KBG47ZOY.js → chunk-LB3RUL2N.js} +3 -3
  77. package/dist/cli-bundle/chunks/{chunk-HZOS2UG5.js → chunk-LCM63IXU.js} +2 -2
  78. package/dist/cli-bundle/chunks/{chunk-VGO2T3TY.js → chunk-ME2YH6FN.js} +7 -7
  79. package/dist/cli-bundle/chunks/{chunk-ZRVSMOMR.js → chunk-MITFDD35.js} +12 -12
  80. package/dist/cli-bundle/chunks/{chunk-Y2AKE2HS.js → chunk-N7ACFE26.js} +3 -3
  81. package/dist/cli-bundle/chunks/{chunk-AXXKLVTW.js → chunk-NUZ5HKR4.js} +2 -2
  82. package/dist/cli-bundle/chunks/{chunk-KK6YPGH3.js → chunk-OVQCEJPG.js} +2 -2
  83. package/dist/cli-bundle/chunks/{chunk-B3N4TKNL.js → chunk-OZ7NSQHL.js} +8 -8
  84. package/dist/cli-bundle/chunks/{chunk-TK633IVD.js → chunk-PDDFYW4X.js} +5 -5
  85. package/dist/cli-bundle/chunks/{chunk-DFIZGAI5.js → chunk-PIU6RSL3.js} +9 -9
  86. package/dist/cli-bundle/chunks/{chunk-O5IBJE6S.js → chunk-PO3GSVFV.js} +2 -2
  87. package/dist/cli-bundle/chunks/{chunk-WIKR7KFL.js → chunk-PRJCELV4.js} +108 -21
  88. package/dist/cli-bundle/chunks/chunk-PRJCELV4.js.map +7 -0
  89. package/dist/cli-bundle/chunks/{chunk-ZQ4F6EC4.js → chunk-PROOHX4K.js} +38 -15
  90. package/dist/cli-bundle/chunks/chunk-PROOHX4K.js.map +7 -0
  91. package/dist/cli-bundle/chunks/{chunk-N5YF3VFN.js → chunk-Q7SPNHLW.js} +8 -8
  92. package/dist/cli-bundle/chunks/{chunk-RANZIID5.js → chunk-QO7EBBOM.js} +2 -2
  93. package/dist/cli-bundle/chunks/{chunk-LDJK7SHN.js → chunk-R6UFP2GE.js} +7 -7
  94. package/dist/cli-bundle/chunks/{chunk-CCUFLH4J.js → chunk-RWPSOIEE.js} +7 -7
  95. package/dist/cli-bundle/chunks/{chunk-UFCG3SWR.js → chunk-RZN6VURO.js} +3 -3
  96. package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js +1501 -0
  97. package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js.map +7 -0
  98. package/dist/cli-bundle/chunks/{chunk-KA24HME7.js → chunk-T3LC5LKB.js} +2 -2
  99. package/dist/cli-bundle/chunks/{chunk-NQP3ECKF.js → chunk-TCD3R2PF.js} +2 -2
  100. package/dist/cli-bundle/chunks/{chunk-EHXPIKKP.js → chunk-TPH5XEVD.js} +3 -3
  101. package/dist/cli-bundle/chunks/{chunk-SRVKTWPR.js → chunk-U5SXYXSY.js} +75 -6
  102. package/dist/cli-bundle/chunks/{chunk-SRVKTWPR.js.map → chunk-U5SXYXSY.js.map} +2 -2
  103. package/dist/cli-bundle/chunks/{chunk-T2ORWB6D.js → chunk-UBOPJT3S.js} +9 -9
  104. package/dist/cli-bundle/chunks/{chunk-S3CV7JGJ.js → chunk-UM2GBHS4.js} +5 -4
  105. package/dist/cli-bundle/chunks/{chunk-G5BACLYH.js → chunk-W7XABV4H.js} +8 -8
  106. package/dist/cli-bundle/chunks/{chunk-K47WAYQV.js → chunk-WKY2IBOQ.js} +3 -3
  107. package/dist/cli-bundle/chunks/{chunk-7K24QB23.js → chunk-WOPXVEZP.js} +5 -5
  108. package/dist/cli-bundle/chunks/{chunk-DFUSXJDE.js → chunk-WSMOSYRD.js} +12 -12
  109. package/dist/cli-bundle/chunks/{chunk-CJDQB2ED.js → chunk-XLTD2HN3.js} +2 -2
  110. package/dist/cli-bundle/chunks/{chunk-TQ3ZK6VD.js → chunk-XSJCLN2R.js} +3 -3
  111. package/dist/cli-bundle/chunks/{chunk-XG7RJYHV.js → chunk-XTGLRY2Y.js} +6 -6
  112. package/dist/cli-bundle/chunks/{chunk-JB4RGL4V.js → chunk-YL2DJGYS.js} +7 -7
  113. package/dist/cli-bundle/chunks/{claim-AZLP7YFO.js → claim-4DBF6RVG.js} +10 -10
  114. package/dist/cli-bundle/chunks/{claim-ZFA7HKU4.js → claim-X2P4IB7J.js} +10 -10
  115. package/dist/cli-bundle/chunks/close-3HDWDA3L.js +13 -0
  116. package/dist/cli-bundle/chunks/{close-65DFYAVS.js → close-PTYFA45H.js} +8 -8
  117. package/dist/cli-bundle/chunks/{close-many-UKZSQGM7.js → close-many-7CGIDPTJ.js} +15 -15
  118. package/dist/cli-bundle/chunks/{close-many-AKPZNSGI.js → close-many-ERFO6LHR.js} +15 -15
  119. package/dist/cli-bundle/chunks/{comments-CJWXQI7X.js → comments-OONGABK5.js} +10 -10
  120. package/dist/cli-bundle/chunks/{comments-AGBNSJJH.js → comments-QKBYCWKD.js} +10 -10
  121. package/dist/cli-bundle/chunks/{config-DDPYIA6J.js → config-6FXCQKIF.js} +8 -8
  122. package/dist/cli-bundle/chunks/{config-5ON3ADRH.js → config-U4RZ4CQB.js} +8 -8
  123. package/dist/cli-bundle/chunks/{context-E6U3DWVM.js → context-FYYJGFWS.js} +13 -13
  124. package/dist/cli-bundle/chunks/{context-ZOJEN5VT.js → context-YMJ3Z2HQ.js} +13 -13
  125. package/dist/cli-bundle/chunks/{contracts-LCSX5R53.js → contracts-QDB6OMLQ.js} +10 -6
  126. package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js.map +1 -0
  127. package/dist/cli-bundle/chunks/{contracts-CXSFM45B.js → contracts-RFSPGVVJ.js} +9 -5
  128. package/dist/cli-bundle/chunks/{contracts-LCSX5R53.js.map → contracts-RFSPGVVJ.js.map} +7 -1
  129. package/dist/cli-bundle/chunks/{create-WYFKN2U4.js → create-I5L4EYYZ.js} +13 -13
  130. package/dist/cli-bundle/chunks/create-JTZNCTQC.js +27 -0
  131. package/dist/cli-bundle/chunks/{delete-ZXWC56WO.js → delete-7HPGI4GZ.js} +7 -7
  132. package/dist/cli-bundle/chunks/{delete-RONNH4F4.js → delete-VXUPH5RS.js} +7 -7
  133. package/dist/cli-bundle/chunks/{deps-WII3O4HB.js → deps-JSRRWC3Z.js} +7 -7
  134. package/dist/cli-bundle/chunks/{deps-EHXIFOZR.js → deps-SCZIFK2Z.js} +7 -7
  135. package/dist/cli-bundle/chunks/{docs-PDREIMLS.js → docs-GJK6K4VP.js} +9 -9
  136. package/dist/cli-bundle/chunks/{docs-JMVCFNHH.js → docs-WW4N3MBM.js} +9 -9
  137. package/dist/cli-bundle/chunks/{extension-G6UXSM5S.js → extension-J7IBMFTD.js} +4 -4
  138. package/dist/cli-bundle/chunks/{extension-B4ROVWJD.js → extension-VDY2U33M.js} +4 -4
  139. package/dist/cli-bundle/chunks/{files-2PN7UM2D.js → files-ISZJGILQ.js} +9 -9
  140. package/dist/cli-bundle/chunks/{files-MXYS5W4M.js → files-WKOD326U.js} +9 -9
  141. package/dist/cli-bundle/chunks/gc-JDVJ6OQ2.js +362 -0
  142. package/dist/cli-bundle/chunks/gc-JDVJ6OQ2.js.map +1 -0
  143. package/dist/cli-bundle/chunks/gc-ULPVWMTN.js +372 -0
  144. package/dist/cli-bundle/chunks/gc-ULPVWMTN.js.map +7 -0
  145. package/dist/cli-bundle/chunks/{get-WXMLRG7M.js → get-RV37HT3G.js} +10 -10
  146. package/dist/cli-bundle/chunks/{get-CINFEUIY.js → get-WXU6WI5P.js} +10 -10
  147. package/dist/cli-bundle/chunks/{health-IT5DBPRJ.js → health-6L6EH4WR.js} +26 -13
  148. package/dist/cli-bundle/chunks/health-6L6EH4WR.js.map +7 -0
  149. package/dist/cli-bundle/chunks/{health-5VPOJQ53.js → health-LOI2HHKB.js} +27 -14
  150. package/dist/cli-bundle/chunks/health-LOI2HHKB.js.map +1 -0
  151. package/dist/cli-bundle/chunks/history-2BA3T5AE.js +20 -0
  152. package/dist/cli-bundle/chunks/{history-FLZIP7PM.js → history-PKN67D5O.js} +10 -10
  153. package/dist/cli-bundle/chunks/history-redact-JBZNXHGR.js +19 -0
  154. package/dist/cli-bundle/chunks/{history-redact-SSZBAD76.js → history-redact-V4FOJGS7.js} +11 -11
  155. package/dist/cli-bundle/chunks/{history-repair-KC5ZOJRZ.js → history-repair-HIBCBIKK.js} +11 -11
  156. package/dist/cli-bundle/chunks/{history-repair-X7CO5JJZ.js → history-repair-SDMHR7JT.js} +11 -11
  157. package/dist/cli-bundle/chunks/init-HIVSNX3O.js +16 -0
  158. package/dist/cli-bundle/chunks/{init-6MRFVOLH.js → init-P56QYWJF.js} +8 -8
  159. package/dist/cli-bundle/chunks/{learnings-DCX55BNX.js → learnings-GDFRG5J7.js} +10 -10
  160. package/dist/cli-bundle/chunks/{learnings-A3CLB5CO.js → learnings-MIXSESLK.js} +10 -10
  161. package/dist/cli-bundle/chunks/{list-DBRECOG4.js → list-FGOWQMSM.js} +10 -10
  162. package/dist/cli-bundle/chunks/list-MUSQNMTD.js +20 -0
  163. package/dist/cli-bundle/chunks/{notes-42LIC3UE.js → notes-4XVSH2AZ.js} +10 -10
  164. package/dist/cli-bundle/chunks/{notes-P5O3VMQ3.js → notes-5UK3GEH2.js} +10 -10
  165. package/dist/cli-bundle/chunks/{plan-IGTE3WOJ.js → plan-DUMBV3QB.js} +13 -13
  166. package/dist/cli-bundle/chunks/{plan-HDQXEUKD.js → plan-SLMODHWX.js} +13 -13
  167. package/dist/cli-bundle/chunks/{register-list-query-EMNSIUO4.js → register-list-query-POCFZ5JW.js} +24 -22
  168. package/dist/cli-bundle/chunks/{register-list-query-EMNSIUO4.js.map → register-list-query-POCFZ5JW.js.map} +1 -1
  169. package/dist/cli-bundle/chunks/{register-list-query-AG3XKXWL.js → register-list-query-WST76HSQ.js} +23 -21
  170. package/dist/cli-bundle/chunks/{register-list-query-AG3XKXWL.js.map → register-list-query-WST76HSQ.js.map} +2 -2
  171. package/dist/cli-bundle/chunks/{register-mutation-M3YS6XDO.js → register-mutation-N5GSUZJV.js} +30 -30
  172. package/dist/cli-bundle/chunks/{register-mutation-RSMT6DPK.js → register-mutation-OA675SOU.js} +30 -30
  173. package/dist/cli-bundle/chunks/{register-operations-KYUOOOOD.js → register-operations-GNHBE5I3.js} +47 -34
  174. package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js.map +1 -0
  175. package/dist/cli-bundle/chunks/{register-operations-Q54JQZUN.js → register-operations-N3PMHXH5.js} +46 -33
  176. package/dist/cli-bundle/chunks/{register-operations-Q54JQZUN.js.map → register-operations-N3PMHXH5.js.map} +2 -2
  177. package/dist/cli-bundle/chunks/{register-setup-DI6P7X75.js → register-setup-JIMPKJKV.js} +15 -15
  178. package/dist/cli-bundle/chunks/{register-setup-YJKIQRKA.js → register-setup-ZHJI2DI3.js} +15 -15
  179. package/dist/cli-bundle/chunks/restore-D4RGNX33.js +17 -0
  180. package/dist/cli-bundle/chunks/{restore-2XVTBLKQ.js → restore-PBL6T5TW.js} +11 -11
  181. package/dist/cli-bundle/chunks/{schema-V6BX65Q2.js → schema-2NOO6NGB.js} +8 -8
  182. package/dist/cli-bundle/chunks/{schema-LVXZWFGY.js → schema-EBI4NLUO.js} +8 -8
  183. package/dist/cli-bundle/chunks/{search-C7NPB7G7.js → search-JPUQTVCY.js} +10 -10
  184. package/dist/cli-bundle/chunks/{search-5A3BMFA7.js → search-OA6JX27A.js} +10 -10
  185. package/dist/cli-bundle/chunks/stats-CV54BAWY.js +202 -0
  186. package/dist/cli-bundle/chunks/stats-CV54BAWY.js.map +1 -0
  187. package/dist/cli-bundle/chunks/stats-XYB6KTFG.js +212 -0
  188. package/dist/cli-bundle/chunks/stats-XYB6KTFG.js.map +7 -0
  189. package/dist/cli-bundle/chunks/telemetry-LMJ7PFUO.js +251 -0
  190. package/dist/cli-bundle/chunks/telemetry-LMJ7PFUO.js.map +7 -0
  191. package/dist/cli-bundle/chunks/telemetry-NCMEPJNR.js +248 -0
  192. package/dist/cli-bundle/chunks/telemetry-NCMEPJNR.js.map +1 -0
  193. package/dist/cli-bundle/chunks/{test-RJ4ZF35X.js → test-MXX3E5JL.js} +13 -13
  194. package/dist/cli-bundle/chunks/{test-OFYONO3C.js → test-WBROAJIE.js} +13 -13
  195. package/dist/cli-bundle/chunks/{test-all-OJE6CIO7.js → test-all-N6NSRDTV.js} +13 -13
  196. package/dist/cli-bundle/chunks/{test-all-EEMKNTGU.js → test-all-NTOZ7C3M.js} +13 -13
  197. package/dist/cli-bundle/chunks/{test-runs-IPOPFOAF.js → test-runs-V6A7LPWZ.js} +5 -5
  198. package/dist/cli-bundle/chunks/{test-runs-L2M7WKH7.js → test-runs-WMVTQU3Y.js} +5 -5
  199. package/dist/cli-bundle/chunks/update-OSV3NAQB.js +25 -0
  200. package/dist/cli-bundle/chunks/update-YRXSUGYQ.js +21 -0
  201. package/dist/cli-bundle/chunks/{update-many-DYWGW57M.js → update-many-EM6OXYGO.js} +22 -22
  202. package/dist/cli-bundle/chunks/{update-many-322CCH2L.js → update-many-KGGEYABR.js} +22 -22
  203. package/dist/cli-bundle/chunks/{upgrade-2U727SAM.js → upgrade-BLI7XBAJ.js} +4 -4
  204. package/dist/cli-bundle/chunks/{upgrade-3W3RVSNM.js → upgrade-LXPOQKFV.js} +4 -4
  205. package/dist/cli-bundle/chunks/{validate-ZFVWPEEN.js → validate-AGOAUOVW.js} +15 -15
  206. package/dist/cli-bundle/chunks/{validate-GZ24NYHO.js → validate-L5J6A7YO.js} +15 -15
  207. package/dist/cli-bundle/main.js +42 -1451
  208. package/dist/cli-bundle/main.js.map +4 -4
  209. package/dist/core/history/history-diff.d.ts +47 -0
  210. package/dist/core/history/history-diff.js +152 -0
  211. package/dist/core/history/history-diff.js.map +1 -0
  212. package/dist/core/history/history-storage-stats.d.ts +31 -0
  213. package/dist/core/history/history-storage-stats.js +101 -0
  214. package/dist/core/history/history-storage-stats.js.map +1 -0
  215. package/dist/core/lock/lock-gc.d.ts +46 -0
  216. package/dist/core/lock/lock-gc.js +194 -0
  217. package/dist/core/lock/lock-gc.js.map +1 -0
  218. package/dist/core/shared/serial-queue.d.ts +12 -0
  219. package/dist/core/shared/serial-queue.js +43 -0
  220. package/dist/core/shared/serial-queue.js.map +1 -0
  221. package/dist/core/store/settings.d.ts +19 -1
  222. package/dist/core/store/settings.js +92 -7
  223. package/dist/core/store/settings.js.map +1 -1
  224. package/dist/core/telemetry/observability.js +3 -3
  225. package/dist/core/telemetry/observability.js.map +1 -1
  226. package/dist/core/telemetry/runtime.js +16 -4
  227. package/dist/core/telemetry/runtime.js.map +1 -1
  228. package/dist/mcp/server.d.ts +1 -0
  229. package/dist/mcp/server.js +155 -37
  230. package/dist/mcp/server.js.map +1 -1
  231. package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
  232. package/dist/sdk/cli-contracts/enum-contracts.js +4 -2
  233. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  234. package/dist/sdk/cli-contracts/tool-parameter-tables.js +10 -7
  235. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  236. package/dist/sdk/cli-contracts.d.ts +23 -0
  237. package/dist/sdk/cli-contracts.js +41 -7
  238. package/dist/sdk/cli-contracts.js.map +1 -1
  239. package/docs/AGENT_GUIDE.md +1 -1
  240. package/docs/ARCHITECTURE.md +11 -1
  241. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  242. package/docs/COMMANDS.md +33 -2
  243. package/docs/CONFIGURATION.md +9 -1
  244. package/docs/EXTENSIONS.md +7 -0
  245. package/docs/EXTENSION_AUTHOR_CONTRACTS.md +73 -0
  246. package/docs/ONBOARDING.md +165 -0
  247. package/docs/QUICKSTART.md +1 -1
  248. package/docs/README.md +12 -4
  249. package/docs/RELEASING.md +36 -1
  250. package/docs/TESTING.md +19 -1
  251. package/package.json +5 -2
  252. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  253. package/plugins/pm-claude/README.md +7 -4
  254. package/plugins/pm-claude/agents/pm-coordinator.md +1 -1
  255. package/plugins/pm-claude/commands/pm-init.md +1 -1
  256. package/dist/cli-bundle/chunks/activity-P5BUMWP3.js +0 -16
  257. package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js.map +0 -1
  258. package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js.map +0 -1
  259. package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js.map +0 -7
  260. package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js.map +0 -7
  261. package/dist/cli-bundle/chunks/close-RMHQ3KWH.js +0 -13
  262. package/dist/cli-bundle/chunks/contracts-CXSFM45B.js.map +0 -7
  263. package/dist/cli-bundle/chunks/create-ATONSAZW.js +0 -27
  264. package/dist/cli-bundle/chunks/gc-GT552UJH.js +0 -178
  265. package/dist/cli-bundle/chunks/gc-GT552UJH.js.map +0 -1
  266. package/dist/cli-bundle/chunks/gc-QNBRJG6H.js +0 -181
  267. package/dist/cli-bundle/chunks/gc-QNBRJG6H.js.map +0 -7
  268. package/dist/cli-bundle/chunks/health-5VPOJQ53.js.map +0 -1
  269. package/dist/cli-bundle/chunks/health-IT5DBPRJ.js.map +0 -7
  270. package/dist/cli-bundle/chunks/history-6FC4H6HI.js +0 -20
  271. package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js +0 -19
  272. package/dist/cli-bundle/chunks/init-KHX3FEEM.js +0 -16
  273. package/dist/cli-bundle/chunks/list-53LZ2AEO.js +0 -20
  274. package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js.map +0 -1
  275. package/dist/cli-bundle/chunks/restore-JL5QIH7H.js +0 -17
  276. package/dist/cli-bundle/chunks/stats-FNLYVXTB.js +0 -120
  277. package/dist/cli-bundle/chunks/stats-FNLYVXTB.js.map +0 -1
  278. package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js +0 -123
  279. package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js.map +0 -7
  280. package/dist/cli-bundle/chunks/update-6YEHPVXH.js +0 -25
  281. package/dist/cli-bundle/chunks/update-PYLVHMRD.js +0 -21
  282. /package/dist/cli-bundle/chunks/{activity-P5BUMWP3.js.map → activity-CVXTCHYY.js.map} +0 -0
  283. /package/dist/cli-bundle/chunks/{activity-3RWRRNOW.js.map → activity-JM6DTDND.js.map} +0 -0
  284. /package/dist/cli-bundle/chunks/{aggregate-J35K7WZB.js.map → aggregate-GI7WSZPH.js.map} +0 -0
  285. /package/dist/cli-bundle/chunks/{aggregate-OOAGKWRG.js.map → aggregate-VNAHUNNF.js.map} +0 -0
  286. /package/dist/cli-bundle/chunks/{append-5JE3YGXU.js.map → append-7H5N64R2.js.map} +0 -0
  287. /package/dist/cli-bundle/chunks/{append-PNN6UIBZ.js.map → append-WMKRXKCE.js.map} +0 -0
  288. /package/dist/cli-bundle/chunks/{chunk-D5X7N6FI.js.map → chunk-23YFZ3IG.js.map} +0 -0
  289. /package/dist/cli-bundle/chunks/{chunk-FVXM3GKS.js.map → chunk-2HVRUSQA.js.map} +0 -0
  290. /package/dist/cli-bundle/chunks/{chunk-SZQCER6S.js.map → chunk-2VBQ6ZXS.js.map} +0 -0
  291. /package/dist/cli-bundle/chunks/{chunk-A6PEXMYN.js.map → chunk-2VVCGBNV.js.map} +0 -0
  292. /package/dist/cli-bundle/chunks/{chunk-UOVLWB47.js.map → chunk-3BWOVLTH.js.map} +0 -0
  293. /package/dist/cli-bundle/chunks/{chunk-5IRA6IYD.js.map → chunk-3FI4SEFT.js.map} +0 -0
  294. /package/dist/cli-bundle/chunks/{chunk-3OH4DAEB.js.map → chunk-3LB74A67.js.map} +0 -0
  295. /package/dist/cli-bundle/chunks/{chunk-GFWHHMVV.js.map → chunk-3VAM3NNM.js.map} +0 -0
  296. /package/dist/cli-bundle/chunks/{chunk-4QCR4QW3.js.map → chunk-4LL6TK5B.js.map} +0 -0
  297. /package/dist/cli-bundle/chunks/{chunk-TBQVUNVH.js.map → chunk-52MAOQ6J.js.map} +0 -0
  298. /package/dist/cli-bundle/chunks/{chunk-5KB4X7YY.js.map → chunk-5FDATVEZ.js.map} +0 -0
  299. /package/dist/cli-bundle/chunks/{chunk-GCAVRLGE.js.map → chunk-6ER6DXH5.js.map} +0 -0
  300. /package/dist/cli-bundle/chunks/{chunk-26KTVXJW.js.map → chunk-6P6GGMOG.js.map} +0 -0
  301. /package/dist/cli-bundle/chunks/{chunk-MISYRLEP.js.map → chunk-77GFDHGF.js.map} +0 -0
  302. /package/dist/cli-bundle/chunks/{chunk-HPH6X4ZZ.js.map → chunk-AO442XLN.js.map} +0 -0
  303. /package/dist/cli-bundle/chunks/{chunk-ORTLYVA4.js.map → chunk-AY43SBIN.js.map} +0 -0
  304. /package/dist/cli-bundle/chunks/{chunk-D3WUNETC.js.map → chunk-BQHUILZS.js.map} +0 -0
  305. /package/dist/cli-bundle/chunks/{chunk-KCMIYKTA.js.map → chunk-E5FJNAZA.js.map} +0 -0
  306. /package/dist/cli-bundle/chunks/{chunk-OIQIXTNB.js.map → chunk-ECCMVXGM.js.map} +0 -0
  307. /package/dist/cli-bundle/chunks/{chunk-5PAOPUZX.js.map → chunk-FRAUKRU2.js.map} +0 -0
  308. /package/dist/cli-bundle/chunks/{chunk-JQI2HE55.js.map → chunk-GCOQW437.js.map} +0 -0
  309. /package/dist/cli-bundle/chunks/{chunk-CWT53EYT.js.map → chunk-GGYWB3Y2.js.map} +0 -0
  310. /package/dist/cli-bundle/chunks/{chunk-ATBVS6WW.js.map → chunk-GU2ZJ2VV.js.map} +0 -0
  311. /package/dist/cli-bundle/chunks/{chunk-ASQM3IF5.js.map → chunk-GXSUPCBV.js.map} +0 -0
  312. /package/dist/cli-bundle/chunks/{chunk-SSFMJCPF.js.map → chunk-HZGUAH22.js.map} +0 -0
  313. /package/dist/cli-bundle/chunks/{chunk-GPGAYASV.js.map → chunk-I2HSTRJF.js.map} +0 -0
  314. /package/dist/cli-bundle/chunks/{chunk-RQAWLSUU.js.map → chunk-I6BNFU5X.js.map} +0 -0
  315. /package/dist/cli-bundle/chunks/{chunk-OUF3ARDX.js.map → chunk-IJGCZSIQ.js.map} +0 -0
  316. /package/dist/cli-bundle/chunks/{chunk-XX5LRINW.js.map → chunk-KAG77BY3.js.map} +0 -0
  317. /package/dist/cli-bundle/chunks/{chunk-BNL6S7QH.js.map → chunk-KJ33AOCY.js.map} +0 -0
  318. /package/dist/cli-bundle/chunks/{chunk-4PJQSECJ.js.map → chunk-KJE2FOS4.js.map} +0 -0
  319. /package/dist/cli-bundle/chunks/{chunk-KBG47ZOY.js.map → chunk-LB3RUL2N.js.map} +0 -0
  320. /package/dist/cli-bundle/chunks/{chunk-HZOS2UG5.js.map → chunk-LCM63IXU.js.map} +0 -0
  321. /package/dist/cli-bundle/chunks/{chunk-VGO2T3TY.js.map → chunk-ME2YH6FN.js.map} +0 -0
  322. /package/dist/cli-bundle/chunks/{chunk-ZRVSMOMR.js.map → chunk-MITFDD35.js.map} +0 -0
  323. /package/dist/cli-bundle/chunks/{chunk-Y2AKE2HS.js.map → chunk-N7ACFE26.js.map} +0 -0
  324. /package/dist/cli-bundle/chunks/{chunk-AXXKLVTW.js.map → chunk-NUZ5HKR4.js.map} +0 -0
  325. /package/dist/cli-bundle/chunks/{chunk-KK6YPGH3.js.map → chunk-OVQCEJPG.js.map} +0 -0
  326. /package/dist/cli-bundle/chunks/{chunk-B3N4TKNL.js.map → chunk-OZ7NSQHL.js.map} +0 -0
  327. /package/dist/cli-bundle/chunks/{chunk-TK633IVD.js.map → chunk-PDDFYW4X.js.map} +0 -0
  328. /package/dist/cli-bundle/chunks/{chunk-DFIZGAI5.js.map → chunk-PIU6RSL3.js.map} +0 -0
  329. /package/dist/cli-bundle/chunks/{chunk-O5IBJE6S.js.map → chunk-PO3GSVFV.js.map} +0 -0
  330. /package/dist/cli-bundle/chunks/{chunk-N5YF3VFN.js.map → chunk-Q7SPNHLW.js.map} +0 -0
  331. /package/dist/cli-bundle/chunks/{chunk-RANZIID5.js.map → chunk-QO7EBBOM.js.map} +0 -0
  332. /package/dist/cli-bundle/chunks/{chunk-LDJK7SHN.js.map → chunk-R6UFP2GE.js.map} +0 -0
  333. /package/dist/cli-bundle/chunks/{chunk-CCUFLH4J.js.map → chunk-RWPSOIEE.js.map} +0 -0
  334. /package/dist/cli-bundle/chunks/{chunk-UFCG3SWR.js.map → chunk-RZN6VURO.js.map} +0 -0
  335. /package/dist/cli-bundle/chunks/{chunk-KA24HME7.js.map → chunk-T3LC5LKB.js.map} +0 -0
  336. /package/dist/cli-bundle/chunks/{chunk-NQP3ECKF.js.map → chunk-TCD3R2PF.js.map} +0 -0
  337. /package/dist/cli-bundle/chunks/{chunk-EHXPIKKP.js.map → chunk-TPH5XEVD.js.map} +0 -0
  338. /package/dist/cli-bundle/chunks/{chunk-T2ORWB6D.js.map → chunk-UBOPJT3S.js.map} +0 -0
  339. /package/dist/cli-bundle/chunks/{chunk-S3CV7JGJ.js.map → chunk-UM2GBHS4.js.map} +0 -0
  340. /package/dist/cli-bundle/chunks/{chunk-G5BACLYH.js.map → chunk-W7XABV4H.js.map} +0 -0
  341. /package/dist/cli-bundle/chunks/{chunk-K47WAYQV.js.map → chunk-WKY2IBOQ.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{chunk-7K24QB23.js.map → chunk-WOPXVEZP.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{chunk-DFUSXJDE.js.map → chunk-WSMOSYRD.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{chunk-CJDQB2ED.js.map → chunk-XLTD2HN3.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{chunk-TQ3ZK6VD.js.map → chunk-XSJCLN2R.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{chunk-XG7RJYHV.js.map → chunk-XTGLRY2Y.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{chunk-JB4RGL4V.js.map → chunk-YL2DJGYS.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{claim-AZLP7YFO.js.map → claim-4DBF6RVG.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{claim-ZFA7HKU4.js.map → claim-X2P4IB7J.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{close-RMHQ3KWH.js.map → close-3HDWDA3L.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{close-65DFYAVS.js.map → close-PTYFA45H.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{close-many-UKZSQGM7.js.map → close-many-7CGIDPTJ.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{close-many-AKPZNSGI.js.map → close-many-ERFO6LHR.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{comments-CJWXQI7X.js.map → comments-OONGABK5.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{comments-AGBNSJJH.js.map → comments-QKBYCWKD.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{config-DDPYIA6J.js.map → config-6FXCQKIF.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{config-5ON3ADRH.js.map → config-U4RZ4CQB.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{context-E6U3DWVM.js.map → context-FYYJGFWS.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{context-ZOJEN5VT.js.map → context-YMJ3Z2HQ.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{create-WYFKN2U4.js.map → create-I5L4EYYZ.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{create-ATONSAZW.js.map → create-JTZNCTQC.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{delete-ZXWC56WO.js.map → delete-7HPGI4GZ.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{delete-RONNH4F4.js.map → delete-VXUPH5RS.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{deps-WII3O4HB.js.map → deps-JSRRWC3Z.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{deps-EHXIFOZR.js.map → deps-SCZIFK2Z.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{docs-PDREIMLS.js.map → docs-GJK6K4VP.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{docs-JMVCFNHH.js.map → docs-WW4N3MBM.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{extension-G6UXSM5S.js.map → extension-J7IBMFTD.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{extension-B4ROVWJD.js.map → extension-VDY2U33M.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{files-2PN7UM2D.js.map → files-ISZJGILQ.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{files-MXYS5W4M.js.map → files-WKOD326U.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{get-WXMLRG7M.js.map → get-RV37HT3G.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{get-CINFEUIY.js.map → get-WXU6WI5P.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{history-6FC4H6HI.js.map → history-2BA3T5AE.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{history-FLZIP7PM.js.map → history-PKN67D5O.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{history-redact-XKYEZDBL.js.map → history-redact-JBZNXHGR.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{history-redact-SSZBAD76.js.map → history-redact-V4FOJGS7.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{history-repair-KC5ZOJRZ.js.map → history-repair-HIBCBIKK.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{history-repair-X7CO5JJZ.js.map → history-repair-SDMHR7JT.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{init-KHX3FEEM.js.map → init-HIVSNX3O.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{init-6MRFVOLH.js.map → init-P56QYWJF.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{learnings-DCX55BNX.js.map → learnings-GDFRG5J7.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{learnings-A3CLB5CO.js.map → learnings-MIXSESLK.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{list-DBRECOG4.js.map → list-FGOWQMSM.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{list-53LZ2AEO.js.map → list-MUSQNMTD.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{notes-42LIC3UE.js.map → notes-4XVSH2AZ.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{notes-P5O3VMQ3.js.map → notes-5UK3GEH2.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{plan-IGTE3WOJ.js.map → plan-DUMBV3QB.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{plan-HDQXEUKD.js.map → plan-SLMODHWX.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{register-mutation-M3YS6XDO.js.map → register-mutation-N5GSUZJV.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{register-mutation-RSMT6DPK.js.map → register-mutation-OA675SOU.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{register-setup-DI6P7X75.js.map → register-setup-JIMPKJKV.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{register-setup-YJKIQRKA.js.map → register-setup-ZHJI2DI3.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{restore-JL5QIH7H.js.map → restore-D4RGNX33.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{restore-2XVTBLKQ.js.map → restore-PBL6T5TW.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{schema-V6BX65Q2.js.map → schema-2NOO6NGB.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{schema-LVXZWFGY.js.map → schema-EBI4NLUO.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{search-C7NPB7G7.js.map → search-JPUQTVCY.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{search-5A3BMFA7.js.map → search-OA6JX27A.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{test-RJ4ZF35X.js.map → test-MXX3E5JL.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{test-OFYONO3C.js.map → test-WBROAJIE.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{test-all-OJE6CIO7.js.map → test-all-N6NSRDTV.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{test-all-EEMKNTGU.js.map → test-all-NTOZ7C3M.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{test-runs-IPOPFOAF.js.map → test-runs-V6A7LPWZ.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{test-runs-L2M7WKH7.js.map → test-runs-WMVTQU3Y.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{update-6YEHPVXH.js.map → update-OSV3NAQB.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{update-PYLVHMRD.js.map → update-YRXSUGYQ.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{update-many-DYWGW57M.js.map → update-many-EM6OXYGO.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{update-many-322CCH2L.js.map → update-many-KGGEYABR.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{upgrade-2U727SAM.js.map → upgrade-BLI7XBAJ.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{upgrade-3W3RVSNM.js.map → upgrade-LXPOQKFV.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{validate-ZFVWPEEN.js.map → validate-AGOAUOVW.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{validate-GZ24NYHO.js.map → validate-L5J6A7YO.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../cli/register-operations.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { normalizeStatusInput } from \"../core/item/status.js\";\nimport { resolveRuntimeStatusRegistry } from \"../core/schema/runtime-schema.js\";\nimport { setActiveCommandResult } from \"../core/extensions/index.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { resolvePmRoot } from \"../core/store/paths.js\";\nimport { readSettings } from \"../core/store/settings.js\";\nimport {\n buildBackgroundTestAllCommandArgs,\n buildBackgroundTestCommandArgs,\n collect,\n getGlobalOptions,\n invalidateSearchCachesForMutation,\n printError,\n printResult,\n} from \"./registration-helpers.js\";\n\n\n\nexport function registerOperationCommands(program: Command): void {\n program\n .command(\"test\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--add <value>\", \"Add linked test entry (CSV/markdown pairs or - for stdin)\", collect)\n .option(\"--remove <value>\", \"Remove linked test entry by command/path (command=<value>, path=<value>, markdown pairs, plain value, or - for stdin)\", collect)\n .option(\"--list\", \"List linked tests without mutating\")\n .option(\"--run\", \"Run linked test commands\")\n .option(\"--background\", \"Run linked tests in managed background mode\")\n .option(\"--timeout <seconds>\", \"Default run timeout in seconds\")\n .option(\"--progress\", \"Emit linked-test progress to stderr (always shown in TTY, opt-in for non-TTY)\")\n .option(\"--env-set <value>\", \"Set environment variable(s) for linked-test runs (KEY=VALUE, repeatable)\", collect)\n .option(\"--env-clear <value>\", \"Clear environment variable(s) for linked-test runs (NAME, repeatable)\", collect)\n .option(\"--shared-host-safe\", \"Apply additive shared-host-safe runtime defaults for linked-test runs\")\n .option(\"--pm-context <mode>\", \"PM linked-test context mode: schema|tracker|auto (default: schema)\")\n .option(\"--override-linked-pm-context\", \"Force run-level --pm-context to override per-linked-test pm_context_mode metadata\")\n .option(\"--fail-on-context-mismatch\", \"Fail linked PM commands when context item counts differ\")\n .option(\"--fail-on-skipped\", \"Treat skipped linked tests as dependency failures\")\n .option(\"--fail-on-empty-test-run\", \"Treat successful linked-test commands that report zero executed tests as failures\")\n .option(\"--require-assertions-for-pm\", \"Require assertion metadata for linked PM command tests\")\n .option(\"--check-context\", \"Preflight linked PM command context diagnostics before executing commands\")\n .option(\"--auto-pm-context\", \"Auto-remediate PM tracker-read context mismatches by routing those linked commands through tracker context\")\n .option(\"--author <value>\", \"Mutation author\")\n .option(\"--message <value>\", \"History message\")\n .option(\"--force\", \"Force ownership override\")\n .description(\"Manage tests linked to an item and optionally run them.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const addValues = Array.isArray(options.add) ? (options.add as string[]) : [];\n const removeValues = Array.isArray(options.remove) ? (options.remove as string[]) : [];\n const runInBackground = options.background === true;\n if (runInBackground && options.run !== true) {\n throw new PmCliError(\"--background requires --run\", EXIT_CODE.USAGE);\n }\n if (runInBackground && (addValues.length > 0 || removeValues.length > 0)) {\n throw new PmCliError(\"--background does not support --add/--remove; update linked tests first, then run in background\", EXIT_CODE.USAGE);\n }\n if (runInBackground) {\n const { runStartBackgroundRun } = await import(\"./commands/test-runs.js\");\n const result = await runStartBackgroundRun({\n kind: \"test\",\n commandArgs: buildBackgroundTestCommandArgs(id, { ...options, add: addValues, remove: removeValues }),\n targetId: id,\n author: typeof options.author === \"string\" ? options.author : undefined,\n noExtensions: globalOptions.noExtensions === true,\n }, globalOptions);\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=test took_ms=${Date.now() - startedAt}`);\n }\n return;\n }\n const { runTest } = await import(\"./commands/test.js\");\n const result = await runTest(id, {\n add: addValues,\n remove: removeValues,\n list: Boolean(options.list),\n run: Boolean(options.run),\n timeout: typeof options.timeout === \"string\" ? options.timeout : undefined,\n progress: Boolean(options.progress),\n envSet: Array.isArray(options.envSet) ? (options.envSet as string[]) : [],\n envClear: Array.isArray(options.envClear) ? (options.envClear as string[]) : [],\n sharedHostSafe: Boolean(options.sharedHostSafe),\n pmContext: typeof options.pmContext === \"string\" ? options.pmContext : undefined,\n overrideLinkedPmContext: Boolean(options.overrideLinkedPmContext),\n failOnContextMismatch: Boolean(options.failOnContextMismatch),\n failOnSkipped: Boolean(options.failOnSkipped),\n failOnEmptyTestRun: Boolean(options.failOnEmptyTestRun),\n requireAssertionsForPm: Boolean(options.requireAssertionsForPm),\n checkContext: Boolean(options.checkContext),\n autoPmContext: Boolean(options.autoPmContext),\n author: typeof options.author === \"string\" ? options.author : undefined,\n message: typeof options.message === \"string\" ? options.message : undefined,\n force: Boolean(options.force),\n }, globalOptions);\n if (addValues.length > 0 || removeValues.length > 0 || options.run === true) {\n await invalidateSearchCachesForMutation(globalOptions, result);\n }\n printResult(result, globalOptions);\n if (result.run_results.some((entry) => entry.status === \"failed\") || result.fail_on_skipped_triggered === true) {\n process.exitCode = EXIT_CODE.DEPENDENCY_FAILED;\n }\n if (globalOptions.profile) {\n printError(`profile:command=test took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"test-all\")\n .description(\"Run linked tests across matching items.\")\n .option(\"--status <value>\", \"Filter items by status before running tests\")\n .option(\"--limit <n>\", \"Limit matching items before running linked tests\")\n .option(\"--offset <n>\", \"Skip matching items before running linked tests\")\n .option(\"--background\", \"Run linked tests in managed background mode\")\n .option(\"--timeout <seconds>\", \"Default run timeout in seconds\")\n .option(\"--progress\", \"Emit linked-test progress to stderr (always shown in TTY, opt-in for non-TTY)\")\n .option(\"--env-set <value>\", \"Set environment variable(s) for linked-test runs (KEY=VALUE, repeatable)\", collect)\n .option(\"--env-clear <value>\", \"Clear environment variable(s) for linked-test runs (NAME, repeatable)\", collect)\n .option(\"--shared-host-safe\", \"Apply additive shared-host-safe runtime defaults for linked-test runs\")\n .option(\"--pm-context <mode>\", \"PM linked-test context mode: schema|tracker|auto (default: schema)\")\n .option(\"--override-linked-pm-context\", \"Force run-level --pm-context to override per-linked-test pm_context_mode metadata\")\n .option(\"--fail-on-context-mismatch\", \"Fail linked PM commands when context item counts differ\")\n .option(\"--fail-on-skipped\", \"Treat skipped linked tests as dependency failures\")\n .option(\"--fail-on-empty-test-run\", \"Treat successful linked-test commands that report zero executed tests as failures\")\n .option(\"--require-assertions-for-pm\", \"Require assertion metadata for linked PM command tests\")\n .option(\"--check-context\", \"Preflight linked PM command context diagnostics before executing commands\")\n .option(\"--auto-pm-context\", \"Auto-remediate PM tracker-read context mismatches by routing those linked commands through tracker context\")\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const runInBackground = options.background === true;\n if (runInBackground) {\n const { runStartBackgroundRun } = await import(\"./commands/test-runs.js\");\n const result = await runStartBackgroundRun({\n kind: \"test-all\",\n commandArgs: buildBackgroundTestAllCommandArgs(options),\n statusFilter: typeof options.status === \"string\" ? options.status : undefined,\n noExtensions: globalOptions.noExtensions === true,\n }, globalOptions);\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=test-all took_ms=${Date.now() - startedAt}`);\n }\n return;\n }\n const { runTestAll } = await import(\"./commands/test-all.js\");\n const result = await runTestAll({\n status: typeof options.status === \"string\" ? options.status : undefined,\n limit: typeof options.limit === \"string\" ? options.limit : undefined,\n offset: typeof options.offset === \"string\" ? options.offset : undefined,\n timeout: typeof options.timeout === \"string\" ? options.timeout : undefined,\n progress: Boolean(options.progress),\n envSet: Array.isArray(options.envSet) ? (options.envSet as string[]) : [],\n envClear: Array.isArray(options.envClear) ? (options.envClear as string[]) : [],\n sharedHostSafe: Boolean(options.sharedHostSafe),\n pmContext: typeof options.pmContext === \"string\" ? options.pmContext : undefined,\n overrideLinkedPmContext: Boolean(options.overrideLinkedPmContext),\n failOnContextMismatch: Boolean(options.failOnContextMismatch),\n failOnSkipped: Boolean(options.failOnSkipped),\n failOnEmptyTestRun: Boolean(options.failOnEmptyTestRun),\n requireAssertionsForPm: Boolean(options.requireAssertionsForPm),\n checkContext: Boolean(options.checkContext),\n autoPmContext: Boolean(options.autoPmContext),\n }, globalOptions);\n await invalidateSearchCachesForMutation(globalOptions, { ids: result.results.map((entry) => entry.id) });\n printResult(result, globalOptions);\n if (result.failed > 0 || result.fail_on_skipped_triggered === true) {\n process.exitCode = EXIT_CODE.DEPENDENCY_FAILED;\n }\n if (globalOptions.profile) {\n printError(`profile:command=test-all took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"test-runs-worker\", { hidden: true })\n .argument(\"<runId>\", \"Background run id\")\n .description(\"Internal background worker command.\")\n .action(async (runId: string, _options: Record<string, unknown>, command: Command) => {\n const globalOptions = getGlobalOptions(command);\n const { runTestRunsWorker } = await import(\"./commands/test-runs.js\");\n await runTestRunsWorker(runId, globalOptions);\n });\n\n program\n .command(\"stats\")\n .description(\"Show project tracker statistics.\")\n .action(async (_options: unknown, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runStats } = await import(\"./commands/stats.js\");\n const result = await runStats(globalOptions);\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=stats took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"health\")\n .description(\"Show project tracker health checks.\")\n .option(\"--strict-directories\", \"Treat optional item-type directories as required failures\")\n .option(\"--check-only\", \"Run read-only health diagnostics without refreshing vectors\")\n .option(\"--check-telemetry\", \"Probe telemetry endpoint health and include network diagnostics\")\n .option(\"--no-refresh\", \"Disable automatic vector refresh attempts during health checks\")\n .option(\"--refresh-vectors\", \"Explicitly enable vector refresh attempts during health checks\")\n .option(\"--verbose-stale-items\", \"Include full stale vectorization ID lists in health output\")\n .option(\"--brief\", \"Emit compact health details for low-token agent checks\")\n .option(\"--summary\", \"Emit one-line-style health status with check names and warning count\")\n .option(\"--skip-vectors\", \"Skip vectorization check for a faster run\")\n .option(\"--skip-integrity\", \"Skip item/history file integrity check for a faster run\")\n .option(\"--skip-drift\", \"Skip history drift hash check for a faster run\")\n .option(\"--full\", \"Run all checks including slow integrity, drift, and vectorization checks\")\n .option(\n \"--strict-exit\",\n \"Return non-zero exit when health is not ok (advisory telemetry warnings are excluded; see warnings[])\",\n )\n .option(\"--fail-on-warn\", \"Alias for --strict-exit\")\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runHealth } = await import(\"./commands/health.js\");\n const result = await runHealth(globalOptions, {\n strictDirectories: Boolean(options.strictDirectories),\n checkOnly: Boolean(options.checkOnly),\n checkTelemetry: Boolean(options.checkTelemetry),\n noRefresh: Boolean(options.noRefresh),\n refreshVectors: Boolean(options.refreshVectors),\n verboseStaleItems: Boolean(options.verboseStaleItems),\n brief: Boolean(options.brief),\n summary: Boolean(options.summary),\n skipVectors: Boolean(options.skipVectors),\n skipIntegrity: Boolean(options.skipIntegrity),\n skipDrift: Boolean(options.skipDrift),\n full: Boolean(options.full),\n });\n printResult(result, globalOptions);\n const strictExit = Boolean(options.strictExit) || Boolean(options.failOnWarn);\n if (strictExit && !result.ok) {\n setActiveCommandResult({\n ...result,\n exit_code: EXIT_CODE.GENERIC_FAILURE,\n error_code: \"health_findings\",\n error_category: \"validation\",\n command_resolution: \"health_findings\",\n resolution_stage: \"execute\",\n });\n process.exitCode = EXIT_CODE.GENERIC_FAILURE;\n }\n if (globalOptions.profile) {\n printError(`profile:command=health took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"validate\")\n .description(\"Run standalone metadata, resolution, lifecycle, files, linked-command reference, and history drift validation checks.\")\n .option(\"--check-metadata\", \"Run metadata completeness checks\")\n .option(\"--metadata-profile <value>\", \"Select metadata validation profile for --check-metadata (core|strict|custom)\")\n .option(\"--check-resolution\", \"Run closed-item resolution metadata checks\")\n .option(\"--check-lifecycle\", \"Run active-item lifecycle governance drift checks\")\n .option(\"--check-stale-blockers\", \"Include stale blocker-pattern diagnostics in lifecycle checks\")\n .option(\"--dependency-cycle-severity <value>\", \"Set dependency-cycle warning policy for lifecycle checks (off|warn|error)\")\n .option(\"--check-files\", \"Run linked-file and orphaned-file checks\")\n .option(\"--check-command-references\", \"Run linked-command PM-ID reference checks\")\n .option(\"--scan-mode <value>\", \"Select file candidate scan mode for --check-files (default|tracked-all|tracked-all-strict)\")\n .option(\"--include-pm-internals\", \"Include PM storage internals in tracked-all candidate scans\")\n .option(\"--verbose-file-lists\", \"Include full file-path lists for validate --check-files details\")\n .option(\"--verbose-diagnostics\", \"Include full validate diagnostic ID lists instead of compact summaries\")\n .option(\"--strict-exit\", \"Return non-zero exit when validation warnings are present\")\n .option(\"--fail-on-warn\", \"Alias for --strict-exit\")\n .option(\"--fix-hints\", \"Add a machine-executable fix_hints[] of pm commands to each failing check's details\")\n .option(\"--check-history-drift\", \"Run item/history hash drift checks\")\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runValidate } = await import(\"./commands/validate.js\");\n const result = await runValidate({\n checkMetadata: Boolean(options.checkMetadata),\n metadataProfile: typeof options.metadataProfile === \"string\" ? options.metadataProfile : undefined,\n checkResolution: Boolean(options.checkResolution),\n checkLifecycle: Boolean(options.checkLifecycle),\n checkStaleBlockers: Boolean(options.checkStaleBlockers),\n dependencyCycleSeverity: typeof options.dependencyCycleSeverity === \"string\" ? options.dependencyCycleSeverity : undefined,\n checkFiles: Boolean(options.checkFiles),\n checkCommandReferences: Boolean(options.checkCommandReferences),\n scanMode: typeof options.scanMode === \"string\" ? options.scanMode : undefined,\n includePmInternals: Boolean(options.includePmInternals),\n verboseFileLists: Boolean(options.verboseFileLists),\n verboseDiagnostics: Boolean(options.verboseDiagnostics),\n checkHistoryDrift: Boolean(options.checkHistoryDrift),\n fixHints: Boolean(options.fixHints),\n }, globalOptions);\n printResult(result, globalOptions);\n const strictExit = Boolean(options.strictExit) || Boolean(options.failOnWarn);\n if (strictExit && (result.has_warnings || !result.ok)) {\n setActiveCommandResult({\n ...result,\n exit_code: EXIT_CODE.GENERIC_FAILURE,\n error_code: \"validation_findings\",\n error_category: \"validation\",\n command_resolution: \"validation_findings\",\n resolution_stage: \"execute\",\n });\n process.exitCode = EXIT_CODE.GENERIC_FAILURE;\n }\n if (globalOptions.profile) {\n printError(`profile:command=validate took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"gc\")\n .option(\"--dry-run\", \"Preview cleanup targets without deleting files; without this flag, pm gc deletes matched artifacts\")\n .option(\"--scope <value>\", \"Limit cleanup to one or more scopes (comma-separated or repeatable): index, embeddings, runtime\", collect)\n .description(\"Delete optional cache artifacts by default and show a summary.\")\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runGc } = await import(\"./commands/gc.js\");\n const result = await runGc(globalOptions, {\n dryRun: options.dryRun === true,\n scope: Array.isArray(options.scope) ? (options.scope as string[]) : [],\n });\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=gc took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"contracts\")\n .description(\"Show machine-readable command and schema contracts for agents.\")\n .option(\"--action <value>\", \"Filter tool schema branches to a specific action\")\n .option(\"--command <value>\", \"Scope contracts output to one CLI command (narrow-by-default)\")\n .option(\"--schema-only\", \"Return schema-focused output only\")\n .option(\"--flags-only\", \"Return command flag contracts only\")\n .option(\"--availability-only\", \"Return action availability surface only\")\n .option(\"--runtime-only\", \"Include only actions invocable in the current runtime\")\n .option(\"--active-only\", \"Alias for --runtime-only\")\n .option(\n \"--full\",\n \"Include full schema and command-flag surfaces (large; default brief output omits heavy sections for unfiltered queries)\",\n )\n .action(async (options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runContracts } = await import(\"./commands/contracts.js\");\n const result = await runContracts({\n action: typeof options.action === \"string\" ? options.action : undefined,\n command: typeof options.command === \"string\" ? options.command : undefined,\n schemaOnly: Boolean(options.schemaOnly),\n flagsOnly: Boolean(options.flagsOnly),\n availabilityOnly: Boolean(options.availabilityOnly),\n runtimeOnly: Boolean(options.runtimeOnly) || Boolean(options.activeOnly),\n full: Boolean(options.full),\n }, globalOptions);\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=contracts took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"claim\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--author <value>\", \"Mutation author\")\n .option(\"--message <value>\", \"History message\")\n .option(\"--force\", \"Force claim override\")\n .option(\"--if-available\", \"Skip silently when the item is already claimed by another author (returns skipped=true)\")\n .description(\"Claim an item for active work.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runClaim } = await import(\"./commands/claim.js\");\n const result = await runClaim(id, Boolean(options.force), globalOptions, {\n author: typeof options.author === \"string\" ? options.author : undefined,\n message: typeof options.message === \"string\" ? options.message : undefined,\n ifAvailable: options.ifAvailable === true,\n });\n await invalidateSearchCachesForMutation(globalOptions, result);\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=claim took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"release\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--author <value>\", \"Mutation author\")\n .option(\"--message <value>\", \"History message\")\n .option(\"--allow-audit-release\", \"Allow non-owner release handoffs without requiring --force\")\n .option(\"--force\", \"Force release override\")\n .description(\"Release an item's active claim.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const { runRelease } = await import(\"./commands/claim.js\");\n const result = await runRelease(id, Boolean(options.force), globalOptions, {\n author: typeof options.author === \"string\" ? options.author : undefined,\n message: typeof options.message === \"string\" ? options.message : undefined,\n allowAuditRelease: options.allowAuditRelease === true,\n });\n await invalidateSearchCachesForMutation(globalOptions, result);\n printResult(result, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=release took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"start-task\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--author <value>\", \"Mutation author\")\n .option(\"--message <value>\", \"History message\")\n .option(\"--force\", \"Force ownership or terminal override when required\")\n .description(\"Lifecycle alias: claim an item and move it to in_progress.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const inProgressStatus = normalizeStatusInput(\"in_progress\", statusRegistry) ?? statusRegistry.open_status;\n const force = Boolean(options.force);\n const mutationOptions = {\n author: typeof options.author === \"string\" ? options.author : undefined,\n message: typeof options.message === \"string\" ? options.message : undefined,\n };\n const [{ runClaim }, { runUpdate }] = await Promise.all([\n import(\"./commands/claim.js\"),\n import(\"./commands/update.js\"),\n ]);\n const claimResult = await runClaim(id, force, globalOptions, mutationOptions);\n await invalidateSearchCachesForMutation(globalOptions, claimResult);\n const updateResult = await runUpdate(id, { ...mutationOptions, status: inProgressStatus, force }, globalOptions);\n await invalidateSearchCachesForMutation(globalOptions, updateResult);\n printResult({ id, action: \"start_task\", claim: claimResult, update: updateResult }, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=start-task took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"pause-task\")\n .argument(\"<id>\", \"Item id\")\n .option(\"--author <value>\", \"Mutation author\")\n .option(\"--message <value>\", \"History message\")\n .option(\"--force\", \"Force ownership override when required\")\n .description(\"Lifecycle alias: move an item to open and release its claim.\")\n .action(async (id: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const openStatus = statusRegistry.open_status;\n const force = Boolean(options.force);\n const mutationOptions = {\n author: typeof options.author === \"string\" ? options.author : undefined,\n message: typeof options.message === \"string\" ? options.message : undefined,\n };\n const [{ runUpdate }, { runRelease }] = await Promise.all([\n import(\"./commands/update.js\"),\n import(\"./commands/claim.js\"),\n ]);\n const updateResult = await runUpdate(id, { ...mutationOptions, status: openStatus, force }, globalOptions);\n await invalidateSearchCachesForMutation(globalOptions, updateResult);\n const releaseResult = await runRelease(id, force, globalOptions, mutationOptions);\n await invalidateSearchCachesForMutation(globalOptions, releaseResult);\n printResult({ id, action: \"pause_task\", update: updateResult, release: releaseResult }, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=pause-task took_ms=${Date.now() - startedAt}`);\n }\n });\n\n program\n .command(\"close-task\")\n .argument(\"<id>\", \"Item id\")\n .argument(\"<reason>\", \"Close reason text\")\n .option(\"--author <value>\", \"Mutation author\")\n .option(\"--message <value>\", \"History message\")\n .option(\"--validate-close <value>\", \"Close-time validation mode: off|warn|strict\")\n .option(\"--force\", \"Force ownership or terminal override when required\")\n .description(\"Lifecycle alias: close an item with reason and release assignment metadata.\")\n .action(async (id: string, reason: string, options: Record<string, unknown>, command) => {\n const globalOptions = getGlobalOptions(command);\n const startedAt = Date.now();\n const force = Boolean(options.force);\n const mutationOptions = {\n author: typeof options.author === \"string\" ? options.author : undefined,\n message: typeof options.message === \"string\" ? options.message : undefined,\n };\n const [{ runClose }, { runRelease }] = await Promise.all([\n import(\"./commands/close.js\"),\n import(\"./commands/claim.js\"),\n ]);\n const closeResult = await runClose(id, reason, {\n ...mutationOptions,\n validateClose: typeof options.validateClose === \"string\" ? options.validateClose : undefined,\n force,\n }, globalOptions);\n await invalidateSearchCachesForMutation(globalOptions, closeResult);\n const releaseResult = await runRelease(id, force, globalOptions, mutationOptions);\n await invalidateSearchCachesForMutation(globalOptions, releaseResult);\n printResult({ id, action: \"close_task\", close: closeResult, release: releaseResult }, globalOptions);\n if (globalOptions.profile) {\n printError(`profile:command=close-task took_ms=${Date.now() - startedAt}`);\n }\n });\n\n}\n"],"names":["result"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBM,SAAU,0BAA0B,SAAgB;AACxD,UACG,QAAQ,MAAM,EACd,SAAS,QAAQ,SAAS,EAC1B,OAAO,iBAAiB,6DAA6D,OAAO,EAC5F,OAAO,oBAAoB,yHAAyH,OAAO,EAC3J,OAAO,UAAU,oCAAoC,EACrD,O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AAS,QAAQ,SAAS,EAC1B,SAAS,YAAY,mBAAmB,EACxC,OAAO,oBAAoB,iBAAiB,EAC5C,OAAO,qBAAqB,iBAAiB,EAC7C,OAAO,4BAA4B,6CAA6C,EAChF,OAAO,WAAW,oDAAoD,EACtE,YAAY,6EAA6E,EACzF,OAAO,OAAO,IAAY,QAAgB,SAAkC,YAAW;AACtF,UAAM,gBAAgB,iBAAiB,OAAO;AAC9C,UAAM,YAAY,KAAK,IAAG;AAC1B,UAAM,QAAQ,QAAQ,QAAQ,KAAK;AACnC,UAAM,kBAAkB;MACtB,QAAQ,OAAO,QAAQ,WAAW,WAAW,QAAQ,SAAS;MAC9D,SAAS,OAAO,QAAQ,YAAY,WAAW,QAAQ,UAAU;;AAEnE,UAAM,CAAC,EAAE,SAAQ,GAAI,EAAE,WAAU,CAAE,IAAI,MAAM,QAAQ,IAAI;MACvD,OAAO,qBAAqB;MAC5B,OAAO,qBAAqB;KAC7B;AACD,UAAM,cAAc,MAAM,SAAS,IAAI,QAAQ;MAC7C,GAAG;MACH,eAAe,OAAO,QAAQ,kBAAkB,WAAW,QAAQ,gBAAgB;MACnF;OACC,aAAa;AAChB,UAAM,kCAAkC,eAAe,WAAW;AAClE,UAAM,gBAAgB,MAAM,WAAW,IAAI,OAAO,eAAe,eAAe;AAChF,UAAM,kCAAkC,eAAe,aAAa;AACpE,gBAAY,EAAE,IAAI,QAAQ,cAAc,OAAO,aAAa,SAAS,cAAa,GAAI,aAAa;AACnG,QAAI,cAAc,SAAS;AACzB,iBAAW,sCAAsC,KAAK,IAAG,IAAK,SAAS,EAAE;IAC3E;EACF,CAAC;AAEL","debugId":"92cd8505-59c7-5c7e-aec3-70c610ef51e3"}
@@ -1,17 +0,0 @@
1
- import {
2
- runRestore
3
- } from "./chunk-GCAVRLGE.js";
4
- import "./chunk-O7IWB35H.js";
5
- import "./chunk-WIKR7KFL.js";
6
- import "./chunk-S3CV7JGJ.js";
7
- import "./chunk-K47WAYQV.js";
8
- import "./chunk-XG7RJYHV.js";
9
- import "./chunk-KA24HME7.js";
10
- import "./chunk-HPH6X4ZZ.js";
11
- import "./chunk-4PJQSECJ.js";
12
- import "./chunk-RANZIID5.js";
13
- import "./chunk-SRVKTWPR.js";
14
- export {
15
- runRestore
16
- };
17
- //# sourceMappingURL=restore-JL5QIH7H.js.map
@@ -1,120 +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]="b7e70da4-c1b9-5edb-81ed-0bab6612767a")}catch(e){}}();
3
- import {
4
- enforceHistoryStreamPolicyForItems,
5
- listAllFrontMatterLight
6
- } from "./chunk-CWT53EYT.js";
7
- import "./chunk-SSFMJCPF.js";
8
- import "./chunk-KBG47ZOY.js";
9
- import {
10
- resolveItemTypeRegistry
11
- } from "./chunk-SZQCER6S.js";
12
- import {
13
- nowIso
14
- } from "./chunk-NQP3ECKF.js";
15
- import {
16
- EXIT_CODE,
17
- PmCliError,
18
- getActiveExtensionRegistrations,
19
- getSettingsPath,
20
- pathExists,
21
- readSettings,
22
- resolvePmRoot,
23
- resolveRuntimeStatusRegistry,
24
- runActiveOnReadHooks
25
- } from "./chunk-4LTBNUYT.js";
26
-
27
- // dist/cli/commands/stats.js
28
- import fs from "node:fs/promises";
29
- import path from "node:path";
30
- function zeroByType(itemTypes) {
31
- return itemTypes.reduce((acc, value) => {
32
- acc[value] = 0;
33
- return acc;
34
- }, {});
35
- }
36
- function zeroByStatus(statuses) {
37
- return statuses.reduce((acc, value) => {
38
- acc[value] = 0;
39
- return acc;
40
- }, {});
41
- }
42
- function countNonEmptyLines(raw) {
43
- if (raw.trim().length === 0) {
44
- return 0;
45
- }
46
- return raw.split(/\r?\n/u).filter((line) => line.trim().length > 0).length;
47
- }
48
- async function readHistorySummary(pmRoot) {
49
- const historyDir = path.join(pmRoot, "history");
50
- if (!await pathExists(historyDir)) {
51
- return {
52
- history_streams: 0,
53
- history_entries: 0
54
- };
55
- }
56
- await runActiveOnReadHooks({
57
- path: historyDir,
58
- scope: "project"
59
- });
60
- const historyFiles = (await fs.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((a, b) => a.localeCompare(b));
61
- let historyEntries = 0;
62
- for (const file of historyFiles) {
63
- const historyPath = path.join(historyDir, file);
64
- const raw = await fs.readFile(historyPath, "utf8");
65
- await runActiveOnReadHooks({
66
- path: historyPath,
67
- scope: "project"
68
- });
69
- historyEntries += countNonEmptyLines(raw);
70
- }
71
- return {
72
- history_streams: historyFiles.length,
73
- history_entries: historyEntries
74
- };
75
- }
76
- async function runStats(global) {
77
- const pmRoot = resolvePmRoot(process.cwd(), global.path);
78
- if (!await pathExists(getSettingsPath(pmRoot))) {
79
- throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
80
- }
81
- const settings = await readSettings(pmRoot);
82
- const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
83
- const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
84
- const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, void 0, settings.schema);
85
- await enforceHistoryStreamPolicyForItems({
86
- pmRoot,
87
- settings,
88
- itemIds: items.map((item) => item.id),
89
- commandLabel: "stats"
90
- });
91
- const byType = zeroByType(typeRegistry.types);
92
- const byStatus = zeroByStatus(statusRegistry.definitions.map((definition) => definition.id));
93
- for (const item of items) {
94
- if (byType[item.type] === void 0) {
95
- byType[item.type] = 0;
96
- }
97
- byType[item.type] += 1;
98
- if (byStatus[item.status] === void 0) {
99
- byStatus[item.status] = 0;
100
- }
101
- byStatus[item.status] += 1;
102
- }
103
- const historySummary = await readHistorySummary(pmRoot);
104
- return {
105
- totals: {
106
- items: items.length,
107
- history_streams: historySummary.history_streams,
108
- history_entries: historySummary.history_entries
109
- },
110
- by_type: byType,
111
- by_status: byStatus,
112
- generated_at: nowIso()
113
- };
114
- }
115
- export {
116
- runStats
117
- };
118
- //# sourceMappingURL=stats-FNLYVXTB.js.map
119
-
120
- //# debugId=b7e70da4-c1b9-5edb-81ed-0bab6612767a
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../cli/commands/stats.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { getActiveExtensionRegistrations, runActiveOnReadHooks } from \"../../core/extensions/index.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { enforceHistoryStreamPolicyForItems } from \"../../core/history/history-stream-policy.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemStatus, ItemType } from \"../../types/index.js\";\n\nexport interface StatsResult {\n totals: {\n items: number;\n history_streams: number;\n history_entries: number;\n };\n by_type: Record<ItemType, number>;\n by_status: Record<ItemStatus, number>;\n generated_at: string;\n}\n\nfunction zeroByType(itemTypes: string[]): Record<ItemType, number> {\n return itemTypes.reduce(\n (acc, value) => {\n acc[value] = 0;\n return acc;\n },\n {} as Record<ItemType, number>,\n );\n}\n\nfunction zeroByStatus(statuses: string[]): Record<ItemStatus, number> {\n return statuses.reduce(\n (acc, value) => {\n acc[value] = 0;\n return acc;\n },\n {} as Record<ItemStatus, number>,\n );\n}\n\nfunction countNonEmptyLines(raw: string): number {\n if (raw.trim().length === 0) {\n return 0;\n }\n return raw\n .split(/\\r?\\n/u)\n .filter((line) => line.trim().length > 0)\n .length;\n}\n\nasync function readHistorySummary(pmRoot: string): Promise<{ history_streams: number; history_entries: number }> {\n const historyDir = path.join(pmRoot, \"history\");\n if (!(await pathExists(historyDir))) {\n return {\n history_streams: 0,\n history_entries: 0,\n };\n }\n\n await runActiveOnReadHooks({\n path: historyDir,\n scope: \"project\",\n });\n const historyFiles = (await fs.readdir(historyDir))\n .filter((entry) => entry.endsWith(\".jsonl\"))\n .sort((a, b) => a.localeCompare(b));\n\n let historyEntries = 0;\n for (const file of historyFiles) {\n const historyPath = path.join(historyDir, file);\n const raw = await fs.readFile(historyPath, \"utf8\");\n await runActiveOnReadHooks({\n path: historyPath,\n scope: \"project\",\n });\n historyEntries += countNonEmptyLines(raw);\n }\n\n return {\n history_streams: historyFiles.length,\n history_entries: historyEntries,\n };\n}\n\nexport async function runStats(global: GlobalOptions): Promise<StatsResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);\n await enforceHistoryStreamPolicyForItems({\n pmRoot,\n settings,\n itemIds: items.map((item) => item.id),\n commandLabel: \"stats\",\n });\n\n const byType = zeroByType(typeRegistry.types);\n const byStatus = zeroByStatus(statusRegistry.definitions.map((definition) => definition.id));\n for (const item of items) {\n if (byType[item.type] === undefined) {\n byType[item.type] = 0;\n }\n byType[item.type] += 1;\n if (byStatus[item.status] === undefined) {\n byStatus[item.status] = 0;\n }\n byStatus[item.status] += 1;\n }\n\n const historySummary = await readHistorySummary(pmRoot);\n\n return {\n totals: {\n items: items.length,\n history_streams: historySummary.history_streams,\n history_entries: historySummary.history_entries,\n },\n by_type: byType,\n by_status: byStatus,\n generated_at: nowIso(),\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AA0BjB,SAAS,WAAW,WAAmB;AACrC,SAAO,UAAU,OACf,CAAC,KAAK,UAAS;AACb,QAAI,KAAK,IAAI;AACb,WAAO;EACT,GACA,CAAA,CAA8B;AAElC;AAEA,SAAS,aAAa,UAAkB;AACtC,SAAO,SAAS,OACd,CAAC,KAAK,UAAS;AACb,QAAI,KAAK,IAAI;AACb,WAAO;EACT,GACA,CAAA,CAAgC;AAEpC;AAEA,SAAS,mBAAmB,KAAW;AACrC,MAAI,IAAI,KAAI,EAAG,WAAW,GAAG;AAC3B,WAAO;EACT;AACA,SAAO,IACJ,MAAM,QAAQ,EACd,OAAO,CAAC,SAAS,KAAK,KAAI,EAAG,SAAS,CAAC,EACvC;AACL;AAEA,eAAe,mBAAmB,QAAc;AAC9C,QAAM,aAAa,KAAK,KAAK,QAAQ,SAAS;AAC9C,MAAI,CAAE,MAAM,WAAW,UAAU,GAAI;AACnC,WAAO;MACL,iBAAiB;MACjB,iBAAiB;;EAErB;AAEA,QAAM,qBAAqB;IACzB,MAAM;IACN,OAAO;GACR;AACD,QAAM,gBAAgB,MAAM,GAAG,QAAQ,UAAU,GAC9C,OAAO,CAAC,UAAU,MAAM,SAAS,QAAQ,CAAC,EAC1C,KAAK,CAAC,GAAG,MAAM,EAAE,cAAc,CAAC,CAAC;AAEpC,MAAI,iBAAiB;AACrB,aAAW,QAAQ,cAAc;AAC/B,UAAM,cAAc,KAAK,KAAK,YAAY,IAAI;AAC9C,UAAM,MAAM,MAAM,GAAG,SAAS,aAAa,MAAM;AACjD,UAAM,qBAAqB;MACzB,MAAM;MACN,OAAO;KACR;AACD,sBAAkB,mBAAmB,GAAG;EAC1C;AAEA,SAAO;IACL,iBAAiB,aAAa;IAC9B,iBAAiB;;AAErB;AAEA,eAAsB,SAAS,QAAqB;AAClD,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAI,OAAO,IAAI;AACvD,MAAI,CAAE,MAAM,WAAW,gBAAgB,MAAM,CAAC,GAAI;AAChD,UAAM,IAAI,WAAW,iCAAiC,MAAM,wBAAwB,UAAU,SAAS;EACzG;AAEA,QAAM,WAAW,MAAM,aAAa,MAAM;AAC1C,QAAM,eAAe,wBAAwB,UAAU,gCAA+B,CAAE;AACxF,QAAM,iBAAiB,6BAA6B,SAAS,MAAM;AACnE,QAAM,QAAQ,MAAM,wBAAwB,QAAQ,SAAS,aAAa,aAAa,gBAAgB,QAAW,SAAS,MAAM;AACjI,QAAM,mCAAmC;IACvC;IACA;IACA,SAAS,MAAM,IAAI,CAAC,SAAS,KAAK,EAAE;IACpC,cAAc;GACf;AAED,QAAM,SAAS,WAAW,aAAa,KAAK;AAC5C,QAAM,WAAW,aAAa,eAAe,YAAY,IAAI,CAAC,eAAe,WAAW,EAAE,CAAC;AAC3F,aAAW,QAAQ,OAAO;AACxB,QAAI,OAAO,KAAK,IAAI,MAAM,QAAW;AACnC,aAAO,KAAK,IAAI,IAAI;IACtB;AACA,WAAO,KAAK,IAAI,KAAK;AACrB,QAAI,SAAS,KAAK,MAAM,MAAM,QAAW;AACvC,eAAS,KAAK,MAAM,IAAI;IAC1B;AACA,aAAS,KAAK,MAAM,KAAK;EAC3B;AAEA,QAAM,iBAAiB,MAAM,mBAAmB,MAAM;AAEtD,SAAO;IACL,QAAQ;MACN,OAAO,MAAM;MACb,iBAAiB,eAAe;MAChC,iBAAiB,eAAe;;IAElC,SAAS;IACT,WAAW;IACX,cAAc,OAAM;;AAExB","debugId":"b7e70da4-c1b9-5edb-81ed-0bab6612767a"}
@@ -1,123 +0,0 @@
1
- import {
2
- enforceHistoryStreamPolicyForItems,
3
- listAllFrontMatterLight
4
- } from "./chunk-XG7RJYHV.js";
5
- import "./chunk-KA24HME7.js";
6
- import "./chunk-HPH6X4ZZ.js";
7
- import {
8
- resolveItemTypeRegistry
9
- } from "./chunk-4PJQSECJ.js";
10
- import {
11
- nowIso
12
- } from "./chunk-RANZIID5.js";
13
- import {
14
- EXIT_CODE,
15
- PmCliError,
16
- getActiveExtensionRegistrations,
17
- getSettingsPath,
18
- pathExists,
19
- readSettings,
20
- resolvePmRoot,
21
- resolveRuntimeStatusRegistry,
22
- runActiveOnReadHooks
23
- } from "./chunk-SRVKTWPR.js";
24
-
25
- // dist/cli/commands/stats.js
26
- import fs from "node:fs/promises";
27
- import path from "node:path";
28
- !(function() {
29
- try {
30
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
31
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "565baafc-ab35-53fa-93fa-6f3faa4d779c");
32
- } catch (e2) {
33
- }
34
- })();
35
- function zeroByType(itemTypes) {
36
- return itemTypes.reduce((acc, value) => {
37
- acc[value] = 0;
38
- return acc;
39
- }, {});
40
- }
41
- function zeroByStatus(statuses) {
42
- return statuses.reduce((acc, value) => {
43
- acc[value] = 0;
44
- return acc;
45
- }, {});
46
- }
47
- function countNonEmptyLines(raw) {
48
- if (raw.trim().length === 0) {
49
- return 0;
50
- }
51
- return raw.split(/\r?\n/u).filter((line) => line.trim().length > 0).length;
52
- }
53
- async function readHistorySummary(pmRoot) {
54
- const historyDir = path.join(pmRoot, "history");
55
- if (!await pathExists(historyDir)) {
56
- return {
57
- history_streams: 0,
58
- history_entries: 0
59
- };
60
- }
61
- await runActiveOnReadHooks({
62
- path: historyDir,
63
- scope: "project"
64
- });
65
- const historyFiles = (await fs.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((a, b) => a.localeCompare(b));
66
- let historyEntries = 0;
67
- for (const file of historyFiles) {
68
- const historyPath = path.join(historyDir, file);
69
- const raw = await fs.readFile(historyPath, "utf8");
70
- await runActiveOnReadHooks({
71
- path: historyPath,
72
- scope: "project"
73
- });
74
- historyEntries += countNonEmptyLines(raw);
75
- }
76
- return {
77
- history_streams: historyFiles.length,
78
- history_entries: historyEntries
79
- };
80
- }
81
- async function runStats(global2) {
82
- const pmRoot = resolvePmRoot(process.cwd(), global2.path);
83
- if (!await pathExists(getSettingsPath(pmRoot))) {
84
- throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
85
- }
86
- const settings = await readSettings(pmRoot);
87
- const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
88
- const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
89
- const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, void 0, settings.schema);
90
- await enforceHistoryStreamPolicyForItems({
91
- pmRoot,
92
- settings,
93
- itemIds: items.map((item) => item.id),
94
- commandLabel: "stats"
95
- });
96
- const byType = zeroByType(typeRegistry.types);
97
- const byStatus = zeroByStatus(statusRegistry.definitions.map((definition) => definition.id));
98
- for (const item of items) {
99
- if (byType[item.type] === void 0) {
100
- byType[item.type] = 0;
101
- }
102
- byType[item.type] += 1;
103
- if (byStatus[item.status] === void 0) {
104
- byStatus[item.status] = 0;
105
- }
106
- byStatus[item.status] += 1;
107
- }
108
- const historySummary = await readHistorySummary(pmRoot);
109
- return {
110
- totals: {
111
- items: items.length,
112
- history_streams: historySummary.history_streams,
113
- history_entries: historySummary.history_entries
114
- },
115
- by_type: byType,
116
- by_status: byStatus,
117
- generated_at: nowIso()
118
- };
119
- }
120
- export {
121
- runStats
122
- };
123
- //# sourceMappingURL=stats-Y2CBTZSL.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../../cli/commands/stats.ts"],
4
- "sourcesContent": ["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { getActiveExtensionRegistrations, runActiveOnReadHooks } from \"../../core/extensions/index.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { enforceHistoryStreamPolicyForItems } from \"../../core/history/history-stream-policy.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemStatus, ItemType } from \"../../types/index.js\";\n\nexport interface StatsResult {\n totals: {\n items: number;\n history_streams: number;\n history_entries: number;\n };\n by_type: Record<ItemType, number>;\n by_status: Record<ItemStatus, number>;\n generated_at: string;\n}\n\nfunction zeroByType(itemTypes: string[]): Record<ItemType, number> {\n return itemTypes.reduce(\n (acc, value) => {\n acc[value] = 0;\n return acc;\n },\n {} as Record<ItemType, number>,\n );\n}\n\nfunction zeroByStatus(statuses: string[]): Record<ItemStatus, number> {\n return statuses.reduce(\n (acc, value) => {\n acc[value] = 0;\n return acc;\n },\n {} as Record<ItemStatus, number>,\n );\n}\n\nfunction countNonEmptyLines(raw: string): number {\n if (raw.trim().length === 0) {\n return 0;\n }\n return raw\n .split(/\\r?\\n/u)\n .filter((line) => line.trim().length > 0)\n .length;\n}\n\nasync function readHistorySummary(pmRoot: string): Promise<{ history_streams: number; history_entries: number }> {\n const historyDir = path.join(pmRoot, \"history\");\n if (!(await pathExists(historyDir))) {\n return {\n history_streams: 0,\n history_entries: 0,\n };\n }\n\n await runActiveOnReadHooks({\n path: historyDir,\n scope: \"project\",\n });\n const historyFiles = (await fs.readdir(historyDir))\n .filter((entry) => entry.endsWith(\".jsonl\"))\n .sort((a, b) => a.localeCompare(b));\n\n let historyEntries = 0;\n for (const file of historyFiles) {\n const historyPath = path.join(historyDir, file);\n const raw = await fs.readFile(historyPath, \"utf8\");\n await runActiveOnReadHooks({\n path: historyPath,\n scope: \"project\",\n });\n historyEntries += countNonEmptyLines(raw);\n }\n\n return {\n history_streams: historyFiles.length,\n history_entries: historyEntries,\n };\n}\n\nexport async function runStats(global: GlobalOptions): Promise<StatsResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);\n await enforceHistoryStreamPolicyForItems({\n pmRoot,\n settings,\n itemIds: items.map((item) => item.id),\n commandLabel: \"stats\",\n });\n\n const byType = zeroByType(typeRegistry.types);\n const byStatus = zeroByStatus(statusRegistry.definitions.map((definition) => definition.id));\n for (const item of items) {\n if (byType[item.type] === undefined) {\n byType[item.type] = 0;\n }\n byType[item.type] += 1;\n if (byStatus[item.status] === undefined) {\n byStatus[item.status] = 0;\n }\n byStatus[item.status] += 1;\n }\n\n const historySummary = await readHistorySummary(pmRoot);\n\n return {\n totals: {\n items: items.length,\n history_streams: historySummary.history_streams,\n history_entries: historySummary.history_entries,\n },\n by_type: byType,\n by_status: byStatus,\n generated_at: nowIso(),\n };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;;;;;;;;AA0BjB,SAAS,WAAW,WAAmB;AACrC,SAAO,UAAU,OACf,CAAC,KAAK,UAAS;AACb,QAAI,KAAK,IAAI;AACb,WAAO;EACT,GACA,CAAA,CAA8B;AAElC;AAEA,SAAS,aAAa,UAAkB;AACtC,SAAO,SAAS,OACd,CAAC,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M,QAAQ,MAAM,wBAAwB,QAAQ,SAAS,aAAa,aAAa,gBAAgB,QAAW,SAAS,MAAM;AACjI,QAAM,mCAAmC;IACvC;IACA;IACA,SAAS,MAAM,IAAI,CAAC,SAAS,KAAK,EAAE;IACpC,cAAc;GACf;AAED,QAAM,SAAS,WAAW,aAAa,KAAK;AAC5C,QAAM,WAAW,aAAa,eAAe,YAAY,IAAI,CAAC,eAAe,WAAW,EAAE,CAAC;AAC3F,aAAW,QAAQ,OAAO;AACxB,QAAI,OAAO,KAAK,IAAI,MAAM,QAAW;AACnC,aAAO,KAAK,IAAI,IAAI;IACtB;AACA,WAAO,KAAK,IAAI,KAAK;AACrB,QAAI,SAAS,KAAK,MAAM,MAAM,QAAW;AACvC,eAAS,KAAK,MAAM,IAAI;IAC1B;AACA,aAAS,KAAK,MAAM,KAAK;EAC3B;AAEA,QAAM,iBAAiB,MAAM,mBAAmB,MAAM;AAEtD,SAAO;IACL,QAAQ;MACN,OAAO,MAAM;MACb,iBAAiB,eAAe;MAChC,iBAAiB,eAAe;;IAElC,SAAS;IACT,WAAW;IACX,cAAc,OAAM;;AAExB;",
6
- "names": ["global"]
7
- }
@@ -1,25 +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]="45eac7fa-f181-5cca-93b7-cfb58909dbb3")}catch(e){}}();
3
- import {
4
- runUpdate
5
- } from "./chunk-DFUSXJDE.js";
6
- import "./chunk-ZRVSMOMR.js";
7
- import "./chunk-KCMIYKTA.js";
8
- import "./chunk-O5IBJE6S.js";
9
- import "./chunk-5PAOPUZX.js";
10
- import "./chunk-MISYRLEP.js";
11
- import "./chunk-26KTVXJW.js";
12
- import "./chunk-AXXKLVTW.js";
13
- import "./chunk-LXYVKYMQ.js";
14
- import "./chunk-CWT53EYT.js";
15
- import "./chunk-SSFMJCPF.js";
16
- import "./chunk-KBG47ZOY.js";
17
- import "./chunk-SZQCER6S.js";
18
- import "./chunk-NQP3ECKF.js";
19
- import "./chunk-4LTBNUYT.js";
20
- export {
21
- runUpdate
22
- };
23
- //# sourceMappingURL=update-6YEHPVXH.js.map
24
-
25
- //# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
@@ -1,21 +0,0 @@
1
- import {
2
- runUpdate
3
- } from "./chunk-D5X7N6FI.js";
4
- import "./chunk-OUF3ARDX.js";
5
- import "./chunk-Y2AKE2HS.js";
6
- import "./chunk-CJDQB2ED.js";
7
- import "./chunk-ATBVS6WW.js";
8
- import "./chunk-XX5LRINW.js";
9
- import "./chunk-KK6YPGH3.js";
10
- import "./chunk-HZOS2UG5.js";
11
- import "./chunk-3HUE7XOF.js";
12
- import "./chunk-XG7RJYHV.js";
13
- import "./chunk-KA24HME7.js";
14
- import "./chunk-HPH6X4ZZ.js";
15
- import "./chunk-4PJQSECJ.js";
16
- import "./chunk-RANZIID5.js";
17
- import "./chunk-SRVKTWPR.js";
18
- export {
19
- runUpdate
20
- };
21
- //# sourceMappingURL=update-PYLVHMRD.js.map