@unbrained/pm-cli 2026.6.6 → 2026.6.7

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 (546) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +5 -1
  3. package/dist/cli/commander-usage.js +74 -4
  4. package/dist/cli/commander-usage.js.map +1 -1
  5. package/dist/cli/commands/aggregate.d.ts +8 -0
  6. package/dist/cli/commands/aggregate.js +84 -7
  7. package/dist/cli/commands/aggregate.js.map +1 -1
  8. package/dist/cli/commands/calendar.js +10 -3
  9. package/dist/cli/commands/calendar.js.map +1 -1
  10. package/dist/cli/commands/close-many.js +13 -10
  11. package/dist/cli/commands/close-many.js.map +1 -1
  12. package/dist/cli/commands/close.d.ts +1 -1
  13. package/dist/cli/commands/close.js +20 -10
  14. package/dist/cli/commands/close.js.map +1 -1
  15. package/dist/cli/commands/completion.js +68 -13
  16. package/dist/cli/commands/completion.js.map +1 -1
  17. package/dist/cli/commands/config.d.ts +5 -4
  18. package/dist/cli/commands/config.js +50 -2
  19. package/dist/cli/commands/config.js.map +1 -1
  20. package/dist/cli/commands/contracts.js +4 -3
  21. package/dist/cli/commands/contracts.js.map +1 -1
  22. package/dist/cli/commands/copy.d.ts +14 -0
  23. package/dist/cli/commands/copy.js +153 -0
  24. package/dist/cli/commands/copy.js.map +1 -0
  25. package/dist/cli/commands/extension/doctor.js +62 -2
  26. package/dist/cli/commands/extension/doctor.js.map +1 -1
  27. package/dist/cli/commands/extension/install-sources.d.ts +8 -0
  28. package/dist/cli/commands/extension/install-sources.js +82 -2
  29. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  30. package/dist/cli/commands/extension.d.ts +29 -0
  31. package/dist/cli/commands/extension.js +61 -2
  32. package/dist/cli/commands/extension.js.map +1 -1
  33. package/dist/cli/commands/get.d.ts +9 -0
  34. package/dist/cli/commands/get.js +23 -2
  35. package/dist/cli/commands/get.js.map +1 -1
  36. package/dist/cli/commands/history-compact.d.ts +39 -0
  37. package/dist/cli/commands/history-compact.js +262 -0
  38. package/dist/cli/commands/history-compact.js.map +1 -0
  39. package/dist/cli/commands/index.d.ts +2 -0
  40. package/dist/cli/commands/index.js +4 -2
  41. package/dist/cli/commands/index.js.map +1 -1
  42. package/dist/cli/commands/list.d.ts +2 -0
  43. package/dist/cli/commands/list.js +87 -9
  44. package/dist/cli/commands/list.js.map +1 -1
  45. package/dist/cli/commands/reindex.js +8 -4
  46. package/dist/cli/commands/reindex.js.map +1 -1
  47. package/dist/cli/commands/search.d.ts +1 -0
  48. package/dist/cli/commands/search.js +232 -35
  49. package/dist/cli/commands/search.js.map +1 -1
  50. package/dist/cli/error-guidance.js +26 -2
  51. package/dist/cli/error-guidance.js.map +1 -1
  52. package/dist/cli/extension-command-help.d.ts +1 -0
  53. package/dist/cli/extension-command-help.js +3 -2
  54. package/dist/cli/extension-command-help.js.map +1 -1
  55. package/dist/cli/help-content.js +10 -2
  56. package/dist/cli/help-content.js.map +1 -1
  57. package/dist/cli/main.d.ts +3 -0
  58. package/dist/cli/main.js +13 -21
  59. package/dist/cli/main.js.map +1 -1
  60. package/dist/cli/register-list-query.js +19 -4
  61. package/dist/cli/register-list-query.js.map +1 -1
  62. package/dist/cli/register-mutation.js +52 -17
  63. package/dist/cli/register-mutation.js.map +1 -1
  64. package/dist/cli/register-operations.js +31 -7
  65. package/dist/cli/register-operations.js.map +1 -1
  66. package/dist/cli/register-setup.js +5 -5
  67. package/dist/cli/register-setup.js.map +1 -1
  68. package/dist/cli/registration-helpers.js +21 -3
  69. package/dist/cli/registration-helpers.js.map +1 -1
  70. package/dist/cli-bundle/chunks/activity-5UROHJ3D.js +16 -0
  71. package/dist/cli-bundle/chunks/{activity-JM6DTDND.js → activity-YVB3QRTE.js} +11 -11
  72. package/dist/cli-bundle/chunks/{aggregate-VNAHUNNF.js → aggregate-LH66F75F.js} +87 -17
  73. package/dist/cli-bundle/chunks/aggregate-LH66F75F.js.map +7 -0
  74. package/dist/cli-bundle/chunks/{aggregate-GI7WSZPH.js → aggregate-OHSWFQJM.js} +88 -18
  75. package/dist/cli-bundle/chunks/aggregate-OHSWFQJM.js.map +1 -0
  76. package/dist/cli-bundle/chunks/{append-WMKRXKCE.js → append-2PPYFAG5.js} +8 -8
  77. package/dist/cli-bundle/chunks/{append-7H5N64R2.js → append-AUGT5W6J.js} +8 -8
  78. package/dist/cli-bundle/chunks/{chunk-6P6GGMOG.js → chunk-2IF7WLB7.js} +2 -2
  79. package/dist/cli-bundle/chunks/{chunk-T3LC5LKB.js → chunk-2IXCHCLM.js} +5 -6
  80. package/dist/cli-bundle/chunks/chunk-2IXCHCLM.js.map +7 -0
  81. package/dist/cli-bundle/chunks/{chunk-KAG77BY3.js → chunk-2OJHLWBZ.js} +2 -2
  82. package/dist/cli-bundle/chunks/{chunk-GXSUPCBV.js → chunk-3A2CMEM7.js} +4 -4
  83. package/dist/cli-bundle/chunks/{chunk-UM2GBHS4.js → chunk-3EOBJOF4.js} +4 -4
  84. package/dist/cli-bundle/chunks/{chunk-Q7SPNHLW.js → chunk-42LOFGJS.js} +91 -16
  85. package/dist/cli-bundle/chunks/chunk-42LOFGJS.js.map +7 -0
  86. package/dist/cli-bundle/chunks/{chunk-PRJCELV4.js → chunk-4CHEG6UK.js} +8 -8
  87. package/dist/cli-bundle/chunks/{chunk-4LL6TK5B.js → chunk-4GHZR3BA.js} +56 -28
  88. package/dist/cli-bundle/chunks/chunk-4GHZR3BA.js.map +1 -0
  89. package/dist/cli-bundle/chunks/{chunk-OZ7NSQHL.js → chunk-5AXMRKN5.js} +8 -8
  90. package/dist/cli-bundle/chunks/{chunk-GCOQW437.js → chunk-6J4K6JLA.js} +3 -3
  91. package/dist/cli-bundle/chunks/{chunk-2RSPZI5H.js → chunk-6RZXO5M2.js} +8 -8
  92. package/dist/cli-bundle/chunks/{chunk-KJ33AOCY.js → chunk-AVJD6VTA.js} +3 -3
  93. package/dist/cli-bundle/chunks/{chunk-TCD3R2PF.js → chunk-B2KZGPM2.js} +39 -8
  94. package/dist/cli-bundle/chunks/chunk-B2KZGPM2.js.map +1 -0
  95. package/dist/cli-bundle/chunks/{chunk-I6BNFU5X.js → chunk-B5RF3IP7.js} +3 -3
  96. package/dist/cli-bundle/chunks/{chunk-RZN6VURO.js → chunk-C5W2UH56.js} +3 -3
  97. package/dist/cli-bundle/chunks/{chunk-3LB74A67.js → chunk-CKLBZHS7.js} +6 -6
  98. package/dist/cli-bundle/chunks/{chunk-KWU6HG75.js → chunk-CLD3XNCH.js} +91 -10
  99. package/dist/cli-bundle/chunks/chunk-CLD3XNCH.js.map +1 -0
  100. package/dist/cli-bundle/chunks/{chunk-QO7EBBOM.js → chunk-FHHBD7PN.js} +38 -7
  101. package/dist/cli-bundle/chunks/chunk-FHHBD7PN.js.map +7 -0
  102. package/dist/cli-bundle/chunks/{chunk-3VAM3NNM.js → chunk-FY6Z3FYY.js} +3 -3
  103. package/dist/cli-bundle/chunks/{chunk-RWPSOIEE.js → chunk-GNIUOLZ2.js} +7 -7
  104. package/dist/cli-bundle/chunks/{chunk-MITFDD35.js → chunk-GPXQBR3H.js} +12 -12
  105. package/dist/cli-bundle/chunks/{chunk-2VBQ6ZXS.js → chunk-GUZBNB3G.js} +27 -5
  106. package/dist/cli-bundle/chunks/chunk-GUZBNB3G.js.map +1 -0
  107. package/dist/cli-bundle/chunks/{chunk-I2HSTRJF.js → chunk-H7EO3QA3.js} +5 -5
  108. package/dist/cli-bundle/chunks/{chunk-77GFDHGF.js → chunk-HLC3KTLP.js} +2 -2
  109. package/dist/cli-bundle/chunks/{chunk-OVQCEJPG.js → chunk-HMMMWBK2.js} +2 -2
  110. package/dist/cli-bundle/chunks/{chunk-KJE2FOS4.js → chunk-HRMHZ4RV.js} +26 -4
  111. package/dist/cli-bundle/chunks/chunk-HRMHZ4RV.js.map +7 -0
  112. package/dist/cli-bundle/chunks/{chunk-XLTD2HN3.js → chunk-HV5SSZXF.js} +2 -2
  113. package/dist/cli-bundle/chunks/{chunk-GU2ZJ2VV.js → chunk-IMCJBN2Q.js} +23 -14
  114. package/dist/cli-bundle/chunks/chunk-IMCJBN2Q.js.map +7 -0
  115. package/dist/cli-bundle/chunks/{chunk-2HVRUSQA.js → chunk-KNGVP5WJ.js} +3 -3
  116. package/dist/cli-bundle/chunks/{chunk-ECCMVXGM.js → chunk-KR6R465K.js} +304 -215
  117. package/dist/cli-bundle/chunks/chunk-KR6R465K.js.map +7 -0
  118. package/dist/cli-bundle/chunks/{chunk-3BWOVLTH.js → chunk-LI65XLJR.js} +8 -8
  119. package/dist/cli-bundle/chunks/{chunk-NUZ5HKR4.js → chunk-LIN2BPJ7.js} +2 -2
  120. package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js +112 -0
  121. package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{chunk-N7ACFE26.js → chunk-LQHBENVW.js} +3 -3
  123. package/dist/cli-bundle/chunks/{chunk-23YFZ3IG.js → chunk-LXO6V66E.js} +14 -14
  124. package/dist/cli-bundle/chunks/{chunk-PDDFYW4X.js → chunk-M2PW7EZU.js} +26 -7
  125. package/dist/cli-bundle/chunks/chunk-M2PW7EZU.js.map +7 -0
  126. package/dist/cli-bundle/chunks/{chunk-PIU6RSL3.js → chunk-MOYM2C3J.js} +9 -9
  127. package/dist/cli-bundle/chunks/{chunk-PROOHX4K.js → chunk-MWRS7Z4P.js} +94 -13
  128. package/dist/cli-bundle/chunks/chunk-MWRS7Z4P.js.map +7 -0
  129. package/dist/cli-bundle/chunks/{chunk-FRAUKRU2.js → chunk-NHR2QXXZ.js} +24 -15
  130. package/dist/cli-bundle/chunks/chunk-NHR2QXXZ.js.map +1 -0
  131. package/dist/cli-bundle/chunks/{chunk-IJGCZSIQ.js → chunk-NQL32HQ5.js} +12 -12
  132. package/dist/cli-bundle/chunks/{chunk-52MAOQ6J.js → chunk-O7HSSFCC.js} +65 -16
  133. package/dist/cli-bundle/chunks/chunk-O7HSSFCC.js.map +7 -0
  134. package/dist/cli-bundle/chunks/{chunk-6ER6DXH5.js → chunk-OKSKJKHX.js} +9 -9
  135. package/dist/cli-bundle/chunks/{chunk-IOR7LGF4.js → chunk-QQL5QSTZ.js} +88 -7
  136. package/dist/cli-bundle/chunks/chunk-QQL5QSTZ.js.map +1 -0
  137. package/dist/cli-bundle/chunks/{chunk-2VVCGBNV.js → chunk-R3V3YCMH.js} +9 -9
  138. package/dist/cli-bundle/chunks/{chunk-UBOPJT3S.js → chunk-RVPTZKBC.js} +9 -9
  139. package/dist/cli-bundle/chunks/{chunk-WKY2IBOQ.js → chunk-SFFVGNHC.js} +3 -3
  140. package/dist/cli-bundle/chunks/{chunk-WSMOSYRD.js → chunk-SQPKRA54.js} +14 -14
  141. package/dist/cli-bundle/chunks/chunk-THDEID2Z.js +115 -0
  142. package/dist/cli-bundle/chunks/chunk-THDEID2Z.js.map +7 -0
  143. package/dist/cli-bundle/chunks/{chunk-W7XABV4H.js → chunk-TINUJMWN.js} +92 -17
  144. package/dist/cli-bundle/chunks/chunk-TINUJMWN.js.map +1 -0
  145. package/dist/cli-bundle/chunks/{chunk-YL2DJGYS.js → chunk-TNPBPNII.js} +7 -7
  146. package/dist/cli-bundle/chunks/{chunk-XTGLRY2Y.js → chunk-TP4DDY27.js} +6 -6
  147. package/dist/cli-bundle/chunks/{chunk-AY43SBIN.js → chunk-TYJJOTUA.js} +6 -6
  148. package/dist/cli-bundle/chunks/{chunk-LCM63IXU.js → chunk-UAQOQ7IE.js} +2 -2
  149. package/dist/cli-bundle/chunks/{chunk-BQHUILZS.js → chunk-UEWA73ZZ.js} +5 -5
  150. package/dist/cli-bundle/chunks/{chunk-PO3GSVFV.js → chunk-UIIQC5YO.js} +2 -2
  151. package/dist/cli-bundle/chunks/{chunk-U5SXYXSY.js → chunk-UJUT6AHZ.js} +241 -35
  152. package/dist/cli-bundle/chunks/chunk-UJUT6AHZ.js.map +7 -0
  153. package/dist/cli-bundle/chunks/{chunk-HZGUAH22.js → chunk-UT6WFXW2.js} +6 -7
  154. package/dist/cli-bundle/chunks/chunk-UT6WFXW2.js.map +1 -0
  155. package/dist/cli-bundle/chunks/{chunk-LB3RUL2N.js → chunk-UYQ7HXH4.js} +10 -6
  156. package/dist/cli-bundle/chunks/chunk-UYQ7HXH4.js.map +1 -0
  157. package/dist/cli-bundle/chunks/{chunk-R6UFP2GE.js → chunk-V6EYFTRL.js} +7 -7
  158. package/dist/cli-bundle/chunks/{chunk-3FI4SEFT.js → chunk-WAA7UI6M.js} +58 -30
  159. package/dist/cli-bundle/chunks/chunk-WAA7UI6M.js.map +7 -0
  160. package/dist/cli-bundle/chunks/{chunk-AO442XLN.js → chunk-WCQZBDDH.js} +10 -6
  161. package/dist/cli-bundle/chunks/{chunk-AO442XLN.js.map → chunk-WCQZBDDH.js.map} +2 -2
  162. package/dist/cli-bundle/chunks/{chunk-SKJWX3QB.js → chunk-WR5567FH.js} +87 -6
  163. package/dist/cli-bundle/chunks/chunk-WR5567FH.js.map +7 -0
  164. package/dist/cli-bundle/chunks/{chunk-XSJCLN2R.js → chunk-WYEXLDDY.js} +3 -3
  165. package/dist/cli-bundle/chunks/{chunk-5SFCOO6B.js → chunk-X4IZKYHP.js} +234 -28
  166. package/dist/cli-bundle/chunks/chunk-X4IZKYHP.js.map +1 -0
  167. package/dist/cli-bundle/chunks/{chunk-E5FJNAZA.js → chunk-X7UHMKPE.js} +3 -3
  168. package/dist/cli-bundle/chunks/{chunk-WOPXVEZP.js → chunk-XS3O2TFJ.js} +27 -8
  169. package/dist/cli-bundle/chunks/chunk-XS3O2TFJ.js.map +1 -0
  170. package/dist/cli-bundle/chunks/{chunk-TPH5XEVD.js → chunk-XYNT7UFP.js} +303 -207
  171. package/dist/cli-bundle/chunks/chunk-XYNT7UFP.js.map +1 -0
  172. package/dist/cli-bundle/chunks/{chunk-GGYWB3Y2.js → chunk-YBZW2QQ7.js} +6 -6
  173. package/dist/cli-bundle/chunks/{chunk-ME2YH6FN.js → chunk-YO3THIJF.js} +7 -7
  174. package/dist/cli-bundle/chunks/{chunk-5FDATVEZ.js → chunk-YPH4ESA2.js} +66 -17
  175. package/dist/cli-bundle/chunks/chunk-YPH4ESA2.js.map +1 -0
  176. package/dist/cli-bundle/chunks/{claim-X2P4IB7J.js → claim-BJ4QMPJC.js} +10 -10
  177. package/dist/cli-bundle/chunks/{claim-4DBF6RVG.js → claim-KW743OSW.js} +10 -10
  178. package/dist/cli-bundle/chunks/close-P4ZBKODL.js +13 -0
  179. package/dist/cli-bundle/chunks/{close-PTYFA45H.js → close-SYHSRZDC.js} +8 -8
  180. package/dist/cli-bundle/chunks/{close-many-7CGIDPTJ.js → close-many-DBLEYFOY.js} +29 -26
  181. package/dist/cli-bundle/chunks/close-many-DBLEYFOY.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{close-many-ERFO6LHR.js → close-many-LAC5VR4G.js} +30 -27
  183. package/dist/cli-bundle/chunks/close-many-LAC5VR4G.js.map +1 -0
  184. package/dist/cli-bundle/chunks/{comments-QKBYCWKD.js → comments-JEO6HHVM.js} +10 -10
  185. package/dist/cli-bundle/chunks/{comments-OONGABK5.js → comments-YT2PQ5DD.js} +10 -10
  186. package/dist/cli-bundle/chunks/{config-6FXCQKIF.js → config-RZRVS3ZV.js} +127 -11
  187. package/dist/cli-bundle/chunks/config-RZRVS3ZV.js.map +1 -0
  188. package/dist/cli-bundle/chunks/{config-U4RZ4CQB.js → config-YJSAAADD.js} +128 -12
  189. package/dist/cli-bundle/chunks/config-YJSAAADD.js.map +7 -0
  190. package/dist/cli-bundle/chunks/{context-FYYJGFWS.js → context-LGYEEKAW.js} +14 -14
  191. package/dist/cli-bundle/chunks/{context-FYYJGFWS.js.map → context-LGYEEKAW.js.map} +2 -2
  192. package/dist/cli-bundle/chunks/{context-YMJ3Z2HQ.js → context-ZUH5IOOI.js} +15 -15
  193. package/dist/cli-bundle/chunks/context-ZUH5IOOI.js.map +1 -0
  194. package/dist/cli-bundle/chunks/{contracts-RFSPGVVJ.js → contracts-YXJ6NXKH.js} +7 -5
  195. package/dist/cli-bundle/chunks/contracts-YXJ6NXKH.js.map +7 -0
  196. package/dist/cli-bundle/chunks/{contracts-QDB6OMLQ.js → contracts-ZIBXROPE.js} +8 -6
  197. package/dist/cli-bundle/chunks/contracts-ZIBXROPE.js.map +1 -0
  198. package/dist/cli-bundle/chunks/copy-BZALX5MQ.js +182 -0
  199. package/dist/cli-bundle/chunks/copy-BZALX5MQ.js.map +1 -0
  200. package/dist/cli-bundle/chunks/copy-YPWEIAPD.js +185 -0
  201. package/dist/cli-bundle/chunks/copy-YPWEIAPD.js.map +7 -0
  202. package/dist/cli-bundle/chunks/create-4DS2QWQC.js +27 -0
  203. package/dist/cli-bundle/chunks/{create-I5L4EYYZ.js → create-CF7EVRX7.js} +13 -13
  204. package/dist/cli-bundle/chunks/{delete-7HPGI4GZ.js → delete-KR4VBWVE.js} +7 -7
  205. package/dist/cli-bundle/chunks/{delete-VXUPH5RS.js → delete-XLZRTRKR.js} +7 -7
  206. package/dist/cli-bundle/chunks/{deps-JSRRWC3Z.js → deps-2YTXD3VM.js} +7 -7
  207. package/dist/cli-bundle/chunks/{deps-SCZIFK2Z.js → deps-GZMFMTGS.js} +7 -7
  208. package/dist/cli-bundle/chunks/{docs-GJK6K4VP.js → docs-SLROFEQ4.js} +9 -9
  209. package/dist/cli-bundle/chunks/{docs-WW4N3MBM.js → docs-ZHISRR2D.js} +9 -9
  210. package/dist/cli-bundle/chunks/{extension-J7IBMFTD.js → extension-3C7OOI4F.js} +8 -6
  211. package/dist/cli-bundle/chunks/{extension-VDY2U33M.js → extension-XYCUXICD.js} +8 -6
  212. package/dist/cli-bundle/chunks/{files-ISZJGILQ.js → files-FUWF2FYJ.js} +9 -9
  213. package/dist/cli-bundle/chunks/{files-WKOD326U.js → files-J4I5IU4O.js} +9 -9
  214. package/dist/cli-bundle/chunks/{gc-JDVJ6OQ2.js → gc-34NXSNSN.js} +3 -3
  215. package/dist/cli-bundle/chunks/{gc-ULPVWMTN.js → gc-SPIIZX3A.js} +3 -3
  216. package/dist/cli-bundle/chunks/{get-RV37HT3G.js → get-SZKNRHMA.js} +34 -12
  217. package/dist/cli-bundle/chunks/get-SZKNRHMA.js.map +1 -0
  218. package/dist/cli-bundle/chunks/{get-WXU6WI5P.js → get-VITKYP6S.js} +33 -11
  219. package/dist/cli-bundle/chunks/get-VITKYP6S.js.map +7 -0
  220. package/dist/cli-bundle/chunks/{health-6L6EH4WR.js → health-4SNTA2TF.js} +12 -11
  221. package/dist/cli-bundle/chunks/{health-6L6EH4WR.js.map → health-4SNTA2TF.js.map} +1 -1
  222. package/dist/cli-bundle/chunks/{health-LOI2HHKB.js → health-7G3EPM57.js} +14 -13
  223. package/dist/cli-bundle/chunks/{health-LOI2HHKB.js.map → health-7G3EPM57.js.map} +1 -1
  224. package/dist/cli-bundle/chunks/{history-PKN67D5O.js → history-SDAWYZR3.js} +10 -10
  225. package/dist/cli-bundle/chunks/history-YDUEILKP.js +20 -0
  226. package/dist/cli-bundle/chunks/history-compact-DMW536VH.js +287 -0
  227. package/dist/cli-bundle/chunks/history-compact-DMW536VH.js.map +1 -0
  228. package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js +290 -0
  229. package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js.map +7 -0
  230. package/dist/cli-bundle/chunks/{history-redact-V4FOJGS7.js → history-redact-EPJ7GENL.js} +11 -11
  231. package/dist/cli-bundle/chunks/history-redact-KASLLPE7.js +19 -0
  232. package/dist/cli-bundle/chunks/{history-repair-SDMHR7JT.js → history-repair-IJ7LLBET.js} +11 -11
  233. package/dist/cli-bundle/chunks/{history-repair-HIBCBIKK.js → history-repair-YNESJRT6.js} +11 -11
  234. package/dist/cli-bundle/chunks/init-IGSS4GNH.js +17 -0
  235. package/dist/cli-bundle/chunks/{init-P56QYWJF.js → init-YHVBTEET.js} +9 -8
  236. package/dist/cli-bundle/chunks/{learnings-GDFRG5J7.js → learnings-4YBMIVCZ.js} +10 -10
  237. package/dist/cli-bundle/chunks/{learnings-MIXSESLK.js → learnings-T4PF24YN.js} +10 -10
  238. package/dist/cli-bundle/chunks/{list-FGOWQMSM.js → list-3KEVBOYW.js} +10 -10
  239. package/dist/cli-bundle/chunks/list-E44O2K64.js +20 -0
  240. package/dist/cli-bundle/chunks/{notes-4XVSH2AZ.js → notes-FLUCNJSH.js} +10 -10
  241. package/dist/cli-bundle/chunks/{notes-5UK3GEH2.js → notes-GJKALVZM.js} +10 -10
  242. package/dist/cli-bundle/chunks/{plan-SLMODHWX.js → plan-T5MMZLI3.js} +13 -13
  243. package/dist/cli-bundle/chunks/{plan-DUMBV3QB.js → plan-YYMIL3HV.js} +13 -13
  244. package/dist/cli-bundle/chunks/{register-list-query-POCFZ5JW.js → register-list-query-I65EZ3HB.js} +29 -25
  245. package/dist/cli-bundle/chunks/register-list-query-I65EZ3HB.js.map +1 -0
  246. package/dist/cli-bundle/chunks/{register-list-query-WST76HSQ.js → register-list-query-OECMHO4G.js} +28 -24
  247. package/dist/cli-bundle/chunks/register-list-query-OECMHO4G.js.map +7 -0
  248. package/dist/cli-bundle/chunks/{register-mutation-N5GSUZJV.js → register-mutation-2FLXORLR.js} +65 -47
  249. package/dist/cli-bundle/chunks/register-mutation-2FLXORLR.js.map +1 -0
  250. package/dist/cli-bundle/chunks/{register-mutation-OA675SOU.js → register-mutation-5GPDEKHR.js} +64 -46
  251. package/dist/cli-bundle/chunks/register-mutation-5GPDEKHR.js.map +7 -0
  252. package/dist/cli-bundle/chunks/{register-operations-GNHBE5I3.js → register-operations-BNGAUMGK.js} +58 -35
  253. package/dist/cli-bundle/chunks/register-operations-BNGAUMGK.js.map +1 -0
  254. package/dist/cli-bundle/chunks/{register-operations-N3PMHXH5.js → register-operations-GQKT35H5.js} +57 -34
  255. package/dist/cli-bundle/chunks/register-operations-GQKT35H5.js.map +7 -0
  256. package/dist/cli-bundle/chunks/{register-setup-JIMPKJKV.js → register-setup-DNDCGZ4O.js} +18 -18
  257. package/dist/cli-bundle/chunks/{register-setup-JIMPKJKV.js.map → register-setup-DNDCGZ4O.js.map} +1 -1
  258. package/dist/cli-bundle/chunks/{register-setup-ZHJI2DI3.js → register-setup-EJY44FPH.js} +17 -17
  259. package/dist/cli-bundle/chunks/{register-setup-ZHJI2DI3.js.map → register-setup-EJY44FPH.js.map} +2 -2
  260. package/dist/cli-bundle/chunks/{restore-PBL6T5TW.js → restore-DDJGVZIN.js} +11 -11
  261. package/dist/cli-bundle/chunks/restore-SJSASGZP.js +17 -0
  262. package/dist/cli-bundle/chunks/{schema-2NOO6NGB.js → schema-B7NQ6XVP.js} +8 -8
  263. package/dist/cli-bundle/chunks/{schema-EBI4NLUO.js → schema-HEGYH6CE.js} +8 -8
  264. package/dist/cli-bundle/chunks/{search-JPUQTVCY.js → search-DVVQ4UO2.js} +421 -42
  265. package/dist/cli-bundle/chunks/search-DVVQ4UO2.js.map +1 -0
  266. package/dist/cli-bundle/chunks/{search-OA6JX27A.js → search-JNEZJV7H.js} +427 -41
  267. package/dist/cli-bundle/chunks/search-JNEZJV7H.js.map +7 -0
  268. package/dist/cli-bundle/chunks/{stats-CV54BAWY.js → stats-7JDIJRDH.js} +7 -7
  269. package/dist/cli-bundle/chunks/{stats-XYB6KTFG.js → stats-SYTJRR4Z.js} +7 -7
  270. package/dist/cli-bundle/chunks/{telemetry-LMJ7PFUO.js → telemetry-4HHWD5Y7.js} +4 -4
  271. package/dist/cli-bundle/chunks/{telemetry-NCMEPJNR.js → telemetry-EGWP7ZUX.js} +4 -4
  272. package/dist/cli-bundle/chunks/{test-WBROAJIE.js → test-IIELLSZX.js} +14 -13
  273. package/dist/cli-bundle/chunks/test-ML5RLWXE.js +32 -0
  274. package/dist/cli-bundle/chunks/{test-all-NTOZ7C3M.js → test-all-7DNCMML7.js} +14 -13
  275. package/dist/cli-bundle/chunks/{test-all-NTOZ7C3M.js.map → test-all-7DNCMML7.js.map} +1 -1
  276. package/dist/cli-bundle/chunks/{test-all-N6NSRDTV.js → test-all-IHTUJRRC.js} +16 -15
  277. package/dist/cli-bundle/chunks/{test-all-N6NSRDTV.js.map → test-all-IHTUJRRC.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{test-runs-V6A7LPWZ.js → test-runs-5FEMBV3A.js} +5 -5
  279. package/dist/cli-bundle/chunks/{test-runs-WMVTQU3Y.js → test-runs-RNKZ37PS.js} +5 -5
  280. package/dist/cli-bundle/chunks/update-6C67X4KS.js +21 -0
  281. package/dist/cli-bundle/chunks/update-VF26YPT3.js +25 -0
  282. package/dist/cli-bundle/chunks/{update-many-KGGEYABR.js → update-many-BSZZZYXY.js} +22 -22
  283. package/dist/cli-bundle/chunks/{update-many-EM6OXYGO.js → update-many-BWKJJEBF.js} +22 -22
  284. package/dist/cli-bundle/chunks/{upgrade-LXPOQKFV.js → upgrade-RSE5PC44.js} +7 -6
  285. package/dist/cli-bundle/chunks/{upgrade-LXPOQKFV.js.map → upgrade-RSE5PC44.js.map} +1 -1
  286. package/dist/cli-bundle/chunks/{upgrade-BLI7XBAJ.js → upgrade-YWI5DJFA.js} +5 -4
  287. package/dist/cli-bundle/chunks/{upgrade-BLI7XBAJ.js.map → upgrade-YWI5DJFA.js.map} +1 -1
  288. package/dist/cli-bundle/chunks/{validate-AGOAUOVW.js → validate-NK3WKB7C.js} +18 -17
  289. package/dist/cli-bundle/chunks/{validate-AGOAUOVW.js.map → validate-NK3WKB7C.js.map} +1 -1
  290. package/dist/cli-bundle/chunks/{validate-L5J6A7YO.js → validate-UCEOB7S6.js} +20 -19
  291. package/dist/cli-bundle/chunks/{validate-L5J6A7YO.js.map → validate-UCEOB7S6.js.map} +1 -1
  292. package/dist/cli-bundle/main.js +127 -43
  293. package/dist/cli-bundle/main.js.map +3 -3
  294. package/dist/core/config/nested-settings.d.ts +8 -6
  295. package/dist/core/config/nested-settings.js +71 -5
  296. package/dist/core/config/nested-settings.js.map +1 -1
  297. package/dist/core/config/positional-value.js +4 -2
  298. package/dist/core/config/positional-value.js.map +1 -1
  299. package/dist/core/extensions/extension-types.d.ts +36 -0
  300. package/dist/core/extensions/extension-types.js +2 -2
  301. package/dist/core/extensions/extension-types.js.map +1 -1
  302. package/dist/core/extensions/loader.js +46 -5
  303. package/dist/core/extensions/loader.js.map +1 -1
  304. package/dist/core/history/drift-scan.d.ts +3 -4
  305. package/dist/core/history/drift-scan.js +71 -18
  306. package/dist/core/history/drift-scan.js.map +1 -1
  307. package/dist/core/item/id.js +4 -5
  308. package/dist/core/item/id.js.map +1 -1
  309. package/dist/core/item/item-format.js +7 -3
  310. package/dist/core/item/item-format.js.map +1 -1
  311. package/dist/core/item/toon-decode.d.ts +7 -0
  312. package/dist/core/item/toon-decode.js +11 -2
  313. package/dist/core/item/toon-decode.js.map +1 -1
  314. package/dist/core/item/type-registry.js +25 -7
  315. package/dist/core/item/type-registry.js.map +1 -1
  316. package/dist/core/search/cache.js +5 -3
  317. package/dist/core/search/cache.js.map +1 -1
  318. package/dist/core/search/corpus.d.ts +6 -0
  319. package/dist/core/search/corpus.js +22 -9
  320. package/dist/core/search/corpus.js.map +1 -1
  321. package/dist/core/search/embedding-batches.js +10 -7
  322. package/dist/core/search/embedding-batches.js.map +1 -1
  323. package/dist/core/search/relevance.d.ts +29 -0
  324. package/dist/core/search/relevance.js +226 -0
  325. package/dist/core/search/relevance.js.map +1 -0
  326. package/dist/core/search/vector-stores.d.ts +3 -0
  327. package/dist/core/search/vector-stores.js +23 -10
  328. package/dist/core/search/vector-stores.js.map +1 -1
  329. package/dist/core/shared/constants.js +15 -2
  330. package/dist/core/shared/constants.js.map +1 -1
  331. package/dist/core/shared/errors.d.ts +6 -0
  332. package/dist/core/shared/errors.js +2 -2
  333. package/dist/core/shared/errors.js.map +1 -1
  334. package/dist/core/shared/primitives.d.ts +8 -0
  335. package/dist/core/shared/primitives.js +29 -2
  336. package/dist/core/shared/primitives.js.map +1 -1
  337. package/dist/core/shared/time.js +42 -6
  338. package/dist/core/shared/time.js.map +1 -1
  339. package/dist/core/store/paths.js +25 -7
  340. package/dist/core/store/paths.js.map +1 -1
  341. package/dist/core/store/settings-validator.d.ts +11 -0
  342. package/dist/core/store/settings-validator.js +14 -2
  343. package/dist/core/store/settings-validator.js.map +1 -1
  344. package/dist/core/store/settings.js +109 -12
  345. package/dist/core/store/settings.js.map +1 -1
  346. package/dist/core/telemetry/runtime.js +85 -4
  347. package/dist/core/telemetry/runtime.js.map +1 -1
  348. package/dist/mcp/server.js +36 -9
  349. package/dist/mcp/server.js.map +1 -1
  350. package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
  351. package/dist/sdk/cli-contracts/commander-types.js +13 -2
  352. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  353. package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
  354. package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
  355. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  356. package/dist/sdk/cli-contracts/tool-option-contracts.js +7 -2
  357. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  358. package/dist/sdk/cli-contracts/tool-parameter-tables.js +31 -2
  359. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  360. package/dist/sdk/cli-contracts.d.ts +3 -1
  361. package/dist/sdk/cli-contracts.js +36 -6
  362. package/dist/sdk/cli-contracts.js.map +1 -1
  363. package/dist/sdk/index.d.ts +2 -2
  364. package/dist/sdk/index.js +3 -3
  365. package/dist/sdk/index.js.map +1 -1
  366. package/dist/sdk/testing.d.ts +51 -1
  367. package/dist/sdk/testing.js +93 -2
  368. package/dist/sdk/testing.js.map +1 -1
  369. package/dist/types.d.ts +14 -0
  370. package/dist/types.js +2 -2
  371. package/dist/types.js.map +1 -1
  372. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  373. package/docs/CODEX_PLUGIN.md +1 -1
  374. package/docs/COMMANDS.md +9 -2
  375. package/docs/CONFIGURATION.md +22 -1
  376. package/docs/EXTENSIONS.md +22 -9
  377. package/docs/QUICKSTART.md +1 -1
  378. package/docs/SDK.md +66 -0
  379. package/docs/TESTING.md +14 -0
  380. package/package.json +2 -1
  381. package/packages/pm-governance-audit/README.md +14 -0
  382. package/packages/pm-governance-audit/extensions/governance-audit/index.js +39 -1
  383. package/packages/pm-governance-audit/extensions/governance-audit/index.ts +40 -2
  384. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +1 -1
  385. package/packages/pm-governance-audit/package.json +4 -2
  386. package/packages/pm-lifecycle-hooks/README.md +21 -0
  387. package/packages/pm-search-advanced/README.md +38 -0
  388. package/packages/pm-search-advanced/extensions/search-advanced/index.js +17 -0
  389. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +17 -0
  390. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +216 -1
  391. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +271 -2
  392. package/plugins/pm-claude/README.md +4 -4
  393. package/plugins/pm-codex/README.md +1 -1
  394. package/dist/cli-bundle/chunks/activity-CVXTCHYY.js +0 -16
  395. package/dist/cli-bundle/chunks/aggregate-GI7WSZPH.js.map +0 -1
  396. package/dist/cli-bundle/chunks/aggregate-VNAHUNNF.js.map +0 -7
  397. package/dist/cli-bundle/chunks/chunk-2VBQ6ZXS.js.map +0 -1
  398. package/dist/cli-bundle/chunks/chunk-3FI4SEFT.js.map +0 -7
  399. package/dist/cli-bundle/chunks/chunk-4LL6TK5B.js.map +0 -1
  400. package/dist/cli-bundle/chunks/chunk-52MAOQ6J.js.map +0 -7
  401. package/dist/cli-bundle/chunks/chunk-5FDATVEZ.js.map +0 -1
  402. package/dist/cli-bundle/chunks/chunk-5SFCOO6B.js.map +0 -1
  403. package/dist/cli-bundle/chunks/chunk-ECCMVXGM.js.map +0 -7
  404. package/dist/cli-bundle/chunks/chunk-FRAUKRU2.js.map +0 -1
  405. package/dist/cli-bundle/chunks/chunk-GU2ZJ2VV.js.map +0 -7
  406. package/dist/cli-bundle/chunks/chunk-HZGUAH22.js.map +0 -1
  407. package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js.map +0 -1
  408. package/dist/cli-bundle/chunks/chunk-KJE2FOS4.js.map +0 -7
  409. package/dist/cli-bundle/chunks/chunk-KWU6HG75.js.map +0 -1
  410. package/dist/cli-bundle/chunks/chunk-LB3RUL2N.js.map +0 -1
  411. package/dist/cli-bundle/chunks/chunk-PDDFYW4X.js.map +0 -7
  412. package/dist/cli-bundle/chunks/chunk-PROOHX4K.js.map +0 -7
  413. package/dist/cli-bundle/chunks/chunk-Q7SPNHLW.js.map +0 -7
  414. package/dist/cli-bundle/chunks/chunk-QO7EBBOM.js.map +0 -7
  415. package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js.map +0 -7
  416. package/dist/cli-bundle/chunks/chunk-T3LC5LKB.js.map +0 -7
  417. package/dist/cli-bundle/chunks/chunk-TCD3R2PF.js.map +0 -1
  418. package/dist/cli-bundle/chunks/chunk-TPH5XEVD.js.map +0 -1
  419. package/dist/cli-bundle/chunks/chunk-U5SXYXSY.js.map +0 -7
  420. package/dist/cli-bundle/chunks/chunk-W7XABV4H.js.map +0 -1
  421. package/dist/cli-bundle/chunks/chunk-WOPXVEZP.js.map +0 -1
  422. package/dist/cli-bundle/chunks/close-3HDWDA3L.js +0 -13
  423. package/dist/cli-bundle/chunks/close-many-7CGIDPTJ.js.map +0 -7
  424. package/dist/cli-bundle/chunks/close-many-ERFO6LHR.js.map +0 -1
  425. package/dist/cli-bundle/chunks/config-6FXCQKIF.js.map +0 -1
  426. package/dist/cli-bundle/chunks/config-U4RZ4CQB.js.map +0 -7
  427. package/dist/cli-bundle/chunks/context-YMJ3Z2HQ.js.map +0 -1
  428. package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js.map +0 -1
  429. package/dist/cli-bundle/chunks/contracts-RFSPGVVJ.js.map +0 -7
  430. package/dist/cli-bundle/chunks/create-JTZNCTQC.js +0 -27
  431. package/dist/cli-bundle/chunks/get-RV37HT3G.js.map +0 -1
  432. package/dist/cli-bundle/chunks/get-WXU6WI5P.js.map +0 -7
  433. package/dist/cli-bundle/chunks/history-2BA3T5AE.js +0 -20
  434. package/dist/cli-bundle/chunks/history-redact-JBZNXHGR.js +0 -19
  435. package/dist/cli-bundle/chunks/init-HIVSNX3O.js +0 -16
  436. package/dist/cli-bundle/chunks/list-MUSQNMTD.js +0 -20
  437. package/dist/cli-bundle/chunks/register-list-query-POCFZ5JW.js.map +0 -1
  438. package/dist/cli-bundle/chunks/register-list-query-WST76HSQ.js.map +0 -7
  439. package/dist/cli-bundle/chunks/register-mutation-N5GSUZJV.js.map +0 -1
  440. package/dist/cli-bundle/chunks/register-mutation-OA675SOU.js.map +0 -7
  441. package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js.map +0 -1
  442. package/dist/cli-bundle/chunks/register-operations-N3PMHXH5.js.map +0 -7
  443. package/dist/cli-bundle/chunks/restore-D4RGNX33.js +0 -17
  444. package/dist/cli-bundle/chunks/search-JPUQTVCY.js.map +0 -1
  445. package/dist/cli-bundle/chunks/search-OA6JX27A.js.map +0 -7
  446. package/dist/cli-bundle/chunks/test-MXX3E5JL.js +0 -31
  447. package/dist/cli-bundle/chunks/update-OSV3NAQB.js +0 -25
  448. package/dist/cli-bundle/chunks/update-YRXSUGYQ.js +0 -21
  449. /package/dist/cli-bundle/chunks/{activity-CVXTCHYY.js.map → activity-5UROHJ3D.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{activity-JM6DTDND.js.map → activity-YVB3QRTE.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{append-WMKRXKCE.js.map → append-2PPYFAG5.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{append-7H5N64R2.js.map → append-AUGT5W6J.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{chunk-6P6GGMOG.js.map → chunk-2IF7WLB7.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{chunk-KAG77BY3.js.map → chunk-2OJHLWBZ.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{chunk-GXSUPCBV.js.map → chunk-3A2CMEM7.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{chunk-UM2GBHS4.js.map → chunk-3EOBJOF4.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{chunk-PRJCELV4.js.map → chunk-4CHEG6UK.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{chunk-OZ7NSQHL.js.map → chunk-5AXMRKN5.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{chunk-GCOQW437.js.map → chunk-6J4K6JLA.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{chunk-2RSPZI5H.js.map → chunk-6RZXO5M2.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{chunk-KJ33AOCY.js.map → chunk-AVJD6VTA.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{chunk-I6BNFU5X.js.map → chunk-B5RF3IP7.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{chunk-RZN6VURO.js.map → chunk-C5W2UH56.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{chunk-3LB74A67.js.map → chunk-CKLBZHS7.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{chunk-3VAM3NNM.js.map → chunk-FY6Z3FYY.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{chunk-RWPSOIEE.js.map → chunk-GNIUOLZ2.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{chunk-MITFDD35.js.map → chunk-GPXQBR3H.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{chunk-I2HSTRJF.js.map → chunk-H7EO3QA3.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{chunk-77GFDHGF.js.map → chunk-HLC3KTLP.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{chunk-OVQCEJPG.js.map → chunk-HMMMWBK2.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{chunk-XLTD2HN3.js.map → chunk-HV5SSZXF.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{chunk-2HVRUSQA.js.map → chunk-KNGVP5WJ.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{chunk-3BWOVLTH.js.map → chunk-LI65XLJR.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{chunk-NUZ5HKR4.js.map → chunk-LIN2BPJ7.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{chunk-N7ACFE26.js.map → chunk-LQHBENVW.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{chunk-23YFZ3IG.js.map → chunk-LXO6V66E.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{chunk-PIU6RSL3.js.map → chunk-MOYM2C3J.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{chunk-IJGCZSIQ.js.map → chunk-NQL32HQ5.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{chunk-6ER6DXH5.js.map → chunk-OKSKJKHX.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{chunk-2VVCGBNV.js.map → chunk-R3V3YCMH.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{chunk-UBOPJT3S.js.map → chunk-RVPTZKBC.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{chunk-WKY2IBOQ.js.map → chunk-SFFVGNHC.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{chunk-WSMOSYRD.js.map → chunk-SQPKRA54.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{chunk-YL2DJGYS.js.map → chunk-TNPBPNII.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{chunk-XTGLRY2Y.js.map → chunk-TP4DDY27.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{chunk-AY43SBIN.js.map → chunk-TYJJOTUA.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{chunk-LCM63IXU.js.map → chunk-UAQOQ7IE.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{chunk-BQHUILZS.js.map → chunk-UEWA73ZZ.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{chunk-PO3GSVFV.js.map → chunk-UIIQC5YO.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{chunk-R6UFP2GE.js.map → chunk-V6EYFTRL.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{chunk-XSJCLN2R.js.map → chunk-WYEXLDDY.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{chunk-E5FJNAZA.js.map → chunk-X7UHMKPE.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{chunk-GGYWB3Y2.js.map → chunk-YBZW2QQ7.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{chunk-ME2YH6FN.js.map → chunk-YO3THIJF.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{claim-X2P4IB7J.js.map → claim-BJ4QMPJC.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{claim-4DBF6RVG.js.map → claim-KW743OSW.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{close-3HDWDA3L.js.map → close-P4ZBKODL.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{close-PTYFA45H.js.map → close-SYHSRZDC.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{comments-QKBYCWKD.js.map → comments-JEO6HHVM.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{comments-OONGABK5.js.map → comments-YT2PQ5DD.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{create-JTZNCTQC.js.map → create-4DS2QWQC.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{create-I5L4EYYZ.js.map → create-CF7EVRX7.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{delete-7HPGI4GZ.js.map → delete-KR4VBWVE.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{delete-VXUPH5RS.js.map → delete-XLZRTRKR.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{deps-JSRRWC3Z.js.map → deps-2YTXD3VM.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{deps-SCZIFK2Z.js.map → deps-GZMFMTGS.js.map} +0 -0
  507. /package/dist/cli-bundle/chunks/{docs-GJK6K4VP.js.map → docs-SLROFEQ4.js.map} +0 -0
  508. /package/dist/cli-bundle/chunks/{docs-WW4N3MBM.js.map → docs-ZHISRR2D.js.map} +0 -0
  509. /package/dist/cli-bundle/chunks/{extension-J7IBMFTD.js.map → extension-3C7OOI4F.js.map} +0 -0
  510. /package/dist/cli-bundle/chunks/{extension-VDY2U33M.js.map → extension-XYCUXICD.js.map} +0 -0
  511. /package/dist/cli-bundle/chunks/{files-ISZJGILQ.js.map → files-FUWF2FYJ.js.map} +0 -0
  512. /package/dist/cli-bundle/chunks/{files-WKOD326U.js.map → files-J4I5IU4O.js.map} +0 -0
  513. /package/dist/cli-bundle/chunks/{gc-JDVJ6OQ2.js.map → gc-34NXSNSN.js.map} +0 -0
  514. /package/dist/cli-bundle/chunks/{gc-ULPVWMTN.js.map → gc-SPIIZX3A.js.map} +0 -0
  515. /package/dist/cli-bundle/chunks/{history-PKN67D5O.js.map → history-SDAWYZR3.js.map} +0 -0
  516. /package/dist/cli-bundle/chunks/{history-2BA3T5AE.js.map → history-YDUEILKP.js.map} +0 -0
  517. /package/dist/cli-bundle/chunks/{history-redact-V4FOJGS7.js.map → history-redact-EPJ7GENL.js.map} +0 -0
  518. /package/dist/cli-bundle/chunks/{history-redact-JBZNXHGR.js.map → history-redact-KASLLPE7.js.map} +0 -0
  519. /package/dist/cli-bundle/chunks/{history-repair-SDMHR7JT.js.map → history-repair-IJ7LLBET.js.map} +0 -0
  520. /package/dist/cli-bundle/chunks/{history-repair-HIBCBIKK.js.map → history-repair-YNESJRT6.js.map} +0 -0
  521. /package/dist/cli-bundle/chunks/{init-HIVSNX3O.js.map → init-IGSS4GNH.js.map} +0 -0
  522. /package/dist/cli-bundle/chunks/{init-P56QYWJF.js.map → init-YHVBTEET.js.map} +0 -0
  523. /package/dist/cli-bundle/chunks/{learnings-GDFRG5J7.js.map → learnings-4YBMIVCZ.js.map} +0 -0
  524. /package/dist/cli-bundle/chunks/{learnings-MIXSESLK.js.map → learnings-T4PF24YN.js.map} +0 -0
  525. /package/dist/cli-bundle/chunks/{list-FGOWQMSM.js.map → list-3KEVBOYW.js.map} +0 -0
  526. /package/dist/cli-bundle/chunks/{list-MUSQNMTD.js.map → list-E44O2K64.js.map} +0 -0
  527. /package/dist/cli-bundle/chunks/{notes-4XVSH2AZ.js.map → notes-FLUCNJSH.js.map} +0 -0
  528. /package/dist/cli-bundle/chunks/{notes-5UK3GEH2.js.map → notes-GJKALVZM.js.map} +0 -0
  529. /package/dist/cli-bundle/chunks/{plan-SLMODHWX.js.map → plan-T5MMZLI3.js.map} +0 -0
  530. /package/dist/cli-bundle/chunks/{plan-DUMBV3QB.js.map → plan-YYMIL3HV.js.map} +0 -0
  531. /package/dist/cli-bundle/chunks/{restore-PBL6T5TW.js.map → restore-DDJGVZIN.js.map} +0 -0
  532. /package/dist/cli-bundle/chunks/{restore-D4RGNX33.js.map → restore-SJSASGZP.js.map} +0 -0
  533. /package/dist/cli-bundle/chunks/{schema-2NOO6NGB.js.map → schema-B7NQ6XVP.js.map} +0 -0
  534. /package/dist/cli-bundle/chunks/{schema-EBI4NLUO.js.map → schema-HEGYH6CE.js.map} +0 -0
  535. /package/dist/cli-bundle/chunks/{stats-CV54BAWY.js.map → stats-7JDIJRDH.js.map} +0 -0
  536. /package/dist/cli-bundle/chunks/{stats-XYB6KTFG.js.map → stats-SYTJRR4Z.js.map} +0 -0
  537. /package/dist/cli-bundle/chunks/{telemetry-LMJ7PFUO.js.map → telemetry-4HHWD5Y7.js.map} +0 -0
  538. /package/dist/cli-bundle/chunks/{telemetry-NCMEPJNR.js.map → telemetry-EGWP7ZUX.js.map} +0 -0
  539. /package/dist/cli-bundle/chunks/{test-WBROAJIE.js.map → test-IIELLSZX.js.map} +0 -0
  540. /package/dist/cli-bundle/chunks/{test-MXX3E5JL.js.map → test-ML5RLWXE.js.map} +0 -0
  541. /package/dist/cli-bundle/chunks/{test-runs-V6A7LPWZ.js.map → test-runs-5FEMBV3A.js.map} +0 -0
  542. /package/dist/cli-bundle/chunks/{test-runs-WMVTQU3Y.js.map → test-runs-RNKZ37PS.js.map} +0 -0
  543. /package/dist/cli-bundle/chunks/{update-YRXSUGYQ.js.map → update-6C67X4KS.js.map} +0 -0
  544. /package/dist/cli-bundle/chunks/{update-OSV3NAQB.js.map → update-VF26YPT3.js.map} +0 -0
  545. /package/dist/cli-bundle/chunks/{update-many-KGGEYABR.js.map → update-many-BSZZZYXY.js.map} +0 -0
  546. /package/dist/cli-bundle/chunks/{update-many-EM6OXYGO.js.map → update-many-BWKJJEBF.js.map} +0 -0
@@ -3,18 +3,18 @@
3
3
  import {
4
4
  normalizeItemId,
5
5
  normalizeRawItemId
6
- } from "./chunk-HZGUAH22.js";
6
+ } from "./chunk-UT6WFXW2.js";
7
7
  import {
8
8
  canonicalDocument,
9
9
  parseItemDocument,
10
10
  serializeItemDocument
11
- } from "./chunk-LB3RUL2N.js";
11
+ } from "./chunk-UYQ7HXH4.js";
12
12
  import {
13
13
  resolveItemTypeRegistry
14
- } from "./chunk-2VBQ6ZXS.js";
14
+ } from "./chunk-GUZBNB3G.js";
15
15
  import {
16
16
  nowIso
17
- } from "./chunk-TCD3R2PF.js";
17
+ } from "./chunk-B2KZGPM2.js";
18
18
  import {
19
19
  EMPTY_CANONICAL_DOCUMENT,
20
20
  EXIT_CODE,
@@ -42,7 +42,7 @@ import {
42
42
  stableStringify,
43
43
  toErrorMessage,
44
44
  writeFileAtomic
45
- } from "./chunk-5SFCOO6B.js";
45
+ } from "./chunk-X4IZKYHP.js";
46
46
 
47
47
  // dist/core/extensions/item-fields.js
48
48
  var RESERVED_ITEM_FIELD_NAMES = new Set(FRONT_MATTER_KEY_ORDER);
@@ -1335,6 +1335,6 @@ export {
1335
1335
  mutateItem,
1336
1336
  deleteItem
1337
1337
  };
1338
- //# sourceMappingURL=chunk-GGYWB3Y2.js.map
1338
+ //# sourceMappingURL=chunk-YBZW2QQ7.js.map
1339
1339
 
1340
1340
  //# debugId=83aa0c1e-d8e6-5e3e-ac80-b84dd7ee7bce
@@ -2,22 +2,22 @@
2
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]="ede3cf3f-6ca9-5eb0-aeb7-cd997702397f")}catch(e){}}();
3
3
  import {
4
4
  readHistoryEntries
5
- } from "./chunk-2RSPZI5H.js";
5
+ } from "./chunk-6RZXO5M2.js";
6
6
  import {
7
7
  parseLimit
8
- } from "./chunk-3VAM3NNM.js";
8
+ } from "./chunk-FY6Z3FYY.js";
9
9
  import {
10
10
  enforceHistoryStreamPolicyForItems,
11
11
  listAllFrontMatterLight
12
- } from "./chunk-GGYWB3Y2.js";
12
+ } from "./chunk-YBZW2QQ7.js";
13
13
  import {
14
14
  resolveItemTypeRegistry
15
- } from "./chunk-2VBQ6ZXS.js";
15
+ } from "./chunk-GUZBNB3G.js";
16
16
  import {
17
17
  compareTimestampStrings,
18
18
  nowIso,
19
19
  resolveIsoOrRelative
20
- } from "./chunk-TCD3R2PF.js";
20
+ } from "./chunk-B2KZGPM2.js";
21
21
  import {
22
22
  EXIT_CODE,
23
23
  PmCliError,
@@ -27,7 +27,7 @@ import {
27
27
  readSettings,
28
28
  resolvePmRoot,
29
29
  runActiveOnReadHooks
30
- } from "./chunk-5SFCOO6B.js";
30
+ } from "./chunk-X4IZKYHP.js";
31
31
 
32
32
  // dist/cli/commands/activity.js
33
33
  import fs from "node:fs/promises";
@@ -177,6 +177,6 @@ async function runActivity(options, global) {
177
177
  export {
178
178
  runActivity
179
179
  };
180
- //# sourceMappingURL=chunk-ME2YH6FN.js.map
180
+ //# sourceMappingURL=chunk-YO3THIJF.js.map
181
181
 
182
182
  //# debugId=ede3cf3f-6ca9-5eb0-aeb7-cd997702397f
@@ -1,20 +1,21 @@
1
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]="7064c464-ee52-5164-a51a-6a337b42c837")}catch(e){}}();
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]="a6f5399f-ddc1-5e27-8343-9912514306ee")}catch(e){}}();
3
3
  import {
4
4
  verifyHistoryChain
5
- } from "./chunk-GXSUPCBV.js";
5
+ } from "./chunk-3A2CMEM7.js";
6
6
  import {
7
7
  hashDocument
8
- } from "./chunk-GGYWB3Y2.js";
8
+ } from "./chunk-YBZW2QQ7.js";
9
9
  import {
10
10
  getHistoryPath,
11
11
  writeFileAtomic
12
- } from "./chunk-5SFCOO6B.js";
12
+ } from "./chunk-X4IZKYHP.js";
13
13
 
14
14
  // dist/core/history/drift-scan.js
15
15
  import fs from "fs/promises";
16
+ import { createHash } from "node:crypto";
16
17
  import path from "node:path";
17
- var DRIFT_CACHE_VERSION = 1;
18
+ var DRIFT_CACHE_VERSION = 2;
18
19
  var DRIFT_CACHE_FILENAME = "history-drift-cache.json";
19
20
  function getDriftCachePath(pmRoot) {
20
21
  return path.join(pmRoot, "runtime", DRIFT_CACHE_FILENAME);
@@ -34,8 +35,16 @@ async function loadDriftCache(pmRoot) {
34
35
  function isErrno(error, code) {
35
36
  return typeof error === "object" && error !== null && "code" in error && error.code === code;
36
37
  }
38
+ function hashContent(raw) {
39
+ return createHash("sha256").update(raw).digest("hex");
40
+ }
41
+ async function readHistoryContentHash(historyPath) {
42
+ const raw = await fs.readFile(historyPath, "utf8");
43
+ return hashContent(raw);
44
+ }
37
45
  async function verifyHistoryStream(historyPath) {
38
46
  const raw = await fs.readFile(historyPath, "utf8");
47
+ const contentHash = hashContent(raw);
39
48
  if (raw.trim().length === 0) {
40
49
  return null;
41
50
  }
@@ -56,7 +65,11 @@ async function verifyHistoryStream(historyPath) {
56
65
  if (!latestAfterHash) {
57
66
  return null;
58
67
  }
59
- return { latestAfterHash, chainOk: verifyHistoryChain(entries).ok };
68
+ return {
69
+ latestAfterHash,
70
+ chainOk: verifyHistoryChain(entries).ok,
71
+ contentHash
72
+ };
60
73
  }
61
74
  async function scanHistoryDrift(pmRoot, items) {
62
75
  const missingStreams = [];
@@ -80,24 +93,59 @@ async function scanHistoryDrift(pmRoot, items) {
80
93
  }
81
94
  continue;
82
95
  }
96
+ const loadStreamVerification = async () => {
97
+ try {
98
+ return await verifyHistoryStream(historyPath);
99
+ } catch {
100
+ return "unreadable";
101
+ }
102
+ };
103
+ const loadFreshVerification = async () => {
104
+ const loaded = await loadStreamVerification();
105
+ if (loaded === "unreadable") {
106
+ unreadableStreams.push(item.id);
107
+ return null;
108
+ }
109
+ if (!loaded) {
110
+ missingStreams.push(item.id);
111
+ return null;
112
+ }
113
+ return loaded;
114
+ };
83
115
  const cached = previousEntries[item.id];
84
116
  let verification;
85
- if (cached && cached.mtime_ms === stat.mtimeMs && cached.ctime_ms === stat.ctimeMs && cached.size === stat.size) {
86
- verification = { latestAfterHash: cached.latest_after_hash, chainOk: cached.chain_ok };
87
- } else {
88
- cacheDirty = true;
89
- let result;
117
+ const metadataMatchesCache = cached !== void 0 && cached.mtime_ms === stat.mtimeMs && cached.ctime_ms === stat.ctimeMs && cached.size === stat.size;
118
+ const cachedContentHash = typeof cached?.content_hash === "string" && cached.content_hash.length > 0 ? cached.content_hash : void 0;
119
+ const canUseCache = metadataMatchesCache && cachedContentHash !== void 0;
120
+ if (canUseCache && cached) {
121
+ let currentContentHash;
90
122
  try {
91
- result = await verifyHistoryStream(historyPath);
123
+ currentContentHash = await readHistoryContentHash(historyPath);
92
124
  } catch {
93
125
  unreadableStreams.push(item.id);
94
126
  continue;
95
127
  }
96
- if (!result) {
97
- missingStreams.push(item.id);
128
+ if (currentContentHash === cachedContentHash) {
129
+ verification = {
130
+ latestAfterHash: cached.latest_after_hash,
131
+ chainOk: cached.chain_ok,
132
+ contentHash: currentContentHash
133
+ };
134
+ } else {
135
+ cacheDirty = true;
136
+ const refreshed = await loadFreshVerification();
137
+ if (!refreshed) {
138
+ continue;
139
+ }
140
+ verification = refreshed;
141
+ }
142
+ } else {
143
+ cacheDirty = true;
144
+ const refreshed = await loadFreshVerification();
145
+ if (!refreshed) {
98
146
  continue;
99
147
  }
100
- verification = result;
148
+ verification = refreshed;
101
149
  }
102
150
  if (!verification.chainOk) {
103
151
  chainMismatches.push(item.id);
@@ -106,6 +154,7 @@ async function scanHistoryDrift(pmRoot, items) {
106
154
  mtime_ms: stat.mtimeMs,
107
155
  ctime_ms: stat.ctimeMs,
108
156
  size: stat.size,
157
+ content_hash: verification.contentHash,
109
158
  latest_after_hash: verification.latestAfterHash,
110
159
  chain_ok: verification.chainOk
111
160
  };
@@ -407,6 +456,6 @@ export {
407
456
  buildRemediationMap,
408
457
  buildRemediationCommands
409
458
  };
410
- //# sourceMappingURL=chunk-5FDATVEZ.js.map
459
+ //# sourceMappingURL=chunk-YPH4ESA2.js.map
411
460
 
412
- //# debugId=7064c464-ee52-5164-a51a-6a337b42c837
461
+ //# debugId=a6f5399f-ddc1-5e27-8343-9912514306ee
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../core/history/drift-scan.ts","../../../../../../../../core/diagnostics/remediation.ts"],"sourcesContent":["import fs from \"fs/promises\";\nimport { createHash } from \"node:crypto\";\nimport path from \"node:path\";\nimport { getHistoryPath } from \"../store/paths.js\";\nimport { writeFileAtomic } from \"../fs/fs-utils.js\";\nimport { hashDocument } from \"./history.js\";\nimport { verifyHistoryChain } from \"./replay.js\";\nimport type { HistoryEntry, ItemMetadata } from \"../../types/index.js\";\n\nexport interface DriftScanResult {\n missingStreams: string[];\n unreadableStreams: string[];\n hashMismatches: string[];\n chainMismatches: string[];\n driftedItems: string[];\n}\n\nconst DRIFT_CACHE_VERSION = 2;\nconst DRIFT_CACHE_FILENAME = \"history-drift-cache.json\";\n\ninterface DriftCacheEntry {\n mtime_ms: number;\n ctime_ms: number;\n size: number;\n content_hash: string;\n latest_after_hash: string;\n chain_ok: boolean;\n}\n\ninterface DriftCacheEnvelope {\n version: number;\n entries: Record<string, DriftCacheEntry>;\n}\n\nfunction getDriftCachePath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", DRIFT_CACHE_FILENAME);\n}\n\nasync function loadDriftCache(pmRoot: string): Promise<DriftCacheEnvelope | null> {\n try {\n const raw = await fs.readFile(getDriftCachePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as DriftCacheEnvelope;\n if (parsed.version !== DRIFT_CACHE_VERSION || typeof parsed.entries !== \"object\" || parsed.entries === null) {\n return null;\n }\n return parsed;\n } catch {\n return null;\n }\n}\n\nfunction isErrno(error: unknown, code: string): boolean {\n return typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code === code;\n}\n\ninterface StreamVerification {\n latestAfterHash: string;\n chainOk: boolean;\n contentHash: string;\n}\n\nfunction hashContent(raw: string): string {\n return createHash(\"sha256\").update(raw).digest(\"hex\");\n}\n\nasync function readHistoryContentHash(historyPath: string): Promise<string> {\n const raw = await fs.readFile(historyPath, \"utf8\");\n return hashContent(raw);\n}\n\n/**\n * Read and fully verify one history stream's hash chain. Returns null for an\n * empty/missing stream (caller records it as a missing stream).\n */\nasync function verifyHistoryStream(historyPath: string): Promise<StreamVerification | null> {\n const raw = await fs.readFile(historyPath, \"utf8\");\n const contentHash = hashContent(raw);\n if (raw.trim().length === 0) {\n return null;\n }\n const entries: HistoryEntry[] = [];\n let latestAfterHash: string | null = null;\n for (const line of raw.split(/\\r?\\n/)) {\n const trimmed = line.trim();\n if (trimmed.length === 0) {\n continue;\n }\n const parsed = JSON.parse(trimmed) as HistoryEntry;\n if (typeof parsed.after_hash !== \"string\" || parsed.after_hash.trim().length === 0) {\n throw new Error(\"missing after_hash\");\n }\n entries.push(parsed);\n latestAfterHash = parsed.after_hash;\n }\n /* c8 ignore start -- defensive guard for future history schema changes. */\n if (!latestAfterHash) {\n return null;\n }\n /* c8 ignore stop */\n return {\n latestAfterHash,\n chainOk: verifyHistoryChain(entries).ok,\n contentHash,\n };\n}\n\n/**\n * Scan every item's history stream for drift (missing/unreadable streams, broken\n * hash chains, and item/history hash mismatches).\n *\n * Full chain re-verification of a 17MB+ history tree is the dominant cost of\n * `pm health`. We cache the per-stream verification keyed by the history file's\n * mtime/ctime/size + content hash: metadata-stable replacements (same stat tuple)\n * can still happen, so each metadata hit recomputes a content hash guard before\n * trusting the cached chain/hash verification.\n */\nexport async function scanHistoryDrift(\n pmRoot: string,\n items: Array<ItemMetadata & { body: string }>,\n): Promise<DriftScanResult> {\n const missingStreams: string[] = [];\n const unreadableStreams: string[] = [];\n const hashMismatches: string[] = [];\n const chainMismatches: string[] = [];\n\n const cache = await loadDriftCache(pmRoot);\n const previousEntries: Record<string, DriftCacheEntry> = cache?.entries ?? {};\n const nextEntries: Record<string, DriftCacheEntry> = {};\n let cacheDirty = false;\n\n for (const item of items) {\n const historyPath = getHistoryPath(pmRoot, item.id);\n\n let stat: Awaited<ReturnType<typeof fs.stat>>;\n try {\n stat = await fs.stat(historyPath);\n } catch (error: unknown) {\n if (isErrno(error, \"ENOENT\")) {\n missingStreams.push(item.id);\n } else {\n unreadableStreams.push(item.id);\n }\n continue;\n }\n\n const loadStreamVerification = async (): Promise<StreamVerification | null | \"unreadable\"> => {\n try {\n return await verifyHistoryStream(historyPath);\n } catch {\n return \"unreadable\";\n }\n };\n\n const loadFreshVerification = async (): Promise<StreamVerification | null> => {\n const loaded = await loadStreamVerification();\n if (loaded === \"unreadable\") {\n unreadableStreams.push(item.id);\n return null;\n }\n if (!loaded) {\n missingStreams.push(item.id);\n return null;\n }\n return loaded;\n };\n\n const cached = previousEntries[item.id];\n let verification: StreamVerification;\n const metadataMatchesCache =\n cached !== undefined &&\n cached.mtime_ms === stat.mtimeMs &&\n cached.ctime_ms === stat.ctimeMs &&\n cached.size === stat.size;\n const cachedContentHash =\n typeof cached?.content_hash === \"string\" && cached.content_hash.length > 0 ? cached.content_hash : undefined;\n const canUseCache = metadataMatchesCache && cachedContentHash !== undefined;\n if (canUseCache && cached) {\n let currentContentHash: string;\n try {\n currentContentHash = await readHistoryContentHash(historyPath);\n } catch {\n unreadableStreams.push(item.id);\n continue;\n }\n if (currentContentHash === cachedContentHash) {\n verification = {\n latestAfterHash: cached.latest_after_hash,\n chainOk: cached.chain_ok,\n contentHash: currentContentHash,\n };\n } else {\n cacheDirty = true;\n const refreshed = await loadFreshVerification();\n if (!refreshed) {\n continue;\n }\n verification = refreshed;\n }\n } else {\n cacheDirty = true;\n const refreshed = await loadFreshVerification();\n if (!refreshed) {\n continue;\n }\n verification = refreshed;\n }\n\n if (!verification.chainOk) {\n chainMismatches.push(item.id);\n }\n nextEntries[item.id] = {\n mtime_ms: stat.mtimeMs,\n ctime_ms: stat.ctimeMs,\n size: stat.size,\n content_hash: verification.contentHash,\n latest_after_hash: verification.latestAfterHash,\n chain_ok: verification.chainOk,\n };\n\n const { body, ...frontMatter } = item;\n const currentHash = hashDocument({\n metadata: frontMatter as ItemMetadata,\n body,\n });\n if (currentHash !== verification.latestAfterHash) {\n hashMismatches.push(item.id);\n }\n }\n\n if (cacheDirty || Object.keys(previousEntries).length !== Object.keys(nextEntries).length) {\n const cachePath = getDriftCachePath(pmRoot);\n try {\n await fs.mkdir(path.dirname(cachePath), { recursive: true });\n await writeFileAtomic(cachePath, JSON.stringify({ version: DRIFT_CACHE_VERSION, entries: nextEntries }));\n } catch {\n // Best-effort cache write: a failed persist must never fail a health scan.\n }\n }\n\n const driftedItems = [...new Set([...missingStreams, ...unreadableStreams, ...hashMismatches, ...chainMismatches])].sort((a, b) =>\n a.localeCompare(b),\n );\n return { missingStreams, unreadableStreams, hashMismatches, chainMismatches, driftedItems };\n}\n","/**\n * Shared machine-executable remediation registry.\n *\n * `pm health` and `pm validate` both emit stable, colon-delimited warning tokens\n * (for example `history_drift_missing_stream:pm-abcd` or\n * `validate_resolution_missing_fields:3`). Agents that gate on these commands\n * previously had to hardcode the mapping from a warning code to the `pm` command\n * that fixes it. This module is the single source of truth for that mapping so\n * `pm health --json` (per-check `remediation_map`) and `pm validate --fix-hints`\n * (per-check `fix_hints`) can both surface executable remediation without any\n * duplicated, drift-prone lookup tables.\n *\n * Semantics of {@link RemediationEntry.command}: the suggested next `pm` command\n * an operator/agent should run to resolve findings with that code. Per-item\n * findings use an `<id>` placeholder (callers that have the concrete id may\n * substitute it); findings whose only fix is a manual file edit point at the\n * most useful diagnostic/repair command and describe the manual step in\n * {@link RemediationEntry.summary}.\n */\n\nexport interface RemediationEntry {\n /**\n * Stable warning-code prefix this entry resolves. A warning matches when it\n * equals this code or begins with `<code>:`. Registry codes are mutually\n * exclusive under that colon-boundary rule (no code is a `:`-delimited prefix\n * of another — e.g. `settings:id_prefix_empty` is distinct from a bare\n * `settings`, which is intentionally not registered), so `resolveRemediation`\n * uses first-match with no ordering dependency.\n */\n readonly code: string;\n /** Executable `pm` command (or imperative) that resolves the finding. May contain an `<id>` placeholder. */\n readonly command: string;\n /** One-line description of what the command does / which manual step it covers. */\n readonly summary: string;\n}\n\n/**\n * Registry of every non-extension `pm health` / `pm validate` warning code and\n * its remediation. Extension findings keep their richer, contextual\n * `details.triage.remediation` produced by the extension health triage and are\n * intentionally excluded here (see pm-0hnu: \"all non-extension checks\").\n */\nexport const REMEDIATION_REGISTRY: readonly RemediationEntry[] = Object.freeze([\n // --- pm health: directories ---\n {\n code: \"missing_directory\",\n command: \"pm init\",\n summary: \"Recreate missing tracker directories (pm init is idempotent and restores the scaffold).\",\n },\n // --- pm health: settings (read/parse) ---\n {\n code: \"settings_read_invalid_json\",\n command: \"pm config list --json\",\n summary:\n \"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run.\",\n },\n {\n code: \"settings_read_invalid_schema\",\n command: \"pm config list --json\",\n summary:\n \"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run.\",\n },\n {\n code: \"settings_read_merge_failed\",\n command: \"pm config list --json\",\n summary: \"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files.\",\n },\n // --- pm health: settings_values ---\n {\n code: \"settings:id_prefix_empty\",\n command: \"pm config list --json\",\n summary: 'id_prefix is empty; set a non-empty \"id_prefix\" in settings.json so generated item ids are well-formed.',\n },\n {\n code: \"settings:locks_ttl_non_positive\",\n command: \"pm config list --json\",\n summary: 'locks.ttl_seconds must be positive; set a positive \"locks.ttl_seconds\" in settings.json.',\n },\n // --- pm health: telemetry (advisory) ---\n {\n code: \"telemetry_state_invalid_json\",\n command: \"pm health --check-telemetry\",\n summary: \"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_invalid_rows\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_pending\",\n command: \"pm health --check-telemetry\",\n summary: \"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_failed\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_http_status\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only.\",\n },\n // --- pm health: integrity ---\n {\n code: \"integrity_item_unreadable\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file could not be read; restore or repair the file at the reported path.\",\n },\n {\n code: \"integrity_item_parse_failed\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file failed to parse; fix the malformed front matter at the reported path.\",\n },\n {\n code: \"integrity_item_conflict_marker\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line.\",\n },\n {\n code: \"integrity_history_unreadable\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream could not be read; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_invalid_json\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains invalid JSON; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_conflict_marker\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain.\",\n },\n // --- pm health: history_drift ---\n {\n code: \"history_drift_missing_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item has no history stream; re-anchor the chain to rebuild it.\",\n },\n {\n code: \"history_drift_unreadable_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history stream is unreadable; re-anchor the chain.\",\n },\n {\n code: \"history_drift_hash_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's content hash no longer matches its history; re-anchor the chain.\",\n },\n {\n code: \"history_drift_chain_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history chain is broken; re-anchor the chain.\",\n },\n // --- pm health: vectorization ---\n {\n code: \"vectorization_stale_items_remaining\",\n command: \"pm health --refresh-vectors\",\n summary: \"Some items have stale embeddings; refresh vectors so semantic search results stay current.\",\n },\n // --- pm validate: metadata ---\n // Note: validate_metadata_missing_author has no entry on purpose. `pm update\n // --author` sets the mutation/audit author (history), not the item's\n // `metadata.author` front-matter field, and there is no CLI flag that writes\n // that field — so emitting a command here would record an audit entry without\n // clearing the finding. A missing item author must be restored at the source.\n {\n code: \"validate_metadata_missing_acceptance_criteria\",\n command: 'pm update <id> --acceptance-criteria \"<criteria>\"',\n summary: \"Backfill the missing acceptance criteria on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_estimate\",\n command: 'pm update <id> --estimate \"<estimate>\"',\n summary: \"Backfill the missing estimate on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_close_reason\",\n command: 'pm update <id> --close-reason \"<reason>\"',\n summary: \"Backfill the missing close reason on the reported closed item(s).\",\n },\n {\n code: \"validate_metadata_missing_reviewer\",\n command: 'pm update <id> --reviewer \"<name>\"',\n summary: \"Backfill the missing reviewer on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_risk\",\n command: 'pm update <id> --risk \"<level>\"',\n summary: \"Backfill the missing risk on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_confidence\",\n command: 'pm update <id> --confidence \"<level>\"',\n summary: \"Backfill the missing confidence on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_sprint\",\n command: 'pm update <id> --sprint \"<sprint>\"',\n summary: \"Backfill the missing sprint on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_release\",\n command: 'pm update <id> --release \"<release>\"',\n summary: \"Backfill the missing release on the reported item(s).\",\n },\n {\n code: \"validate_metadata_custom_profile_missing_required_fields\",\n command: 'pm config set metadata-required-fields --criterion \"<field>\"',\n summary:\n \"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items.\",\n },\n // --- pm validate: resolution ---\n {\n code: \"validate_resolution_missing_fields\",\n command: 'pm update <id> --resolution \"<how resolved>\"',\n summary: \"Backfill resolution / expected_result / actual_result on the reported closed item(s).\",\n },\n // --- pm validate: lifecycle ---\n {\n code: \"validate_lifecycle_active_closure_like_metadata\",\n command: \"pm update <id> --unset <closure-like-field>\",\n summary:\n \"Clear the closure-like field the validator flags on this active item — the detail row names it (resolution / actual-result / blocked-reason) — or close the item if it is actually done.\",\n },\n {\n code: \"validate_lifecycle_active_terminal_parent\",\n command: \"pm update <id> --parent <active-parent-id>\",\n summary: \"Reopen the terminal parent or move the active child under a non-terminal parent.\",\n },\n {\n code: \"validate_lifecycle_stale_blockers\",\n command: \"pm update <id> --unset blocked-by --unset blocked-reason\",\n summary:\n \"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles_error\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n // --- pm validate: files ---\n {\n code: \"validate_files_missing_linked_paths\",\n command: \"pm <files|docs> <id> --remove <path>\",\n summary:\n \"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc).\",\n },\n {\n code: \"validate_files_orphaned_paths\",\n command: \"pm <files|docs> <id> --add <path>\",\n summary:\n \"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace.\",\n },\n {\n code: \"validate_files_tracked_all_strict_forces_pm_internals\",\n command: \"pm validate --check-files --include-pm-internals\",\n summary: \"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode.\",\n },\n // --- pm validate: history_drift ---\n {\n code: \"validate_history_drift_missing_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items missing a history stream.\",\n },\n {\n code: \"validate_history_drift_unreadable_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with an unreadable history stream.\",\n },\n {\n code: \"validate_history_drift_hash_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items whose content hash drifted.\",\n },\n {\n code: \"validate_history_drift_chain_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with a broken history chain.\",\n },\n // --- pm validate: command_references ---\n {\n code: \"validate_command_references_stale_pm_ids\",\n command: 'pm update <id> --replace-tests --test \"command=<corrected-command>\" [--test ...]',\n summary:\n \"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call.\",\n },\n]);\n\n/**\n * Resolve the remediation entry for a warning token, or `undefined` when no\n * entry is registered. A warning matches an entry when it equals the entry code\n * or begins with `<code>:` (the colon boundary keeps sibling codes such as\n * `validate_lifecycle_dependency_cycles` and\n * `validate_lifecycle_dependency_cycles_error` disjoint).\n *\n * First match is intentional and correct: registry codes are mutually exclusive\n * under the colon-boundary rule, so at most one entry can ever match a warning\n * and order is irrelevant. That invariant is enforced by a test (see\n * remediation-registry.spec.ts \"keeps every registry code mutually exclusive\"),\n * which is why this stays a simple linear scan rather than a longest-prefix\n * search — a longest-prefix tie-break is unreachable with disjoint codes.\n *\n * Accepts unknown input defensively (this is an exported helper SDK consumers\n * may call from untyped JS): a non-string `warning` resolves to `undefined`.\n */\nexport function resolveRemediation(warning: string): RemediationEntry | undefined {\n if (typeof warning !== \"string\") {\n return undefined;\n }\n const normalized = warning.trim();\n for (const entry of REMEDIATION_REGISTRY) {\n if (normalized === entry.code || normalized.startsWith(`${entry.code}:`)) {\n return entry;\n }\n }\n return undefined;\n}\n\n/**\n * Build a compact `remediation_map` (code -> command) for a set of warning\n * tokens. First match wins per code; unknown codes are skipped. Used by\n * `pm health --json` per-check details and as the source of deduped executable\n * commands for `pm validate --fix-hints`.\n */\nexport function buildRemediationMap(warnings: Iterable<string>): Record<string, string> {\n const map: Record<string, string> = {};\n for (const warning of warnings) {\n const entry = resolveRemediation(warning);\n if (entry !== undefined && !Object.prototype.hasOwnProperty.call(map, entry.code)) {\n map[entry.code] = entry.command;\n }\n }\n return map;\n}\n\n/**\n * Build a deduped, ordered list of executable remediation commands for a set of\n * warning tokens (one command per distinct matched code). Used by\n * `pm validate --fix-hints` for checks that do not already emit per-row\n * remediation commands.\n */\nexport function buildRemediationCommands(warnings: Iterable<string>): string[] {\n return Object.values(buildRemediationMap(warnings));\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;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AAK,MAAM,IAAI,GAAG;AACjF,UAAI,MAAM,IAAI,IAAI,MAAM;IAC1B;EACF;AACA,SAAO;AACT;AAQM,SAAU,yBAAyB,UAA0B;AACjE,SAAO,OAAO,OAAO,oBAAoB,QAAQ,CAAC;AACpD","debugId":"a6f5399f-ddc1-5e27-8343-9912514306ee"}
@@ -2,20 +2,20 @@
2
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]="69440d9c-1dff-5d99-b0ac-dec73e521560")}catch(e){}}();
3
3
  import {
4
4
  wrapOwnershipConflict
5
- } from "./chunk-RWPSOIEE.js";
5
+ } from "./chunk-GNIUOLZ2.js";
6
6
  import {
7
7
  resolveAuthor
8
8
  } from "./chunk-J27KIHTG.js";
9
- import "./chunk-PO3GSVFV.js";
10
- import "./chunk-3VAM3NNM.js";
9
+ import "./chunk-UIIQC5YO.js";
10
+ import "./chunk-FY6Z3FYY.js";
11
11
  import {
12
12
  mutateItem,
13
13
  toItemRecord
14
- } from "./chunk-GGYWB3Y2.js";
15
- import "./chunk-HZGUAH22.js";
16
- import "./chunk-LB3RUL2N.js";
17
- import "./chunk-2VBQ6ZXS.js";
18
- import "./chunk-TCD3R2PF.js";
14
+ } from "./chunk-YBZW2QQ7.js";
15
+ import "./chunk-UT6WFXW2.js";
16
+ import "./chunk-UYQ7HXH4.js";
17
+ import "./chunk-GUZBNB3G.js";
18
+ import "./chunk-B2KZGPM2.js";
19
19
  import {
20
20
  EXIT_CODE,
21
21
  PmCliError,
@@ -25,7 +25,7 @@ import {
25
25
  resolvePmRoot,
26
26
  resolveRuntimeStatusRegistry,
27
27
  statusIsTerminal
28
- } from "./chunk-5SFCOO6B.js";
28
+ } from "./chunk-X4IZKYHP.js";
29
29
 
30
30
  // dist/cli/commands/claim.js
31
31
  async function runClaim(id, force, global, options = {}) {
@@ -124,6 +124,6 @@ export {
124
124
  runClaim,
125
125
  runRelease
126
126
  };
127
- //# sourceMappingURL=claim-X2P4IB7J.js.map
127
+ //# sourceMappingURL=claim-BJ4QMPJC.js.map
128
128
 
129
129
  //# debugId=69440d9c-1dff-5d99-b0ac-dec73e521560
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  wrapOwnershipConflict
3
- } from "./chunk-R6UFP2GE.js";
3
+ } from "./chunk-V6EYFTRL.js";
4
4
  import {
5
5
  resolveAuthor
6
6
  } from "./chunk-O7IWB35H.js";
7
- import "./chunk-XLTD2HN3.js";
8
- import "./chunk-WKY2IBOQ.js";
7
+ import "./chunk-HV5SSZXF.js";
8
+ import "./chunk-SFFVGNHC.js";
9
9
  import {
10
10
  mutateItem,
11
11
  toItemRecord
12
- } from "./chunk-XTGLRY2Y.js";
13
- import "./chunk-T3LC5LKB.js";
14
- import "./chunk-AO442XLN.js";
15
- import "./chunk-KJE2FOS4.js";
16
- import "./chunk-QO7EBBOM.js";
12
+ } from "./chunk-TP4DDY27.js";
13
+ import "./chunk-2IXCHCLM.js";
14
+ import "./chunk-WCQZBDDH.js";
15
+ import "./chunk-HRMHZ4RV.js";
16
+ import "./chunk-FHHBD7PN.js";
17
17
  import {
18
18
  EXIT_CODE,
19
19
  PmCliError,
@@ -23,7 +23,7 @@ import {
23
23
  resolvePmRoot,
24
24
  resolveRuntimeStatusRegistry,
25
25
  statusIsTerminal
26
- } from "./chunk-U5SXYXSY.js";
26
+ } from "./chunk-UJUT6AHZ.js";
27
27
 
28
28
  // dist/cli/commands/claim.js
29
29
  !(function() {
@@ -129,4 +129,4 @@ export {
129
129
  runClaim,
130
130
  runRelease
131
131
  };
132
- //# sourceMappingURL=claim-4DBF6RVG.js.map
132
+ //# sourceMappingURL=claim-KW743OSW.js.map
@@ -0,0 +1,13 @@
1
+ import {
2
+ runClose
3
+ } from "./chunk-IMCJBN2Q.js";
4
+ import "./chunk-TP4DDY27.js";
5
+ import "./chunk-2IXCHCLM.js";
6
+ import "./chunk-WCQZBDDH.js";
7
+ import "./chunk-HRMHZ4RV.js";
8
+ import "./chunk-FHHBD7PN.js";
9
+ import "./chunk-UJUT6AHZ.js";
10
+ export {
11
+ runClose
12
+ };
13
+ //# sourceMappingURL=close-P4ZBKODL.js.map
@@ -2,16 +2,16 @@
2
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
3
  import {
4
4
  runClose
5
- } from "./chunk-FRAUKRU2.js";
6
- import "./chunk-GGYWB3Y2.js";
7
- import "./chunk-HZGUAH22.js";
8
- import "./chunk-LB3RUL2N.js";
9
- import "./chunk-2VBQ6ZXS.js";
10
- import "./chunk-TCD3R2PF.js";
11
- import "./chunk-5SFCOO6B.js";
5
+ } from "./chunk-NHR2QXXZ.js";
6
+ import "./chunk-YBZW2QQ7.js";
7
+ import "./chunk-UT6WFXW2.js";
8
+ import "./chunk-UYQ7HXH4.js";
9
+ import "./chunk-GUZBNB3G.js";
10
+ import "./chunk-B2KZGPM2.js";
11
+ import "./chunk-X4IZKYHP.js";
12
12
  export {
13
13
  runClose
14
14
  };
15
- //# sourceMappingURL=close-PTYFA45H.js.map
15
+ //# sourceMappingURL=close-SYHSRZDC.js.map
16
16
 
17
17
  //# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
@@ -3,37 +3,37 @@ import {
3
3
  loadMutationCheckpoint,
4
4
  restoreCheckpointItems,
5
5
  writeMutationCheckpoint
6
- } from "./chunk-XSJCLN2R.js";
6
+ } from "./chunk-WYEXLDDY.js";
7
+ import {
8
+ runClose
9
+ } from "./chunk-IMCJBN2Q.js";
7
10
  import {
8
11
  runRestore
9
- } from "./chunk-6ER6DXH5.js";
12
+ } from "./chunk-OKSKJKHX.js";
10
13
  import {
11
14
  resolveAuthor
12
15
  } from "./chunk-O7IWB35H.js";
13
- import "./chunk-PRJCELV4.js";
14
- import "./chunk-UM2GBHS4.js";
15
- import {
16
- runClose
17
- } from "./chunk-GU2ZJ2VV.js";
16
+ import "./chunk-4CHEG6UK.js";
17
+ import "./chunk-3EOBJOF4.js";
18
18
  import {
19
19
  runList
20
- } from "./chunk-Q7SPNHLW.js";
21
- import "./chunk-I6BNFU5X.js";
22
- import "./chunk-WKY2IBOQ.js";
20
+ } from "./chunk-42LOFGJS.js";
21
+ import "./chunk-B5RF3IP7.js";
22
+ import "./chunk-SFFVGNHC.js";
23
23
  import "./chunk-EAOG77HM.js";
24
24
  import {
25
25
  listAllFrontMatterLight
26
- } from "./chunk-XTGLRY2Y.js";
27
- import "./chunk-T3LC5LKB.js";
26
+ } from "./chunk-TP4DDY27.js";
27
+ import "./chunk-2IXCHCLM.js";
28
28
  import {
29
29
  isTerminalStatus
30
- } from "./chunk-AO442XLN.js";
30
+ } from "./chunk-WCQZBDDH.js";
31
31
  import {
32
32
  resolveItemTypeRegistry
33
- } from "./chunk-KJE2FOS4.js";
33
+ } from "./chunk-HRMHZ4RV.js";
34
34
  import {
35
35
  nowIso
36
- } from "./chunk-QO7EBBOM.js";
36
+ } from "./chunk-FHHBD7PN.js";
37
37
  import {
38
38
  EXIT_CODE,
39
39
  PmCliError,
@@ -44,13 +44,13 @@ import {
44
44
  resolvePmRoot,
45
45
  resolveRuntimeStatusRegistry,
46
46
  toErrorMessage
47
- } from "./chunk-U5SXYXSY.js";
47
+ } from "./chunk-UJUT6AHZ.js";
48
48
 
49
49
  // dist/cli/commands/close-many.js
50
50
  !(function() {
51
51
  try {
52
52
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
53
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2fb69034-d900-5001-9f90-1b7f17b609bc");
53
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "83584226-bf4b-5d89-b485-b5a4eaca2f85");
54
54
  } catch (e2) {
55
55
  }
56
56
  })();
@@ -93,10 +93,13 @@ function activeListOptions(list) {
93
93
  }
94
94
  return active;
95
95
  }
96
- function ensureReason(reason) {
96
+ function resolveReason(reason, required) {
97
97
  const trimmed = String(reason ?? "").trim();
98
- if (trimmed.length === 0) {
99
- throw new PmCliError("pm close-many requires a shared close reason via --reason. Close mutations are auditable.", EXIT_CODE.USAGE, {
98
+ if (trimmed.length > 0) {
99
+ return trimmed;
100
+ }
101
+ if (required) {
102
+ throw new PmCliError("pm close-many requires a shared close reason via --reason because governance.require_close_reason is enabled.", EXIT_CODE.USAGE, {
100
103
  code: "missing_required_argument",
101
104
  examples: [
102
105
  'pm close-many --filter-sprint S-12 --reason "Sprint S-12 acceptance criteria met"',
@@ -104,7 +107,7 @@ function ensureReason(reason) {
104
107
  ]
105
108
  });
106
109
  }
107
- return trimmed;
110
+ return void 0;
108
111
  }
109
112
  async function buildActiveChildrenByParent(pmRoot, settings) {
110
113
  const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
@@ -204,7 +207,7 @@ async function runCloseMany(options, global2) {
204
207
  if (!hasCloseManyFilters(options.list, options.status)) {
205
208
  throw new PmCliError(`close-many requires at least one filter to scope the close (for example: ${CLOSE_MANY_FILTER_GUIDANCE}). Refusing to match every item.`, EXIT_CODE.USAGE);
206
209
  }
207
- const reason = ensureReason(options.reason);
210
+ const reason = resolveReason(options.reason, settings.governance.require_close_reason);
208
211
  const validateCloseMode = options.validateClose;
209
212
  const force = options.force === true;
210
213
  const listOptions = activeListOptions(options.list);
@@ -234,7 +237,7 @@ async function runCloseMany(options, global2) {
234
237
  mode: "dry_run",
235
238
  matched_count: matched.length,
236
239
  dry_run: true,
237
- reason,
240
+ ...reason !== void 0 ? { reason } : {},
238
241
  filters: listed.filters,
239
242
  ...validateCloseMode ? { validate_close: validateCloseMode } : {},
240
243
  item_plans: planRows,
@@ -253,7 +256,7 @@ async function runCloseMany(options, global2) {
253
256
  id: checkpointId,
254
257
  created_at: nowValue,
255
258
  author: resolveAuthor(options.author, "unknown"),
256
- reason,
259
+ ...reason !== void 0 ? { reason } : {},
257
260
  filters: listed.filters,
258
261
  items: checkpointItems
259
262
  });
@@ -297,7 +300,7 @@ async function runCloseMany(options, global2) {
297
300
  mode: "apply",
298
301
  matched_count: matched.length,
299
302
  dry_run: false,
300
- reason,
303
+ ...reason !== void 0 ? { reason } : {},
301
304
  filters: listed.filters,
302
305
  ...validateCloseMode ? { validate_close: validateCloseMode } : {},
303
306
  ...checkpointInfo ? { checkpoint: checkpointInfo } : {},
@@ -311,4 +314,4 @@ async function runCloseMany(options, global2) {
311
314
  export {
312
315
  runCloseMany
313
316
  };
314
- //# sourceMappingURL=close-many-7CGIDPTJ.js.map
317
+ //# sourceMappingURL=close-many-DBLEYFOY.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../cli/commands/close-many.ts"],
4
+ "sourcesContent": ["import { pathExists } from \"../../core/fs/fs-utils.js\";\nimport {\n createCheckpointId,\n loadMutationCheckpoint,\n restoreCheckpointItems,\n writeMutationCheckpoint,\n type MutationCheckpointItem,\n} from \"../../core/checkpoint/mutation-checkpoint.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { isTerminalStatus } from \"../../core/item/status.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 { toErrorMessage } from \"../../core/shared/primitives.js\";\nimport { resolveAuthor } from \"../../core/shared/author.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 { runClose, type CloseCommandOptions } from \"./close.js\";\nimport { runList, type ListOptions, type ListedItem } from \"./list.js\";\nimport { runRestore } from \"./restore.js\";\n\nconst CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;\nconst CLOSE_MANY_CHECKPOINT_SUBDIR = \"close-many\";\n\nconst CLOSE_MANY_FILTER_GUIDANCE = [\n \"--filter-status\",\n \"--filter-type\",\n \"--filter-tag\",\n \"--filter-priority\",\n \"--filter-sprint\",\n \"--filter-release\",\n \"--filter-parent\",\n \"--filter-assignee\",\n \"--filter-updated-before\",\n \"--ids\",\n].join(\", \");\n\nexport interface CloseManyCommandOptions {\n status?: string;\n list?: ListOptions;\n reason?: string;\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n validateClose?: string;\n author?: string;\n message?: string;\n force?: boolean;\n dryRun?: boolean;\n rollback?: string;\n checkpoint?: boolean;\n}\n\ninterface CloseManyPlanRow {\n id: string;\n title: string;\n status: string;\n action: \"close\" | \"skip\";\n skip_reason?: string;\n active_child_ids?: string[];\n}\n\ninterface CloseManyApplyRow {\n id: string;\n status: \"closed\" | \"skipped\" | \"failed\";\n skip_reason?: string;\n changed_fields?: string[];\n warnings?: string[];\n error?: string;\n}\n\nexport interface CloseManyResult {\n mode: \"dry_run\" | \"apply\" | \"rollback\";\n matched_count: number;\n dry_run: boolean;\n reason?: string;\n filters?: Record<string, unknown>;\n validate_close?: string;\n item_plans?: CloseManyPlanRow[];\n checkpoint?: {\n id: string;\n created_at: string;\n path: string;\n rollback_command: string;\n };\n closed_count?: number;\n skipped_count?: number;\n failed_count?: number;\n restored_count?: number;\n rollback_checkpoint_id?: string;\n rows?: CloseManyApplyRow[] | Array<{ id: string; status: \"restored\" | \"failed\"; changed_fields?: string[]; warnings?: string[]; error?: string }>;\n ids: string[];\n}\n\nfunction hasCloseManyFilters(list: ListOptions | undefined, status: string | undefined): boolean {\n const isActive = (value: unknown): boolean =>\n value != null && (typeof value !== \"string\" || value.split(\",\").some((entry) => entry.trim().length > 0));\n return (\n isActive(status) ||\n isActive(list?.status) ||\n isActive(list?.type) ||\n isActive(list?.tag) ||\n isActive(list?.priority) ||\n isActive(list?.deadlineBefore) ||\n isActive(list?.deadlineAfter) ||\n isActive(list?.updatedAfter) ||\n isActive(list?.updatedBefore) ||\n isActive(list?.createdAfter) ||\n isActive(list?.createdBefore) ||\n isActive(list?.ids) ||\n isActive(list?.assignee) ||\n isActive(list?.assigneeFilter) ||\n isActive(list?.parent) ||\n isActive(list?.sprint) ||\n isActive(list?.release)\n );\n}\n\nfunction hasCloseManyRollbackConflicts(list: ListOptions | undefined, status: string | undefined): boolean {\n return (\n hasCloseManyFilters(list, status) ||\n (list?.limit != null && String(list.limit).trim().length > 0) ||\n (list?.offset != null && String(list.offset).trim().length > 0)\n );\n}\n\nfunction rejectBlankIdsFilter(list: ListOptions | undefined): void {\n if (list?.ids != null && String(list.ids).trim().length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n}\n\nfunction activeListOptions(list: ListOptions | undefined): ListOptions {\n const active: ListOptions = {};\n if (!list) {\n return active;\n }\n for (const [key, value] of Object.entries(list) as Array<[keyof ListOptions, unknown]>) {\n if (value == null || (typeof value === \"string\" && !value.split(\",\").some((entry) => entry.trim().length > 0))) {\n continue;\n }\n (active as Record<string, unknown>)[key] = value;\n }\n return active;\n}\n\nfunction resolveReason(reason: unknown, required: boolean): string | undefined {\n const trimmed = String(reason ?? \"\").trim();\n if (trimmed.length > 0) {\n return trimmed;\n }\n if (required) {\n throw new PmCliError(\n \"pm close-many requires a shared close reason via --reason because governance.require_close_reason is enabled.\",\n EXIT_CODE.USAGE,\n {\n code: \"missing_required_argument\",\n examples: [\n 'pm close-many --filter-sprint S-12 --reason \"Sprint S-12 acceptance criteria met\"',\n 'pm close-many --ids pm-a,pm-b --reason \"Superseded by redesign\"',\n ],\n },\n );\n }\n return undefined;\n}\n\n// Build a parent -> non-terminal child id map in a single light scan so each\n// matched parent can be annotated with the active children that closing it\n// would orphan (the same signal runClose surfaces per item on apply).\nasync function buildActiveChildrenByParent(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n): Promise<{ childrenByParent: Map<string, string[]>; parentByChild: Map<string, string> }> {\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n const childrenByParent = new Map<string, string[]>();\n const parentByChild = new Map<string, string>();\n for (const item of items) {\n if (typeof item.parent !== \"string\" || item.parent.length === 0) {\n continue;\n }\n parentByChild.set(item.id, item.parent);\n if (isTerminalStatus(item.status, statusRegistry)) {\n continue;\n }\n const existing = childrenByParent.get(item.parent);\n if (existing) {\n existing.push(item.id);\n } else {\n childrenByParent.set(item.parent, [item.id]);\n }\n }\n for (const ids of childrenByParent.values()) {\n ids.sort((left, right) => left.localeCompare(right));\n }\n return { childrenByParent, parentByChild };\n}\n\nfunction hierarchyDepth(id: string, parentByChild: Map<string, string>, cache?: Map<string, number>): number {\n const cached = cache?.get(id);\n if (cached !== undefined) {\n return cached;\n }\n let depth = 0;\n let current = parentByChild.get(id);\n const path: string[] = [];\n const visited = new Set<string>();\n let hasCycle = false;\n while (current !== undefined && !visited.has(current)) {\n const cachedCurrent = cache?.get(current);\n if (cachedCurrent !== undefined) {\n depth += cachedCurrent + 1;\n break;\n }\n visited.add(current);\n path.push(current);\n depth += 1;\n current = parentByChild.get(current);\n }\n if (current !== undefined && visited.has(current)) {\n hasCycle = true;\n }\n if (!hasCycle) {\n cache?.set(id, depth);\n for (const [index, ancestorId] of path.entries()) {\n cache?.set(ancestorId, depth - index - 1);\n }\n }\n return depth;\n}\n\nexport async function runCloseMany(options: CloseManyCommandOptions, global: GlobalOptions): Promise<CloseManyResult> {\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 const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n\n const dryRun = options.dryRun === true;\n const rollbackId = typeof options.rollback === \"string\" ? options.rollback : undefined;\n rejectBlankIdsFilter(options.list);\n\n if (rollbackId) {\n if (dryRun) {\n throw new PmCliError(\"--dry-run cannot be combined with --rollback\", EXIT_CODE.USAGE);\n }\n if (hasCloseManyRollbackConflicts(options.list, options.status)) {\n throw new PmCliError(\"Rollback mode does not accept filter options\", EXIT_CODE.USAGE);\n }\n const checkpoint = await loadMutationCheckpoint(\n pmRoot,\n CLOSE_MANY_CHECKPOINT_SUBDIR,\n rollbackId,\n CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n );\n const restoreMessage = options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;\n const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) =>\n runRestore(id, targetUpdatedAt, { author: options.author, message: restoreMessage, force: true }, global),\n );\n return {\n mode: \"rollback\",\n matched_count: checkpoint.items.length,\n dry_run: false,\n rollback_checkpoint_id: checkpoint.id,\n checkpoint: {\n id: checkpoint.id,\n created_at: checkpoint.created_at,\n path: checkpoint.path,\n rollback_command: `pm close-many --rollback ${checkpoint.id}`,\n },\n restored_count: rollback.restored_ids.length,\n failed_count: rollback.failed_count,\n rows: rollback.rows,\n ids: rollback.restored_ids,\n };\n }\n\n if (!hasCloseManyFilters(options.list, options.status)) {\n throw new PmCliError(\n `close-many requires at least one filter to scope the close (for example: ${CLOSE_MANY_FILTER_GUIDANCE}). Refusing to match every item.`,\n EXIT_CODE.USAGE,\n );\n }\n\n const reason = resolveReason(options.reason, settings.governance.require_close_reason);\n const validateCloseMode = options.validateClose;\n const force = options.force === true;\n\n const listOptions = activeListOptions(options.list);\n const listed = await runList(options.status, listOptions, global);\n const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(pmRoot, settings);\n const depthCache = new Map<string, number>();\n const matched = [...(listed.items as ListedItem[])].sort((left, right) => {\n const depthDelta = hierarchyDepth(right.id, parentByChild, depthCache) - hierarchyDepth(left.id, parentByChild, depthCache);\n return depthDelta !== 0 ? depthDelta : left.id.localeCompare(right.id);\n });\n const closePlannedIds = new Set(\n matched\n .filter((item) => force || !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id),\n );\n\n const planRows: CloseManyPlanRow[] = matched.map((item) => {\n const alreadyTerminal = isTerminalStatus(item.status, statusRegistry);\n const activeChildIds = (childrenByParent.get(item.id) ?? []).filter((childId) => !closePlannedIds.has(childId));\n const willSkip = alreadyTerminal && !force;\n return {\n id: item.id,\n title: typeof item.title === \"string\" ? item.title : \"\",\n status: item.status,\n action: willSkip ? \"skip\" : \"close\",\n ...(willSkip ? { skip_reason: \"already_terminal\" } : {}),\n ...(activeChildIds.length > 0 ? { active_child_ids: activeChildIds } : {}),\n };\n });\n\n if (dryRun) {\n return {\n mode: \"dry_run\",\n matched_count: matched.length,\n dry_run: true,\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n item_plans: planRows,\n ids: [],\n };\n }\n\n const closableIds = new Set(planRows.filter((row) => row.action === \"close\").map((row) => row.id));\n\n const nowValue = nowIso();\n const checkpointId = createCheckpointId(CLOSE_MANY_CHECKPOINT_SUBDIR, nowValue);\n const checkpointEnabled = options.checkpoint !== false;\n let checkpointInfo: CloseManyResult[\"checkpoint\"] | undefined;\n if (checkpointEnabled && closableIds.size > 0) {\n const checkpointItems: MutationCheckpointItem[] = matched\n .filter((item) => closableIds.has(item.id))\n .map((item) => ({ id: item.id, target_updated_at: item.updated_at }));\n const checkpointPath = await writeMutationCheckpoint(pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, checkpointId, {\n schema_version: CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n id: checkpointId,\n created_at: nowValue,\n author: resolveAuthor(options.author, \"unknown\"),\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n items: checkpointItems,\n });\n checkpointInfo = {\n id: checkpointId,\n created_at: nowValue,\n path: checkpointPath,\n rollback_command: `pm close-many --rollback ${checkpointId}`,\n };\n }\n\n const closeOptions: CloseCommandOptions = {\n author: options.author,\n message: options.message ?? `close-many apply ${checkpointId}`,\n validateClose: validateCloseMode,\n force,\n resolution: options.resolution,\n expectedResult: options.expectedResult,\n actualResult: options.actualResult,\n };\n\n const rows: CloseManyApplyRow[] = [];\n const closedIds: string[] = [];\n for (const item of matched) {\n if (!closableIds.has(item.id)) {\n rows.push({ id: item.id, status: \"skipped\", skip_reason: \"already_terminal\" });\n continue;\n }\n try {\n const result = await runClose(item.id, reason, closeOptions, global);\n rows.push({\n id: item.id,\n status: \"closed\",\n changed_fields: result.changed_fields,\n ...(result.warnings && result.warnings.length > 0 ? { warnings: result.warnings } : {}),\n });\n closedIds.push(item.id);\n } catch (error: unknown) {\n rows.push({ id: item.id, status: \"failed\", error: toErrorMessage(error) });\n }\n }\n\n return {\n mode: \"apply\",\n matched_count: matched.length,\n dry_run: false,\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n ...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),\n closed_count: rows.filter((row) => row.status === \"closed\").length,\n skipped_count: rows.filter((row) => row.status === \"skipped\").length,\n failed_count: rows.filter((row) => row.status === \"failed\").length,\n rows,\n ids: closedIds,\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAM,uCAAuC;AAC7C,IAAM,+BAA+B;AAEr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