@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
@@ -4,7 +4,7 @@ import {
4
4
  normalizeItemTypeDefinition,
5
5
  normalizeItemTypeStringList,
6
6
  strictPolicyCommand
7
- } from "./chunk-C72IQIBT.js";
7
+ } from "./chunk-OQGJSCZZ.js";
8
8
 
9
9
  // dist/core/item/type-registry.js
10
10
  !(function() {
@@ -653,4 +653,4 @@ export {
653
653
  resolveCommandOptionPolicyState,
654
654
  validateTypeOptions
655
655
  };
656
- //# sourceMappingURL=chunk-U3Z4OCZC.js.map
656
+ //# sourceMappingURL=chunk-7GYMMDDW.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EXIT_CODE,
3
3
  PmCliError
4
- } from "./chunk-C72IQIBT.js";
4
+ } from "./chunk-OQGJSCZZ.js";
5
5
 
6
6
  // dist/core/shared/time.js
7
7
  !(function() {
@@ -204,4 +204,4 @@ export {
204
204
  compareTimestampStrings,
205
205
  resolveIsoOrRelative
206
206
  };
207
- //# sourceMappingURL=chunk-SAUXUI6U.js.map
207
+ //# sourceMappingURL=chunk-7TW64BS5.js.map
@@ -10,15 +10,15 @@ import {
10
10
  readFirstStringFromCommanderOptions,
11
11
  readFirstValueFromCommanderOptions,
12
12
  readStringArrayFromCommanderOptions
13
- } from "./chunk-4LRVXVJK.js";
13
+ } from "./chunk-GF5XIBUH.js";
14
14
  import {
15
15
  refreshSearchArtifactsForMutation,
16
16
  shouldRunSearchRefreshInForeground
17
- } from "./chunk-LU54Z4QI.js";
17
+ } from "./chunk-OSGWBWLK.js";
18
18
  import {
19
19
  printError,
20
20
  writeStdout
21
- } from "./chunk-YSANBZAE.js";
21
+ } from "./chunk-UMWF6ZAS.js";
22
22
  import {
23
23
  EXIT_CODE,
24
24
  PmCliError,
@@ -27,13 +27,13 @@ import {
27
27
  readSettings,
28
28
  resolvePmRoot,
29
29
  setActiveCommandResult
30
- } from "./chunk-C72IQIBT.js";
30
+ } from "./chunk-OQGJSCZZ.js";
31
31
 
32
32
  // dist/cli/registration-helpers.js
33
33
  !(function() {
34
34
  try {
35
35
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
36
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "07d4dd96-94e5-5e35-a0b3-72be5db56164");
36
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "3208cc81-672c-52e2-a566-d45f8689bd2c");
37
37
  } catch (e2) {
38
38
  }
39
39
  })();
