@unbrained/pm-cli 2026.7.15 → 2026.7.17

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 (508) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +23 -2
  3. package/CONTRIBUTING.md +2 -2
  4. package/dist/cli/bootstrap-args.d.ts +2 -115
  5. package/dist/cli/bootstrap-args.js +4 -831
  6. package/dist/cli/bootstrap-args.js.map +1 -1
  7. package/dist/cli/commands/eval.d.ts +4 -64
  8. package/dist/cli/commands/eval.js +4 -153
  9. package/dist/cli/commands/eval.js.map +1 -1
  10. package/dist/cli/commands/linked-test-entry.d.ts +6 -6
  11. package/dist/cli/commands/linked-test-entry.js +4 -65
  12. package/dist/cli/commands/linked-test-entry.js.map +1 -1
  13. package/dist/cli/commands/linked-test-parsers.d.ts +3 -45
  14. package/dist/cli/commands/linked-test-parsers.js +4 -516
  15. package/dist/cli/commands/linked-test-parsers.js.map +1 -1
  16. package/dist/cli/commands/list.d.ts +3 -210
  17. package/dist/cli/commands/list.js +4 -1068
  18. package/dist/cli/commands/list.js.map +1 -1
  19. package/dist/cli/commands/search.d.ts +3 -464
  20. package/dist/cli/commands/search.js +4 -2236
  21. package/dist/cli/commands/search.js.map +1 -1
  22. package/dist/cli/commands/stats.d.ts +6 -66
  23. package/dist/cli/commands/stats.js +4 -157
  24. package/dist/cli/commands/stats.js.map +1 -1
  25. package/dist/cli/commands/telemetry.d.ts +6 -14
  26. package/dist/cli/commands/telemetry.js +4 -349
  27. package/dist/cli/commands/telemetry.js.map +1 -1
  28. package/dist/cli/commands/test-all.d.ts +6 -95
  29. package/dist/cli/commands/test-all.js +4 -439
  30. package/dist/cli/commands/test-all.js.map +1 -1
  31. package/dist/cli/commands/test-runs.d.ts +6 -92
  32. package/dist/cli/commands/test-runs.js +4 -189
  33. package/dist/cli/commands/test-runs.js.map +1 -1
  34. package/dist/cli/commands/test.d.ts +6 -244
  35. package/dist/cli/commands/test.js +4 -1780
  36. package/dist/cli/commands/test.js.map +1 -1
  37. package/dist/cli/commands/update-many.d.ts +15 -29
  38. package/dist/cli/commands/update-many.js +355 -259
  39. package/dist/cli/commands/update-many.js.map +1 -1
  40. package/dist/cli/main.js +140 -133
  41. package/dist/cli/main.js.map +1 -1
  42. package/dist/cli/search-refresh.js +4 -9
  43. package/dist/cli/search-refresh.js.map +1 -1
  44. package/dist/cli/shared-parsers.d.ts +6 -9
  45. package/dist/cli/shared-parsers.js +4 -37
  46. package/dist/cli/shared-parsers.js.map +1 -1
  47. package/dist/cli/telemetry-flush.js +4 -4
  48. package/dist/cli/telemetry-flush.js.map +1 -1
  49. package/dist/cli-bundle/bundle-manifest.json +341 -341
  50. package/dist/cli-bundle/chunks/{append-OJQFUQ4T.js → append-5YF3TO7I.js} +5 -5
  51. package/dist/cli-bundle/chunks/append-JHO5K6RP.js +11 -0
  52. package/dist/cli-bundle/chunks/{chunk-WT3ZEOGH.js → chunk-23TCGBRK.js} +16 -7
  53. package/dist/cli-bundle/chunks/{chunk-WT3ZEOGH.js.map → chunk-23TCGBRK.js.map} +1 -1
  54. package/dist/cli-bundle/chunks/{chunk-BCOFWYW4.js → chunk-2BX74BAS.js} +3 -3
  55. package/dist/cli-bundle/chunks/{chunk-APRVSW2O.js → chunk-2CXL335K.js} +3 -3
  56. package/dist/cli-bundle/chunks/{chunk-KG44YSKD.js → chunk-2FUOXSRN.js} +4 -4
  57. package/dist/cli-bundle/chunks/{chunk-HDH3JUGG.js → chunk-2IPNL3DR.js} +3 -3
  58. package/dist/cli-bundle/chunks/{chunk-J6364LFM.js → chunk-2MPMKJF2.js} +9 -18
  59. package/dist/cli-bundle/chunks/{chunk-J6364LFM.js.map → chunk-2MPMKJF2.js.map} +1 -1
  60. package/dist/cli-bundle/chunks/{chunk-GM5QHQU6.js → chunk-2XOSFSTH.js} +5 -5
  61. package/dist/cli-bundle/chunks/{chunk-K3WII2ME.js → chunk-37DRDP2B.js} +5 -5
  62. package/dist/cli-bundle/chunks/{chunk-2WSE6PO2.js → chunk-37V5MXAU.js} +4 -4
  63. package/dist/cli-bundle/chunks/{chunk-UWQHLMEB.js → chunk-3D4YVTNG.js} +8 -8
  64. package/dist/cli-bundle/chunks/{chunk-PMOSXADO.js → chunk-47HXN6RX.js} +3 -3
  65. package/dist/cli-bundle/chunks/{chunk-6CFNAVTF.js → chunk-5HGZKQUL.js} +4 -4
  66. package/dist/cli-bundle/chunks/{chunk-2IFFUZLC.js → chunk-5UKQLQM2.js} +2 -2
  67. package/dist/cli-bundle/chunks/{chunk-DM4H7FP4.js → chunk-633PKXLT.js} +3 -3
  68. package/dist/cli-bundle/chunks/{chunk-XSJUSQAE.js → chunk-646MQXFW.js} +2 -2
  69. package/dist/cli-bundle/chunks/{chunk-ZI6VQWQ7.js → chunk-66MKH7SZ.js} +4 -4
  70. package/dist/cli-bundle/chunks/{chunk-S6MQESFR.js → chunk-67RO3H4N.js} +4 -4
  71. package/dist/cli-bundle/chunks/{chunk-34L5OT3Y.js → chunk-6DYOZS6C.js} +2 -2
  72. package/dist/cli-bundle/chunks/{chunk-RRM5JYJC.js → chunk-6O44IN44.js} +2 -2
  73. package/dist/cli-bundle/chunks/{chunk-ONG5V5CI.js → chunk-6XAZB6SE.js} +97 -69
  74. package/dist/cli-bundle/chunks/chunk-6XAZB6SE.js.map +1 -0
  75. package/dist/cli-bundle/chunks/{chunk-PENXZX3U.js → chunk-74FKFFXO.js} +2 -2
  76. package/dist/cli-bundle/chunks/{chunk-LPYWLWDS.js → chunk-7CTQ7WW5.js} +37 -37
  77. package/dist/cli-bundle/chunks/chunk-7CTQ7WW5.js.map +1 -0
  78. package/dist/cli-bundle/chunks/{chunk-HO4KXD6I.js → chunk-7H5NNCJ5.js} +4 -4
  79. package/dist/cli-bundle/chunks/{chunk-XXXF6PAQ.js → chunk-7LTCLTRG.js} +69 -61
  80. package/dist/cli-bundle/chunks/chunk-7LTCLTRG.js.map +7 -0
  81. package/dist/cli-bundle/chunks/{chunk-TQSZFPIS.js → chunk-AFGKSHAM.js} +4 -4
  82. package/dist/cli-bundle/chunks/{chunk-JXQUXVMI.js → chunk-AFSV5HBB.js} +77 -7
  83. package/dist/cli-bundle/chunks/{chunk-JXQUXVMI.js.map → chunk-AFSV5HBB.js.map} +1 -1
  84. package/dist/cli-bundle/chunks/{chunk-6N2VXVTQ.js → chunk-ARGDWQ4J.js} +2 -2
  85. package/dist/cli-bundle/chunks/{chunk-3U7ZR6M4.js → chunk-B57RJHBZ.js} +4 -4
  86. package/dist/cli-bundle/chunks/{chunk-7B67ZL4N.js → chunk-B6SH2YNN.js} +75 -5
  87. package/dist/cli-bundle/chunks/{chunk-7B67ZL4N.js.map → chunk-B6SH2YNN.js.map} +1 -1
  88. package/dist/cli-bundle/chunks/{chunk-YCQET3OT.js → chunk-BAP7G3N2.js} +2 -2
  89. package/dist/cli-bundle/chunks/{chunk-QKXHFPYM.js → chunk-BIRYX32V.js} +3 -3
  90. package/dist/cli-bundle/chunks/{chunk-RMLWNPH2.js → chunk-BVLOMU6O.js} +2 -2
  91. package/dist/cli-bundle/chunks/{chunk-YBLZ2VE7.js → chunk-CFSUNEL7.js} +320 -239
  92. package/dist/cli-bundle/chunks/chunk-CFSUNEL7.js.map +7 -0
  93. package/dist/cli-bundle/chunks/{chunk-2VPAVL7O.js → chunk-CKX4WOPC.js} +2 -2
  94. package/dist/cli-bundle/chunks/{chunk-TKOVBP6C.js → chunk-D52ZN3BF.js} +2 -2
  95. package/dist/cli-bundle/chunks/{chunk-KPMKHGEA.js → chunk-D53RTYVI.js} +4 -4
  96. package/dist/cli-bundle/chunks/{chunk-ODALILG3.js → chunk-D5XHO4Q7.js} +2 -2
  97. package/dist/cli-bundle/chunks/{chunk-E2OJMKML.js → chunk-DCC2AQBD.js} +18 -9
  98. package/dist/cli-bundle/chunks/{chunk-E2OJMKML.js.map → chunk-DCC2AQBD.js.map} +1 -1
  99. package/dist/cli-bundle/chunks/{chunk-YAQEBNY7.js → chunk-DDFGYUCQ.js} +4 -4
  100. package/dist/cli-bundle/chunks/{chunk-EAB64KLB.js → chunk-DG2EQRIH.js} +4 -4
  101. package/dist/cli-bundle/chunks/{chunk-IG3SWA4A.js → chunk-EHJFUOXL.js} +3 -3
  102. package/dist/cli-bundle/chunks/{chunk-ONREO4ST.js → chunk-EY7ZE3TG.js} +3 -3
  103. package/dist/cli-bundle/chunks/{chunk-EJEXHTY5.js → chunk-FHOBCGQO.js} +2 -2
  104. package/dist/cli-bundle/chunks/{chunk-H3EIEWGR.js → chunk-FL4D53ND.js} +2 -2
  105. package/dist/cli-bundle/chunks/{chunk-WUJQK4YV.js → chunk-FVNWHUME.js} +4 -4
  106. package/dist/cli-bundle/chunks/{chunk-INU6DKT5.js → chunk-FXFCFL73.js} +5 -5
  107. package/dist/cli-bundle/chunks/{chunk-QEHQ2GVG.js → chunk-FY4RLHSC.js} +2 -2
  108. package/dist/cli-bundle/chunks/{chunk-EACOH7AU.js → chunk-FZGM3PNA.js} +8 -8
  109. package/dist/cli-bundle/chunks/{chunk-FNSPG7MU.js → chunk-G6KM4YKY.js} +7 -7
  110. package/dist/cli-bundle/chunks/{chunk-AHVTB5I5.js → chunk-G6MYGULG.js} +4 -4
  111. package/dist/cli-bundle/chunks/{chunk-TSMHDIW4.js → chunk-GLZKZON6.js} +2 -2
  112. package/dist/cli-bundle/chunks/{chunk-2JKGO6QX.js → chunk-H5IOT54C.js} +4 -4
  113. package/dist/cli-bundle/chunks/{chunk-5ZSLZLDN.js → chunk-HF63SBLC.js} +585 -456
  114. package/dist/cli-bundle/chunks/chunk-HF63SBLC.js.map +1 -0
  115. package/dist/cli-bundle/chunks/{chunk-SELVXEZK.js → chunk-HO4DLBNK.js} +2 -2
  116. package/dist/cli-bundle/chunks/{chunk-3CLU2XZO.js → chunk-HSYV4ZYT.js} +4 -4
  117. package/dist/cli-bundle/chunks/{chunk-EH2OPHBI.js → chunk-HTXXXF45.js} +23 -19
  118. package/dist/cli-bundle/chunks/chunk-HTXXXF45.js.map +1 -0
  119. package/dist/cli-bundle/chunks/{chunk-CRVF2JDM.js → chunk-HXVHBERL.js} +8 -8
  120. package/dist/cli-bundle/chunks/{chunk-NU3IMIEA.js → chunk-I7DIDUSP.js} +2 -2
  121. package/dist/cli-bundle/chunks/{chunk-2NCIPMQP.js → chunk-I7GY4X6Y.js} +2 -2
  122. package/dist/cli-bundle/chunks/{chunk-JYFOV7FC.js → chunk-IE5KRAKN.js} +4 -4
  123. package/dist/cli-bundle/chunks/{chunk-UY2ACEMF.js → chunk-ILVOOAT4.js} +5 -5
  124. package/dist/cli-bundle/chunks/{chunk-GOSLKLFE.js → chunk-KH6QAHME.js} +3 -3
  125. package/dist/cli-bundle/chunks/{chunk-J6EY5V4N.js → chunk-KOEZCHRF.js} +9 -9
  126. package/dist/cli-bundle/chunks/{chunk-QKECXBBG.js → chunk-KX62NMZC.js} +3 -3
  127. package/dist/cli-bundle/chunks/{chunk-QKECXBBG.js.map → chunk-KX62NMZC.js.map} +1 -1
  128. package/dist/cli-bundle/chunks/{chunk-WQPUU7XD.js → chunk-L337QKWJ.js} +5 -5
  129. package/dist/cli-bundle/chunks/{chunk-LSG2U345.js → chunk-L6FVNR7X.js} +5 -5
  130. package/dist/cli-bundle/chunks/{chunk-ILX33QXL.js → chunk-LLODAQMP.js} +706 -532
  131. package/dist/cli-bundle/chunks/chunk-LLODAQMP.js.map +7 -0
  132. package/dist/cli-bundle/chunks/{chunk-FMBNM2EN.js → chunk-LSOWTLEM.js} +2 -2
  133. package/dist/cli-bundle/chunks/{chunk-4223PVZT.js → chunk-M7MVOKVV.js} +3 -3
  134. package/dist/cli-bundle/chunks/chunk-MNV226E4.js +834 -0
  135. package/dist/cli-bundle/chunks/chunk-MNV226E4.js.map +1 -0
  136. package/dist/cli-bundle/chunks/{chunk-UMOPHQSU.js → chunk-MR4SHYR4.js} +41 -19
  137. package/dist/cli-bundle/chunks/chunk-MR4SHYR4.js.map +7 -0
  138. package/dist/cli-bundle/chunks/{chunk-BKVG6XOA.js → chunk-MSGETE6I.js} +4 -4
  139. package/dist/cli-bundle/chunks/{chunk-3WM75PWC.js → chunk-N33FD2UI.js} +3 -3
  140. package/dist/cli-bundle/chunks/{chunk-UFXU44HV.js → chunk-N7I2DGLP.js} +4 -4
  141. package/dist/cli-bundle/chunks/{chunk-3S5QVM5H.js → chunk-NCAFUBJX.js} +13 -13
  142. package/dist/cli-bundle/chunks/chunk-NCAFUBJX.js.map +1 -0
  143. package/dist/cli-bundle/chunks/{chunk-6S3YSUYG.js → chunk-NNANAWFH.js} +3 -3
  144. package/dist/cli-bundle/chunks/{chunk-IJIICKVW.js → chunk-NTRQLE2R.js} +2 -2
  145. package/dist/cli-bundle/chunks/{chunk-SDQLJWBO.js → chunk-NVZ6NVHJ.js} +4 -4
  146. package/dist/cli-bundle/chunks/{chunk-H2Z3FYXQ.js → chunk-OWP6QFBV.js} +4 -4
  147. package/dist/cli-bundle/chunks/{chunk-Q7A43DS4.js → chunk-P22HGFFI.js} +2 -2
  148. package/dist/cli-bundle/chunks/{chunk-NLDFBC6J.js → chunk-P56LKFQX.js} +2 -2
  149. package/dist/cli-bundle/chunks/{chunk-NVPZIJVR.js → chunk-PT7MCCGD.js} +2 -2
  150. package/dist/cli-bundle/chunks/{chunk-P74IZQ7A.js → chunk-QKVVV6QO.js} +7 -7
  151. package/dist/cli-bundle/chunks/{chunk-5JLUII3O.js → chunk-QNUAZYGW.js} +321 -240
  152. package/dist/cli-bundle/chunks/chunk-QNUAZYGW.js.map +1 -0
  153. package/dist/cli-bundle/chunks/{chunk-QIPLHNP7.js → chunk-QWBKN3QC.js} +5 -5
  154. package/dist/cli-bundle/chunks/{chunk-7PIWCHTW.js → chunk-R5XTTZSJ.js} +5 -5
  155. package/dist/cli-bundle/chunks/{chunk-JOUQZENX.js → chunk-RC4UOUXA.js} +3 -3
  156. package/dist/cli-bundle/chunks/{chunk-BEP7WJA2.js → chunk-RGMWJLXF.js} +4 -4
  157. package/dist/cli-bundle/chunks/{chunk-NP22ERDF.js → chunk-RTBX3C4C.js} +3 -3
  158. package/dist/cli-bundle/chunks/{chunk-HYB5AZ63.js → chunk-S46R2M3W.js} +117 -71
  159. package/dist/cli-bundle/chunks/chunk-S46R2M3W.js.map +7 -0
  160. package/dist/cli-bundle/chunks/{chunk-H5APFTHZ.js → chunk-S6FF7VW6.js} +18 -18
  161. package/dist/cli-bundle/chunks/chunk-S6FF7VW6.js.map +7 -0
  162. package/dist/cli-bundle/chunks/{chunk-UXONS674.js → chunk-SIJV365F.js} +54 -55
  163. package/dist/cli-bundle/chunks/chunk-SIJV365F.js.map +1 -0
  164. package/dist/cli-bundle/chunks/{chunk-7Z4LKRS4.js → chunk-SPFZV2GR.js} +9 -9
  165. package/dist/cli-bundle/chunks/{chunk-ULTHRDBP.js → chunk-TM5CIO3F.js} +3 -3
  166. package/dist/cli-bundle/chunks/{chunk-4XQ3BDV4.js → chunk-V3VBXQQV.js} +36 -36
  167. package/dist/cli-bundle/chunks/chunk-V3VBXQQV.js.map +7 -0
  168. package/dist/cli-bundle/chunks/{chunk-YAROI3PD.js → chunk-V7MP6YTN.js} +7 -7
  169. package/dist/cli-bundle/chunks/{chunk-OW4JWD5M.js → chunk-VAHZIPWS.js} +4 -4
  170. package/dist/cli-bundle/chunks/{chunk-DYH63FX7.js → chunk-VE6ZSTQW.js} +4 -4
  171. package/dist/cli-bundle/chunks/{chunk-3AUGG2DP.js → chunk-W5E2UUSH.js} +3 -3
  172. package/dist/cli-bundle/chunks/{chunk-BSEQUTQP.js → chunk-WACRQ26A.js} +2 -2
  173. package/dist/cli-bundle/chunks/{chunk-BSEQUTQP.js.map → chunk-WACRQ26A.js.map} +1 -1
  174. package/dist/cli-bundle/chunks/{chunk-UOHFKBUV.js → chunk-WL3SS45P.js} +3 -3
  175. package/dist/cli-bundle/chunks/{chunk-QKJGPFAF.js → chunk-WU3KAN6A.js} +3 -3
  176. package/dist/cli-bundle/chunks/{chunk-IA5FKNII.js → chunk-X2MGQMZO.js} +2 -2
  177. package/dist/cli-bundle/chunks/{chunk-TD3LVC7D.js → chunk-X5YCTFKT.js} +3 -3
  178. package/dist/cli-bundle/chunks/{chunk-B7PE22W6.js → chunk-XC2HEEOV.js} +4 -4
  179. package/dist/cli-bundle/chunks/{chunk-J5AOEGDC.js → chunk-XNPMDSQQ.js} +8 -8
  180. package/dist/cli-bundle/chunks/{chunk-K2X6U4UA.js → chunk-XXLXJL7V.js} +4 -4
  181. package/dist/cli-bundle/chunks/chunk-XYJK6GIQ.js +851 -0
  182. package/dist/cli-bundle/chunks/chunk-XYJK6GIQ.js.map +7 -0
  183. package/dist/cli-bundle/chunks/{chunk-RLCHOOHC.js → chunk-YJSURTBB.js} +2 -2
  184. package/dist/cli-bundle/chunks/{chunk-PGY23YTC.js → chunk-YKFHF37B.js} +3 -3
  185. package/dist/cli-bundle/chunks/{chunk-JFTKLTEF.js → chunk-YQCWK2MB.js} +4 -4
  186. package/dist/cli-bundle/chunks/{chunk-EYLCSJAI.js → chunk-YQEZWI3R.js} +2 -2
  187. package/dist/cli-bundle/chunks/close-BEP7MHF3.js +12 -0
  188. package/dist/cli-bundle/chunks/{close-CWODTPKG.js → close-Y6QFUJQN.js} +5 -5
  189. package/dist/cli-bundle/chunks/{close-many-CQFUY7MR.js → close-many-JJFW7KTT.js} +14 -14
  190. package/dist/cli-bundle/chunks/close-many-QJ6FKJUE.js +23 -0
  191. package/dist/cli-bundle/chunks/comments-2AOZQ5D2.js +13 -0
  192. package/dist/cli-bundle/chunks/{comments-WGLHR7LB.js → comments-TMHMALA5.js} +7 -7
  193. package/dist/cli-bundle/chunks/{copy-LXVDXH7B.js → copy-FWQA5OU4.js} +4 -4
  194. package/dist/cli-bundle/chunks/copy-N3LCQBMC.js +9 -0
  195. package/dist/cli-bundle/chunks/{create-LBVCYMEG.js → create-AQ5SIGZC.js} +9 -9
  196. package/dist/cli-bundle/chunks/{create-J5U6ND4K.js → create-KOGQ3JKD.js} +9 -9
  197. package/dist/cli-bundle/chunks/delete-6G3MBZ6S.js +10 -0
  198. package/dist/cli-bundle/chunks/{delete-PMJBNY5G.js → delete-YYYFOSEA.js} +4 -4
  199. package/dist/cli-bundle/chunks/{deps-OA26IS25.js → deps-5NC4IZH7.js} +5 -5
  200. package/dist/cli-bundle/chunks/{deps-JZ7TMVCB.js → deps-EVTOQMKW.js} +5 -5
  201. package/dist/cli-bundle/chunks/{docs-FEWB2DQB.js → docs-53NUGMIQ.js} +6 -6
  202. package/dist/cli-bundle/chunks/docs-OWRGDMNY.js +14 -0
  203. package/dist/cli-bundle/chunks/{files-EFIWKFTM.js → files-3PXGXYDB.js} +6 -6
  204. package/dist/cli-bundle/chunks/{files-6YFBJRBG.js → files-EGLKHD7O.js} +6 -6
  205. package/dist/cli-bundle/chunks/focus-KZLIA6WS.js +10 -0
  206. package/dist/cli-bundle/chunks/{focus-4QJR7FOQ.js → focus-SRPASFTN.js} +5 -5
  207. package/dist/cli-bundle/chunks/{history-compact-CKRPDTJN.js → history-compact-G4DULDCX.js} +6 -6
  208. package/dist/cli-bundle/chunks/history-compact-HHIUOMZ7.js +16 -0
  209. package/dist/cli-bundle/chunks/{history-redact-BB3TGDAE.js → history-redact-IUSJ6X3E.js} +4 -4
  210. package/dist/cli-bundle/chunks/{history-redact-D225BHOZ.js → history-redact-THHGRQXV.js} +4 -4
  211. package/dist/cli-bundle/chunks/history-repair-KG7SWXI6.js +16 -0
  212. package/dist/cli-bundle/chunks/{history-repair-RQXKQHL4.js → history-repair-LUQWRS7X.js} +6 -6
  213. package/dist/cli-bundle/chunks/{learnings-JLNLCOL5.js → learnings-2MRNBFJF.js} +7 -7
  214. package/dist/cli-bundle/chunks/learnings-ZVHSALJY.js +13 -0
  215. package/dist/cli-bundle/chunks/{notes-GB47XXQQ.js → notes-73JWKWUD.js} +7 -7
  216. package/dist/cli-bundle/chunks/notes-BAKUL5DJ.js +13 -0
  217. package/dist/cli-bundle/chunks/{plan-VDCJ2PCN.js → plan-AZPMCG37.js} +10 -10
  218. package/dist/cli-bundle/chunks/plan-LEAGLPGP.js +24 -0
  219. package/dist/cli-bundle/chunks/{profile-IVXQEL3D.js → profile-AGUKS52S.js} +9 -9
  220. package/dist/cli-bundle/chunks/{profile-FAU7NZML.js → profile-U2B6Y7GE.js} +9 -9
  221. package/dist/cli-bundle/chunks/{register-list-query-UL4UKBBN.js → register-list-query-A5KRJ5J2.js} +16 -16
  222. package/dist/cli-bundle/chunks/{register-list-query-DKA3EH5D.js → register-list-query-NEYP3TXO.js} +16 -16
  223. package/dist/cli-bundle/chunks/{register-mutation-RBBJ52DK.js → register-mutation-6LOPBAHC.js} +29 -29
  224. package/dist/cli-bundle/chunks/{register-mutation-ARFHRW55.js → register-mutation-GCZOALNJ.js} +29 -29
  225. package/dist/cli-bundle/chunks/{register-operations-ZIBBRSED.js → register-operations-6ZZIF27A.js} +35 -35
  226. package/dist/cli-bundle/chunks/{register-operations-ZUJ5JWPE.js → register-operations-REDIAEGI.js} +35 -35
  227. package/dist/cli-bundle/chunks/{register-setup-TDCGWIOS.js → register-setup-BHPMN5SK.js} +15 -15
  228. package/dist/cli-bundle/chunks/{register-setup-BCVLFEYS.js → register-setup-J3JS2ZVT.js} +15 -15
  229. package/dist/cli-bundle/chunks/{restore-25DLT2Q2.js → restore-E3PRGDN3.js} +6 -6
  230. package/dist/cli-bundle/chunks/restore-KIUYTAEJ.js +14 -0
  231. package/dist/cli-bundle/chunks/{schema-FNU3WE4O.js → schema-5JNFQFUW.js} +6 -6
  232. package/dist/cli-bundle/chunks/{schema-NBCM3RAD.js → schema-TMIW4XZC.js} +6 -6
  233. package/dist/cli-bundle/chunks/update-PQQHLYCC.js +21 -0
  234. package/dist/cli-bundle/chunks/{update-XHSIAIXE.js → update-SA6AG23P.js} +12 -12
  235. package/dist/cli-bundle/chunks/update-many-RQVTFJPD.js +36 -0
  236. package/dist/cli-bundle/chunks/update-many-TV3L3KBX.js +32 -0
  237. package/dist/cli-bundle/main.js +153 -855
  238. package/dist/cli-bundle/main.js.map +4 -4
  239. package/dist/cli-bundle/sdk-runtime.js +54 -54
  240. package/dist/cli-bundle/sdk-testing.js +6 -6
  241. package/dist/cli-bundle/sdk.js +195 -59
  242. package/dist/cli-bundle/sdk.js.map +3 -3
  243. package/dist/core/extensions/item-fields.js +2 -2
  244. package/dist/core/extensions/item-fields.js.map +1 -1
  245. package/dist/sdk/cli-bootstrap.d.ts +122 -0
  246. package/dist/sdk/cli-bootstrap.js +879 -0
  247. package/dist/sdk/cli-bootstrap.js.map +1 -0
  248. package/dist/sdk/eval.d.ts +66 -0
  249. package/dist/sdk/eval.js +186 -0
  250. package/dist/sdk/eval.js.map +1 -0
  251. package/dist/sdk/index.d.ts +16 -4
  252. package/dist/sdk/index.js +18 -6
  253. package/dist/sdk/index.js.map +1 -1
  254. package/dist/{cli/commands → sdk/query}/item-filter-options.d.ts +1 -1
  255. package/dist/{cli/commands → sdk/query}/item-filter-options.js +3 -3
  256. package/dist/sdk/query/item-filter-options.js.map +1 -0
  257. package/dist/sdk/query/list.d.ts +254 -0
  258. package/dist/sdk/query/list.js +1073 -0
  259. package/dist/sdk/query/list.js.map +1 -0
  260. package/dist/sdk/query/parsers.d.ts +9 -0
  261. package/dist/sdk/query/parsers.js +45 -0
  262. package/dist/sdk/query/parsers.js.map +1 -0
  263. package/dist/{cli/commands → sdk/query}/search-pagination.js +4 -4
  264. package/dist/sdk/query/search-pagination.js.map +1 -0
  265. package/dist/{cli/commands → sdk/query}/search-rendering.js +3 -3
  266. package/dist/sdk/query/search-rendering.js.map +1 -0
  267. package/dist/sdk/query/search.d.ts +469 -0
  268. package/dist/sdk/query/search.js +2247 -0
  269. package/dist/sdk/query/search.js.map +1 -0
  270. package/dist/sdk/runtime.d.ts +7 -7
  271. package/dist/sdk/runtime.js +13 -7
  272. package/dist/sdk/runtime.js.map +1 -1
  273. package/dist/sdk/search-refresh-worker.d.ts +2 -0
  274. package/dist/sdk/search-refresh-worker.js +19 -0
  275. package/dist/sdk/search-refresh-worker.js.map +1 -0
  276. package/dist/sdk/stats.d.ts +66 -0
  277. package/dist/sdk/stats.js +151 -0
  278. package/dist/sdk/stats.js.map +1 -0
  279. package/dist/sdk/telemetry-flush.d.ts +2 -0
  280. package/dist/sdk/telemetry-flush.js +14 -0
  281. package/dist/sdk/telemetry-flush.js.map +1 -0
  282. package/dist/sdk/telemetry.d.ts +14 -0
  283. package/dist/sdk/telemetry.js +398 -0
  284. package/dist/sdk/telemetry.js.map +1 -0
  285. package/dist/sdk/test/batch.d.ts +94 -0
  286. package/dist/sdk/test/batch.js +492 -0
  287. package/dist/sdk/test/batch.js.map +1 -0
  288. package/dist/sdk/test/entry.d.ts +6 -0
  289. package/dist/sdk/test/entry.js +74 -0
  290. package/dist/sdk/test/entry.js.map +1 -0
  291. package/dist/sdk/test/execution.d.ts +282 -0
  292. package/dist/sdk/test/execution.js +1817 -0
  293. package/dist/sdk/test/execution.js.map +1 -0
  294. package/dist/sdk/test/parsers.d.ts +48 -0
  295. package/dist/sdk/test/parsers.js +522 -0
  296. package/dist/sdk/test/parsers.js.map +1 -0
  297. package/dist/sdk/test/runs.d.ts +92 -0
  298. package/dist/sdk/test/runs.js +195 -0
  299. package/dist/sdk/test/runs.js.map +1 -0
  300. package/docs/SDK.md +122 -0
  301. package/docs/SDK_PRIMITIVE_INVENTORY.md +5 -3
  302. package/docs/examples/sdk-custom-tool/README.md +27 -0
  303. package/docs/examples/sdk-custom-tool/package.json +13 -0
  304. package/docs/examples/sdk-custom-tool/src/cli.ts +36 -0
  305. package/docs/examples/sdk-custom-tool/src/entry.ts +15 -0
  306. package/docs/examples/sdk-custom-tool/src/index.ts +223 -0
  307. package/marketplace.json +2 -2
  308. package/package.json +4 -4
  309. package/packages/pm-beads/package.json +1 -1
  310. package/packages/pm-calendar/package.json +1 -1
  311. package/packages/pm-command-kit/package.json +1 -1
  312. package/packages/pm-governance-audit/extensions/governance-audit/comments-audit.ts +77 -57
  313. package/packages/pm-governance-audit/extensions/governance-audit/dedupe-audit.ts +202 -194
  314. package/packages/pm-governance-audit/extensions/governance-audit/dedupe-merge.ts +227 -153
  315. package/packages/pm-governance-audit/extensions/governance-audit/normalize.ts +169 -125
  316. package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +130 -81
  317. package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +53 -4
  318. package/packages/pm-governance-audit/package.json +1 -1
  319. package/packages/pm-guide-shell/package.json +1 -1
  320. package/packages/pm-kanban/package.json +1 -1
  321. package/packages/pm-lifecycle-hooks/package.json +1 -1
  322. package/packages/pm-linked-test-adapters/package.json +1 -1
  323. package/packages/pm-search-advanced/package.json +1 -1
  324. package/packages/pm-templates/package.json +1 -1
  325. package/packages/pm-todos/package.json +1 -1
  326. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  327. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  328. package/dist/cli/commands/item-filter-options.js.map +0 -1
  329. package/dist/cli/commands/search-pagination.js.map +0 -1
  330. package/dist/cli/commands/search-rendering.js.map +0 -1
  331. package/dist/cli-bundle/chunks/append-UZVHUO74.js +0 -11
  332. package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +0 -1
  333. package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +0 -7
  334. package/dist/cli-bundle/chunks/chunk-5JLUII3O.js.map +0 -1
  335. package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +0 -1
  336. package/dist/cli-bundle/chunks/chunk-EH2OPHBI.js.map +0 -1
  337. package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +0 -7
  338. package/dist/cli-bundle/chunks/chunk-HYB5AZ63.js.map +0 -7
  339. package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +0 -7
  340. package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +0 -1
  341. package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +0 -1
  342. package/dist/cli-bundle/chunks/chunk-UMOPHQSU.js.map +0 -7
  343. package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +0 -1
  344. package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +0 -7
  345. package/dist/cli-bundle/chunks/chunk-YBLZ2VE7.js.map +0 -7
  346. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +0 -58
  347. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +0 -1
  348. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +0 -68
  349. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +0 -7
  350. package/dist/cli-bundle/chunks/close-W6LI2PKM.js +0 -12
  351. package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +0 -23
  352. package/dist/cli-bundle/chunks/comments-E3TNTK24.js +0 -13
  353. package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +0 -9
  354. package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +0 -10
  355. package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +0 -14
  356. package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +0 -10
  357. package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +0 -16
  358. package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +0 -16
  359. package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +0 -13
  360. package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +0 -13
  361. package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +0 -24
  362. package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +0 -14
  363. package/dist/cli-bundle/chunks/update-WWBYOPXO.js +0 -21
  364. package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +0 -32
  365. package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +0 -36
  366. /package/dist/cli-bundle/chunks/{append-OJQFUQ4T.js.map → append-5YF3TO7I.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{append-UZVHUO74.js.map → append-JHO5K6RP.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{chunk-BCOFWYW4.js.map → chunk-2BX74BAS.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{chunk-APRVSW2O.js.map → chunk-2CXL335K.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{chunk-KG44YSKD.js.map → chunk-2FUOXSRN.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{chunk-HDH3JUGG.js.map → chunk-2IPNL3DR.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{chunk-GM5QHQU6.js.map → chunk-2XOSFSTH.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{chunk-K3WII2ME.js.map → chunk-37DRDP2B.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{chunk-2WSE6PO2.js.map → chunk-37V5MXAU.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{chunk-UWQHLMEB.js.map → chunk-3D4YVTNG.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{chunk-PMOSXADO.js.map → chunk-47HXN6RX.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{chunk-6CFNAVTF.js.map → chunk-5HGZKQUL.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{chunk-2IFFUZLC.js.map → chunk-5UKQLQM2.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{chunk-DM4H7FP4.js.map → chunk-633PKXLT.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{chunk-XSJUSQAE.js.map → chunk-646MQXFW.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{chunk-ZI6VQWQ7.js.map → chunk-66MKH7SZ.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{chunk-S6MQESFR.js.map → chunk-67RO3H4N.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{chunk-34L5OT3Y.js.map → chunk-6DYOZS6C.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{chunk-RRM5JYJC.js.map → chunk-6O44IN44.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{chunk-PENXZX3U.js.map → chunk-74FKFFXO.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{chunk-HO4KXD6I.js.map → chunk-7H5NNCJ5.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{chunk-TQSZFPIS.js.map → chunk-AFGKSHAM.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{chunk-6N2VXVTQ.js.map → chunk-ARGDWQ4J.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{chunk-3U7ZR6M4.js.map → chunk-B57RJHBZ.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{chunk-YCQET3OT.js.map → chunk-BAP7G3N2.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{chunk-QKXHFPYM.js.map → chunk-BIRYX32V.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{chunk-RMLWNPH2.js.map → chunk-BVLOMU6O.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{chunk-2VPAVL7O.js.map → chunk-CKX4WOPC.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{chunk-TKOVBP6C.js.map → chunk-D52ZN3BF.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{chunk-KPMKHGEA.js.map → chunk-D53RTYVI.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{chunk-ODALILG3.js.map → chunk-D5XHO4Q7.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{chunk-YAQEBNY7.js.map → chunk-DDFGYUCQ.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{chunk-EAB64KLB.js.map → chunk-DG2EQRIH.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{chunk-IG3SWA4A.js.map → chunk-EHJFUOXL.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{chunk-ONREO4ST.js.map → chunk-EY7ZE3TG.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{chunk-EJEXHTY5.js.map → chunk-FHOBCGQO.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{chunk-H3EIEWGR.js.map → chunk-FL4D53ND.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{chunk-WUJQK4YV.js.map → chunk-FVNWHUME.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{chunk-INU6DKT5.js.map → chunk-FXFCFL73.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{chunk-QEHQ2GVG.js.map → chunk-FY4RLHSC.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{chunk-EACOH7AU.js.map → chunk-FZGM3PNA.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{chunk-FNSPG7MU.js.map → chunk-G6KM4YKY.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{chunk-AHVTB5I5.js.map → chunk-G6MYGULG.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{chunk-TSMHDIW4.js.map → chunk-GLZKZON6.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{chunk-2JKGO6QX.js.map → chunk-H5IOT54C.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{chunk-SELVXEZK.js.map → chunk-HO4DLBNK.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{chunk-3CLU2XZO.js.map → chunk-HSYV4ZYT.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{chunk-CRVF2JDM.js.map → chunk-HXVHBERL.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{chunk-NU3IMIEA.js.map → chunk-I7DIDUSP.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{chunk-2NCIPMQP.js.map → chunk-I7GY4X6Y.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{chunk-JYFOV7FC.js.map → chunk-IE5KRAKN.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{chunk-UY2ACEMF.js.map → chunk-ILVOOAT4.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{chunk-GOSLKLFE.js.map → chunk-KH6QAHME.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{chunk-J6EY5V4N.js.map → chunk-KOEZCHRF.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{chunk-WQPUU7XD.js.map → chunk-L337QKWJ.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{chunk-LSG2U345.js.map → chunk-L6FVNR7X.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{chunk-FMBNM2EN.js.map → chunk-LSOWTLEM.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{chunk-4223PVZT.js.map → chunk-M7MVOKVV.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{chunk-BKVG6XOA.js.map → chunk-MSGETE6I.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{chunk-3WM75PWC.js.map → chunk-N33FD2UI.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{chunk-UFXU44HV.js.map → chunk-N7I2DGLP.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{chunk-6S3YSUYG.js.map → chunk-NNANAWFH.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{chunk-IJIICKVW.js.map → chunk-NTRQLE2R.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{chunk-SDQLJWBO.js.map → chunk-NVZ6NVHJ.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{chunk-H2Z3FYXQ.js.map → chunk-OWP6QFBV.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{chunk-Q7A43DS4.js.map → chunk-P22HGFFI.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{chunk-NLDFBC6J.js.map → chunk-P56LKFQX.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{chunk-NVPZIJVR.js.map → chunk-PT7MCCGD.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{chunk-P74IZQ7A.js.map → chunk-QKVVV6QO.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{chunk-QIPLHNP7.js.map → chunk-QWBKN3QC.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{chunk-7PIWCHTW.js.map → chunk-R5XTTZSJ.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{chunk-JOUQZENX.js.map → chunk-RC4UOUXA.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{chunk-BEP7WJA2.js.map → chunk-RGMWJLXF.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{chunk-NP22ERDF.js.map → chunk-RTBX3C4C.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{chunk-7Z4LKRS4.js.map → chunk-SPFZV2GR.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{chunk-ULTHRDBP.js.map → chunk-TM5CIO3F.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{chunk-YAROI3PD.js.map → chunk-V7MP6YTN.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{chunk-OW4JWD5M.js.map → chunk-VAHZIPWS.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{chunk-DYH63FX7.js.map → chunk-VE6ZSTQW.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{chunk-3AUGG2DP.js.map → chunk-W5E2UUSH.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{chunk-UOHFKBUV.js.map → chunk-WL3SS45P.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{chunk-QKJGPFAF.js.map → chunk-WU3KAN6A.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{chunk-IA5FKNII.js.map → chunk-X2MGQMZO.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{chunk-TD3LVC7D.js.map → chunk-X5YCTFKT.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{chunk-B7PE22W6.js.map → chunk-XC2HEEOV.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{chunk-J5AOEGDC.js.map → chunk-XNPMDSQQ.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{chunk-K2X6U4UA.js.map → chunk-XXLXJL7V.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{chunk-RLCHOOHC.js.map → chunk-YJSURTBB.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{chunk-PGY23YTC.js.map → chunk-YKFHF37B.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{chunk-JFTKLTEF.js.map → chunk-YQCWK2MB.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{chunk-EYLCSJAI.js.map → chunk-YQEZWI3R.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{close-W6LI2PKM.js.map → close-BEP7MHF3.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{close-CWODTPKG.js.map → close-Y6QFUJQN.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{close-many-CQFUY7MR.js.map → close-many-JJFW7KTT.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{close-many-DLDDVSH5.js.map → close-many-QJ6FKJUE.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{comments-E3TNTK24.js.map → comments-2AOZQ5D2.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{comments-WGLHR7LB.js.map → comments-TMHMALA5.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{copy-LXVDXH7B.js.map → copy-FWQA5OU4.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{copy-Q5ZJPUKR.js.map → copy-N3LCQBMC.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{create-LBVCYMEG.js.map → create-AQ5SIGZC.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{create-J5U6ND4K.js.map → create-KOGQ3JKD.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{delete-WNHB3LYW.js.map → delete-6G3MBZ6S.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{delete-PMJBNY5G.js.map → delete-YYYFOSEA.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{deps-OA26IS25.js.map → deps-5NC4IZH7.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{deps-JZ7TMVCB.js.map → deps-EVTOQMKW.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{docs-FEWB2DQB.js.map → docs-53NUGMIQ.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{docs-HA2AIDBB.js.map → docs-OWRGDMNY.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{files-EFIWKFTM.js.map → files-3PXGXYDB.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{files-6YFBJRBG.js.map → files-EGLKHD7O.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{focus-POIW5LTJ.js.map → focus-KZLIA6WS.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{focus-4QJR7FOQ.js.map → focus-SRPASFTN.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{history-compact-CKRPDTJN.js.map → history-compact-G4DULDCX.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{history-compact-FWG2C7FZ.js.map → history-compact-HHIUOMZ7.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{history-redact-BB3TGDAE.js.map → history-redact-IUSJ6X3E.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{history-redact-D225BHOZ.js.map → history-redact-THHGRQXV.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{history-repair-6GEAM7HE.js.map → history-repair-KG7SWXI6.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{history-repair-RQXKQHL4.js.map → history-repair-LUQWRS7X.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{learnings-JLNLCOL5.js.map → learnings-2MRNBFJF.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{learnings-RSNLSWDC.js.map → learnings-ZVHSALJY.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{notes-GB47XXQQ.js.map → notes-73JWKWUD.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{notes-2WDH6DXU.js.map → notes-BAKUL5DJ.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{plan-VDCJ2PCN.js.map → plan-AZPMCG37.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{plan-DOVI2VMW.js.map → plan-LEAGLPGP.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{profile-IVXQEL3D.js.map → profile-AGUKS52S.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{profile-FAU7NZML.js.map → profile-U2B6Y7GE.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{register-list-query-UL4UKBBN.js.map → register-list-query-A5KRJ5J2.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{register-list-query-DKA3EH5D.js.map → register-list-query-NEYP3TXO.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{register-mutation-RBBJ52DK.js.map → register-mutation-6LOPBAHC.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{register-mutation-ARFHRW55.js.map → register-mutation-GCZOALNJ.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{register-operations-ZIBBRSED.js.map → register-operations-6ZZIF27A.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{register-operations-ZUJ5JWPE.js.map → register-operations-REDIAEGI.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{register-setup-TDCGWIOS.js.map → register-setup-BHPMN5SK.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{register-setup-BCVLFEYS.js.map → register-setup-J3JS2ZVT.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{restore-25DLT2Q2.js.map → restore-E3PRGDN3.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{restore-YPMVUUEX.js.map → restore-KIUYTAEJ.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{schema-FNU3WE4O.js.map → schema-5JNFQFUW.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{schema-NBCM3RAD.js.map → schema-TMIW4XZC.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{update-WWBYOPXO.js.map → update-PQQHLYCC.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{update-XHSIAIXE.js.map → update-SA6AG23P.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{update-many-TA7NGQBO.js.map → update-many-RQVTFJPD.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{update-many-OUGIU5SF.js.map → update-many-TV3L3KBX.js.map} +0 -0
  507. /package/dist/{cli/commands → sdk/query}/search-pagination.d.ts +0 -0
  508. /package/dist/{cli/commands → sdk/query}/search-rendering.d.ts +0 -0
@@ -1,53 +1,53 @@
1
1
  import {
2
2
  runDocs
3
- } from "./chunk-ODALILG3.js";
3
+ } from "./chunk-D5XHO4Q7.js";
4
4
  import {
5
5
  collectDanglingDependencyReferences,
6
6
  createRelationshipKindRegistry
7
- } from "./chunk-BKVG6XOA.js";
7
+ } from "./chunk-MSGETE6I.js";
8
8
  import {
9
9
  scanHistoryDrift
10
- } from "./chunk-KG44YSKD.js";
10
+ } from "./chunk-2FUOXSRN.js";
11
11
  import {
12
12
  runFiles
13
- } from "./chunk-ZI6VQWQ7.js";
13
+ } from "./chunk-66MKH7SZ.js";
14
14
  import {
15
15
  isRemoteLinkedArtifactReference
16
- } from "./chunk-WUJQK4YV.js";
16
+ } from "./chunk-FVNWHUME.js";
17
17
  import {
18
18
  runUpdate
19
- } from "./chunk-CRVF2JDM.js";
19
+ } from "./chunk-HXVHBERL.js";
20
20
  import {
21
21
  wrapOwnershipConflict
22
- } from "./chunk-QIPLHNP7.js";
22
+ } from "./chunk-QWBKN3QC.js";
23
23
  import {
24
24
  PM_TELEMETRY_SOURCE_CONTEXT_VALUES,
25
25
  TELEMETRY_MAX_QUEUE_ENTRY_ATTEMPTS,
26
26
  TELEMETRY_SCHEMA_VERSION,
27
27
  flushTelemetryQueueNow
28
- } from "./chunk-NP22ERDF.js";
28
+ } from "./chunk-RTBX3C4C.js";
29
29
  import {
30
30
  buildCapabilityContractMetadata,
31
31
  buildRegistrationCollisionRemediation,
32
32
  collectUnknownCapabilityGuidance,
33
33
  readManagedExtensionState,
34
34
  runInit
35
- } from "./chunk-J6364LFM.js";
35
+ } from "./chunk-2MPMKJF2.js";
36
36
  import {
37
37
  collectStaleVectorizationIds,
38
38
  runNext
39
- } from "./chunk-E2OJMKML.js";
39
+ } from "./chunk-DCC2AQBD.js";
40
40
  import {
41
41
  computeContentFieldUtilization
42
- } from "./chunk-XXXF6PAQ.js";
42
+ } from "./chunk-7LTCLTRG.js";
43
43
  import {
44
44
  computeMetadataCoverage,
45
45
  groupItemsByDimension,
46
46
  lifecycleClassifierFromStatusRegistry
47
- } from "./chunk-IJIICKVW.js";
47
+ } from "./chunk-NTRQLE2R.js";
48
48
  import {
49
49
  parseLimit
50
- } from "./chunk-NU3IMIEA.js";
50
+ } from "./chunk-I7DIDUSP.js";
51
51
  import {
52
52
  resolveAuthor
53
53
  } from "./chunk-YRYYFGV3.js";
@@ -60,7 +60,7 @@ import {
60
60
  resolveProviderConfigSource,
61
61
  resolveSettingsWithSemanticRuntimeDefaults,
62
62
  resolveVectorStores
63
- } from "./chunk-7B67ZL4N.js";
63
+ } from "./chunk-B6SH2YNN.js";
64
64
  import {
65
65
  ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,
66
66
  ACTIVITY_FLAG_CONTRACTS,
@@ -150,7 +150,7 @@ import {
150
150
  UPGRADE_FLAG_CONTRACTS,
151
151
  VALIDATE_FLAG_CONTRACTS,
152
152
  compactFlagAliasContracts
153
- } from "./chunk-H5APFTHZ.js";
153
+ } from "./chunk-S6FF7VW6.js";
154
154
  import {
155
155
  LINKED_TEST_PM_CONTEXT_MODE_VALUES,
156
156
  LINKED_TEST_PROTECTED_ENV_KEYS,
@@ -167,12 +167,12 @@ import {
167
167
  parseLinkedTestRegexList,
168
168
  parseLinkedTestStringList,
169
169
  runCreate
170
- } from "./chunk-UMOPHQSU.js";
170
+ } from "./chunk-MR4SHYR4.js";
171
171
  import {
172
172
  createStdinTokenResolver,
173
173
  parseCsvKv,
174
174
  parseOptionalNumber
175
- } from "./chunk-TKOVBP6C.js";
175
+ } from "./chunk-D52ZN3BF.js";
176
176
  import {
177
177
  CURRENT_ITEM_FORMAT_VERSION,
178
178
  compareTimestampStrings,
@@ -199,7 +199,7 @@ import {
199
199
  stableValueEquals,
200
200
  toItemRecord,
201
201
  writeSettings
202
- } from "./chunk-XSJUSQAE.js";
202
+ } from "./chunk-646MQXFW.js";
203
203
  import {
204
204
  DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS,
205
205
  DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS,
@@ -241,7 +241,7 @@ import {
241
241
  statusIsTerminal,
242
242
  toNonEmptyStringOrUndefined,
243
243
  writeFileAtomic
244
- } from "./chunk-BSEQUTQP.js";
244
+ } from "./chunk-WACRQ26A.js";
245
245
 
246
246
  // dist/sdk/start-task-status.js
247
247
  !(function() {
@@ -5175,7 +5175,7 @@ function runRemind(title, options, global2) {
5175
5175
  return runCreate(createOptions, global2);
5176
5176
  }
5177
5177
 
5178
- // dist/cli/commands/stats.js
5178
+ // dist/sdk/stats.js
5179
5179
  import fs6 from "node:fs/promises";
5180
5180
  import path6 from "node:path";
5181
5181
 
@@ -5271,11 +5271,11 @@ function computeHistoryStorageStats(streams, options) {
5271
5271
  };
5272
5272
  }
5273
5273
 
5274
- // dist/cli/commands/stats.js
5274
+ // dist/sdk/stats.js
5275
5275
  !(function() {
5276
5276
  try {
5277
5277
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5278
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f76ffd47-6478-5a3f-b18f-990a9332c774");
5278
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "3abba5c6-fe9b-55de-bafb-3f3c604df10c");
5279
5279
  } catch (e2) {
5280
5280
  }
5281
5281
  })();
@@ -5297,9 +5297,6 @@ function countNonEmptyLines(raw) {
5297
5297
  }
5298
5298
  return raw.split(/\r?\n/u).filter((line) => line.trim().length > 0).length;
5299
5299
  }
5300
- function isNotFoundError(error) {
5301
- return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
5302
- }
5303
5300
  async function readHistoryStreamContents(pmRoot) {
5304
5301
  const historyDir = path6.join(pmRoot, "history");
5305
5302
  if (!await pathExists(historyDir)) {
@@ -5313,14 +5310,9 @@ async function readHistoryStreamContents(pmRoot) {
5313
5310
  const streams = [];
5314
5311
  for (const file of historyFiles) {
5315
5312
  const historyPath = path6.join(historyDir, file);
5316
- let raw;
5317
- try {
5318
- raw = await fs6.readFile(historyPath, "utf8");
5319
- } catch (error) {
5320
- if (isNotFoundError(error)) {
5321
- continue;
5322
- }
5323
- throw error;
5313
+ const raw = await readFileIfExists(historyPath);
5314
+ if (raw === null) {
5315
+ continue;
5324
5316
  }
5325
5317
  await runActiveOnReadHooks({
5326
5318
  path: historyPath,
@@ -5389,13 +5381,22 @@ async function runStats(global2, options = {}) {
5389
5381
  };
5390
5382
  }
5391
5383
 
5392
- // dist/cli/commands/telemetry.js
5384
+ // dist/cli/commands/stats.js
5385
+ !(function() {
5386
+ try {
5387
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5388
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "81afc203-9f08-5d9d-ac28-566f521ccfba");
5389
+ } catch (e2) {
5390
+ }
5391
+ })();
5392
+
5393
+ // dist/sdk/telemetry.js
5393
5394
  import fs7 from "node:fs/promises";
5394
5395
  import path7 from "node:path";
5395
5396
  !(function() {
5396
5397
  try {
5397
5398
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5398
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a0a5873e-adac-517e-901b-9462c208164c");
5399
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0f28d1b5-3b78-5a74-8c2d-592f5dbdadda");
5399
5400
  } catch (e2) {
5400
5401
  }
5401
5402
  })();
@@ -5409,19 +5410,32 @@ var TELEMETRY_SUBCOMMANDS = [
5409
5410
  "stats",
5410
5411
  "clear"
5411
5412
  ];
5412
- function nearestRankPercentile(sortedAscending, fraction) {
5413
+ var nearestRankPercentile = (sortedAscending, fraction) => {
5413
5414
  const rank = Math.ceil(fraction * sortedAscending.length);
5414
5415
  const index = Math.min(sortedAscending.length - 1, Math.max(0, rank - 1));
5415
5416
  return sortedAscending[index];
5416
- }
5417
- function normalizeTelemetryQueueEntry(entry) {
5418
- const command = typeof entry.event.command === "string" && entry.event.command.trim().length > 0 ? entry.event.command : "<unknown>";
5419
- const eventType = typeof entry.event.event_type === "string" && entry.event.event_type.trim().length > 0 ? entry.event.event_type : "unknown";
5420
- const eventSchemaVersion = typeof entry.event.schema_version === "number" && Number.isFinite(entry.event.schema_version) ? Math.trunc(entry.event.schema_version) : void 0;
5421
- const clientSchemaVersion = typeof entry.client_schema_version === "number" && Number.isFinite(entry.client_schema_version) ? Math.trunc(entry.client_schema_version) : void 0;
5422
- return { command, eventType, eventSchemaVersion, clientSchemaVersion };
5423
- }
5424
- function createTelemetryStatsAccumulator() {
5417
+ };
5418
+ var normalizeTelemetryText = (value, fallback) => {
5419
+ if (typeof value !== "string") {
5420
+ return fallback;
5421
+ }
5422
+ return value.trim().length > 0 ? value : fallback;
5423
+ };
5424
+ var normalizeFiniteInteger = (value) => {
5425
+ if (typeof value !== "number" || !Number.isFinite(value)) {
5426
+ return void 0;
5427
+ }
5428
+ return Math.trunc(value);
5429
+ };
5430
+ var normalizeTelemetryQueueEntry = (entry) => {
5431
+ return {
5432
+ command: normalizeTelemetryText(entry.event.command, "<unknown>"),
5433
+ eventType: normalizeTelemetryText(entry.event.event_type, "unknown"),
5434
+ eventSchemaVersion: normalizeFiniteInteger(entry.event.schema_version),
5435
+ clientSchemaVersion: normalizeFiniteInteger(entry.client_schema_version)
5436
+ };
5437
+ };
5438
+ var createTelemetryStatsAccumulator = () => {
5425
5439
  return {
5426
5440
  count: 0,
5427
5441
  max_attempts: 0,
@@ -5433,9 +5447,20 @@ function createTelemetryStatsAccumulator() {
5433
5447
  error_count: 0,
5434
5448
  resolution_counts: {}
5435
5449
  };
5436
- }
5437
- function recordTelemetryFinishPayload(current, payload) {
5438
- const durationMs = typeof payload?.duration_ms === "number" && Number.isFinite(payload.duration_ms) ? payload.duration_ms : void 0;
5450
+ };
5451
+ var readTelemetryDuration = (payload) => {
5452
+ const value = payload?.duration_ms;
5453
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
5454
+ };
5455
+ var readTelemetryResolution = (payload) => {
5456
+ const value = payload?.command_resolution;
5457
+ return normalizeTelemetryText(value, "") || void 0;
5458
+ };
5459
+ var incrementTelemetryCount = (counts, key) => {
5460
+ counts[key] = (counts[key] ?? 0) + 1;
5461
+ };
5462
+ var recordTelemetryFinishPayload = (current, payload) => {
5463
+ const durationMs = readTelemetryDuration(payload);
5439
5464
  if (durationMs !== void 0) {
5440
5465
  current.finish_durations_ms.push(durationMs);
5441
5466
  }
@@ -5444,30 +5469,31 @@ function recordTelemetryFinishPayload(current, payload) {
5444
5469
  } else {
5445
5470
  current.error_count += 1;
5446
5471
  }
5447
- const resolution = typeof payload?.command_resolution === "string" && payload.command_resolution.trim().length > 0 ? payload.command_resolution : void 0;
5472
+ const resolution = readTelemetryResolution(payload);
5448
5473
  if (resolution !== void 0) {
5449
- current.resolution_counts[resolution] = (current.resolution_counts[resolution] ?? 0) + 1;
5474
+ incrementTelemetryCount(current.resolution_counts, resolution);
5450
5475
  }
5451
- }
5452
- function recordTelemetryQueueEntry(grouped, entry) {
5476
+ };
5477
+ var normalizeTelemetryAttempts = (attempts) => Number.isFinite(attempts) ? Math.max(0, Math.trunc(attempts)) : 0;
5478
+ var addTelemetryDimension = (values, value) => {
5479
+ if (value !== void 0) {
5480
+ values.add(value);
5481
+ }
5482
+ };
5483
+ var recordTelemetryQueueEntry = (grouped, entry) => {
5453
5484
  const normalized = normalizeTelemetryQueueEntry(entry);
5454
5485
  const current = grouped.get(normalized.command) ?? createTelemetryStatsAccumulator();
5455
- const attempts = Number.isFinite(entry.attempts) ? Math.max(0, Math.trunc(entry.attempts)) : 0;
5456
5486
  current.count += 1;
5457
- current.max_attempts = Math.max(current.max_attempts, attempts);
5458
- current.event_type_counts[normalized.eventType] = (current.event_type_counts[normalized.eventType] ?? 0) + 1;
5459
- if (normalized.eventSchemaVersion !== void 0) {
5460
- current.event_schema_versions.add(normalized.eventSchemaVersion);
5461
- }
5462
- if (normalized.clientSchemaVersion !== void 0) {
5463
- current.client_schema_versions.add(normalized.clientSchemaVersion);
5464
- }
5487
+ current.max_attempts = Math.max(current.max_attempts, normalizeTelemetryAttempts(entry.attempts));
5488
+ incrementTelemetryCount(current.event_type_counts, normalized.eventType);
5489
+ addTelemetryDimension(current.event_schema_versions, normalized.eventSchemaVersion);
5490
+ addTelemetryDimension(current.client_schema_versions, normalized.clientSchemaVersion);
5465
5491
  if (normalized.eventType === "command_finish") {
5466
5492
  recordTelemetryFinishPayload(current, entry.event.payload);
5467
5493
  }
5468
5494
  grouped.set(normalized.command, current);
5469
- }
5470
- function buildTelemetryStatsBucket(command, value) {
5495
+ };
5496
+ var buildTelemetryStatsBucket = (command, value) => {
5471
5497
  const finishCount = value.ok_count + value.error_count;
5472
5498
  const sortedDurations = [...value.finish_durations_ms].sort((left, right) => left - right);
5473
5499
  const resolutionEntries = Object.entries(value.resolution_counts).sort((left, right) => left[0].localeCompare(right[0]));
@@ -5490,8 +5516,8 @@ function buildTelemetryStatsBucket(command, value) {
5490
5516
  } : {},
5491
5517
  ...resolutionEntries.length > 0 ? { command_resolution_counts: Object.fromEntries(resolutionEntries) } : {}
5492
5518
  };
5493
- }
5494
- function normalizeTelemetrySubcommand(value) {
5519
+ };
5520
+ var normalizeTelemetrySubcommand = (value) => {
5495
5521
  const normalized = (value ?? "status").trim().toLowerCase();
5496
5522
  if (TELEMETRY_SUBCOMMANDS.includes(normalized)) {
5497
5523
  return normalized;
@@ -5505,78 +5531,93 @@ function normalizeTelemetrySubcommand(value) {
5505
5531
  "pm telemetry clear"
5506
5532
  ]
5507
5533
  });
5508
- }
5509
- function parseTelemetryStatsLimit(raw) {
5534
+ };
5535
+ var throwInvalidTelemetryLimit = () => {
5536
+ throw new PmCliError("--limit must be a positive integer", EXIT_CODE.USAGE);
5537
+ };
5538
+ var requirePositiveTelemetryLimit = (value) => {
5539
+ if ([!Number.isFinite(value), !Number.isInteger(value), value <= 0].includes(true)) {
5540
+ return throwInvalidTelemetryLimit();
5541
+ }
5542
+ return value;
5543
+ };
5544
+ var parseTelemetryStringLimit = (raw) => {
5545
+ const trimmed = raw.trim();
5546
+ if ([trimmed.length === 0, !/^\d+$/.test(trimmed)].includes(true)) {
5547
+ return throwInvalidTelemetryLimit();
5548
+ }
5549
+ return requirePositiveTelemetryLimit(Number.parseInt(trimmed, 10));
5550
+ };
5551
+ var parseTelemetryStatsLimit = (raw) => {
5510
5552
  if (raw === void 0) {
5511
5553
  return DEFAULT_STATS_LIMIT;
5512
5554
  }
5513
5555
  if (typeof raw === "number") {
5514
- if (!Number.isFinite(raw) || !Number.isInteger(raw) || raw <= 0) {
5515
- throw new PmCliError("--limit must be a positive integer", EXIT_CODE.USAGE);
5516
- }
5517
- return raw;
5556
+ return requirePositiveTelemetryLimit(raw);
5518
5557
  }
5519
- const trimmed = raw.trim();
5520
- if (trimmed.length === 0 || !/^\d+$/.test(trimmed)) {
5521
- throw new PmCliError("--limit must be a positive integer", EXIT_CODE.USAGE);
5558
+ if (typeof raw === "string") {
5559
+ return parseTelemetryStringLimit(raw);
5522
5560
  }
5523
- const parsed = Number.parseInt(trimmed, 10);
5524
- if (!Number.isFinite(parsed) || parsed <= 0) {
5525
- throw new PmCliError("--limit must be a positive integer", EXIT_CODE.USAGE);
5561
+ return throwInvalidTelemetryLimit();
5562
+ };
5563
+ var isTelemetryQueueEntry = (value) => {
5564
+ if (typeof value !== "object" || value === null) {
5565
+ return false;
5526
5566
  }
5527
- return parsed;
5528
- }
5529
- function parseTelemetryQueue2(raw) {
5530
- if (raw === null || raw.trim().length === 0) {
5531
- return {
5532
- rows_total: 0,
5533
- valid_entries: 0,
5534
- invalid_rows: 0,
5535
- entries: []
5536
- };
5567
+ const candidate = value;
5568
+ return typeof candidate.attempts === "number" && typeof candidate.event === "object" && candidate.event !== null;
5569
+ };
5570
+ var parseTelemetryQueueRow = (row) => {
5571
+ try {
5572
+ const parsed = JSON.parse(row);
5573
+ return isTelemetryQueueEntry(parsed) ? parsed : void 0;
5574
+ } catch {
5575
+ return void 0;
5576
+ }
5577
+ };
5578
+ var splitTelemetryQueueRows = (raw) => {
5579
+ if (raw === null) {
5580
+ return [];
5537
5581
  }
5582
+ return raw.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
5583
+ };
5584
+ var parseTelemetryQueue2 = (raw) => {
5585
+ const rows = splitTelemetryQueueRows(raw);
5538
5586
  const entries = [];
5539
- let rowsTotal = 0;
5540
5587
  let invalidRows = 0;
5541
- for (const line of raw.split("\n")) {
5542
- const trimmed = line.trim();
5543
- if (trimmed.length === 0) {
5544
- continue;
5545
- }
5546
- rowsTotal += 1;
5547
- try {
5548
- const parsed = JSON.parse(trimmed);
5549
- if (typeof parsed === "object" && parsed !== null && typeof parsed.attempts === "number" && typeof parsed.event === "object" && parsed.event !== null) {
5550
- entries.push(parsed);
5551
- } else {
5552
- invalidRows += 1;
5553
- }
5554
- } catch {
5588
+ for (const row of rows) {
5589
+ const parsed = parseTelemetryQueueRow(row);
5590
+ if (parsed === void 0) {
5555
5591
  invalidRows += 1;
5592
+ } else {
5593
+ entries.push(parsed);
5556
5594
  }
5557
5595
  }
5558
5596
  return {
5559
- rows_total: rowsTotal,
5597
+ rows_total: rows.length,
5560
5598
  valid_entries: entries.length,
5561
5599
  invalid_rows: invalidRows,
5562
5600
  entries
5563
5601
  };
5564
- }
5565
- async function readTelemetryRuntimeState(statePath) {
5602
+ };
5603
+ var isTelemetryRuntimeState = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
5604
+ var parseTelemetryRuntimeState2 = (raw) => {
5605
+ try {
5606
+ const parsed = JSON.parse(raw);
5607
+ return isTelemetryRuntimeState(parsed) ? parsed : {};
5608
+ } catch {
5609
+ return {};
5610
+ }
5611
+ };
5612
+ var readTelemetryRuntimeState = async (statePath) => {
5566
5613
  const stateRaw = await readFileIfExists(statePath);
5567
5614
  if (stateRaw === null || stateRaw.trim().length === 0) {
5568
5615
  return {};
5569
5616
  }
5570
- try {
5571
- const parsed = JSON.parse(stateRaw);
5572
- if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
5573
- return parsed;
5574
- }
5575
- } catch {
5576
- }
5577
- return {};
5578
- }
5579
- async function buildTelemetryStatusSummary(globalPmRoot) {
5617
+ return parseTelemetryRuntimeState2(stateRaw);
5618
+ };
5619
+ var nullableTelemetryStateValue = (value) => value ?? null;
5620
+ var buildTelemetryStatusSummary = async (globalPmRoot) => {
5580
5621
  const settings = await readSettings(globalPmRoot);
5581
5622
  const queuePath = path7.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2);
5582
5623
  const statePath = path7.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2);
@@ -5591,267 +5632,111 @@ async function buildTelemetryStatusSummary(globalPmRoot) {
5591
5632
  queue_rows_total: queue.rows_total,
5592
5633
  queue_entries: queue.valid_entries,
5593
5634
  queue_invalid_rows: queue.invalid_rows,
5594
- queue_size_bytes: queueRaw === null ? 0 : Buffer.byteLength(queueRaw, "utf8"),
5595
- last_attempted_flush_at: runtimeState.last_attempted_flush_at ?? null,
5596
- last_successful_flush_at: runtimeState.last_successful_flush_at ?? null,
5597
- last_failed_flush_at: runtimeState.last_failed_flush_at ?? null,
5598
- last_failed_flush_error: runtimeState.last_failed_flush_error ?? null
5635
+ queue_size_bytes: Buffer.byteLength(queueRaw ?? "", "utf8"),
5636
+ last_attempted_flush_at: nullableTelemetryStateValue(runtimeState.last_attempted_flush_at),
5637
+ last_successful_flush_at: nullableTelemetryStateValue(runtimeState.last_successful_flush_at),
5638
+ last_failed_flush_at: nullableTelemetryStateValue(runtimeState.last_failed_flush_at),
5639
+ last_failed_flush_error: nullableTelemetryStateValue(runtimeState.last_failed_flush_error)
5599
5640
  };
5600
- }
5601
- function buildTelemetryStatsBuckets(entries) {
5641
+ };
5642
+ var buildTelemetryStatsBuckets = (entries) => {
5602
5643
  const grouped = /* @__PURE__ */ new Map();
5603
5644
  for (const entry of entries) {
5604
5645
  recordTelemetryQueueEntry(grouped, entry);
5605
5646
  }
5606
5647
  return [...grouped.entries()].map(([command, value]) => buildTelemetryStatsBucket(command, value)).sort((left, right) => right.count - left.count || left.command.localeCompare(right.command));
5607
- }
5608
- async function runTelemetry(options, _global) {
5609
- void _global;
5610
- const subcommand = normalizeTelemetrySubcommand(options.subcommand);
5611
- const globalPmRoot = resolveGlobalPmRoot(process.cwd());
5612
- const queuePath = path7.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2);
5613
- const statePath = path7.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2);
5614
- if (subcommand === "status") {
5615
- return {
5616
- action: "telemetry",
5617
- subcommand,
5618
- status: await buildTelemetryStatusSummary(globalPmRoot),
5619
- generated_at: nowIso()
5620
- };
5621
- }
5622
- if (subcommand === "flush") {
5623
- const before = await buildTelemetryStatusSummary(globalPmRoot);
5624
- await flushTelemetryQueueNow(globalPmRoot);
5625
- const after = await buildTelemetryStatusSummary(globalPmRoot);
5626
- return {
5627
- action: "telemetry",
5628
- subcommand,
5629
- queue_entries_before: before.queue_entries,
5630
- queue_entries_after: after.queue_entries,
5631
- queue_drained: after.queue_entries < before.queue_entries,
5632
- status: after,
5633
- generated_at: nowIso()
5634
- };
5635
- }
5636
- if (subcommand === "stats") {
5637
- const limit = parseTelemetryStatsLimit(options.limit);
5638
- const queueRaw = await readFileIfExists(queuePath);
5639
- const queue = parseTelemetryQueue2(queueRaw);
5640
- const buckets = buildTelemetryStatsBuckets(queue.entries);
5641
- const selected = buckets.slice(0, limit);
5642
- return {
5643
- action: "telemetry",
5644
- subcommand,
5645
- limit,
5646
- total_commands: buckets.length,
5647
- queue_entries: queue.valid_entries,
5648
- queue_invalid_rows: queue.invalid_rows,
5649
- queue_rows_total: queue.rows_total,
5650
- truncated: buckets.length > selected.length,
5651
- stats: selected,
5652
- generated_at: nowIso()
5653
- };
5654
- }
5655
- const settings = await readSettings(globalPmRoot);
5656
- const previousEnabled = settings.telemetry.enabled;
5657
- const previousInstallationId = settings.telemetry.installation_id;
5658
- const previousFirstRunPromptCompleted = settings.telemetry.first_run_prompt_completed;
5648
+ };
5649
+ var runTelemetryStatus = async (_options, context) => ({
5650
+ action: "telemetry",
5651
+ subcommand: "status",
5652
+ status: await buildTelemetryStatusSummary(context.globalPmRoot),
5653
+ generated_at: nowIso()
5654
+ });
5655
+ var runTelemetryFlush = async (_options, context) => {
5656
+ const before = await buildTelemetryStatusSummary(context.globalPmRoot);
5657
+ await flushTelemetryQueueNow(context.globalPmRoot);
5658
+ const after = await buildTelemetryStatusSummary(context.globalPmRoot);
5659
+ return {
5660
+ action: "telemetry",
5661
+ subcommand: "flush",
5662
+ queue_entries_before: before.queue_entries,
5663
+ queue_entries_after: after.queue_entries,
5664
+ queue_drained: after.queue_entries < before.queue_entries,
5665
+ status: after,
5666
+ generated_at: nowIso()
5667
+ };
5668
+ };
5669
+ var runTelemetryStats = async (options, context) => {
5670
+ const limit = parseTelemetryStatsLimit(options.limit);
5671
+ const queueRaw = await readFileIfExists(context.queuePath);
5672
+ const queue = parseTelemetryQueue2(queueRaw);
5673
+ const buckets = buildTelemetryStatsBuckets(queue.entries);
5674
+ const selected = buckets.slice(0, limit);
5675
+ return {
5676
+ action: "telemetry",
5677
+ subcommand: "stats",
5678
+ limit,
5679
+ total_commands: buckets.length,
5680
+ queue_entries: queue.valid_entries,
5681
+ queue_invalid_rows: queue.invalid_rows,
5682
+ queue_rows_total: queue.rows_total,
5683
+ truncated: buckets.length > selected.length,
5684
+ stats: selected,
5685
+ generated_at: nowIso()
5686
+ };
5687
+ };
5688
+ var runTelemetryClear = async (_options, context) => {
5689
+ const settings = await readSettings(context.globalPmRoot);
5690
+ const settingsChanged = [
5691
+ settings.telemetry.enabled !== false,
5692
+ settings.telemetry.installation_id !== "",
5693
+ settings.telemetry.first_run_prompt_completed !== true
5694
+ ].includes(true);
5659
5695
  settings.telemetry.enabled = false;
5660
5696
  settings.telemetry.first_run_prompt_completed = true;
5661
5697
  settings.telemetry.installation_id = "";
5662
- const settingsChanged = previousEnabled !== settings.telemetry.enabled || previousInstallationId !== settings.telemetry.installation_id || previousFirstRunPromptCompleted !== settings.telemetry.first_run_prompt_completed;
5663
5698
  if (settingsChanged) {
5664
- await writeSettings(globalPmRoot, settings, "telemetry:clear");
5699
+ await writeSettings(context.globalPmRoot, settings, "telemetry:clear");
5665
5700
  }
5666
- const telemetryRuntimePath = path7.join(globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);
5701
+ const telemetryRuntimePath = path7.join(context.globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);
5667
5702
  const existed = await pathExists(telemetryRuntimePath);
5668
5703
  await fs7.rm(telemetryRuntimePath, { recursive: true, force: true });
5669
- const queueExistsAfter = await pathExists(queuePath);
5670
- const stateExistsAfter = await pathExists(statePath);
5671
5704
  return {
5672
5705
  action: "telemetry",
5673
- subcommand,
5706
+ subcommand: "clear",
5674
5707
  settings_changed: settingsChanged,
5675
5708
  runtime_dir_removed: existed && !await pathExists(telemetryRuntimePath),
5676
- queue_exists_after: queueExistsAfter,
5677
- state_exists_after: stateExistsAfter,
5678
- status: await buildTelemetryStatusSummary(globalPmRoot),
5709
+ queue_exists_after: await pathExists(context.queuePath),
5710
+ state_exists_after: await pathExists(context.statePath),
5711
+ status: await buildTelemetryStatusSummary(context.globalPmRoot),
5679
5712
  generated_at: nowIso()
5680
5713
  };
5681
- }
5682
-
5683
- // dist/cli/commands/test.js
5684
- import { spawn } from "node:child_process";
5685
- import { cp, mkdir, mkdtemp, readdir, rm } from "node:fs/promises";
5686
- import { tmpdir } from "node:os";
5687
- import path8 from "node:path";
5688
-
5689
- // dist/core/test/item-test-run-tracking.js
5690
- !(function() {
5691
- try {
5692
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5693
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "da2481e4-5f2e-5f0c-99fb-932ee6f8ce6d");
5694
- } catch (e2) {
5695
- }
5696
- })();
5697
- var DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT = 20;
5698
- function trackedTestRunHistoryLimit() {
5699
- const raw = process.env.PM_TRACKED_TEST_RUN_HISTORY_LIMIT;
5700
- if (!raw || raw.trim().length === 0) {
5701
- return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
5702
- }
5703
- const parsed = Number.parseInt(raw, 10);
5704
- if (!Number.isFinite(parsed) || parsed <= 0) {
5705
- return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
5706
- }
5707
- return parsed;
5708
- }
5709
- function normalizeTrackedTestRunSummaries(entries) {
5710
- return [...entries].filter((entry) => entry.run_id.trim().length > 0 && entry.started_at.trim().length > 0 && entry.finished_at.trim().length > 0 && entry.recorded_at.trim().length > 0).sort((left, right) => {
5711
- const byRecorded = compareTimestampStrings(left.recorded_at, right.recorded_at);
5712
- if (byRecorded !== 0)
5713
- return byRecorded;
5714
- const byRunId = left.run_id.localeCompare(right.run_id);
5715
- if (byRunId !== 0)
5716
- return byRunId;
5717
- return left.kind.localeCompare(right.kind);
5718
- });
5719
- }
5720
- async function appendTrackedTestRunSummary(options) {
5721
- const historyLimit = trackedTestRunHistoryLimit();
5722
- await mutateItem({
5723
- pmRoot: options.pmRoot,
5724
- settings: options.settings,
5725
- id: options.itemId,
5726
- op: "test_run_track",
5727
- author: options.author,
5728
- message: options.message,
5729
- force: false,
5730
- mutate(document) {
5731
- const current = document.metadata.test_runs ?? [];
5732
- const next = normalizeTrackedTestRunSummaries([
5733
- ...current,
5734
- options.entry
5735
- ]);
5736
- const bounded = next.length > historyLimit ? next.slice(next.length - historyLimit) : next;
5737
- document.metadata.test_runs = bounded;
5738
- return { changedFields: ["test_runs"] };
5739
- }
5714
+ };
5715
+ var TELEMETRY_COMMAND_HANDLERS = {
5716
+ status: runTelemetryStatus,
5717
+ flush: runTelemetryFlush,
5718
+ stats: runTelemetryStats,
5719
+ clear: runTelemetryClear
5720
+ };
5721
+ var runTelemetry = async (options, _global) => {
5722
+ void _global;
5723
+ const subcommand = normalizeTelemetrySubcommand(options.subcommand);
5724
+ const globalPmRoot = resolveGlobalPmRoot(process.cwd());
5725
+ return TELEMETRY_COMMAND_HANDLERS[subcommand](options, {
5726
+ globalPmRoot,
5727
+ queuePath: path7.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2),
5728
+ statePath: path7.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2)
5740
5729
  });
5741
- }
5730
+ };
5742
5731
 
5743
- // dist/core/test/run-selectors.js
5732
+ // dist/cli/commands/telemetry.js
5744
5733
  !(function() {
5745
5734
  try {
5746
5735
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5747
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "183637de-1877-5037-a199-0b11e6247ada");
5736
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "d305520e-3ead-55e7-8382-3a12e9692e93");
5748
5737
  } catch (e2) {
5749
5738
  }
5750
5739
  })();
5751
- var MAX_SELECTOR_ENTRY_LABEL_LENGTH = 100;
5752
- function parseOnlyIndexValue(raw, optionName = "--only-index") {
5753
- const value = typeof raw === "number" ? raw : Number(String(raw).trim());
5754
- if (!Number.isInteger(value) || value < 1) {
5755
- 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);
5756
- }
5757
- return value;
5758
- }
5759
- function summarizeSelectorEntry(entry) {
5760
- const label = entry.command ?? entry.path ?? "<no command>";
5761
- const normalized = label.replaceAll(/\s+/g, " ").trim() || "<no command>";
5762
- if (normalized.length <= MAX_SELECTOR_ENTRY_LABEL_LENGTH) {
5763
- return normalized;
5764
- }
5765
- return `${normalized.slice(0, MAX_SELECTOR_ENTRY_LABEL_LENGTH - 3)}...`;
5766
- }
5767
- function describeLinkedTestEntries(tests) {
5768
- return tests.map((entry, index) => `${index + 1}. ${summarizeSelectorEntry(entry)}`).join("; ");
5769
- }
5770
- function activeSelectorKinds(selector) {
5771
- const kinds = [];
5772
- if (selector.match !== void 0) {
5773
- kinds.push("match");
5774
- }
5775
- if (selector.onlyIndex !== void 0) {
5776
- kinds.push("only-index");
5777
- }
5778
- if (selector.onlyLast === true) {
5779
- kinds.push("only-last");
5780
- }
5781
- return kinds;
5782
- }
5783
- function entryMatchesSubstring(entry, needle) {
5784
- const command = entry.command?.toLowerCase() ?? "";
5785
- const entryPath = entry.path?.toLowerCase() ?? "";
5786
- return command.includes(needle) || entryPath.includes(needle);
5787
- }
5788
- function resolveLinkedTestRunSelection(tests, selector) {
5789
- const kinds = activeSelectorKinds(selector);
5790
- if (kinds.length === 0) {
5791
- return {
5792
- selector: null,
5793
- requested: null,
5794
- selected: tests,
5795
- selected_indexes: tests.map((_, index) => index + 1),
5796
- selected_count: tests.length,
5797
- skipped_count: 0
5798
- };
5799
- }
5800
- if (kinds.length > 1) {
5801
- 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);
5802
- }
5803
- const kind = kinds[0];
5804
- if (tests.length === 0) {
5805
- 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);
5806
- }
5807
- if (kind === "match") {
5808
- const needle = selector.match.trim().toLowerCase();
5809
- if (needle.length === 0) {
5810
- throw new PmCliError("--match requires a non-empty substring to match against linked-test command/path values", EXIT_CODE.USAGE);
5811
- }
5812
- const selectedIndexes = [];
5813
- const selected = [];
5814
- for (let index = 0; index < tests.length; index += 1) {
5815
- if (entryMatchesSubstring(tests[index], needle)) {
5816
- selected.push(tests[index]);
5817
- selectedIndexes.push(index + 1);
5818
- }
5819
- }
5820
- if (selected.length === 0) {
5821
- throw new PmCliError(`--match "${selector.match}" matched none of the ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
5822
- }
5823
- return {
5824
- selector: "match",
5825
- requested: selector.match,
5826
- selected,
5827
- selected_indexes: selectedIndexes,
5828
- selected_count: selected.length,
5829
- skipped_count: tests.length - selected.length
5830
- };
5831
- }
5832
- if (kind === "only-index") {
5833
- const index = parseOnlyIndexValue(selector.onlyIndex);
5834
- if (index > tests.length) {
5835
- 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);
5836
- }
5837
- return {
5838
- selector: "only-index",
5839
- requested: String(index),
5840
- selected: [tests[index - 1]],
5841
- selected_indexes: [index],
5842
- selected_count: 1,
5843
- skipped_count: tests.length - 1
5844
- };
5845
- }
5846
- return {
5847
- selector: "only-last",
5848
- requested: "last",
5849
- selected: [tests[tests.length - 1]],
5850
- selected_indexes: [tests.length],
5851
- selected_count: 1,
5852
- skipped_count: tests.length - 1
5853
- };
5854
- }
5855
5740
 
5856
5741
  // dist/sdk/test/linked-command-detection.js
5857
5742
  !(function() {
@@ -6221,100 +6106,273 @@ function parseNpxCommand(tokens) {
6221
6106
  }
6222
6107
  index += NPX_FLAGS_WITH_VALUE.has(token) && !token.includes("=") ? 2 : 1;
6223
6108
  }
6224
- const command = tokens[index];
6225
- if (!command) {
6226
- return null;
6109
+ const command = tokens[index];
6110
+ if (!command) {
6111
+ return null;
6112
+ }
6113
+ return {
6114
+ command,
6115
+ args: tokens.slice(index + 1)
6116
+ };
6117
+ }
6118
+ function parseLauncherSubcommand(tokens, flagsWithValue) {
6119
+ let index = 0;
6120
+ while (index < tokens.length) {
6121
+ const token = tokens[index];
6122
+ if (token === "--") {
6123
+ index += 1;
6124
+ continue;
6125
+ }
6126
+ if (token.startsWith("-")) {
6127
+ if (token.includes("=")) {
6128
+ index += 1;
6129
+ continue;
6130
+ }
6131
+ if (flagsWithValue.has(token)) {
6132
+ index += 2;
6133
+ continue;
6134
+ }
6135
+ index += 1;
6136
+ continue;
6137
+ }
6138
+ return {
6139
+ subcommand: token,
6140
+ args: tokens.slice(index + 1)
6141
+ };
6142
+ }
6143
+ return null;
6144
+ }
6145
+ function parsePnpmDlxCommand(tokens) {
6146
+ const parsed = parseLauncherSubcommand(tokens, PNPM_GLOBAL_FLAGS_WITH_VALUE);
6147
+ if (parsed?.subcommand !== "dlx") {
6148
+ return null;
6149
+ }
6150
+ return parseNpxCommand(parsed.args);
6151
+ }
6152
+ function parseNpmExecCommand(tokens) {
6153
+ const parsed = parseLauncherSubcommand(tokens, NPM_GLOBAL_FLAGS_WITH_VALUE);
6154
+ if (!parsed || !NPM_EXEC_SUBCOMMANDS.has(parsed.subcommand)) {
6155
+ return null;
6156
+ }
6157
+ return parseNpxCommand(parsed.args);
6158
+ }
6159
+ function resolvePmSubcommandContext(args) {
6160
+ let index = 0;
6161
+ while (index < args.length) {
6162
+ const token = args[index];
6163
+ if (token === "--") {
6164
+ index += 1;
6165
+ continue;
6166
+ }
6167
+ if (token.startsWith("-")) {
6168
+ if (PM_GLOBAL_FLAGS_WITH_VALUE.has(token)) {
6169
+ index += 2;
6170
+ continue;
6171
+ }
6172
+ index += 1;
6173
+ continue;
6174
+ }
6175
+ return {
6176
+ subcommand: token,
6177
+ remaining: args.slice(index + 1)
6178
+ };
6179
+ }
6180
+ return null;
6181
+ }
6182
+ function firstPositionalToken(tokens, flagsWithValue = /* @__PURE__ */ new Set()) {
6183
+ for (let index = 0; index < tokens.length; index += 1) {
6184
+ const token = tokens[index];
6185
+ if (token === "--") {
6186
+ return tokens[index + 1];
6187
+ }
6188
+ if (!token.startsWith("-")) {
6189
+ return token;
6190
+ }
6191
+ if (!token.includes("=") && (PM_GLOBAL_FLAGS_WITH_VALUE.has(token) || flagsWithValue.has(token))) {
6192
+ index += 1;
6193
+ }
6194
+ }
6195
+ return void 0;
6196
+ }
6197
+
6198
+ // dist/sdk/test/execution.js
6199
+ import { spawn } from "node:child_process";
6200
+ import { cp, mkdir, mkdtemp, readdir, rm } from "node:fs/promises";
6201
+ import { tmpdir } from "node:os";
6202
+ import path8 from "node:path";
6203
+
6204
+ // dist/core/test/item-test-run-tracking.js
6205
+ !(function() {
6206
+ try {
6207
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
6208
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "da2481e4-5f2e-5f0c-99fb-932ee6f8ce6d");
6209
+ } catch (e2) {
6210
+ }
6211
+ })();
6212
+ var DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT = 20;
6213
+ function trackedTestRunHistoryLimit() {
6214
+ const raw = process.env.PM_TRACKED_TEST_RUN_HISTORY_LIMIT;
6215
+ if (!raw || raw.trim().length === 0) {
6216
+ return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
6217
+ }
6218
+ const parsed = Number.parseInt(raw, 10);
6219
+ if (!Number.isFinite(parsed) || parsed <= 0) {
6220
+ return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
6221
+ }
6222
+ return parsed;
6223
+ }
6224
+ function normalizeTrackedTestRunSummaries(entries) {
6225
+ return [...entries].filter((entry) => entry.run_id.trim().length > 0 && entry.started_at.trim().length > 0 && entry.finished_at.trim().length > 0 && entry.recorded_at.trim().length > 0).sort((left, right) => {
6226
+ const byRecorded = compareTimestampStrings(left.recorded_at, right.recorded_at);
6227
+ if (byRecorded !== 0)
6228
+ return byRecorded;
6229
+ const byRunId = left.run_id.localeCompare(right.run_id);
6230
+ if (byRunId !== 0)
6231
+ return byRunId;
6232
+ return left.kind.localeCompare(right.kind);
6233
+ });
6234
+ }
6235
+ async function appendTrackedTestRunSummary(options) {
6236
+ const historyLimit = trackedTestRunHistoryLimit();
6237
+ await mutateItem({
6238
+ pmRoot: options.pmRoot,
6239
+ settings: options.settings,
6240
+ id: options.itemId,
6241
+ op: "test_run_track",
6242
+ author: options.author,
6243
+ message: options.message,
6244
+ force: false,
6245
+ mutate(document) {
6246
+ const current = document.metadata.test_runs ?? [];
6247
+ const next = normalizeTrackedTestRunSummaries([
6248
+ ...current,
6249
+ options.entry
6250
+ ]);
6251
+ const bounded = next.length > historyLimit ? next.slice(next.length - historyLimit) : next;
6252
+ document.metadata.test_runs = bounded;
6253
+ return { changedFields: ["test_runs"] };
6254
+ }
6255
+ });
6256
+ }
6257
+
6258
+ // dist/core/test/run-selectors.js
6259
+ !(function() {
6260
+ try {
6261
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
6262
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "183637de-1877-5037-a199-0b11e6247ada");
6263
+ } catch (e2) {
6264
+ }
6265
+ })();
6266
+ var MAX_SELECTOR_ENTRY_LABEL_LENGTH = 100;
6267
+ function parseOnlyIndexValue(raw, optionName = "--only-index") {
6268
+ const value = typeof raw === "number" ? raw : Number(String(raw).trim());
6269
+ if (!Number.isInteger(value) || value < 1) {
6270
+ 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);
6271
+ }
6272
+ return value;
6273
+ }
6274
+ function summarizeSelectorEntry(entry) {
6275
+ const label = entry.command ?? entry.path ?? "<no command>";
6276
+ const normalized = label.replaceAll(/\s+/g, " ").trim() || "<no command>";
6277
+ if (normalized.length <= MAX_SELECTOR_ENTRY_LABEL_LENGTH) {
6278
+ return normalized;
6279
+ }
6280
+ return `${normalized.slice(0, MAX_SELECTOR_ENTRY_LABEL_LENGTH - 3)}...`;
6281
+ }
6282
+ function describeLinkedTestEntries(tests) {
6283
+ return tests.map((entry, index) => `${index + 1}. ${summarizeSelectorEntry(entry)}`).join("; ");
6284
+ }
6285
+ function activeSelectorKinds(selector) {
6286
+ const kinds = [];
6287
+ if (selector.match !== void 0) {
6288
+ kinds.push("match");
6289
+ }
6290
+ if (selector.onlyIndex !== void 0) {
6291
+ kinds.push("only-index");
6227
6292
  }
6228
- return {
6229
- command,
6230
- args: tokens.slice(index + 1)
6231
- };
6293
+ if (selector.onlyLast === true) {
6294
+ kinds.push("only-last");
6295
+ }
6296
+ return kinds;
6232
6297
  }
6233
- function parseLauncherSubcommand(tokens, flagsWithValue) {
6234
- let index = 0;
6235
- while (index < tokens.length) {
6236
- const token = tokens[index];
6237
- if (token === "--") {
6238
- index += 1;
6239
- continue;
6240
- }
6241
- if (token.startsWith("-")) {
6242
- if (token.includes("=")) {
6243
- index += 1;
6244
- continue;
6245
- }
6246
- if (flagsWithValue.has(token)) {
6247
- index += 2;
6248
- continue;
6249
- }
6250
- index += 1;
6251
- continue;
6252
- }
6298
+ function entryMatchesSubstring(entry, needle) {
6299
+ const command = entry.command?.toLowerCase() ?? "";
6300
+ const entryPath = entry.path?.toLowerCase() ?? "";
6301
+ return command.includes(needle) || entryPath.includes(needle);
6302
+ }
6303
+ function resolveLinkedTestRunSelection(tests, selector) {
6304
+ const kinds = activeSelectorKinds(selector);
6305
+ if (kinds.length === 0) {
6253
6306
  return {
6254
- subcommand: token,
6255
- args: tokens.slice(index + 1)
6307
+ selector: null,
6308
+ requested: null,
6309
+ selected: tests,
6310
+ selected_indexes: tests.map((_, index) => index + 1),
6311
+ selected_count: tests.length,
6312
+ skipped_count: 0
6256
6313
  };
6257
6314
  }
6258
- return null;
6259
- }
6260
- function parsePnpmDlxCommand(tokens) {
6261
- const parsed = parseLauncherSubcommand(tokens, PNPM_GLOBAL_FLAGS_WITH_VALUE);
6262
- if (parsed?.subcommand !== "dlx") {
6263
- return null;
6315
+ if (kinds.length > 1) {
6316
+ 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);
6264
6317
  }
6265
- return parseNpxCommand(parsed.args);
6266
- }
6267
- function parseNpmExecCommand(tokens) {
6268
- const parsed = parseLauncherSubcommand(tokens, NPM_GLOBAL_FLAGS_WITH_VALUE);
6269
- if (!parsed || !NPM_EXEC_SUBCOMMANDS.has(parsed.subcommand)) {
6270
- return null;
6318
+ const kind = kinds[0];
6319
+ if (tests.length === 0) {
6320
+ 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);
6271
6321
  }
6272
- return parseNpxCommand(parsed.args);
6273
- }
6274
- function resolvePmSubcommandContext(args) {
6275
- let index = 0;
6276
- while (index < args.length) {
6277
- const token = args[index];
6278
- if (token === "--") {
6279
- index += 1;
6280
- continue;
6322
+ if (kind === "match") {
6323
+ const needle = selector.match.trim().toLowerCase();
6324
+ if (needle.length === 0) {
6325
+ throw new PmCliError("--match requires a non-empty substring to match against linked-test command/path values", EXIT_CODE.USAGE);
6281
6326
  }
6282
- if (token.startsWith("-")) {
6283
- if (PM_GLOBAL_FLAGS_WITH_VALUE.has(token)) {
6284
- index += 2;
6285
- continue;
6327
+ const selectedIndexes = [];
6328
+ const selected = [];
6329
+ for (let index = 0; index < tests.length; index += 1) {
6330
+ if (entryMatchesSubstring(tests[index], needle)) {
6331
+ selected.push(tests[index]);
6332
+ selectedIndexes.push(index + 1);
6286
6333
  }
6287
- index += 1;
6288
- continue;
6334
+ }
6335
+ if (selected.length === 0) {
6336
+ throw new PmCliError(`--match "${selector.match}" matched none of the ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
6289
6337
  }
6290
6338
  return {
6291
- subcommand: token,
6292
- remaining: args.slice(index + 1)
6339
+ selector: "match",
6340
+ requested: selector.match,
6341
+ selected,
6342
+ selected_indexes: selectedIndexes,
6343
+ selected_count: selected.length,
6344
+ skipped_count: tests.length - selected.length
6293
6345
  };
6294
6346
  }
6295
- return null;
6296
- }
6297
- function firstPositionalToken(tokens, flagsWithValue = /* @__PURE__ */ new Set()) {
6298
- for (let index = 0; index < tokens.length; index += 1) {
6299
- const token = tokens[index];
6300
- if (token === "--") {
6301
- return tokens[index + 1];
6302
- }
6303
- if (!token.startsWith("-")) {
6304
- return token;
6305
- }
6306
- if (!token.includes("=") && (PM_GLOBAL_FLAGS_WITH_VALUE.has(token) || flagsWithValue.has(token))) {
6307
- index += 1;
6347
+ if (kind === "only-index") {
6348
+ const index = parseOnlyIndexValue(selector.onlyIndex);
6349
+ if (index > tests.length) {
6350
+ 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);
6308
6351
  }
6352
+ return {
6353
+ selector: "only-index",
6354
+ requested: String(index),
6355
+ selected: [tests[index - 1]],
6356
+ selected_indexes: [index],
6357
+ selected_count: 1,
6358
+ skipped_count: tests.length - 1
6359
+ };
6309
6360
  }
6310
- return void 0;
6361
+ return {
6362
+ selector: "only-last",
6363
+ requested: "last",
6364
+ selected: [tests[tests.length - 1]],
6365
+ selected_indexes: [tests.length],
6366
+ selected_count: 1,
6367
+ skipped_count: tests.length - 1
6368
+ };
6311
6369
  }
6312
6370
 
6313
- // dist/cli/commands/test.js
6371
+ // dist/sdk/test/execution.js
6314
6372
  !(function() {
6315
6373
  try {
6316
6374
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
6317
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1f9bc440-299f-5f61-be67-cad0c40f56a7");
6375
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "29421f08-c442-5b5b-8955-c255f9936bfd");
6318
6376
  } catch (e2) {
6319
6377
  }
6320
6378
  })();
@@ -6475,7 +6533,17 @@ function resolveLinkedTestEffectiveContextMode(requestedMode, isPmTrackerReadCom
6475
6533
  return requestedMode;
6476
6534
  }
6477
6535
  function hasLinkedTestAssertions(linkedTest) {
6478
- return (linkedTest.assert_stdout_contains?.length ?? 0) > 0 || (linkedTest.assert_stdout_regex?.length ?? 0) > 0 || (linkedTest.assert_stderr_contains?.length ?? 0) > 0 || (linkedTest.assert_stderr_regex?.length ?? 0) > 0 || typeof linkedTest.assert_stdout_min_lines === "number" || Object.keys(linkedTest.assert_json_field_equals ?? {}).length > 0 || Object.keys(linkedTest.assert_json_field_gte ?? {}).length > 0;
6536
+ return Object.entries(linkedTest).filter(([key]) => key.startsWith("assert_")).some(([, value]) => {
6537
+ if (value === void 0 || value === null)
6538
+ return false;
6539
+ if (Array.isArray(value))
6540
+ return value.length > 0;
6541
+ if (typeof value === "object")
6542
+ return Object.keys(value).length > 0;
6543
+ if (typeof value === "string")
6544
+ return value.trim().length > 0;
6545
+ return true;
6546
+ });
6479
6547
  }
6480
6548
  function buildPmContextMismatchHint(params) {
6481
6549
  const { executionContext, runLevelPmContextMode, linkedOverridePmContextMode } = params;
@@ -6579,6 +6647,12 @@ function parsedLauncherInvokesRecursiveTestAll(parsed) {
6579
6647
  }
6580
6648
  return firstPmSubcommand(parsed.args) === "test-all";
6581
6649
  }
6650
+ var SHELL_COMMAND_FLAG_PATTERNS = new Map([
6651
+ ...["sh", "bash", "dash", "zsh"].map((executable) => [executable, /^(?:-c|-[a-z]*c[a-z]*)$/u]),
6652
+ ...["cmd", "cmd.exe"].map((executable) => [executable, /^\/[ck]$/u]),
6653
+ ...["powershell", "powershell.exe", "pwsh", "pwsh.exe"].map((executable) => [executable, /^-(?:c|command)$/u])
6654
+ ]);
6655
+ var PACKAGE_EXEC_EXECUTABLES = /* @__PURE__ */ new Set(["npx", "bunx"]);
6582
6656
  function segmentInvokesRecursiveTestAll(segment) {
6583
6657
  const rawTokens = segment.split(" ").filter((token) => token.length > 0);
6584
6658
  const tokens = stripLeadingEnvAssignments(rawTokens);
@@ -6586,13 +6660,18 @@ function segmentInvokesRecursiveTestAll(segment) {
6586
6660
  return false;
6587
6661
  }
6588
6662
  const [executable, ...args] = tokens;
6663
+ const shellCommandFlagPattern = SHELL_COMMAND_FLAG_PATTERNS.get(executable);
6664
+ if (shellCommandFlagPattern) {
6665
+ const commandFlagIndex = args.findIndex((arg) => shellCommandFlagPattern.test(arg));
6666
+ return commandFlagIndex >= 0 ? segmentInvokesRecursiveTestAll(args.slice(commandFlagIndex + 1).join(" ")) : false;
6667
+ }
6589
6668
  if (isPmExecutableToken(executable) || isPmCliScriptToken(executable)) {
6590
6669
  return firstPmSubcommand(args) === "test-all";
6591
6670
  }
6592
6671
  if (executable === "node" && args.length > 0 && isPmCliScriptToken(args[0])) {
6593
6672
  return firstPmSubcommand(args.slice(1)) === "test-all";
6594
6673
  }
6595
- if (executable === "npx" || executable === "bunx") {
6674
+ if (PACKAGE_EXEC_EXECUTABLES.has(executable)) {
6596
6675
  return parsedLauncherInvokesRecursiveTestAll(parseNpxCommand(args));
6597
6676
  }
6598
6677
  if (executable === "pnpm") {
@@ -6706,7 +6785,13 @@ function parseLinkedTestTimeoutSeconds(timeoutSecondsRaw, timeoutAliasRaw) {
6706
6785
  throw new PmCliError("--add timeout and timeout_seconds must match when both are provided", EXIT_CODE.USAGE);
6707
6786
  }
6708
6787
  const timeoutRaw = timeoutSecondsRaw ?? timeoutAliasRaw;
6709
- return timeoutRaw === void 0 ? void 0 : Math.floor(parseOptionalNumber(timeoutRaw, "timeout_seconds"));
6788
+ if (timeoutRaw === void 0)
6789
+ return void 0;
6790
+ const timeout = Math.floor(parseOptionalNumber(timeoutRaw, "timeout_seconds"));
6791
+ if (timeout <= 0) {
6792
+ throw new PmCliError("--add timeout_seconds must be a positive integer", EXIT_CODE.USAGE);
6793
+ }
6794
+ return timeout;
6710
6795
  }
6711
6796
  function parseAddJsonEntries(raw) {
6712
6797
  if (!raw)
@@ -6904,7 +6989,7 @@ function appendLinkedTestOutputChunk(state, chunk, target) {
6904
6989
  state.stderrBytes += bytes;
6905
6990
  }
6906
6991
  const bufferExceeded = state.stdoutBytes > TEST_OUTPUT_MAX_BUFFER_BYTES || state.stderrBytes > TEST_OUTPUT_MAX_BUFFER_BYTES;
6907
- if (!state.maxBufferExceeded && bufferExceeded) {
6992
+ if (bufferExceeded) {
6908
6993
  state.maxBufferExceeded = true;
6909
6994
  return true;
6910
6995
  }
@@ -7232,7 +7317,7 @@ function readJsonPathValue(root, fieldPath) {
7232
7317
  current = current[segment];
7233
7318
  continue;
7234
7319
  }
7235
- if (typeof current !== "object" || current === null || !(segment in current)) {
7320
+ if (typeof current !== "object" || current === null || !Object.prototype.hasOwnProperty.call(current, segment)) {
7236
7321
  return { found: false, value: void 0 };
7237
7322
  }
7238
7323
  current = current[segment];
@@ -7419,7 +7504,7 @@ function buildLinkedTestExecutionContext(params) {
7419
7504
  sandbox_project_item_count: selectedSandboxProjectItemCount,
7420
7505
  source_global_item_count: params.counts.sourceGlobalItemCount,
7421
7506
  sandbox_global_item_count: selectedSandboxGlobalItemCount,
7422
- mismatch_detected: params.isPmCommand && params.counts.sourceProjectItemCount !== selectedSandboxProjectItemCount,
7507
+ mismatch_detected: params.isPmCommand && (params.counts.sourceProjectItemCount !== selectedSandboxProjectItemCount || params.counts.sourceGlobalItemCount !== selectedSandboxGlobalItemCount),
7423
7508
  project_extensions_seeded: Boolean(params.sourceRoots),
7424
7509
  global_extensions_seeded: Boolean(params.sourceRoots)
7425
7510
  };
@@ -7706,8 +7791,12 @@ function resolveTestRunOptions(options, tests) {
7706
7791
  onlyLast: options.onlyLast
7707
7792
  };
7708
7793
  const runSelection = options.run === true ? resolveLinkedTestRunSelection(tests, selectorInput) : void 0;
7794
+ const defaultTimeoutSeconds = options.timeout === void 0 ? void 0 : parseOptionalNumber(options.timeout, "timeout");
7795
+ if (defaultTimeoutSeconds !== void 0 && defaultTimeoutSeconds <= 0) {
7796
+ throw new PmCliError("Test timeout must be a positive number", EXIT_CODE.USAGE);
7797
+ }
7709
7798
  return {
7710
- defaultTimeoutSeconds: options.timeout === void 0 ? void 0 : parseOptionalNumber(options.timeout, "timeout"),
7799
+ defaultTimeoutSeconds,
7711
7800
  pmContextMode: parsePmContextMode(options.pmContext),
7712
7801
  runSelection,
7713
7802
  testsToRun: runSelection?.selected ?? tests
@@ -7848,15 +7937,24 @@ async function runTest(id, options, global2) {
7848
7937
  };
7849
7938
  }
7850
7939
 
7851
- // dist/cli/commands/test-all.js
7940
+ // dist/cli/commands/test.js
7941
+ !(function() {
7942
+ try {
7943
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
7944
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "40fd73ac-c67e-5c04-9d09-27672a026c08");
7945
+ } catch (e2) {
7946
+ }
7947
+ })();
7948
+
7949
+ // dist/sdk/test/batch.js
7852
7950
  !(function() {
7853
7951
  try {
7854
7952
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
7855
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b30502eb-294a-5ab0-9460-511a5351e369");
7953
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "524ce953-9a81-51e3-a428-689aecec60fc");
7856
7954
  } catch (e2) {
7857
7955
  }
7858
7956
  })();
7859
- function parseStatus(raw, statusRegistry) {
7957
+ var parseStatus = (raw, statusRegistry) => {
7860
7958
  if (raw === void 0) {
7861
7959
  return void 0;
7862
7960
  }
@@ -7866,14 +7964,18 @@ function parseStatus(raw, statusRegistry) {
7866
7964
  throw new PmCliError(`Invalid --status value "${raw}". Allowed: ${allowedStatuses.join(", ")}`, EXIT_CODE.USAGE);
7867
7965
  }
7868
7966
  return normalized;
7869
- }
7870
- function parseTimeout(raw) {
7967
+ };
7968
+ var parseTimeout = (raw) => {
7871
7969
  if (raw === void 0) {
7872
7970
  return void 0;
7873
7971
  }
7874
- return parseOptionalNumber(raw, "timeout");
7875
- }
7876
- function parseNonNegativeInteger(raw, flag) {
7972
+ const parsed = parseOptionalNumber(raw, "timeout");
7973
+ if (parsed <= 0) {
7974
+ throw new PmCliError("timeout must be a positive number", EXIT_CODE.USAGE);
7975
+ }
7976
+ return parsed;
7977
+ };
7978
+ var parseNonNegativeInteger = (raw, flag) => {
7877
7979
  if (raw === void 0) {
7878
7980
  return void 0;
7879
7981
  }
@@ -7882,66 +7984,67 @@ function parseNonNegativeInteger(raw, flag) {
7882
7984
  throw new PmCliError(`${flag} must be a non-negative integer`, EXIT_CODE.USAGE);
7883
7985
  }
7884
7986
  return parsed;
7885
- }
7886
- function formatTrackingError(error) {
7987
+ };
7988
+ var formatTrackingError = (error) => {
7887
7989
  return error instanceof Error ? error.message : String(error);
7888
- }
7889
- function resolveTrackedRunId2() {
7990
+ };
7991
+ var resolveTrackedRunId2 = () => {
7890
7992
  const fromEnv = process.env.PM_BACKGROUND_TEST_RUN_ID?.trim();
7891
7993
  if (fromEnv && fromEnv.length > 0) {
7892
7994
  return fromEnv;
7893
7995
  }
7894
7996
  return `test-all-local-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
7895
- }
7896
- function normalizeCommand(command) {
7997
+ };
7998
+ var normalizeCommand = (command) => {
7897
7999
  return command.trim().replaceAll(/\s+/g, " ");
7898
- }
7899
- function normalizeEnvSetSignature(value) {
8000
+ };
8001
+ var normalizeEnvSetSignature = (value) => {
7900
8002
  if (!value || Object.keys(value).length === 0) {
7901
8003
  return "{}";
7902
8004
  }
7903
8005
  return JSON.stringify(Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right))));
7904
- }
7905
- function normalizeEnvClearSignature(value) {
8006
+ };
8007
+ var normalizeEnvClearSignature = (value) => {
7906
8008
  if (!value || value.length === 0) {
7907
8009
  return "[]";
7908
8010
  }
7909
8011
  return JSON.stringify([...value].sort((left, right) => left.localeCompare(right)));
7910
- }
7911
- function normalizePmContextModeSignature(value) {
8012
+ };
8013
+ var normalizePmContextModeSignature = (value) => {
7912
8014
  const normalized = value?.trim().toLowerCase();
7913
8015
  return normalized && normalized.length > 0 ? normalized : "none";
7914
- }
7915
- function normalizeAssertionSignature(test) {
8016
+ };
8017
+ var normalizeAssertionStrings = (values) => [...new Set(values ?? [])].sort((left, right) => left.localeCompare(right));
8018
+ var normalizeAssertionMap = (value) => Object.fromEntries(Object.entries(value ?? {}).sort(([left], [right]) => left.localeCompare(right)));
8019
+ var normalizeAssertionLineCount = (value) => typeof value === "number" ? value : void 0;
8020
+ var normalizeAssertionSignature = (test) => {
7916
8021
  const normalized = {
7917
- assert_stdout_contains: [
7918
- ...new Set(test.assert_stdout_contains ?? [])
7919
- ].sort((left, right) => left.localeCompare(right)),
7920
- assert_stdout_regex: [...new Set(test.assert_stdout_regex ?? [])].sort((left, right) => left.localeCompare(right)),
7921
- assert_stderr_contains: [
7922
- ...new Set(test.assert_stderr_contains ?? [])
7923
- ].sort((left, right) => left.localeCompare(right)),
7924
- assert_stderr_regex: [...new Set(test.assert_stderr_regex ?? [])].sort((left, right) => left.localeCompare(right)),
7925
- assert_stdout_min_lines: typeof test.assert_stdout_min_lines === "number" ? test.assert_stdout_min_lines : void 0,
7926
- assert_json_field_equals: Object.fromEntries(Object.entries(test.assert_json_field_equals ?? {}).sort(([left], [right]) => left.localeCompare(right))),
7927
- assert_json_field_gte: Object.fromEntries(Object.entries(test.assert_json_field_gte ?? {}).sort(([left], [right]) => left.localeCompare(right)))
8022
+ assert_stdout_contains: normalizeAssertionStrings(test.assert_stdout_contains),
8023
+ assert_stdout_regex: normalizeAssertionStrings(test.assert_stdout_regex),
8024
+ assert_stderr_contains: normalizeAssertionStrings(test.assert_stderr_contains),
8025
+ assert_stderr_regex: normalizeAssertionStrings(test.assert_stderr_regex),
8026
+ assert_stdout_min_lines: normalizeAssertionLineCount(test.assert_stdout_min_lines),
8027
+ assert_json_field_equals: normalizeAssertionMap(test.assert_json_field_equals),
8028
+ assert_json_field_gte: normalizeAssertionMap(test.assert_json_field_gte)
7928
8029
  };
7929
8030
  return JSON.stringify(normalized);
7930
- }
7931
- function buildLinkedTestKey(test) {
7932
- const command = test.command?.trim();
7933
- if (command && command.length > 0) {
7934
- const envSet = normalizeEnvSetSignature(test.env_set);
7935
- const envClear = normalizeEnvClearSignature(test.env_clear);
7936
- const pmContextMode = normalizePmContextModeSignature(test.pm_context_mode);
7937
- const sharedHostSafe = test.shared_host_safe === true ? "true" : "false";
7938
- const assertions = normalizeAssertionSignature(test);
7939
- return `command:${test.scope}:${normalizeCommand(command)}:${envSet}:${envClear}:${pmContextMode}:${sharedHostSafe}:${assertions}`;
8031
+ };
8032
+ var resolveLinkedTestTargetSignature = (test) => {
8033
+ const command = resolveOptionalEnvironmentValue(test.command);
8034
+ if (command !== void 0) {
8035
+ return `command:${test.scope}:${normalizeCommand(command)}`;
7940
8036
  }
7941
- const linkedPath = test.path?.trim() ?? "";
7942
- return `path:${test.scope}:${linkedPath}`;
7943
- }
7944
- function maxTimeoutSeconds(current, candidate) {
8037
+ return `path:${test.scope}:${resolveOptionalEnvironmentValue(test.path) ?? ""}`;
8038
+ };
8039
+ var buildLinkedTestKey = (test) => {
8040
+ const envSet = normalizeEnvSetSignature(test.env_set);
8041
+ const envClear = normalizeEnvClearSignature(test.env_clear);
8042
+ const pmContextMode = normalizePmContextModeSignature(test.pm_context_mode);
8043
+ const sharedHostSafe = test.shared_host_safe === true ? "true" : "false";
8044
+ const assertions = normalizeAssertionSignature(test);
8045
+ return `${resolveLinkedTestTargetSignature(test)}:${envSet}:${envClear}:${pmContextMode}:${sharedHostSafe}:${assertions}`;
8046
+ };
8047
+ var maxTimeoutSeconds = (current, candidate) => {
7945
8048
  if (candidate === void 0) {
7946
8049
  return current;
7947
8050
  }
@@ -7949,8 +8052,8 @@ function maxTimeoutSeconds(current, candidate) {
7949
8052
  return candidate;
7950
8053
  }
7951
8054
  return current;
7952
- }
7953
- function countStatuses(runResults) {
8055
+ };
8056
+ var countStatuses = (runResults) => {
7954
8057
  let passed = 0;
7955
8058
  let failed = 0;
7956
8059
  let skipped = 0;
@@ -7966,13 +8069,13 @@ function countStatuses(runResults) {
7966
8069
  skipped += 1;
7967
8070
  }
7968
8071
  return { passed, failed, skipped };
7969
- }
7970
- function mergeFailureCategoryCounts(target, source) {
8072
+ };
8073
+ var mergeFailureCategoryCounts = (target, source) => {
7971
8074
  for (const [key, value] of Object.entries(source)) {
7972
8075
  target[key] += value;
7973
8076
  }
7974
- }
7975
- function emitTestAllProgress(options, message) {
8077
+ };
8078
+ var emitTestAllProgress = (options, message) => {
7976
8079
  if (options.progress !== true) {
7977
8080
  return;
7978
8081
  }
@@ -7981,8 +8084,8 @@ function emitTestAllProgress(options, message) {
7981
8084
  `);
7982
8085
  } catch {
7983
8086
  }
7984
- }
7985
- async function collectTestAllItemTests(filteredItems, global2, pmRoot) {
8087
+ };
8088
+ var collectTestAllItemTests = async (filteredItems, global2, pmRoot) => {
7986
8089
  const itemTests = [];
7987
8090
  let linkedTests = 0;
7988
8091
  for (const item of filteredItems) {
@@ -7994,8 +8097,8 @@ async function collectTestAllItemTests(filteredItems, global2, pmRoot) {
7994
8097
  itemTests.push({ item, tests: readResult.tests });
7995
8098
  }
7996
8099
  return { itemTests, linkedTests };
7997
- }
7998
- async function selectTestAllItems(params) {
8100
+ };
8101
+ var selectTestAllItems = async (params) => {
7999
8102
  const statusRegistry = resolveRuntimeStatusRegistry(params.settings.schema);
8000
8103
  const typeRegistry = resolveItemTypeRegistry(params.settings, getActiveExtensionRegistrations());
8001
8104
  const statusFilter = parseStatus(params.options.status, statusRegistry);
@@ -8005,8 +8108,8 @@ async function selectTestAllItems(params) {
8005
8108
  const statusFilteredItems = allItems.filter((item) => statusFilter ? item.status === statusFilter : true).sort((a, b) => a.id.localeCompare(b.id));
8006
8109
  const filteredItems = limitFilter === void 0 ? statusFilteredItems.slice(offsetFilter) : statusFilteredItems.slice(offsetFilter, offsetFilter + limitFilter);
8007
8110
  return { filteredItems, statusFilter, limitFilter, offsetFilter };
8008
- }
8009
- function buildEffectiveTimeoutByKey(itemTests) {
8111
+ };
8112
+ var buildEffectiveTimeoutByKey = (itemTests) => {
8010
8113
  const effectiveTimeoutByKey = /* @__PURE__ */ new Map();
8011
8114
  for (const { tests } of itemTests) {
8012
8115
  for (const test of tests) {
@@ -8019,8 +8122,8 @@ function buildEffectiveTimeoutByKey(itemTests) {
8019
8122
  }
8020
8123
  }
8021
8124
  return effectiveTimeoutByKey;
8022
- }
8023
- async function runTestAllItem(entry, context) {
8125
+ };
8126
+ var runTestAllItem = async (entry, context) => {
8024
8127
  const testsToRun = [];
8025
8128
  const keyedTests = entry.tests.map((test) => {
8026
8129
  const key = buildLinkedTestKey(test);
@@ -8081,12 +8184,18 @@ async function runTestAllItem(entry, context) {
8081
8184
  failure_categories: failureCategories
8082
8185
  }
8083
8186
  };
8084
- }
8085
- async function appendTestAllItemTracking(entry, summary, context) {
8187
+ };
8188
+ var trackedRunFailed = (summary, options) => [
8189
+ summary.failed > 0,
8190
+ options.failOnSkipped === true && summary.skipped > 0
8191
+ ].includes(true);
8192
+ var optionalTrue = (value) => value ? true : void 0;
8193
+ var appendTestAllItemTracking = async (entry, summary, context) => {
8086
8194
  if (!context.trackingEnabled) {
8087
8195
  return [];
8088
8196
  }
8089
8197
  try {
8198
+ const failed = trackedRunFailed(summary, context.options);
8090
8199
  await appendTrackedTestRunSummary({
8091
8200
  pmRoot: context.pmRoot,
8092
8201
  settings: context.settings,
@@ -8096,7 +8205,7 @@ async function appendTestAllItemTracking(entry, summary, context) {
8096
8205
  entry: {
8097
8206
  run_id: context.trackingRunId,
8098
8207
  kind: "test-all",
8099
- status: summary.failed > 0 || context.options.failOnSkipped === true && summary.skipped > 0 ? "failed" : "passed",
8208
+ status: failed ? "failed" : "passed",
8100
8209
  started_at: context.runStartedAt,
8101
8210
  finished_at: nowIso(),
8102
8211
  recorded_at: nowIso(),
@@ -8107,7 +8216,7 @@ async function appendTestAllItemTracking(entry, summary, context) {
8107
8216
  skipped: summary.skipped,
8108
8217
  items: 1,
8109
8218
  linked_tests: entry.tests.length,
8110
- fail_on_skipped_triggered: context.options.failOnSkipped === true && summary.skipped > 0 ? true : void 0
8219
+ fail_on_skipped_triggered: optionalTrue(context.options.failOnSkipped === true && summary.skipped > 0)
8111
8220
  }
8112
8221
  });
8113
8222
  } catch (error) {
@@ -8116,11 +8225,17 @@ async function appendTestAllItemTracking(entry, summary, context) {
8116
8225
  ];
8117
8226
  }
8118
8227
  return [];
8119
- }
8120
- function buildTestAllItemRunContext(params) {
8121
- const trackingAttemptRaw = process.env.PM_BACKGROUND_TEST_RUN_ATTEMPT?.trim();
8122
- const trackingParsedAttempt = trackingAttemptRaw ? Number.parseInt(trackingAttemptRaw, 10) : Number.NaN;
8123
- const trackingResumedFrom = process.env.PM_BACKGROUND_TEST_RUN_RESUMED_FROM?.trim();
8228
+ };
8229
+ var resolveTrackingAttempt = () => {
8230
+ const raw = process.env.PM_BACKGROUND_TEST_RUN_ATTEMPT?.trim();
8231
+ const parsed = raw ? Number.parseInt(raw, 10) : Number.NaN;
8232
+ return Number.isFinite(parsed) && parsed >= 1 ? parsed : void 0;
8233
+ };
8234
+ var resolveOptionalEnvironmentValue = (value) => {
8235
+ const trimmed = value?.trim();
8236
+ return trimmed && trimmed.length > 0 ? trimmed : void 0;
8237
+ };
8238
+ var buildTestAllItemRunContext = (params) => {
8124
8239
  return {
8125
8240
  pmRoot: params.pmRoot,
8126
8241
  settings: params.settings,
@@ -8135,12 +8250,12 @@ function buildTestAllItemRunContext(params) {
8135
8250
  trackingEnabled: params.settings.testing.record_results_to_items === true,
8136
8251
  trackingAuthor: resolveAuthor(void 0, params.settings.author_default),
8137
8252
  trackingRunId: resolveTrackedRunId2(),
8138
- trackingAttempt: Number.isFinite(trackingParsedAttempt) && trackingParsedAttempt >= 1 ? trackingParsedAttempt : void 0,
8139
- trackingResumedFrom: trackingResumedFrom && trackingResumedFrom.length > 0 ? trackingResumedFrom : void 0,
8253
+ trackingAttempt: resolveTrackingAttempt(),
8254
+ trackingResumedFrom: resolveOptionalEnvironmentValue(process.env.PM_BACKGROUND_TEST_RUN_RESUMED_FROM),
8140
8255
  runStartedAt: params.runStartedAt
8141
8256
  };
8142
- }
8143
- function initializeTestAllAccumulation(options, linkedTests, filteredItems) {
8257
+ };
8258
+ var initializeTestAllAccumulation = (options, linkedTests, filteredItems) => {
8144
8259
  const accumulation = {
8145
8260
  results: [],
8146
8261
  passed: 0,
@@ -8156,8 +8271,8 @@ function initializeTestAllAccumulation(options, linkedTests, filteredItems) {
8156
8271
  accumulation.trackingWarnings.push(`empty_linked_test_selection:items=${filteredItems.length};linked_tests=0;fail_on_empty_test_run=true`);
8157
8272
  }
8158
8273
  return { accumulation, failOnEmptyTestRunTriggered };
8159
- }
8160
- async function runTestAllItems(itemTests, context, accumulation) {
8274
+ };
8275
+ var runTestAllItems = async (itemTests, context, accumulation) => {
8161
8276
  for (const [itemIndex, entry] of itemTests.entries()) {
8162
8277
  emitTestAllProgress(context.options, `item ${itemIndex + 1}/${itemTests.length} start id=${entry.item.id} linked_tests=${entry.tests.length}`);
8163
8278
  const execution = await runTestAllItem(entry, context);
@@ -8169,16 +8284,16 @@ async function runTestAllItems(itemTests, context, accumulation) {
8169
8284
  accumulation.results.push(execution.result);
8170
8285
  emitTestAllProgress(context.options, `item ${itemIndex + 1}/${itemTests.length} end id=${entry.item.id} status=${execution.failed === 0 ? "passed" : "failed"} passed=${execution.passed} failed=${execution.failed} skipped=${execution.skipped}`);
8171
8286
  }
8172
- }
8173
- function appendContextPreflightWarning(options, accumulation) {
8287
+ };
8288
+ var appendContextPreflightWarning = (options, accumulation) => {
8174
8289
  if (options.checkContext !== true) {
8175
8290
  return;
8176
8291
  }
8177
8292
  const allRunResults = accumulation.results.flatMap((entry) => entry.run_results);
8178
8293
  const preflight = summarizeContextPreflight(allRunResults);
8179
8294
  accumulation.trackingWarnings.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}`);
8180
- }
8181
- function buildTestAllResult(params) {
8295
+ };
8296
+ var buildTestAllResult = (params) => {
8182
8297
  return {
8183
8298
  ok: params.ok,
8184
8299
  totals: {
@@ -8197,43 +8312,86 @@ function buildTestAllResult(params) {
8197
8312
  warnings: params.accumulation.trackingWarnings.length > 0 ? params.accumulation.trackingWarnings : void 0,
8198
8313
  results: params.accumulation.results
8199
8314
  };
8200
- }
8201
- async function runTestAll(options, global2) {
8315
+ };
8316
+ var buildTestAllSelectionProgress = (params) => [
8317
+ `selection items=${params.filteredItems.length}`,
8318
+ `linked_tests=${params.linkedTests}`,
8319
+ params.statusFilter === void 0 ? "" : `status=${params.statusFilter}`,
8320
+ params.limitFilter === void 0 ? "" : `limit=${params.limitFilter}`,
8321
+ params.offsetFilter > 0 ? `offset=${params.offsetFilter}` : ""
8322
+ ].filter((entry) => entry.length > 0).join(" ");
8323
+ var prepareTestAllRun = async (options, global2) => {
8202
8324
  const pmRoot = resolvePmRoot(process.cwd(), global2.path);
8203
8325
  if (!await pathExists(getSettingsPath(pmRoot))) {
8204
8326
  throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
8205
8327
  }
8206
8328
  const settings = await readSettings(pmRoot);
8207
- const { filteredItems, statusFilter, limitFilter, offsetFilter } = await selectTestAllItems({ pmRoot, settings, options });
8329
+ const selection = await selectTestAllItems({ pmRoot, settings, options });
8208
8330
  const defaultTimeoutSeconds = parseTimeout(options.timeout);
8209
8331
  const runStartedAt = nowIso();
8210
- const { itemTests, linkedTests } = await collectTestAllItemTests(filteredItems, global2, pmRoot);
8211
- emitTestAllProgress(options, `selection items=${filteredItems.length} linked_tests=${linkedTests}${statusFilter ? ` status=${statusFilter}` : ""}${limitFilter === void 0 ? "" : ` limit=${limitFilter}`}${offsetFilter > 0 ? ` offset=${offsetFilter}` : ""}`);
8212
- const { accumulation, failOnEmptyTestRunTriggered } = initializeTestAllAccumulation(options, linkedTests, filteredItems);
8213
- const itemRunContext = buildTestAllItemRunContext({
8332
+ const collected = await collectTestAllItemTests(selection.filteredItems, global2, pmRoot);
8333
+ emitTestAllProgress(options, buildTestAllSelectionProgress({
8334
+ ...selection,
8335
+ linkedTests: collected.linkedTests
8336
+ }));
8337
+ return {
8214
8338
  pmRoot,
8215
8339
  settings,
8216
- options,
8217
- itemTests,
8340
+ filteredItems: selection.filteredItems,
8341
+ itemTests: collected.itemTests,
8342
+ linkedTests: collected.linkedTests,
8218
8343
  defaultTimeoutSeconds,
8219
8344
  runStartedAt
8345
+ };
8346
+ };
8347
+ var resolveTestAllOutcome = (params) => {
8348
+ const failOnSkippedTriggered = params.options.failOnSkipped === true && params.accumulation.skipped > 0;
8349
+ const ok = ![
8350
+ params.accumulation.failed > 0,
8351
+ failOnSkippedTriggered,
8352
+ params.failOnEmptyTestRunTriggered
8353
+ ].includes(true);
8354
+ return { failOnSkippedTriggered, ok };
8355
+ };
8356
+ var runTestAll = async (options, global2) => {
8357
+ const prepared = await prepareTestAllRun(options, global2);
8358
+ const { accumulation, failOnEmptyTestRunTriggered } = initializeTestAllAccumulation(options, prepared.linkedTests, prepared.filteredItems);
8359
+ const itemRunContext = buildTestAllItemRunContext({
8360
+ pmRoot: prepared.pmRoot,
8361
+ settings: prepared.settings,
8362
+ options,
8363
+ itemTests: prepared.itemTests,
8364
+ defaultTimeoutSeconds: prepared.defaultTimeoutSeconds,
8365
+ runStartedAt: prepared.runStartedAt
8220
8366
  });
8221
- await runTestAllItems(itemTests, itemRunContext, accumulation);
8222
- const failOnSkippedTriggered = options.failOnSkipped === true && accumulation.skipped > 0;
8367
+ await runTestAllItems(prepared.itemTests, itemRunContext, accumulation);
8223
8368
  appendContextPreflightWarning(options, accumulation);
8224
- const ok = accumulation.failed === 0 && failOnSkippedTriggered !== true && failOnEmptyTestRunTriggered !== true;
8225
- emitTestAllProgress(options, `end status=${ok ? "passed" : "failed"} items=${filteredItems.length} linked_tests=${linkedTests} passed=${accumulation.passed} failed=${accumulation.failed} skipped=${accumulation.skipped}`);
8369
+ const outcome = resolveTestAllOutcome({
8370
+ options,
8371
+ accumulation,
8372
+ failOnEmptyTestRunTriggered
8373
+ });
8374
+ emitTestAllProgress(options, `end status=${outcome.ok ? "passed" : "failed"} items=${prepared.filteredItems.length} linked_tests=${prepared.linkedTests} passed=${accumulation.passed} failed=${accumulation.failed} skipped=${accumulation.skipped}`);
8226
8375
  return buildTestAllResult({
8227
- ok,
8228
- filteredItems,
8229
- linkedTests,
8376
+ ok: outcome.ok,
8377
+ filteredItems: prepared.filteredItems,
8378
+ linkedTests: prepared.linkedTests,
8230
8379
  accumulation,
8231
- failOnSkippedTriggered,
8380
+ failOnSkippedTriggered: outcome.failOnSkippedTriggered,
8232
8381
  failOnEmptyTestRunTriggered
8233
8382
  });
8234
- }
8383
+ };
8235
8384
 
8236
- // dist/cli/commands/test-runs.js
8385
+ // dist/cli/commands/test-all.js
8386
+ !(function() {
8387
+ try {
8388
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
8389
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "de410bd9-d77f-5438-af06-3dfd3bfa0426");
8390
+ } catch (e2) {
8391
+ }
8392
+ })();
8393
+
8394
+ // dist/sdk/test/runs.js
8237
8395
  import os from "node:os";
8238
8396
 
8239
8397
  // dist/core/test/background-runs.js
@@ -9075,11 +9233,11 @@ async function readBackgroundTestRunLogs(pmRoot, runId, stream, tail) {
9075
9233
  };
9076
9234
  }
9077
9235
 
9078
- // dist/cli/commands/test-runs.js
9236
+ // dist/sdk/test/runs.js
9079
9237
  !(function() {
9080
9238
  try {
9081
9239
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
9082
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "014bcaa8-718e-593c-b287-5e0040a7b9aa");
9240
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2c42bfb9-c598-5a6e-bfff-0c073bb44205");
9083
9241
  } catch (e2) {
9084
9242
  }
9085
9243
  })();
@@ -9253,6 +9411,15 @@ async function runTestRunsWorker(runId, global2) {
9253
9411
  };
9254
9412
  }
9255
9413
 
9414
+ // dist/cli/commands/test-runs.js
9415
+ !(function() {
9416
+ try {
9417
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
9418
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "97eff0df-1dfd-5e93-a91e-8ef0969faf01");
9419
+ } catch (e2) {
9420
+ }
9421
+ })();
9422
+
9256
9423
  // dist/sdk/governance/validate.js
9257
9424
  import fs9 from "node:fs/promises";
9258
9425
  import { realpathSync } from "node:fs";
@@ -11481,7 +11648,14 @@ export {
11481
11648
  runEvent,
11482
11649
  runRemind,
11483
11650
  runStats,
11651
+ TELEMETRY_SUBCOMMANDS,
11484
11652
  runTelemetry,
11653
+ extractReferencedPmItemIdsFromCommand,
11654
+ summarizeContextPreflight,
11655
+ classifyLinkedTestFailure,
11656
+ countFailureCategories,
11657
+ resolveLinkedTestFailureExitCode,
11658
+ runLinkedTests,
11485
11659
  runTest,
11486
11660
  runTestAll,
11487
11661
  runStartBackgroundRun,
@@ -11495,4 +11669,4 @@ export {
11495
11669
  runValidate,
11496
11670
  runValidate2
11497
11671
  };
11498
- //# sourceMappingURL=chunk-ILX33QXL.js.map
11672
+ //# sourceMappingURL=chunk-LLODAQMP.js.map