@unbrained/pm-cli 2026.7.16 → 2026.7.18

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 (620) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +30 -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/close.d.ts +1 -1
  8. package/dist/cli/commands/close.js +3 -3
  9. package/dist/cli/commands/close.js.map +1 -1
  10. package/dist/cli/commands/completion.js +47 -5
  11. package/dist/cli/commands/completion.js.map +1 -1
  12. package/dist/cli/commands/context.d.ts +2 -2
  13. package/dist/cli/commands/context.js +42 -28
  14. package/dist/cli/commands/context.js.map +1 -1
  15. package/dist/cli/commands/contracts.js +5 -3
  16. package/dist/cli/commands/contracts.js.map +1 -1
  17. package/dist/cli/commands/eval.d.ts +4 -64
  18. package/dist/cli/commands/eval.js +4 -153
  19. package/dist/cli/commands/eval.js.map +1 -1
  20. package/dist/cli/commands/graph.d.ts +7 -0
  21. package/dist/cli/commands/graph.js +11 -0
  22. package/dist/cli/commands/graph.js.map +1 -0
  23. package/dist/cli/commands/index.d.ts +1 -0
  24. package/dist/cli/commands/index.js +3 -2
  25. package/dist/cli/commands/index.js.map +1 -1
  26. package/dist/cli/commands/linked-test-entry.d.ts +6 -6
  27. package/dist/cli/commands/linked-test-entry.js +4 -65
  28. package/dist/cli/commands/linked-test-entry.js.map +1 -1
  29. package/dist/cli/commands/linked-test-parsers.d.ts +3 -45
  30. package/dist/cli/commands/linked-test-parsers.js +4 -516
  31. package/dist/cli/commands/linked-test-parsers.js.map +1 -1
  32. package/dist/cli/commands/list.d.ts +3 -210
  33. package/dist/cli/commands/list.js +4 -1068
  34. package/dist/cli/commands/list.js.map +1 -1
  35. package/dist/cli/commands/next.d.ts +1 -1
  36. package/dist/cli/commands/next.js +3 -3
  37. package/dist/cli/commands/next.js.map +1 -1
  38. package/dist/cli/commands/search.d.ts +3 -464
  39. package/dist/cli/commands/search.js +4 -2236
  40. package/dist/cli/commands/search.js.map +1 -1
  41. package/dist/cli/commands/stats.d.ts +6 -66
  42. package/dist/cli/commands/stats.js +4 -157
  43. package/dist/cli/commands/stats.js.map +1 -1
  44. package/dist/cli/commands/telemetry.d.ts +6 -14
  45. package/dist/cli/commands/telemetry.js +4 -349
  46. package/dist/cli/commands/telemetry.js.map +1 -1
  47. package/dist/cli/commands/test-all.d.ts +6 -95
  48. package/dist/cli/commands/test-all.js +4 -439
  49. package/dist/cli/commands/test-all.js.map +1 -1
  50. package/dist/cli/commands/test-runs.d.ts +6 -92
  51. package/dist/cli/commands/test-runs.js +4 -189
  52. package/dist/cli/commands/test-runs.js.map +1 -1
  53. package/dist/cli/commands/test.d.ts +6 -244
  54. package/dist/cli/commands/test.js +4 -1780
  55. package/dist/cli/commands/test.js.map +1 -1
  56. package/dist/cli/commands/update-many.d.ts +15 -29
  57. package/dist/cli/commands/update-many.js +355 -259
  58. package/dist/cli/commands/update-many.js.map +1 -1
  59. package/dist/cli/main.js +141 -133
  60. package/dist/cli/main.js.map +1 -1
  61. package/dist/cli/register-list-query.js +49 -7
  62. package/dist/cli/register-list-query.js.map +1 -1
  63. package/dist/cli/register-mutation.js +7 -3
  64. package/dist/cli/register-mutation.js.map +1 -1
  65. package/dist/cli/search-refresh.js +4 -9
  66. package/dist/cli/search-refresh.js.map +1 -1
  67. package/dist/cli/shared-parsers.d.ts +6 -9
  68. package/dist/cli/shared-parsers.js +4 -37
  69. package/dist/cli/shared-parsers.js.map +1 -1
  70. package/dist/cli/telemetry-flush.js +4 -4
  71. package/dist/cli/telemetry-flush.js.map +1 -1
  72. package/dist/cli-bundle/bundle-manifest.json +334 -326
  73. package/dist/cli-bundle/chunks/{append-OJQFUQ4T.js → append-5YF3TO7I.js} +5 -5
  74. package/dist/cli-bundle/chunks/append-JHO5K6RP.js +11 -0
  75. package/dist/cli-bundle/chunks/{chunk-BCOFWYW4.js → chunk-2BX74BAS.js} +3 -3
  76. package/dist/cli-bundle/chunks/{chunk-APRVSW2O.js → chunk-2CXL335K.js} +3 -3
  77. package/dist/cli-bundle/chunks/{chunk-KG44YSKD.js → chunk-2FUOXSRN.js} +4 -4
  78. package/dist/cli-bundle/chunks/{chunk-HDH3JUGG.js → chunk-2IPNL3DR.js} +3 -3
  79. package/dist/cli-bundle/chunks/{chunk-GM5QHQU6.js → chunk-2XOSFSTH.js} +5 -5
  80. package/dist/cli-bundle/chunks/{chunk-UFXU44HV.js → chunk-35FHWD4C.js} +6 -6
  81. package/dist/cli-bundle/chunks/{chunk-2WSE6PO2.js.map → chunk-35FHWD4C.js.map} +1 -7
  82. package/dist/cli-bundle/chunks/{chunk-K3WII2ME.js → chunk-37DRDP2B.js} +5 -5
  83. package/dist/cli-bundle/chunks/{chunk-BKVG6XOA.js → chunk-3CUQZNQ6.js} +67 -509
  84. package/dist/cli-bundle/chunks/chunk-3CUQZNQ6.js.map +7 -0
  85. package/dist/cli-bundle/chunks/chunk-3QDR6ZLU.js +800 -0
  86. package/dist/cli-bundle/chunks/chunk-3QDR6ZLU.js.map +7 -0
  87. package/dist/cli-bundle/chunks/{chunk-5JLUII3O.js → chunk-43UMFKCK.js} +321 -240
  88. package/dist/cli-bundle/chunks/chunk-43UMFKCK.js.map +1 -0
  89. package/dist/cli-bundle/chunks/{chunk-PMOSXADO.js → chunk-47HXN6RX.js} +3 -3
  90. package/dist/cli-bundle/chunks/{chunk-6CFNAVTF.js → chunk-5HGZKQUL.js} +4 -4
  91. package/dist/cli-bundle/chunks/{chunk-2IFFUZLC.js → chunk-5UKQLQM2.js} +2 -2
  92. package/dist/cli-bundle/chunks/{chunk-DM4H7FP4.js → chunk-633PKXLT.js} +3 -3
  93. package/dist/cli-bundle/chunks/{chunk-XSJUSQAE.js → chunk-646MQXFW.js} +2 -2
  94. package/dist/cli-bundle/chunks/{chunk-ZI6VQWQ7.js → chunk-66MKH7SZ.js} +4 -4
  95. package/dist/cli-bundle/chunks/{chunk-S6MQESFR.js → chunk-67RO3H4N.js} +4 -4
  96. package/dist/cli-bundle/chunks/{chunk-34L5OT3Y.js → chunk-6DYOZS6C.js} +2 -2
  97. package/dist/cli-bundle/chunks/{chunk-RRM5JYJC.js → chunk-6O44IN44.js} +2 -2
  98. package/dist/cli-bundle/chunks/{chunk-5ZSLZLDN.js → chunk-6VHUGVNP.js} +608 -456
  99. package/dist/cli-bundle/chunks/chunk-6VHUGVNP.js.map +1 -0
  100. package/dist/cli-bundle/chunks/{chunk-PENXZX3U.js → chunk-74FKFFXO.js} +2 -2
  101. package/dist/cli-bundle/chunks/{chunk-HO4KXD6I.js → chunk-7H5NNCJ5.js} +4 -4
  102. package/dist/cli-bundle/chunks/{chunk-7B67ZL4N.js → chunk-7R6UIHYY.js} +75 -5
  103. package/dist/cli-bundle/chunks/{chunk-7B67ZL4N.js.map → chunk-7R6UIHYY.js.map} +1 -1
  104. package/dist/cli-bundle/chunks/{chunk-3S5QVM5H.js → chunk-7UCY6DR5.js} +193 -22
  105. package/dist/cli-bundle/chunks/chunk-7UCY6DR5.js.map +1 -0
  106. package/dist/cli-bundle/chunks/{chunk-WT3ZEOGH.js → chunk-ADXDCAKP.js} +16 -7
  107. package/dist/cli-bundle/chunks/{chunk-WT3ZEOGH.js.map → chunk-ADXDCAKP.js.map} +1 -1
  108. package/dist/cli-bundle/chunks/{chunk-TQSZFPIS.js → chunk-AFGKSHAM.js} +4 -4
  109. package/dist/cli-bundle/chunks/{chunk-6N2VXVTQ.js → chunk-ARGDWQ4J.js} +2 -2
  110. package/dist/cli-bundle/chunks/{chunk-XXXF6PAQ.js → chunk-AXRT7K5V.js} +83 -62
  111. package/dist/cli-bundle/chunks/chunk-AXRT7K5V.js.map +7 -0
  112. package/dist/cli-bundle/chunks/{chunk-3U7ZR6M4.js → chunk-B57RJHBZ.js} +4 -4
  113. package/dist/cli-bundle/chunks/{chunk-YCQET3OT.js → chunk-BAP7G3N2.js} +2 -2
  114. package/dist/cli-bundle/chunks/{chunk-NLDFBC6J.js → chunk-BDA35QG5.js} +35 -5
  115. package/dist/cli-bundle/chunks/chunk-BDA35QG5.js.map +7 -0
  116. package/dist/cli-bundle/chunks/{chunk-QKXHFPYM.js → chunk-BIRYX32V.js} +3 -3
  117. package/dist/cli-bundle/chunks/{chunk-RMLWNPH2.js → chunk-BVLOMU6O.js} +2 -2
  118. package/dist/cli-bundle/chunks/{chunk-2VPAVL7O.js → chunk-CKX4WOPC.js} +2 -2
  119. package/dist/cli-bundle/chunks/{chunk-TKOVBP6C.js → chunk-D52ZN3BF.js} +2 -2
  120. package/dist/cli-bundle/chunks/{chunk-KPMKHGEA.js → chunk-D53RTYVI.js} +4 -4
  121. package/dist/cli-bundle/chunks/{chunk-ODALILG3.js → chunk-D5XHO4Q7.js} +2 -2
  122. package/dist/cli-bundle/chunks/{chunk-YAQEBNY7.js → chunk-DDFGYUCQ.js} +4 -4
  123. package/dist/cli-bundle/chunks/{chunk-EAB64KLB.js → chunk-DG2EQRIH.js} +4 -4
  124. package/dist/cli-bundle/chunks/{chunk-J6364LFM.js → chunk-DHNG452T.js} +9 -18
  125. package/dist/cli-bundle/chunks/{chunk-J6364LFM.js.map → chunk-DHNG452T.js.map} +1 -1
  126. package/dist/cli-bundle/chunks/{chunk-JXQUXVMI.js → chunk-E4FXM2XB.js} +77 -7
  127. package/dist/cli-bundle/chunks/{chunk-JXQUXVMI.js.map → chunk-E4FXM2XB.js.map} +1 -1
  128. package/dist/cli-bundle/chunks/{chunk-IG3SWA4A.js → chunk-EHJFUOXL.js} +3 -3
  129. package/dist/cli-bundle/chunks/{chunk-P74IZQ7A.js → chunk-EWIT5WIC.js} +7 -7
  130. package/dist/cli-bundle/chunks/chunk-EX7OQT3Y.js +783 -0
  131. package/dist/cli-bundle/chunks/chunk-EX7OQT3Y.js.map +1 -0
  132. package/dist/cli-bundle/chunks/{chunk-ONREO4ST.js → chunk-EY7ZE3TG.js} +3 -3
  133. package/dist/cli-bundle/chunks/{chunk-ILX33QXL.js → chunk-F3VC3GOV.js} +669 -472
  134. package/dist/cli-bundle/chunks/chunk-F3VC3GOV.js.map +7 -0
  135. package/dist/cli-bundle/chunks/{chunk-EJEXHTY5.js → chunk-FHOBCGQO.js} +2 -2
  136. package/dist/cli-bundle/chunks/{chunk-H3EIEWGR.js → chunk-FL4D53ND.js} +2 -2
  137. package/dist/cli-bundle/chunks/{chunk-WUJQK4YV.js → chunk-FVNWHUME.js} +4 -4
  138. package/dist/cli-bundle/chunks/{chunk-INU6DKT5.js → chunk-FXFCFL73.js} +5 -5
  139. package/dist/cli-bundle/chunks/{chunk-QEHQ2GVG.js → chunk-FY4RLHSC.js} +2 -2
  140. package/dist/cli-bundle/chunks/{chunk-AHVTB5I5.js → chunk-G6MYGULG.js} +4 -4
  141. package/dist/cli-bundle/chunks/{chunk-HYB5AZ63.js → chunk-GKPCTQYG.js} +1822 -72
  142. package/dist/cli-bundle/chunks/chunk-GKPCTQYG.js.map +7 -0
  143. package/dist/cli-bundle/chunks/{chunk-TSMHDIW4.js → chunk-GLZKZON6.js} +2 -2
  144. package/dist/cli-bundle/chunks/{chunk-2JKGO6QX.js → chunk-H5IOT54C.js} +4 -4
  145. package/dist/cli-bundle/chunks/{chunk-SELVXEZK.js → chunk-HO4DLBNK.js} +2 -2
  146. package/dist/cli-bundle/chunks/{chunk-CRVF2JDM.js → chunk-HPAYDSR2.js} +8 -8
  147. package/dist/cli-bundle/chunks/{chunk-3CLU2XZO.js → chunk-HSYV4ZYT.js} +4 -4
  148. package/dist/cli-bundle/chunks/{chunk-EH2OPHBI.js → chunk-HTXXXF45.js} +23 -19
  149. package/dist/cli-bundle/chunks/chunk-HTXXXF45.js.map +1 -0
  150. package/dist/cli-bundle/chunks/{chunk-J5AOEGDC.js → chunk-HYTOJW2Q.js} +8 -8
  151. package/dist/cli-bundle/chunks/{chunk-4XQ3BDV4.js → chunk-I3INI567.js} +536 -449
  152. package/dist/cli-bundle/chunks/chunk-I3INI567.js.map +7 -0
  153. package/dist/cli-bundle/chunks/{chunk-NU3IMIEA.js → chunk-I7DIDUSP.js} +2 -2
  154. package/dist/cli-bundle/chunks/{chunk-JYFOV7FC.js → chunk-IE5KRAKN.js} +4 -4
  155. package/dist/cli-bundle/chunks/{chunk-YAROI3PD.js → chunk-IL5SPRMH.js} +7 -7
  156. package/dist/cli-bundle/chunks/{chunk-UY2ACEMF.js → chunk-ILVOOAT4.js} +5 -5
  157. package/dist/cli-bundle/chunks/{chunk-GOSLKLFE.js → chunk-KH6QAHME.js} +3 -3
  158. package/dist/cli-bundle/chunks/{chunk-QKECXBBG.js → chunk-KX62NMZC.js} +3 -3
  159. package/dist/cli-bundle/chunks/{chunk-QKECXBBG.js.map → chunk-KX62NMZC.js.map} +1 -1
  160. package/dist/cli-bundle/chunks/{chunk-WQPUU7XD.js → chunk-L337QKWJ.js} +5 -5
  161. package/dist/cli-bundle/chunks/{chunk-JFTKLTEF.js → chunk-L5BTTDU5.js} +68 -503
  162. package/dist/cli-bundle/chunks/chunk-L5BTTDU5.js.map +1 -0
  163. package/dist/cli-bundle/chunks/{chunk-LSG2U345.js → chunk-L6FVNR7X.js} +5 -5
  164. package/dist/cli-bundle/chunks/{chunk-FMBNM2EN.js → chunk-LSOWTLEM.js} +2 -2
  165. package/dist/cli-bundle/chunks/{chunk-4223PVZT.js → chunk-M7MVOKVV.js} +3 -3
  166. package/dist/cli-bundle/chunks/{chunk-UMOPHQSU.js → chunk-MR4SHYR4.js} +41 -19
  167. package/dist/cli-bundle/chunks/chunk-MR4SHYR4.js.map +7 -0
  168. package/dist/cli-bundle/chunks/{chunk-3WM75PWC.js → chunk-N33FD2UI.js} +3 -3
  169. package/dist/cli-bundle/chunks/{chunk-UXONS674.js → chunk-NCVT6XEL.js} +68 -56
  170. package/dist/cli-bundle/chunks/chunk-NCVT6XEL.js.map +1 -0
  171. package/dist/cli-bundle/chunks/{chunk-6S3YSUYG.js → chunk-NNANAWFH.js} +3 -3
  172. package/dist/cli-bundle/chunks/{chunk-IJIICKVW.js → chunk-NTRQLE2R.js} +2 -2
  173. package/dist/cli-bundle/chunks/{chunk-SDQLJWBO.js → chunk-NVZ6NVHJ.js} +4 -4
  174. package/dist/cli-bundle/chunks/{chunk-E2OJMKML.js → chunk-OGVTB5VO.js} +47 -37
  175. package/dist/cli-bundle/chunks/chunk-OGVTB5VO.js.map +7 -0
  176. package/dist/cli-bundle/chunks/{chunk-H2Z3FYXQ.js → chunk-OWP6QFBV.js} +4 -4
  177. package/dist/cli-bundle/chunks/{chunk-Q7A43DS4.js → chunk-P22HGFFI.js} +2 -2
  178. package/dist/cli-bundle/chunks/{chunk-NVPZIJVR.js → chunk-PT7MCCGD.js} +2 -2
  179. package/dist/cli-bundle/chunks/{chunk-ONG5V5CI.js → chunk-QPGQNLPI.js} +1751 -70
  180. package/dist/cli-bundle/chunks/chunk-QPGQNLPI.js.map +1 -0
  181. package/dist/cli-bundle/chunks/{chunk-J6EY5V4N.js → chunk-QRZNCRNA.js} +9 -9
  182. package/dist/cli-bundle/chunks/{chunk-QIPLHNP7.js → chunk-QWBKN3QC.js} +5 -5
  183. package/dist/cli-bundle/chunks/{chunk-7PIWCHTW.js → chunk-R5XTTZSJ.js} +5 -5
  184. package/dist/cli-bundle/chunks/{chunk-JOUQZENX.js → chunk-RC4UOUXA.js} +3 -3
  185. package/dist/cli-bundle/chunks/{chunk-BEP7WJA2.js → chunk-RGMWJLXF.js} +4 -4
  186. package/dist/cli-bundle/chunks/{chunk-NP22ERDF.js → chunk-RTBX3C4C.js} +3 -3
  187. package/dist/cli-bundle/chunks/{chunk-FNSPG7MU.js → chunk-RXPQ5Q23.js} +7 -7
  188. package/dist/cli-bundle/chunks/{chunk-LPYWLWDS.js → chunk-SIPOACV5.js} +534 -447
  189. package/dist/cli-bundle/chunks/chunk-SIPOACV5.js.map +1 -0
  190. package/dist/cli-bundle/chunks/chunk-TGBTLGPX.js +851 -0
  191. package/dist/cli-bundle/chunks/chunk-TGBTLGPX.js.map +7 -0
  192. package/dist/cli-bundle/chunks/{chunk-2WSE6PO2.js → chunk-TLWJP5BF.js} +5 -5
  193. package/dist/cli-bundle/chunks/chunk-TLWJP5BF.js.map +7 -0
  194. package/dist/cli-bundle/chunks/{chunk-ULTHRDBP.js → chunk-TM5CIO3F.js} +3 -3
  195. package/dist/cli-bundle/chunks/{chunk-UWQHLMEB.js → chunk-TZAE66GQ.js} +8 -8
  196. package/dist/cli-bundle/chunks/{chunk-OW4JWD5M.js → chunk-VAHZIPWS.js} +4 -4
  197. package/dist/cli-bundle/chunks/{chunk-DYH63FX7.js → chunk-VE6ZSTQW.js} +4 -4
  198. package/dist/cli-bundle/chunks/{chunk-3AUGG2DP.js → chunk-W5E2UUSH.js} +3 -3
  199. package/dist/cli-bundle/chunks/{chunk-BSEQUTQP.js → chunk-WACRQ26A.js} +2 -2
  200. package/dist/cli-bundle/chunks/{chunk-BSEQUTQP.js.map → chunk-WACRQ26A.js.map} +1 -1
  201. package/dist/cli-bundle/chunks/{chunk-UOHFKBUV.js → chunk-WL3SS45P.js} +3 -3
  202. package/dist/cli-bundle/chunks/{chunk-H5APFTHZ.js → chunk-WQXRZMFN.js} +204 -33
  203. package/dist/cli-bundle/chunks/chunk-WQXRZMFN.js.map +7 -0
  204. package/dist/cli-bundle/chunks/{chunk-QKJGPFAF.js → chunk-WU3KAN6A.js} +3 -3
  205. package/dist/cli-bundle/chunks/{chunk-IA5FKNII.js → chunk-X2MGQMZO.js} +2 -2
  206. package/dist/cli-bundle/chunks/{chunk-TD3LVC7D.js → chunk-X5YCTFKT.js} +3 -3
  207. package/dist/cli-bundle/chunks/{chunk-B7PE22W6.js → chunk-XC2HEEOV.js} +4 -4
  208. package/dist/cli-bundle/chunks/{chunk-7Z4LKRS4.js → chunk-XPUTSGJU.js} +38 -37
  209. package/dist/cli-bundle/chunks/chunk-XPUTSGJU.js.map +1 -0
  210. package/dist/cli-bundle/chunks/{chunk-YBLZ2VE7.js → chunk-XWBD6DSR.js} +320 -239
  211. package/dist/cli-bundle/chunks/chunk-XWBD6DSR.js.map +7 -0
  212. package/dist/cli-bundle/chunks/chunk-XWYQ2LT4.js +834 -0
  213. package/dist/cli-bundle/chunks/chunk-XWYQ2LT4.js.map +1 -0
  214. package/dist/cli-bundle/chunks/{chunk-K2X6U4UA.js → chunk-XXLXJL7V.js} +4 -4
  215. package/dist/cli-bundle/chunks/{chunk-2NCIPMQP.js → chunk-YFE7JHX3.js} +27 -6
  216. package/dist/cli-bundle/chunks/chunk-YFE7JHX3.js.map +1 -0
  217. package/dist/cli-bundle/chunks/{chunk-EACOH7AU.js → chunk-YIIIAKCE.js} +8 -8
  218. package/dist/cli-bundle/chunks/{chunk-RLCHOOHC.js → chunk-YJSURTBB.js} +2 -2
  219. package/dist/cli-bundle/chunks/{chunk-PGY23YTC.js → chunk-YKFHF37B.js} +3 -3
  220. package/dist/cli-bundle/chunks/{chunk-EYLCSJAI.js → chunk-YQEZWI3R.js} +2 -2
  221. package/dist/cli-bundle/chunks/close-GPD7DTJV.js +12 -0
  222. package/dist/cli-bundle/chunks/{close-CWODTPKG.js → close-X3CF6FQP.js} +5 -5
  223. package/dist/cli-bundle/chunks/{close-many-CQFUY7MR.js → close-many-J7A5EHOQ.js} +14 -14
  224. package/dist/cli-bundle/chunks/close-many-NQLYGPYW.js +23 -0
  225. package/dist/cli-bundle/chunks/comments-2AOZQ5D2.js +13 -0
  226. package/dist/cli-bundle/chunks/{comments-WGLHR7LB.js → comments-TMHMALA5.js} +7 -7
  227. package/dist/cli-bundle/chunks/{copy-LXVDXH7B.js → copy-FWQA5OU4.js} +4 -4
  228. package/dist/cli-bundle/chunks/copy-N3LCQBMC.js +9 -0
  229. package/dist/cli-bundle/chunks/{create-LBVCYMEG.js → create-AQ5SIGZC.js} +9 -9
  230. package/dist/cli-bundle/chunks/{create-J5U6ND4K.js → create-KOGQ3JKD.js} +9 -9
  231. package/dist/cli-bundle/chunks/delete-6G3MBZ6S.js +10 -0
  232. package/dist/cli-bundle/chunks/{delete-PMJBNY5G.js → delete-YYYFOSEA.js} +4 -4
  233. package/dist/cli-bundle/chunks/{deps-JZ7TMVCB.js → deps-MQ4ZIGZB.js} +16 -7
  234. package/dist/cli-bundle/chunks/deps-NIIKXLPB.js +28 -0
  235. package/dist/cli-bundle/chunks/{docs-FEWB2DQB.js → docs-53NUGMIQ.js} +6 -6
  236. package/dist/cli-bundle/chunks/docs-OWRGDMNY.js +14 -0
  237. package/dist/cli-bundle/chunks/{files-EFIWKFTM.js → files-3PXGXYDB.js} +6 -6
  238. package/dist/cli-bundle/chunks/{files-6YFBJRBG.js → files-EGLKHD7O.js} +6 -6
  239. package/dist/cli-bundle/chunks/focus-KZLIA6WS.js +10 -0
  240. package/dist/cli-bundle/chunks/{focus-4QJR7FOQ.js → focus-SRPASFTN.js} +5 -5
  241. package/dist/cli-bundle/chunks/{history-compact-CKRPDTJN.js → history-compact-G4DULDCX.js} +6 -6
  242. package/dist/cli-bundle/chunks/history-compact-HHIUOMZ7.js +16 -0
  243. package/dist/cli-bundle/chunks/{history-redact-BB3TGDAE.js → history-redact-IUSJ6X3E.js} +4 -4
  244. package/dist/cli-bundle/chunks/{history-redact-D225BHOZ.js → history-redact-THHGRQXV.js} +4 -4
  245. package/dist/cli-bundle/chunks/history-repair-KG7SWXI6.js +16 -0
  246. package/dist/cli-bundle/chunks/{history-repair-RQXKQHL4.js → history-repair-LUQWRS7X.js} +6 -6
  247. package/dist/cli-bundle/chunks/{learnings-JLNLCOL5.js → learnings-2MRNBFJF.js} +7 -7
  248. package/dist/cli-bundle/chunks/learnings-ZVHSALJY.js +13 -0
  249. package/dist/cli-bundle/chunks/{notes-GB47XXQQ.js → notes-73JWKWUD.js} +7 -7
  250. package/dist/cli-bundle/chunks/notes-BAKUL5DJ.js +13 -0
  251. package/dist/cli-bundle/chunks/{plan-VDCJ2PCN.js → plan-AZPMCG37.js} +10 -10
  252. package/dist/cli-bundle/chunks/plan-LEAGLPGP.js +24 -0
  253. package/dist/cli-bundle/chunks/{profile-FAU7NZML.js → profile-AVCIIZID.js} +9 -9
  254. package/dist/cli-bundle/chunks/{profile-IVXQEL3D.js → profile-LFYO3HHX.js} +9 -9
  255. package/dist/cli-bundle/chunks/{register-list-query-UL4UKBBN.js → register-list-query-MZUF2EEC.js} +50 -22
  256. package/dist/cli-bundle/chunks/register-list-query-MZUF2EEC.js.map +1 -0
  257. package/dist/cli-bundle/chunks/{register-list-query-DKA3EH5D.js → register-list-query-UKMF55FT.js} +49 -21
  258. package/dist/cli-bundle/chunks/register-list-query-UKMF55FT.js.map +7 -0
  259. package/dist/cli-bundle/chunks/{register-mutation-RBBJ52DK.js → register-mutation-2PBW2GEX.js} +35 -33
  260. package/dist/cli-bundle/chunks/register-mutation-2PBW2GEX.js.map +1 -0
  261. package/dist/cli-bundle/chunks/{register-mutation-ARFHRW55.js → register-mutation-T6RVNJC4.js} +34 -32
  262. package/dist/cli-bundle/chunks/{register-mutation-ARFHRW55.js.map → register-mutation-T6RVNJC4.js.map} +2 -2
  263. package/dist/cli-bundle/chunks/{register-operations-ZIBBRSED.js → register-operations-KHZYR6MG.js} +35 -35
  264. package/dist/cli-bundle/chunks/{register-operations-ZUJ5JWPE.js → register-operations-WPQ2LWZJ.js} +35 -35
  265. package/dist/cli-bundle/chunks/{register-setup-BCVLFEYS.js → register-setup-PGDNOXDQ.js} +15 -15
  266. package/dist/cli-bundle/chunks/{register-setup-TDCGWIOS.js → register-setup-TDN7WAO6.js} +15 -15
  267. package/dist/cli-bundle/chunks/{restore-25DLT2Q2.js → restore-E3PRGDN3.js} +6 -6
  268. package/dist/cli-bundle/chunks/restore-KIUYTAEJ.js +14 -0
  269. package/dist/cli-bundle/chunks/{schema-FNU3WE4O.js → schema-5JNFQFUW.js} +6 -6
  270. package/dist/cli-bundle/chunks/{schema-NBCM3RAD.js → schema-TMIW4XZC.js} +6 -6
  271. package/dist/cli-bundle/chunks/{update-XHSIAIXE.js → update-SQYZA3ZW.js} +12 -12
  272. package/dist/cli-bundle/chunks/update-XZJYS5X7.js +21 -0
  273. package/dist/cli-bundle/chunks/update-many-R24B3GBK.js +36 -0
  274. package/dist/cli-bundle/chunks/update-many-WQ3R3J6N.js +32 -0
  275. package/dist/cli-bundle/main.js +170 -856
  276. package/dist/cli-bundle/main.js.map +4 -4
  277. package/dist/cli-bundle/sdk-runtime.js +57 -54
  278. package/dist/cli-bundle/sdk-testing.js +6 -6
  279. package/dist/cli-bundle/sdk.js +266 -340
  280. package/dist/cli-bundle/sdk.js.map +4 -4
  281. package/dist/core/extensions/item-fields.js +2 -2
  282. package/dist/core/extensions/item-fields.js.map +1 -1
  283. package/dist/core/item/actionability.d.ts +12 -0
  284. package/dist/core/item/actionability.js +39 -4
  285. package/dist/core/item/actionability.js.map +1 -1
  286. package/dist/core/sentry/instrument.d.ts +11 -0
  287. package/dist/core/sentry/instrument.js +21 -2
  288. package/dist/core/sentry/instrument.js.map +1 -1
  289. package/dist/mcp/server.d.ts +16 -18
  290. package/dist/mcp/server.js +84 -31
  291. package/dist/mcp/server.js.map +1 -1
  292. package/dist/mcp/tool-definitions.js +17 -4
  293. package/dist/mcp/tool-definitions.js.map +1 -1
  294. package/dist/sdk/actionability.d.ts +10 -0
  295. package/dist/sdk/actionability.js +14 -0
  296. package/dist/sdk/actionability.js.map +1 -0
  297. package/dist/sdk/cli-bootstrap.d.ts +122 -0
  298. package/dist/sdk/cli-bootstrap.js +879 -0
  299. package/dist/sdk/cli-bootstrap.js.map +1 -0
  300. package/dist/sdk/cli-contracts/enum-contracts.d.ts +6 -2
  301. package/dist/sdk/cli-contracts/enum-contracts.js +19 -2
  302. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  303. package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
  304. package/dist/sdk/cli-contracts/flag-contracts.js +21 -2
  305. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  306. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +2 -0
  307. package/dist/sdk/cli-contracts/tool-option-contracts.js +16 -2
  308. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  309. package/dist/sdk/cli-contracts/tool-parameter-tables.js +80 -3
  310. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  311. package/dist/sdk/cli-contracts/tool-schema.d.ts +20 -0
  312. package/dist/sdk/cli-contracts/tool-schema.js +97 -9
  313. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  314. package/dist/sdk/cli-contracts.d.ts +2 -2
  315. package/dist/sdk/cli-contracts.js +4 -4
  316. package/dist/sdk/cli-contracts.js.map +1 -1
  317. package/dist/sdk/dependencies.d.ts +42 -53
  318. package/dist/sdk/dependencies.js +177 -125
  319. package/dist/sdk/dependencies.js.map +1 -1
  320. package/dist/sdk/eval.d.ts +66 -0
  321. package/dist/sdk/eval.js +186 -0
  322. package/dist/sdk/eval.js.map +1 -0
  323. package/dist/sdk/governance/validate.js +3 -3
  324. package/dist/sdk/governance/validate.js.map +1 -1
  325. package/dist/sdk/graph/analytics.d.ts +124 -0
  326. package/dist/sdk/graph/analytics.js +464 -0
  327. package/dist/sdk/graph/analytics.js.map +1 -0
  328. package/dist/sdk/graph/assembly.d.ts +97 -0
  329. package/dist/sdk/graph/assembly.js +146 -0
  330. package/dist/sdk/graph/assembly.js.map +1 -0
  331. package/dist/sdk/graph/cache.d.ts +66 -0
  332. package/dist/sdk/graph/cache.js +148 -0
  333. package/dist/sdk/graph/cache.js.map +1 -0
  334. package/dist/sdk/graph/governance.d.ts +108 -0
  335. package/dist/sdk/graph/governance.js +360 -0
  336. package/dist/sdk/graph/governance.js.map +1 -0
  337. package/dist/sdk/graph/index.d.ts +16 -0
  338. package/dist/sdk/graph/index.js +20 -0
  339. package/dist/sdk/graph/index.js.map +1 -0
  340. package/dist/sdk/graph/remediation.d.ts +52 -0
  341. package/dist/sdk/graph/remediation.js +148 -0
  342. package/dist/sdk/graph/remediation.js.map +1 -0
  343. package/dist/sdk/graph/run.d.ts +295 -0
  344. package/dist/sdk/graph/run.js +468 -0
  345. package/dist/sdk/graph/run.js.map +1 -0
  346. package/dist/sdk/graph/traversal.d.ts +77 -0
  347. package/dist/sdk/graph/traversal.js +262 -0
  348. package/dist/sdk/graph/traversal.js.map +1 -0
  349. package/dist/sdk/index.d.ts +19 -5
  350. package/dist/sdk/index.js +21 -7
  351. package/dist/sdk/index.js.map +1 -1
  352. package/dist/{cli/commands → sdk/query}/item-filter-options.d.ts +1 -1
  353. package/dist/{cli/commands → sdk/query}/item-filter-options.js +3 -3
  354. package/dist/sdk/query/item-filter-options.js.map +1 -0
  355. package/dist/sdk/query/list.d.ts +262 -0
  356. package/dist/sdk/query/list.js +1089 -0
  357. package/dist/sdk/query/list.js.map +1 -0
  358. package/dist/sdk/query/parsers.d.ts +9 -0
  359. package/dist/sdk/query/parsers.js +45 -0
  360. package/dist/sdk/query/parsers.js.map +1 -0
  361. package/dist/{cli/commands → sdk/query}/search-pagination.js +4 -4
  362. package/dist/sdk/query/search-pagination.js.map +1 -0
  363. package/dist/{cli/commands → sdk/query}/search-rendering.js +3 -3
  364. package/dist/sdk/query/search-rendering.js.map +1 -0
  365. package/dist/sdk/query/search.d.ts +469 -0
  366. package/dist/sdk/query/search.js +2247 -0
  367. package/dist/sdk/query/search.js.map +1 -0
  368. package/dist/sdk/relationship-context.d.ts +42 -0
  369. package/dist/sdk/relationship-context.js +99 -20
  370. package/dist/sdk/relationship-context.js.map +1 -1
  371. package/dist/sdk/relationships.d.ts +13 -0
  372. package/dist/sdk/relationships.js +30 -2
  373. package/dist/sdk/relationships.js.map +1 -1
  374. package/dist/sdk/runtime-input.d.ts +41 -0
  375. package/dist/sdk/runtime-input.js +422 -2
  376. package/dist/sdk/runtime-input.js.map +1 -1
  377. package/dist/sdk/runtime.d.ts +19 -30
  378. package/dist/sdk/runtime.js +30 -376
  379. package/dist/sdk/runtime.js.map +1 -1
  380. package/dist/sdk/search-refresh-worker.d.ts +2 -0
  381. package/dist/sdk/search-refresh-worker.js +19 -0
  382. package/dist/sdk/search-refresh-worker.js.map +1 -0
  383. package/dist/sdk/stats.d.ts +66 -0
  384. package/dist/sdk/stats.js +151 -0
  385. package/dist/sdk/stats.js.map +1 -0
  386. package/dist/sdk/telemetry-flush.d.ts +2 -0
  387. package/dist/sdk/telemetry-flush.js +14 -0
  388. package/dist/sdk/telemetry-flush.js.map +1 -0
  389. package/dist/sdk/telemetry.d.ts +14 -0
  390. package/dist/sdk/telemetry.js +398 -0
  391. package/dist/sdk/telemetry.js.map +1 -0
  392. package/dist/sdk/test/batch.d.ts +94 -0
  393. package/dist/sdk/test/batch.js +492 -0
  394. package/dist/sdk/test/batch.js.map +1 -0
  395. package/dist/sdk/test/entry.d.ts +6 -0
  396. package/dist/sdk/test/entry.js +74 -0
  397. package/dist/sdk/test/entry.js.map +1 -0
  398. package/dist/sdk/test/execution.d.ts +282 -0
  399. package/dist/sdk/test/execution.js +1817 -0
  400. package/dist/sdk/test/execution.js.map +1 -0
  401. package/dist/sdk/test/linked-command-detection.js +12 -3
  402. package/dist/sdk/test/linked-command-detection.js.map +1 -1
  403. package/dist/sdk/test/parsers.d.ts +48 -0
  404. package/dist/sdk/test/parsers.js +522 -0
  405. package/dist/sdk/test/parsers.js.map +1 -0
  406. package/dist/sdk/test/runs.d.ts +92 -0
  407. package/dist/sdk/test/runs.js +195 -0
  408. package/dist/sdk/test/runs.js.map +1 -0
  409. package/docs/AGENT_GUIDE.md +1 -0
  410. package/docs/COMMANDS.md +19 -1
  411. package/docs/RELATIONSHIP_GRAPH.md +99 -3
  412. package/docs/SDK.md +139 -3
  413. package/docs/SDK_PRIMITIVE_INVENTORY.md +5 -3
  414. package/docs/examples/sdk-custom-tool/README.md +27 -0
  415. package/docs/examples/sdk-custom-tool/package.json +13 -0
  416. package/docs/examples/sdk-custom-tool/src/cli.ts +36 -0
  417. package/docs/examples/sdk-custom-tool/src/entry.ts +15 -0
  418. package/docs/examples/sdk-custom-tool/src/index.ts +223 -0
  419. package/marketplace.json +2 -2
  420. package/package.json +4 -4
  421. package/packages/pm-beads/package.json +1 -1
  422. package/packages/pm-calendar/package.json +1 -1
  423. package/packages/pm-command-kit/package.json +1 -1
  424. package/packages/pm-governance-audit/extensions/governance-audit/comments-audit.ts +77 -57
  425. package/packages/pm-governance-audit/extensions/governance-audit/dedupe-audit.ts +202 -194
  426. package/packages/pm-governance-audit/extensions/governance-audit/dedupe-merge.ts +227 -153
  427. package/packages/pm-governance-audit/extensions/governance-audit/normalize.ts +169 -125
  428. package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +130 -81
  429. package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +53 -4
  430. package/packages/pm-governance-audit/package.json +1 -1
  431. package/packages/pm-guide-shell/package.json +1 -1
  432. package/packages/pm-kanban/package.json +1 -1
  433. package/packages/pm-lifecycle-hooks/package.json +1 -1
  434. package/packages/pm-linked-test-adapters/package.json +1 -1
  435. package/packages/pm-search-advanced/package.json +1 -1
  436. package/packages/pm-templates/package.json +1 -1
  437. package/packages/pm-todos/package.json +1 -1
  438. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  439. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  440. package/dist/cli/commands/item-filter-options.js.map +0 -1
  441. package/dist/cli/commands/search-pagination.js.map +0 -1
  442. package/dist/cli/commands/search-rendering.js.map +0 -1
  443. package/dist/cli-bundle/chunks/append-UZVHUO74.js +0 -11
  444. package/dist/cli-bundle/chunks/chunk-2NCIPMQP.js.map +0 -1
  445. package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +0 -1
  446. package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +0 -7
  447. package/dist/cli-bundle/chunks/chunk-5JLUII3O.js.map +0 -1
  448. package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +0 -1
  449. package/dist/cli-bundle/chunks/chunk-7Z4LKRS4.js.map +0 -1
  450. package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js.map +0 -7
  451. package/dist/cli-bundle/chunks/chunk-E2OJMKML.js.map +0 -7
  452. package/dist/cli-bundle/chunks/chunk-EH2OPHBI.js.map +0 -1
  453. package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +0 -7
  454. package/dist/cli-bundle/chunks/chunk-HYB5AZ63.js.map +0 -7
  455. package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +0 -7
  456. package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js.map +0 -1
  457. package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +0 -1
  458. package/dist/cli-bundle/chunks/chunk-NLDFBC6J.js.map +0 -7
  459. package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +0 -1
  460. package/dist/cli-bundle/chunks/chunk-UFXU44HV.js.map +0 -1
  461. package/dist/cli-bundle/chunks/chunk-UMOPHQSU.js.map +0 -7
  462. package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +0 -1
  463. package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +0 -7
  464. package/dist/cli-bundle/chunks/chunk-YBLZ2VE7.js.map +0 -7
  465. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +0 -58
  466. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +0 -1
  467. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +0 -68
  468. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +0 -7
  469. package/dist/cli-bundle/chunks/close-W6LI2PKM.js +0 -12
  470. package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +0 -23
  471. package/dist/cli-bundle/chunks/comments-E3TNTK24.js +0 -13
  472. package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +0 -9
  473. package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +0 -10
  474. package/dist/cli-bundle/chunks/deps-OA26IS25.js +0 -19
  475. package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +0 -14
  476. package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +0 -10
  477. package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +0 -16
  478. package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +0 -16
  479. package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +0 -13
  480. package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +0 -13
  481. package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +0 -24
  482. package/dist/cli-bundle/chunks/register-list-query-DKA3EH5D.js.map +0 -7
  483. package/dist/cli-bundle/chunks/register-list-query-UL4UKBBN.js.map +0 -1
  484. package/dist/cli-bundle/chunks/register-mutation-RBBJ52DK.js.map +0 -1
  485. package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +0 -14
  486. package/dist/cli-bundle/chunks/update-WWBYOPXO.js +0 -21
  487. package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +0 -32
  488. package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +0 -36
  489. /package/dist/cli-bundle/chunks/{append-OJQFUQ4T.js.map → append-5YF3TO7I.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{append-UZVHUO74.js.map → append-JHO5K6RP.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{chunk-BCOFWYW4.js.map → chunk-2BX74BAS.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{chunk-APRVSW2O.js.map → chunk-2CXL335K.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{chunk-KG44YSKD.js.map → chunk-2FUOXSRN.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{chunk-HDH3JUGG.js.map → chunk-2IPNL3DR.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{chunk-GM5QHQU6.js.map → chunk-2XOSFSTH.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{chunk-K3WII2ME.js.map → chunk-37DRDP2B.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{chunk-PMOSXADO.js.map → chunk-47HXN6RX.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{chunk-6CFNAVTF.js.map → chunk-5HGZKQUL.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{chunk-2IFFUZLC.js.map → chunk-5UKQLQM2.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{chunk-DM4H7FP4.js.map → chunk-633PKXLT.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{chunk-XSJUSQAE.js.map → chunk-646MQXFW.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{chunk-ZI6VQWQ7.js.map → chunk-66MKH7SZ.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{chunk-S6MQESFR.js.map → chunk-67RO3H4N.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{chunk-34L5OT3Y.js.map → chunk-6DYOZS6C.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{chunk-RRM5JYJC.js.map → chunk-6O44IN44.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{chunk-PENXZX3U.js.map → chunk-74FKFFXO.js.map} +0 -0
  507. /package/dist/cli-bundle/chunks/{chunk-HO4KXD6I.js.map → chunk-7H5NNCJ5.js.map} +0 -0
  508. /package/dist/cli-bundle/chunks/{chunk-TQSZFPIS.js.map → chunk-AFGKSHAM.js.map} +0 -0
  509. /package/dist/cli-bundle/chunks/{chunk-6N2VXVTQ.js.map → chunk-ARGDWQ4J.js.map} +0 -0
  510. /package/dist/cli-bundle/chunks/{chunk-3U7ZR6M4.js.map → chunk-B57RJHBZ.js.map} +0 -0
  511. /package/dist/cli-bundle/chunks/{chunk-YCQET3OT.js.map → chunk-BAP7G3N2.js.map} +0 -0
  512. /package/dist/cli-bundle/chunks/{chunk-QKXHFPYM.js.map → chunk-BIRYX32V.js.map} +0 -0
  513. /package/dist/cli-bundle/chunks/{chunk-RMLWNPH2.js.map → chunk-BVLOMU6O.js.map} +0 -0
  514. /package/dist/cli-bundle/chunks/{chunk-2VPAVL7O.js.map → chunk-CKX4WOPC.js.map} +0 -0
  515. /package/dist/cli-bundle/chunks/{chunk-TKOVBP6C.js.map → chunk-D52ZN3BF.js.map} +0 -0
  516. /package/dist/cli-bundle/chunks/{chunk-KPMKHGEA.js.map → chunk-D53RTYVI.js.map} +0 -0
  517. /package/dist/cli-bundle/chunks/{chunk-ODALILG3.js.map → chunk-D5XHO4Q7.js.map} +0 -0
  518. /package/dist/cli-bundle/chunks/{chunk-YAQEBNY7.js.map → chunk-DDFGYUCQ.js.map} +0 -0
  519. /package/dist/cli-bundle/chunks/{chunk-EAB64KLB.js.map → chunk-DG2EQRIH.js.map} +0 -0
  520. /package/dist/cli-bundle/chunks/{chunk-IG3SWA4A.js.map → chunk-EHJFUOXL.js.map} +0 -0
  521. /package/dist/cli-bundle/chunks/{chunk-P74IZQ7A.js.map → chunk-EWIT5WIC.js.map} +0 -0
  522. /package/dist/cli-bundle/chunks/{chunk-ONREO4ST.js.map → chunk-EY7ZE3TG.js.map} +0 -0
  523. /package/dist/cli-bundle/chunks/{chunk-EJEXHTY5.js.map → chunk-FHOBCGQO.js.map} +0 -0
  524. /package/dist/cli-bundle/chunks/{chunk-H3EIEWGR.js.map → chunk-FL4D53ND.js.map} +0 -0
  525. /package/dist/cli-bundle/chunks/{chunk-WUJQK4YV.js.map → chunk-FVNWHUME.js.map} +0 -0
  526. /package/dist/cli-bundle/chunks/{chunk-INU6DKT5.js.map → chunk-FXFCFL73.js.map} +0 -0
  527. /package/dist/cli-bundle/chunks/{chunk-QEHQ2GVG.js.map → chunk-FY4RLHSC.js.map} +0 -0
  528. /package/dist/cli-bundle/chunks/{chunk-AHVTB5I5.js.map → chunk-G6MYGULG.js.map} +0 -0
  529. /package/dist/cli-bundle/chunks/{chunk-TSMHDIW4.js.map → chunk-GLZKZON6.js.map} +0 -0
  530. /package/dist/cli-bundle/chunks/{chunk-2JKGO6QX.js.map → chunk-H5IOT54C.js.map} +0 -0
  531. /package/dist/cli-bundle/chunks/{chunk-SELVXEZK.js.map → chunk-HO4DLBNK.js.map} +0 -0
  532. /package/dist/cli-bundle/chunks/{chunk-CRVF2JDM.js.map → chunk-HPAYDSR2.js.map} +0 -0
  533. /package/dist/cli-bundle/chunks/{chunk-3CLU2XZO.js.map → chunk-HSYV4ZYT.js.map} +0 -0
  534. /package/dist/cli-bundle/chunks/{chunk-J5AOEGDC.js.map → chunk-HYTOJW2Q.js.map} +0 -0
  535. /package/dist/cli-bundle/chunks/{chunk-NU3IMIEA.js.map → chunk-I7DIDUSP.js.map} +0 -0
  536. /package/dist/cli-bundle/chunks/{chunk-JYFOV7FC.js.map → chunk-IE5KRAKN.js.map} +0 -0
  537. /package/dist/cli-bundle/chunks/{chunk-YAROI3PD.js.map → chunk-IL5SPRMH.js.map} +0 -0
  538. /package/dist/cli-bundle/chunks/{chunk-UY2ACEMF.js.map → chunk-ILVOOAT4.js.map} +0 -0
  539. /package/dist/cli-bundle/chunks/{chunk-GOSLKLFE.js.map → chunk-KH6QAHME.js.map} +0 -0
  540. /package/dist/cli-bundle/chunks/{chunk-WQPUU7XD.js.map → chunk-L337QKWJ.js.map} +0 -0
  541. /package/dist/cli-bundle/chunks/{chunk-LSG2U345.js.map → chunk-L6FVNR7X.js.map} +0 -0
  542. /package/dist/cli-bundle/chunks/{chunk-FMBNM2EN.js.map → chunk-LSOWTLEM.js.map} +0 -0
  543. /package/dist/cli-bundle/chunks/{chunk-4223PVZT.js.map → chunk-M7MVOKVV.js.map} +0 -0
  544. /package/dist/cli-bundle/chunks/{chunk-3WM75PWC.js.map → chunk-N33FD2UI.js.map} +0 -0
  545. /package/dist/cli-bundle/chunks/{chunk-6S3YSUYG.js.map → chunk-NNANAWFH.js.map} +0 -0
  546. /package/dist/cli-bundle/chunks/{chunk-IJIICKVW.js.map → chunk-NTRQLE2R.js.map} +0 -0
  547. /package/dist/cli-bundle/chunks/{chunk-SDQLJWBO.js.map → chunk-NVZ6NVHJ.js.map} +0 -0
  548. /package/dist/cli-bundle/chunks/{chunk-H2Z3FYXQ.js.map → chunk-OWP6QFBV.js.map} +0 -0
  549. /package/dist/cli-bundle/chunks/{chunk-Q7A43DS4.js.map → chunk-P22HGFFI.js.map} +0 -0
  550. /package/dist/cli-bundle/chunks/{chunk-NVPZIJVR.js.map → chunk-PT7MCCGD.js.map} +0 -0
  551. /package/dist/cli-bundle/chunks/{chunk-J6EY5V4N.js.map → chunk-QRZNCRNA.js.map} +0 -0
  552. /package/dist/cli-bundle/chunks/{chunk-QIPLHNP7.js.map → chunk-QWBKN3QC.js.map} +0 -0
  553. /package/dist/cli-bundle/chunks/{chunk-7PIWCHTW.js.map → chunk-R5XTTZSJ.js.map} +0 -0
  554. /package/dist/cli-bundle/chunks/{chunk-JOUQZENX.js.map → chunk-RC4UOUXA.js.map} +0 -0
  555. /package/dist/cli-bundle/chunks/{chunk-BEP7WJA2.js.map → chunk-RGMWJLXF.js.map} +0 -0
  556. /package/dist/cli-bundle/chunks/{chunk-NP22ERDF.js.map → chunk-RTBX3C4C.js.map} +0 -0
  557. /package/dist/cli-bundle/chunks/{chunk-FNSPG7MU.js.map → chunk-RXPQ5Q23.js.map} +0 -0
  558. /package/dist/cli-bundle/chunks/{chunk-ULTHRDBP.js.map → chunk-TM5CIO3F.js.map} +0 -0
  559. /package/dist/cli-bundle/chunks/{chunk-UWQHLMEB.js.map → chunk-TZAE66GQ.js.map} +0 -0
  560. /package/dist/cli-bundle/chunks/{chunk-OW4JWD5M.js.map → chunk-VAHZIPWS.js.map} +0 -0
  561. /package/dist/cli-bundle/chunks/{chunk-DYH63FX7.js.map → chunk-VE6ZSTQW.js.map} +0 -0
  562. /package/dist/cli-bundle/chunks/{chunk-3AUGG2DP.js.map → chunk-W5E2UUSH.js.map} +0 -0
  563. /package/dist/cli-bundle/chunks/{chunk-UOHFKBUV.js.map → chunk-WL3SS45P.js.map} +0 -0
  564. /package/dist/cli-bundle/chunks/{chunk-QKJGPFAF.js.map → chunk-WU3KAN6A.js.map} +0 -0
  565. /package/dist/cli-bundle/chunks/{chunk-IA5FKNII.js.map → chunk-X2MGQMZO.js.map} +0 -0
  566. /package/dist/cli-bundle/chunks/{chunk-TD3LVC7D.js.map → chunk-X5YCTFKT.js.map} +0 -0
  567. /package/dist/cli-bundle/chunks/{chunk-B7PE22W6.js.map → chunk-XC2HEEOV.js.map} +0 -0
  568. /package/dist/cli-bundle/chunks/{chunk-K2X6U4UA.js.map → chunk-XXLXJL7V.js.map} +0 -0
  569. /package/dist/cli-bundle/chunks/{chunk-EACOH7AU.js.map → chunk-YIIIAKCE.js.map} +0 -0
  570. /package/dist/cli-bundle/chunks/{chunk-RLCHOOHC.js.map → chunk-YJSURTBB.js.map} +0 -0
  571. /package/dist/cli-bundle/chunks/{chunk-PGY23YTC.js.map → chunk-YKFHF37B.js.map} +0 -0
  572. /package/dist/cli-bundle/chunks/{chunk-EYLCSJAI.js.map → chunk-YQEZWI3R.js.map} +0 -0
  573. /package/dist/cli-bundle/chunks/{close-W6LI2PKM.js.map → close-GPD7DTJV.js.map} +0 -0
  574. /package/dist/cli-bundle/chunks/{close-CWODTPKG.js.map → close-X3CF6FQP.js.map} +0 -0
  575. /package/dist/cli-bundle/chunks/{close-many-CQFUY7MR.js.map → close-many-J7A5EHOQ.js.map} +0 -0
  576. /package/dist/cli-bundle/chunks/{close-many-DLDDVSH5.js.map → close-many-NQLYGPYW.js.map} +0 -0
  577. /package/dist/cli-bundle/chunks/{comments-E3TNTK24.js.map → comments-2AOZQ5D2.js.map} +0 -0
  578. /package/dist/cli-bundle/chunks/{comments-WGLHR7LB.js.map → comments-TMHMALA5.js.map} +0 -0
  579. /package/dist/cli-bundle/chunks/{copy-LXVDXH7B.js.map → copy-FWQA5OU4.js.map} +0 -0
  580. /package/dist/cli-bundle/chunks/{copy-Q5ZJPUKR.js.map → copy-N3LCQBMC.js.map} +0 -0
  581. /package/dist/cli-bundle/chunks/{create-LBVCYMEG.js.map → create-AQ5SIGZC.js.map} +0 -0
  582. /package/dist/cli-bundle/chunks/{create-J5U6ND4K.js.map → create-KOGQ3JKD.js.map} +0 -0
  583. /package/dist/cli-bundle/chunks/{delete-WNHB3LYW.js.map → delete-6G3MBZ6S.js.map} +0 -0
  584. /package/dist/cli-bundle/chunks/{delete-PMJBNY5G.js.map → delete-YYYFOSEA.js.map} +0 -0
  585. /package/dist/cli-bundle/chunks/{deps-JZ7TMVCB.js.map → deps-MQ4ZIGZB.js.map} +0 -0
  586. /package/dist/cli-bundle/chunks/{deps-OA26IS25.js.map → deps-NIIKXLPB.js.map} +0 -0
  587. /package/dist/cli-bundle/chunks/{docs-FEWB2DQB.js.map → docs-53NUGMIQ.js.map} +0 -0
  588. /package/dist/cli-bundle/chunks/{docs-HA2AIDBB.js.map → docs-OWRGDMNY.js.map} +0 -0
  589. /package/dist/cli-bundle/chunks/{files-EFIWKFTM.js.map → files-3PXGXYDB.js.map} +0 -0
  590. /package/dist/cli-bundle/chunks/{files-6YFBJRBG.js.map → files-EGLKHD7O.js.map} +0 -0
  591. /package/dist/cli-bundle/chunks/{focus-POIW5LTJ.js.map → focus-KZLIA6WS.js.map} +0 -0
  592. /package/dist/cli-bundle/chunks/{focus-4QJR7FOQ.js.map → focus-SRPASFTN.js.map} +0 -0
  593. /package/dist/cli-bundle/chunks/{history-compact-CKRPDTJN.js.map → history-compact-G4DULDCX.js.map} +0 -0
  594. /package/dist/cli-bundle/chunks/{history-compact-FWG2C7FZ.js.map → history-compact-HHIUOMZ7.js.map} +0 -0
  595. /package/dist/cli-bundle/chunks/{history-redact-BB3TGDAE.js.map → history-redact-IUSJ6X3E.js.map} +0 -0
  596. /package/dist/cli-bundle/chunks/{history-redact-D225BHOZ.js.map → history-redact-THHGRQXV.js.map} +0 -0
  597. /package/dist/cli-bundle/chunks/{history-repair-6GEAM7HE.js.map → history-repair-KG7SWXI6.js.map} +0 -0
  598. /package/dist/cli-bundle/chunks/{history-repair-RQXKQHL4.js.map → history-repair-LUQWRS7X.js.map} +0 -0
  599. /package/dist/cli-bundle/chunks/{learnings-JLNLCOL5.js.map → learnings-2MRNBFJF.js.map} +0 -0
  600. /package/dist/cli-bundle/chunks/{learnings-RSNLSWDC.js.map → learnings-ZVHSALJY.js.map} +0 -0
  601. /package/dist/cli-bundle/chunks/{notes-GB47XXQQ.js.map → notes-73JWKWUD.js.map} +0 -0
  602. /package/dist/cli-bundle/chunks/{notes-2WDH6DXU.js.map → notes-BAKUL5DJ.js.map} +0 -0
  603. /package/dist/cli-bundle/chunks/{plan-VDCJ2PCN.js.map → plan-AZPMCG37.js.map} +0 -0
  604. /package/dist/cli-bundle/chunks/{plan-DOVI2VMW.js.map → plan-LEAGLPGP.js.map} +0 -0
  605. /package/dist/cli-bundle/chunks/{profile-FAU7NZML.js.map → profile-AVCIIZID.js.map} +0 -0
  606. /package/dist/cli-bundle/chunks/{profile-IVXQEL3D.js.map → profile-LFYO3HHX.js.map} +0 -0
  607. /package/dist/cli-bundle/chunks/{register-operations-ZIBBRSED.js.map → register-operations-KHZYR6MG.js.map} +0 -0
  608. /package/dist/cli-bundle/chunks/{register-operations-ZUJ5JWPE.js.map → register-operations-WPQ2LWZJ.js.map} +0 -0
  609. /package/dist/cli-bundle/chunks/{register-setup-BCVLFEYS.js.map → register-setup-PGDNOXDQ.js.map} +0 -0
  610. /package/dist/cli-bundle/chunks/{register-setup-TDCGWIOS.js.map → register-setup-TDN7WAO6.js.map} +0 -0
  611. /package/dist/cli-bundle/chunks/{restore-25DLT2Q2.js.map → restore-E3PRGDN3.js.map} +0 -0
  612. /package/dist/cli-bundle/chunks/{restore-YPMVUUEX.js.map → restore-KIUYTAEJ.js.map} +0 -0
  613. /package/dist/cli-bundle/chunks/{schema-FNU3WE4O.js.map → schema-5JNFQFUW.js.map} +0 -0
  614. /package/dist/cli-bundle/chunks/{schema-NBCM3RAD.js.map → schema-TMIW4XZC.js.map} +0 -0
  615. /package/dist/cli-bundle/chunks/{update-XHSIAIXE.js.map → update-SQYZA3ZW.js.map} +0 -0
  616. /package/dist/cli-bundle/chunks/{update-WWBYOPXO.js.map → update-XZJYS5X7.js.map} +0 -0
  617. /package/dist/cli-bundle/chunks/{update-many-TA7NGQBO.js.map → update-many-R24B3GBK.js.map} +0 -0
  618. /package/dist/cli-bundle/chunks/{update-many-OUGIU5SF.js.map → update-many-WQ3R3J6N.js.map} +0 -0
  619. /package/dist/{cli/commands → sdk/query}/search-pagination.d.ts +0 -0
  620. /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";
4
- import {
5
- collectDanglingDependencyReferences,
6
- createRelationshipKindRegistry
7
- } from "./chunk-BKVG6XOA.js";
3
+ } from "./chunk-D5XHO4Q7.js";
8
4
  import {
9
5
  scanHistoryDrift
10
- } from "./chunk-KG44YSKD.js";
6
+ } from "./chunk-2FUOXSRN.js";
11
7
  import {
12
8
  runFiles
13
- } from "./chunk-ZI6VQWQ7.js";
9
+ } from "./chunk-66MKH7SZ.js";
14
10
  import {
15
11
  isRemoteLinkedArtifactReference
16
- } from "./chunk-WUJQK4YV.js";
12
+ } from "./chunk-FVNWHUME.js";
17
13
  import {
18
14
  runUpdate
19
- } from "./chunk-CRVF2JDM.js";
15
+ } from "./chunk-HPAYDSR2.js";
20
16
  import {
21
17
  wrapOwnershipConflict
22
- } from "./chunk-QIPLHNP7.js";
18
+ } from "./chunk-QWBKN3QC.js";
23
19
  import {
24
20
  PM_TELEMETRY_SOURCE_CONTEXT_VALUES,
25
21
  TELEMETRY_MAX_QUEUE_ENTRY_ATTEMPTS,
26
22
  TELEMETRY_SCHEMA_VERSION,
27
23
  flushTelemetryQueueNow
28
- } from "./chunk-NP22ERDF.js";
24
+ } from "./chunk-RTBX3C4C.js";
29
25
  import {
30
26
  buildCapabilityContractMetadata,
31
27
  buildRegistrationCollisionRemediation,
32
28
  collectUnknownCapabilityGuidance,
33
29
  readManagedExtensionState,
34
30
  runInit
35
- } from "./chunk-J6364LFM.js";
31
+ } from "./chunk-DHNG452T.js";
36
32
  import {
37
33
  collectStaleVectorizationIds,
38
34
  runNext
39
- } from "./chunk-E2OJMKML.js";
35
+ } from "./chunk-OGVTB5VO.js";
36
+ import {
37
+ collectDanglingDependencyReferences,
38
+ createRelationshipKindRegistry
39
+ } from "./chunk-3CUQZNQ6.js";
40
40
  import {
41
41
  computeContentFieldUtilization
42
- } from "./chunk-XXXF6PAQ.js";
42
+ } from "./chunk-AXRT7K5V.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-7R6UIHYY.js";
64
64
  import {
65
65
  ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,
66
66
  ACTIVITY_FLAG_CONTRACTS,
@@ -104,6 +104,8 @@ import {
104
104
  GC_FLAG_CONTRACTS,
105
105
  GET_FLAG_CONTRACTS,
106
106
  GLOBAL_FLAG_CONTRACTS,
107
+ GRAPH_FLAG_CONTRACTS,
108
+ GRAPH_SUBCOMMAND_VALUES,
107
109
  GUIDE_FLAG_CONTRACTS,
108
110
  HEALTH_FLAG_CONTRACTS,
109
111
  HISTORY_COMPACT_FLAG_CONTRACTS,
@@ -150,7 +152,7 @@ import {
150
152
  UPGRADE_FLAG_CONTRACTS,
151
153
  VALIDATE_FLAG_CONTRACTS,
152
154
  compactFlagAliasContracts
153
- } from "./chunk-H5APFTHZ.js";
155
+ } from "./chunk-WQXRZMFN.js";
154
156
  import {
155
157
  LINKED_TEST_PM_CONTEXT_MODE_VALUES,
156
158
  LINKED_TEST_PROTECTED_ENV_KEYS,
@@ -167,12 +169,12 @@ import {
167
169
  parseLinkedTestRegexList,
168
170
  parseLinkedTestStringList,
169
171
  runCreate
170
- } from "./chunk-UMOPHQSU.js";
172
+ } from "./chunk-MR4SHYR4.js";
171
173
  import {
172
174
  createStdinTokenResolver,
173
175
  parseCsvKv,
174
176
  parseOptionalNumber
175
- } from "./chunk-TKOVBP6C.js";
177
+ } from "./chunk-D52ZN3BF.js";
176
178
  import {
177
179
  CURRENT_ITEM_FORMAT_VERSION,
178
180
  compareTimestampStrings,
@@ -199,7 +201,7 @@ import {
199
201
  stableValueEquals,
200
202
  toItemRecord,
201
203
  writeSettings
202
- } from "./chunk-XSJUSQAE.js";
204
+ } from "./chunk-646MQXFW.js";
203
205
  import {
204
206
  DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS,
205
207
  DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS,
@@ -241,7 +243,7 @@ import {
241
243
  statusIsTerminal,
242
244
  toNonEmptyStringOrUndefined,
243
245
  writeFileAtomic
244
- } from "./chunk-BSEQUTQP.js";
246
+ } from "./chunk-WACRQ26A.js";
245
247
 
246
248
  // dist/sdk/start-task-status.js
247
249
  !(function() {
@@ -441,7 +443,7 @@ async function runRelease(id, force, global2, options = {}) {
441
443
  !(function() {
442
444
  try {
443
445
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
444
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "478bf194-a9d0-5c6a-b70e-d15164927fda");
446
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "3cdd51a1-c5ae-500e-b228-b3f2cf101aae");
445
447
  } catch (e2) {
446
448
  }
447
449
  })();
@@ -740,11 +742,24 @@ var TOOLS = [
740
742
  },
741
743
  {
742
744
  name: "pm_deps",
743
- description: "Read dependency trees/graphs or one bounded explainable relationship context packet. Use options.format=context with depth, node, edge, token, and cursor bounds.",
745
+ description: "Read dependency trees/graphs or one bounded explainable relationship context packet. Use options.format=context with direction, kind, depth, node, edge, token, and cursor bounds; context returns a counts-first summary, per-node roles/reasons, root evidence pointers, and enumerated missing references.",
744
746
  inputSchema: objectSchema({ id: idSchema, options: { type: "object" } }, [
745
747
  "id"
746
748
  ])
747
749
  },
750
+ {
751
+ name: "pm_graph",
752
+ description: "Run bounded workspace relationship-graph queries: ancestors/descendants (hierarchy), predecessors/successors (ordering), paths, impact (blast radius), analyze (execution + knowledge analytics), audit (governance findings), communities (label-propagation clusters), redundancy (transitively implied edges), dominators (structural bottlenecks), and plan (dry-run remediation proposals derived from the audit). Traversals, paths, impact, and dominators require id; paths also requires target. Options support kind, maxDepth, limit, after, direction, maxPaths, sample, exemptIsolate, and counts-first summary.",
753
+ inputSchema: objectSchema({
754
+ subcommand: {
755
+ type: "string",
756
+ enum: [...GRAPH_SUBCOMMAND_VALUES]
757
+ },
758
+ id: idSchema,
759
+ target: idSchema,
760
+ options: { type: "object" }
761
+ }, ["subcommand"])
762
+ },
748
763
  {
749
764
  name: "pm_test",
750
765
  description: "List, add, remove, or run linked tests for a pm item.",
@@ -967,7 +982,7 @@ function buildMcpToolContracts() {
967
982
  !(function() {
968
983
  try {
969
984
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
970
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "4c0be9fc-93e1-5d94-8ae7-24ac51837102");
985
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "08ac6711-5c5a-5e7f-98bb-791676103a6f");
971
986
  } catch (e2) {
972
987
  }
973
988
  })();
@@ -1083,6 +1098,7 @@ var COMMAND_INTENTS = /* @__PURE__ */ new Map([
1083
1098
  ["focus", "Manage focus."],
1084
1099
  ["gc", "Clean caches."],
1085
1100
  ["get", "Read item."],
1101
+ ["graph", "Query graph."],
1086
1102
  ["guide", "Show user guides."],
1087
1103
  ["health", "Check health."],
1088
1104
  ["help", "Show help."],
@@ -1151,6 +1167,7 @@ var CORE_COMMAND_FLAG_CONTRACT_ENTRIES = [
1151
1167
  ["next", NEXT_FLAG_CONTRACTS],
1152
1168
  ["aggregate", AGGREGATE_FLAG_CONTRACTS],
1153
1169
  ["deps", DEPS_FLAG_CONTRACTS],
1170
+ ["graph", GRAPH_FLAG_CONTRACTS],
1154
1171
  ["guide", GUIDE_FLAG_CONTRACTS],
1155
1172
  ["reindex", REINDEX_FLAG_CONTRACTS],
1156
1173
  ["history", HISTORY_FLAG_CONTRACTS],
@@ -5175,7 +5192,7 @@ function runRemind(title, options, global2) {
5175
5192
  return runCreate(createOptions, global2);
5176
5193
  }
5177
5194
 
5178
- // dist/cli/commands/stats.js
5195
+ // dist/sdk/stats.js
5179
5196
  import fs6 from "node:fs/promises";
5180
5197
  import path6 from "node:path";
5181
5198
 
@@ -5271,11 +5288,11 @@ function computeHistoryStorageStats(streams, options) {
5271
5288
  };
5272
5289
  }
5273
5290
 
5274
- // dist/cli/commands/stats.js
5291
+ // dist/sdk/stats.js
5275
5292
  !(function() {
5276
5293
  try {
5277
5294
  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");
5295
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "3abba5c6-fe9b-55de-bafb-3f3c604df10c");
5279
5296
  } catch (e2) {
5280
5297
  }
5281
5298
  })();
@@ -5297,9 +5314,6 @@ function countNonEmptyLines(raw) {
5297
5314
  }
5298
5315
  return raw.split(/\r?\n/u).filter((line) => line.trim().length > 0).length;
5299
5316
  }
5300
- function isNotFoundError(error) {
5301
- return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
5302
- }
5303
5317
  async function readHistoryStreamContents(pmRoot) {
5304
5318
  const historyDir = path6.join(pmRoot, "history");
5305
5319
  if (!await pathExists(historyDir)) {
@@ -5313,14 +5327,9 @@ async function readHistoryStreamContents(pmRoot) {
5313
5327
  const streams = [];
5314
5328
  for (const file of historyFiles) {
5315
5329
  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;
5330
+ const raw = await readFileIfExists(historyPath);
5331
+ if (raw === null) {
5332
+ continue;
5324
5333
  }
5325
5334
  await runActiveOnReadHooks({
5326
5335
  path: historyPath,
@@ -5389,13 +5398,22 @@ async function runStats(global2, options = {}) {
5389
5398
  };
5390
5399
  }
5391
5400
 
5392
- // dist/cli/commands/telemetry.js
5401
+ // dist/cli/commands/stats.js
5402
+ !(function() {
5403
+ try {
5404
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5405
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "81afc203-9f08-5d9d-ac28-566f521ccfba");
5406
+ } catch (e2) {
5407
+ }
5408
+ })();
5409
+
5410
+ // dist/sdk/telemetry.js
5393
5411
  import fs7 from "node:fs/promises";
5394
5412
  import path7 from "node:path";
5395
5413
  !(function() {
5396
5414
  try {
5397
5415
  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");
5416
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0f28d1b5-3b78-5a74-8c2d-592f5dbdadda");
5399
5417
  } catch (e2) {
5400
5418
  }
5401
5419
  })();
@@ -5409,19 +5427,32 @@ var TELEMETRY_SUBCOMMANDS = [
5409
5427
  "stats",
5410
5428
  "clear"
5411
5429
  ];
5412
- function nearestRankPercentile(sortedAscending, fraction) {
5430
+ var nearestRankPercentile = (sortedAscending, fraction) => {
5413
5431
  const rank = Math.ceil(fraction * sortedAscending.length);
5414
5432
  const index = Math.min(sortedAscending.length - 1, Math.max(0, rank - 1));
5415
5433
  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() {
5434
+ };
5435
+ var normalizeTelemetryText = (value, fallback) => {
5436
+ if (typeof value !== "string") {
5437
+ return fallback;
5438
+ }
5439
+ return value.trim().length > 0 ? value : fallback;
5440
+ };
5441
+ var normalizeFiniteInteger = (value) => {
5442
+ if (typeof value !== "number" || !Number.isFinite(value)) {
5443
+ return void 0;
5444
+ }
5445
+ return Math.trunc(value);
5446
+ };
5447
+ var normalizeTelemetryQueueEntry = (entry) => {
5448
+ return {
5449
+ command: normalizeTelemetryText(entry.event.command, "<unknown>"),
5450
+ eventType: normalizeTelemetryText(entry.event.event_type, "unknown"),
5451
+ eventSchemaVersion: normalizeFiniteInteger(entry.event.schema_version),
5452
+ clientSchemaVersion: normalizeFiniteInteger(entry.client_schema_version)
5453
+ };
5454
+ };
5455
+ var createTelemetryStatsAccumulator = () => {
5425
5456
  return {
5426
5457
  count: 0,
5427
5458
  max_attempts: 0,
@@ -5433,9 +5464,20 @@ function createTelemetryStatsAccumulator() {
5433
5464
  error_count: 0,
5434
5465
  resolution_counts: {}
5435
5466
  };
5436
- }
5437
- function recordTelemetryFinishPayload(current, payload) {
5438
- const durationMs = typeof payload?.duration_ms === "number" && Number.isFinite(payload.duration_ms) ? payload.duration_ms : void 0;
5467
+ };
5468
+ var readTelemetryDuration = (payload) => {
5469
+ const value = payload?.duration_ms;
5470
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
5471
+ };
5472
+ var readTelemetryResolution = (payload) => {
5473
+ const value = payload?.command_resolution;
5474
+ return normalizeTelemetryText(value, "") || void 0;
5475
+ };
5476
+ var incrementTelemetryCount = (counts, key) => {
5477
+ counts[key] = (counts[key] ?? 0) + 1;
5478
+ };
5479
+ var recordTelemetryFinishPayload = (current, payload) => {
5480
+ const durationMs = readTelemetryDuration(payload);
5439
5481
  if (durationMs !== void 0) {
5440
5482
  current.finish_durations_ms.push(durationMs);
5441
5483
  }
@@ -5444,30 +5486,31 @@ function recordTelemetryFinishPayload(current, payload) {
5444
5486
  } else {
5445
5487
  current.error_count += 1;
5446
5488
  }
5447
- const resolution = typeof payload?.command_resolution === "string" && payload.command_resolution.trim().length > 0 ? payload.command_resolution : void 0;
5489
+ const resolution = readTelemetryResolution(payload);
5448
5490
  if (resolution !== void 0) {
5449
- current.resolution_counts[resolution] = (current.resolution_counts[resolution] ?? 0) + 1;
5491
+ incrementTelemetryCount(current.resolution_counts, resolution);
5450
5492
  }
5451
- }
5452
- function recordTelemetryQueueEntry(grouped, entry) {
5493
+ };
5494
+ var normalizeTelemetryAttempts = (attempts) => Number.isFinite(attempts) ? Math.max(0, Math.trunc(attempts)) : 0;
5495
+ var addTelemetryDimension = (values, value) => {
5496
+ if (value !== void 0) {
5497
+ values.add(value);
5498
+ }
5499
+ };
5500
+ var recordTelemetryQueueEntry = (grouped, entry) => {
5453
5501
  const normalized = normalizeTelemetryQueueEntry(entry);
5454
5502
  const current = grouped.get(normalized.command) ?? createTelemetryStatsAccumulator();
5455
- const attempts = Number.isFinite(entry.attempts) ? Math.max(0, Math.trunc(entry.attempts)) : 0;
5456
5503
  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
- }
5504
+ current.max_attempts = Math.max(current.max_attempts, normalizeTelemetryAttempts(entry.attempts));
5505
+ incrementTelemetryCount(current.event_type_counts, normalized.eventType);
5506
+ addTelemetryDimension(current.event_schema_versions, normalized.eventSchemaVersion);
5507
+ addTelemetryDimension(current.client_schema_versions, normalized.clientSchemaVersion);
5465
5508
  if (normalized.eventType === "command_finish") {
5466
5509
  recordTelemetryFinishPayload(current, entry.event.payload);
5467
5510
  }
5468
5511
  grouped.set(normalized.command, current);
5469
- }
5470
- function buildTelemetryStatsBucket(command, value) {
5512
+ };
5513
+ var buildTelemetryStatsBucket = (command, value) => {
5471
5514
  const finishCount = value.ok_count + value.error_count;
5472
5515
  const sortedDurations = [...value.finish_durations_ms].sort((left, right) => left - right);
5473
5516
  const resolutionEntries = Object.entries(value.resolution_counts).sort((left, right) => left[0].localeCompare(right[0]));
@@ -5490,8 +5533,8 @@ function buildTelemetryStatsBucket(command, value) {
5490
5533
  } : {},
5491
5534
  ...resolutionEntries.length > 0 ? { command_resolution_counts: Object.fromEntries(resolutionEntries) } : {}
5492
5535
  };
5493
- }
5494
- function normalizeTelemetrySubcommand(value) {
5536
+ };
5537
+ var normalizeTelemetrySubcommand = (value) => {
5495
5538
  const normalized = (value ?? "status").trim().toLowerCase();
5496
5539
  if (TELEMETRY_SUBCOMMANDS.includes(normalized)) {
5497
5540
  return normalized;
@@ -5505,78 +5548,93 @@ function normalizeTelemetrySubcommand(value) {
5505
5548
  "pm telemetry clear"
5506
5549
  ]
5507
5550
  });
5508
- }
5509
- function parseTelemetryStatsLimit(raw) {
5551
+ };
5552
+ var throwInvalidTelemetryLimit = () => {
5553
+ throw new PmCliError("--limit must be a positive integer", EXIT_CODE.USAGE);
5554
+ };
5555
+ var requirePositiveTelemetryLimit = (value) => {
5556
+ if ([!Number.isFinite(value), !Number.isInteger(value), value <= 0].includes(true)) {
5557
+ return throwInvalidTelemetryLimit();
5558
+ }
5559
+ return value;
5560
+ };
5561
+ var parseTelemetryStringLimit = (raw) => {
5562
+ const trimmed = raw.trim();
5563
+ if ([trimmed.length === 0, !/^\d+$/.test(trimmed)].includes(true)) {
5564
+ return throwInvalidTelemetryLimit();
5565
+ }
5566
+ return requirePositiveTelemetryLimit(Number.parseInt(trimmed, 10));
5567
+ };
5568
+ var parseTelemetryStatsLimit = (raw) => {
5510
5569
  if (raw === void 0) {
5511
5570
  return DEFAULT_STATS_LIMIT;
5512
5571
  }
5513
5572
  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;
5573
+ return requirePositiveTelemetryLimit(raw);
5518
5574
  }
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);
5575
+ if (typeof raw === "string") {
5576
+ return parseTelemetryStringLimit(raw);
5522
5577
  }
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);
5578
+ return throwInvalidTelemetryLimit();
5579
+ };
5580
+ var isTelemetryQueueEntry = (value) => {
5581
+ if (typeof value !== "object" || value === null) {
5582
+ return false;
5526
5583
  }
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
- };
5584
+ const candidate = value;
5585
+ return typeof candidate.attempts === "number" && typeof candidate.event === "object" && candidate.event !== null;
5586
+ };
5587
+ var parseTelemetryQueueRow = (row) => {
5588
+ try {
5589
+ const parsed = JSON.parse(row);
5590
+ return isTelemetryQueueEntry(parsed) ? parsed : void 0;
5591
+ } catch {
5592
+ return void 0;
5593
+ }
5594
+ };
5595
+ var splitTelemetryQueueRows = (raw) => {
5596
+ if (raw === null) {
5597
+ return [];
5537
5598
  }
5599
+ return raw.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
5600
+ };
5601
+ var parseTelemetryQueue2 = (raw) => {
5602
+ const rows = splitTelemetryQueueRows(raw);
5538
5603
  const entries = [];
5539
- let rowsTotal = 0;
5540
5604
  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 {
5605
+ for (const row of rows) {
5606
+ const parsed = parseTelemetryQueueRow(row);
5607
+ if (parsed === void 0) {
5555
5608
  invalidRows += 1;
5609
+ } else {
5610
+ entries.push(parsed);
5556
5611
  }
5557
5612
  }
5558
5613
  return {
5559
- rows_total: rowsTotal,
5614
+ rows_total: rows.length,
5560
5615
  valid_entries: entries.length,
5561
5616
  invalid_rows: invalidRows,
5562
5617
  entries
5563
5618
  };
5564
- }
5565
- async function readTelemetryRuntimeState(statePath) {
5619
+ };
5620
+ var isTelemetryRuntimeState = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
5621
+ var parseTelemetryRuntimeState2 = (raw) => {
5622
+ try {
5623
+ const parsed = JSON.parse(raw);
5624
+ return isTelemetryRuntimeState(parsed) ? parsed : {};
5625
+ } catch {
5626
+ return {};
5627
+ }
5628
+ };
5629
+ var readTelemetryRuntimeState = async (statePath) => {
5566
5630
  const stateRaw = await readFileIfExists(statePath);
5567
5631
  if (stateRaw === null || stateRaw.trim().length === 0) {
5568
5632
  return {};
5569
5633
  }
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) {
5634
+ return parseTelemetryRuntimeState2(stateRaw);
5635
+ };
5636
+ var nullableTelemetryStateValue = (value) => value ?? null;
5637
+ var buildTelemetryStatusSummary = async (globalPmRoot) => {
5580
5638
  const settings = await readSettings(globalPmRoot);
5581
5639
  const queuePath = path7.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2);
5582
5640
  const statePath = path7.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2);
@@ -5591,273 +5649,117 @@ async function buildTelemetryStatusSummary(globalPmRoot) {
5591
5649
  queue_rows_total: queue.rows_total,
5592
5650
  queue_entries: queue.valid_entries,
5593
5651
  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
5652
+ queue_size_bytes: Buffer.byteLength(queueRaw ?? "", "utf8"),
5653
+ last_attempted_flush_at: nullableTelemetryStateValue(runtimeState.last_attempted_flush_at),
5654
+ last_successful_flush_at: nullableTelemetryStateValue(runtimeState.last_successful_flush_at),
5655
+ last_failed_flush_at: nullableTelemetryStateValue(runtimeState.last_failed_flush_at),
5656
+ last_failed_flush_error: nullableTelemetryStateValue(runtimeState.last_failed_flush_error)
5599
5657
  };
5600
- }
5601
- function buildTelemetryStatsBuckets(entries) {
5658
+ };
5659
+ var buildTelemetryStatsBuckets = (entries) => {
5602
5660
  const grouped = /* @__PURE__ */ new Map();
5603
5661
  for (const entry of entries) {
5604
5662
  recordTelemetryQueueEntry(grouped, entry);
5605
5663
  }
5606
5664
  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;
5665
+ };
5666
+ var runTelemetryStatus = async (_options, context) => ({
5667
+ action: "telemetry",
5668
+ subcommand: "status",
5669
+ status: await buildTelemetryStatusSummary(context.globalPmRoot),
5670
+ generated_at: nowIso()
5671
+ });
5672
+ var runTelemetryFlush = async (_options, context) => {
5673
+ const before = await buildTelemetryStatusSummary(context.globalPmRoot);
5674
+ await flushTelemetryQueueNow(context.globalPmRoot);
5675
+ const after = await buildTelemetryStatusSummary(context.globalPmRoot);
5676
+ return {
5677
+ action: "telemetry",
5678
+ subcommand: "flush",
5679
+ queue_entries_before: before.queue_entries,
5680
+ queue_entries_after: after.queue_entries,
5681
+ queue_drained: after.queue_entries < before.queue_entries,
5682
+ status: after,
5683
+ generated_at: nowIso()
5684
+ };
5685
+ };
5686
+ var runTelemetryStats = async (options, context) => {
5687
+ const limit = parseTelemetryStatsLimit(options.limit);
5688
+ const queueRaw = await readFileIfExists(context.queuePath);
5689
+ const queue = parseTelemetryQueue2(queueRaw);
5690
+ const buckets = buildTelemetryStatsBuckets(queue.entries);
5691
+ const selected = buckets.slice(0, limit);
5692
+ return {
5693
+ action: "telemetry",
5694
+ subcommand: "stats",
5695
+ limit,
5696
+ total_commands: buckets.length,
5697
+ queue_entries: queue.valid_entries,
5698
+ queue_invalid_rows: queue.invalid_rows,
5699
+ queue_rows_total: queue.rows_total,
5700
+ truncated: buckets.length > selected.length,
5701
+ stats: selected,
5702
+ generated_at: nowIso()
5703
+ };
5704
+ };
5705
+ var runTelemetryClear = async (_options, context) => {
5706
+ const settings = await readSettings(context.globalPmRoot);
5707
+ const settingsChanged = [
5708
+ settings.telemetry.enabled !== false,
5709
+ settings.telemetry.installation_id !== "",
5710
+ settings.telemetry.first_run_prompt_completed !== true
5711
+ ].includes(true);
5659
5712
  settings.telemetry.enabled = false;
5660
5713
  settings.telemetry.first_run_prompt_completed = true;
5661
5714
  settings.telemetry.installation_id = "";
5662
- const settingsChanged = previousEnabled !== settings.telemetry.enabled || previousInstallationId !== settings.telemetry.installation_id || previousFirstRunPromptCompleted !== settings.telemetry.first_run_prompt_completed;
5663
5715
  if (settingsChanged) {
5664
- await writeSettings(globalPmRoot, settings, "telemetry:clear");
5716
+ await writeSettings(context.globalPmRoot, settings, "telemetry:clear");
5665
5717
  }
5666
- const telemetryRuntimePath = path7.join(globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);
5718
+ const telemetryRuntimePath = path7.join(context.globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);
5667
5719
  const existed = await pathExists(telemetryRuntimePath);
5668
5720
  await fs7.rm(telemetryRuntimePath, { recursive: true, force: true });
5669
- const queueExistsAfter = await pathExists(queuePath);
5670
- const stateExistsAfter = await pathExists(statePath);
5671
5721
  return {
5672
5722
  action: "telemetry",
5673
- subcommand,
5723
+ subcommand: "clear",
5674
5724
  settings_changed: settingsChanged,
5675
5725
  runtime_dir_removed: existed && !await pathExists(telemetryRuntimePath),
5676
- queue_exists_after: queueExistsAfter,
5677
- state_exists_after: stateExistsAfter,
5678
- status: await buildTelemetryStatusSummary(globalPmRoot),
5726
+ queue_exists_after: await pathExists(context.queuePath),
5727
+ state_exists_after: await pathExists(context.statePath),
5728
+ status: await buildTelemetryStatusSummary(context.globalPmRoot),
5679
5729
  generated_at: nowIso()
5680
5730
  };
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";
5731
+ };
5732
+ var TELEMETRY_COMMAND_HANDLERS = {
5733
+ status: runTelemetryStatus,
5734
+ flush: runTelemetryFlush,
5735
+ stats: runTelemetryStats,
5736
+ clear: runTelemetryClear
5737
+ };
5738
+ var runTelemetry = async (options, _global) => {
5739
+ void _global;
5740
+ const subcommand = normalizeTelemetrySubcommand(options.subcommand);
5741
+ const globalPmRoot = resolveGlobalPmRoot(process.cwd());
5742
+ return TELEMETRY_COMMAND_HANDLERS[subcommand](options, {
5743
+ globalPmRoot,
5744
+ queuePath: path7.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2),
5745
+ statePath: path7.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2)
5746
+ });
5747
+ };
5688
5748
 
5689
- // dist/core/test/item-test-run-tracking.js
5749
+ // dist/cli/commands/telemetry.js
5690
5750
  !(function() {
5691
5751
  try {
5692
5752
  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");
5753
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "d305520e-3ead-55e7-8382-3a12e9692e93");
5694
5754
  } catch (e2) {
5695
5755
  }
5696
5756
  })();
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
- }
5740
- });
5741
- }
5742
5757
 