@@ -58,6 +58,7 @@ function getGlobalOptions(command) {
58
58
  json: opts.json === true ? true : void 0,
59
59
  quiet: Boolean(opts.quiet),
60
60
  noChangedFields: opts.changedFields === false,
61
+ idOnly: opts.idOnly === true,
61
62
  path: typeof opts.pmPath === "string" ? opts.pmPath : typeof opts.path === "string" ? opts.path : void 0,
62
63
  noExtensions: opts.extensions === false,
63
64
  noPager: Boolean(opts.noPager),
@@ -125,7 +126,11 @@ function pushRepeatableValueFlag(args, flag, values) {
125
126
  function buildBackgroundTestCommandArgs(id, options) {
126
127
  const args = ["test", id, "--run", "--json", "--progress"];
127
128
  pushRepeatableValueFlag(args, "--add", options.add);
129
+ pushRepeatableValueFlag(args, "--add-json", options.addJson);
128
130
  pushRepeatableValueFlag(args, "--remove", options.remove);
131
+ pushOptionalValueFlag(args, "--match", options.match);
132
+ pushOptionalValueFlag(args, "--only-index", options.onlyIndex);
133
+ pushOptionalBooleanFlag(args, "--only-last", options.onlyLast);
129
134
  pushOptionalValueFlag(args, "--timeout", options.timeout);
130
135
  pushRepeatableValueFlag(args, "--env-set", options.envSet);
131
136
  pushRepeatableValueFlag(args, "--env-clear", options.envClear);
@@ -206,6 +211,7 @@ function normalizeCreateOptions(commandOptions, options = {}) {
206
211
  message: readCreateString("message"),
207
212
  assignee: readCreateString("assignee"),
208
213
  parent: readCreateString("parent"),
214
+ allowMissingParent: commandOptions.allowMissingParent === true,
209
215
  reviewer: readCreateString("reviewer"),
210
216
  risk: readCreateString("risk"),
211
217
  confidence: readCreateString("confidence"),
@@ -446,6 +452,7 @@ function normalizeAggregateOptions(options) {
446
452
  return {
447
453
  groupBy: typeof options.groupBy === "string" ? options.groupBy : void 0,
448
454
  count: options.count === true ? true : void 0,
455
+ completion: options.completion === true ? true : void 0,
449
456
  sum: typeof options.sum === "string" ? options.sum : void 0,
450
457
  avg: typeof options.avg === "string" ? options.avg : void 0,
451
458
  includeUnparented: options.includeUnparented === true || options.include_unparented === true,
@@ -717,4 +724,4 @@ export {
717
724
  normalizeContextOptions,
718
725
  invalidateSearchCachesForMutation
719
726
  };
720
- //# sourceMappingURL=chunk-T7B5VAKD.js.map
727
+ //# sourceMappingURL=chunk-A6XVYNQJ.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../cli/registration-helpers.ts"],
4
+ "sourcesContent": ["import type { Command } from \"commander\";\nimport { pathExists } from \"../core/fs/fs-utils.js\";\nimport { normalizeStatusInput } from \"../core/item/status.js\";\nimport { refreshSearchArtifactsForMutation } from \"../core/search/cache.js\";\nimport { shouldRunSearchRefreshInForeground } from \"../core/search/background-refresh.js\";\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { printError, printResult, writeStdout } from \"../core/output/output.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../core/store/paths.js\";\nimport { readSettings } from \"../core/store/settings.js\";\nimport {\n setActiveCommandResult,\n} from \"../core/extensions/index.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport type { ItemStatus } from \"../types/index.js\";\nimport {\n ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,\n CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n CREATE_COMMANDER_STRING_OPTION_CONTRACTS,\n LIST_COMMANDER_STRING_OPTION_CONTRACTS,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,\n UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,\n readFirstValueFromCommanderOptions,\n readFirstStringFromCommanderOptions,\n readStringArrayFromCommanderOptions,\n} from \"../sdk/cli-contracts.js\";\nimport type {\n ContextOptions,\n CreateCommandOptions,\n AggregateOptions,\n ListOptions,\n} from \"./commands/index.js\";\nimport type { runList, runActivity } from \"./commands/index.js\";\n\nexport {\n printError,\n printResult,\n writeStdout,\n};\n\nconst RESOLVED_GLOBAL_OPTIONS = Symbol(\"pm.resolvedGlobalOptions\");\n\ntype CommandWithResolvedGlobals = Command & {\n [RESOLVED_GLOBAL_OPTIONS]?: GlobalOptions;\n};\n\ninterface CommandOptionsReader {\n optsWithGlobals?: () => Record<string, unknown>;\n opts?: () => Record<string, unknown>;\n}\n\nfunction commandOptionsReader(command: unknown): CommandOptionsReader {\n return typeof command === \"object\" && command !== null ? command as CommandOptionsReader : {};\n}\n\nexport function setResolvedGlobalOptions(command: Command, globalOptions: GlobalOptions): void {\n (command as CommandWithResolvedGlobals)[RESOLVED_GLOBAL_OPTIONS] = { ...globalOptions };\n}\n\nexport function clearResolvedGlobalOptions(command: Command): void {\n delete (command as CommandWithResolvedGlobals)[RESOLVED_GLOBAL_OPTIONS];\n}\n\nexport function getGlobalOptions(command: Command): GlobalOptions {\n const resolved = (command as CommandWithResolvedGlobals)[RESOLVED_GLOBAL_OPTIONS];\n if (resolved) {\n return { ...resolved };\n }\n const reader = commandOptionsReader(command);\n const opts = typeof reader.optsWithGlobals === \"function\"\n ? reader.optsWithGlobals()\n : typeof reader.opts === \"function\"\n ? reader.opts()\n : {};\n return {\n json: opts.json === true ? true : undefined,\n quiet: Boolean(opts.quiet),\n noChangedFields: opts.changedFields === false,\n idOnly: opts.idOnly === true,\n path: typeof opts.pmPath === \"string\"\n ? opts.pmPath\n : typeof opts.path === \"string\"\n ? opts.path\n : undefined,\n noExtensions: opts.extensions === false,\n noPager: Boolean(opts.noPager),\n profile: Boolean(opts.profile),\n };\n}\n\nexport function getCommandPath(command: Command): string {\n const parts: string[] = [];\n let current: Command | null = command;\n while (current?.parent) {\n parts.unshift(current.name());\n current = current.parent;\n }\n return parts.join(\" \");\n}\n\nexport async function applyDefaultOutputFormat(globalOptions: GlobalOptions): Promise<GlobalOptions> {\n if (globalOptions.json === true) {\n return globalOptions;\n }\n const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n return globalOptions;\n }\n const settings = await readSettings(pmRoot);\n return {\n ...globalOptions,\n defaultOutputFormat: settings.output.default_format,\n };\n}\n\nexport function collect(value: string, previous: string[] | undefined): string[] {\n const next = previous ?? [];\n next.push(value);\n return next;\n}\n\nfunction pushOptionalValueFlag(args: string[], flag: string, value: unknown): void {\n if (typeof value !== \"string\") {\n return;\n }\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n return;\n }\n args.push(flag, trimmed);\n}\n\nfunction pushOptionalBooleanFlag(args: string[], flag: string, value: unknown): void {\n if (value === true) {\n args.push(flag);\n }\n}\n\nfunction pushRepeatableValueFlag(args: string[], flag: string, values: unknown): void {\n if (!Array.isArray(values)) {\n return;\n }\n for (const value of values) {\n if (typeof value !== \"string\") {\n continue;\n }\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n continue;\n }\n args.push(flag, trimmed);\n }\n}\n\nexport function buildBackgroundTestCommandArgs(id: string, options: Record<string, unknown>): string[] {\n const args: string[] = [\"test\", id, \"--run\", \"--json\", \"--progress\"];\n pushRepeatableValueFlag(args, \"--add\", options.add);\n pushRepeatableValueFlag(args, \"--add-json\", options.addJson);\n pushRepeatableValueFlag(args, \"--remove\", options.remove);\n pushOptionalValueFlag(args, \"--match\", options.match);\n pushOptionalValueFlag(args, \"--only-index\", options.onlyIndex);\n pushOptionalBooleanFlag(args, \"--only-last\", options.onlyLast);\n pushOptionalValueFlag(args, \"--timeout\", options.timeout);\n pushRepeatableValueFlag(args, \"--env-set\", options.envSet);\n pushRepeatableValueFlag(args, \"--env-clear\", options.envClear);\n pushOptionalBooleanFlag(args, \"--shared-host-safe\", options.sharedHostSafe);\n pushOptionalValueFlag(args, \"--pm-context\", options.pmContext);\n pushOptionalBooleanFlag(args, \"--override-linked-pm-context\", options.overrideLinkedPmContext);\n pushOptionalBooleanFlag(args, \"--fail-on-context-mismatch\", options.failOnContextMismatch);\n pushOptionalBooleanFlag(args, \"--fail-on-skipped\", options.failOnSkipped);\n pushOptionalBooleanFlag(args, \"--fail-on-empty-test-run\", options.failOnEmptyTestRun);\n pushOptionalBooleanFlag(args, \"--require-assertions-for-pm\", options.requireAssertionsForPm);\n pushOptionalBooleanFlag(args, \"--check-context\", options.checkContext);\n pushOptionalBooleanFlag(args, \"--auto-pm-context\", options.autoPmContext);\n pushOptionalValueFlag(args, \"--author\", options.author);\n pushOptionalValueFlag(args, \"--message\", options.message);\n pushOptionalBooleanFlag(args, \"--force\", options.force);\n return args;\n}\n\nexport function buildBackgroundTestAllCommandArgs(options: Record<string, unknown>): string[] {\n const args: string[] = [\"test-all\", \"--json\", \"--progress\"];\n pushOptionalValueFlag(args, \"--status\", options.status);\n pushOptionalValueFlag(args, \"--limit\", options.limit);\n pushOptionalValueFlag(args, \"--offset\", options.offset);\n pushOptionalValueFlag(args, \"--timeout\", options.timeout);\n pushRepeatableValueFlag(args, \"--env-set\", options.envSet);\n pushRepeatableValueFlag(args, \"--env-clear\", options.envClear);\n pushOptionalBooleanFlag(args, \"--shared-host-safe\", options.sharedHostSafe);\n pushOptionalValueFlag(args, \"--pm-context\", options.pmContext);\n pushOptionalBooleanFlag(args, \"--override-linked-pm-context\", options.overrideLinkedPmContext);\n pushOptionalBooleanFlag(args, \"--fail-on-context-mismatch\", options.failOnContextMismatch);\n pushOptionalBooleanFlag(args, \"--fail-on-skipped\", options.failOnSkipped);\n pushOptionalBooleanFlag(args, \"--fail-on-empty-test-run\", options.failOnEmptyTestRun);\n pushOptionalBooleanFlag(args, \"--require-assertions-for-pm\", options.requireAssertionsForPm);\n pushOptionalBooleanFlag(args, \"--check-context\", options.checkContext);\n pushOptionalBooleanFlag(args, \"--auto-pm-context\", options.autoPmContext);\n return args;\n}\n\nexport function formatHookWarnings(warnings: string[]): string {\n return warnings.join(\",\");\n}\n\nexport function normalizeCreateOptions(\n commandOptions: Record<string, unknown>,\n options: { requireType?: boolean } = {},\n): CreateCommandOptions {\n const readCreateString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n commandOptions,\n CREATE_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n const readCreateList = (target: string): string[] | undefined =>\n readStringArrayFromCommanderOptions(\n commandOptions,\n CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n\n const type = readCreateString(\"type\");\n if (options.requireType !== false && type === undefined) {\n throw new PmCliError(\n \"Missing required option --type <value>. Why required: create resolves runtime schema fields/workflow from item type. Retry: add --type <built-in or configured custom type> (example: --type Task).\",\n EXIT_CODE.USAGE,\n );\n }\n\n const normalized: Record<string, unknown> = {\n title: readCreateString(\"title\"),\n description: readCreateString(\"description\"),\n type,\n template: readCreateString(\"template\"),\n createMode: readCreateString(\"createMode\"),\n schedulePreset: readCreateString(\"schedulePreset\"),\n status: readCreateString(\"status\"),\n priority: readCreateString(\"priority\"),\n tags: readCreateString(\"tags\"),\n addTags: readCreateList(\"addTags\"),\n body: readCreateString(\"body\"),\n deadline: readCreateString(\"deadline\"),\n estimatedMinutes: readCreateString(\"estimatedMinutes\"),\n acceptanceCriteria: readCreateString(\"acceptanceCriteria\"),\n definitionOfReady: readCreateString(\"definitionOfReady\"),\n order: readCreateString(\"order\"),\n rank: readCreateString(\"rank\"),\n goal: readCreateString(\"goal\"),\n objective: readCreateString(\"objective\"),\n value: readCreateString(\"value\"),\n impact: readCreateString(\"impact\"),\n outcome: readCreateString(\"outcome\"),\n whyNow: readCreateString(\"whyNow\"),\n author: readCreateString(\"author\"),\n message: readCreateString(\"message\"),\n assignee: readCreateString(\"assignee\"),\n parent: readCreateString(\"parent\"),\n allowMissingParent: commandOptions.allowMissingParent === true,\n reviewer: readCreateString(\"reviewer\"),\n risk: readCreateString(\"risk\"),\n confidence: readCreateString(\"confidence\"),\n sprint: readCreateString(\"sprint\"),\n release: readCreateString(\"release\"),\n blockedBy: readCreateString(\"blockedBy\"),\n blockedReason: readCreateString(\"blockedReason\"),\n unblockNote: readCreateString(\"unblockNote\"),\n reporter: readCreateString(\"reporter\"),\n severity: readCreateString(\"severity\"),\n environment: readCreateString(\"environment\"),\n reproSteps: readCreateString(\"reproSteps\"),\n resolution: readCreateString(\"resolution\"),\n expectedResult: readCreateString(\"expectedResult\"),\n actualResult: readCreateString(\"actualResult\"),\n affectedVersion: readCreateString(\"affectedVersion\"),\n fixedVersion: readCreateString(\"fixedVersion\"),\n component: readCreateString(\"component\"),\n regression: readCreateString(\"regression\"),\n customerImpact: readCreateString(\"customerImpact\"),\n dep: readCreateList(\"dep\"),\n comment: readCreateList(\"comment\"),\n note: readCreateList(\"note\"),\n learning: readCreateList(\"learning\"),\n file: readCreateList(\"file\"),\n test: readCreateList(\"test\"),\n doc: readCreateList(\"doc\"),\n reminder: readCreateList(\"reminder\"),\n event: readCreateList(\"event\"),\n typeOption: readCreateList(\"typeOption\"),\n field: readCreateList(\"field\"),\n unset: readCreateList(\"unset\"),\n clearDeps: commandOptions.clearDeps === true ? true : undefined,\n clearComments: commandOptions.clearComments === true ? true : undefined,\n clearNotes: commandOptions.clearNotes === true ? true : undefined,\n clearLearnings: commandOptions.clearLearnings === true ? true : undefined,\n clearFiles: commandOptions.clearFiles === true ? true : undefined,\n clearTests: commandOptions.clearTests === true ? true : undefined,\n clearDocs: commandOptions.clearDocs === true ? true : undefined,\n clearReminders: commandOptions.clearReminders === true ? true : undefined,\n clearEvents: commandOptions.clearEvents === true ? true : undefined,\n clearTypeOptions: commandOptions.clearTypeOptions === true ? true : undefined,\n };\n for (const [key, value] of Object.entries(commandOptions)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized as CreateCommandOptions;\n}\n\nexport function normalizeUpdateOptions(commandOptions: Record<string, unknown>): Record<string, unknown> {\n const readUpdateString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n commandOptions,\n UPDATE_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n const readUpdateList = (target: string): string[] | undefined =>\n readStringArrayFromCommanderOptions(\n commandOptions,\n UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n\n const normalized: Record<string, unknown> = {\n title: readUpdateString(\"title\"),\n description: readUpdateString(\"description\"),\n body: readUpdateString(\"body\"),\n status: readUpdateString(\"status\"),\n closeReason: readUpdateString(\"closeReason\"),\n priority: readUpdateString(\"priority\"),\n type: readUpdateString(\"type\"),\n tags: readUpdateString(\"tags\"),\n addTags: readUpdateList(\"addTags\"),\n removeTags: readUpdateList(\"removeTags\"),\n deadline: readUpdateString(\"deadline\"),\n estimatedMinutes: readUpdateString(\"estimatedMinutes\"),\n acceptanceCriteria: readUpdateString(\"acceptanceCriteria\"),\n definitionOfReady: readUpdateString(\"definitionOfReady\"),\n order: readUpdateString(\"order\"),\n rank: readUpdateString(\"rank\"),\n goal: readUpdateString(\"goal\"),\n objective: readUpdateString(\"objective\"),\n value: readUpdateString(\"value\"),\n impact: readUpdateString(\"impact\"),\n outcome: readUpdateString(\"outcome\"),\n whyNow: readUpdateString(\"whyNow\"),\n author: readUpdateString(\"author\"),\n message: readUpdateString(\"message\"),\n force: Boolean(commandOptions.force),\n allowAuditUpdate:\n commandOptions.allowAuditUpdate === true || commandOptions.allow_audit_update === true ? true : undefined,\n allowAuditDepUpdate:\n commandOptions.allowAuditDepUpdate === true || commandOptions.allow_audit_dep_update === true ? true : undefined,\n assignee: readUpdateString(\"assignee\"),\n parent: readUpdateString(\"parent\"),\n reviewer: readUpdateString(\"reviewer\"),\n risk: readUpdateString(\"risk\"),\n confidence: readUpdateString(\"confidence\"),\n sprint: readUpdateString(\"sprint\"),\n release: readUpdateString(\"release\"),\n blockedBy: readUpdateString(\"blockedBy\"),\n blockedReason: readUpdateString(\"blockedReason\"),\n unblockNote: readUpdateString(\"unblockNote\"),\n reporter: readUpdateString(\"reporter\"),\n severity: readUpdateString(\"severity\"),\n environment: readUpdateString(\"environment\"),\n reproSteps: readUpdateString(\"reproSteps\"),\n resolution: readUpdateString(\"resolution\"),\n expectedResult: readUpdateString(\"expectedResult\"),\n actualResult: readUpdateString(\"actualResult\"),\n affectedVersion: readUpdateString(\"affectedVersion\"),\n fixedVersion: readUpdateString(\"fixedVersion\"),\n component: readUpdateString(\"component\"),\n regression: readUpdateString(\"regression\"),\n customerImpact: readUpdateString(\"customerImpact\"),\n dep: readUpdateList(\"dep\"),\n depRemove: readUpdateList(\"depRemove\"),\n replaceDeps: commandOptions.replaceDeps === true ? true : undefined,\n replaceTests: commandOptions.replaceTests === true ? true : undefined,\n comment: readUpdateList(\"comment\"),\n note: readUpdateList(\"note\"),\n learning: readUpdateList(\"learning\"),\n file: readUpdateList(\"file\"),\n test: readUpdateList(\"test\"),\n doc: readUpdateList(\"doc\"),\n reminder: readUpdateList(\"reminder\"),\n event: readUpdateList(\"event\"),\n typeOption: readUpdateList(\"typeOption\"),\n field: readUpdateList(\"field\"),\n unset: readUpdateList(\"unset\"),\n clearDeps: commandOptions.clearDeps === true ? true : undefined,\n clearComments: commandOptions.clearComments === true ? true : undefined,\n clearNotes: commandOptions.clearNotes === true ? true : undefined,\n clearLearnings: commandOptions.clearLearnings === true ? true : undefined,\n clearFiles: commandOptions.clearFiles === true ? true : undefined,\n clearTests: commandOptions.clearTests === true ? true : undefined,\n clearDocs: commandOptions.clearDocs === true ? true : undefined,\n clearReminders: commandOptions.clearReminders === true ? true : undefined,\n clearEvents: commandOptions.clearEvents === true ? true : undefined,\n clearTypeOptions: commandOptions.clearTypeOptions === true ? true : undefined,\n };\n for (const [key, value] of Object.entries(commandOptions)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized;\n}\n\nconst UPDATE_MANY_CONTROL_OPTION_KEYS = new Set<string>([\n \"filterStatus\",\n \"filterType\",\n \"filterTag\",\n \"filterPriority\",\n \"filterDeadlineBefore\",\n \"filterDeadlineAfter\",\n \"filterUpdatedAfter\",\n \"filterUpdatedBefore\",\n \"filterCreatedAfter\",\n \"filterCreatedBefore\",\n \"filterAssignee\",\n \"filterAssigneeFilter\",\n \"filterAssignee_filter\",\n \"filterParent\",\n \"filterSprint\",\n \"filterRelease\",\n \"ids\",\n \"limit\",\n \"offset\",\n \"dryRun\",\n \"rollback\",\n \"checkpoint\",\n]);\n\nexport function extractUpdateManyMutationOptionSource(commandOptions: Record<string, unknown>): Record<string, unknown> {\n const mutationOptions: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(commandOptions)) {\n if (UPDATE_MANY_CONTROL_OPTION_KEYS.has(key)) {\n continue;\n }\n mutationOptions[key] = value;\n }\n return mutationOptions;\n}\n\nfunction readListOptionString(options: Record<string, unknown>, target: string): string | undefined {\n const contract = LIST_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n };\n const stringValue = readFirstStringFromCommanderOptions(options, contract);\n if (stringValue !== undefined) {\n return stringValue;\n }\n for (const key of contract.keys) {\n const value = options[key];\n if (target === \"ids\" && typeof value === \"string\") {\n return value;\n }\n if (typeof value === \"number\" && Number.isFinite(value)) {\n return String(value);\n }\n }\n return undefined;\n}\n\nexport function normalizeListOptions(options: Record<string, unknown>): ListOptions {\n const normalized: Record<string, unknown> = {\n status: readListOptionString(options, \"status\"),\n type: readListOptionString(options, \"type\"),\n tag: readListOptionString(options, \"tag\"),\n priority: readListOptionString(options, \"priority\"),\n deadlineBefore: readListOptionString(options, \"deadlineBefore\"),\n deadlineAfter: readListOptionString(options, \"deadlineAfter\"),\n updatedAfter: readListOptionString(options, \"updatedAfter\"),\n updatedBefore: readListOptionString(options, \"updatedBefore\"),\n createdAfter: readListOptionString(options, \"createdAfter\"),\n createdBefore: readListOptionString(options, \"createdBefore\"),\n ids: readListOptionString(options, \"ids\"),\n assignee: readListOptionString(options, \"assignee\"),\n assigneeFilter: readListOptionString(options, \"assigneeFilter\"),\n parent: readListOptionString(options, \"parent\"),\n sprint: readListOptionString(options, \"sprint\"),\n release: readListOptionString(options, \"release\"),\n limit: readListOptionString(options, \"limit\"),\n offset: readListOptionString(options, \"offset\"),\n includeBody: options.includeBody === true ? true : undefined,\n compact: options.compact === true ? true : undefined,\n brief: options.brief === true ? true : undefined,\n full: options.full === true ? true : undefined,\n fields: readListOptionString(options, \"fields\"),\n sort: readListOptionString(options, \"sort\"),\n order: readListOptionString(options, \"order\"),\n tree: options.tree === true ? true : undefined,\n treeDepth: readListOptionString(options, \"treeDepth\"),\n };\n for (const [key, value] of Object.entries(options)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized as ListOptions;\n}\n\nexport function normalizeAggregateOptions(options: Record<string, unknown>): AggregateOptions {\n return {\n groupBy: typeof options.groupBy === \"string\" ? options.groupBy : undefined,\n count: options.count === true ? true : undefined,\n completion: options.completion === true ? true : undefined,\n sum: typeof options.sum === \"string\" ? options.sum : undefined,\n avg: typeof options.avg === \"string\" ? options.avg : undefined,\n includeUnparented: options.includeUnparented === true || options.include_unparented === true,\n status: typeof options.status === \"string\" ? options.status : undefined,\n type: readListOptionString(options, \"type\"),\n tag: readListOptionString(options, \"tag\"),\n priority: readListOptionString(options, \"priority\"),\n deadlineBefore: readListOptionString(options, \"deadlineBefore\"),\n deadlineAfter: readListOptionString(options, \"deadlineAfter\"),\n assignee: readListOptionString(options, \"assignee\"),\n assigneeFilter: readListOptionString(options, \"assigneeFilter\"),\n parent: readListOptionString(options, \"parent\"),\n sprint: readListOptionString(options, \"sprint\"),\n release: readListOptionString(options, \"release\"),\n };\n}\n\ntype ListCommandResult = Awaited<ReturnType<typeof runList>>;\n\nexport function printListJsonStream(commandName: string, result: ListCommandResult, globalOptions: GlobalOptions): void {\n setActiveCommandResult(result);\n if (globalOptions.quiet) {\n return;\n }\n const warnings = Array.isArray(result.warnings) ? result.warnings : [];\n const metaPayload: Record<string, unknown> = {\n type: \"meta\",\n command: commandName,\n count: result.count,\n now: result.now,\n filters: result.filters,\n };\n if (warnings.length > 0) {\n metaPayload.warnings = warnings;\n }\n if (!writeStdout(`${JSON.stringify(metaPayload)}\\n`)) {\n return;\n }\n for (const item of result.items) {\n if (!writeStdout(`${JSON.stringify({ type: \"item\", command: commandName, item })}\\n`)) {\n return;\n }\n }\n writeStdout(`${JSON.stringify({ type: \"end\", command: commandName, count: result.count })}\\n`);\n}\n\ntype ActivityCommandResult = Awaited<ReturnType<typeof runActivity>>;\n\nexport function printActivityJsonStream(\n result: ActivityCommandResult,\n options: {\n id?: string;\n op?: string;\n author?: string;\n from?: string;\n to?: string;\n limit?: string;\n },\n globalOptions: GlobalOptions,\n): void {\n setActiveCommandResult(result);\n if (globalOptions.quiet) {\n return;\n }\n const metaPayload = {\n type: \"meta\",\n command: \"activity\",\n count: result.count,\n filters: {\n id: options.id ?? null,\n op: options.op ?? null,\n author: options.author ?? null,\n from: options.from ?? null,\n to: options.to ?? null,\n limit: options.limit ?? null,\n },\n };\n if (!writeStdout(`${JSON.stringify(metaPayload)}\\n`)) {\n return;\n }\n const entries = result.compact && result.compact_activity ? result.compact_activity : result.activity;\n for (const entry of entries) {\n if (!writeStdout(`${JSON.stringify({ type: \"entry\", command: \"activity\", entry })}\\n`)) {\n return;\n }\n }\n writeStdout(`${JSON.stringify({ type: \"end\", command: \"activity\", count: result.count })}\\n`);\n}\n\nexport function normalizeSearchOptions(options: Record<string, unknown>): Record<string, unknown> {\n const readSearchString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n options,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n const readSearchStringOrNumber = (target: string): string | number | undefined => {\n const candidate = readFirstValueFromCommanderOptions(\n options,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n if (typeof candidate === \"string\") {\n return candidate;\n }\n if (typeof candidate === \"number\" && Number.isFinite(candidate)) {\n return candidate;\n }\n return undefined;\n };\n const fields = readSearchString(\"fields\");\n const compactRequested = options.compact === true;\n const fullRequested = options.full === true;\n const defaultCompact = !compactRequested && !fullRequested && fields === undefined;\n const mode = options.semantic === true ? \"semantic\"\n : options.hybrid === true ? \"hybrid\"\n : readSearchString(\"mode\");\n const normalized: Record<string, unknown> = {\n mode,\n semanticWeight: readSearchStringOrNumber(\"semanticWeight\"),\n includeLinked: options.includeLinked === true ? true : undefined,\n titleExact: options.titleExact === true ? true : undefined,\n phraseExact: options.phraseExact === true ? true : undefined,\n status: readSearchString(\"status\"),\n type: readSearchString(\"type\"),\n tag: readSearchString(\"tag\"),\n priority: readSearchString(\"priority\"),\n deadlineBefore: readSearchString(\"deadlineBefore\"),\n deadlineAfter: readSearchString(\"deadlineAfter\"),\n limit: readSearchString(\"limit\"),\n fields,\n compact: compactRequested || defaultCompact ? true : undefined,\n full: fullRequested ? true : undefined,\n };\n for (const [key, value] of Object.entries(options)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized;\n}\n\nexport function normalizeSearchKeywordsInput(keywords: string[]): string {\n const query = keywords\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0)\n .join(\" \");\n if (query.length === 0) {\n throw new PmCliError(\"Search query must not be empty\", EXIT_CODE.USAGE);\n }\n return query;\n}\n\n\nexport function normalizeActivityOptions(options: Record<string, unknown>): {\n id?: string;\n op?: string;\n author?: string;\n from?: string;\n to?: string;\n limit?: string;\n compact?: boolean;\n} {\n const readActivityString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n options,\n ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n return {\n id: readActivityString(\"id\"),\n op: readActivityString(\"op\"),\n author: readActivityString(\"author\"),\n from: readActivityString(\"from\"),\n to: readActivityString(\"to\"),\n limit: readActivityString(\"limit\"),\n compact: options.full === true ? false : options.compact === false ? false : true,\n };\n}\n\nexport function resolveActivityStreamMode(raw: unknown): boolean {\n if (raw === true) {\n return true;\n }\n if (raw === false || raw === undefined || raw === null) {\n return false;\n }\n if (typeof raw === \"string\") {\n const normalized = raw.trim().toLowerCase();\n if (\n normalized.length === 0 ||\n normalized === \"rows\" ||\n normalized === \"ndjson\" ||\n normalized === \"jsonl\" ||\n normalized === \"true\" ||\n normalized === \"1\" ||\n normalized === \"yes\" ||\n normalized === \"on\"\n ) {\n return true;\n }\n if (normalized === \"false\" || normalized === \"off\" || normalized === \"none\" || normalized === \"0\") {\n return false;\n }\n }\n throw new PmCliError(\"Activity --stream accepts rows|ndjson|jsonl (or no value)\", EXIT_CODE.USAGE);\n}\n\nexport function normalizeContextOptions(options: Record<string, unknown>): ContextOptions {\n const readContextString = (target: string): string | undefined =>\n readFirstStringFromCommanderOptions(\n options,\n CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS.find((entry) => entry.target === target) ?? {\n target,\n keys: [target],\n },\n );\n const sectionRaw = options.section;\n const section: string[] | undefined = Array.isArray(sectionRaw)\n ? (sectionRaw as string[]).filter((v) => typeof v === \"string\" && v.trim().length > 0)\n : typeof sectionRaw === \"string\" && sectionRaw.trim().length > 0\n ? [sectionRaw]\n : undefined;\n const normalized: Record<string, unknown> = {\n date: readContextString(\"date\"),\n from: readContextString(\"from\"),\n to: readContextString(\"to\"),\n past: options.past === true ? true : undefined,\n type: readContextString(\"type\"),\n tag: readContextString(\"tag\"),\n priority: readContextString(\"priority\"),\n assignee: readContextString(\"assignee\"),\n assigneeFilter: readContextString(\"assigneeFilter\"),\n sprint: readContextString(\"sprint\"),\n release: readContextString(\"release\"),\n limit: readContextString(\"limit\"),\n format: readContextString(\"format\"),\n depth: readContextString(\"depth\"),\n section: section && section.length > 0 ? section : undefined,\n activityLimit: readContextString(\"activityLimit\"),\n staleThreshold: readContextString(\"staleThreshold\"),\n };\n for (const [key, value] of Object.entries(options)) {\n if (Object.hasOwn(normalized, key)) {\n continue;\n }\n normalized[key] = value;\n }\n return normalized as ContextOptions;\n}\n\nfunction collectMutationItemIds(result: unknown): string[] {\n if (!result || typeof result !== \"object\") {\n return [];\n }\n const record = result as Record<string, unknown>;\n const ids = new Set<string>();\n const pushId = (value: unknown): void => {\n if (typeof value !== \"string\") {\n return;\n }\n const normalized = value.trim();\n if (normalized.length === 0) {\n return;\n }\n ids.add(normalized);\n };\n\n pushId(record.id);\n\n const item = record.item;\n if (item && typeof item === \"object\") {\n pushId((item as { id?: unknown }).id);\n }\n\n const explicitIds = record.ids;\n if (Array.isArray(explicitIds)) {\n for (const candidate of explicitIds) {\n pushId(candidate);\n }\n }\n\n const items = record.items;\n if (Array.isArray(items)) {\n for (const candidate of items) {\n if (!candidate || typeof candidate !== \"object\") {\n continue;\n }\n pushId((candidate as { id?: unknown }).id);\n }\n }\n\n return [...ids].sort((left, right) => left.localeCompare(right));\n}\n\nexport async function invalidateSearchCachesForMutation(globalOptions: GlobalOptions, result?: unknown): Promise<void> {\n const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);\n const refreshResult = await refreshSearchArtifactsForMutation(pmRoot, collectMutationItemIds(result), {\n background: !shouldRunSearchRefreshInForeground(),\n });\n if (globalOptions.profile && refreshResult.warnings.length > 0) {\n printError(`profile:search_refresh_warnings=${formatHookWarnings(refreshResult.warnings)}`);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,IAAM,0BAA0B,uBAAO,0BAA0B;AAWjE,SAAS,qBAAqB,SAAgB;AAC5C,SAAO,OAAO,YAAY,YAAY,YAAY,OAAO,UAAkC,CAAA;AAC7F;AAEM,SAAU,yBAAyB,SAAkB,eAA4B;AACpF,UAAuC,uBAAuB,IAAI,EAAE,GAAG,cAAa;AACvF;AAEM,SAAU,2BAA2B,SAAgB;AACzD,SAAQ,QAAuC,uBAAuB;AACxE;AAEM,SAAU,iBAAiB,SAAgB;AAC/C,QAAM,WAAY,QAAuC,uBAAuB;AAChF,M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GAAG;AAC9D,eAAW,mCAAmC,mBAAmB,cAAc,QAAQ,CAAC,EAAE;EAC5F;AACF;",
6
+ "names": []
7
+ }
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  parseItemDocument,
5
5
  serializeItemDocument
6
- } from "./chunk-5ATRWEZO.js";
6
+ } from "./chunk-SNASEDXB.js";
7
7
  import {
8
8
  TYPE_TO_FOLDER,
9
9
  getItemFormatFromPath,
@@ -12,7 +12,7 @@ import {
12
12
  removeFileIfExists,
13
13
  runActiveOnWriteHooks,
14
14
  writeFileAtomic
15
- } from "./chunk-5JF76OJF.js";
15
+ } from "./chunk-WNMRICXH.js";
16
16
 
17
17
  // dist/core/store/item-format-migration.js
18
18
  import fs from "node:fs/promises";
@@ -114,6 +114,6 @@ async function migrateItemFilesToFormat(pmRoot, targetFormat, op = "item_format:
114
114
  export {
115
115
  migrateItemFilesToFormat
116
116
  };
117
- //# sourceMappingURL=chunk-E7LOIIFP.js.map
117
+ //# sourceMappingURL=chunk-ANVZCNL5.js.map
118
118
 
119
119
  //# debugId=f42179ee-4e3f-5e27-b63f-e0c34565a666
@@ -1,18 +1,18 @@
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]="823be5f8-bbd7-52a9-9c1f-d5fdbfd726c2")}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]="eaf45328-2532-5e1c-9570-442b894b03d3")}catch(e){}}();
3
3
  import {
4
4
  hashDocument,
5
5
  toItemRecord
6
- } from "./chunk-AVGOVJGV.js";
6
+ } from "./chunk-MF6KSSMF.js";
7
7
  import {
8
8
  canonicalDocument
9
- } from "./chunk-5ATRWEZO.js";
9
+ } from "./chunk-SNASEDXB.js";
10
10
  import {
11
11
  FRONT_MATTER_KEY_ORDER,
12
12
  orderObject,
13
13
  sha256Hex,
14
14
  stableStringify
15
- } from "./chunk-5JF76OJF.js";
15
+ } from "./chunk-WNMRICXH.js";
16
16
 
