@unbrained/pm-cli 2026.7.2 → 2026.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (546) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/CHANGELOG.md +29 -0
  3. package/CONTRIBUTING.md +38 -9
  4. package/README.md +1 -5
  5. package/dist/cli/commander-usage.js +54 -41
  6. package/dist/cli/commander-usage.js.map +1 -1
  7. package/dist/cli/commands/activity.js +79 -57
  8. package/dist/cli/commands/activity.js.map +1 -1
  9. package/dist/cli/commands/calendar.js +3 -3
  10. package/dist/cli/commands/calendar.js.map +1 -1
  11. package/dist/cli/commands/close-many.js +106 -65
  12. package/dist/cli/commands/close-many.js.map +1 -1
  13. package/dist/cli/commands/completion.js +231 -345
  14. package/dist/cli/commands/completion.js.map +1 -1
  15. package/dist/cli/commands/create.d.ts +2 -59
  16. package/dist/cli/commands/create.js +38 -39
  17. package/dist/cli/commands/create.js.map +1 -1
  18. package/dist/cli/commands/extension/doctor.js +56 -67
  19. package/dist/cli/commands/extension/doctor.js.map +1 -1
  20. package/dist/cli/commands/extension/scaffold.js +54 -133
  21. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  22. package/dist/cli/commands/extension/shared.js +21 -15
  23. package/dist/cli/commands/extension/shared.js.map +1 -1
  24. package/dist/cli/commands/files.js +3 -3
  25. package/dist/cli/commands/files.js.map +1 -1
  26. package/dist/cli/commands/health.js +101 -112
  27. package/dist/cli/commands/health.js.map +1 -1
  28. package/dist/cli/commands/history-compact.js +9 -18
  29. package/dist/cli/commands/history-compact.js.map +1 -1
  30. package/dist/cli/commands/history-repair.js +9 -19
  31. package/dist/cli/commands/history-repair.js.map +1 -1
  32. package/dist/cli/commands/init-agent-guidance.js +160 -111
  33. package/dist/cli/commands/init-agent-guidance.js.map +1 -1
  34. package/dist/cli/commands/init.js +3 -3
  35. package/dist/cli/commands/init.js.map +1 -1
  36. package/dist/cli/commands/item-filter-options.d.ts +2 -0
  37. package/dist/cli/commands/item-filter-options.js +2 -2
  38. package/dist/cli/commands/item-filter-options.js.map +1 -1
  39. package/dist/cli/commands/mutation-command-options.d.ts +78 -0
  40. package/dist/cli/commands/mutation-command-options.js +10 -0
  41. package/dist/cli/commands/mutation-command-options.js.map +1 -0
  42. package/dist/cli/commands/next.js +13 -10
  43. package/dist/cli/commands/next.js.map +1 -1
  44. package/dist/cli/commands/profile.js +23 -15
  45. package/dist/cli/commands/profile.js.map +1 -1
  46. package/dist/cli/commands/reindex.js +3 -3
  47. package/dist/cli/commands/reindex.js.map +1 -1
  48. package/dist/cli/commands/shared-unset-fields.d.ts +19 -0
  49. package/dist/cli/commands/shared-unset-fields.js +31 -2
  50. package/dist/cli/commands/shared-unset-fields.js.map +1 -1
  51. package/dist/cli/commands/update.d.ts +2 -59
  52. package/dist/cli/commands/update.js +26 -97
  53. package/dist/cli/commands/update.js.map +1 -1
  54. package/dist/cli/commands/validate.d.ts +2 -0
  55. package/dist/cli/commands/validate.js +16 -4
  56. package/dist/cli/commands/validate.js.map +1 -1
  57. package/dist/cli/error-guidance.js +9 -6
  58. package/dist/cli/error-guidance.js.map +1 -1
  59. package/dist/cli/extension-command-help.js +27 -19
  60. package/dist/cli/extension-command-help.js.map +1 -1
  61. package/dist/cli/help-json-payload.js +57 -49
  62. package/dist/cli/help-json-payload.js.map +1 -1
  63. package/dist/cli/main.js +48 -32
  64. package/dist/cli/main.js.map +1 -1
  65. package/dist/cli/register-list-query.js +215 -213
  66. package/dist/cli/register-list-query.js.map +1 -1
  67. package/dist/cli/register-mutation.js +368 -368
  68. package/dist/cli/register-mutation.js.map +1 -1
  69. package/dist/cli/register-operations.js +303 -299
  70. package/dist/cli/register-operations.js.map +1 -1
  71. package/dist/cli/registration-helpers.d.ts +4 -0
  72. package/dist/cli/registration-helpers.js +51 -56
  73. package/dist/cli/registration-helpers.js.map +1 -1
  74. package/dist/cli-bundle/chunks/activity-IDS5GSYG.js +16 -0
  75. package/dist/cli-bundle/chunks/{activity-CUC4JY3U.js → activity-OENQCYZD.js} +9 -9
  76. package/dist/cli-bundle/chunks/{aggregate-SW5PNGCS.js → aggregate-EC4LWS3U.js} +8 -8
  77. package/dist/cli-bundle/chunks/{aggregate-DKUTRY6R.js → aggregate-RCB3QJJE.js} +8 -8
  78. package/dist/cli-bundle/chunks/{append-H32VOR2Y.js → append-ADBOI3A6.js} +8 -8
  79. package/dist/cli-bundle/chunks/{append-UBM632FK.js → append-XLEKVVWB.js} +8 -8
  80. package/dist/cli-bundle/chunks/{chunk-Q6NXOHS6.js → chunk-2LRMWMZ6.js} +7 -7
  81. package/dist/cli-bundle/chunks/{chunk-2227673O.js → chunk-2ONH3WG6.js} +32 -13
  82. package/dist/cli-bundle/chunks/{chunk-2227673O.js.map → chunk-2ONH3WG6.js.map} +1 -1
  83. package/dist/cli-bundle/chunks/{chunk-MNBPX5JS.js → chunk-2VK677OA.js} +72 -49
  84. package/dist/cli-bundle/chunks/chunk-2VK677OA.js.map +7 -0
  85. package/dist/cli-bundle/chunks/{chunk-KLXF7NCC.js → chunk-3C5T3ZEO.js} +2 -2
  86. package/dist/cli-bundle/chunks/{chunk-JMK5GCK2.js → chunk-3MLQZI3H.js} +2 -2
  87. package/dist/cli-bundle/chunks/{chunk-BTX5MIQF.js → chunk-4EVY7CQN.js} +2 -2
  88. package/dist/cli-bundle/chunks/{chunk-Q6K2OACU.js → chunk-4IW7STMB.js} +7 -7
  89. package/dist/cli-bundle/chunks/{chunk-6YCYF2AI.js → chunk-4KPQQ42D.js} +166 -110
  90. package/dist/cli-bundle/chunks/chunk-4KPQQ42D.js.map +1 -0
  91. package/dist/cli-bundle/chunks/{chunk-BVZZN2LH.js → chunk-4OXNQHKQ.js} +23 -17
  92. package/dist/cli-bundle/chunks/{chunk-BVZZN2LH.js.map → chunk-4OXNQHKQ.js.map} +2 -2
  93. package/dist/cli-bundle/chunks/{chunk-UWKEJMZU.js → chunk-4PJYRA3V.js} +31 -12
  94. package/dist/cli-bundle/chunks/{chunk-UWKEJMZU.js.map → chunk-4PJYRA3V.js.map} +3 -3
  95. package/dist/cli-bundle/chunks/{chunk-EMPGXBUF.js → chunk-4SHME4VR.js} +2 -2
  96. package/dist/cli-bundle/chunks/{chunk-6ITZLD4T.js → chunk-5FYY76HR.js} +28 -99
  97. package/dist/cli-bundle/chunks/chunk-5FYY76HR.js.map +7 -0
  98. package/dist/cli-bundle/chunks/{chunk-OTUJZKGI.js → chunk-6QY2NA2M.js} +24 -18
  99. package/dist/cli-bundle/chunks/{chunk-OTUJZKGI.js.map → chunk-6QY2NA2M.js.map} +1 -1
  100. package/dist/cli-bundle/chunks/{chunk-2KWL5NPW.js → chunk-6YB7HG2J.js} +2 -2
  101. package/dist/cli-bundle/chunks/{chunk-36UGKF4O.js → chunk-724VLYDJ.js} +2 -2
  102. package/dist/cli-bundle/chunks/{chunk-XCHUVHKU.js → chunk-75VMARGO.js} +11 -11
  103. package/dist/cli-bundle/chunks/chunk-75VMARGO.js.map +1 -0
  104. package/dist/cli-bundle/chunks/{chunk-XWGEMNBR.js → chunk-7745CXNI.js} +119 -195
  105. package/dist/cli-bundle/chunks/chunk-7745CXNI.js.map +7 -0
  106. package/dist/cli-bundle/chunks/{chunk-YPKFV2JR.js → chunk-7G5SUU6F.js} +76 -54
  107. package/dist/cli-bundle/chunks/chunk-7G5SUU6F.js.map +1 -0
  108. package/dist/cli-bundle/chunks/{chunk-Y4NRKBFW.js → chunk-7ITQSEBL.js} +3 -3
  109. package/dist/cli-bundle/chunks/{chunk-W47SML5B.js → chunk-A222YWOQ.js} +7 -7
  110. package/dist/cli-bundle/chunks/{chunk-3LCUASYG.js → chunk-A2W3XKAD.js} +2 -2
  111. package/dist/cli-bundle/chunks/{chunk-KN3URLKS.js → chunk-AOP2EMK3.js} +3 -3
  112. package/dist/cli-bundle/chunks/{chunk-RM37OPYK.js → chunk-AZMPKLIA.js} +72 -49
  113. package/dist/cli-bundle/chunks/chunk-AZMPKLIA.js.map +1 -0
  114. package/dist/cli-bundle/chunks/{chunk-7NSPKJUS.js → chunk-BDDYM4LH.js} +262 -252
  115. package/dist/cli-bundle/chunks/chunk-BDDYM4LH.js.map +7 -0
  116. package/dist/cli-bundle/chunks/{chunk-JXAUVO6X.js → chunk-CN4OAA2G.js} +55 -20
  117. package/dist/cli-bundle/chunks/chunk-CN4OAA2G.js.map +7 -0
  118. package/dist/cli-bundle/chunks/{chunk-IEEJQCZ4.js → chunk-CQFZRLXQ.js} +3 -3
  119. package/dist/cli-bundle/chunks/{chunk-4NUOWFBT.js → chunk-CQISNF3Z.js} +7 -7
  120. package/dist/cli-bundle/chunks/{chunk-S62UANU7.js → chunk-D2LDM35X.js} +3 -3
  121. package/dist/cli-bundle/chunks/{chunk-GRRG3MCT.js → chunk-DEIDJQZK.js} +57 -136
  122. package/dist/cli-bundle/chunks/chunk-DEIDJQZK.js.map +7 -0
  123. package/dist/cli-bundle/chunks/{chunk-IG5JYZGU.js → chunk-DJ5S2LDY.js} +7 -7
  124. package/dist/cli-bundle/chunks/{chunk-A6VOGKBA.js → chunk-EB4BBEZD.js} +6 -6
  125. package/dist/cli-bundle/chunks/{chunk-QH3FSKRJ.js → chunk-EH23N5FX.js} +2 -2
  126. package/dist/cli-bundle/chunks/{chunk-HQTPRV4D.js → chunk-FDNJMYZB.js} +6 -6
  127. package/dist/cli-bundle/chunks/{chunk-K2VYLVX4.js → chunk-FMWQRMHS.js} +33 -6
  128. package/dist/cli-bundle/chunks/chunk-FMWQRMHS.js.map +1 -0
  129. package/dist/cli-bundle/chunks/{chunk-N2JSWVWG.js → chunk-HL742IBM.js} +4 -4
  130. package/dist/cli-bundle/chunks/{chunk-3AZUFQK6.js → chunk-J4KNRDI3.js} +59 -70
  131. package/dist/cli-bundle/chunks/{chunk-3AZUFQK6.js.map → chunk-J4KNRDI3.js.map} +1 -1
  132. package/dist/cli-bundle/chunks/{chunk-66Z3X7ZG.js → chunk-JYLFF7GJ.js} +166 -110
  133. package/dist/cli-bundle/chunks/chunk-JYLFF7GJ.js.map +7 -0
  134. package/dist/cli-bundle/chunks/{chunk-GFMSLORL.js → chunk-JZJJEJBR.js} +75 -53
  135. package/dist/cli-bundle/chunks/chunk-JZJJEJBR.js.map +7 -0
  136. package/dist/cli-bundle/chunks/{chunk-7TH5NMVB.js → chunk-KKHIQOTN.js} +25 -19
  137. package/dist/cli-bundle/chunks/chunk-KKHIQOTN.js.map +7 -0
  138. package/dist/cli-bundle/chunks/{chunk-5GVTFFTC.js → chunk-LLQLLAKU.js} +118 -194
  139. package/dist/cli-bundle/chunks/chunk-LLQLLAKU.js.map +1 -0
  140. package/dist/cli-bundle/chunks/{chunk-KIYCOJ63.js → chunk-M34MVAOP.js} +58 -137
  141. package/dist/cli-bundle/chunks/chunk-M34MVAOP.js.map +1 -0
  142. package/dist/cli-bundle/chunks/{chunk-CZPVDLD2.js → chunk-M6PR5BC6.js} +7 -7
  143. package/dist/cli-bundle/chunks/{chunk-XEWQKDYZ.js → chunk-MTB4PRA3.js} +10 -10
  144. package/dist/cli-bundle/chunks/chunk-MTB4PRA3.js.map +7 -0
  145. package/dist/cli-bundle/chunks/{chunk-MRD4T5LF.js → chunk-MZ4NH46V.js} +2 -2
  146. package/dist/cli-bundle/chunks/{chunk-AIAIXG7I.js → chunk-MZG6I2Q2.js} +39 -5
  147. package/dist/cli-bundle/chunks/chunk-MZG6I2Q2.js.map +7 -0
  148. package/dist/cli-bundle/chunks/{chunk-ZNHEYCDD.js → chunk-N2LOJUBB.js} +2 -2
  149. package/dist/cli-bundle/chunks/{chunk-WJAMWAHZ.js → chunk-NGDK3KEZ.js} +5 -5
  150. package/dist/cli-bundle/chunks/{chunk-SYNKD3ZG.js → chunk-NHDR3UCW.js} +46 -60
  151. package/dist/cli-bundle/chunks/chunk-NHDR3UCW.js.map +7 -0
  152. package/dist/cli-bundle/chunks/{chunk-2CHRYUXL.js → chunk-NHKXOMZ5.js} +2 -2
  153. package/dist/cli-bundle/chunks/{chunk-7MYWF4ZX.js → chunk-OTSP6UEX.js} +7 -7
  154. package/dist/cli-bundle/chunks/{chunk-UGLU6Q2I.js → chunk-PUVPC5DL.js} +4 -4
  155. package/dist/cli-bundle/chunks/{chunk-LTRAF2D7.js → chunk-PV5JS7MP.js} +3 -3
  156. package/dist/cli-bundle/chunks/{chunk-KCO2EAN5.js → chunk-Q2266G4S.js} +3 -3
  157. package/dist/cli-bundle/chunks/{chunk-SYVUU7EK.js → chunk-Q3XVLRCJ.js} +9 -9
  158. package/dist/cli-bundle/chunks/{chunk-AJEBCRIY.js → chunk-QFXFKYNQ.js} +47 -61
  159. package/dist/cli-bundle/chunks/chunk-QFXFKYNQ.js.map +1 -0
  160. package/dist/cli-bundle/chunks/{chunk-6ZMBJRDJ.js → chunk-R7EMP4JG.js} +9 -9
  161. package/dist/cli-bundle/chunks/{chunk-SPM2XLWI.js → chunk-SBNT6SLO.js} +22 -7
  162. package/dist/cli-bundle/chunks/chunk-SBNT6SLO.js.map +7 -0
  163. package/dist/cli-bundle/chunks/{chunk-I66WE2HE.js → chunk-SL2ANJSV.js} +260 -250
  164. package/dist/cli-bundle/chunks/chunk-SL2ANJSV.js.map +1 -0
  165. package/dist/cli-bundle/chunks/{chunk-U2BEEM2X.js → chunk-T5RTYLZJ.js} +3 -3
  166. package/dist/cli-bundle/chunks/{chunk-UTSH5GWX.js → chunk-TGYDJEJH.js} +7 -7
  167. package/dist/cli-bundle/chunks/{chunk-H4GRLYJS.js → chunk-TO4KCIOT.js} +3 -3
  168. package/dist/cli-bundle/chunks/{chunk-EUKTMRN3.js → chunk-TUV7SIWZ.js} +2 -2
  169. package/dist/cli-bundle/chunks/{chunk-N3QCJS4M.js → chunk-UGDONITK.js} +58 -69
  170. package/dist/cli-bundle/chunks/{chunk-N3QCJS4M.js.map → chunk-UGDONITK.js.map} +2 -2
  171. package/dist/cli-bundle/chunks/{chunk-NRZS637N.js → chunk-UYLA5ROU.js} +56 -21
  172. package/dist/cli-bundle/chunks/chunk-UYLA5ROU.js.map +1 -0
  173. package/dist/cli-bundle/chunks/{chunk-55XRYWEG.js → chunk-V655JQ5J.js} +8 -8
  174. package/dist/cli-bundle/chunks/{chunk-3Q2HBMTI.js → chunk-W5X3AHJN.js} +2 -2
  175. package/dist/cli-bundle/chunks/{chunk-XTHQWXVC.js → chunk-WBWRQS32.js} +5 -5
  176. package/dist/cli-bundle/chunks/{chunk-UT73HUPC.js → chunk-WOOB7PV7.js} +3 -3
  177. package/dist/cli-bundle/chunks/{chunk-5PGBHRY3.js → chunk-WSDIALO4.js} +2 -2
  178. package/dist/cli-bundle/chunks/{chunk-LRKMWUUV.js → chunk-WTXDLBSZ.js} +2 -2
  179. package/dist/cli-bundle/chunks/{chunk-FFOQHGNH.js → chunk-XBIYI23P.js} +8 -8
  180. package/dist/cli-bundle/chunks/{chunk-7W4H4K26.js → chunk-XFO2NJY6.js} +29 -100
  181. package/dist/cli-bundle/chunks/chunk-XFO2NJY6.js.map +1 -0
  182. package/dist/cli-bundle/chunks/{chunk-TPOFWBMY.js → chunk-XQCWTSLO.js} +26 -20
  183. package/dist/cli-bundle/chunks/chunk-XQCWTSLO.js.map +1 -0
  184. package/dist/cli-bundle/chunks/{chunk-2ASNV4DH.js → chunk-Y2VSCQ77.js} +4 -4
  185. package/dist/cli-bundle/chunks/{chunk-ZNT7KEWE.js → chunk-YZR7UMZ6.js} +2 -2
  186. package/dist/cli-bundle/chunks/{chunk-YLZZ6T54.js → chunk-YZWXMDNH.js} +23 -8
  187. package/dist/cli-bundle/chunks/chunk-YZWXMDNH.js.map +1 -0
  188. package/dist/cli-bundle/chunks/{chunk-CYBDUHNO.js → chunk-ZIEGTQCY.js} +3 -3
  189. package/dist/cli-bundle/chunks/{chunk-TTHCEV5Q.js → chunk-ZZWMJVW2.js} +4 -4
  190. package/dist/cli-bundle/chunks/{claim-Z7MEQCBT.js → claim-D6L33A5Y.js} +8 -8
  191. package/dist/cli-bundle/chunks/{claim-SENTPZBN.js → claim-YAFUTPVK.js} +8 -8
  192. package/dist/cli-bundle/chunks/close-KLDLHAOP.js +14 -0
  193. package/dist/cli-bundle/chunks/{close-424MX4CU.js → close-TGYXG7TV.js} +7 -7
  194. package/dist/cli-bundle/chunks/{close-many-SWY34BII.js → close-many-4QSWKCRU.js} +119 -76
  195. package/dist/cli-bundle/chunks/close-many-4QSWKCRU.js.map +7 -0
  196. package/dist/cli-bundle/chunks/{close-many-2IV4J2TR.js → close-many-SNA6LNZH.js} +120 -77
  197. package/dist/cli-bundle/chunks/close-many-SNA6LNZH.js.map +1 -0
  198. package/dist/cli-bundle/chunks/{comments-4FGNTSNV.js → comments-QC6ARR5X.js} +9 -9
  199. package/dist/cli-bundle/chunks/{comments-7YS5MY5X.js → comments-ZHVYGUVC.js} +9 -9
  200. package/dist/cli-bundle/chunks/{config-G74GISC4.js → config-O6W2EU2G.js} +7 -7
  201. package/dist/cli-bundle/chunks/{config-BZJKK7FZ.js → config-XQRFJXJP.js} +7 -7
  202. package/dist/cli-bundle/chunks/{context-LHVKJSPJ.js → context-IHE3IXN5.js} +12 -12
  203. package/dist/cli-bundle/chunks/{context-ZQY54JNS.js → context-WSYWBEUL.js} +12 -12
  204. package/dist/cli-bundle/chunks/{contracts-FIZLMP7O.js → contracts-CVBINC7C.js} +3 -3
  205. package/dist/cli-bundle/chunks/{contracts-CP2EZJC7.js → contracts-NLCDIZAT.js} +3 -3
  206. package/dist/cli-bundle/chunks/{copy-TLW7JTQT.js → copy-7MUQC44A.js} +5 -5
  207. package/dist/cli-bundle/chunks/{copy-GYNQQPW2.js → copy-ANWXDJVC.js} +5 -5
  208. package/dist/cli-bundle/chunks/create-AJ6HUR5W.js +28 -0
  209. package/dist/cli-bundle/chunks/{create-VSKYSOCD.js → create-JIA2IFCO.js} +12 -12
  210. package/dist/cli-bundle/chunks/{delete-ANTOTI2I.js → delete-5OLYWQIC.js} +5 -5
  211. package/dist/cli-bundle/chunks/{delete-4W5JYCEG.js → delete-INHKCIRN.js} +5 -5
  212. package/dist/cli-bundle/chunks/{deps-HPPE6MJN.js → deps-CCSWGZW7.js} +5 -5
  213. package/dist/cli-bundle/chunks/{deps-ZQZN54EZ.js → deps-IYEID3QX.js} +5 -5
  214. package/dist/cli-bundle/chunks/{docs-XJNYBJGE.js → docs-3XZK22WF.js} +7 -7
  215. package/dist/cli-bundle/chunks/{docs-RPOVFMP3.js → docs-PKO7OEIM.js} +7 -7
  216. package/dist/cli-bundle/chunks/{eval-RFBI5FGS.js → eval-5XYP6NMY.js} +10 -10
  217. package/dist/cli-bundle/chunks/{eval-DM6JBZTS.js → eval-O4WGQYDI.js} +10 -10
  218. package/dist/cli-bundle/chunks/{extension-TTSEFQTS.js → extension-PVGRRZZG.js} +11 -11
  219. package/dist/cli-bundle/chunks/{extension-B3YY4WY5.js → extension-T7JNTAAA.js} +11 -11
  220. package/dist/cli-bundle/chunks/{files-5D65CHGE.js → files-7IU56S6R.js} +10 -10
  221. package/dist/cli-bundle/chunks/files-7IU56S6R.js.map +1 -0
  222. package/dist/cli-bundle/chunks/{files-GPIG77EN.js → files-W7HH5EOD.js} +9 -9
  223. package/dist/cli-bundle/chunks/{files-GPIG77EN.js.map → files-W7HH5EOD.js.map} +1 -1
  224. package/dist/cli-bundle/chunks/{focus-ZHN7WIGX.js → focus-6FA5KYRY.js} +6 -6
  225. package/dist/cli-bundle/chunks/{focus-C3PEJV2C.js → focus-CQ63JFDG.js} +6 -6
  226. package/dist/cli-bundle/chunks/{gc-D4JQ6OWN.js → gc-3BG67KTO.js} +3 -3
  227. package/dist/cli-bundle/chunks/{gc-VZIXDL32.js → gc-PEZYGNVB.js} +3 -3
  228. package/dist/cli-bundle/chunks/{get-GIBRUUOP.js → get-J6CSJ4SX.js} +10 -10
  229. package/dist/cli-bundle/chunks/{get-IOVAN6RU.js → get-KJTKGNEQ.js} +10 -10
  230. package/dist/cli-bundle/chunks/{health-L2U3AFKV.js → health-32UQICEL.js} +115 -123
  231. package/dist/cli-bundle/chunks/health-32UQICEL.js.map +1 -0
  232. package/dist/cli-bundle/chunks/{health-MM7AWXYF.js → health-ZUZG5ULV.js} +114 -122
  233. package/dist/cli-bundle/chunks/health-ZUZG5ULV.js.map +7 -0
  234. package/dist/cli-bundle/chunks/history-IOH6FKG7.js +18 -0
  235. package/dist/cli-bundle/chunks/{history-IL7XCEX2.js → history-W6QVR6FA.js} +8 -8
  236. package/dist/cli-bundle/chunks/{history-compact-HALOTOU7.js → history-compact-F355EGL4.js} +20 -27
  237. package/dist/cli-bundle/chunks/history-compact-F355EGL4.js.map +1 -0
  238. package/dist/cli-bundle/chunks/{history-compact-MV25P7DM.js → history-compact-JQ6ZGYSJ.js} +19 -26
  239. package/dist/cli-bundle/chunks/history-compact-JQ6ZGYSJ.js.map +7 -0
  240. package/dist/cli-bundle/chunks/{history-redact-VYCWQFK7.js → history-redact-TUWOUYX5.js} +9 -9
  241. package/dist/cli-bundle/chunks/history-redact-VVDOARNO.js +19 -0
  242. package/dist/cli-bundle/chunks/{history-repair-44MODPQF.js → history-repair-MPCAIKYE.js} +20 -28
  243. package/dist/cli-bundle/chunks/history-repair-MPCAIKYE.js.map +1 -0
  244. package/dist/cli-bundle/chunks/{history-repair-CPNAOCNF.js → history-repair-ZKS3LKPV.js} +19 -27
  245. package/dist/cli-bundle/chunks/history-repair-ZKS3LKPV.js.map +7 -0
  246. package/dist/cli-bundle/chunks/init-CZLEEE6Q.js +22 -0
  247. package/dist/cli-bundle/chunks/{init-F27NHENZ.js → init-MAA6UMNQ.js} +12 -12
  248. package/dist/cli-bundle/chunks/{learnings-XSFSUUWK.js → learnings-EYC3OKS2.js} +9 -9
  249. package/dist/cli-bundle/chunks/{learnings-HJVDQIGY.js → learnings-HKJJUVTA.js} +9 -9
  250. package/dist/cli-bundle/chunks/{list-VMPWTURB.js → list-HFD5737R.js} +8 -8
  251. package/dist/cli-bundle/chunks/{list-HPMEKCAA.js → list-KN3TL5Y5.js} +8 -8
  252. package/dist/cli-bundle/chunks/{next-ETXF2ZCN.js → next-DQUMFAHG.js} +25 -22
  253. package/dist/cli-bundle/chunks/{next-ETXF2ZCN.js.map → next-DQUMFAHG.js.map} +2 -2
  254. package/dist/cli-bundle/chunks/{next-QM6YJIIS.js → next-JUEYC5HE.js} +26 -23
  255. package/dist/cli-bundle/chunks/next-JUEYC5HE.js.map +1 -0
  256. package/dist/cli-bundle/chunks/{notes-WDDBPC4D.js → notes-XATYT43P.js} +9 -9
  257. package/dist/cli-bundle/chunks/{notes-GDZIKGR6.js → notes-ZG6RLZXB.js} +9 -9
  258. package/dist/cli-bundle/chunks/{plan-BGDR73Z6.js → plan-5NWQL2DH.js} +12 -12
  259. package/dist/cli-bundle/chunks/{plan-C5IMM335.js → plan-DVVLX7LK.js} +12 -12
  260. package/dist/cli-bundle/chunks/{profile-CCOKZ2IQ.js → profile-54DZ4CLB.js} +27 -19
  261. package/dist/cli-bundle/chunks/profile-54DZ4CLB.js.map +1 -0
  262. package/dist/cli-bundle/chunks/{profile-HUCENIEQ.js → profile-PLIQVEOY.js} +26 -18
  263. package/dist/cli-bundle/chunks/profile-PLIQVEOY.js.map +7 -0
  264. package/dist/cli-bundle/chunks/{register-list-query-ROSNIL52.js → register-list-query-PNRAHNIQ.js} +181 -172
  265. package/dist/cli-bundle/chunks/register-list-query-PNRAHNIQ.js.map +1 -0
  266. package/dist/cli-bundle/chunks/{register-list-query-XN4ZRHSV.js → register-list-query-WRS6ACUW.js} +180 -171
  267. package/dist/cli-bundle/chunks/register-list-query-WRS6ACUW.js.map +7 -0
  268. package/dist/cli-bundle/chunks/{register-mutation-KRLAHEL2.js → register-mutation-ET6E4VLE.js} +367 -361
  269. package/dist/cli-bundle/chunks/register-mutation-ET6E4VLE.js.map +7 -0
  270. package/dist/cli-bundle/chunks/{register-mutation-CFSB2MS3.js → register-mutation-K2MNRWGI.js} +368 -362
  271. package/dist/cli-bundle/chunks/register-mutation-K2MNRWGI.js.map +1 -0
  272. package/dist/cli-bundle/chunks/{register-operations-MBN4KGUM.js → register-operations-6DQRUTIX.js} +310 -305
  273. package/dist/cli-bundle/chunks/register-operations-6DQRUTIX.js.map +1 -0
  274. package/dist/cli-bundle/chunks/{register-operations-4PASGJDB.js → register-operations-73UDWMVB.js} +309 -304
  275. package/dist/cli-bundle/chunks/register-operations-73UDWMVB.js.map +7 -0
  276. package/dist/cli-bundle/chunks/{register-setup-ZCGKHDKL.js → register-setup-FXZJ2CEJ.js} +15 -15
  277. package/dist/cli-bundle/chunks/{register-setup-VIAWYFP5.js → register-setup-LYYCMQFV.js} +15 -15
  278. package/dist/cli-bundle/chunks/restore-L27TMMCF.js +17 -0
  279. package/dist/cli-bundle/chunks/{restore-4CBWUMCX.js → restore-R6YJHQK3.js} +9 -9
  280. package/dist/cli-bundle/chunks/{scheduling-shortcuts-6VFKNKCM.js → scheduling-shortcuts-LE4S7OI7.js} +12 -12
  281. package/dist/cli-bundle/chunks/{scheduling-shortcuts-ERHCVTEM.js → scheduling-shortcuts-OGODPUBL.js} +12 -12
  282. package/dist/cli-bundle/chunks/{schema-UE5KKAUX.js → schema-ICCD3HOP.js} +7 -7
  283. package/dist/cli-bundle/chunks/{schema-TDGK6N3I.js → schema-RHH23PQX.js} +7 -7
  284. package/dist/cli-bundle/chunks/{search-FP7MEU4S.js → search-HDDKOPFE.js} +10 -10
  285. package/dist/cli-bundle/chunks/{search-K4CFLQ5S.js → search-Z2VGP2Q5.js} +10 -10
  286. package/dist/cli-bundle/chunks/{stats-NJJCALEZ.js → stats-DHMRXHOB.js} +6 -6
  287. package/dist/cli-bundle/chunks/{stats-XT6QRKQY.js → stats-ETFP37MB.js} +6 -6
  288. package/dist/cli-bundle/chunks/{telemetry-HVXFZA2U.js → telemetry-NUZNKDCP.js} +4 -4
  289. package/dist/cli-bundle/chunks/{telemetry-5SQ5UDXC.js → telemetry-ZRBM22QD.js} +4 -4
  290. package/dist/cli-bundle/chunks/{test-UFSJ5YIO.js → test-H36PM746.js} +15 -15
  291. package/dist/cli-bundle/chunks/{test-YCDAUBWF.js → test-XNKTIP4Y.js} +15 -15
  292. package/dist/cli-bundle/chunks/{test-all-2BWKY3GQ.js → test-all-APCBSXQI.js} +17 -17
  293. package/dist/cli-bundle/chunks/{test-all-PM7UYN42.js → test-all-KIK3OYBY.js} +17 -17
  294. package/dist/cli-bundle/chunks/{test-runs-H4TGWGRN.js → test-runs-5SLLV3XU.js} +4 -4
  295. package/dist/cli-bundle/chunks/{test-runs-FK5E75AA.js → test-runs-L3WKLO67.js} +4 -4
  296. package/dist/cli-bundle/chunks/update-RQKI3AMW.js +24 -0
  297. package/dist/cli-bundle/chunks/{update-Y5WQVT5O.js → update-ZM7NJWHY.js} +15 -15
  298. package/dist/cli-bundle/chunks/{update-many-JTKKSA7Y.js → update-many-GFCQG6ZQ.js} +28 -28
  299. package/dist/cli-bundle/chunks/{update-many-6YAYYRLE.js → update-many-XGTJ7QIU.js} +28 -28
  300. package/dist/cli-bundle/chunks/{upgrade-DTAHZ236.js → upgrade-KJ3JGELR.js} +11 -11
  301. package/dist/cli-bundle/chunks/{upgrade-JUDU7YL4.js → upgrade-RBRQ7PQU.js} +11 -11
  302. package/dist/cli-bundle/chunks/{validate-732RWS5W.js → validate-EW6TGC7R.js} +31 -21
  303. package/dist/cli-bundle/chunks/validate-EW6TGC7R.js.map +7 -0
  304. package/dist/cli-bundle/chunks/{validate-W7H5TEDC.js → validate-T6PR5WAL.js} +32 -22
  305. package/dist/cli-bundle/chunks/validate-T6PR5WAL.js.map +1 -0
  306. package/dist/cli-bundle/main.js +180 -122
  307. package/dist/cli-bundle/main.js.map +3 -3
  308. package/dist/core/extensions/extension-types.d.ts +1 -2
  309. package/dist/core/extensions/extension-types.js +2 -2
  310. package/dist/core/extensions/extension-types.js.map +1 -1
  311. package/dist/core/history/history-rewrite.d.ts +10 -0
  312. package/dist/core/history/history-rewrite.js +27 -3
  313. package/dist/core/history/history-rewrite.js.map +1 -1
  314. package/dist/core/item/type-registry.d.ts +1 -0
  315. package/dist/core/item/type-registry.js +180 -194
  316. package/dist/core/item/type-registry.js.map +1 -1
  317. package/dist/core/schema/runtime-schema.js +65 -54
  318. package/dist/core/schema/runtime-schema.js.map +1 -1
  319. package/dist/core/schema/status-defs-file.js +26 -3
  320. package/dist/core/schema/status-defs-file.js.map +1 -1
  321. package/dist/core/search/corpus.js +25 -19
  322. package/dist/core/search/corpus.js.map +1 -1
  323. package/dist/core/shared/memo.d.ts +12 -0
  324. package/dist/core/shared/memo.js +25 -0
  325. package/dist/core/shared/memo.js.map +1 -0
  326. package/dist/core/shared/serialization.js +24 -14
  327. package/dist/core/shared/serialization.js.map +1 -1
  328. package/dist/core/shared/time.js +26 -4
  329. package/dist/core/shared/time.js.map +1 -1
  330. package/dist/core/store/front-matter-cache.d.ts +5 -0
  331. package/dist/core/store/front-matter-cache.js +79 -20
  332. package/dist/core/store/front-matter-cache.js.map +1 -1
  333. package/dist/sdk/cli-contracts/flag-contracts.js +73 -99
  334. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  335. package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
  336. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  337. package/dist/sdk/cli-contracts/tool-schema.js +55 -94
  338. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  339. package/dist/sdk/compose.js +51 -42
  340. package/dist/sdk/compose.js.map +1 -1
  341. package/dist/sdk/package-import-adapters.d.ts +90 -2
  342. package/dist/sdk/package-import-adapters.js +274 -2
  343. package/dist/sdk/package-import-adapters.js.map +1 -1
  344. package/dist/sdk/runtime.d.ts +1 -1
  345. package/dist/sdk/runtime.js +3 -3
  346. package/dist/sdk/runtime.js.map +1 -1
  347. package/docs/AGENT_GUIDE.md +2 -2
  348. package/docs/ARCHITECTURE.md +2 -2
  349. package/docs/COMMANDS.md +8 -4
  350. package/docs/CONFIGURATION.md +1 -1
  351. package/docs/EXTENSIONS.md +12 -12
  352. package/docs/ONBOARDING.md +4 -2
  353. package/docs/README.md +2 -0
  354. package/docs/examples/starter-extension/README.md +11 -10
  355. package/marketplace.json +3 -3
  356. package/package.json +4 -3
  357. package/packages/pm-beads/extensions/beads/runtime-loader.ts +27 -40
  358. package/packages/pm-beads/extensions/beads/runtime.ts +106 -223
  359. package/packages/pm-calendar/extensions/calendar/runtime.ts +21 -18
  360. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +9 -11
  361. package/packages/pm-todos/extensions/todos/runtime-loader.ts +48 -76
  362. package/packages/pm-todos/extensions/todos/runtime.ts +61 -257
  363. package/plugins/pm-claude/.claude-plugin/plugin.json +2 -2
  364. package/plugins/pm-claude/README.md +6 -3
  365. package/plugins/pm-claude/commands/pm-init.md +1 -1
  366. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +73 -31
  367. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +80 -34
  368. package/scripts/install.ps1 +7 -7
  369. package/dist/cli-bundle/chunks/activity-WEIEMM73.js +0 -16
  370. package/dist/cli-bundle/chunks/chunk-5GVTFFTC.js.map +0 -1
  371. package/dist/cli-bundle/chunks/chunk-66Z3X7ZG.js.map +0 -7
  372. package/dist/cli-bundle/chunks/chunk-6ITZLD4T.js.map +0 -7
  373. package/dist/cli-bundle/chunks/chunk-6YCYF2AI.js.map +0 -1
  374. package/dist/cli-bundle/chunks/chunk-7NSPKJUS.js.map +0 -7
  375. package/dist/cli-bundle/chunks/chunk-7TH5NMVB.js.map +0 -7
  376. package/dist/cli-bundle/chunks/chunk-7W4H4K26.js.map +0 -1
  377. package/dist/cli-bundle/chunks/chunk-AIAIXG7I.js.map +0 -7
  378. package/dist/cli-bundle/chunks/chunk-AJEBCRIY.js.map +0 -1
  379. package/dist/cli-bundle/chunks/chunk-GFMSLORL.js.map +0 -7
  380. package/dist/cli-bundle/chunks/chunk-GRRG3MCT.js.map +0 -7
  381. package/dist/cli-bundle/chunks/chunk-I66WE2HE.js.map +0 -1
  382. package/dist/cli-bundle/chunks/chunk-JXAUVO6X.js.map +0 -7
  383. package/dist/cli-bundle/chunks/chunk-K2VYLVX4.js.map +0 -1
  384. package/dist/cli-bundle/chunks/chunk-KIYCOJ63.js.map +0 -1
  385. package/dist/cli-bundle/chunks/chunk-MNBPX5JS.js.map +0 -7
  386. package/dist/cli-bundle/chunks/chunk-NRZS637N.js.map +0 -1
  387. package/dist/cli-bundle/chunks/chunk-RM37OPYK.js.map +0 -1
  388. package/dist/cli-bundle/chunks/chunk-SPM2XLWI.js.map +0 -7
  389. package/dist/cli-bundle/chunks/chunk-SYNKD3ZG.js.map +0 -7
  390. package/dist/cli-bundle/chunks/chunk-TPOFWBMY.js.map +0 -1
  391. package/dist/cli-bundle/chunks/chunk-XCHUVHKU.js.map +0 -1
  392. package/dist/cli-bundle/chunks/chunk-XEWQKDYZ.js.map +0 -7
  393. package/dist/cli-bundle/chunks/chunk-XWGEMNBR.js.map +0 -7
  394. package/dist/cli-bundle/chunks/chunk-YLZZ6T54.js.map +0 -1
  395. package/dist/cli-bundle/chunks/chunk-YPKFV2JR.js.map +0 -1
  396. package/dist/cli-bundle/chunks/close-YCWQQPDS.js +0 -14
  397. package/dist/cli-bundle/chunks/close-many-2IV4J2TR.js.map +0 -1
  398. package/dist/cli-bundle/chunks/close-many-SWY34BII.js.map +0 -7
  399. package/dist/cli-bundle/chunks/create-XTMAPS7I.js +0 -28
  400. package/dist/cli-bundle/chunks/files-5D65CHGE.js.map +0 -1
  401. package/dist/cli-bundle/chunks/health-L2U3AFKV.js.map +0 -1
  402. package/dist/cli-bundle/chunks/health-MM7AWXYF.js.map +0 -7
  403. package/dist/cli-bundle/chunks/history-DD7L7BNL.js +0 -18
  404. package/dist/cli-bundle/chunks/history-compact-HALOTOU7.js.map +0 -1
  405. package/dist/cli-bundle/chunks/history-compact-MV25P7DM.js.map +0 -7
  406. package/dist/cli-bundle/chunks/history-redact-IX4YEWMY.js +0 -19
  407. package/dist/cli-bundle/chunks/history-repair-44MODPQF.js.map +0 -1
  408. package/dist/cli-bundle/chunks/history-repair-CPNAOCNF.js.map +0 -7
  409. package/dist/cli-bundle/chunks/init-HHVQQP6C.js +0 -22
  410. package/dist/cli-bundle/chunks/next-QM6YJIIS.js.map +0 -1
  411. package/dist/cli-bundle/chunks/profile-CCOKZ2IQ.js.map +0 -1
  412. package/dist/cli-bundle/chunks/profile-HUCENIEQ.js.map +0 -7
  413. package/dist/cli-bundle/chunks/register-list-query-ROSNIL52.js.map +0 -1
  414. package/dist/cli-bundle/chunks/register-list-query-XN4ZRHSV.js.map +0 -7
  415. package/dist/cli-bundle/chunks/register-mutation-CFSB2MS3.js.map +0 -1
  416. package/dist/cli-bundle/chunks/register-mutation-KRLAHEL2.js.map +0 -7
  417. package/dist/cli-bundle/chunks/register-operations-4PASGJDB.js.map +0 -7
  418. package/dist/cli-bundle/chunks/register-operations-MBN4KGUM.js.map +0 -1
  419. package/dist/cli-bundle/chunks/restore-5UEAGG3W.js +0 -17
  420. package/dist/cli-bundle/chunks/update-MTCFES6X.js +0 -24
  421. package/dist/cli-bundle/chunks/validate-732RWS5W.js.map +0 -7
  422. package/dist/cli-bundle/chunks/validate-W7H5TEDC.js.map +0 -1
  423. /package/dist/cli-bundle/chunks/{activity-WEIEMM73.js.map → activity-IDS5GSYG.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{activity-CUC4JY3U.js.map → activity-OENQCYZD.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{aggregate-SW5PNGCS.js.map → aggregate-EC4LWS3U.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{aggregate-DKUTRY6R.js.map → aggregate-RCB3QJJE.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{append-H32VOR2Y.js.map → append-ADBOI3A6.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{append-UBM632FK.js.map → append-XLEKVVWB.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{chunk-Q6NXOHS6.js.map → chunk-2LRMWMZ6.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{chunk-KLXF7NCC.js.map → chunk-3C5T3ZEO.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{chunk-JMK5GCK2.js.map → chunk-3MLQZI3H.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{chunk-BTX5MIQF.js.map → chunk-4EVY7CQN.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{chunk-Q6K2OACU.js.map → chunk-4IW7STMB.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{chunk-EMPGXBUF.js.map → chunk-4SHME4VR.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{chunk-2KWL5NPW.js.map → chunk-6YB7HG2J.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{chunk-36UGKF4O.js.map → chunk-724VLYDJ.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{chunk-Y4NRKBFW.js.map → chunk-7ITQSEBL.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{chunk-W47SML5B.js.map → chunk-A222YWOQ.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{chunk-3LCUASYG.js.map → chunk-A2W3XKAD.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{chunk-KN3URLKS.js.map → chunk-AOP2EMK3.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{chunk-IEEJQCZ4.js.map → chunk-CQFZRLXQ.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{chunk-4NUOWFBT.js.map → chunk-CQISNF3Z.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{chunk-S62UANU7.js.map → chunk-D2LDM35X.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{chunk-IG5JYZGU.js.map → chunk-DJ5S2LDY.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{chunk-A6VOGKBA.js.map → chunk-EB4BBEZD.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{chunk-QH3FSKRJ.js.map → chunk-EH23N5FX.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{chunk-HQTPRV4D.js.map → chunk-FDNJMYZB.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{chunk-N2JSWVWG.js.map → chunk-HL742IBM.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{chunk-CZPVDLD2.js.map → chunk-M6PR5BC6.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{chunk-MRD4T5LF.js.map → chunk-MZ4NH46V.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{chunk-ZNHEYCDD.js.map → chunk-N2LOJUBB.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{chunk-WJAMWAHZ.js.map → chunk-NGDK3KEZ.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{chunk-2CHRYUXL.js.map → chunk-NHKXOMZ5.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{chunk-7MYWF4ZX.js.map → chunk-OTSP6UEX.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{chunk-UGLU6Q2I.js.map → chunk-PUVPC5DL.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{chunk-LTRAF2D7.js.map → chunk-PV5JS7MP.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{chunk-KCO2EAN5.js.map → chunk-Q2266G4S.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{chunk-SYVUU7EK.js.map → chunk-Q3XVLRCJ.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{chunk-6ZMBJRDJ.js.map → chunk-R7EMP4JG.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{chunk-U2BEEM2X.js.map → chunk-T5RTYLZJ.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{chunk-UTSH5GWX.js.map → chunk-TGYDJEJH.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{chunk-H4GRLYJS.js.map → chunk-TO4KCIOT.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{chunk-EUKTMRN3.js.map → chunk-TUV7SIWZ.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{chunk-55XRYWEG.js.map → chunk-V655JQ5J.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{chunk-3Q2HBMTI.js.map → chunk-W5X3AHJN.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{chunk-XTHQWXVC.js.map → chunk-WBWRQS32.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{chunk-UT73HUPC.js.map → chunk-WOOB7PV7.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{chunk-5PGBHRY3.js.map → chunk-WSDIALO4.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{chunk-LRKMWUUV.js.map → chunk-WTXDLBSZ.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{chunk-FFOQHGNH.js.map → chunk-XBIYI23P.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{chunk-2ASNV4DH.js.map → chunk-Y2VSCQ77.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{chunk-ZNT7KEWE.js.map → chunk-YZR7UMZ6.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{chunk-CYBDUHNO.js.map → chunk-ZIEGTQCY.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{chunk-TTHCEV5Q.js.map → chunk-ZZWMJVW2.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{claim-Z7MEQCBT.js.map → claim-D6L33A5Y.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{claim-SENTPZBN.js.map → claim-YAFUTPVK.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{close-YCWQQPDS.js.map → close-KLDLHAOP.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{close-424MX4CU.js.map → close-TGYXG7TV.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{comments-4FGNTSNV.js.map → comments-QC6ARR5X.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{comments-7YS5MY5X.js.map → comments-ZHVYGUVC.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{config-G74GISC4.js.map → config-O6W2EU2G.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{config-BZJKK7FZ.js.map → config-XQRFJXJP.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{context-LHVKJSPJ.js.map → context-IHE3IXN5.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{context-ZQY54JNS.js.map → context-WSYWBEUL.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{contracts-FIZLMP7O.js.map → contracts-CVBINC7C.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{contracts-CP2EZJC7.js.map → contracts-NLCDIZAT.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{copy-TLW7JTQT.js.map → copy-7MUQC44A.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{copy-GYNQQPW2.js.map → copy-ANWXDJVC.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{create-XTMAPS7I.js.map → create-AJ6HUR5W.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{create-VSKYSOCD.js.map → create-JIA2IFCO.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{delete-ANTOTI2I.js.map → delete-5OLYWQIC.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{delete-4W5JYCEG.js.map → delete-INHKCIRN.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{deps-HPPE6MJN.js.map → deps-CCSWGZW7.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{deps-ZQZN54EZ.js.map → deps-IYEID3QX.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{docs-XJNYBJGE.js.map → docs-3XZK22WF.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{docs-RPOVFMP3.js.map → docs-PKO7OEIM.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{eval-RFBI5FGS.js.map → eval-5XYP6NMY.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{eval-DM6JBZTS.js.map → eval-O4WGQYDI.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{extension-TTSEFQTS.js.map → extension-PVGRRZZG.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{extension-B3YY4WY5.js.map → extension-T7JNTAAA.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{focus-ZHN7WIGX.js.map → focus-6FA5KYRY.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{focus-C3PEJV2C.js.map → focus-CQ63JFDG.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{gc-D4JQ6OWN.js.map → gc-3BG67KTO.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{gc-VZIXDL32.js.map → gc-PEZYGNVB.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{get-GIBRUUOP.js.map → get-J6CSJ4SX.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{get-IOVAN6RU.js.map → get-KJTKGNEQ.js.map} +0 -0
  507. /package/dist/cli-bundle/chunks/{history-DD7L7BNL.js.map → history-IOH6FKG7.js.map} +0 -0
  508. /package/dist/cli-bundle/chunks/{history-IL7XCEX2.js.map → history-W6QVR6FA.js.map} +0 -0
  509. /package/dist/cli-bundle/chunks/{history-redact-VYCWQFK7.js.map → history-redact-TUWOUYX5.js.map} +0 -0
  510. /package/dist/cli-bundle/chunks/{history-redact-IX4YEWMY.js.map → history-redact-VVDOARNO.js.map} +0 -0
  511. /package/dist/cli-bundle/chunks/{init-HHVQQP6C.js.map → init-CZLEEE6Q.js.map} +0 -0
  512. /package/dist/cli-bundle/chunks/{init-F27NHENZ.js.map → init-MAA6UMNQ.js.map} +0 -0
  513. /package/dist/cli-bundle/chunks/{learnings-XSFSUUWK.js.map → learnings-EYC3OKS2.js.map} +0 -0
  514. /package/dist/cli-bundle/chunks/{learnings-HJVDQIGY.js.map → learnings-HKJJUVTA.js.map} +0 -0
  515. /package/dist/cli-bundle/chunks/{list-VMPWTURB.js.map → list-HFD5737R.js.map} +0 -0
  516. /package/dist/cli-bundle/chunks/{list-HPMEKCAA.js.map → list-KN3TL5Y5.js.map} +0 -0
  517. /package/dist/cli-bundle/chunks/{notes-WDDBPC4D.js.map → notes-XATYT43P.js.map} +0 -0
  518. /package/dist/cli-bundle/chunks/{notes-GDZIKGR6.js.map → notes-ZG6RLZXB.js.map} +0 -0
  519. /package/dist/cli-bundle/chunks/{plan-BGDR73Z6.js.map → plan-5NWQL2DH.js.map} +0 -0
  520. /package/dist/cli-bundle/chunks/{plan-C5IMM335.js.map → plan-DVVLX7LK.js.map} +0 -0
  521. /package/dist/cli-bundle/chunks/{register-setup-ZCGKHDKL.js.map → register-setup-FXZJ2CEJ.js.map} +0 -0
  522. /package/dist/cli-bundle/chunks/{register-setup-VIAWYFP5.js.map → register-setup-LYYCMQFV.js.map} +0 -0
  523. /package/dist/cli-bundle/chunks/{restore-5UEAGG3W.js.map → restore-L27TMMCF.js.map} +0 -0
  524. /package/dist/cli-bundle/chunks/{restore-4CBWUMCX.js.map → restore-R6YJHQK3.js.map} +0 -0
  525. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-6VFKNKCM.js.map → scheduling-shortcuts-LE4S7OI7.js.map} +0 -0
  526. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-ERHCVTEM.js.map → scheduling-shortcuts-OGODPUBL.js.map} +0 -0
  527. /package/dist/cli-bundle/chunks/{schema-UE5KKAUX.js.map → schema-ICCD3HOP.js.map} +0 -0
  528. /package/dist/cli-bundle/chunks/{schema-TDGK6N3I.js.map → schema-RHH23PQX.js.map} +0 -0
  529. /package/dist/cli-bundle/chunks/{search-FP7MEU4S.js.map → search-HDDKOPFE.js.map} +0 -0
  530. /package/dist/cli-bundle/chunks/{search-K4CFLQ5S.js.map → search-Z2VGP2Q5.js.map} +0 -0
  531. /package/dist/cli-bundle/chunks/{stats-NJJCALEZ.js.map → stats-DHMRXHOB.js.map} +0 -0
  532. /package/dist/cli-bundle/chunks/{stats-XT6QRKQY.js.map → stats-ETFP37MB.js.map} +0 -0
  533. /package/dist/cli-bundle/chunks/{telemetry-HVXFZA2U.js.map → telemetry-NUZNKDCP.js.map} +0 -0
  534. /package/dist/cli-bundle/chunks/{telemetry-5SQ5UDXC.js.map → telemetry-ZRBM22QD.js.map} +0 -0
  535. /package/dist/cli-bundle/chunks/{test-UFSJ5YIO.js.map → test-H36PM746.js.map} +0 -0
  536. /package/dist/cli-bundle/chunks/{test-YCDAUBWF.js.map → test-XNKTIP4Y.js.map} +0 -0
  537. /package/dist/cli-bundle/chunks/{test-all-2BWKY3GQ.js.map → test-all-APCBSXQI.js.map} +0 -0
  538. /package/dist/cli-bundle/chunks/{test-all-PM7UYN42.js.map → test-all-KIK3OYBY.js.map} +0 -0
  539. /package/dist/cli-bundle/chunks/{test-runs-H4TGWGRN.js.map → test-runs-5SLLV3XU.js.map} +0 -0
  540. /package/dist/cli-bundle/chunks/{test-runs-FK5E75AA.js.map → test-runs-L3WKLO67.js.map} +0 -0
  541. /package/dist/cli-bundle/chunks/{update-MTCFES6X.js.map → update-RQKI3AMW.js.map} +0 -0
  542. /package/dist/cli-bundle/chunks/{update-Y5WQVT5O.js.map → update-ZM7NJWHY.js.map} +0 -0
  543. /package/dist/cli-bundle/chunks/{update-many-JTKKSA7Y.js.map → update-many-GFCQG6ZQ.js.map} +0 -0
  544. /package/dist/cli-bundle/chunks/{update-many-6YAYYRLE.js.map → update-many-XGTJ7QIU.js.map} +0 -0
  545. /package/dist/cli-bundle/chunks/{upgrade-DTAHZ236.js.map → upgrade-KJ3JGELR.js.map} +0 -0
  546. /package/dist/cli-bundle/chunks/{upgrade-JUDU7YL4.js.map → upgrade-RBRQ7PQU.js.map} +0 -0
@@ -4,7 +4,7 @@
4
4
  * Implements the pm close many command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="6134e48e-82f6-57ac-8c76-23104bfee7bd")}catch(e){}}();
7
+ !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]="5c5dd261-a666-5af5-a11b-30a08d3ada7d")}catch(e){}}();
8
8
  import { pathExists } from "../../core/fs/fs-utils.js";
9
9
  import { createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, } from "../../core/checkpoint/mutation-checkpoint.js";
10
10
  import { getActiveExtensionRegistrations } from "../../core/extensions/index.js";
@@ -168,9 +168,8 @@ async function runCloseManyRollback(params) {
168
168
  }
169
169
  function planCloseManyRows(matched, childrenByParent, closePlannedIds, statusRegistry, force) {
170
170
  return matched.map((item) => {
171
- const alreadyTerminal = isTerminalStatus(item.status, statusRegistry);
172
171
  const activeChildIds = (childrenByParent.get(item.id) ?? []).filter((childId) => !closePlannedIds.has(childId));
173
- const willSkip = alreadyTerminal && !force;
172
+ const willSkip = !canCloseManyItem(item, statusRegistry, force);
174
173
  return {
175
174
  id: item.id,
176
175
  title: typeof item.title === "string" ? item.title : "",
@@ -222,6 +221,89 @@ async function applyCloseManyRows(params) {
222
221
  }
223
222
  return { rows, closedIds };
224
223
  }
224
+ function resolveCloseManyRollbackId(options) {
225
+ return typeof options.rollback === "string" ? options.rollback : undefined;
226
+ }
227
+ function validateCloseManyRollbackOptions(options, rollbackId) {
228
+ if (rollbackId.trim().length === 0) {
229
+ throw new PmCliError("--rollback requires a checkpoint id", EXIT_CODE.USAGE);
230
+ }
231
+ if (options.dryRun === true) {
232
+ throw new PmCliError("--dry-run cannot be combined with --rollback", EXIT_CODE.USAGE);
233
+ }
234
+ if (hasCloseManyRollbackConflicts(options.list, options.status)) {
235
+ throw new PmCliError("Rollback mode does not accept filter options", EXIT_CODE.USAGE);
236
+ }
237
+ }
238
+ function assertCloseManyHasFilters(options) {
239
+ if (hasCloseManyFilters(options.list, options.status)) {
240
+ return;
241
+ }
242
+ 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);
243
+ }
244
+ function sortCloseManyMatchedItems(matched, parentByChild) {
245
+ const depthCache = new Map();
246
+ return [...matched].sort((left, right) => {
247
+ const depthDelta = hierarchyDepth(right.id, parentByChild, depthCache) - hierarchyDepth(left.id, parentByChild, depthCache);
248
+ return depthDelta !== 0 ? depthDelta : left.id.localeCompare(right.id);
249
+ });
250
+ }
251
+ function canCloseManyItem(item, statusRegistry, force) {
252
+ return force || !isTerminalStatus(item.status, statusRegistry);
253
+ }
254
+ function resolveCloseManyPlannedIds(matched, statusRegistry, force) {
255
+ return new Set(matched.filter((item) => canCloseManyItem(item, statusRegistry, force)).map((item) => item.id));
256
+ }
257
+ async function buildCloseManyPlanContext(params) {
258
+ assertCloseManyHasFilters(params.options);
259
+ const statusRegistry = resolveRuntimeStatusRegistry(params.settings.schema);
260
+ const reason = resolveReason(params.options.reason, params.settings.governance.require_close_reason);
261
+ const force = params.options.force === true;
262
+ const listed = await runList(params.options.status, activeListOptions(params.options.list), params.global);
263
+ const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(params.pmRoot, params.settings);
264
+ const matched = sortCloseManyMatchedItems(listed.items, parentByChild);
265
+ const closePlannedIds = resolveCloseManyPlannedIds(matched, statusRegistry, force);
266
+ return {
267
+ pmRoot: params.pmRoot,
268
+ settings: params.settings,
269
+ statusRegistry,
270
+ reason,
271
+ validateCloseMode: params.options.validateClose,
272
+ force,
273
+ listed,
274
+ matched,
275
+ planRows: planCloseManyRows(matched, childrenByParent, closePlannedIds, statusRegistry, force),
276
+ };
277
+ }
278
+ function buildCloseManyDryRunResult(context) {
279
+ return {
280
+ mode: "dry_run",
281
+ matched_count: context.matched.length,
282
+ dry_run: true,
283
+ ...(context.reason !== undefined ? { reason: context.reason } : {}),
284
+ filters: context.listed.filters,
285
+ ...(context.validateCloseMode ? { validate_close: context.validateCloseMode } : {}),
286
+ item_plans: context.planRows,
287
+ ids: [],
288
+ };
289
+ }
290
+ async function resolveCloseManyCheckpointInfo(params) {
291
+ if (params.options.checkpoint === false || params.closableIds.size === 0) {
292
+ return undefined;
293
+ }
294
+ const checkpointItems = params.context.matched
295
+ .filter((item) => params.closableIds.has(item.id))
296
+ .map((item) => ({ id: item.id, target_updated_at: item.updated_at }));
297
+ return writeCloseManyCheckpoint({
298
+ pmRoot: params.context.pmRoot,
299
+ checkpointId: params.checkpointId,
300
+ nowValue: params.nowValue,
301
+ options: params.options,
302
+ reason: params.context.reason,
303
+ filters: params.context.listed.filters,
304
+ checkpointItems,
305
+ });
306
+ }
225
307
  /**
226
308
  * Implements run close many for the public runtime surface of this module.
227
309
  */
@@ -231,85 +313,44 @@ export async function runCloseMany(options, global) {
231
313
  throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
232
314
  }
233
315
  const settings = await readSettings(pmRoot);
234
- const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
235
316
  const dryRun = options.dryRun === true;
236
- const rollbackId = typeof options.rollback === "string" ? options.rollback : undefined;
317
+ const rollbackId = resolveCloseManyRollbackId(options);
237
318
  rejectBlankIdsFilter(options.list);
238
- if (rollbackId) {
239
- if (dryRun) {
240
- throw new PmCliError("--dry-run cannot be combined with --rollback", EXIT_CODE.USAGE);
241
- }
242
- if (hasCloseManyRollbackConflicts(options.list, options.status)) {
243
- throw new PmCliError("Rollback mode does not accept filter options", EXIT_CODE.USAGE);
244
- }
319
+ if (rollbackId !== undefined) {
320
+ validateCloseManyRollbackOptions(options, rollbackId);
245
321
  return runCloseManyRollback({ pmRoot, rollbackId, options, global });
246
322
  }
247
- if (!hasCloseManyFilters(options.list, options.status)) {
248
- 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);
249
- }
250
- const reason = resolveReason(options.reason, settings.governance.require_close_reason);
251
- const validateCloseMode = options.validateClose;
252
- const force = options.force === true;
253
- const listOptions = activeListOptions(options.list);
254
- const listed = await runList(options.status, listOptions, global);
255
- const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(pmRoot, settings);
256
- const depthCache = new Map();
257
- const matched = [...listed.items].sort((left, right) => {
258
- const depthDelta = hierarchyDepth(right.id, parentByChild, depthCache) - hierarchyDepth(left.id, parentByChild, depthCache);
259
- return depthDelta !== 0 ? depthDelta : left.id.localeCompare(right.id);
260
- });
261
- const closePlannedIds = new Set(matched
262
- .filter((item) => force || !isTerminalStatus(item.status, statusRegistry))
263
- .map((item) => item.id));
264
- const planRows = planCloseManyRows(matched, childrenByParent, closePlannedIds, statusRegistry, force);
323
+ const context = await buildCloseManyPlanContext({ pmRoot, settings, options, global });
265
324
  if (dryRun) {
266
- return {
267
- mode: "dry_run",
268
- matched_count: matched.length,
269
- dry_run: true,
270
- ...(reason !== undefined ? { reason } : {}),
271
- filters: listed.filters,
272
- ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),
273
- item_plans: planRows,
274
- ids: [],
275
- };
325
+ return buildCloseManyDryRunResult(context);
276
326
  }
277
- const closableIds = new Set(planRows.filter((row) => row.action === "close").map((row) => row.id));
327
+ const closableIds = new Set(context.planRows.filter((row) => row.action === "close").map((row) => row.id));
278
328
  const nowValue = nowIso();
279
329
  const checkpointId = createCheckpointId(CLOSE_MANY_CHECKPOINT_SUBDIR, nowValue);
280
- const checkpointEnabled = options.checkpoint !== false;
281
- let checkpointInfo;
282
- if (checkpointEnabled && closableIds.size > 0) {
283
- const checkpointItems = matched
284
- .filter((item) => closableIds.has(item.id))
285
- .map((item) => ({ id: item.id, target_updated_at: item.updated_at }));
286
- checkpointInfo = await writeCloseManyCheckpoint({
287
- pmRoot,
288
- checkpointId,
289
- nowValue,
290
- options,
291
- reason,
292
- filters: listed.filters,
293
- checkpointItems,
294
- });
295
- }
330
+ const checkpointInfo = await resolveCloseManyCheckpointInfo({ context, options, closableIds, checkpointId, nowValue });
296
331
  const closeOptions = {
297
332
  author: options.author,
298
333
  message: options.message ?? `close-many apply ${checkpointId}`,
299
- validateClose: validateCloseMode,
300
- force,
334
+ validateClose: context.validateCloseMode,
335
+ force: context.force,
301
336
  resolution: options.resolution,
302
337
  expectedResult: options.expectedResult,
303
338
  actualResult: options.actualResult,
304
339
  };
305
- const { rows, closedIds } = await applyCloseManyRows({ matched, closableIds, reason, closeOptions, global });
340
+ const { rows, closedIds } = await applyCloseManyRows({
341
+ matched: context.matched,
342
+ closableIds,
343
+ reason: context.reason,
344
+ closeOptions,
345
+ global,
346
+ });
306
347
  return {
307
348
  mode: "apply",
308
- matched_count: matched.length,
349
+ matched_count: context.matched.length,
309
350
  dry_run: false,
310
- ...(reason !== undefined ? { reason } : {}),
311
- filters: listed.filters,
312
- ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),
351
+ ...(context.reason !== undefined ? { reason: context.reason } : {}),
352
+ filters: context.listed.filters,
353
+ ...(context.validateCloseMode ? { validate_close: context.validateCloseMode } : {}),
313
354
  ...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),
314
355
  closed_count: rows.filter((row) => row.status === "closed").length,
315
356
  skipped_count: rows.filter((row) => row.status === "skipped").length,
@@ -328,4 +369,4 @@ export const _testOnly = {
328
369
  resolveReason,
329
370
  };
330
371
  //# sourceMappingURL=close-many.js.map
331
- //# debugId=6134e48e-82f6-57ac-8c76-23104bfee7bd
372
+ //# debugId=5c5dd261-a666-5af5-a11b-30a08d3ada7d
@@ -1 +1 @@
1
- {"version":3,"file":"close-many.js","sources":["cli/commands/close-many.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/close-many\n *\n * Implements the pm close many command surface and its agent-facing runtime behavior.\n */\nimport { 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 { hasListFilters } from \"./list-filter-shared.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\n/**\n * Documents the close many command options payload exchanged by command, SDK, and package integrations.\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\n/**\n * Documents the close many result payload exchanged by command, SDK, and package integrations.\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 return hasListFilters(list, status, { includePagination: false });\n}\n\nfunction hasCloseManyRollbackConflicts(list: ListOptions | undefined, status: string | undefined): boolean {\n return hasListFilters(list, status);\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: \"close_reason_required\",\n required: \"Provide a shared closing summary via --reason for the whole batch.\",\n why: \"governance.require_close_reason is enabled, so every close must record why the items are done.\",\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 nextSteps: [\n \"Re-run with --reason describing the shared outcome.\",\n \"To stop requiring reasons, run: pm config set governance-require-close-reason --policy disabled\",\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\nasync function runCloseManyRollback(params: {\n pmRoot: string;\n rollbackId: string;\n options: CloseManyCommandOptions;\n global: GlobalOptions;\n}): Promise<CloseManyResult> {\n const checkpoint = await loadMutationCheckpoint(\n params.pmRoot,\n CLOSE_MANY_CHECKPOINT_SUBDIR,\n params.rollbackId,\n CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n );\n const restoreMessage = params.options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;\n const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) =>\n runRestore(id, targetUpdatedAt, { author: params.options.author, message: restoreMessage, force: true }, params.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\nfunction planCloseManyRows(\n matched: ListedItem[],\n childrenByParent: Map<string, string[]>,\n closePlannedIds: Set<string>,\n statusRegistry: ReturnType<typeof resolveRuntimeStatusRegistry>,\n force: boolean,\n): CloseManyPlanRow[] {\n return 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\nasync function writeCloseManyCheckpoint(params: {\n pmRoot: string;\n checkpointId: string;\n nowValue: string;\n options: CloseManyCommandOptions;\n reason: string | undefined;\n filters: Record<string, unknown>;\n checkpointItems: MutationCheckpointItem[];\n}): Promise<CloseManyResult[\"checkpoint\"]> {\n const checkpointPath = await writeMutationCheckpoint(params.pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, params.checkpointId, {\n schema_version: CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n id: params.checkpointId,\n created_at: params.nowValue,\n author: resolveAuthor(params.options.author, \"unknown\"),\n ...(params.reason !== undefined ? { reason: params.reason } : {}),\n filters: params.filters,\n items: params.checkpointItems,\n });\n return {\n id: params.checkpointId,\n created_at: params.nowValue,\n path: checkpointPath,\n rollback_command: `pm close-many --rollback ${params.checkpointId}`,\n };\n}\n\nasync function applyCloseManyRows(params: {\n matched: ListedItem[];\n closableIds: Set<string>;\n reason: string | undefined;\n closeOptions: CloseCommandOptions;\n global: GlobalOptions;\n}): Promise<{ rows: CloseManyApplyRow[]; closedIds: string[] }> {\n const rows: CloseManyApplyRow[] = [];\n const closedIds: string[] = [];\n for (const item of params.matched) {\n if (!params.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, params.reason, params.closeOptions, params.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 return { rows, closedIds };\n}\n\n/**\n * Implements run close many for the public runtime surface of this module.\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 return runCloseManyRollback({ pmRoot, rollbackId, options, global });\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 = planCloseManyRows(matched, childrenByParent, closePlannedIds, statusRegistry, force);\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 checkpointInfo = await writeCloseManyCheckpoint({\n pmRoot,\n checkpointId,\n nowValue,\n options,\n reason,\n filters: listed.filters,\n checkpointItems,\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, closedIds } = await applyCloseManyRows({ matched, closableIds, reason, closeOptions, global });\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\nexport const _testOnly = {\n activeListOptions,\n buildActiveChildrenByParent,\n hasCloseManyFilters,\n hasCloseManyRollbackConflicts,\n hierarchyDepth,\n rejectBlankIdsFilter,\n resolveReason,\n};\n"],"names":[],"mappings":"AAA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C,CAAC,EAAE,CAAC;QACzD,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,MAAM;QAClE,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,MAAM;QACpE,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,MAAM;QAClE,IAAI;QACJ,GAAG,EAAE,SAAS;KACf,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,iBAAiB;IACjB,2BAA2B;IAC3B,mBAAmB;IACnB,6BAA6B;IAC7B,cAAc;IACd,oBAAoB;IACpB,aAAa;CACd,CAAC","debugId":"6134e48e-82f6-57ac-8c76-23104bfee7bd"}
1
+ {"version":3,"file":"close-many.js","sources":["cli/commands/close-many.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/close-many\n *\n * Implements the pm close many command surface and its agent-facing runtime behavior.\n */\nimport { 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 { hasListFilters } from \"./list-filter-shared.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\n/**\n * Documents the close many command options payload exchanged by command, SDK, and package integrations.\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\ninterface CloseManyPlanContext {\n pmRoot: string;\n settings: Awaited<ReturnType<typeof readSettings>>;\n statusRegistry: ReturnType<typeof resolveRuntimeStatusRegistry>;\n reason: string | undefined;\n validateCloseMode: string | undefined;\n force: boolean;\n listed: Awaited<ReturnType<typeof runList>>;\n matched: ListedItem[];\n planRows: CloseManyPlanRow[];\n}\n\n/**\n * Documents the close many result payload exchanged by command, SDK, and package integrations.\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 return hasListFilters(list, status, { includePagination: false });\n}\n\nfunction hasCloseManyRollbackConflicts(list: ListOptions | undefined, status: string | undefined): boolean {\n return hasListFilters(list, status);\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: \"close_reason_required\",\n required: \"Provide a shared closing summary via --reason for the whole batch.\",\n why: \"governance.require_close_reason is enabled, so every close must record why the items are done.\",\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 nextSteps: [\n \"Re-run with --reason describing the shared outcome.\",\n \"To stop requiring reasons, run: pm config set governance-require-close-reason --policy disabled\",\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\nasync function runCloseManyRollback(params: {\n pmRoot: string;\n rollbackId: string;\n options: CloseManyCommandOptions;\n global: GlobalOptions;\n}): Promise<CloseManyResult> {\n const checkpoint = await loadMutationCheckpoint(\n params.pmRoot,\n CLOSE_MANY_CHECKPOINT_SUBDIR,\n params.rollbackId,\n CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n );\n const restoreMessage = params.options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;\n const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) =>\n runRestore(id, targetUpdatedAt, { author: params.options.author, message: restoreMessage, force: true }, params.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\nfunction planCloseManyRows(\n matched: ListedItem[],\n childrenByParent: Map<string, string[]>,\n closePlannedIds: Set<string>,\n statusRegistry: ReturnType<typeof resolveRuntimeStatusRegistry>,\n force: boolean,\n): CloseManyPlanRow[] {\n return matched.map((item) => {\n const activeChildIds = (childrenByParent.get(item.id) ?? []).filter((childId) => !closePlannedIds.has(childId));\n const willSkip = !canCloseManyItem(item, statusRegistry, 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\nasync function writeCloseManyCheckpoint(params: {\n pmRoot: string;\n checkpointId: string;\n nowValue: string;\n options: CloseManyCommandOptions;\n reason: string | undefined;\n filters: Record<string, unknown>;\n checkpointItems: MutationCheckpointItem[];\n}): Promise<CloseManyResult[\"checkpoint\"]> {\n const checkpointPath = await writeMutationCheckpoint(params.pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, params.checkpointId, {\n schema_version: CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n id: params.checkpointId,\n created_at: params.nowValue,\n author: resolveAuthor(params.options.author, \"unknown\"),\n ...(params.reason !== undefined ? { reason: params.reason } : {}),\n filters: params.filters,\n items: params.checkpointItems,\n });\n return {\n id: params.checkpointId,\n created_at: params.nowValue,\n path: checkpointPath,\n rollback_command: `pm close-many --rollback ${params.checkpointId}`,\n };\n}\n\nasync function applyCloseManyRows(params: {\n matched: ListedItem[];\n closableIds: Set<string>;\n reason: string | undefined;\n closeOptions: CloseCommandOptions;\n global: GlobalOptions;\n}): Promise<{ rows: CloseManyApplyRow[]; closedIds: string[] }> {\n const rows: CloseManyApplyRow[] = [];\n const closedIds: string[] = [];\n for (const item of params.matched) {\n if (!params.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, params.reason, params.closeOptions, params.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 return { rows, closedIds };\n}\n\nfunction resolveCloseManyRollbackId(options: CloseManyCommandOptions): string | undefined {\n return typeof options.rollback === \"string\" ? options.rollback : undefined;\n}\n\nfunction validateCloseManyRollbackOptions(options: CloseManyCommandOptions, rollbackId: string): void {\n if (rollbackId.trim().length === 0) {\n throw new PmCliError(\"--rollback requires a checkpoint id\", EXIT_CODE.USAGE);\n }\n if (options.dryRun === true) {\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}\n\nfunction assertCloseManyHasFilters(options: CloseManyCommandOptions): void {\n if (hasCloseManyFilters(options.list, options.status)) {\n return;\n }\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\nfunction sortCloseManyMatchedItems(matched: ListedItem[], parentByChild: Map<string, string>): ListedItem[] {\n const depthCache = new Map<string, number>();\n return [...matched].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}\n\nfunction canCloseManyItem(\n item: ListedItem,\n statusRegistry: ReturnType<typeof resolveRuntimeStatusRegistry>,\n force: boolean,\n): boolean {\n return force || !isTerminalStatus(item.status, statusRegistry);\n}\n\nfunction resolveCloseManyPlannedIds(\n matched: ListedItem[],\n statusRegistry: ReturnType<typeof resolveRuntimeStatusRegistry>,\n force: boolean,\n): Set<string> {\n return new Set(matched.filter((item) => canCloseManyItem(item, statusRegistry, force)).map((item) => item.id));\n}\n\nasync function buildCloseManyPlanContext(params: {\n pmRoot: string;\n settings: Awaited<ReturnType<typeof readSettings>>;\n options: CloseManyCommandOptions;\n global: GlobalOptions;\n}): Promise<CloseManyPlanContext> {\n assertCloseManyHasFilters(params.options);\n const statusRegistry = resolveRuntimeStatusRegistry(params.settings.schema);\n const reason = resolveReason(params.options.reason, params.settings.governance.require_close_reason);\n const force = params.options.force === true;\n const listed = await runList(params.options.status, activeListOptions(params.options.list), params.global);\n const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(params.pmRoot, params.settings);\n const matched = sortCloseManyMatchedItems(listed.items as ListedItem[], parentByChild);\n const closePlannedIds = resolveCloseManyPlannedIds(matched, statusRegistry, force);\n return {\n pmRoot: params.pmRoot,\n settings: params.settings,\n statusRegistry,\n reason,\n validateCloseMode: params.options.validateClose,\n force,\n listed,\n matched,\n planRows: planCloseManyRows(matched, childrenByParent, closePlannedIds, statusRegistry, force),\n };\n}\n\nfunction buildCloseManyDryRunResult(context: CloseManyPlanContext): CloseManyResult {\n return {\n mode: \"dry_run\",\n matched_count: context.matched.length,\n dry_run: true,\n ...(context.reason !== undefined ? { reason: context.reason } : {}),\n filters: context.listed.filters,\n ...(context.validateCloseMode ? { validate_close: context.validateCloseMode } : {}),\n item_plans: context.planRows,\n ids: [],\n };\n}\n\nasync function resolveCloseManyCheckpointInfo(params: {\n context: CloseManyPlanContext;\n options: CloseManyCommandOptions;\n closableIds: Set<string>;\n checkpointId: string;\n nowValue: string;\n}): Promise<CloseManyResult[\"checkpoint\"]> {\n if (params.options.checkpoint === false || params.closableIds.size === 0) {\n return undefined;\n }\n const checkpointItems: MutationCheckpointItem[] = params.context.matched\n .filter((item) => params.closableIds.has(item.id))\n .map((item) => ({ id: item.id, target_updated_at: item.updated_at }));\n return writeCloseManyCheckpoint({\n pmRoot: params.context.pmRoot,\n checkpointId: params.checkpointId,\n nowValue: params.nowValue,\n options: params.options,\n reason: params.context.reason,\n filters: params.context.listed.filters,\n checkpointItems,\n });\n}\n\n/**\n * Implements run close many for the public runtime surface of this module.\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\n const dryRun = options.dryRun === true;\n const rollbackId = resolveCloseManyRollbackId(options);\n rejectBlankIdsFilter(options.list);\n\n if (rollbackId !== undefined) {\n validateCloseManyRollbackOptions(options, rollbackId);\n return runCloseManyRollback({ pmRoot, rollbackId, options, global });\n }\n\n const context = await buildCloseManyPlanContext({ pmRoot, settings, options, global });\n\n if (dryRun) {\n return buildCloseManyDryRunResult(context);\n }\n\n const closableIds = new Set(context.planRows.filter((row) => row.action === \"close\").map((row) => row.id));\n const nowValue = nowIso();\n const checkpointId = createCheckpointId(CLOSE_MANY_CHECKPOINT_SUBDIR, nowValue);\n const checkpointInfo = await resolveCloseManyCheckpointInfo({ context, options, closableIds, checkpointId, nowValue });\n\n const closeOptions: CloseCommandOptions = {\n author: options.author,\n message: options.message ?? `close-many apply ${checkpointId}`,\n validateClose: context.validateCloseMode,\n force: context.force,\n resolution: options.resolution,\n expectedResult: options.expectedResult,\n actualResult: options.actualResult,\n };\n\n const { rows, closedIds } = await applyCloseManyRows({\n matched: context.matched,\n closableIds,\n reason: context.reason,\n closeOptions,\n global,\n });\n\n return {\n mode: \"apply\",\n matched_count: context.matched.length,\n dry_run: false,\n ...(context.reason !== undefined ? { reason: context.reason } : {}),\n filters: context.listed.filters,\n ...(context.validateCloseMode ? { validate_close: context.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\nexport const _testOnly = {\n activeListOptions,\n buildActiveChildrenByParent,\n hasCloseManyFilters,\n hasCloseManyRollbackConflicts,\n hierarchyDepth,\n rejectBlankIdsFilter,\n resolveReason,\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,GAExB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAA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