5743
- // dist/core/test/run-selectors.js
5758
+ // dist/sdk/test/linked-command-detection.js
5744
5759
  !(function() {
5745
5760
  try {
5746
5761
  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");
5748
- } catch (e2) {
5749
- }
5750
- })();
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
-
5856
- // dist/sdk/test/linked-command-detection.js
5857
- !(function() {
5858
- try {
5859
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5860
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "3b8460ce-e579-5c5a-94ca-b6cc616c088b");
5762
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b5ce9338-c375-5964-a4e9-2fa13a34b9f8");
5861
5763
  } catch (e2) {
5862
5764
  }
5863
5765
  })();
@@ -6064,7 +5966,9 @@ var PM_ITEM_REFERENCE_FLAGS_WITH_VALUE = {
6064
5966
  "--node-limit",
6065
5967
  "--edge-limit",
6066
5968
  "--token-budget",
6067
- "--cursor"
5969
+ "--cursor",
5970
+ "--direction",
5971
+ "--kind"
6068
5972
  ]),
6069
5973
  test: /* @__PURE__ */ new Set([
6070
5974
  "--add",
@@ -6125,7 +6029,11 @@ function extractPmInvocationArgsFromSegment(segment) {
6125
6029
  return invocation && (isPmExecutableToken(invocation.command) || isPmCliPackageToken(invocation.command)) ? invocation.args : null;
6126
6030
  }
6127
6031
  var extractReferencedPmItemIdsFromCommand = (command, idPrefix = "pm") => {
6128
- const normalizedPrefix = idPrefix.trim().toLowerCase().replace(/-+$/, "");
6032
+ const lowered = idPrefix.trim().toLowerCase();
6033
+ let prefixEnd = lowered.length;
6034
+ while (prefixEnd > 0 && lowered[prefixEnd - 1] === "-")
6035
+ prefixEnd -= 1;
6036
+ const normalizedPrefix = lowered.slice(0, prefixEnd);
6129
6037
  if (normalizedPrefix.length === 0)
6130
6038
  return [];
6131
6039
  const normalizedCommand = command.trim().replaceAll("\\", "/").replaceAll('"', "").replaceAll("'", "").replaceAll(/\s+/g, " ").toLowerCase();
@@ -6310,11 +6218,184 @@ function firstPositionalToken(tokens, flagsWithValue = /* @__PURE__ */ new Set()
6310
6218
  return void 0;
6311
6219
  }
6312
6220
 
6313
- // dist/cli/commands/test.js
6221
+ // dist/sdk/test/execution.js
6222
+ import { spawn } from "node:child_process";
6223
+ import { cp, mkdir, mkdtemp, readdir, rm } from "node:fs/promises";
6224
+ import { tmpdir } from "node:os";
6225
+ import path8 from "node:path";
6226
+
6227
+ // dist/core/test/item-test-run-tracking.js
6228
+ !(function() {
6229
+ try {
6230
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
6231
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "da2481e4-5f2e-5f0c-99fb-932ee6f8ce6d");
6232
+ } catch (e2) {
6233
+ }
6234
+ })();
6235
+ var DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT = 20;
6236
+ function trackedTestRunHistoryLimit() {
6237
+ const raw = process.env.PM_TRACKED_TEST_RUN_HISTORY_LIMIT;
6238
+ if (!raw || raw.trim().length === 0) {
6239
+ return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
6240
+ }
6241
+ const parsed = Number.parseInt(raw, 10);
6242
+ if (!Number.isFinite(parsed) || parsed <= 0) {
6243
+ return DEFAULT_TRACKED_TEST_RUN_HISTORY_LIMIT;
6244
+ }
6245
+ return parsed;
6246
+ }
6247
+ function normalizeTrackedTestRunSummaries(entries) {
6248
+ 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) => {
6249
+ const byRecorded = compareTimestampStrings(left.recorded_at, right.recorded_at);
6250
+ if (byRecorded !== 0)
6251
+ return byRecorded;
6252
+ const byRunId = left.run_id.localeCompare(right.run_id);
6253
+ if (byRunId !== 0)
6254
+ return byRunId;
6255
+ return left.kind.localeCompare(right.kind);
6256
+ });
6257
+ }
6258
+ async function appendTrackedTestRunSummary(options) {
6259
+ const historyLimit = trackedTestRunHistoryLimit();
6260
+ await mutateItem({
6261
+ pmRoot: options.pmRoot,
6262
+ settings: options.settings,
6263
+ id: options.itemId,
6264
+ op: "test_run_track",
6265
+ author: options.author,
6266
+ message: options.message,
6267
+ force: false,
6268
+ mutate(document) {
6269
+ const current = document.metadata.test_runs ?? [];
6270
+ const next = normalizeTrackedTestRunSummaries([
6271
+ ...current,
6272
+ options.entry
6273
+ ]);
6274
+ const bounded = next.length > historyLimit ? next.slice(next.length - historyLimit) : next;
6275
+ document.metadata.test_runs = bounded;
6276
+ return { changedFields: ["test_runs"] };
6277
+ }
6278
+ });
6279
+ }
6280
+
6281
+ // dist/core/test/run-selectors.js
6282
+ !(function() {
6283
+ try {
6284
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
6285
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "183637de-1877-5037-a199-0b11e6247ada");
6286
+ } catch (e2) {
6287
+ }
6288
+ })();
6289
+ var MAX_SELECTOR_ENTRY_LABEL_LENGTH = 100;
6290
+ function parseOnlyIndexValue(raw, optionName = "--only-index") {
6291
+ const value = typeof raw === "number" ? raw : Number(String(raw).trim());
6292
+ if (!Number.isInteger(value) || value < 1) {
6293
+ 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);
6294
+ }
6295
+ return value;
6296
+ }
6297
+ function summarizeSelectorEntry(entry) {
6298
+ const label = entry.command ?? entry.path ?? "<no command>";
6299
+ const normalized = label.replaceAll(/\s+/g, " ").trim() || "<no command>";
6300
+ if (normalized.length <= MAX_SELECTOR_ENTRY_LABEL_LENGTH) {
6301
+ return normalized;
6302
+ }
6303
+ return `${normalized.slice(0, MAX_SELECTOR_ENTRY_LABEL_LENGTH - 3)}...`;
6304
+ }
6305
+ function describeLinkedTestEntries(tests) {
6306
+ return tests.map((entry, index) => `${index + 1}. ${summarizeSelectorEntry(entry)}`).join("; ");
6307
+ }
6308
+ function activeSelectorKinds(selector) {
6309
+ const kinds = [];
6310
+ if (selector.match !== void 0) {
6311
+ kinds.push("match");
6312
+ }
6313
+ if (selector.onlyIndex !== void 0) {
6314
+ kinds.push("only-index");
6315
+ }
6316
+ if (selector.onlyLast === true) {
6317
+ kinds.push("only-last");
6318
+ }
6319
+ return kinds;
6320
+ }
6321
+ function entryMatchesSubstring(entry, needle) {
6322
+ const command = entry.command?.toLowerCase() ?? "";
6323
+ const entryPath = entry.path?.toLowerCase() ?? "";
6324
+ return command.includes(needle) || entryPath.includes(needle);
6325
+ }
6326
+ function resolveLinkedTestRunSelection(tests, selector) {
6327
+ const kinds = activeSelectorKinds(selector);
6328
+ if (kinds.length === 0) {
6329
+ return {
6330
+ selector: null,
6331
+ requested: null,
6332
+ selected: tests,
6333
+ selected_indexes: tests.map((_, index) => index + 1),
6334
+ selected_count: tests.length,
6335
+ skipped_count: 0
6336
+ };
6337
+ }
6338
+ if (kinds.length > 1) {
6339
+ 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);
6340
+ }
6341
+ const kind = kinds[0];
6342
+ if (tests.length === 0) {
6343
+ 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);
6344
+ }
6345
+ if (kind === "match") {
6346
+ const needle = selector.match.trim().toLowerCase();
6347
+ if (needle.length === 0) {
6348
+ throw new PmCliError("--match requires a non-empty substring to match against linked-test command/path values", EXIT_CODE.USAGE);
6349
+ }
6350
+ const selectedIndexes = [];
6351
+ const selected = [];
6352
+ for (let index = 0; index < tests.length; index += 1) {
6353
+ if (entryMatchesSubstring(tests[index], needle)) {
6354
+ selected.push(tests[index]);
6355
+ selectedIndexes.push(index + 1);
6356
+ }
6357
+ }
6358
+ if (selected.length === 0) {
6359
+ throw new PmCliError(`--match "${selector.match}" matched none of the ${tests.length} linked test(s). Available entries: ${describeLinkedTestEntries(tests)}`, EXIT_CODE.USAGE);
6360
+ }
6361
+ return {
6362
+ selector: "match",
6363
+ requested: selector.match,
6364
+ selected,
6365
+ selected_indexes: selectedIndexes,
6366
+ selected_count: selected.length,
6367
+ skipped_count: tests.length - selected.length
6368
+ };
6369
+ }
6370
+ if (kind === "only-index") {
6371
+ const index = parseOnlyIndexValue(selector.onlyIndex);
6372
+ if (index > tests.length) {
6373
+ 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);
6374
+ }
6375
+ return {
6376
+ selector: "only-index",
6377
+ requested: String(index),
6378
+ selected: [tests[index - 1]],
6379
+ selected_indexes: [index],
6380
+ selected_count: 1,
6381
+ skipped_count: tests.length - 1
6382
+ };
6383
+ }
6384
+ return {
6385
+ selector: "only-last",
6386
+ requested: "last",
6387
+ selected: [tests[tests.length - 1]],
6388
+ selected_indexes: [tests.length],
6389
+ selected_count: 1,
6390
+ skipped_count: tests.length - 1
6391
+ };
6392
+ }
6393
+
6394
+ // dist/sdk/test/execution.js
6314
6395
  !(function() {
6315
6396
  try {
6316
6397
  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");
6398
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "29421f08-c442-5b5b-8955-c255f9936bfd");
6318
6399
  } catch (e2) {
6319
6400
  }
6320
6401
  })();