17
17
  // dist/core/history/replay.js
18
18
  import jsonPatch from "fast-json-patch";
@@ -61,11 +61,17 @@ function normalizeReplayPatchPath(path) {
61
61
  }
62
62
  return path;
63
63
  }
64
+ function isHistoryPatchOp(value) {
65
+ return typeof value === "object" && value !== null && typeof value.op === "string" && typeof value.path === "string";
66
+ }
64
67
  function normalizeReplayPatchOps(patch) {
65
- return patch.map((operation) => ({
68
+ if (!Array.isArray(patch)) {
69
+ return [];
70
+ }
71
+ return patch.filter(isHistoryPatchOp).map((operation) => ({
66
72
  ...operation,
67
73
  path: normalizeReplayPatchPath(operation.path),
68
- from: operation.from ? normalizeReplayPatchPath(operation.from) : void 0
74
+ from: typeof operation.from === "string" ? normalizeReplayPatchPath(operation.from) : void 0
69
75
  }));
70
76
  }
71
77
  function isReplayDocumentShape(value) {
@@ -226,6 +232,6 @@ export {
226
232
  reanchorHistoryEntries,
227
233
  historyEntriesToRaw
228
234
  };
229
- //# sourceMappingURL=chunk-NJRZIJ4N.js.map
235
+ //# sourceMappingURL=chunk-BE5G7HEL.js.map
230
236
 
231
- //# debugId=823be5f8-bbd7-52a9-9c1f-d5fdbfd726c2
237
+ //# debugId=eaf45328-2532-5e1c-9570-442b894b03d3
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../core/history/replay.ts"],"sourcesContent":["import jsonPatch from \"fast-json-patch\";\nimport { FRONT_MATTER_KEY_ORDER } from \"../shared/constants.js\";\nimport { canonicalDocument } from \"../item/item-format.js\";\nimport { toItemRecord } from \"../item/item-record.js\";\nimport { orderObject, sha256Hex, stableStringify } from \"../shared/serialization.js\";\nimport { hashDocument } from \"./history.js\";\nimport type { HistoryEntry, HistoryPatchOp, ItemDocument, ItemMetadata } from \"../../types/index.js\";\n\n/**\n * Shared history replay/patch mechanics single-sourced for the history, restore,\n * history-redact, and history-repair commands plus the health/validate drift checks.\n *\n * Each command keeps its own thin error-formatting wrapper so the exact CLI error\n * contracts (restore's rich patch-failure context, redact's op tag, history's\n * generic message) are preserved; only the underlying replay/patch logic is shared.\n */\n\nexport interface ReplayDocument {\n metadata: Record<string, unknown>;\n body: string;\n}\n\nexport const EMPTY_REPLAY_DOCUMENT: ReplayDocument = {\n metadata: {},\n body: \"\",\n};\n\nexport function cloneEmptyReplayDocument(): ReplayDocument {\n return structuredClone(EMPTY_REPLAY_DOCUMENT);\n}\n\nexport function replayHash(document: ReplayDocument): string {\n try {\n return hashDocument({\n metadata: document.metadata as unknown as ItemMetadata,\n body: document.body,\n });\n } catch {\n // Legacy/malformed replay states (for example a stream whose first entry never\n // established a full `create` document, so the canonicalizer cannot normalize it)\n // cannot be canonically hashed. Fall back to a deterministic structural hash so\n // re-anchor and verification stay internally consistent for these streams. Fully\n // formed documents always take the canonical path above, so valid streams are\n // unaffected.\n return sha256Hex(stableStringify({ replay_fallback: true, metadata: document.metadata, body: document.body }));\n }\n}\n\nexport function replayToItemDocument(document: ReplayDocument): ItemDocument {\n return {\n metadata: document.metadata as unknown as ItemMetadata,\n body: document.body,\n };\n}\n\n/**\n * Canonicalize an item document into the ordered replay form used when comparing\n * a replayed chain against the on-disk item (restore + history-repair reconciliation).\n */\nexport function toReplayDocument(document: ItemDocument): ReplayDocument {\n if (!document.metadata || Object.keys(document.metadata).length === 0) {\n return {\n metadata: {},\n body: document.body ?? \"\",\n };\n }\n const canonical = canonicalDocument(document);\n return {\n metadata: orderObject(toItemRecord(canonical.metadata), FRONT_MATTER_KEY_ORDER),\n body: canonical.body,\n };\n}\n\nexport function normalizeReplayPatchPath(path: string): string {\n if (path === \"/front_matter\") {\n return \"/metadata\";\n }\n if (path.startsWith(\"/front_matter/\")) {\n return `/metadata/${path.slice(\"/front_matter/\".length)}`;\n }\n return path;\n}\n\nfunction isHistoryPatchOp(value: unknown): value is HistoryPatchOp {\n return (\n typeof value === \"object\" &&\n value !== null &&\n typeof (value as { op?: unknown }).op === \"string\" &&\n typeof (value as { path?: unknown }).path === \"string\"\n );\n}\n\nexport function normalizeReplayPatchOps(patch: HistoryPatchOp[] | unknown): HistoryPatchOp[] {\n if (!Array.isArray(patch)) {\n return [];\n }\n return patch.filter(isHistoryPatchOp).map((operation) => ({\n ...operation,\n path: normalizeReplayPatchPath(operation.path),\n from: typeof operation.from === \"string\" ? normalizeReplayPatchPath(operation.from) : undefined,\n }));\n}\n\nfunction isReplayDocumentShape(value: unknown): value is { metadata: Record<string, unknown>; body: string } {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"metadata\" in value &&\n \"body\" in value &&\n typeof (value as { body: unknown }).body === \"string\" &&\n typeof (value as { metadata: unknown }).metadata === \"object\" &&\n (value as { metadata: unknown }).metadata !== null\n );\n}\n\nexport type ReplayApplyResult =\n | { ok: true; document: ReplayDocument }\n | { ok: false; error: unknown };\n\n/**\n * Strictly apply a history patch (front_matter->metadata normalized) to a replay\n * document. Returns a result envelope rather than throwing so each caller can\n * format its own error contract.\n */\nexport function tryApplyReplayPatch(current: ReplayDocument, patch: HistoryPatchOp[]): ReplayApplyResult {\n try {\n const normalizedPatch = normalizeReplayPatchOps(patch);\n const applied = jsonPatch.applyPatch(\n structuredClone(current),\n normalizedPatch as jsonPatch.Operation[],\n true,\n false,\n ).newDocument as unknown;\n if (!isReplayDocumentShape(applied)) {\n return { ok: false, error: new Error(\"history_replay_invalid_document_shape\") };\n }\n return { ok: true, document: { metadata: applied.metadata, body: applied.body } };\n } catch (error) {\n return { ok: false, error };\n }\n}\n\n/**\n * Deterministically verify a history chain: each entry's before_hash must equal\n * the prior replayed after_hash, the patch must strictly apply, and the recorded\n * after_hash must equal the replayed result.\n */\nexport function verifyHistoryChain(entries: HistoryEntry[]): { ok: boolean; errors: string[] } {\n let replay = cloneEmptyReplayDocument();\n for (let index = 0; index < entries.length; index += 1) {\n const entry = entries[index];\n if (replayHash(replay) !== entry.before_hash) {\n return {\n ok: false,\n errors: [`verify_failed:before_hash_mismatch:entry_${index + 1}`],\n };\n }\n const applied = tryApplyReplayPatch(replay, entry.patch);\n if (!applied.ok) {\n return {\n ok: false,\n errors: [`verify_failed:patch_apply_failed:entry_${index + 1}`],\n };\n }\n replay = applied.document;\n if (replayHash(replay) !== entry.after_hash) {\n return {\n ok: false,\n errors: [`verify_failed:after_hash_mismatch:entry_${index + 1}`],\n };\n }\n }\n return { ok: true, errors: [] };\n}\n\nexport interface LenientApplyResult {\n document: ReplayDocument;\n convertedReplaceToAdd: number;\n skippedOps: number;\n}\n\nfunction tryApplySingleOp(document: unknown, op: HistoryPatchOp): { ok: true; document: unknown } | { ok: false } {\n try {\n const applied = jsonPatch.applyPatch(\n structuredClone(document),\n [op as jsonPatch.Operation],\n true,\n false,\n ).newDocument as unknown;\n return { ok: true, document: applied };\n } catch {\n return { ok: false };\n }\n}\n\n/**\n * Apply a legacy patch op-by-op, recovering from drift that strict replay rejects:\n * a `replace` whose path no longer exists is retried as `add`, and any op that\n * still cannot apply against the current replay state is skipped. The resulting\n * document is what the repaired entry's recomputed patch should target.\n */\nexport function lenientApplyReplayPatch(current: ReplayDocument, patch: HistoryPatchOp[]): LenientApplyResult {\n let working: unknown = structuredClone(current);\n let convertedReplaceToAdd = 0;\n let skippedOps = 0;\n\n for (const op of normalizeReplayPatchOps(patch)) {\n const direct = tryApplySingleOp(working, op);\n if (direct.ok) {\n working = direct.document;\n continue;\n }\n if (op.op === \"replace\") {\n const asAdd = tryApplySingleOp(working, { ...op, op: \"add\" });\n if (asAdd.ok) {\n working = asAdd.document;\n convertedReplaceToAdd += 1;\n continue;\n }\n }\n skippedOps += 1;\n }\n\n const candidate = working as { metadata?: unknown; body?: unknown };\n const document: ReplayDocument = {\n metadata:\n typeof candidate.metadata === \"object\" && candidate.metadata !== null\n ? (candidate.metadata as Record<string, unknown>)\n : {},\n body: typeof candidate.body === \"string\" ? candidate.body : current.body,\n };\n return { document, convertedReplaceToAdd, skippedOps };\n}\n\nexport interface ReanchorEntryDetail {\n index: number;\n rehashed: boolean;\n patch_repaired: boolean;\n converted_replace_to_add: number;\n skipped_ops: number;\n}\n\nexport interface ReanchorResult {\n entries: HistoryEntry[];\n finalDocument: ReplayDocument;\n entriesRehashed: number;\n entriesPatchRepaired: number;\n convertedReplaceToAdd: number;\n skippedOps: number;\n details: ReanchorEntryDetail[];\n}\n\n/**\n * Re-anchor a drifted history chain: replay every entry from empty, recompute the\n * before/after hashes, and only rewrite a patch when the original op set no longer\n * strictly applies (legacy drift). Clean entries keep their patch verbatim so the\n * on-disk diff stays minimal. The returned chain verifies via verifyHistoryChain.\n */\nexport function reanchorHistoryEntries(entries: HistoryEntry[]): ReanchorResult {\n let replay = cloneEmptyReplayDocument();\n const rewritten: HistoryEntry[] = [];\n const details: ReanchorEntryDetail[] = [];\n let entriesRehashed = 0;\n let entriesPatchRepaired = 0;\n let convertedReplaceToAdd = 0;\n let skippedOps = 0;\n\n for (let index = 0; index < entries.length; index += 1) {\n const entry = entries[index];\n const beforeHash = replayHash(replay);\n const strict = tryApplyReplayPatch(replay, entry.patch);\n\n let next: ReplayDocument;\n let outPatch: HistoryPatchOp[];\n let patchRepaired = false;\n let entryConverted = 0;\n let entrySkipped = 0;\n\n if (strict.ok) {\n next = strict.document;\n outPatch = entry.patch;\n } else {\n const lenient = lenientApplyReplayPatch(replay, entry.patch);\n next = lenient.document;\n outPatch = jsonPatch.compare(replay, next) as HistoryPatchOp[];\n patchRepaired = true;\n entryConverted = lenient.convertedReplaceToAdd;\n entrySkipped = lenient.skippedOps;\n convertedReplaceToAdd += entryConverted;\n skippedOps += entrySkipped;\n entriesPatchRepaired += 1;\n }\n\n const afterHash = replayHash(next);\n const rehashed = beforeHash !== entry.before_hash || afterHash !== entry.after_hash;\n if (rehashed) {\n entriesRehashed += 1;\n }\n\n rewritten.push({\n ...entry,\n patch: outPatch,\n before_hash: beforeHash,\n after_hash: afterHash,\n });\n details.push({\n index: index + 1,\n rehashed,\n patch_repaired: patchRepaired,\n converted_replace_to_add: entryConverted,\n skipped_ops: entrySkipped,\n });\n replay = next;\n }\n\n return {\n entries: rewritten,\n finalDocument: replay,\n entriesRehashed,\n entriesPatchRepaired,\n convertedReplaceToAdd,\n skippedOps,\n details,\n };\n}\n\nexport function historyEntriesToRaw(entries: HistoryEntry[]): string {\n if (entries.length === 0) {\n return \"\";\n }\n return `${entries.map((entry) => JSON.stringify(entry)).join(\"\\n\")}\\n`;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAO,eAAe;AAsBf,IAAM,wBAAwC;EACnD,UAAU,CAAA;EACV,MAAM;;AAGF,SAAU,2BAAwB;AACtC,SAAO,gBAAgB,qBAAqB;AAC9C;AAEM,SAAU,WAAW,UAAwB;AACjD,MAAI;AACF,WAAO,aAAa;MAClB,UAAU,SAAS;MACnB,MAAM,SAAS;KAChB;EACH,QAAQ;AAON,WAAO,UAAU,gBAAgB,EAAE,iBAAiB,MAAM,UAAU,SAAS,UAAU,MAAM,SAAS,KAAI,CAAE,CAAC;EAC/G;AACF;AAEM,SAAU,qBAAqB,UAAwB;AAC3D,SAAO;IACL,UAAU,SAAS;IACnB,MAAM,SAAS;;AAEnB;AAMM,SAAU,iBAAiB,UAAsB;AACrD,MAAI,CAAC,SAAS,YAAY,OAAO,KAAK,SAAS,QAAQ,EAAE,WAAW,GAAG;AACrE,WAAO;MACL,UAAU,CAAA;MACV,MAAM,SAAS,QAAQ;;EAE3B;AACA,QAAM,YAAY,kBAAkB,QAAQ;AAC5C,SAAO;IACL,UAAU,YAAY,aAAa,UAAU,QAAQ,GAAG,sBAAsB;IAC9E,MAAM,UAAU;;AAEpB;AAEM,SAAU,yBAAyB,MAAY;AACnD,MAAI,SAAS,iBAAiB;AAC5B,WAAO;EACT;AACA,MAAI,KAAK,WAAW,gBAAg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GAAG,QAAQ,IAAI,CAAC,UAAU,KAAK,UAAU,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC;;AACpE","debugId":"eaf45328-2532-5e1c-9570-442b894b03d3"}
@@ -9,30 +9,31 @@ import {
9
9
  parseLinkedTestContextMode,
10
10
  parseLinkedTestEnvClear,
11
11
  parseLinkedTestEnvSet,
12
+ parseLinkedTestJsonEntries,
12
13
  parseLinkedTestMinLines,
13
14
  parseLinkedTestRegexList,
14
15
  parseLinkedTestStringList
15
- } from "./chunk-O4L7Z6LB.js";
16
+ } from "./chunk-F2PVV7IX.js";
16
17
  import {
17
18
  createStdinTokenResolver,
18
19
  parseCsvKv,
19
20
  parseOptionalNumber
20
- } from "./chunk-4TJWRPIH.js";
21
+ } from "./chunk-UY26RIBR.js";
21
22
  import {
22
23
  runInit
23
- } from "./chunk-ZPXDD6RQ.js";
24
+ } from "./chunk-O64EYNHF.js";
24
25
  import {
25
26
  locateItem,
26
27
  mutateItem,
27
28
  readLocatedItem
28
- } from "./chunk-LF2VNLEZ.js";
29
+ } from "./chunk-XRE4CTNP.js";
29
30
  import {
30
31
  resolveItemTypeRegistry
31
- } from "./chunk-U3Z4OCZC.js";
32
+ } from "./chunk-7GYMMDDW.js";
32
33
  import {
33
34
  compareTimestampStrings,
34
35
  nowIso
35
- } from "./chunk-SAUXUI6U.js";
36
+ } from "./chunk-7TW64BS5.js";
36
37
  import {
37
38
  EXIT_CODE,
38
39
  ITEM_FILE_EXTENSIONS,
@@ -45,7 +46,7 @@ import {
45
46
  resolveGlobalPmRoot,
46
47
  resolvePmRoot,
47
48
  stableValueEquals
48
- } from "./chunk-C72IQIBT.js";
49
+ } from "./chunk-OQGJSCZZ.js";
49
50
 
