@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
@@ -5,9 +5,12 @@
5
5
  * primitives are shared by native action dispatchers and MCP-specific adapters.
6
6
  */
7
7
 
8
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="246cb97d-1f47-52a8-bf9a-012d5ab982c4")}catch(e){}}();
8
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="52271df3-791f-5fa8-8666-c8edc31a5cbe")}catch(e){}}();
9
9
  import { EXIT_CODE } from "../core/shared/constants.js";
10
10
  import { PmCliError } from "../core/shared/errors.js";
11
+ import { asRecordClone } from "../core/shared/primitives.js";
12
+ import { normalizeListOptions, normalizeUpdateOptions, } from "../cli/registration-helpers.js";
13
+ import { UPDATE_COMMANDER_STRING_OPTION_CONTRACTS } from "./cli-contracts/commander-mutation-options.js";
11
14
  /** Read a non-empty string without altering its caller-provided whitespace. */
12
15
  export function readRuntimeString(args, key) {
13
16
  const value = args[key];
@@ -56,5 +59,422 @@ export function parseRuntimeInteger(value, label) {
56
59
  }
57
60
  return undefined;
58
61
  }
62
+ /** Fixed SDK-runtime global options derived from one untyped action payload. */
63
+ export function actionGlobalOptions(args) {
64
+ return {
65
+ json: true,
66
+ quiet: true,
67
+ path: readRuntimeString(args, "path"),
68
+ noExtensions: args.noExtensions === true || args.no_extensions === true,
69
+ noPager: true,
70
+ };
71
+ }
72
+ /** Fields whose MCP array values collapse into the CLI's CSV spelling. */
73
+ const ARRAY_TO_CSV_FIELDS = new Set([
74
+ "tags",
75
+ "blockedBy",
76
+ "blocked_by",
77
+ "skills",
78
+ "fields",
79
+ ]);
80
+ /** Fields whose scalar MCP values promote into the CLI's repeatable arrays. */
81
+ const SCALAR_TO_ARRAY_FIELDS = new Set([
82
+ "comment",
83
+ "note",
84
+ "learning",
85
+ "reminder",
86
+ "event",
87
+ "dep",
88
+ "depRemove",
89
+ "dep_remove",
90
+ "file",
91
+ "doc",
92
+ "test",
93
+ "unset",
94
+ "addGlob",
95
+ "add_glob",
96
+ "migrate",
97
+ "envSet",
98
+ "env_set",
99
+ "envClear",
100
+ "env_clear",
101
+ ]);
102
+ // Actions where the linked-resource fields `add` and `remove` are string[] arrays.
103
+ // For other actions (comments/notes/learnings) `add` and `remove` are scalar strings
104
+ // and must NOT be auto-promoted.
105
+ const ARRAY_ADD_REMOVE_ACTIONS = new Set([
106
+ "files",
107
+ "files-discover",
108
+ "docs",
109
+ "test",
110
+ "test-all",
111
+ ]);
112
+ /** Lifecycle actions where a top-level assignee argument aliases the author. */
113
+ const LIFECYCLE_AUTHOR_ALIAS_ACTIONS = new Set([
114
+ "claim",
115
+ "release",
116
+ "start-task",
117
+ "pause-task",
118
+ "close-task",
119
+ ]);
120
+ /** Reconcile MCP array/scalar option spellings with CLI flag expectations. */
121
+ export function normalizeMcpOptionsArrays(options, action) {
122
+ const result = {};
123
+ const promoteAddRemove = action !== undefined && ARRAY_ADD_REMOVE_ACTIONS.has(action);
124
+ const preserveStandaloneNote = action === "files" || action === "files-discover" || action === "docs";
125
+ for (const [key, value] of Object.entries(options)) {
126
+ if (Array.isArray(value) && ARRAY_TO_CSV_FIELDS.has(key)) {
127
+ result[key] = value.join(",");
128
+ continue;
129
+ }
130
+ if (key === "note" && preserveStandaloneNote) {
131
+ result[key] = value;
132
+ continue;
133
+ }
134
+ if (typeof value === "string" && SCALAR_TO_ARRAY_FIELDS.has(key)) {
135
+ result[key] = [value];
136
+ continue;
137
+ }
138
+ if (typeof value === "string" &&
139
+ promoteAddRemove &&
140
+ (key === "add" || key === "remove")) {
141
+ result[key] = [value];
142
+ continue;
143
+ }
144
+ result[key] = value;
145
+ }
146
+ return result;
147
+ }
148
+ /** Merge hoisted top-level action arguments and author aliases into options. */
149
+ export function optionsWithAuthor(args, action) {
150
+ const baseOptions = asRecordClone(args.options);
151
+ const hoistedTopLevel = {};
152
+ const hoistKey = (key) => {
153
+ if (baseOptions[key] !== undefined || args[key] === undefined) {
154
+ return;
155
+ }
156
+ hoistedTopLevel[key] = args[key];
157
+ };
158
+ if (action === "list") {
159
+ hoistKey("status");
160
+ hoistKey("type");
161
+ hoistKey("tag");
162
+ hoistKey("priority");
163
+ hoistKey("limit");
164
+ hoistKey("offset");
165
+ }
166
+ else if (action === "search") {
167
+ hoistKey("mode");
168
+ hoistKey("status");
169
+ hoistKey("type");
170
+ hoistKey("tag");
171
+ hoistKey("priority");
172
+ hoistKey("limit");
173
+ }
174
+ else if (action === "create") {
175
+ hoistKey("title");
176
+ hoistKey("type");
177
+ hoistKey("status");
178
+ hoistKey("description");
179
+ hoistKey("body");
180
+ hoistKey("priority");
181
+ hoistKey("tags");
182
+ hoistKey("parent");
183
+ hoistKey("createMode");
184
+ hoistKey("create_mode");
185
+ hoistKey("allowMissingParent");
186
+ }
187
+ else if (action === "close") {
188
+ hoistKey("duplicateOf");
189
+ }
190
+ else if (action === "append") {
191
+ // pm-7u9j: the narrow pm_append tool declares `body` top-level; runAppend
192
+ // reads it from options, so hoist unless options.body already wins.
193
+ // (pm_schema/pm_config top-level args are consumed directly by runAction's
194
+ // schema/config cases, which read args before options — no hoist needed.)
195
+ hoistKey("body");
196
+ }
197
+ const options = normalizeMcpOptionsArrays({ ...hoistedTopLevel, ...baseOptions }, action);
198
+ const author = readRuntimeString(args, "author");
199
+ const authorFromAssignee = action !== undefined && LIFECYCLE_AUTHOR_ALIAS_ACTIONS.has(action)
200
+ ? (readRuntimeString(args, "assignee") ??
201
+ readRuntimeString(options, "assignee"))
202
+ : undefined;
203
+ if (author && options.author === undefined) {
204
+ return { ...options, author };
205
+ }
206
+ if (authorFromAssignee && options.author === undefined) {
207
+ return { ...options, author: authorFromAssignee };
208
+ }
209
+ return options;
210
+ }
211
+ // GH-170 (pm-pfnx): the narrow pm_files/pm_docs tools spell the CLI --note flag
212
+ // as `addNote` (the shared `note` parameter is the array-typed create/update
213
+ // note seed). Translate it onto the runner's `note` option; an explicit
214
+ // options.note (pm_run callers) wins.
215
+ /** Translate the MCP-only addNote spelling onto the runner note option. */
216
+ export function withAddNoteOption(options) {
217
+ if (options.addNote === undefined) {
218
+ return options;
219
+ }
220
+ const next = { ...options };
221
+ if (next.note === undefined && typeof next.addNote === "string") {
222
+ next.note = next.addNote;
223
+ }
224
+ delete next.addNote;
225
+ return next;
226
+ }
227
+ /** Map files-discover MCP controls onto the files runner's option shape. */
228
+ export function withFilesDiscoveryOptions(options) {
229
+ const next = { ...options };
230
+ if (next.discoveryNote !== undefined &&
231
+ next.note === undefined &&
232
+ typeof next.discoveryNote === "string") {
233
+ next.note = next.discoveryNote;
234
+ }
235
+ delete next.discover;
236
+ delete next.discoveryNote;
237
+ return next;
238
+ }
239
+ /** Canonicalize one action name into lower-kebab-case tokens. */
240
+ export function normalizeActionName(value) {
241
+ const chunks = [];
242
+ let lastWasSeparator = true;
243
+ for (const character of value.trim().toLowerCase()) {
244
+ const isAlphaNumeric = (character >= "a" && character <= "z") ||
245
+ (character >= "0" && character <= "9");
246
+ if (isAlphaNumeric) {
247
+ chunks.push(character);
248
+ lastWasSeparator = false;
249
+ continue;
250
+ }
251
+ if (!lastWasSeparator) {
252
+ chunks.push("-");
253
+ lastWasSeparator = true;
254
+ }
255
+ }
256
+ if (chunks.at(-1) === "-") {
257
+ chunks.pop();
258
+ }
259
+ return chunks.join("");
260
+ }
261
+ /** Canonicalize one space-separated command path for lookup comparisons. */
262
+ export function normalizeCommandPath(value) {
263
+ return value.trim().toLowerCase().split(/\s+/).filter(Boolean).join(" ");
264
+ }
265
+ /** Coerce an unknown payload value into a non-empty string array. */
266
+ export function readRuntimeStringArray(value) {
267
+ if (!Array.isArray(value)) {
268
+ return [];
269
+ }
270
+ return value
271
+ .map((entry) => String(entry))
272
+ .filter((entry) => entry.length > 0);
273
+ }
274
+ /** Merge non-reserved top-level extension arguments into the options record. */
275
+ export function extensionOptionsFromArgs(args, options) {
276
+ const reserved = new Set([
277
+ "action",
278
+ "args",
279
+ "author",
280
+ "cwd",
281
+ "fullChangedFields",
282
+ "id",
283
+ "options",
284
+ "path",
285
+ "query",
286
+ "reason",
287
+ "target",
288
+ ]);
289
+ const passthrough = {};
290
+ for (const [key, value] of Object.entries(args)) {
291
+ if (!reserved.has(key)) {
292
+ passthrough[key] = value;
293
+ }
294
+ }
295
+ const normalizedOptions = { ...passthrough, ...options };
296
+ delete normalizedOptions.args;
297
+ return normalizedOptions;
298
+ }
299
+ /** Mutation tools (create/update/close/append/update-many) return a verbose `changed_fields` array. On the agent path we drop it to a `changed_field_count` by default for token efficiency, restoring the full array only when the caller explicitly passes the MCP-level fullChangedFields=true control. Mutation options are forwarded unchanged so runtime fields named `full` remain valid user data. */
300
+ export function withMutationCompaction(args, options) {
301
+ return {
302
+ changedFields: args.fullChangedFields === true ? "full" : "compact",
303
+ idOnly: args.idOnly === true,
304
+ runnerOptions: { ...options },
305
+ };
306
+ }
307
+ /** Translate flat MCP filter parameters into the shared list-option shape. */
308
+ export function mutationListOptions(options) {
309
+ return {
310
+ type: readRuntimeScalarString(options, "filterType"),
311
+ tag: readRuntimeScalarString(options, "filterTag"),
312
+ priority: readRuntimeScalarString(options, "filterPriority"),
313
+ deadlineBefore: readRuntimeScalarString(options, "filterDeadlineBefore"),
314
+ deadlineAfter: readRuntimeScalarString(options, "filterDeadlineAfter"),
315
+ updatedAfter: readRuntimeScalarString(options, "filterUpdatedAfter"),
316
+ updatedBefore: readRuntimeScalarString(options, "filterUpdatedBefore"),
317
+ createdAfter: readRuntimeScalarString(options, "filterCreatedAfter"),
318
+ createdBefore: readRuntimeScalarString(options, "filterCreatedBefore"),
319
+ ids: readRuntimeScalarStringAllowBlank(options, "ids"),
320
+ assignee: readRuntimeScalarString(options, "filterAssignee"),
321
+ assigneeFilter: readRuntimeScalarString(options, "filterAssigneeFilter") ??
322
+ readRuntimeScalarString(options, "filterAssignee_filter"),
323
+ parent: readRuntimeScalarString(options, "filterParent"),
324
+ sprint: readRuntimeScalarString(options, "filterSprint"),
325
+ release: readRuntimeScalarString(options, "filterRelease"),
326
+ limit: readRuntimeScalarString(options, "limit"),
327
+ offset: readRuntimeScalarString(options, "offset"),
328
+ };
329
+ }
330
+ /** Read one graph option that accepts scalar strings or repeatable arrays. */
331
+ function readGraphIdListOption(value) {
332
+ if (typeof value === "string" && value.trim().length > 0)
333
+ return value;
334
+ if (Array.isArray(value))
335
+ return readRuntimeStringArray(value);
336
+ return undefined;
337
+ }
338
+ /** Read one graph bound that accepts integer numbers or numeric strings. */
339
+ function readGraphBoundOption(value) {
340
+ if (typeof value === "number" && Number.isFinite(value))
341
+ return value;
342
+ if (typeof value === "string" && value.trim().length > 0)
343
+ return value;
344
+ return undefined;
345
+ }
346
+ /** Build graph command options from one flat MCP parameter payload. */
347
+ export function graphOptionsFromFlat(options) {
348
+ const kind = readGraphIdListOption(options.kind);
349
+ const exemptIsolate = readGraphIdListOption(options.exemptIsolate);
350
+ return {
351
+ ...(kind === undefined ? {} : { kind }),
352
+ maxDepth: readGraphBoundOption(options.maxDepth),
353
+ limit: readGraphBoundOption(options.limit),
354
+ after: readRuntimeString(options, "after"),
355
+ direction: readRuntimeString(options, "direction"),
356
+ maxPaths: readGraphBoundOption(options.maxPaths),
357
+ sample: readGraphBoundOption(options.sample),
358
+ ...(exemptIsolate === undefined ? {} : { exemptIsolate }),
359
+ summary: options.summary === true,
360
+ };
361
+ }
362
+ /** Build close-many command options from one flat MCP parameter payload. */
363
+ export function closeManyOptionsFromFlat(options) {
364
+ return {
365
+ status: readRuntimeString(options, "filterStatus"),
366
+ list: isRuntimeRecord(options.list)
367
+ ? normalizeListOptions(options.list)
368
+ : mutationListOptions(options),
369
+ reason: readRuntimeString(options, "reason"),
370
+ resolution: readRuntimeString(options, "resolution"),
371
+ expectedResult: readRuntimeString(options, "expectedResult") ??
372
+ readRuntimeString(options, "expected_result") ??
373
+ readRuntimeString(options, "expected"),
374
+ actualResult: readRuntimeString(options, "actualResult") ??
375
+ readRuntimeString(options, "actual_result") ??
376
+ readRuntimeString(options, "actual"),
377
+ validateClose: readRuntimeString(options, "validateClose") ??
378
+ readRuntimeString(options, "validate_close"),
379
+ author: readRuntimeString(options, "author"),
380
+ message: readRuntimeString(options, "message"),
381
+ force: options.force === true ? true : undefined,
382
+ dryRun: options.dryRun === true || options.dry_run === true ? true : undefined,
383
+ rollback: readRuntimeString(options, "rollback"),
384
+ checkpoint: options.checkpoint === false ||
385
+ options.noCheckpoint === true ||
386
+ options.no_checkpoint === true
387
+ ? false
388
+ : undefined,
389
+ };
390
+ }
391
+ /** Flat update-many parameters that steer batching instead of item fields. */
392
+ const UPDATE_MANY_FLAT_CONTROL_KEYS = new Set([
393
+ "filterStatus",
394
+ "filterType",
395
+ "filterTag",
396
+ "filterPriority",
397
+ "filterDeadlineBefore",
398
+ "filterDeadlineAfter",
399
+ "filterUpdatedAfter",
400
+ "filterUpdatedBefore",
401
+ "filterCreatedAfter",
402
+ "filterCreatedBefore",
403
+ "filterAssignee",
404
+ "filterAssigneeFilter",
405
+ "filterAssignee_filter",
406
+ "filterParent",
407
+ "filterSprint",
408
+ "filterRelease",
409
+ "ids",
410
+ "list",
411
+ "update",
412
+ "limit",
413
+ "offset",
414
+ "dryRun",
415
+ "dry_run",
416
+ "rollback",
417
+ "checkpoint",
418
+ "noCheckpoint",
419
+ "no_checkpoint",
420
+ ]);
421
+ /** Extract per-item update fields from one flat update-many payload. */
422
+ export function updateManyUpdateOptionsFromFlat(options) {
423
+ const update = {};
424
+ for (const [key, value] of Object.entries(options)) {
425
+ if (UPDATE_MANY_FLAT_CONTROL_KEYS.has(key)) {
426
+ continue;
427
+ }
428
+ update[key] = value;
429
+ }
430
+ return normalizeMcpUpdateOptions(update);
431
+ }
432
+ /** Normalize MCP update fields onto the CLI update option contract. */
433
+ export function normalizeMcpUpdateOptions(options) {
434
+ const normalizedInput = normalizeMcpOptionsArrays(options, "update-many");
435
+ for (const contract of UPDATE_COMMANDER_STRING_OPTION_CONTRACTS) {
436
+ for (const key of contract.keys) {
437
+ const value = normalizedInput[key];
438
+ if (typeof value === "number" && Number.isFinite(value)) {
439
+ normalizedInput[key] = String(value);
440
+ }
441
+ }
442
+ }
443
+ return normalizeUpdateOptions(normalizedInput);
444
+ }
445
+ /** Build update-many command options from one flat MCP parameter payload. */
446
+ export function updateManyOptionsFromFlat(options) {
447
+ if (isRuntimeRecord(options.list) || isRuntimeRecord(options.update)) {
448
+ const updateSource = isRuntimeRecord(options.update)
449
+ ? options.update
450
+ : updateManyUpdateOptionsFromFlat(options);
451
+ return {
452
+ status: readRuntimeScalarString(options, "filterStatus"),
453
+ list: isRuntimeRecord(options.list)
454
+ ? normalizeListOptions(options.list)
455
+ : mutationListOptions(options),
456
+ update: normalizeMcpUpdateOptions(updateSource),
457
+ dryRun: options.dryRun === true || options.dry_run === true ? true : undefined,
458
+ rollback: readRuntimeString(options, "rollback"),
459
+ checkpoint: options.checkpoint === false ||
460
+ options.noCheckpoint === true ||
461
+ options.no_checkpoint === true
462
+ ? false
463
+ : undefined,
464
+ };
465
+ }
466
+ return {
467
+ status: readRuntimeScalarString(options, "filterStatus"),
468
+ list: mutationListOptions(options),
469
+ update: updateManyUpdateOptionsFromFlat(options),
470
+ dryRun: options.dryRun === true || options.dry_run === true ? true : undefined,
471
+ rollback: readRuntimeString(options, "rollback"),
472
+ checkpoint: options.checkpoint === false ||
473
+ options.noCheckpoint === true ||
474
+ options.no_checkpoint === true
475
+ ? false
476
+ : undefined,
477
+ };
478
+ }
59
479
  //# sourceMappingURL=runtime-input.js.map
