@unbrained/pm-cli 2026.6.9 → 2026.6.10

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 (506) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/cli/bootstrap-args.js +4 -2
  3. package/dist/cli/bootstrap-args.js.map +1 -1
  4. package/dist/cli/commands/aggregate.d.ts +7 -0
  5. package/dist/cli/commands/aggregate.js +53 -12
  6. package/dist/cli/commands/aggregate.js.map +1 -1
  7. package/dist/cli/commands/close.d.ts +1 -0
  8. package/dist/cli/commands/close.js +106 -3
  9. package/dist/cli/commands/close.js.map +1 -1
  10. package/dist/cli/commands/completion.js +20 -7
  11. package/dist/cli/commands/completion.js.map +1 -1
  12. package/dist/cli/commands/context.d.ts +9 -0
  13. package/dist/cli/commands/context.js +149 -20
  14. package/dist/cli/commands/context.js.map +1 -1
  15. package/dist/cli/commands/create.d.ts +1 -0
  16. package/dist/cli/commands/create.js +5 -3
  17. package/dist/cli/commands/create.js.map +1 -1
  18. package/dist/cli/commands/extension.js +4 -2
  19. package/dist/cli/commands/extension.js.map +1 -1
  20. package/dist/cli/commands/health.js +44 -6
  21. package/dist/cli/commands/health.js.map +1 -1
  22. package/dist/cli/commands/history.js +6 -5
  23. package/dist/cli/commands/history.js.map +1 -1
  24. package/dist/cli/commands/linked-test-parsers.d.ts +1 -0
  25. package/dist/cli/commands/linked-test-parsers.js +289 -2
  26. package/dist/cli/commands/linked-test-parsers.js.map +1 -1
  27. package/dist/cli/commands/reindex.d.ts +1 -0
  28. package/dist/cli/commands/reindex.js +33 -4
  29. package/dist/cli/commands/reindex.js.map +1 -1
  30. package/dist/cli/commands/test.d.ts +6 -0
  31. package/dist/cli/commands/test.js +46 -5
  32. package/dist/cli/commands/test.js.map +1 -1
  33. package/dist/cli/extension-command-help.d.ts +1 -0
  34. package/dist/cli/extension-command-help.js +42 -2
  35. package/dist/cli/extension-command-help.js.map +1 -1
  36. package/dist/cli/extension-command-options.d.ts +2 -0
  37. package/dist/cli/extension-command-options.js +51 -2
  38. package/dist/cli/extension-command-options.js.map +1 -1
  39. package/dist/cli/main.js +26 -26
  40. package/dist/cli/main.js.map +1 -1
  41. package/dist/cli/register-list-query.js +3 -2
  42. package/dist/cli/register-list-query.js.map +1 -1
  43. package/dist/cli/register-mutation.js +4 -2
  44. package/dist/cli/register-mutation.js.map +1 -1
  45. package/dist/cli/register-operations.js +15 -6
  46. package/dist/cli/register-operations.js.map +1 -1
  47. package/dist/cli/registration-helpers.js +9 -2
  48. package/dist/cli/registration-helpers.js.map +1 -1
  49. package/dist/cli-bundle/chunks/activity-5QLX6DHN.js +16 -0
  50. package/dist/cli-bundle/chunks/{activity-RUJATACW.js → activity-W6TS5F2L.js} +11 -11
  51. package/dist/cli-bundle/chunks/{aggregate-IQ27NFBI.js → aggregate-NNJLKGEK.js} +64 -23
  52. package/dist/cli-bundle/chunks/aggregate-NNJLKGEK.js.map +7 -0
  53. package/dist/cli-bundle/chunks/{aggregate-TT7OCHHT.js → aggregate-UK2WJ4Z3.js} +65 -24
  54. package/dist/cli-bundle/chunks/aggregate-UK2WJ4Z3.js.map +1 -0
  55. package/dist/cli-bundle/chunks/{append-CWQZBUWV.js → append-7BS36Z2L.js} +8 -8
  56. package/dist/cli-bundle/chunks/{append-E7AJ5RTR.js → append-DHGTLUZW.js} +8 -8
  57. package/dist/cli-bundle/chunks/{chunk-FHUI7AXS.js → chunk-2MKBPWMK.js} +3 -3
  58. package/dist/cli-bundle/chunks/{chunk-42IULX44.js → chunk-344GDQTH.js} +2 -2
  59. package/dist/cli-bundle/chunks/{chunk-5MMLINZB.js → chunk-3VTWCBXL.js} +3 -3
  60. package/dist/cli-bundle/chunks/{chunk-NUGAWYEN.js → chunk-4CYHWHZU.js} +2 -2
  61. package/dist/cli-bundle/chunks/{chunk-T7NWFVOA.js → chunk-4H2NDEGJ.js} +7 -7
  62. package/dist/cli-bundle/chunks/{chunk-FKH7K6YP.js → chunk-5HH6QRH5.js} +9 -9
  63. package/dist/cli-bundle/chunks/{chunk-OPYA2HIU.js → chunk-5OMABP7I.js} +7 -7
  64. package/dist/cli-bundle/chunks/{chunk-RKCJ2JMA.js → chunk-6ADVKPVV.js} +7 -7
  65. package/dist/cli-bundle/chunks/{chunk-EFRHTZO4.js → chunk-6KQS23TX.js} +8 -8
  66. package/dist/cli-bundle/chunks/{chunk-YX5LAKFJ.js → chunk-6N46IM44.js} +2 -2
  67. package/dist/cli-bundle/chunks/{chunk-WQZCEEQN.js → chunk-6OSG3EMX.js} +157 -12
  68. package/dist/cli-bundle/chunks/chunk-6OSG3EMX.js.map +1 -0
  69. package/dist/cli-bundle/chunks/{chunk-CAXUGAAF.js → chunk-73PSHEMT.js} +8 -8
  70. package/dist/cli-bundle/chunks/{chunk-RE2JQJZJ.js → chunk-7DUVDW7C.js} +3 -3
  71. package/dist/cli-bundle/chunks/{chunk-U3Z4OCZC.js → chunk-7GYMMDDW.js} +2 -2
  72. package/dist/cli-bundle/chunks/{chunk-SAUXUI6U.js → chunk-7TW64BS5.js} +2 -2
  73. package/dist/cli-bundle/chunks/{chunk-T7B5VAKD.js → chunk-A6XVYNQJ.js} +13 -6
  74. package/dist/cli-bundle/chunks/chunk-A6XVYNQJ.js.map +7 -0
  75. package/dist/cli-bundle/chunks/{chunk-E7LOIIFP.js → chunk-ANVZCNL5.js} +3 -3
  76. package/dist/cli-bundle/chunks/{chunk-NJRZIJ4N.js → chunk-BE5G7HEL.js} +14 -8
  77. package/dist/cli-bundle/chunks/chunk-BE5G7HEL.js.map +1 -0
  78. package/dist/cli-bundle/chunks/{chunk-RLVI7KDW.js → chunk-CMEHZD6G.js} +163 -11
  79. package/dist/cli-bundle/chunks/chunk-CMEHZD6G.js.map +7 -0
  80. package/dist/cli-bundle/chunks/{chunk-D5D7VKIC.js → chunk-CTW7QAHM.js} +6 -5
  81. package/dist/cli-bundle/chunks/chunk-CTW7QAHM.js.map +1 -0
  82. package/dist/cli-bundle/chunks/{chunk-KTVXLI54.js → chunk-D6JZBUZ6.js} +7 -7
  83. package/dist/cli-bundle/chunks/{chunk-I26E6XA7.js → chunk-DEYNERFX.js} +8 -6
  84. package/dist/cli-bundle/chunks/chunk-DEYNERFX.js.map +1 -0
  85. package/dist/cli-bundle/chunks/{chunk-YI6W2DBN.js → chunk-DMDEC4QP.js} +6 -6
  86. package/dist/cli-bundle/chunks/{chunk-AM2AXVFS.js → chunk-DTRIVUTN.js} +5 -5
  87. package/dist/cli-bundle/chunks/{chunk-I4FGL3K2.js → chunk-EAQLLID6.js} +16 -6
  88. package/dist/cli-bundle/chunks/chunk-EAQLLID6.js.map +1 -0
  89. package/dist/cli-bundle/chunks/{chunk-JEGFLKSI.js → chunk-EIS32UA4.js} +2 -2
  90. package/dist/cli-bundle/chunks/chunk-F2PVV7IX.js +528 -0
  91. package/dist/cli-bundle/chunks/chunk-F2PVV7IX.js.map +7 -0
  92. package/dist/cli-bundle/chunks/{chunk-4LRVXVJK.js → chunk-GF5XIBUH.js} +70 -9
  93. package/dist/cli-bundle/chunks/chunk-GF5XIBUH.js.map +7 -0
  94. package/dist/cli-bundle/chunks/{chunk-PUSOAQCR.js → chunk-GP6SHEAI.js} +5 -5
  95. package/dist/cli-bundle/chunks/{chunk-I3UILOUU.js → chunk-GRHPU6EM.js} +2 -2
  96. package/dist/cli-bundle/chunks/{chunk-WCWIDJII.js → chunk-I2FM2SMO.js} +2 -2
  97. package/dist/cli-bundle/chunks/{chunk-ANKG2JKL.js → chunk-IEQ3N7WP.js} +12 -5
  98. package/dist/cli-bundle/chunks/chunk-IEQ3N7WP.js.map +1 -0
  99. package/dist/cli-bundle/chunks/{chunk-JN3BT7UY.js → chunk-K45NAJV2.js} +9 -9
  100. package/dist/cli-bundle/chunks/{chunk-23WNCJBA.js → chunk-K7SXBA75.js} +2 -2
  101. package/dist/cli-bundle/chunks/{chunk-FJNJEWU4.js → chunk-KHBRV5JU.js} +14 -12
  102. package/dist/cli-bundle/chunks/chunk-KHBRV5JU.js.map +1 -0
  103. package/dist/cli-bundle/chunks/{chunk-7YTWXGE3.js → chunk-KMMUDSSB.js} +112 -7
  104. package/dist/cli-bundle/chunks/chunk-KMMUDSSB.js.map +1 -0
  105. package/dist/cli-bundle/chunks/{chunk-JVMAOD54.js → chunk-KRZQGRVL.js} +14 -7
  106. package/dist/cli-bundle/chunks/chunk-KRZQGRVL.js.map +1 -0
  107. package/dist/cli-bundle/chunks/{chunk-BACSNVWE.js → chunk-LUJQJR7G.js} +71 -69
  108. package/dist/cli-bundle/chunks/{chunk-BACSNVWE.js.map → chunk-LUJQJR7G.js.map} +1 -1
  109. package/dist/cli-bundle/chunks/{chunk-P2NVFE4L.js → chunk-LYL32FT6.js} +3 -3
  110. package/dist/cli-bundle/chunks/{chunk-AVGOVJGV.js → chunk-MF6KSSMF.js} +9 -9
  111. package/dist/cli-bundle/chunks/{chunk-AVGOVJGV.js.map → chunk-MF6KSSMF.js.map} +1 -1
  112. package/dist/cli-bundle/chunks/{chunk-ZPXDD6RQ.js → chunk-O64EYNHF.js} +6 -6
  113. package/dist/cli-bundle/chunks/{chunk-C72IQIBT.js → chunk-OQGJSCZZ.js} +301 -30
  114. package/dist/cli-bundle/chunks/chunk-OQGJSCZZ.js.map +7 -0
  115. package/dist/cli-bundle/chunks/{chunk-44JP4PYY.js → chunk-OROMGSBP.js} +2 -2
  116. package/dist/cli-bundle/chunks/{chunk-LU54Z4QI.js → chunk-OSGWBWLK.js} +76 -74
  117. package/dist/cli-bundle/chunks/{chunk-LU54Z4QI.js.map → chunk-OSGWBWLK.js.map} +3 -3
  118. package/dist/cli-bundle/chunks/{chunk-OT6XAMO5.js → chunk-OVNSQHDG.js} +7 -5
  119. package/dist/cli-bundle/chunks/{chunk-OT6XAMO5.js.map → chunk-OVNSQHDG.js.map} +2 -2
  120. package/dist/cli-bundle/chunks/{chunk-PW7C262O.js → chunk-PYULT32I.js} +2 -2
  121. package/dist/cli-bundle/chunks/{chunk-NHRZSYAA.js → chunk-Q6PSD5DZ.js} +3 -3
  122. package/dist/cli-bundle/chunks/{chunk-A5342JVL.js → chunk-QGIWURY3.js} +12 -12
  123. package/dist/cli-bundle/chunks/{chunk-GPOSGWCN.js → chunk-QJ2OIEOC.js} +68 -7
  124. package/dist/cli-bundle/chunks/chunk-QJ2OIEOC.js.map +1 -0
  125. package/dist/cli-bundle/chunks/{chunk-5ATRWEZO.js → chunk-SNASEDXB.js} +3 -3
  126. package/dist/cli-bundle/chunks/{chunk-KDX6VC3P.js → chunk-T6QLB34N.js} +3 -3
  127. package/dist/cli-bundle/chunks/{chunk-6IGTNFE3.js → chunk-TALBUVWF.js} +2 -2
  128. package/dist/cli-bundle/chunks/{chunk-VDVVOLR6.js → chunk-TV6FZGVK.js} +3 -3
  129. package/dist/cli-bundle/chunks/{chunk-H37YPWLM.js → chunk-TXWMLDMG.js} +13 -7
  130. package/dist/cli-bundle/chunks/chunk-TXWMLDMG.js.map +7 -0
  131. package/dist/cli-bundle/chunks/{chunk-TLD3UYGY.js → chunk-TZLGCTA5.js} +5 -4
  132. package/dist/cli-bundle/chunks/chunk-TZLGCTA5.js.map +7 -0
  133. package/dist/cli-bundle/chunks/{chunk-7CR4GAYN.js → chunk-UDWUDUJI.js} +2 -2
  134. package/dist/cli-bundle/chunks/{chunk-YSANBZAE.js → chunk-UMWF6ZAS.js} +12 -5
  135. package/dist/cli-bundle/chunks/chunk-UMWF6ZAS.js.map +7 -0
  136. package/dist/cli-bundle/chunks/{chunk-F2REA7VW.js → chunk-UNH3KSHG.js} +3 -3
  137. package/dist/cli-bundle/chunks/{chunk-4TJWRPIH.js → chunk-UY26RIBR.js} +2 -2
  138. package/dist/cli-bundle/chunks/{chunk-MNXJ6YDO.js → chunk-VSS3CSTF.js} +9 -9
  139. package/dist/cli-bundle/chunks/{chunk-EQ6N6IDR.js → chunk-WBU257Z4.js} +13 -11
  140. package/dist/cli-bundle/chunks/chunk-WBU257Z4.js.map +7 -0
  141. package/dist/cli-bundle/chunks/{chunk-5JF76OJF.js → chunk-WNMRICXH.js} +289 -25
  142. package/dist/cli-bundle/chunks/chunk-WNMRICXH.js.map +1 -0
  143. package/dist/cli-bundle/chunks/chunk-WSWOQP3Z.js +518 -0
  144. package/dist/cli-bundle/chunks/chunk-WSWOQP3Z.js.map +1 -0
  145. package/dist/cli-bundle/chunks/{chunk-ENCVPOID.js → chunk-WWEFBBVF.js} +12 -12
  146. package/dist/cli-bundle/chunks/{chunk-XEOO6K5J.js → chunk-X3IPJU2O.js} +9 -9
  147. package/dist/cli-bundle/chunks/{chunk-RMTI5R76.js → chunk-X5YC5DZM.js} +111 -6
  148. package/dist/cli-bundle/chunks/chunk-X5YC5DZM.js.map +7 -0
  149. package/dist/cli-bundle/chunks/{chunk-3RHE76G6.js → chunk-XH6RA5A5.js} +15 -15
  150. package/dist/cli-bundle/chunks/chunk-XH6RA5A5.js.map +1 -0
  151. package/dist/cli-bundle/chunks/{chunk-LF2VNLEZ.js → chunk-XRE4CTNP.js} +8 -8
  152. package/dist/cli-bundle/chunks/{chunk-LF2VNLEZ.js.map → chunk-XRE4CTNP.js.map} +2 -2
  153. package/dist/cli-bundle/chunks/{chunk-SD6H3RLA.js → chunk-XSCGU4WT.js} +15 -5
  154. package/dist/cli-bundle/chunks/{chunk-SD6H3RLA.js.map → chunk-XSCGU4WT.js.map} +2 -2
  155. package/dist/cli-bundle/chunks/{chunk-BIRVSIM2.js → chunk-ZH7C7ZVX.js} +14 -14
  156. package/dist/cli-bundle/chunks/chunk-ZH7C7ZVX.js.map +7 -0
  157. package/dist/cli-bundle/chunks/{claim-UXFGCF3P.js → claim-3TY5LE54.js} +10 -10
  158. package/dist/cli-bundle/chunks/{claim-RV6WYUF7.js → claim-LM4YY6QQ.js} +10 -10
  159. package/dist/cli-bundle/chunks/{close-O4JK2JKD.js → close-CSD4LEMT.js} +8 -8
  160. package/dist/cli-bundle/chunks/close-SIQCDOBR.js +13 -0
  161. package/dist/cli-bundle/chunks/{close-many-EQO4TPIE.js → close-many-B5SHDX6W.js} +15 -15
  162. package/dist/cli-bundle/chunks/{close-many-SRDBV3SI.js → close-many-WRXB5KVY.js} +15 -15
  163. package/dist/cli-bundle/chunks/{comments-OMB7YE27.js → comments-A5ALOYTG.js} +10 -10
  164. package/dist/cli-bundle/chunks/{comments-TTZUIB2O.js → comments-BDDEK3VW.js} +10 -10
  165. package/dist/cli-bundle/chunks/{config-5VPR42A6.js → config-W2NHDNQT.js} +8 -8
  166. package/dist/cli-bundle/chunks/{config-NNLXVGVC.js → config-YUYBMJOW.js} +8 -8
  167. package/dist/cli-bundle/chunks/{context-4QK6GRXO.js → context-LRJ74NSU.js} +146 -33
  168. package/dist/cli-bundle/chunks/{context-4QK6GRXO.js.map → context-LRJ74NSU.js.map} +2 -2
  169. package/dist/cli-bundle/chunks/{context-4N7GYTVQ.js → context-R2QLOJCK.js} +147 -34
  170. package/dist/cli-bundle/chunks/context-R2QLOJCK.js.map +1 -0
  171. package/dist/cli-bundle/chunks/{contracts-AOBNEBVT.js → contracts-47X7RYUF.js} +4 -4
  172. package/dist/cli-bundle/chunks/{contracts-DXCWXOSP.js → contracts-HJHR4NCD.js} +4 -4
  173. package/dist/cli-bundle/chunks/{copy-XSYEQTLA.js → copy-B7HFOWFB.js} +7 -7
  174. package/dist/cli-bundle/chunks/{copy-5NM3SVJA.js → copy-P4UVYZ7M.js} +7 -7
  175. package/dist/cli-bundle/chunks/{create-FCCAATQV.js → create-5ERJF64D.js} +13 -13
  176. package/dist/cli-bundle/chunks/create-TXNRPS4K.js +27 -0
  177. package/dist/cli-bundle/chunks/{delete-5JFP6OG7.js → delete-LX3LGBCH.js} +7 -7
  178. package/dist/cli-bundle/chunks/{delete-PQXJQXQ7.js → delete-S3WVK6LP.js} +7 -7
  179. package/dist/cli-bundle/chunks/{deps-XXKBOQUA.js → deps-GWSNH7OZ.js} +7 -7
  180. package/dist/cli-bundle/chunks/{deps-S5322EOQ.js → deps-YSM4LZQD.js} +7 -7
  181. package/dist/cli-bundle/chunks/{docs-DZRPAW5S.js → docs-7RYFBHQD.js} +9 -9
  182. package/dist/cli-bundle/chunks/{docs-C7CCVWAJ.js → docs-TG6JMVMY.js} +9 -9
  183. package/dist/cli-bundle/chunks/{extension-CSHP6FZX.js → extension-R3LUKMX7.js} +5 -5
  184. package/dist/cli-bundle/chunks/{extension-XNNVUVAY.js → extension-VNMRKIHI.js} +5 -5
  185. package/dist/cli-bundle/chunks/{files-OBWYYPKM.js → files-KAKU57OT.js} +9 -9
  186. package/dist/cli-bundle/chunks/{files-UPCNKEIZ.js → files-QB3EYPMO.js} +9 -9
  187. package/dist/cli-bundle/chunks/{gc-KXK6KBRN.js → gc-B747VM4M.js} +3 -3
  188. package/dist/cli-bundle/chunks/{gc-FA2ONELT.js → gc-KNUPLPSW.js} +3 -3
  189. package/dist/cli-bundle/chunks/{get-PNTSONGB.js → get-GMGLIQ5I.js} +11 -11
  190. package/dist/cli-bundle/chunks/{get-FLHYTOBA.js → get-SBL6NHYQ.js} +11 -11
  191. package/dist/cli-bundle/chunks/{health-CS5RNTJX.js → health-IG43Z4KL.js} +47 -19
  192. package/dist/cli-bundle/chunks/health-IG43Z4KL.js.map +1 -0
  193. package/dist/cli-bundle/chunks/{health-KCRVYIYY.js → health-WWZJ5KJS.js} +46 -18
  194. package/dist/cli-bundle/chunks/health-WWZJ5KJS.js.map +7 -0
  195. package/dist/cli-bundle/chunks/history-6UKSZTRT.js +20 -0
  196. package/dist/cli-bundle/chunks/{history-COQTPBEU.js → history-XCWRXBXC.js} +10 -10
  197. package/dist/cli-bundle/chunks/{history-compact-66PSRYL3.js → history-compact-IDH7E7VN.js} +11 -11
  198. package/dist/cli-bundle/chunks/{history-compact-PVS2A3FS.js → history-compact-KICKUCR7.js} +11 -11
  199. package/dist/cli-bundle/chunks/history-redact-HKYBTK6X.js +19 -0
  200. package/dist/cli-bundle/chunks/{history-redact-DCXAWGTF.js → history-redact-JJWH3QWK.js} +11 -11
  201. package/dist/cli-bundle/chunks/{history-repair-TA3NRIFO.js → history-repair-7HWBZKXN.js} +11 -11
  202. package/dist/cli-bundle/chunks/{history-repair-SEQDFTGW.js → history-repair-N5HXKJOI.js} +11 -11
  203. package/dist/cli-bundle/chunks/init-27JLDUO2.js +17 -0
  204. package/dist/cli-bundle/chunks/{init-IQJE3EKJ.js → init-OQA3TWIS.js} +9 -9
  205. package/dist/cli-bundle/chunks/{learnings-XC6EMW5E.js → learnings-L7VQUSVI.js} +10 -10
  206. package/dist/cli-bundle/chunks/{learnings-RJPGH2ME.js → learnings-Z4GAIZQ5.js} +10 -10
  207. package/dist/cli-bundle/chunks/list-6U3CJVXS.js +19 -0
  208. package/dist/cli-bundle/chunks/{list-NJV6WBT4.js → list-W5ROBC5U.js} +10 -10
  209. package/dist/cli-bundle/chunks/{notes-2KWHADK3.js → notes-JJDOEDFK.js} +10 -10
  210. package/dist/cli-bundle/chunks/{notes-FNCDMZW2.js → notes-SDCK7BEN.js} +10 -10
  211. package/dist/cli-bundle/chunks/{plan-MQO5JTSV.js → plan-H5HYHMBB.js} +13 -13
  212. package/dist/cli-bundle/chunks/{plan-CYK2P5PD.js → plan-W2B5RYR3.js} +13 -13
  213. package/dist/cli-bundle/chunks/{register-list-query-IO3RR5K6.js → register-list-query-QGRFMDWA.js} +20 -20
  214. package/dist/cli-bundle/chunks/register-list-query-QGRFMDWA.js.map +7 -0
  215. package/dist/cli-bundle/chunks/{register-list-query-6RA24SIZ.js → register-list-query-V4S23735.js} +21 -21
  216. package/dist/cli-bundle/chunks/register-list-query-V4S23735.js.map +1 -0
  217. package/dist/cli-bundle/chunks/{register-mutation-VV2SC2KL.js → register-mutation-I57PLUHA.js} +36 -35
  218. package/dist/cli-bundle/chunks/register-mutation-I57PLUHA.js.map +1 -0
  219. package/dist/cli-bundle/chunks/{register-mutation-KVFUXCAZ.js → register-mutation-ZPZNJXSA.js} +35 -34
  220. package/dist/cli-bundle/chunks/register-mutation-ZPZNJXSA.js.map +7 -0
  221. package/dist/cli-bundle/chunks/{register-operations-DFNVRSJ5.js → register-operations-KAMLXAF5.js} +42 -37
  222. package/dist/cli-bundle/chunks/register-operations-KAMLXAF5.js.map +1 -0
  223. package/dist/cli-bundle/chunks/{register-operations-TAUUTRJ4.js → register-operations-YEN4YEZ2.js} +41 -36
  224. package/dist/cli-bundle/chunks/register-operations-YEN4YEZ2.js.map +7 -0
  225. package/dist/cli-bundle/chunks/{register-setup-GAQZZRUA.js → register-setup-BZ3TNE3G.js} +15 -15
  226. package/dist/cli-bundle/chunks/{register-setup-X2R5CFDV.js → register-setup-WLFL3OUF.js} +15 -15
  227. package/dist/cli-bundle/chunks/restore-GNI2W5CN.js +17 -0
  228. package/dist/cli-bundle/chunks/{restore-E3GZKRRK.js → restore-RGFSPG4K.js} +11 -11
  229. package/dist/cli-bundle/chunks/{schema-3CPFLDAY.js → schema-CCDU3RLC.js} +8 -8
  230. package/dist/cli-bundle/chunks/{schema-7EHBPNXM.js → schema-KZASL323.js} +8 -8
  231. package/dist/cli-bundle/chunks/{search-OBZVYJJ2.js → search-7KSOLI2E.js} +10 -10
  232. package/dist/cli-bundle/chunks/{search-2T3NCCUR.js → search-DTL7CO22.js} +10 -10
  233. package/dist/cli-bundle/chunks/{stats-ULGQACF7.js → stats-IOXQMGI6.js} +7 -7
  234. package/dist/cli-bundle/chunks/{stats-6LVK4JER.js → stats-QNV7B2CE.js} +7 -7
  235. package/dist/cli-bundle/chunks/{telemetry-6G27FLCP.js → telemetry-IV5C6JOM.js} +4 -4
  236. package/dist/cli-bundle/chunks/{telemetry-HHKRTMZA.js → telemetry-NHR5RFXT.js} +4 -4
  237. package/dist/cli-bundle/chunks/test-4Z37CXW4.js +32 -0
  238. package/dist/cli-bundle/chunks/{test-2PP4YBV6.js → test-PIL2CEEB.js} +14 -14
  239. package/dist/cli-bundle/chunks/{test-all-NETGVNM6.js → test-all-GRLYHBNP.js} +14 -14
  240. package/dist/cli-bundle/chunks/{test-all-6Z272JRI.js → test-all-MFN4MYCV.js} +14 -14
  241. package/dist/cli-bundle/chunks/{test-runs-CRPQVMMG.js → test-runs-7LRFWWCA.js} +5 -5
  242. package/dist/cli-bundle/chunks/{test-runs-M24WA6TI.js → test-runs-7WCSC3TY.js} +5 -5
  243. package/dist/cli-bundle/chunks/update-I4G34LKJ.js +21 -0
  244. package/dist/cli-bundle/chunks/update-VI5DBZ3G.js +25 -0
  245. package/dist/cli-bundle/chunks/{update-many-JSRF5EH5.js → update-many-LOTAYUTN.js} +22 -22
  246. package/dist/cli-bundle/chunks/{update-many-Y3HOL7WA.js → update-many-UYMTVF42.js} +22 -22
  247. package/dist/cli-bundle/chunks/{upgrade-ECB6GH3M.js → upgrade-LT2MLLPS.js} +5 -5
  248. package/dist/cli-bundle/chunks/{upgrade-5RTQVKKE.js → upgrade-ZZSC7CLV.js} +5 -5
  249. package/dist/cli-bundle/chunks/{validate-J6Q444SD.js → validate-3XRORNMP.js} +16 -16
  250. package/dist/cli-bundle/chunks/{validate-MCNMAXVA.js → validate-IQIQSKUX.js} +16 -16
  251. package/dist/cli-bundle/main.js +132 -44
  252. package/dist/cli-bundle/main.js.map +2 -2
  253. package/dist/core/diagnostics/remediation.js +12 -2
  254. package/dist/core/diagnostics/remediation.js.map +1 -1
  255. package/dist/core/extensions/extension-policy.d.ts +14 -1
  256. package/dist/core/extensions/extension-policy.js +38 -3
  257. package/dist/core/extensions/extension-policy.js.map +1 -1
  258. package/dist/core/extensions/extension-types.d.ts +40 -1
  259. package/dist/core/extensions/extension-types.js +28 -2
  260. package/dist/core/extensions/extension-types.js.map +1 -1
  261. package/dist/core/extensions/loader.d.ts +6 -4
  262. package/dist/core/extensions/loader.js +67 -14
  263. package/dist/core/extensions/loader.js.map +1 -1
  264. package/dist/core/history/replay.d.ts +1 -1
  265. package/dist/core/history/replay.js +13 -4
  266. package/dist/core/history/replay.js.map +1 -1
  267. package/dist/core/output/mutation-projection.d.ts +2 -0
  268. package/dist/core/output/mutation-projection.js +9 -2
  269. package/dist/core/output/mutation-projection.js.map +1 -1
  270. package/dist/core/output/output.d.ts +2 -0
  271. package/dist/core/output/output.js +7 -3
  272. package/dist/core/output/output.js.map +1 -1
  273. package/dist/core/shared/command-types.d.ts +1 -0
  274. package/dist/core/shared/command-types.js +2 -2
  275. package/dist/core/shared/command-types.js.map +1 -1
  276. package/dist/core/shared/constants.js +7 -4
  277. package/dist/core/shared/constants.js.map +1 -1
  278. package/dist/core/store/item-store.d.ts +1 -1
  279. package/dist/core/store/item-store.js +3 -3
  280. package/dist/core/store/item-store.js.map +1 -1
  281. package/dist/core/store/settings-read-cache.d.ts +15 -0
  282. package/dist/core/store/settings-read-cache.js +72 -0
  283. package/dist/core/store/settings-read-cache.js.map +1 -0
  284. package/dist/core/store/settings-validator.d.ts +4 -1
  285. package/dist/core/store/settings-validator.js +14 -2
  286. package/dist/core/store/settings-validator.js.map +1 -1
  287. package/dist/core/store/settings.js +166 -16
  288. package/dist/core/store/settings.js.map +1 -1
  289. package/dist/core/telemetry/runtime.d.ts +1 -0
  290. package/dist/core/telemetry/runtime.js +3 -3
  291. package/dist/core/telemetry/runtime.js.map +1 -1
  292. package/dist/core/test/run-selectors.d.ts +27 -0
  293. package/dist/core/test/run-selectors.js +110 -0
  294. package/dist/core/test/run-selectors.js.map +1 -0
  295. package/dist/mcp/server.js +50 -11
  296. package/dist/mcp/server.js.map +1 -1
  297. package/dist/sdk/cli-contracts/commander-mutation-options.js +3 -2
  298. package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
  299. package/dist/sdk/cli-contracts/tool-option-contracts.js +3 -2
  300. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  301. package/dist/sdk/cli-contracts/tool-parameter-tables.js +29 -2
  302. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  303. package/dist/sdk/cli-contracts.js +37 -5
  304. package/dist/sdk/cli-contracts.js.map +1 -1
  305. package/dist/sdk/index.d.ts +1 -1
  306. package/dist/sdk/index.js +2 -2
  307. package/dist/sdk/index.js.map +1 -1
  308. package/dist/sdk/runtime.d.ts +6 -0
  309. package/dist/sdk/runtime.js +51 -3
  310. package/dist/sdk/runtime.js.map +1 -1
  311. package/dist/types.d.ts +4 -1
  312. package/dist/types.js +4 -2
  313. package/dist/types.js.map +1 -1
  314. package/docs/AGENT_GUIDE.md +7 -1
  315. package/docs/ARCHITECTURE.md +7 -0
  316. package/docs/COMMANDS.md +37 -3
  317. package/docs/CONFIGURATION.md +1 -1
  318. package/docs/EXTENSIONS.md +55 -53
  319. package/docs/SDK.md +8 -2
  320. package/docs/TESTING.md +60 -0
  321. package/docs/schemas/extension-manifest.schema.json +120 -0
  322. package/package.json +2 -2
  323. package/packages/pm-beads/extensions/beads/manifest.json +10 -0
  324. package/packages/pm-calendar/extensions/calendar/manifest.json +10 -0
  325. package/packages/pm-command-kit/README.md +72 -0
  326. package/packages/pm-command-kit/extensions/command-kit/index.js +181 -0
  327. package/packages/pm-command-kit/extensions/command-kit/index.ts +176 -0
  328. package/packages/pm-command-kit/extensions/command-kit/manifest.json +22 -0
  329. package/packages/pm-command-kit/package.json +53 -0
  330. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +10 -0
  331. package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +10 -0
  332. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +10 -0
  333. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +10 -0
  334. package/packages/pm-search-advanced/extensions/search-advanced/index.js +6 -0
  335. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +6 -0
  336. package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +10 -0
  337. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +1 -0
  338. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +1 -0
  339. package/packages/pm-templates/extensions/templates/manifest.json +10 -0
  340. package/packages/pm-todos/extensions/todos/manifest.json +10 -0
  341. package/dist/cli-bundle/chunks/activity-HF3VJYKH.js +0 -16
  342. package/dist/cli-bundle/chunks/aggregate-IQ27NFBI.js.map +0 -7
  343. package/dist/cli-bundle/chunks/aggregate-TT7OCHHT.js.map +0 -1
  344. package/dist/cli-bundle/chunks/chunk-3RHE76G6.js.map +0 -1
  345. package/dist/cli-bundle/chunks/chunk-4LRVXVJK.js.map +0 -7
  346. package/dist/cli-bundle/chunks/chunk-5JF76OJF.js.map +0 -1
  347. package/dist/cli-bundle/chunks/chunk-7YTWXGE3.js.map +0 -1
  348. package/dist/cli-bundle/chunks/chunk-ANKG2JKL.js.map +0 -1
  349. package/dist/cli-bundle/chunks/chunk-BIRVSIM2.js.map +0 -7
  350. package/dist/cli-bundle/chunks/chunk-C72IQIBT.js.map +0 -7
  351. package/dist/cli-bundle/chunks/chunk-D5D7VKIC.js.map +0 -1
  352. package/dist/cli-bundle/chunks/chunk-EQ6N6IDR.js.map +0 -7
  353. package/dist/cli-bundle/chunks/chunk-FJNJEWU4.js.map +0 -1
  354. package/dist/cli-bundle/chunks/chunk-GPOSGWCN.js.map +0 -1
  355. package/dist/cli-bundle/chunks/chunk-H37YPWLM.js.map +0 -7
  356. package/dist/cli-bundle/chunks/chunk-I26E6XA7.js.map +0 -1
  357. package/dist/cli-bundle/chunks/chunk-I4FGL3K2.js.map +0 -1
  358. package/dist/cli-bundle/chunks/chunk-JVMAOD54.js.map +0 -1
  359. package/dist/cli-bundle/chunks/chunk-LU2HE272.js +0 -242
  360. package/dist/cli-bundle/chunks/chunk-LU2HE272.js.map +0 -1
  361. package/dist/cli-bundle/chunks/chunk-NJRZIJ4N.js.map +0 -1
  362. package/dist/cli-bundle/chunks/chunk-O4L7Z6LB.js +0 -252
  363. package/dist/cli-bundle/chunks/chunk-O4L7Z6LB.js.map +0 -7
  364. package/dist/cli-bundle/chunks/chunk-RLVI7KDW.js.map +0 -7
  365. package/dist/cli-bundle/chunks/chunk-RMTI5R76.js.map +0 -7
  366. package/dist/cli-bundle/chunks/chunk-T7B5VAKD.js.map +0 -7
  367. package/dist/cli-bundle/chunks/chunk-TLD3UYGY.js.map +0 -7
  368. package/dist/cli-bundle/chunks/chunk-WQZCEEQN.js.map +0 -1
  369. package/dist/cli-bundle/chunks/chunk-YSANBZAE.js.map +0 -7
  370. package/dist/cli-bundle/chunks/close-JTTGW7TS.js +0 -13
  371. package/dist/cli-bundle/chunks/context-4N7GYTVQ.js.map +0 -1
  372. package/dist/cli-bundle/chunks/create-JAPLFDGJ.js +0 -27
  373. package/dist/cli-bundle/chunks/health-CS5RNTJX.js.map +0 -1
  374. package/dist/cli-bundle/chunks/health-KCRVYIYY.js.map +0 -7
  375. package/dist/cli-bundle/chunks/history-6624XISO.js +0 -20
  376. package/dist/cli-bundle/chunks/history-redact-ZRQTI7NB.js +0 -19
  377. package/dist/cli-bundle/chunks/init-ZVE2HMKK.js +0 -17
  378. package/dist/cli-bundle/chunks/list-OO5P472O.js +0 -19
  379. package/dist/cli-bundle/chunks/register-list-query-6RA24SIZ.js.map +0 -1
  380. package/dist/cli-bundle/chunks/register-list-query-IO3RR5K6.js.map +0 -7
  381. package/dist/cli-bundle/chunks/register-mutation-KVFUXCAZ.js.map +0 -7
  382. package/dist/cli-bundle/chunks/register-mutation-VV2SC2KL.js.map +0 -1
  383. package/dist/cli-bundle/chunks/register-operations-DFNVRSJ5.js.map +0 -1
  384. package/dist/cli-bundle/chunks/register-operations-TAUUTRJ4.js.map +0 -7
  385. package/dist/cli-bundle/chunks/restore-F4ALFV4D.js +0 -17
  386. package/dist/cli-bundle/chunks/test-PPOLRIBA.js +0 -32
  387. package/dist/cli-bundle/chunks/update-MCPCPMHV.js +0 -25
  388. package/dist/cli-bundle/chunks/update-O7TBOUVQ.js +0 -21
  389. /package/dist/cli-bundle/chunks/{activity-HF3VJYKH.js.map → activity-5QLX6DHN.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{activity-RUJATACW.js.map → activity-W6TS5F2L.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{append-CWQZBUWV.js.map → append-7BS36Z2L.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{append-E7AJ5RTR.js.map → append-DHGTLUZW.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{chunk-FHUI7AXS.js.map → chunk-2MKBPWMK.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{chunk-42IULX44.js.map → chunk-344GDQTH.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{chunk-5MMLINZB.js.map → chunk-3VTWCBXL.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{chunk-NUGAWYEN.js.map → chunk-4CYHWHZU.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{chunk-T7NWFVOA.js.map → chunk-4H2NDEGJ.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{chunk-FKH7K6YP.js.map → chunk-5HH6QRH5.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{chunk-OPYA2HIU.js.map → chunk-5OMABP7I.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{chunk-RKCJ2JMA.js.map → chunk-6ADVKPVV.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{chunk-EFRHTZO4.js.map → chunk-6KQS23TX.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{chunk-YX5LAKFJ.js.map → chunk-6N46IM44.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{chunk-CAXUGAAF.js.map → chunk-73PSHEMT.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{chunk-RE2JQJZJ.js.map → chunk-7DUVDW7C.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{chunk-U3Z4OCZC.js.map → chunk-7GYMMDDW.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{chunk-SAUXUI6U.js.map → chunk-7TW64BS5.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{chunk-E7LOIIFP.js.map → chunk-ANVZCNL5.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{chunk-KTVXLI54.js.map → chunk-D6JZBUZ6.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{chunk-YI6W2DBN.js.map → chunk-DMDEC4QP.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{chunk-AM2AXVFS.js.map → chunk-DTRIVUTN.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{chunk-JEGFLKSI.js.map → chunk-EIS32UA4.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{chunk-PUSOAQCR.js.map → chunk-GP6SHEAI.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{chunk-I3UILOUU.js.map → chunk-GRHPU6EM.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{chunk-WCWIDJII.js.map → chunk-I2FM2SMO.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{chunk-JN3BT7UY.js.map → chunk-K45NAJV2.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{chunk-23WNCJBA.js.map → chunk-K7SXBA75.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{chunk-P2NVFE4L.js.map → chunk-LYL32FT6.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{chunk-ZPXDD6RQ.js.map → chunk-O64EYNHF.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{chunk-44JP4PYY.js.map → chunk-OROMGSBP.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{chunk-PW7C262O.js.map → chunk-PYULT32I.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{chunk-NHRZSYAA.js.map → chunk-Q6PSD5DZ.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{chunk-A5342JVL.js.map → chunk-QGIWURY3.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{chunk-5ATRWEZO.js.map → chunk-SNASEDXB.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{chunk-KDX6VC3P.js.map → chunk-T6QLB34N.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{chunk-6IGTNFE3.js.map → chunk-TALBUVWF.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{chunk-VDVVOLR6.js.map → chunk-TV6FZGVK.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{chunk-7CR4GAYN.js.map → chunk-UDWUDUJI.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{chunk-F2REA7VW.js.map → chunk-UNH3KSHG.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{chunk-4TJWRPIH.js.map → chunk-UY26RIBR.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{chunk-MNXJ6YDO.js.map → chunk-VSS3CSTF.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{chunk-ENCVPOID.js.map → chunk-WWEFBBVF.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{chunk-XEOO6K5J.js.map → chunk-X3IPJU2O.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{claim-UXFGCF3P.js.map → claim-3TY5LE54.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{claim-RV6WYUF7.js.map → claim-LM4YY6QQ.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{close-O4JK2JKD.js.map → close-CSD4LEMT.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{close-JTTGW7TS.js.map → close-SIQCDOBR.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{close-many-EQO4TPIE.js.map → close-many-B5SHDX6W.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{close-many-SRDBV3SI.js.map → close-many-WRXB5KVY.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{comments-OMB7YE27.js.map → comments-A5ALOYTG.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{comments-TTZUIB2O.js.map → comments-BDDEK3VW.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{config-5VPR42A6.js.map → config-W2NHDNQT.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{config-NNLXVGVC.js.map → config-YUYBMJOW.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{contracts-AOBNEBVT.js.map → contracts-47X7RYUF.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{contracts-DXCWXOSP.js.map → contracts-HJHR4NCD.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{copy-XSYEQTLA.js.map → copy-B7HFOWFB.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{copy-5NM3SVJA.js.map → copy-P4UVYZ7M.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{create-FCCAATQV.js.map → create-5ERJF64D.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{create-JAPLFDGJ.js.map → create-TXNRPS4K.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{delete-5JFP6OG7.js.map → delete-LX3LGBCH.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{delete-PQXJQXQ7.js.map → delete-S3WVK6LP.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{deps-XXKBOQUA.js.map → deps-GWSNH7OZ.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{deps-S5322EOQ.js.map → deps-YSM4LZQD.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{docs-DZRPAW5S.js.map → docs-7RYFBHQD.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{docs-C7CCVWAJ.js.map → docs-TG6JMVMY.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{extension-CSHP6FZX.js.map → extension-R3LUKMX7.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{extension-XNNVUVAY.js.map → extension-VNMRKIHI.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{files-OBWYYPKM.js.map → files-KAKU57OT.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{files-UPCNKEIZ.js.map → files-QB3EYPMO.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{gc-KXK6KBRN.js.map → gc-B747VM4M.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{gc-FA2ONELT.js.map → gc-KNUPLPSW.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{get-PNTSONGB.js.map → get-GMGLIQ5I.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{get-FLHYTOBA.js.map → get-SBL6NHYQ.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{history-6624XISO.js.map → history-6UKSZTRT.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{history-COQTPBEU.js.map → history-XCWRXBXC.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{history-compact-66PSRYL3.js.map → history-compact-IDH7E7VN.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{history-compact-PVS2A3FS.js.map → history-compact-KICKUCR7.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{history-redact-ZRQTI7NB.js.map → history-redact-HKYBTK6X.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{history-redact-DCXAWGTF.js.map → history-redact-JJWH3QWK.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{history-repair-TA3NRIFO.js.map → history-repair-7HWBZKXN.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{history-repair-SEQDFTGW.js.map → history-repair-N5HXKJOI.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{init-ZVE2HMKK.js.map → init-27JLDUO2.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{init-IQJE3EKJ.js.map → init-OQA3TWIS.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{learnings-XC6EMW5E.js.map → learnings-L7VQUSVI.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{learnings-RJPGH2ME.js.map → learnings-Z4GAIZQ5.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{list-OO5P472O.js.map → list-6U3CJVXS.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{list-NJV6WBT4.js.map → list-W5ROBC5U.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{notes-2KWHADK3.js.map → notes-JJDOEDFK.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{notes-FNCDMZW2.js.map → notes-SDCK7BEN.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{plan-MQO5JTSV.js.map → plan-H5HYHMBB.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{plan-CYK2P5PD.js.map → plan-W2B5RYR3.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{register-setup-GAQZZRUA.js.map → register-setup-BZ3TNE3G.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{register-setup-X2R5CFDV.js.map → register-setup-WLFL3OUF.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{restore-F4ALFV4D.js.map → restore-GNI2W5CN.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{restore-E3GZKRRK.js.map → restore-RGFSPG4K.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{schema-3CPFLDAY.js.map → schema-CCDU3RLC.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{schema-7EHBPNXM.js.map → schema-KZASL323.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{search-OBZVYJJ2.js.map → search-7KSOLI2E.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{search-2T3NCCUR.js.map → search-DTL7CO22.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{stats-ULGQACF7.js.map → stats-IOXQMGI6.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{stats-6LVK4JER.js.map → stats-QNV7B2CE.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{telemetry-6G27FLCP.js.map → telemetry-IV5C6JOM.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{telemetry-HHKRTMZA.js.map → telemetry-NHR5RFXT.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{test-PPOLRIBA.js.map → test-4Z37CXW4.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{test-2PP4YBV6.js.map → test-PIL2CEEB.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{test-all-NETGVNM6.js.map → test-all-GRLYHBNP.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{test-all-6Z272JRI.js.map → test-all-MFN4MYCV.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{test-runs-CRPQVMMG.js.map → test-runs-7LRFWWCA.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{test-runs-M24WA6TI.js.map → test-runs-7WCSC3TY.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{update-O7TBOUVQ.js.map → update-I4G34LKJ.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{update-MCPCPMHV.js.map → update-VI5DBZ3G.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{update-many-JSRF5EH5.js.map → update-many-LOTAYUTN.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{update-many-Y3HOL7WA.js.map → update-many-UYMTVF42.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{upgrade-ECB6GH3M.js.map → upgrade-LT2MLLPS.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{upgrade-5RTQVKKE.js.map → upgrade-ZZSC7CLV.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{validate-J6Q444SD.js.map → validate-3XRORNMP.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{validate-MCNMAXVA.js.map → validate-IQIQSKUX.js.map} +0 -0
@@ -1,5 +1,5 @@
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]="96f50581-e721-5ccd-b360-651ab15f5cca")}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]="3c2738c8-5226-561a-b6c6-e321597f6658")}catch(e){}}();
3
3
  import { pathExists } from "../../core/fs/fs-utils.js";
4
4
  import { toItemRecord } from "../../core/item/item-record.js";
5
5
  import { isTerminalStatus } from "../../core/item/status.js";
@@ -7,7 +7,7 @@ import { resolveItemTypeRegistry } from "../../core/item/type-registry.js";
7
7
  import { resolveRuntimeStatusRegistry } from "../../core/schema/runtime-schema.js";
8
8
  import { EXIT_CODE } from "../../core/shared/constants.js";
9
9
  import { PmCliError } from "../../core/shared/errors.js";
10
- import { listAllFrontMatterLight, mutateItem } from "../../core/store/item-store.js";
10
+ import { listAllFrontMatterLight, locateItem, mutateItem, readLocatedItem } from "../../core/store/item-store.js";
11
11
  import { getSettingsPath, resolvePmRoot } from "../../core/store/paths.js";
12
12
  import { readSettings } from "../../core/store/settings.js";
13
13
  function toAuthor(candidate, defaultAuthor) {
@@ -68,6 +68,77 @@ function findMissingCloseValidationFields(frontMatter) {
68
68
  }
69
69
  return missing;
70
70
  }
71
+ async function duplicateChainReferencesClosingItem(loadItemById, initialDuplicateOf, closingId) {
72
+ const visited = new Set();
73
+ let current = initialDuplicateOf;
74
+ while (typeof current === "string" && current.trim().length > 0) {
75
+ const currentId = current.trim();
76
+ if (currentId === closingId) {
77
+ return true;
78
+ }
79
+ if (visited.has(currentId)) {
80
+ return false;
81
+ }
82
+ visited.add(currentId);
83
+ current = (await loadItemById(currentId))?.duplicate_of;
84
+ }
85
+ return false;
86
+ }
87
+ function shouldApplyDuplicateFallback(value) {
88
+ return typeof value !== "string" || value.trim().length === 0;
89
+ }
90
+ async function assertDuplicateTargetExists(pmRoot, settings, duplicateOf, closingId) {
91
+ const rawTarget = duplicateOf?.trim();
92
+ if (!rawTarget) {
93
+ return undefined;
94
+ }
95
+ if (rawTarget === closingId) {
96
+ throw new PmCliError("An item cannot be closed as a duplicate of itself.", EXIT_CODE.USAGE, {
97
+ code: "duplicate_target_self",
98
+ why: "--duplicate-of must identify the canonical item that should remain open or already represent the work.",
99
+ });
100
+ }
101
+ const typeRegistry = resolveItemTypeRegistry(settings);
102
+ const itemCache = new Map();
103
+ const loadItemById = async (id) => {
104
+ if (itemCache.has(id)) {
105
+ return itemCache.get(id) ?? null;
106
+ }
107
+ const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);
108
+ if (!located) {
109
+ itemCache.set(id, null);
110
+ return null;
111
+ }
112
+ const { document } = await readLocatedItem(located, { schema: settings.schema });
113
+ itemCache.set(id, document.metadata);
114
+ return document.metadata;
115
+ };
116
+ const target = await loadItemById(rawTarget);
117
+ if (!target) {
118
+ throw new PmCliError(`Duplicate target "${rawTarget}" was not found. Create or locate the canonical item first.`, EXIT_CODE.USAGE, {
119
+ code: "duplicate_target_missing",
120
+ why: "Duplicate closure should point at a real canonical pm item so future dedupe and changelog tooling can trace the relationship.",
121
+ examples: [`pm close ${closingId} "Duplicate of ${rawTarget}" --duplicate-of ${rawTarget}`],
122
+ nextSteps: ["Run pm search/list to find the canonical item, then retry with --duplicate-of <id>."],
123
+ });
124
+ }
125
+ if (await duplicateChainReferencesClosingItem(loadItemById, target.duplicate_of, closingId)) {
126
+ throw new PmCliError(`Circular duplicate reference detected. Target "${rawTarget}" points back to "${closingId}".`, EXIT_CODE.USAGE, {
127
+ code: "duplicate_target_circular",
128
+ why: "Circular duplicate relationships create loops for dedupe and status propagation tooling.",
129
+ nextSteps: ["Choose the existing canonical item, or clear the target duplicate_of metadata before closing this item as a duplicate."],
130
+ });
131
+ }
132
+ if (typeof target.duplicate_of === "string" && target.duplicate_of.trim().length > 0) {
133
+ throw new PmCliError(`Duplicate target "${rawTarget}" is already marked as a duplicate of "${target.duplicate_of.trim()}".`, EXIT_CODE.USAGE, {
134
+ code: "duplicate_target_is_duplicate",
135
+ why: "Duplicate closure should point directly at the canonical item, not another duplicate.",
136
+ examples: [`pm close ${closingId} "Duplicate of ${target.duplicate_of.trim()}" --duplicate-of ${target.duplicate_of.trim()}`],
137
+ nextSteps: ["Use the canonical item referenced by duplicate_of as the --duplicate-of target."],
138
+ });
139
+ }
140
+ return target.id;
141
+ }
71
142
  async function findActiveChildIds(pmRoot, settings, parentId, statusRegistry) {
72
143
  const typeRegistry = resolveItemTypeRegistry(settings);
73
144
  const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);
@@ -85,6 +156,7 @@ export async function runClose(id, closeReasonText, options, global) {
85
156
  const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
86
157
  const author = toAuthor(options.author, settings.author_default);
87
158
  const closeReason = normalizeCloseReason(closeReasonText, settings.governance.require_close_reason);
159
+ const duplicateOf = await assertDuplicateTargetExists(pmRoot, settings, options.duplicateOf, id);
88
160
  const validateCloseMode = parseValidateCloseMode(options.validateClose) ?? settings.governance.close_validation_default;
89
161
  // C3 (pm-fu5d): scan for active children even under minimal governance so
90
162
  // closing a parent is never silently orphaning — off mode emits an
@@ -112,6 +184,7 @@ export async function runClose(id, closeReasonText, options, global) {
112
184
  { option: options.expectedResult, key: "expected_result" },
113
185
  { option: options.actualResult, key: "actual_result" },
114
186
  ];
187
+ const duplicateFallbackFields = [];
115
188
  for (const { option, key } of inlineCloseFields) {
116
189
  if (typeof option !== "string")
117
190
  continue;
@@ -120,6 +193,24 @@ export async function runClose(id, closeReasonText, options, global) {
120
193
  continue;
121
194
  document.metadata[key] = trimmed;
122
195
  }
196
+ if (duplicateOf !== undefined) {
197
+ document.metadata.duplicate_of = duplicateOf;
198
+ const duplicateResolution = `Duplicate of ${duplicateOf}`;
199
+ const duplicateExpectedResult = `Canonical item ${duplicateOf} tracks the work.`;
200
+ const duplicateActualResult = `Closed as duplicate of ${duplicateOf}.`;
201
+ if (shouldApplyDuplicateFallback(document.metadata.resolution)) {
202
+ document.metadata.resolution = duplicateResolution;
203
+ duplicateFallbackFields.push("resolution");
204
+ }
205
+ if (shouldApplyDuplicateFallback(document.metadata.expected_result)) {
206
+ document.metadata.expected_result = duplicateExpectedResult;
207
+ duplicateFallbackFields.push("expected_result");
208
+ }
209
+ if (shouldApplyDuplicateFallback(document.metadata.actual_result)) {
210
+ document.metadata.actual_result = duplicateActualResult;
211
+ duplicateFallbackFields.push("actual_result");
212
+ }
213
+ }
123
214
  if (validateCloseMode !== "off") {
124
215
  const missingFields = findMissingCloseValidationFields(document.metadata);
125
216
  if (missingFields.length > 0) {
@@ -155,6 +246,18 @@ export async function runClose(id, closeReasonText, options, global) {
155
246
  changedFields.push(key);
156
247
  }
157
248
  }
249
+ if (duplicateOf !== undefined) {
250
+ changedFields.push("duplicate_of");
251
+ if (duplicateFallbackFields.includes("resolution") && !changedFields.includes("resolution")) {
252
+ changedFields.push("resolution");
253
+ }
254
+ if (duplicateFallbackFields.includes("expected_result") && !changedFields.includes("expected_result")) {
255
+ changedFields.push("expected_result");
256
+ }
257
+ if (duplicateFallbackFields.includes("actual_result") && !changedFields.includes("actual_result")) {
258
+ changedFields.push("actual_result");
259
+ }
260
+ }
158
261
  if (document.metadata.assignee !== undefined) {
159
262
  delete document.metadata.assignee;
160
263
  changedFields.push("assignee");
@@ -204,4 +307,4 @@ export async function runClose(id, closeReasonText, options, global) {
204
307
  };
205
308
  }
206
309
  //# sourceMappingURL=close.js.map
207
- //# debugId=96f50581-e721-5ccd-b360-651ab15f5cca
310
+ //# debugId=3c2738c8-5226-561a-b6c6-e321597f6658
@@ -1 +1 @@
1
- {"version":3,"file":"close.js","sources":["cli/commands/close.ts"],"sourceRoot":"/","sourcesContent":["import { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } 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 { listAllFrontMatterLight, mutateItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\nexport interface CloseCommandOptions {\n author?: string;\n message?: string;\n validateClose?: string;\n force?: boolean;\n // pm-fl0c #11 (2026-05-28): allow setting the three closure validation\n // fields inline on `pm close` so agents do not have to issue a prior\n // `pm update` just to satisfy --validate-close warn|strict. These map 1:1\n // to ItemFrontMatter.{resolution,expected_result,actual_result}.\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n}\n\nexport interface CloseResult {\n item: Record<string, unknown>;\n changed_fields: string[];\n warnings: string[];\n}\n\nfunction toAuthor(candidate: string | undefined, defaultAuthor: string): string {\n const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;\n const trimmed = resolved.trim();\n return trimmed || \"unknown\";\n}\n\nfunction normalizeCloseReason(reasonText: string | undefined, required: boolean): string | undefined {\n const reason = (reasonText ?? \"\").trim();\n if (reason.length > 0) {\n return reason;\n }\n if (required) {\n throw new PmCliError(\n \"Close reason text is required because governance.require_close_reason is enabled\",\n EXIT_CODE.USAGE,\n {\n code: \"close_reason_required\",\n required: \"Provide a one-line closing summary as the positional text or via --reason.\",\n why: \"governance.require_close_reason is enabled, so every close must record why the item is done.\",\n examples: [\n 'pm close <id> \"Done: <what changed and why>\"',\n 'pm close <id> --reason \"<closing summary>\"',\n ],\n nextSteps: [\n \"Re-run the close with a closing summary.\",\n \"To stop requiring reasons, run: pm config set governance-require-close-reason --policy disabled\",\n ],\n },\n );\n }\n return undefined;\n}\n\ntype ValidateCloseMode = \"off\" | \"warn\" | \"strict\";\n\nconst CLOSE_VALIDATION_FIELDS: Array<{ key: keyof Pick<ItemFrontMatter, \"resolution\" | \"expected_result\" | \"actual_result\">; label: string }> = [\n { key: \"resolution\", label: \"resolution\" },\n { key: \"expected_result\", label: \"expected_result\" },\n { key: \"actual_result\", label: \"actual_result\" },\n];\n\nfunction parseValidateCloseMode(raw: string | undefined): ValidateCloseMode | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (normalized.length === 0 || normalized === \"warn\") {\n return \"warn\";\n }\n if (normalized === \"off\" || normalized === \"none\" || normalized === \"disabled\") {\n return \"off\";\n }\n if (normalized === \"strict\") {\n return \"strict\";\n }\n throw new PmCliError(`Invalid --validate-close mode \"${raw}\" (expected \"off\", \"warn\", or \"strict\")`, EXIT_CODE.USAGE);\n}\n\nfunction findMissingCloseValidationFields(frontMatter: ItemFrontMatter): string[] {\n const missing: string[] = [];\n for (const field of CLOSE_VALIDATION_FIELDS) {\n const rawValue = frontMatter[field.key];\n if (typeof rawValue !== \"string\" || rawValue.trim().length === 0) {\n missing.push(field.label);\n }\n }\n return missing;\n}\n\nasync function findActiveChildIds(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n parentId: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<string[]> {\n const typeRegistry = resolveItemTypeRegistry(settings);\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n return items\n .filter((item) => item.parent === parentId && !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id)\n .sort((left, right) => left.localeCompare(right));\n}\n\nexport async function runClose(\n id: string,\n closeReasonText: string | undefined,\n options: CloseCommandOptions,\n global: GlobalOptions,\n): Promise<CloseResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const author = toAuthor(options.author, settings.author_default);\n const closeReason = normalizeCloseReason(closeReasonText, settings.governance.require_close_reason);\n const validateCloseMode = parseValidateCloseMode(options.validateClose) ?? settings.governance.close_validation_default;\n // C3 (pm-fu5d): scan for active children even under minimal governance so\n // closing a parent is never silently orphaning — off mode emits an\n // informational note instead of the warn/strict validation warning.\n const activeChildIds = await findActiveChildIds(pmRoot, settings, id, statusRegistry);\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"close\",\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n if (isTerminalStatus(document.metadata.status, statusRegistry) && !options.force) {\n throw new PmCliError(`Item ${document.metadata.id} is already terminal; use --force to close again.`, EXIT_CODE.CONFLICT);\n }\n const mutationWarnings: string[] = [];\n // pm-fl0c #11: apply inline closure fields BEFORE the validation pass so\n // a single `pm close <id> \"reason\" --resolution \"...\"` call satisfies\n // strict validation without a prior pm update. Only meaningful trimmed\n // text writes; an empty/whitespace value is a no-op rather than a clear.\n const inlineCloseFields: Array<{ option: string | undefined; key: \"resolution\" | \"expected_result\" | \"actual_result\" }> = [\n { option: options.resolution, key: \"resolution\" },\n { option: options.expectedResult, key: \"expected_result\" },\n { option: options.actualResult, key: \"actual_result\" },\n ];\n for (const { option, key } of inlineCloseFields) {\n if (typeof option !== \"string\") continue;\n const trimmed = option.trim();\n if (trimmed.length === 0) continue;\n document.metadata[key] = trimmed;\n }\n if (validateCloseMode !== \"off\") {\n const missingFields = findMissingCloseValidationFields(document.metadata);\n if (missingFields.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${document.metadata.id}: missing ${missingFields.join(\", \")}. Populate fields or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n mutationWarnings.push(`close_validation_missing_fields:${document.metadata.id}:${missingFields.join(\",\")}`);\n }\n if (activeChildIds.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${document.metadata.id}: active child items remain open (${activeChildIds.join(\", \")}). Close, cancel, or re-parent them first, or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n mutationWarnings.push(`close_validation_active_children:${document.metadata.id}:${activeChildIds.join(\",\")}`);\n }\n } else if (activeChildIds.length > 0) {\n // C3: minimal governance (validate-close off) should still tell the\n // agent it just closed a parent with open children, without blocking.\n mutationWarnings.push(`closed_with_active_children:${document.metadata.id}:${activeChildIds.join(\",\")}`);\n }\n\n document.metadata.status = statusRegistry.close_status;\n const changedFields = [\"status\"];\n if (closeReason !== undefined) {\n document.metadata.close_reason = closeReason;\n changedFields.push(\"close_reason\");\n } else if (document.metadata.close_reason !== undefined) {\n delete document.metadata.close_reason;\n changedFields.push(\"close_reason\");\n }\n for (const { option, key } of inlineCloseFields) {\n if (typeof option === \"string\" && option.trim().length > 0) {\n changedFields.push(key);\n }\n }\n if (document.metadata.assignee !== undefined) {\n delete document.metadata.assignee;\n changedFields.push(\"assignee\");\n }\n\n // C4 (pm-fu5d): a terminal item is no longer blocked. Clear every active\n // blocker signal independently — scalar blocked_by, blocked_reason, and the\n // blocked_by dependency edges (kept consistent with the kyd6 invariant) —\n // even if only some are present (e.g. an orphaned edge or a stale\n // blocked_reason left by manual edits), so closed work stops surfacing in\n // blockers views, and annotate the cleanup.\n const previousBlockedBy =\n typeof document.metadata.blocked_by === \"string\" ? document.metadata.blocked_by.trim() : \"\";\n const existingDeps = document.metadata.dependencies ?? [];\n const blockedByEdge = existingDeps.find((dep) => dep.kind === \"blocked_by\");\n const hadBlockedReason = document.metadata.blocked_reason !== undefined;\n if (previousBlockedBy.length > 0 || blockedByEdge !== undefined || hadBlockedReason) {\n if (previousBlockedBy.length > 0) {\n delete document.metadata.blocked_by;\n changedFields.push(\"blocked_by\");\n }\n if (hadBlockedReason) {\n delete document.metadata.blocked_reason;\n changedFields.push(\"blocked_reason\");\n }\n if (blockedByEdge !== undefined) {\n const remainingDeps = existingDeps.filter((dep) => dep.kind !== \"blocked_by\");\n if (remainingDeps.length > 0) {\n document.metadata.dependencies = remainingDeps;\n } else {\n delete document.metadata.dependencies;\n }\n changedFields.push(\"dependencies\");\n }\n const reportedBlocker = previousBlockedBy || blockedByEdge?.id || \"unknown\";\n mutationWarnings.push(`closed_cleared_blocked_by:${document.metadata.id}:${reportedBlocker}`);\n }\n\n return {\n changedFields,\n ...(mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}),\n };\n },\n });\n\n return {\n item: toItemRecord(result.item),\n changed_fields: result.changedFields,\n warnings: result.warnings,\n };\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAA8B,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAuB5D,SAAS,QAAQ,CAAC,SAA6B,EAAE,aAAqB;IACpE,MAAM,QAAQ,GAAG,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,aAAa,CAAC;IACrE,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;IAChC,OAAO,OAAO,IAAI,SAAS,CAAC;AAC9B,CAAC;AAED,SAAS,oBAAoB,CAAC,UAA8B,EAAE,QAAiB;IAC7E,MAAM,MAAM,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACzC,IAAI,MAAM,CAAC,MAAM,GAA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,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;gBACvC,CAAC;gBACD,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;oBAChC,MAAM,aAAa,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC;oBAC9E,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBAC7B,QAAQ,CAAC,QAAQ,CAAC,YAAY,GAAG,aAAa,CAAC;oBACjD,CAAC;yBAAM,CAAC;wBACN,OAAO,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC;oBACxC,CAAC;oBACD,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;gBACrC,CAAC;gBACD,MAAM,eAAe,GAAG,iBAAiB,IAAI,aAAa,EAAE,EAAE,IAAI,SAAS,CAAC;gBAC5E,gBAAgB,CAAC,IAAI,CAAC,6BAA6B,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,eAAe,EAAE,CAAC,CAAC;YAChG,CAAC;YAED,OAAO;gBACL,aAAa;gBACb,GAAG,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACvE,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC;QAC/B,cAAc,EAAE,MAAM,CAAC,aAAa;QACpC,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC;AACJ,CAAC","debugId":"96f50581-e721-5ccd-b360-651ab15f5cca"}
1
+ {"version":3,"file":"close.js","sources":["cli/commands/close.ts"],"sourceRoot":"/","sourcesContent":["import { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } 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 { listAllFrontMatterLight, locateItem, mutateItem, readLocatedItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\nexport interface CloseCommandOptions {\n author?: string;\n message?: string;\n validateClose?: string;\n force?: boolean;\n // pm-fl0c #11 (2026-05-28): allow setting the three closure validation\n // fields inline on `pm close` so agents do not have to issue a prior\n // `pm update` just to satisfy --validate-close warn|strict. These map 1:1\n // to ItemFrontMatter.{resolution,expected_result,actual_result}.\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n duplicateOf?: string;\n}\n\nexport interface CloseResult {\n item: Record<string, unknown>;\n changed_fields: string[];\n warnings: string[];\n}\n\nfunction toAuthor(candidate: string | undefined, defaultAuthor: string): string {\n const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;\n const trimmed = resolved.trim();\n return trimmed || \"unknown\";\n}\n\nfunction normalizeCloseReason(reasonText: string | undefined, required: boolean): string | undefined {\n const reason = (reasonText ?? \"\").trim();\n if (reason.length > 0) {\n return reason;\n }\n if (required) {\n throw new PmCliError(\n \"Close reason text is required because governance.require_close_reason is enabled\",\n EXIT_CODE.USAGE,\n {\n code: \"close_reason_required\",\n required: \"Provide a one-line closing summary as the positional text or via --reason.\",\n why: \"governance.require_close_reason is enabled, so every close must record why the item is done.\",\n examples: [\n 'pm close <id> \"Done: <what changed and why>\"',\n 'pm close <id> --reason \"<closing summary>\"',\n ],\n nextSteps: [\n \"Re-run the close with a closing summary.\",\n \"To stop requiring reasons, run: pm config set governance-require-close-reason --policy disabled\",\n ],\n },\n );\n }\n return undefined;\n}\n\ntype ValidateCloseMode = \"off\" | \"warn\" | \"strict\";\n\nconst CLOSE_VALIDATION_FIELDS: Array<{ key: keyof Pick<ItemFrontMatter, \"resolution\" | \"expected_result\" | \"actual_result\">; label: string }> = [\n { key: \"resolution\", label: \"resolution\" },\n { key: \"expected_result\", label: \"expected_result\" },\n { key: \"actual_result\", label: \"actual_result\" },\n];\n\nfunction parseValidateCloseMode(raw: string | undefined): ValidateCloseMode | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (normalized.length === 0 || normalized === \"warn\") {\n return \"warn\";\n }\n if (normalized === \"off\" || normalized === \"none\" || normalized === \"disabled\") {\n return \"off\";\n }\n if (normalized === \"strict\") {\n return \"strict\";\n }\n throw new PmCliError(`Invalid --validate-close mode \"${raw}\" (expected \"off\", \"warn\", or \"strict\")`, EXIT_CODE.USAGE);\n}\n\nfunction findMissingCloseValidationFields(frontMatter: ItemFrontMatter): string[] {\n const missing: string[] = [];\n for (const field of CLOSE_VALIDATION_FIELDS) {\n const rawValue = frontMatter[field.key];\n if (typeof rawValue !== \"string\" || rawValue.trim().length === 0) {\n missing.push(field.label);\n }\n }\n return missing;\n}\n\nasync function duplicateChainReferencesClosingItem(\n loadItemById: (id: string) => Promise<ItemFrontMatter | null>,\n initialDuplicateOf: unknown,\n closingId: string,\n): Promise<boolean> {\n const visited = new Set<string>();\n let current = initialDuplicateOf;\n while (typeof current === \"string\" && current.trim().length > 0) {\n const currentId = current.trim();\n if (currentId === closingId) {\n return true;\n }\n if (visited.has(currentId)) {\n return false;\n }\n visited.add(currentId);\n current = (await loadItemById(currentId))?.duplicate_of;\n }\n return false;\n}\n\nfunction shouldApplyDuplicateFallback(value: unknown): boolean {\n return typeof value !== \"string\" || value.trim().length === 0;\n}\n\nasync function assertDuplicateTargetExists(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n duplicateOf: string | undefined,\n closingId: string,\n): Promise<string | undefined> {\n const rawTarget = duplicateOf?.trim();\n if (!rawTarget) {\n return undefined;\n }\n if (rawTarget === closingId) {\n throw new PmCliError(\"An item cannot be closed as a duplicate of itself.\", EXIT_CODE.USAGE, {\n code: \"duplicate_target_self\",\n why: \"--duplicate-of must identify the canonical item that should remain open or already represent the work.\",\n });\n }\n const typeRegistry = resolveItemTypeRegistry(settings);\n const itemCache = new Map<string, ItemFrontMatter | null>();\n const loadItemById = async (id: string): Promise<ItemFrontMatter | null> => {\n if (itemCache.has(id)) {\n return itemCache.get(id) ?? null;\n }\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n itemCache.set(id, null);\n return null;\n }\n const { document } = await readLocatedItem(located, { schema: settings.schema });\n itemCache.set(id, document.metadata);\n return document.metadata;\n };\n const target = await loadItemById(rawTarget);\n if (!target) {\n throw new PmCliError(`Duplicate target \"${rawTarget}\" was not found. Create or locate the canonical item first.`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_missing\",\n why: \"Duplicate closure should point at a real canonical pm item so future dedupe and changelog tooling can trace the relationship.\",\n examples: [`pm close ${closingId} \"Duplicate of ${rawTarget}\" --duplicate-of ${rawTarget}`],\n nextSteps: [\"Run pm search/list to find the canonical item, then retry with --duplicate-of <id>.\"],\n });\n }\n if (await duplicateChainReferencesClosingItem(loadItemById, target.duplicate_of, closingId)) {\n throw new PmCliError(`Circular duplicate reference detected. Target \"${rawTarget}\" points back to \"${closingId}\".`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_circular\",\n why: \"Circular duplicate relationships create loops for dedupe and status propagation tooling.\",\n nextSteps: [\"Choose the existing canonical item, or clear the target duplicate_of metadata before closing this item as a duplicate.\"],\n });\n }\n if (typeof target.duplicate_of === \"string\" && target.duplicate_of.trim().length > 0) {\n throw new PmCliError(`Duplicate target \"${rawTarget}\" is already marked as a duplicate of \"${target.duplicate_of.trim()}\".`, EXIT_CODE.USAGE, {\n code: \"duplicate_target_is_duplicate\",\n why: \"Duplicate closure should point directly at the canonical item, not another duplicate.\",\n examples: [`pm close ${closingId} \"Duplicate of ${target.duplicate_of.trim()}\" --duplicate-of ${target.duplicate_of.trim()}`],\n nextSteps: [\"Use the canonical item referenced by duplicate_of as the --duplicate-of target.\"],\n });\n }\n return target.id;\n}\n\nasync function findActiveChildIds(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n parentId: string,\n statusRegistry: RuntimeStatusRegistry,\n): Promise<string[]> {\n const typeRegistry = resolveItemTypeRegistry(settings);\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n return items\n .filter((item) => item.parent === parentId && !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id)\n .sort((left, right) => left.localeCompare(right));\n}\n\nexport async function runClose(\n id: string,\n closeReasonText: string | undefined,\n options: CloseCommandOptions,\n global: GlobalOptions,\n): Promise<CloseResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const author = toAuthor(options.author, settings.author_default);\n const closeReason = normalizeCloseReason(closeReasonText, settings.governance.require_close_reason);\n const duplicateOf = await assertDuplicateTargetExists(pmRoot, settings, options.duplicateOf, id);\n const validateCloseMode = parseValidateCloseMode(options.validateClose) ?? settings.governance.close_validation_default;\n // C3 (pm-fu5d): scan for active children even under minimal governance so\n // closing a parent is never silently orphaning — off mode emits an\n // informational note instead of the warn/strict validation warning.\n const activeChildIds = await findActiveChildIds(pmRoot, settings, id, statusRegistry);\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"close\",\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n if (isTerminalStatus(document.metadata.status, statusRegistry) && !options.force) {\n throw new PmCliError(`Item ${document.metadata.id} is already terminal; use --force to close again.`, EXIT_CODE.CONFLICT);\n }\n const mutationWarnings: string[] = [];\n // pm-fl0c #11: apply inline closure fields BEFORE the validation pass so\n // a single `pm close <id> \"reason\" --resolution \"...\"` call satisfies\n // strict validation without a prior pm update. Only meaningful trimmed\n // text writes; an empty/whitespace value is a no-op rather than a clear.\n const inlineCloseFields: Array<{ option: string | undefined; key: \"resolution\" | \"expected_result\" | \"actual_result\" }> = [\n { option: options.resolution, key: \"resolution\" },\n { option: options.expectedResult, key: \"expected_result\" },\n { option: options.actualResult, key: \"actual_result\" },\n ];\n const duplicateFallbackFields: Array<\"resolution\" | \"expected_result\" | \"actual_result\"> = [];\n for (const { option, key } of inlineCloseFields) {\n if (typeof option !== \"string\") continue;\n const trimmed = option.trim();\n if (trimmed.length === 0) continue;\n document.metadata[key] = trimmed;\n }\n if (duplicateOf !== undefined) {\n document.metadata.duplicate_of = duplicateOf;\n const duplicateResolution = `Duplicate of ${duplicateOf}`;\n const duplicateExpectedResult = `Canonical item ${duplicateOf} tracks the work.`;\n const duplicateActualResult = `Closed as duplicate of ${duplicateOf}.`;\n if (shouldApplyDuplicateFallback(document.metadata.resolution)) {\n document.metadata.resolution = duplicateResolution;\n duplicateFallbackFields.push(\"resolution\");\n }\n if (shouldApplyDuplicateFallback(document.metadata.expected_result)) {\n document.metadata.expected_result = duplicateExpectedResult;\n duplicateFallbackFields.push(\"expected_result\");\n }\n if (shouldApplyDuplicateFallback(document.metadata.actual_result)) {\n document.metadata.actual_result = duplicateActualResult;\n duplicateFallbackFields.push(\"actual_result\");\n }\n }\n if (validateCloseMode !== \"off\") {\n const missingFields = findMissingCloseValidationFields(document.metadata);\n if (missingFields.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${document.metadata.id}: missing ${missingFields.join(\", \")}. Populate fields or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n mutationWarnings.push(`close_validation_missing_fields:${document.metadata.id}:${missingFields.join(\",\")}`);\n }\n if (activeChildIds.length > 0) {\n if (validateCloseMode === \"strict\") {\n throw new PmCliError(\n `Cannot close item ${document.metadata.id}: active child items remain open (${activeChildIds.join(\", \")}). Close, cancel, or re-parent them first, or use --validate-close warn.`,\n EXIT_CODE.USAGE,\n );\n }\n mutationWarnings.push(`close_validation_active_children:${document.metadata.id}:${activeChildIds.join(\",\")}`);\n }\n } else if (activeChildIds.length > 0) {\n // C3: minimal governance (validate-close off) should still tell the\n // agent it just closed a parent with open children, without blocking.\n mutationWarnings.push(`closed_with_active_children:${document.metadata.id}:${activeChildIds.join(\",\")}`);\n }\n\n document.metadata.status = statusRegistry.close_status;\n const changedFields = [\"status\"];\n if (closeReason !== undefined) {\n document.metadata.close_reason = closeReason;\n changedFields.push(\"close_reason\");\n } else if (document.metadata.close_reason !== undefined) {\n delete document.metadata.close_reason;\n changedFields.push(\"close_reason\");\n }\n for (const { option, key } of inlineCloseFields) {\n if (typeof option === \"string\" && option.trim().length > 0) {\n changedFields.push(key);\n }\n }\n if (duplicateOf !== undefined) {\n changedFields.push(\"duplicate_of\");\n if (duplicateFallbackFields.includes(\"resolution\") && !changedFields.includes(\"resolution\")) {\n changedFields.push(\"resolution\");\n }\n if (duplicateFallbackFields.includes(\"expected_result\") && !changedFields.includes(\"expected_result\")) {\n changedFields.push(\"expected_result\");\n }\n if (duplicateFallbackFields.includes(\"actual_result\") && !changedFields.includes(\"actual_result\")) {\n changedFields.push(\"actual_result\");\n }\n }\n if (document.metadata.assignee !== undefined) {\n delete document.metadata.assignee;\n changedFields.push(\"assignee\");\n }\n\n // C4 (pm-fu5d): a terminal item is no longer blocked. Clear every active\n // blocker signal independently — scalar blocked_by, blocked_reason, and the\n // blocked_by dependency edges (kept consistent with the kyd6 invariant) —\n // even if only some are present (e.g. an orphaned edge or a stale\n // blocked_reason left by manual edits), so closed work stops surfacing in\n // blockers views, and annotate the cleanup.\n const previousBlockedBy =\n typeof document.metadata.blocked_by === \"string\" ? document.metadata.blocked_by.trim() : \"\";\n const existingDeps = document.metadata.dependencies ?? [];\n const blockedByEdge = existingDeps.find((dep) => dep.kind === \"blocked_by\");\n const hadBlockedReason = document.metadata.blocked_reason !== undefined;\n if (previousBlockedBy.length > 0 || blockedByEdge !== undefined || hadBlockedReason) {\n if (previousBlockedBy.length > 0) {\n delete document.metadata.blocked_by;\n changedFields.push(\"blocked_by\");\n }\n if (hadBlockedReason) {\n delete document.metadata.blocked_reason;\n changedFields.push(\"blocked_reason\");\n }\n if (blockedByEdge !== undefined) {\n const remainingDeps = existingDeps.filter((dep) => dep.kind !== \"blocked_by\");\n if (remainingDeps.length > 0) {\n document.metadata.dependencies = remainingDeps;\n } else {\n delete document.metadata.dependencies;\n }\n changedFields.push(\"dependencies\");\n }\n const reportedBlocker = previousBlockedBy || blockedByEdge?.id || \"unknown\";\n mutationWarnings.push(`closed_cleared_blocked_by:${document.metadata.id}:${reportedBlocker}`);\n }\n\n return {\n changedFields,\n ...(mutationWarnings.length > 0 ? { warnings: mutationWarnings } : {}),\n };\n },\n });\n\n return {\n item: toItemRecord(result.item),\n changed_fields: result.changedFields,\n warnings: result.warnings,\n };\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAA8B,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,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AChG,CAAC;YAED,OAAO;gBACL,aAAa;gBACb,GAAG,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACvE,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC;QAC/B,cAAc,EAAE,MAAM,CAAC,aAAa;QACpC,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC;AACJ,CAAC","debugId":"3c2738c8-5226-561a-b6c6-e321597f6658"}
@@ -1,5 +1,5 @@
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]="809a8e14-8f15-5207-851e-a06cf5d89308")}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]="bfb4fb54-cf3d-5b6d-860d-f4f653e21b8e")}catch(e){}}();
3
3
  import { EXIT_CODE } from "../../core/shared/constants.js";
4
4
  import { PmCliError } from "../../core/shared/errors.js";
5
5
  import { AGGREGATE_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NORMALIZE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, PM_CORE_COMMAND_NAMES, SEARCH_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, toCompletionFlagString, } from "../../sdk/cli-contracts.js";
@@ -33,10 +33,10 @@ const PLAN_SUBCOMMANDS_LIST = "create show add-step update-step complete-step bl
33
33
  const COMPLETION_FLAGS = toCompletionFlagString(COMPLETION_FLAG_CONTRACTS);
34
34
  const COMPLETION_SHELL_CHOICES = `${COMPLETION_FLAGS} bash zsh fish`;
35
35
  const GUIDE_TOPIC_CHOICES = joinCompletionValues(listGuideTopicIds());
36
- const MUTATION_FLAGS = "--author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help";
37
- const DELETE_MUTATION_FLAGS = "--dry-run --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help";
38
- const CLOSE_MUTATION_FLAGS = "--author --message --validate-close --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help";
39
- const RELEASE_MUTATION_FLAGS = "--allow-audit-release --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help";
36
+ const MUTATION_FLAGS = "--author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
37
+ const DELETE_MUTATION_FLAGS = "--dry-run --author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
38
+ const CLOSE_MUTATION_FLAGS = "--author --message --validate-close --duplicate-of --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
39
+ const RELEASE_MUTATION_FLAGS = "--allow-audit-release --author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
40
40
  const GLOBAL_FLAGS = GLOBAL_FLAG_CONTRACTS.flatMap((entry) => [entry.short, entry.flag, ...(entry.aliases ?? [])])
41
41
  .filter((value) => Boolean(value))
42
42
  .join(" ");
@@ -320,7 +320,7 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
320
320
  ` COMPREPLY=(${compgen(DEPS_FLAGS)})`,
321
321
  " ;;",
322
322
  " test)",
323
- ` COMPREPLY=(${compgen("--add --remove --run --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
323
+ ` COMPREPLY=(${compgen("--add --add-json --remove --list --run --match --only-index --only-last --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
324
324
  " ;;",
325
325
  " test-all)",
326
326
  ` COMPREPLY=(${compgen("--status --limit --offset --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
@@ -562,6 +562,7 @@ ${zshListRuntimeFieldFlags} '--json[Output JSON]' \\
562
562
  _arguments \\
563
563
  '--group-by[Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)]:fields' \\
564
564
  '--count[Return grouped counts]' \\
565
+ '--completion[Add open/in_progress/closed/other counts and completion percentage]' \\
565
566
  '--sum[Numeric field to sum per group]:field' \\
566
567
  '--avg[Numeric field to average per group]:field' \\
567
568
  '--include-unparented[Include unparented rows when grouping by parent]' \\
@@ -1088,8 +1089,13 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
1088
1089
  test)
1089
1090
  _arguments \\
1090
1091
  '--add[Add linked test entry]:entry' \\
1092
+ '--add-json[Add linked test entry from JSON object/array]:json' \\
1091
1093
  '--remove[Remove linked test entry by command/path]:entry' \\
1094
+ '--list[List linked tests without mutating]' \\
1092
1095
  '--run[Run linked tests]' \\
1096
+ '--match[Run linked tests whose command/path contains substring]:substring' \\
1097
+ '--only-index[Run one linked test by 1-based index]:number' \\
1098
+ '--only-last[Run the most recently added linked test]' \\
1093
1099
  '--background[Run linked tests in managed background mode]' \\
1094
1100
  '--timeout[Default timeout seconds]:seconds' \\
1095
1101
  '--progress[Emit linked-test progress to stderr]' \\
@@ -1397,6 +1403,7 @@ complete -c pm -f
1397
1403
  complete -c pm -l json -d 'Output JSON instead of TOON'
1398
1404
  complete -c pm -l quiet -d 'Suppress stdout output'
1399
1405
  complete -c pm -l no-changed-fields -d 'Omit changed_fields array from mutation output'
1406
+ complete -c pm -l id-only -d 'Print only id and status for single-item mutation output'
1400
1407
  complete -c pm -l pm-path -d 'Explicit tracker storage path for this command' -r
1401
1408
  complete -c pm -l path -d 'Override PM path for this command' -r
1402
1409
  complete -c pm -l no-extensions -d 'Disable extension loading'
@@ -1506,6 +1513,7 @@ ${fishListRuntimeFieldFlags}
1506
1513
  # aggregate flags
1507
1514
  complete -c pm -n '__fish_seen_subcommand_from aggregate' -l group-by -d 'Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)' -r
1508
1515
  complete -c pm -n '__fish_seen_subcommand_from aggregate' -l count -d 'Return grouped counts'
1516
+ complete -c pm -n '__fish_seen_subcommand_from aggregate' -l completion -d 'Add completion counts and percentage per group'
1509
1517
  complete -c pm -n '__fish_seen_subcommand_from aggregate' -l sum -d 'Numeric field to sum per group' -r
1510
1518
  complete -c pm -n '__fish_seen_subcommand_from aggregate' -l avg -d 'Numeric field to average per group' -r
1511
1519
  complete -c pm -n '__fish_seen_subcommand_from aggregate' -l include-unparented -d 'Include unparented rows when grouping by parent'
@@ -1881,8 +1889,13 @@ complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l forc
1881
1889
 
1882
1890
  # test flags
1883
1891
  complete -c pm -n '__fish_seen_subcommand_from test' -l add -d 'Add linked test entry' -r
1892
+ complete -c pm -n '__fish_seen_subcommand_from test' -l add-json -d 'Add linked test entry from JSON object/array' -r
1884
1893
  complete -c pm -n '__fish_seen_subcommand_from test' -l remove -d 'Remove linked test entry' -r
1894
+ complete -c pm -n '__fish_seen_subcommand_from test' -l list -d 'List linked tests without mutating'
1885
1895
  complete -c pm -n '__fish_seen_subcommand_from test' -l run -d 'Run linked tests'
1896
+ complete -c pm -n '__fish_seen_subcommand_from test' -l match -d 'Run linked tests whose command/path contains substring' -r
1897
+ complete -c pm -n '__fish_seen_subcommand_from test' -l only-index -d 'Run one linked test by 1-based index' -r
1898
+ complete -c pm -n '__fish_seen_subcommand_from test' -l only-last -d 'Run the most recently added linked test'
1886
1899
  complete -c pm -n '__fish_seen_subcommand_from test' -l background -d 'Run linked tests in managed background mode'
1887
1900
  complete -c pm -n '__fish_seen_subcommand_from test' -l timeout -d 'Default timeout seconds' -r
1888
1901
  complete -c pm -n '__fish_seen_subcommand_from test' -l progress -d 'Emit linked-test progress to stderr'
@@ -2104,4 +2117,4 @@ export function runCompletion(shell, itemTypes = [], tags = [], eagerTagExpansio
2104
2117
  };
2105
2118
  }
2106
2119
  //# sourceMappingURL=completion.js.map
2107
- //# debugId=809a8e14-8f15-5207-851e-a06cf5d89308
2120
+ //# debugId=bfb4fb54-cf3d-5b6d-860d-f4f653e21b8e