@@ -6475,7 +6556,17 @@ function resolveLinkedTestEffectiveContextMode(requestedMode, isPmTrackerReadCom
6475
6556
  return requestedMode;
6476
6557
  }
6477
6558
  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;
6559
+ return Object.entries(linkedTest).filter(([key]) => key.startsWith("assert_")).some(([, value]) => {
6560
+ if (value === void 0 || value === null)
6561
+ return false;
6562
+ if (Array.isArray(value))
6563
+ return value.length > 0;
6564
+ if (typeof value === "object")
6565
+ return Object.keys(value).length > 0;
6566
+ if (typeof value === "string")
6567
+ return value.trim().length > 0;
6568
+ return true;
6569
+ });
6479
6570
  }
6480
6571
  function buildPmContextMismatchHint(params) {
6481
6572
  const { executionContext, runLevelPmContextMode, linkedOverridePmContextMode } = params;
@@ -6579,6 +6670,12 @@ function parsedLauncherInvokesRecursiveTestAll(parsed) {
6579
6670
  }
6580
6671
  return firstPmSubcommand(parsed.args) === "test-all";
6581
6672
  }
6673
+ var SHELL_COMMAND_FLAG_PATTERNS = new Map([
6674
+ ...["sh", "bash", "dash", "zsh"].map((executable) => [executable, /^(?:-c|-[a-z]*c[a-z]*)$/u]),
6675
+ ...["cmd", "cmd.exe"].map((executable) => [executable, /^\/[ck]$/u]),
6676
+ ...["powershell", "powershell.exe", "pwsh", "pwsh.exe"].map((executable) => [executable, /^-(?:c|command)$/u])
6677
+ ]);
6678
+ var PACKAGE_EXEC_EXECUTABLES = /* @__PURE__ */ new Set(["npx", "bunx"]);
6582
6679
  function segmentInvokesRecursiveTestAll(segment) {
6583
6680
  const rawTokens = segment.split(" ").filter((token) => token.length > 0);
6584
6681
  const tokens = stripLeadingEnvAssignments(rawTokens);
@@ -6586,13 +6683,18 @@ function segmentInvokesRecursiveTestAll(segment) {
6586
6683
  return false;
6587
6684
  }
6588
6685
  const [executable, ...args] = tokens;
6686
+ const shellCommandFlagPattern = SHELL_COMMAND_FLAG_PATTERNS.get(executable);
6687
+ if (shellCommandFlagPattern) {
6688
+ const commandFlagIndex = args.findIndex((arg) => shellCommandFlagPattern.test(arg));
6689
+ return commandFlagIndex >= 0 ? segmentInvokesRecursiveTestAll(args.slice(commandFlagIndex + 1).join(" ")) : false;
6690
+ }
6589
6691
  if (isPmExecutableToken(executable) || isPmCliScriptToken(executable)) {
6590
6692
  return firstPmSubcommand(args) === "test-all";
6591
6693
  }
6592
6694
  if (executable === "node" && args.length > 0 && isPmCliScriptToken(args[0])) {
6593
6695
  return firstPmSubcommand(args.slice(1)) === "test-all";
6594
6696
  }
6595
- if (executable === "npx" || executable === "bunx") {
6697
+ if (PACKAGE_EXEC_EXECUTABLES.has(executable)) {
6596
6698
  return parsedLauncherInvokesRecursiveTestAll(parseNpxCommand(args));
6597
6699
  }
6598
6700
  if (executable === "pnpm") {
@@ -6706,7 +6808,13 @@ function parseLinkedTestTimeoutSeconds(timeoutSecondsRaw, timeoutAliasRaw) {
6706
6808
  throw new PmCliError("--add timeout and timeout_seconds must match when both are provided", EXIT_CODE.USAGE);
6707
6809
  }
6708
6810
  const timeoutRaw = timeoutSecondsRaw ?? timeoutAliasRaw;
6709
- return timeoutRaw === void 0 ? void 0 : Math.floor(parseOptionalNumber(timeoutRaw, "timeout_seconds"));
6811
+ if (timeoutRaw === void 0)
6812
+ return void 0;
6813
+ const timeout = Math.floor(parseOptionalNumber(timeoutRaw, "timeout_seconds"));
6814
+ if (timeout <= 0) {
6815
+ throw new PmCliError("--add timeout_seconds must be a positive integer", EXIT_CODE.USAGE);
6816
+ }
6817
+ return timeout;
6710
6818
  }
6711
6819
  function parseAddJsonEntries(raw) {
6712
6820
  if (!raw)
@@ -6904,7 +7012,7 @@ function appendLinkedTestOutputChunk(state, chunk, target) {
6904
7012
  state.stderrBytes += bytes;
6905
7013
  }
6906
7014
  const bufferExceeded = state.stdoutBytes > TEST_OUTPUT_MAX_BUFFER_BYTES || state.stderrBytes > TEST_OUTPUT_MAX_BUFFER_BYTES;
6907
- if (!state.maxBufferExceeded && bufferExceeded) {
7015
+ if (bufferExceeded) {
6908
7016
  state.maxBufferExceeded = true;
6909
7017
  return true;
6910
7018
  }
@@ -7232,7 +7340,7 @@ function readJsonPathValue(root, fieldPath) {
7232
7340
  current = current[segment];
7233
7341
  continue;
7234
7342
  }
7235
- if (typeof current !== "object" || current === null || !(segment in current)) {
7343
+ if (typeof current !== "object" || current === null || !Object.prototype.hasOwnProperty.call(current, segment)) {
7236
7344
  return { found: false, value: void 0 };
7237
7345
  }
7238
7346
  current = current[segment];
@@ -7419,7 +7527,7 @@ function buildLinkedTestExecutionContext(params) {
7419
7527
  sandbox_project_item_count: selectedSandboxProjectItemCount,
7420
7528
  source_global_item_count: params.counts.sourceGlobalItemCount,
7421
7529
  sandbox_global_item_count: selectedSandboxGlobalItemCount,
7422
- mismatch_detected: params.isPmCommand && params.counts.sourceProjectItemCount !== selectedSandboxProjectItemCount,
7530
+ mismatch_detected: params.isPmCommand && (params.counts.sourceProjectItemCount !== selectedSandboxProjectItemCount || params.counts.sourceGlobalItemCount !== selectedSandboxGlobalItemCount),
7423
7531
  project_extensions_seeded: Boolean(params.sourceRoots),
7424
7532
  global_extensions_seeded: Boolean(params.sourceRoots)
7425
7533
  };
@@ -7706,8 +7814,12 @@ function resolveTestRunOptions(options, tests) {
7706
7814
  onlyLast: options.onlyLast
7707
7815
  };
7708
7816
  const runSelection = options.run === true ? resolveLinkedTestRunSelection(tests, selectorInput) : void 0;
7817
+ const defaultTimeoutSeconds = options.timeout === void 0 ? void 0 : parseOptionalNumber(options.timeout, "timeout");
7818
+ if (defaultTimeoutSeconds !== void 0 && defaultTimeoutSeconds <= 0) {
7819
+ throw new PmCliError("Test timeout must be a positive number", EXIT_CODE.USAGE);
7820
+ }
7709
7821
  return {
7710
- defaultTimeoutSeconds: options.timeout === void 0 ? void 0 : parseOptionalNumber(options.timeout, "timeout"),
7822
+ defaultTimeoutSeconds,
7711
7823
  pmContextMode: parsePmContextMode(options.pmContext),
7712
7824
  runSelection,
7713
7825
  testsToRun: runSelection?.selected ?? tests
@@ -7848,15 +7960,24 @@ async function runTest(id, options, global2) {
7848
7960
  };
7849
7961
  }
7850
7962
 
7851
- // dist/cli/commands/test-all.js
7963
+ // dist/cli/commands/test.js
7852
7964
  !(function() {
7853
7965
  try {
7854
7966
  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");
7967
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "40fd73ac-c67e-5c04-9d09-27672a026c08");
7856
7968
  } catch (e2) {
7857
7969
  }
7858
7970
  })();
7859
- function parseStatus(raw, statusRegistry) {
7971
+
7972
+ // dist/sdk/test/batch.js
7973
+ !(function() {
7974
+ try {
7975
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
7976
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "524ce953-9a81-51e3-a428-689aecec60fc");
7977
+ } catch (e2) {
7978
+ }
7979
+ })();
7980
+ var parseStatus = (raw, statusRegistry) => {
7860
7981
  if (raw === void 0) {
7861
7982
  return void 0;
7862
7983
  }
@@ -7866,14 +7987,18 @@ function parseStatus(raw, statusRegistry) {
7866
7987
  throw new PmCliError(`Invalid --status value "${raw}". Allowed: ${allowedStatuses.join(", ")}`, EXIT_CODE.USAGE);
7867
7988
  }
7868
7989
  return normalized;
7869
- }
7870
- function parseTimeout(raw) {
7990
+ };
7991
+ var parseTimeout = (raw) => {
7871
7992
  if (raw === void 0) {
7872
7993
  return void 0;
7873
7994
  }
7874
- return parseOptionalNumber(raw, "timeout");
7875
- }
7876
- function parseNonNegativeInteger(raw, flag) {
7995
+ const parsed = parseOptionalNumber(raw, "timeout");
7996
+ if (parsed <= 0) {
7997
+ throw new PmCliError("timeout must be a positive number", EXIT_CODE.USAGE);
7998
+ }
7999
+ return parsed;
8000
+ };
8001
+ var parseNonNegativeInteger = (raw, flag) => {
7877
8002
  if (raw === void 0) {
7878
8003
  return void 0;
7879
8004
  }
@@ -7882,66 +8007,67 @@ function parseNonNegativeInteger(raw, flag) {
7882
8007
  throw new PmCliError(`${flag} must be a non-negative integer`, EXIT_CODE.USAGE);
7883
8008
  }
7884
8009
  return parsed;
7885
- }
7886
- function formatTrackingError(error) {
8010
+ };
8011
+ var formatTrackingError = (error) => {
7887
8012
  return error instanceof Error ? error.message : String(error);
7888
- }
7889
- function resolveTrackedRunId2() {
8013
+ };
8014
+ var resolveTrackedRunId2 = () => {
7890
8015
  const fromEnv = process.env.PM_BACKGROUND_TEST_RUN_ID?.trim();
7891
8016
  if (fromEnv && fromEnv.length > 0) {
7892
8017
  return fromEnv;
7893
8018
  }
7894
8019
  return `test-all-local-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
7895
- }
7896
- function normalizeCommand(command) {
8020
+ };
8021
+ var normalizeCommand = (command) => {
7897
8022
  return command.trim().replaceAll(/\s+/g, " ");
7898
- }
7899
- function normalizeEnvSetSignature(value) {
8023
+ };
8024
+ var normalizeEnvSetSignature = (value) => {
7900
8025
  if (!value || Object.keys(value).length === 0) {
7901
8026
  return "{}";
7902
8027
  }
7903
8028
  return JSON.stringify(Object.fromEntries(Object.entries(value).sort(([left], [right]) => left.localeCompare(right))));
7904
- }
7905
- function normalizeEnvClearSignature(value) {
8029
+ };
8030
+ var normalizeEnvClearSignature = (value) => {
7906
8031
  if (!value || value.length === 0) {
7907
8032
  return "[]";
7908
8033
  }
7909
8034
  return JSON.stringify([...value].sort((left, right) => left.localeCompare(right)));
7910
- }
7911
- function normalizePmContextModeSignature(value) {
8035
+ };
8036
+ var normalizePmContextModeSignature = (value) => {
7912
8037
  const normalized = value?.trim().toLowerCase();
7913
8038
  return normalized && normalized.length > 0 ? normalized : "none";
7914
- }
7915
- function normalizeAssertionSignature(test) {
8039
+ };
8040
+ var normalizeAssertionStrings = (values) => [...new Set(values ?? [])].sort((left, right) => left.localeCompare(right));
8041
+ var normalizeAssertionMap = (value) => Object.fromEntries(Object.entries(value ?? {}).sort(([left], [right]) => left.localeCompare(right)));
8042
+ var normalizeAssertionLineCount = (value) => typeof value === "number" ? value : void 0;
8043
+ var normalizeAssertionSignature = (test) => {
7916
8044
  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)))
8045
+ assert_stdout_contains: normalizeAssertionStrings(test.assert_stdout_contains),
8046
+ assert_stdout_regex: normalizeAssertionStrings(test.assert_stdout_regex),
8047
+ assert_stderr_contains: normalizeAssertionStrings(test.assert_stderr_contains),
8048
+ assert_stderr_regex: normalizeAssertionStrings(test.assert_stderr_regex),
8049
+ assert_stdout_min_lines: normalizeAssertionLineCount(test.assert_stdout_min_lines),
8050
+ assert_json_field_equals: normalizeAssertionMap(test.assert_json_field_equals),
8051
+ assert_json_field_gte: normalizeAssertionMap(test.assert_json_field_gte)
7928
8052
  };
7929
8053
  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}`;
8054
+ };
8055
+ var resolveLinkedTestTargetSignature = (test) => {
8056
+ const command = resolveOptionalEnvironmentValue(test.command);
8057
+ if (command !== void 0) {
8058
+ return `command:${test.scope}:${normalizeCommand(command)}`;
7940
8059
  }
7941
- const linkedPath = test.path?.trim() ?? "";
7942
- return `path:${test.scope}:${linkedPath}`;
7943
- }
7944
- function maxTimeoutSeconds(current, candidate) {
8060
+ return `path:${test.scope}:${resolveOptionalEnvironmentValue(test.path) ?? ""}`;
8061
+ };
8062
+ var buildLinkedTestKey = (test) => {
8063
+ const envSet = normalizeEnvSetSignature(test.env_set);
8064
+ const envClear = normalizeEnvClearSignature(test.env_clear);
8065
+ const pmContextMode = normalizePmContextModeSignature(test.pm_context_mode);
8066
+ const sharedHostSafe = test.shared_host_safe === true ? "true" : "false";
8067
+ const assertions = normalizeAssertionSignature(test);
8068
+ return `${resolveLinkedTestTargetSignature(test)}:${envSet}:${envClear}:${pmContextMode}:${sharedHostSafe}:${assertions}`;
8069
+ };
8070
+ var maxTimeoutSeconds = (current, candidate) => {
7945
8071
  if (candidate === void 0) {
7946
8072
  return current;
7947
8073
  }
@@ -7949,8 +8075,8 @@ function maxTimeoutSeconds(current, candidate) {
7949
8075
  return candidate;
7950
8076
  }
7951
8077
  return current;
7952
- }
7953
- function countStatuses(runResults) {
8078
+ };
8079
+ var countStatuses = (runResults) => {
7954
8080
  let passed = 0;
7955
8081
  let failed = 0;
7956
8082
  let skipped = 0;
@@ -7966,13 +8092,13 @@ function countStatuses(runResults) {
7966
8092
  skipped += 1;
7967
8093
  }
7968
8094
  return { passed, failed, skipped };
7969
- }
7970
- function mergeFailureCategoryCounts(target, source) {
8095
+ };
8096
+ var mergeFailureCategoryCounts = (target, source) => {
7971
8097
  for (const [key, value] of Object.entries(source)) {
7972
8098
  target[key] += value;
7973
8099
  }
7974
- }
7975
- function emitTestAllProgress(options, message) {
8100
+ };
8101
+ var emitTestAllProgress = (options, message) => {
7976
8102
  if (options.progress !== true) {
7977
8103
  return;
7978
8104
  }
@@ -7981,8 +8107,8 @@ function emitTestAllProgress(options, message) {
7981
8107
  `);
7982
8108
  } catch {
7983
8109
  }
7984
- }
7985
- async function collectTestAllItemTests(filteredItems, global2, pmRoot) {
8110
+ };
8111
+ var collectTestAllItemTests = async (filteredItems, global2, pmRoot) => {
7986
8112
  const itemTests = [];
7987
8113
  let linkedTests = 0;
7988
8114
  for (const item of filteredItems) {
@@ -7994,8 +8120,8 @@ async function collectTestAllItemTests(filteredItems, global2, pmRoot) {
7994
8120
  itemTests.push({ item, tests: readResult.tests });
7995
8121
  }
7996
8122
  return { itemTests, linkedTests };
7997
- }
7998
- async function selectTestAllItems(params) {
8123
+ };
8124
+ var selectTestAllItems = async (params) => {
7999
8125
  const statusRegistry = resolveRuntimeStatusRegistry(params.settings.schema);
8000
8126
  const typeRegistry = resolveItemTypeRegistry(params.settings, getActiveExtensionRegistrations());
8001
8127
  const statusFilter = parseStatus(params.options.status, statusRegistry);
@@ -8005,8 +8131,8 @@ async function selectTestAllItems(params) {
8005
8131
  const statusFilteredItems = allItems.filter((item) => statusFilter ? item.status === statusFilter : true).sort((a, b) => a.id.localeCompare(b.id));
8006
8132
  const filteredItems = limitFilter === void 0 ? statusFilteredItems.slice(offsetFilter) : statusFilteredItems.slice(offsetFilter, offsetFilter + limitFilter);
8007
8133
  return { filteredItems, statusFilter, limitFilter, offsetFilter };
8008
- }
8009
- function buildEffectiveTimeoutByKey(itemTests) {
8134
+ };
8135
+ var buildEffectiveTimeoutByKey = (itemTests) => {
8010
8136
  const effectiveTimeoutByKey = /* @__PURE__ */ new Map();
8011
8137
  for (const { tests } of itemTests) {
8012
8138
  for (const test of tests) {
@@ -8019,8 +8145,8 @@ function buildEffectiveTimeoutByKey(itemTests) {
8019
8145
  }
8020
8146
  }
8021
8147
  return effectiveTimeoutByKey;
8022
- }
8023
- async function runTestAllItem(entry, context) {
8148
+ };
8149
+ var runTestAllItem = async (entry, context) => {
8024
8150
  const testsToRun = [];
8025
8151
  const keyedTests = entry.tests.map((test) => {
8026
8152
  const key = buildLinkedTestKey(test);
@@ -8081,12 +8207,18 @@ async function runTestAllItem(entry, context) {
8081
8207
  failure_categories: failureCategories
8082
8208
  }
8083
8209
  };
8084
- }
8085
- async function appendTestAllItemTracking(entry, summary, context) {
8210
+ };
8211
+ var trackedRunFailed = (summary, options) => [
8212
+ summary.failed > 0,
8213
+ options.failOnSkipped === true && summary.skipped > 0
8214
+ ].includes(true);
8215
+ var optionalTrue = (value) => value ? true : void 0;
8216
+ var appendTestAllItemTracking = async (entry, summary, context) => {
8086
8217
  if (!context.trackingEnabled) {
8087
8218
  return [];
8088
8219
  }
8089
8220
  try {
8221
+ const failed = trackedRunFailed(summary, context.options);
8090
8222
  await appendTrackedTestRunSummary({
8091
8223
  pmRoot: context.pmRoot,
8092
8224
  settings: context.settings,
@@ -8096,7 +8228,7 @@ async function appendTestAllItemTracking(entry, summary, context) {
8096
8228
  entry: {
8097
8229
  run_id: context.trackingRunId,
8098
8230
  kind: "test-all",
8099
- status: summary.failed > 0 || context.options.failOnSkipped === true && summary.skipped > 0 ? "failed" : "passed",
8231
+ status: failed ? "failed" : "passed",
8100
8232
  started_at: context.runStartedAt,
8101
8233
  finished_at: nowIso(),
8102
8234
  recorded_at: nowIso(),
@@ -8107,7 +8239,7 @@ async function appendTestAllItemTracking(entry, summary, context) {
8107
8239
  skipped: summary.skipped,
8108
8240
  items: 1,
8109
8241
  linked_tests: entry.tests.length,
8110
- fail_on_skipped_triggered: context.options.failOnSkipped === true && summary.skipped > 0 ? true : void 0
8242
+ fail_on_skipped_triggered: optionalTrue(context.options.failOnSkipped === true && summary.skipped > 0)
8111
8243
  }
8112
8244
  });
8113
8245
  } catch (error) {
@@ -8116,11 +8248,17 @@ async function appendTestAllItemTracking(entry, summary, context) {
8116
8248
  ];
8117
8249
  }
8118
8250
  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();
8251
+ };
8252
+ var resolveTrackingAttempt = () => {
8253
+ const raw = process.env.PM_BACKGROUND_TEST_RUN_ATTEMPT?.trim();
8254
+ const parsed = raw ? Number.parseInt(raw, 10) : Number.NaN;
8255
+ return Number.isFinite(parsed) && parsed >= 1 ? parsed : void 0;
8256
+ };
8257
+ var resolveOptionalEnvironmentValue = (value) => {
8258
+ const trimmed = value?.trim();
8259
+ return trimmed && trimmed.length > 0 ? trimmed : void 0;
8260
+ };
8261
+ var buildTestAllItemRunContext = (params) => {
8124
8262
  return {
8125
8263
  pmRoot: params.pmRoot,
8126
8264
  settings: params.settings,
@@ -8135,12 +8273,12 @@ function buildTestAllItemRunContext(params) {
8135
8273
  trackingEnabled: params.settings.testing.record_results_to_items === true,
8136
8274
  trackingAuthor: resolveAuthor(void 0, params.settings.author_default),
8137
8275
  trackingRunId: resolveTrackedRunId2(),
8138
- trackingAttempt: Number.isFinite(trackingParsedAttempt) && trackingParsedAttempt >= 1 ? trackingParsedAttempt : void 0,
8139
- trackingResumedFrom: trackingResumedFrom && trackingResumedFrom.length > 0 ? trackingResumedFrom : void 0,
8276
+ trackingAttempt: resolveTrackingAttempt(),
8277
+ trackingResumedFrom: resolveOptionalEnvironmentValue(process.env.PM_BACKGROUND_TEST_RUN_RESUMED_FROM),
8140
8278
  runStartedAt: params.runStartedAt
8141
8279
  };
8142
- }
8143
- function initializeTestAllAccumulation(options, linkedTests, filteredItems) {
8280
+ };
8281
+ var initializeTestAllAccumulation = (options, linkedTests, filteredItems) => {
8144
8282
  const accumulation = {
8145
8283
  results: [],
8146
8284
  passed: 0,
@@ -8156,8 +8294,8 @@ function initializeTestAllAccumulation(options, linkedTests, filteredItems) {
8156
8294
  accumulation.trackingWarnings.push(`empty_linked_test_selection:items=${filteredItems.length};linked_tests=0;fail_on_empty_test_run=true`);
8157
8295
  }
8158
8296
  return { accumulation, failOnEmptyTestRunTriggered };
8159
- }
8160
- async function runTestAllItems(itemTests, context, accumulation) {
8297
+ };
8298
+ var runTestAllItems = async (itemTests, context, accumulation) => {
8161
8299
  for (const [itemIndex, entry] of itemTests.entries()) {
8162
8300
  emitTestAllProgress(context.options, `item ${itemIndex + 1}/${itemTests.length} start id=${entry.item.id} linked_tests=${entry.tests.length}`);
8163
8301
  const execution = await runTestAllItem(entry, context);
@@ -8169,16 +8307,16 @@ async function runTestAllItems(itemTests, context, accumulation) {
8169
8307
  accumulation.results.push(execution.result);
8170
8308
  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
8309
  }
8172
- }
8173
- function appendContextPreflightWarning(options, accumulation) {
8310
+ };
8311
+ var appendContextPreflightWarning = (options, accumulation) => {
8174
8312
  if (options.checkContext !== true) {
8175
8313
  return;
8176
8314
  }
8177
8315
  const allRunResults = accumulation.results.flatMap((entry) => entry.run_results);
8178
8316
  const preflight = summarizeContextPreflight(allRunResults);
8179
8317
  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) {
8318
+ };
8319
+ var buildTestAllResult = (params) => {
8182
8320
  return {
8183
8321
  ok: params.ok,
8184
8322
  totals: {
@@ -8197,43 +8335,86 @@ function buildTestAllResult(params) {
8197
8335
  warnings: params.accumulation.trackingWarnings.length > 0 ? params.accumulation.trackingWarnings : void 0,
8198
8336
  results: params.accumulation.results
8199
8337
  };
8200
- }
8201
- async function runTestAll(options, global2) {
8338
+ };
8339
+ var buildTestAllSelectionProgress = (params) => [
8340
+ `selection items=${params.filteredItems.length}`,
8341
+ `linked_tests=${params.linkedTests}`,
8342
+ params.statusFilter === void 0 ? "" : `status=${params.statusFilter}`,
8343
+ params.limitFilter === void 0 ? "" : `limit=${params.limitFilter}`,
8344
+ params.offsetFilter > 0 ? `offset=${params.offsetFilter}` : ""
8345
+ ].filter((entry) => entry.length > 0).join(" ");
8346
+ var prepareTestAllRun = async (options, global2) => {
8202
8347
  const pmRoot = resolvePmRoot(process.cwd(), global2.path);
8203
8348
  if (!await pathExists(getSettingsPath(pmRoot))) {
8204
8349
  throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
8205
8350
  }
8206
8351
  const settings = await readSettings(pmRoot);
8207
- const { filteredItems, statusFilter, limitFilter, offsetFilter } = await selectTestAllItems({ pmRoot, settings, options });
8352
+ const selection = await selectTestAllItems({ pmRoot, settings, options });
8208
8353
  const defaultTimeoutSeconds = parseTimeout(options.timeout);
8209
8354
  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({
8355
+ const collected = await collectTestAllItemTests(selection.filteredItems, global2, pmRoot);
8356
+ emitTestAllProgress(options, buildTestAllSelectionProgress({
8357
+ ...selection,
8358
+ linkedTests: collected.linkedTests
8359
+ }));
8360
+ return {
8214
8361
  pmRoot,
8215
8362
  settings,
8216
- options,
8217
- itemTests,
8363
+ filteredItems: selection.filteredItems,
8364
+ itemTests: collected.itemTests,
8365
+ linkedTests: collected.linkedTests,
8218
8366
  defaultTimeoutSeconds,
8219
8367
  runStartedAt
8368
+ };
8369
+ };
8370
+ var resolveTestAllOutcome = (params) => {
8371
+ const failOnSkippedTriggered = params.options.failOnSkipped === true && params.accumulation.skipped > 0;
8372
+ const ok = ![
8373
+ params.accumulation.failed > 0,
8374
+ failOnSkippedTriggered,
8375
+ params.failOnEmptyTestRunTriggered
8376
+ ].includes(true);
8377
+ return { failOnSkippedTriggered, ok };
8378
+ };
8379
+ var runTestAll = async (options, global2) => {
8380
+ const prepared = await prepareTestAllRun(options, global2);
8381
+ const { accumulation, failOnEmptyTestRunTriggered } = initializeTestAllAccumulation(options, prepared.linkedTests, prepared.filteredItems);
8382
+ const itemRunContext = buildTestAllItemRunContext({
8383
+ pmRoot: prepared.pmRoot,
8384
+ settings: prepared.settings,
8385
+ options,
8386
+ itemTests: prepared.itemTests,
8387
+ defaultTimeoutSeconds: prepared.defaultTimeoutSeconds,
8388
+ runStartedAt: prepared.runStartedAt
8220
8389
  });
8221
- await runTestAllItems(itemTests, itemRunContext, accumulation);
8222
- const failOnSkippedTriggered = options.failOnSkipped === true && accumulation.skipped > 0;
8390
+ await runTestAllItems(prepared.itemTests, itemRunContext, accumulation);
8223
8391
  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}`);
8392
+ const outcome = resolveTestAllOutcome({
8393
+ options,
8394
+ accumulation,
8395
+ failOnEmptyTestRunTriggered
8396
+ });
8397
+ 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
8398
  return buildTestAllResult({
8227
- ok,
8228
- filteredItems,
8229
- linkedTests,
8399
+ ok: outcome.ok,
8400
+ filteredItems: prepared.filteredItems,
8401
+ linkedTests: prepared.linkedTests,
8230
8402
  accumulation,
8231
- failOnSkippedTriggered,
8403
+ failOnSkippedTriggered: outcome.failOnSkippedTriggered,
8232
8404
  failOnEmptyTestRunTriggered
8233
8405
  });
8234
- }
8406
+ };
8235
8407
 
8236
- // dist/cli/commands/test-runs.js
8408
+ // dist/cli/commands/test-all.js
8409
+ !(function() {
8410
+ try {
8411
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
8412
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "de410bd9-d77f-5438-af06-3dfd3bfa0426");
8413
+ } catch (e2) {
8414
+ }
8415
+ })();
8416
+
8417
+ // dist/sdk/test/runs.js
8237
8418
  import os from "node:os";
8238
8419
 
8239
8420
  // dist/core/test/background-runs.js
@@ -9075,11 +9256,11 @@ async function readBackgroundTestRunLogs(pmRoot, runId, stream, tail) {
9075
9256
  };
9076
9257
  }
9077
9258
 
9078
- // dist/cli/commands/test-runs.js
9259
+ // dist/sdk/test/runs.js
9079
9260
  !(function() {
9080
9261
  try {
9081
9262
  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");
9263
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2c42bfb9-c598-5a6e-bfff-0c073bb44205");
9083
9264
  } catch (e2) {
9084
9265
  }
9085
9266
  })();
@@ -9253,6 +9434,15 @@ async function runTestRunsWorker(runId, global2) {
9253
9434
  };
9254
9435
  }