60
- //# debugId=246cb97d-1f47-52a8-bf9a-012d5ab982c4
480
+ //# debugId=52271df3-791f-5fa8-8666-c8edc31a5cbe
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-input.js","sources":["sdk/runtime-input.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/runtime-input\n *\n * Normalizes untyped action payload values at the SDK runtime boundary. These\n * primitives are shared by native action dispatchers and MCP-specific adapters.\n */\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\n\n/** Read a non-empty string without altering its caller-provided whitespace. */\nexport function readRuntimeString(\n args: Record<string, unknown>,\n key: string,\n): string | undefined {\n const value = args[key];\n return typeof value === \"string\" && value.trim().length > 0\n ? value\n : undefined;\n}\n\n/** Normalize a non-empty string or finite number into a scalar string. */\nexport function readRuntimeScalarString(\n args: Record<string, unknown>,\n key: string,\n): string | undefined {\n const value = args[key];\n if (typeof value === \"string\") {\n return value.trim().length > 0 ? value : undefined;\n }\n return typeof value === \"number\" && Number.isFinite(value)\n ? String(value)\n : undefined;\n}\n\n/** Normalize a string, including blank text, or a finite number into text. */\nexport function readRuntimeScalarStringAllowBlank(\n args: Record<string, unknown>,\n key: string,\n): string | undefined {\n const value = args[key];\n if (typeof value === \"string\") {\n return value;\n }\n return typeof value === \"number\" && Number.isFinite(value)\n ? String(value)\n : undefined;\n}\n\n/** Narrow unknown values to plain record-shaped action payloads. */\nexport function isRuntimeRecord(\n value: unknown,\n): value is Record<string, unknown> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\n/** Parse an integer-valued MCP option while retaining a caller-specific label. */\nexport function parseRuntimeInteger(\n value: unknown,\n label: string,\n): number | undefined {\n if (typeof value === \"number\") {\n if (!Number.isInteger(value)) {\n throw new PmCliError(\n `${label} must be a finite integer.`,\n EXIT_CODE.USAGE,\n );\n }\n return value;\n }\n if (typeof value === \"string\" && value.trim().length > 0) {\n const parsed = Number(value);\n if (!Number.isInteger(parsed)) {\n throw new PmCliError(\n `${label} must be a finite integer.`,\n EXIT_CODE.USAGE,\n );\n }\n return parsed;\n }\n return undefined;\n}\n"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,+EAA+E;AAC/E,MAAM,UAAU,iBAAiB,CAC/B,IAA6B,EAC7B,GAAW;IAEX,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QACzD,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,uBAAuB,CACrC,IAA6B,EAC7B,GAAW;IAEX,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IACrD,CAAC;IACD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QACxD,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;QACf,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,iCAAiC,CAC/C,IAA6B,EAC7B,GAAW;IAEX,MAAM,KAAK,GA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.js","sources":["sdk/runtime-input.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/runtime-input\n *\n * Normalizes untyped action payload values at the SDK runtime boundary. These\n * primitives are shared by native action dispatchers and MCP-specific adapters.\n */\nimport { EXIT_CODE } from \"../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport { PmCliError } from \"../core/shared/errors.js\";\nimport { asRecordClone } from \"../core/shared/primitives.js\";\nimport {\n normalizeListOptions,\n normalizeUpdateOptions,\n} from \"../cli/registration-helpers.js\";\nimport type { CloseManyCommandOptions } from \"../cli/commands/close-many.js\";\nimport type { UpdateManyCommandOptions } from \"../cli/commands/update-many.js\";\nimport { UPDATE_COMMANDER_STRING_OPTION_CONTRACTS } from \"./cli-contracts/commander-mutation-options.js\";\nimport type { GraphCommandOptions } from \"./graph/run.js\";\nimport type { ListOptions } from \"./query/list.js\";\n\n/** Read a non-empty string without altering its caller-provided whitespace. */\nexport function readRuntimeString(\n args: Record<string, unknown>,\n key: string,\n): string | undefined {\n const value = args[key];\n return typeof value === \"string\" && value.trim().length > 0\n ? value\n : undefined;\n}\n\n/** Normalize a non-empty string or finite number into a scalar string. */\nexport function readRuntimeScalarString(\n args: Record<string, unknown>,\n key: string,\n): string | undefined {\n const value = args[key];\n if (typeof value === \"string\") {\n return value.trim().length > 0 ? value : undefined;\n }\n return typeof value === \"number\" && Number.isFinite(value)\n ? String(value)\n : undefined;\n}\n\n/** Normalize a string, including blank text, or a finite number into text. */\nexport function readRuntimeScalarStringAllowBlank(\n args: Record<string, unknown>,\n key: string,\n): string | undefined {\n const value = args[key];\n if (typeof value === \"string\") {\n return value;\n }\n return typeof value === \"number\" && Number.isFinite(value)\n ? String(value)\n : undefined;\n}\n\n/** Narrow unknown values to plain record-shaped action payloads. */\nexport function isRuntimeRecord(\n value: unknown,\n): value is Record<string, unknown> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\n/** Parse an integer-valued MCP option while retaining a caller-specific label. */\nexport function parseRuntimeInteger(\n value: unknown,\n label: string,\n): number | undefined {\n if (typeof value === \"number\") {\n if (!Number.isInteger(value)) {\n throw new PmCliError(\n `${label} must be a finite integer.`,\n EXIT_CODE.USAGE,\n );\n }\n return value;\n }\n if (typeof value === \"string\" && value.trim().length > 0) {\n const parsed = Number(value);\n if (!Number.isInteger(parsed)) {\n throw new PmCliError(\n `${label} must be a finite integer.`,\n EXIT_CODE.USAGE,\n );\n }\n return parsed;\n }\n return undefined;\n}\n\n/** Fixed SDK-runtime global options derived from one untyped action payload. */\nexport function actionGlobalOptions(\n args: Record<string, unknown>,\n): GlobalOptions {\n return {\n json: true,\n quiet: true,\n path: readRuntimeString(args, \"path\"),\n noExtensions: args.noExtensions === true || args.no_extensions === true,\n noPager: true,\n };\n}\n\n/** Fields whose MCP array values collapse into the CLI's CSV spelling. */\nconst ARRAY_TO_CSV_FIELDS = new Set([\n \"tags\",\n \"blockedBy\",\n \"blocked_by\",\n \"skills\",\n \"fields\",\n]);\n\n/** Fields whose scalar MCP values promote into the CLI's repeatable arrays. */\nconst SCALAR_TO_ARRAY_FIELDS = new Set([\n \"comment\",\n \"note\",\n \"learning\",\n \"reminder\",\n \"event\",\n \"dep\",\n \"depRemove\",\n \"dep_remove\",\n \"file\",\n \"doc\",\n \"test\",\n \"unset\",\n \"addGlob\",\n \"add_glob\",\n \"migrate\",\n \"envSet\",\n \"env_set\",\n \"envClear\",\n \"env_clear\",\n]);\n\n// Actions where the linked-resource fields `add` and `remove` are string[] arrays.\n// For other actions (comments/notes/learnings) `add` and `remove` are scalar strings\n// and must NOT be auto-promoted.\nconst ARRAY_ADD_REMOVE_ACTIONS = new Set([\n \"files\",\n \"files-discover\",\n \"docs\",\n \"test\",\n \"test-all\",\n]);\n\n/** Lifecycle actions where a top-level assignee argument aliases the author. */\nconst LIFECYCLE_AUTHOR_ALIAS_ACTIONS = new Set([\n \"claim\",\n \"release\",\n \"start-task\",\n \"pause-task\",\n \"close-task\",\n]);\n\n/** Reconcile MCP array/scalar option spellings with CLI flag expectations. */\nexport function normalizeMcpOptionsArrays(\n options: Record<string, unknown>,\n action?: string,\n): Record<string, unknown> {\n const result: Record<string, unknown> = {};\n const promoteAddRemove =\n action !== undefined && ARRAY_ADD_REMOVE_ACTIONS.has(action);\n const preserveStandaloneNote =\n action === \"files\" || action === \"files-discover\" || action === \"docs\";\n for (const [key, value] of Object.entries(options)) {\n if (Array.isArray(value) && ARRAY_TO_CSV_FIELDS.has(key)) {\n result[key] = value.join(\",\");\n continue;\n }\n if (key === \"note\" && preserveStandaloneNote) {\n result[key] = value;\n continue;\n }\n if (typeof value === \"string\" && SCALAR_TO_ARRAY_FIELDS.has(key)) {\n result[key] = [value];\n continue;\n }\n if (\n typeof value === \"string\" &&\n promoteAddRemove &&\n (key === \"add\" || key === \"remove\")\n ) {\n result[key] = [value];\n continue;\n }\n result[key] = value;\n }\n return result;\n}\n\n/** Merge hoisted top-level action arguments and author aliases into options. */\nexport function optionsWithAuthor(\n args: Record<string, unknown>,\n action?: string,\n): Record<string, unknown> {\n const baseOptions = asRecordClone(args.options);\n const hoistedTopLevel: Record<string, unknown> = {};\n const hoistKey = (key: string): void => {\n if (baseOptions[key] !== undefined || args[key] === undefined) {\n return;\n }\n hoistedTopLevel[key] = args[key];\n };\n if (action === \"list\") {\n hoistKey(\"status\");\n hoistKey(\"type\");\n hoistKey(\"tag\");\n hoistKey(\"priority\");\n hoistKey(\"limit\");\n hoistKey(\"offset\");\n } else if (action === \"search\") {\n hoistKey(\"mode\");\n hoistKey(\"status\");\n hoistKey(\"type\");\n hoistKey(\"tag\");\n hoistKey(\"priority\");\n hoistKey(\"limit\");\n } else if (action === \"create\") {\n hoistKey(\"title\");\n hoistKey(\"type\");\n hoistKey(\"status\");\n hoistKey(\"description\");\n hoistKey(\"body\");\n hoistKey(\"priority\");\n hoistKey(\"tags\");\n hoistKey(\"parent\");\n hoistKey(\"createMode\");\n hoistKey(\"create_mode\");\n hoistKey(\"allowMissingParent\");\n } else if (action === \"close\") {\n hoistKey(\"duplicateOf\");\n } else if (action === \"append\") {\n // pm-7u9j: the narrow pm_append tool declares `body` top-level; runAppend\n // reads it from options, so hoist unless options.body already wins.\n // (pm_schema/pm_config top-level args are consumed directly by runAction's\n // schema/config cases, which read args before options — no hoist needed.)\n hoistKey(\"body\");\n }\n const options = normalizeMcpOptionsArrays(\n { ...hoistedTopLevel, ...baseOptions },\n action,\n );\n const author = readRuntimeString(args, \"author\");\n const authorFromAssignee =\n action !== undefined && LIFECYCLE_AUTHOR_ALIAS_ACTIONS.has(action)\n ? (readRuntimeString(args, \"assignee\") ??\n readRuntimeString(options, \"assignee\"))\n : undefined;\n if (author && options.author === undefined) {\n return { ...options, author };\n }\n if (authorFromAssignee && options.author === undefined) {\n return { ...options, author: authorFromAssignee };\n }\n return options;\n}\n\n// GH-170 (pm-pfnx): the narrow pm_files/pm_docs tools spell the CLI --note flag\n// as `addNote` (the shared `note` parameter is the array-typed create/update\n// note seed). Translate it onto the runner's `note` option; an explicit\n// options.note (pm_run callers) wins.\n/** Translate the MCP-only addNote spelling onto the runner note option. */\nexport function withAddNoteOption(\n options: Record<string, unknown>,\n): Record<string, unknown> {\n if (options.addNote === undefined) {\n return options;\n }\n const next: Record<string, unknown> = { ...options };\n if (next.note === undefined && typeof next.addNote === \"string\") {\n next.note = next.addNote;\n }\n delete next.addNote;\n return next;\n}\n\n/** Map files-discover MCP controls onto the files runner's option shape. */\nexport function withFilesDiscoveryOptions(\n options: Record<string, unknown>,\n): Record<string, unknown> {\n const next: Record<string, unknown> = { ...options };\n if (\n next.discoveryNote !== undefined &&\n next.note === undefined &&\n typeof next.discoveryNote === \"string\"\n ) {\n next.note = next.discoveryNote;\n }\n delete next.discover;\n delete next.discoveryNote;\n return next;\n}\n\n/** Canonicalize one action name into lower-kebab-case tokens. */\nexport function normalizeActionName(value: string): string {\n const chunks: string[] = [];\n let lastWasSeparator = true;\n for (const character of value.trim().toLowerCase()) {\n const isAlphaNumeric =\n (character >= \"a\" && character <= \"z\") ||\n (character >= \"0\" && character <= \"9\");\n if (isAlphaNumeric) {\n chunks.push(character);\n lastWasSeparator = false;\n continue;\n }\n if (!lastWasSeparator) {\n chunks.push(\"-\");\n lastWasSeparator = true;\n }\n }\n if (chunks.at(-1) === \"-\") {\n chunks.pop();\n }\n return chunks.join(\"\");\n}\n\n/** Canonicalize one space-separated command path for lookup comparisons. */\nexport function normalizeCommandPath(value: string): string {\n return value.trim().toLowerCase().split(/\\s+/).filter(Boolean).join(\" \");\n}\n\n/** Coerce an unknown payload value into a non-empty string array. */\nexport function readRuntimeStringArray(value: unknown): string[] {\n if (!Array.isArray(value)) {\n return [];\n }\n return value\n .map((entry) => String(entry))\n .filter((entry) => entry.length > 0);\n}\n\n/** Merge non-reserved top-level extension arguments into the options record. */\nexport function extensionOptionsFromArgs(\n args: Record<string, unknown>,\n options: Record<string, unknown>,\n): Record<string, unknown> {\n const reserved = new Set([\n \"action\",\n \"args\",\n \"author\",\n \"cwd\",\n \"fullChangedFields\",\n \"id\",\n \"options\",\n \"path\",\n \"query\",\n \"reason\",\n \"target\",\n ]);\n const passthrough: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(args)) {\n if (!reserved.has(key)) {\n passthrough[key] = value;\n }\n }\n const normalizedOptions = { ...passthrough, ...options };\n delete normalizedOptions.args;\n return normalizedOptions;\n}\n\n/** Mutation tools (create/update/close/append/update-many) return a verbose `changed_fields` array. On the agent path we drop it to a `changed_field_count` by default for token efficiency, restoring the full array only when the caller explicitly passes the MCP-level fullChangedFields=true control. Mutation options are forwarded unchanged so runtime fields named `full` remain valid user data. */\nexport function withMutationCompaction(\n args: Record<string, unknown>,\n options?: Record<string, unknown> | null,\n): {\n changedFields: \"full\" | \"compact\";\n idOnly: boolean;\n runnerOptions: Record<string, unknown>;\n} {\n return {\n changedFields: args.fullChangedFields === true ? \"full\" : \"compact\",\n idOnly: args.idOnly === true,\n runnerOptions: { ...options },\n };\n}\n\n/** Translate flat MCP filter parameters into the shared list-option shape. */\nexport function mutationListOptions(\n options: Record<string, unknown>,\n): ListOptions {\n return {\n type: readRuntimeScalarString(options, \"filterType\"),\n tag: readRuntimeScalarString(options, \"filterTag\"),\n priority: readRuntimeScalarString(options, \"filterPriority\"),\n deadlineBefore: readRuntimeScalarString(options, \"filterDeadlineBefore\"),\n deadlineAfter: readRuntimeScalarString(options, \"filterDeadlineAfter\"),\n updatedAfter: readRuntimeScalarString(options, \"filterUpdatedAfter\"),\n updatedBefore: readRuntimeScalarString(options, \"filterUpdatedBefore\"),\n createdAfter: readRuntimeScalarString(options, \"filterCreatedAfter\"),\n createdBefore: readRuntimeScalarString(options, \"filterCreatedBefore\"),\n ids: readRuntimeScalarStringAllowBlank(options, \"ids\"),\n assignee: readRuntimeScalarString(options, \"filterAssignee\"),\n assigneeFilter:\n readRuntimeScalarString(options, \"filterAssigneeFilter\") ??\n readRuntimeScalarString(options, \"filterAssignee_filter\"),\n parent: readRuntimeScalarString(options, \"filterParent\"),\n sprint: readRuntimeScalarString(options, \"filterSprint\"),\n release: readRuntimeScalarString(options, \"filterRelease\"),\n limit: readRuntimeScalarString(options, \"limit\"),\n offset: readRuntimeScalarString(options, \"offset\"),\n };\n}\n\n/** Read one graph option that accepts scalar strings or repeatable arrays. */\nfunction readGraphIdListOption(value: unknown): string | string[] | undefined {\n if (typeof value === \"string\" && value.trim().length > 0) return value;\n if (Array.isArray(value)) return readRuntimeStringArray(value);\n return undefined;\n}\n\n/** Read one graph bound that accepts integer numbers or numeric strings. */\nfunction readGraphBoundOption(value: unknown): string | number | undefined {\n if (typeof value === \"number\" && Number.isFinite(value)) return value;\n if (typeof value === \"string\" && value.trim().length > 0) return value;\n return undefined;\n}\n\n/** Build graph command options from one flat MCP parameter payload. */\nexport function graphOptionsFromFlat(\n options: Record<string, unknown>,\n): GraphCommandOptions {\n const kind = readGraphIdListOption(options.kind);\n const exemptIsolate = readGraphIdListOption(options.exemptIsolate);\n return {\n ...(kind === undefined ? {} : { kind }),\n maxDepth: readGraphBoundOption(options.maxDepth),\n limit: readGraphBoundOption(options.limit),\n after: readRuntimeString(options, \"after\"),\n direction: readRuntimeString(options, \"direction\"),\n maxPaths: readGraphBoundOption(options.maxPaths),\n sample: readGraphBoundOption(options.sample),\n ...(exemptIsolate === undefined ? {} : { exemptIsolate }),\n summary: options.summary === true,\n };\n}\n\n/** Build close-many command options from one flat MCP parameter payload. */\nexport function closeManyOptionsFromFlat(\n options: Record<string, unknown>,\n): CloseManyCommandOptions {\n return {\n status: readRuntimeString(options, \"filterStatus\"),\n list: isRuntimeRecord(options.list)\n ? normalizeListOptions(options.list)\n : mutationListOptions(options),\n reason: readRuntimeString(options, \"reason\"),\n resolution: readRuntimeString(options, \"resolution\"),\n expectedResult:\n readRuntimeString(options, \"expectedResult\") ??\n readRuntimeString(options, \"expected_result\") ??\n readRuntimeString(options, \"expected\"),\n actualResult:\n readRuntimeString(options, \"actualResult\") ??\n readRuntimeString(options, \"actual_result\") ??\n readRuntimeString(options, \"actual\"),\n validateClose:\n readRuntimeString(options, \"validateClose\") ??\n readRuntimeString(options, \"validate_close\"),\n author: readRuntimeString(options, \"author\"),\n message: readRuntimeString(options, \"message\"),\n force: options.force === true ? true : undefined,\n dryRun:\n options.dryRun === true || options.dry_run === true ? true : undefined,\n rollback: readRuntimeString(options, \"rollback\"),\n checkpoint:\n options.checkpoint === false ||\n options.noCheckpoint === true ||\n options.no_checkpoint === true\n ? false\n : undefined,\n };\n}\n\n/** Flat update-many parameters that steer batching instead of item fields. */\nconst UPDATE_MANY_FLAT_CONTROL_KEYS = new Set([\n \"filterStatus\",\n \"filterType\",\n \"filterTag\",\n \"filterPriority\",\n \"filterDeadlineBefore\",\n \"filterDeadlineAfter\",\n \"filterUpdatedAfter\",\n \"filterUpdatedBefore\",\n \"filterCreatedAfter\",\n \"filterCreatedBefore\",\n \"filterAssignee\",\n \"filterAssigneeFilter\",\n \"filterAssignee_filter\",\n \"filterParent\",\n \"filterSprint\",\n \"filterRelease\",\n \"ids\",\n \"list\",\n \"update\",\n \"limit\",\n \"offset\",\n \"dryRun\",\n \"dry_run\",\n \"rollback\",\n \"checkpoint\",\n \"noCheckpoint\",\n \"no_checkpoint\",\n]);\n\n/** Extract per-item update fields from one flat update-many payload. */\nexport function updateManyUpdateOptionsFromFlat(\n options: Record<string, unknown>,\n): Record<string, unknown> {\n const update: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(options)) {\n if (UPDATE_MANY_FLAT_CONTROL_KEYS.has(key)) {\n continue;\n }\n update[key] = value;\n }\n return normalizeMcpUpdateOptions(update);\n}\n\n/** Normalize MCP update fields onto the CLI update option contract. */\nexport function normalizeMcpUpdateOptions(\n options: Record<string, unknown>,\n): Record<string, unknown> {\n const normalizedInput: Record<string, unknown> = normalizeMcpOptionsArrays(\n options,\n \"update-many\",\n );\n for (const contract of UPDATE_COMMANDER_STRING_OPTION_CONTRACTS) {\n for (const key of contract.keys) {\n const value = normalizedInput[key];\n if (typeof value === \"number\" && Number.isFinite(value)) {\n normalizedInput[key] = String(value);\n }\n }\n }\n return normalizeUpdateOptions(normalizedInput);\n}\n\n/** Build update-many command options from one flat MCP parameter payload. */\nexport function updateManyOptionsFromFlat(\n options: Record<string, unknown>,\n): UpdateManyCommandOptions {\n if (isRuntimeRecord(options.list) || isRuntimeRecord(options.update)) {\n const updateSource = isRuntimeRecord(options.update)\n ? options.update\n : updateManyUpdateOptionsFromFlat(options);\n return {\n status: readRuntimeScalarString(options, \"filterStatus\"),\n list: isRuntimeRecord(options.list)\n ? normalizeListOptions(options.list)\n : mutationListOptions(options),\n update: normalizeMcpUpdateOptions(updateSource) as never,\n dryRun:\n options.dryRun === true || options.dry_run === true ? true : undefined,\n rollback: readRuntimeString(options, \"rollback\"),\n checkpoint:\n options.checkpoint === false ||\n options.noCheckpoint === true ||\n options.no_checkpoint === true\n ? false\n : undefined,\n };\n }\n return {\n status: readRuntimeScalarString(options, \"filterStatus\"),\n list: mutationListOptions(options),\n update: updateManyUpdateOptionsFromFlat(options) as never,\n dryRun:\n options.dryRun === true || options.dry_run === true ? true : undefined,\n rollback: readRuntimeString(options, \"rollback\"),\n checkpoint:\n options.checkpoint === false ||\n options.noCheckpoint === true ||\n options.no_checkpoint === true\n ? false\n : undefined,\n };\n}\n"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EACL,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAE,wCAAwC,EAAE,MAAM,+CAA+C,CAAC;AAIzG,+EAA+E;AAC/E,MAAM,UAAU,iBAAiB,CAC/B,IAA6B,EAC7B,GAAW;IAEX,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QACzD,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,uBAAuB,CACrC,IAA6B,EAC7B,GAAW;IAEX,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IACrD,CAAC;IACD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QACxD,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;QACf,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,8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271df3-791f-5fa8-8666-c8edc31a5cbe"}
@@ -5,7 +5,6 @@
5
5
  */
6
6
  export { PM_GITIGNORE_END, PM_GITIGNORE_START, ensurePmGitignore, getPmGitignoreBlock, type EnsurePmGitignoreResult, } from "./workspace.js";
7
7
  import { type ExtensionRegistrationRegistry } from "../core/extensions/index.js";
8
- import type { GlobalOptions } from "../core/shared/command-types.js";
9
8
  import type { PmToolAction } from "./cli-contracts/enum-contracts.js";
10
9
  export { clearWorkspaceContractsCache } from "./workspace-contracts-cache.js";
11
10
  import { type AggregateOptions, type AggregateResult, type UpgradeCommandOptions, type UpgradeResult } from "../cli/commands/index.js";
@@ -16,10 +15,10 @@ import { type ExtensionCommandOptions, type ExtensionCommandResult } from "./ext
16
15
  import { type HistoryCompactBulkCommandOptions, type HistoryCompactBulkResult, type HistoryCompactCommandOptions, type HistoryCompactResult } from "./history-compact.js";
17
16
  import { type HistoryRedactCommandOptions, type HistoryRedactResult } from "./history-redact.js";
18
17
  import { type HistoryRepairAllResult, type HistoryRepairCommandOptions, type HistoryRepairResult } from "./history-repair.js";
19
- import { readRuntimeScalarString as readScalarString, readRuntimeScalarStringAllowBlank as readScalarStringAllowBlank } from "./runtime-input.js";
18
+ import { actionGlobalOptions as globalOptions, closeManyOptionsFromFlat, extensionOptionsFromArgs, mutationListOptions, normalizeActionName, normalizeCommandPath, normalizeMcpOptionsArrays, normalizeMcpUpdateOptions, optionsWithAuthor, readRuntimeScalarString as readScalarString, readRuntimeScalarStringAllowBlank as readScalarStringAllowBlank, readRuntimeStringArray as readStringArray, updateManyOptionsFromFlat, withAddNoteOption, withFilesDiscoveryOptions, withMutationCompaction } from "./runtime-input.js";
19
+ import { type GraphCommandOptions, type GraphResult, type GraphSubcommand } from "./graph/run.js";
20
20
  import type { ContextOptions, ContextResult } from "../cli/commands/context.js";
21
21
  import type { GetOptions, GetResult } from "../cli/commands/get.js";
22
- import type { CloseManyCommandOptions } from "../cli/commands/close-many.js";
23
22
  import type { AppendCommandOptions, AppendResult } from "../cli/commands/append.js";
24
23
  import type { ClaimNextResult, ClaimResult, ReleaseResult } from "../cli/commands/claim.js";
25
24
  import type { CloseResult } from "../cli/commands/close.js";
@@ -27,15 +26,14 @@ import { type ContractsCommandOptions, type ContractsResult } from "../cli/comma
27
26
  import type { CopyResult } from "../cli/commands/copy.js";
28
27
  import type { CreateResult } from "../cli/commands/create.js";
29
28
  import type { DeleteResult } from "../cli/commands/delete.js";
30
- import type { ListOptions, ListResult } from "../cli/commands/list.js";
29
+ import { type ListOptions, type ListResult } from "./query/list.js";
31
30
  import type { NextOptions, NextResult } from "../cli/commands/next.js";
32
31
  import type { PlanCommandOptions, PlanCommandResult, PlanSubcommand } from "../cli/commands/plan.js";
33
- import type { SearchOptions, SearchResult } from "../cli/commands/search.js";
34
- import type { StatsCommandOptions, StatsResult } from "../cli/commands/stats.js";
32
+ import { type SearchOptions, type SearchResult } from "./query/search.js";
33
+ import { type StatsCommandOptions, type StatsResult } from "./stats.js";
35
34
  import type { FocusResult } from "../cli/commands/focus.js";
36
35
  import type { RestoreResult } from "../cli/commands/restore.js";
37
36
  import type { UpdateResult } from "../cli/commands/update.js";
38
- import type { UpdateManyCommandOptions } from "../cli/commands/update-many.js";
39
37
  import type { CommentsCommandOptions, CommentsResult } from "../cli/commands/comments.js";
40
38
  import type { ConfigCommandOptions, ConfigResult } from "../cli/commands/config.js";
41
39
  import type { DepsCommandOptions, DepsResult } from "./dependencies.js";
@@ -70,18 +68,18 @@ export { readSettings } from "../core/store/settings.js";
70
68
  export { runAggregate, type AggregateOptions, type AggregateResult, type AggregateRow, } from "../cli/commands/aggregate.js";
71
69
  export { CONTEXT_OUTPUT_VALUES, runContext, type BlockerEntry, type ContextFocusItem, type ContextOptions, type ContextOutputFormat, type ContextResult, type HierarchyChild, type HierarchyNode, type HotFile, type ProgressEntry, type RecentContextItem, type StaleEntry, type TestHealthSummary, type WorkloadEntry, } from "../cli/commands/context.js";
72
70
  export { runGet, type GetOptions, type GetResult, } from "../cli/commands/get.js";
73
- export { runList, type ListCompactResult, type ListedItem, type ListOptions, type ListResult, type ListSortField, type ListSortOrder, type ListVerboseResult, } from "../cli/commands/list.js";
71
+ export { runList, type ListFullResult, type ListCompactResult, type ListedItem, type ListOptions, type ListProjectedItem, type ListResult, type ListResultItem, type ListSortField, type ListSortOrder, type ListTreeItem, type ListTreeMetadata, type ListVerboseResult, } from "./query/list.js";
74
72
  export { runClose, type CloseCommandOptions } from "../cli/commands/close.js";
75
73
  export { runUpdate, type UpdateCommandOptions, } from "../cli/commands/update.js";
76
74
  export { NEXT_OUTPUT_VALUES, runNext, type NextActionableItem, type NextBlockerRef, type NextOptions, type NextOutputFormat, type NextRecommendation, type NextResult, } from "../cli/commands/next.js";
77
- export { runSearch, type SearchCompactResult, type SearchHit, type SearchHitHighlight, type SearchMatchMode, type SearchOptions, type SearchResult, type SearchResultItem, type SearchVerboseResult, } from "../cli/commands/search.js";
78
- export { runStats, type StatsCommandOptions, type StatsResult, } from "../cli/commands/stats.js";
75
+ export { runSearch, type SearchCompactResult, type SearchHit, type SearchHitHighlight, type SearchMatchMode, type SearchOptions, type SearchResult, type SearchResultItem, type SearchVerboseResult, } from "./query/search.js";
76
+ export { runStats, type StatsCommandOptions, type StatsResult, } from "./stats.js";
79
77
  export { renderCalendarMarkdown, renderCalendarToon, resolveCalendarOutputFormat, runCalendar, type CalendarOptions, type CalendarResult, } from "../cli/commands/calendar.js";
80
78
  export { renderGuideMarkdown, resolveGuideOutputFormat, runGuide, type GuideDepth, type GuideOptions, type GuideOutputFormat, type GuideResult, } from "../cli/commands/guide.js";
81
79
  export { runCompletion, type CompletionResult, type CompletionShell, } from "../cli/commands/completion.js";
82
80
  export { runReindex, type ReindexOptions, type ReindexResult, } from "../cli/commands/reindex.js";
83
81
  export { loadCreateTemplateOptions, runTemplatesList, runTemplatesSave, runTemplatesShow, type CreateTemplateOptions, type TemplatesListResult, type TemplatesSaveResult, type TemplatesShowResult, } from "./templates.js";
84
- export { runTestRunsList, runTestRunsLogs, runTestRunsResume, runTestRunsStatus, runTestRunsStop, type TestRunsListCommandOptions, type TestRunsLogsCommandOptions, type TestRunsResumeCommandOptions, type TestRunsStopCommandOptions, } from "../cli/commands/test-runs.js";
82
+ export { runTestRunsList, runTestRunsLogs, runTestRunsResume, runTestRunsStatus, runTestRunsStop, type TestRunsListCommandOptions, type TestRunsLogsCommandOptions, type TestRunsResumeCommandOptions, type TestRunsStopCommandOptions, } from "./test/runs.js";
85
83
  export { CONFIDENCE_TEXT_VALUES, DEPENDENCY_KIND_VALUES, BUILTIN_ITEM_TYPE_VALUES, ISSUE_SEVERITY_VALUES, ITEM_TYPE_VALUES, RISK_VALUES, STATUS_VALUES, } from "../types/index.js";
86
84
  export type { GlobalOptions } from "../core/shared/command-types.js";
87
85
  /** Inputs that customize the package command operation. */
@@ -259,6 +257,11 @@ export declare class PmClient {
259
257
  docs(id: string, options?: DocsCommandOptions): Promise<DocsResult>;
260
258
  /** Inspect item dependency relationships. */
261
259
  deps(id: string, options?: DepsCommandOptions): Promise<DepsResult>;
260
+ /** Run bounded workspace graph traversal, analytics, or governance-audit queries. */
261
+ graph(subcommand: GraphSubcommand, ids?: {
262
+ id?: string;
263
+ target?: string;
264
+ }, options?: GraphCommandOptions): Promise<GraphResult>;
262
265
  /** Append markdown/body text to an item through the mutation pipeline. */
263
266
  append(id: string, body: string, options?: PmClientFullMutationOptions): Promise<AppendResult>;
264
267
  /** Initialize a workspace with the same semantics as `pm init`. */
@@ -440,6 +443,11 @@ export declare function filesDiscover(id: string, options?: FilesDiscoverOptions
440
443
  export declare function docs(id: string, options?: DocsCommandOptions, clientOptions?: PmClientOptions): Promise<DocsResult>;
441
444
  /** Inspect item dependency relationships without constructing a reusable client. */
442
445
  export declare function deps(id: string, options?: DepsCommandOptions, clientOptions?: PmClientOptions): Promise<DepsResult>;
446
+ /** Run bounded workspace graph queries without constructing a reusable client. */
447
+ export declare function graph(subcommand: GraphSubcommand, ids?: {
448
+ id?: string;
449
+ target?: string;
450
+ }, options?: GraphCommandOptions, clientOptions?: PmClientOptions): Promise<GraphResult>;
443
451
  /** Append markdown/body text to an item without constructing a reusable client. */
444
452
  export declare function append(id: string, body: string, options?: PmClientFullMutationOptions, clientOptions?: PmClientOptions): Promise<AppendResult>;
445
453
  /** Initialize a workspace without constructing a reusable client. */
@@ -564,25 +572,6 @@ export declare function getWorkspaceContracts(pmRoot: string, options?: Workspac
564
572
  export declare function getContracts(pmRootOrOptions?: string | GetContractsOptions, options?: GetContractsOptions): Promise<ContractsResult>;
565
573
  /** Read a required non-empty string from an action argument bag. */
566
574
  export declare function readRequiredString(args: Record<string, unknown>, key: string): string;
567
- declare function globalOptions(args: Record<string, unknown>): GlobalOptions;
568
- declare function normalizeMcpOptionsArrays(options: Record<string, unknown>, action?: string): Record<string, unknown>;
569
- declare function optionsWithAuthor(args: Record<string, unknown>, action?: string): Record<string, unknown>;
570
- declare function withAddNoteOption(options: Record<string, unknown>): Record<string, unknown>;
571
- declare function withFilesDiscoveryOptions(options: Record<string, unknown>): Record<string, unknown>;
572
- declare function normalizeActionName(value: string): string;
573
- declare function normalizeCommandPath(value: string): string;
574
- declare function readStringArray(value: unknown): string[];
575
- declare function extensionOptionsFromArgs(args: Record<string, unknown>, options: Record<string, unknown>): Record<string, unknown>;
576
- /** Mutation tools (create/update/close/append/update-many) return a verbose `changed_fields` array. On the agent path we drop it to a `changed_field_count` by default for token efficiency, restoring the full array only when the caller explicitly passes the MCP-level fullChangedFields=true control. Mutation options are forwarded unchanged so runtime fields named `full` remain valid user data. */
577
- declare function withMutationCompaction(args: Record<string, unknown>, options?: Record<string, unknown> | null): {
578
- changedFields: "full" | "compact";
579
- idOnly: boolean;
580
- runnerOptions: Record<string, unknown>;
581
- };
582
- declare function mutationListOptions(options: Record<string, unknown>): ListOptions;
583
- declare function closeManyOptionsFromFlat(options: Record<string, unknown>): CloseManyCommandOptions;
584
- declare function normalizeMcpUpdateOptions(options: Record<string, unknown>): Record<string, unknown>;
585
- declare function updateManyOptionsFromFlat(options: Record<string, unknown>): UpdateManyCommandOptions;
586
575
  /** Execute one native or extension-contributed pm action in-process. */
587
576
  export declare function runAction(args: PmActionInput): Promise<unknown>;
588
577
  declare const actionRunnerTestHooks: {