50
51
  // dist/cli/commands/test.js
51
52
  import { spawn } from "node:child_process";
@@ -104,6 +105,119 @@ async function appendTrackedTestRunSummary(options) {
104
105
  });
105
106
  }
106
107
 
108
+ // dist/core/test/run-selectors.js
109
+ !(function() {
110
+ try {
111
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
112
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "89480c78-9cf5-55e5-a881-aaa130d9c509");
113
+ } catch (e2) {
114
+ }
115
+ })();
116
+ var MAX_SELECTOR_ENTRY_LABEL_LENGTH = 100;
117
+ function parseOnlyIndexValue(raw, optionName = "--only-index") {
118
+ const value = typeof raw === "number" ? raw : Number(String(raw).trim());
119
+ if (!Number.isInteger(value) || value < 1) {
120
+ throw new PmCliError(`${optionName} requires a 1-based integer index into the linked-test list (got "${raw}"). Use pm test <id> --list to inspect positions.`, EXIT_CODE.USAGE);
121
+ }
122
+ return value;
123
+ }
124
+ function summarizeSelectorEntry(entry) {
125
+ const label = entry.command ?? entry.path ?? "<no command>";
126
+ const normalized = label.replaceAll(/\s+/g, " ").trim() || "<no command>";
127
+ if (normalized.length <= MAX_SELECTOR_ENTRY_LABEL_LENGTH) {
128
+ return normalized;
129
+ }
130
+ return `${normalized.slice(0, MAX_SELECTOR_ENTRY_LABEL_LENGTH - 3)}...`;
131
+ }
132
+ function describeLinkedTestEntries(tests) {
133
+ return tests.map((entry, index) => `${index + 1}. ${summarizeSelectorEntry(entry)}`).join("; ");
134
+ }
135
+ function activeSelectorKinds(selector) {
136
+ const kinds = [];
137
+ if (selector.match !== void 0) {
138
+ kinds.push("match");
139
+ }
140
+ if (selector.onlyIndex !== void 0) {
141
+ kinds.push("only-index");
142
+ }
143
+ if (selector.onlyLast === true) {
144
+ kinds.push("only-last");
145
+ }
146
+ return kinds;
147
+ }
148
+ function entryMatchesSubstring(entry, needle) {
149
+ const command = entry.command?.toLowerCase() ?? "";
150
+ const entryPath = entry.path?.toLowerCase() ?? "";
151
+ return command.includes(needle) || entryPath.includes(needle);
152
+ }
153
+ function resolveLinkedTestRunSelection(tests, selector) {
154
+ const kinds = activeSelectorKinds(selector);
155
+ if (kinds.length === 0) {
156
+ return {
157
+ selector: null,
158
+ requested: null,
159
+ selected: tests,
160
+ selected_indexes: tests.map((_, index) => index + 1),
161
+ selected_count: tests.length,
162
+ skipped_count: 0
163
+ };
164
+ }
165
+ if (kinds.length > 1) {
166
+ throw new PmCliError(`Combine at most one linked-test selector per run: ${kinds.map((kind2) => `--${kind2}`).join(" and ")} were provided. Pick one of --match, --only-index, --only-last.`, EXIT_CODE.USAGE);
167
+ }
168
+ const kind = kinds[0];
169
+ if (tests.length === 0) {
170
+ throw new PmCliError(`--${kind} matched no linked tests because this item has none. Add one first with --add, --command, or --add-json.`, EXIT_CODE.USAGE);
171
+ }
172
+ if (kind === "match") {
173
+ const needle = (selector.match ?? "").trim().toLowerCase();
174
+ if (needle.length === 0) {
175
+ throw new PmCliError("--match requires a non-empty substring to match against linked-test command/path values", EXIT_CODE.USAGE);
176
+ }
177
+ const selectedIndexes = [];
178
+ const selected = [];
179
+ for (let index = 0; index < tests.length; index += 1) {
180
+ if (entryMatchesSubstring(tests[index], needle)) {
181
+ selected.push(tests[index]);
182
+ selectedIndexes.push(index + 1);
183
+ }
184
+ }
185
+ if (selected.length === 0) {
186
+ throw new PmCliError(`--match "${selector.match}" matched none of the ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
187
+ }
188
+ return {
189
+ selector: "match",
190
+ requested: selector.match ?? "",
191
+ selected,
192
+ selected_indexes: selectedIndexes,
193
+ selected_count: selected.length,
194
+ skipped_count: tests.length - selected.length
195
+ };
196
+ }
197
+ if (kind === "only-index") {
198
+ const index = parseOnlyIndexValue(selector.onlyIndex);
199
+ if (index > tests.length) {
200
+ throw new PmCliError(`--only-index ${index} is out of range: this item has ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
201
+ }
202
+ return {
203
+ selector: "only-index",
204
+ requested: String(index),
205
+ selected: [tests[index - 1]],
206
+ selected_indexes: [index],
207
+ selected_count: 1,
208
+ skipped_count: tests.length - 1
209
+ };
210
+ }
211
+ return {
212
+ selector: "only-last",
213
+ requested: "last",
214
+ selected: [tests[tests.length - 1]],
215
+ selected_indexes: [tests.length],
216
+ selected_count: 1,
217
+ skipped_count: tests.length - 1
218
+ };
219
+ }
220
+
107
221
  // dist/cli/commands/test/linked-command-detection.js
108
222
  !(function() {
109
223
  try {
@@ -296,7 +410,7 @@ function firstPositionalToken(tokens) {
296
410
  !(function() {
297
411
  try {
298
412
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
299
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c12f8225-bfef-5ec4-9a06-15bdf79f38bd");
413
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "114c5568-497a-5295-b4fe-df7b0dbccb9d");
300
414
  } catch (e2) {
301
415
  }
302
416
  })();
@@ -753,6 +867,22 @@ function parseAddEntries(raw) {
753
867
  };
754
868
  });
755
869
  }
870
+ function parseAddJsonEntries(raw) {
871
+ if (!raw)
872
+ return [];
873
+ return raw.flatMap((entry) => {
874
+ const parsed = parseLinkedTestJsonEntries(entry, "--add-json");
875
+ for (const linkedTest of parsed) {
876
+ const command = linkedTest.command;
877
+ if (!command) {
878
+ throw new PmCliError("--add-json requires a non-empty command string", EXIT_CODE.USAGE);
879
+ }
880
+ assertNoRecursiveTestAllCommand(command);
881
+ assertSandboxSafeTestRunnerCommand(command);
882
+ }
883
+ return parsed;
884
+ });
885
+ }
756
886
  function parseRemoveEntries(raw) {
757
887
  if (!raw)
758
888
  return [];
@@ -1542,8 +1672,9 @@ async function runTest(id, options, global2) {
1542
1672
  const settings = await readSettings(pmRoot);
1543
1673
  const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
1544
1674
  const resolvedAdds = await stdinResolver.resolveList(options.add, "--add");
1675
+ const resolvedAddJsons = await stdinResolver.resolveList(options.addJson, "--add-json");
1545
1676
  const resolvedRemoves = await stdinResolver.resolveList(options.remove, "--remove");
1546
- const adds = parseAddEntries(resolvedAdds);
1677
+ const adds = [...parseAddEntries(resolvedAdds), ...parseAddJsonEntries(resolvedAddJsons)];
1547
1678
  const removes = parseRemoveEntries(resolvedRemoves);
1548
1679
  const shouldMutate = adds.length > 0 || removes.length > 0;
1549
1680
  let tests = [];
@@ -1598,8 +1729,19 @@ async function runTest(id, options, global2) {
1598
1729
  if (hasRuntimeDirectiveFlags && options.run !== true) {
1599
1730
  throw new PmCliError("--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, and --auto-pm-context require --run", EXIT_CODE.USAGE);
1600
1731
  }
1732
+ const hasSelectorFlags = options.match !== void 0 || options.onlyIndex !== void 0 || options.onlyLast === true;
1733
+ if (hasSelectorFlags && options.run !== true) {
1734
+ throw new PmCliError("--match, --only-index, and --only-last require --run", EXIT_CODE.USAGE);
1735
+ }
1736
+ const selectorInput = {
1737
+ match: options.match,
1738
+ onlyIndex: options.onlyIndex === void 0 ? void 0 : parseOnlyIndexValue(options.onlyIndex),
1739
+ onlyLast: options.onlyLast
1740
+ };
1741
+ const runSelection = options.run === true ? resolveLinkedTestRunSelection(tests, selectorInput) : void 0;
1742
+ const testsToRun = runSelection?.selected ?? tests;
1601
1743
  const runStartedAt = options.run === true ? nowIso() : void 0;
1602
- const runResults = options.run === true ? await runLinkedTests(tests, defaultTimeoutSeconds, {
1744
+ const runResults = options.run === true ? await runLinkedTests(testsToRun, defaultTimeoutSeconds, {
1603
1745
  progress: options.progress,
1604
1746
  envSet: options.envSet,
1605
1747
  envClear: options.envClear,
@@ -1619,6 +1761,9 @@ async function runTest(id, options, global2) {
1619
1761
  const failureCategories = countFailureCategories(runResults);
1620
1762
  const failOnSkippedTriggered = options.run === true && options.failOnSkipped === true && runResults.some((entry) => entry.status === "skipped");
1621
1763
  const warnings = [];
1764
+ if (runSelection && runSelection.selector !== null) {
1765
+ warnings.push(`linked_test_selection:${runSelection.selector}=${runSelection.requested};selected=${runSelection.selected_count};skipped=${runSelection.skipped_count};indexes=${runSelection.selected_indexes.join(",")}`);
1766
+ }
1622
1767
  if (options.run === true && options.checkContext === true) {
1623
1768
  const preflight = summarizeContextPreflight(runResults);
1624
1769
  warnings.push(`context_preflight:checked_pm_commands=${preflight.checked_pm_commands};tracker_read_commands=${preflight.tracker_read_commands};mismatches=${preflight.mismatches};auto_remediated=${preflight.auto_remediated}`);
@@ -1661,6 +1806,13 @@ async function runTest(id, options, global2) {
1661
1806
  tests,
1662
1807
  run_results: runResults,
1663
1808
  failure_categories: failureCategories,
1809
+ selection: runSelection ? {
1810
+ selector: runSelection.selector,
1811
+ requested: runSelection.requested,
1812
+ selected_indexes: runSelection.selected_indexes,
1813
+ selected_count: runSelection.selected_count,
1814
+ skipped_count: runSelection.skipped_count
1815
+ } : void 0,
1664
1816
  fail_on_skipped_triggered: failOnSkippedTriggered ? true : void 0,
1665
1817
  warnings: warnings.length > 0 ? warnings : void 0,
1666
1818
  changed: shouldMutate,
@@ -1678,4 +1830,4 @@ export {
1678
1830
  runLinkedTests,
1679
1831
  runTest
1680
1832
  };
1681
- //# sourceMappingURL=chunk-RLVI7KDW.js.map
1833
+ //# sourceMappingURL=chunk-CMEHZD6G.js.map