9255
9436
 
9437
+ // dist/cli/commands/test-runs.js
9438
+ !(function() {
9439
+ try {
9440
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
9441
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "97eff0df-1dfd-5e93-a91e-8ef0969faf01");
9442
+ } catch (e2) {
9443
+ }
9444
+ })();
9445
+
9256
9446
  // dist/sdk/governance/validate.js
9257
9447
  import fs9 from "node:fs/promises";
9258
9448
  import { realpathSync } from "node:fs";
@@ -9633,7 +9823,7 @@ function summarizeMissingLinkedPathRows(rows) {
9633
9823
  !(function() {
9634
9824
  try {
9635
9825
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
9636
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "362d2563-06b2-58f4-8c37-62e0de1eb95b");
9826
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7a78af8d-cf85-5cb1-95e3-8b965851c95c");
9637
9827
  } catch (e2) {
9638
9828
  }
9639
9829
  })();
@@ -11481,7 +11671,14 @@ export {
11481
11671
  runEvent,
11482
11672
  runRemind,
11483
11673
  runStats,
11674
+ TELEMETRY_SUBCOMMANDS,
11484
11675
  runTelemetry,
11676
+ extractReferencedPmItemIdsFromCommand,
11677
+ summarizeContextPreflight,
11678
+ classifyLinkedTestFailure,
11679
+ countFailureCategories,
11680
+ resolveLinkedTestFailureExitCode,
11681
+ runLinkedTests,
11485
11682
  runTest,
11486
11683
  runTestAll,
11487
11684
  runStartBackgroundRun,
@@ -11495,4 +11692,4 @@ export {
11495
11692
  runValidate,
11496
11693
  runValidate2
11497
11694
  };
11498
- //# sourceMappingURL=chunk-ILX33QXL.js.map
11695
+ //# sourceMappingURL=chunk-F3VC3GOV.js.map