@unbrained/pm-cli 2026.7.15 → 2026.7.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (508) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +23 -2
  3. package/CONTRIBUTING.md +2 -2
  4. package/dist/cli/bootstrap-args.d.ts +2 -115
  5. package/dist/cli/bootstrap-args.js +4 -831
  6. package/dist/cli/bootstrap-args.js.map +1 -1
  7. package/dist/cli/commands/eval.d.ts +4 -64
  8. package/dist/cli/commands/eval.js +4 -153
  9. package/dist/cli/commands/eval.js.map +1 -1
  10. package/dist/cli/commands/linked-test-entry.d.ts +6 -6
  11. package/dist/cli/commands/linked-test-entry.js +4 -65
  12. package/dist/cli/commands/linked-test-entry.js.map +1 -1
  13. package/dist/cli/commands/linked-test-parsers.d.ts +3 -45
  14. package/dist/cli/commands/linked-test-parsers.js +4 -516
  15. package/dist/cli/commands/linked-test-parsers.js.map +1 -1
  16. package/dist/cli/commands/list.d.ts +3 -210
  17. package/dist/cli/commands/list.js +4 -1068
  18. package/dist/cli/commands/list.js.map +1 -1
  19. package/dist/cli/commands/search.d.ts +3 -464
  20. package/dist/cli/commands/search.js +4 -2236
  21. package/dist/cli/commands/search.js.map +1 -1
  22. package/dist/cli/commands/stats.d.ts +6 -66
  23. package/dist/cli/commands/stats.js +4 -157
  24. package/dist/cli/commands/stats.js.map +1 -1
  25. package/dist/cli/commands/telemetry.d.ts +6 -14
  26. package/dist/cli/commands/telemetry.js +4 -349
  27. package/dist/cli/commands/telemetry.js.map +1 -1
  28. package/dist/cli/commands/test-all.d.ts +6 -95
  29. package/dist/cli/commands/test-all.js +4 -439
  30. package/dist/cli/commands/test-all.js.map +1 -1
  31. package/dist/cli/commands/test-runs.d.ts +6 -92
  32. package/dist/cli/commands/test-runs.js +4 -189
  33. package/dist/cli/commands/test-runs.js.map +1 -1
  34. package/dist/cli/commands/test.d.ts +6 -244
  35. package/dist/cli/commands/test.js +4 -1780
  36. package/dist/cli/commands/test.js.map +1 -1
  37. package/dist/cli/commands/update-many.d.ts +15 -29
  38. package/dist/cli/commands/update-many.js +355 -259
  39. package/dist/cli/commands/update-many.js.map +1 -1
  40. package/dist/cli/main.js +140 -133
  41. package/dist/cli/main.js.map +1 -1
  42. package/dist/cli/search-refresh.js +4 -9
  43. package/dist/cli/search-refresh.js.map +1 -1
  44. package/dist/cli/shared-parsers.d.ts +6 -9
  45. package/dist/cli/shared-parsers.js +4 -37
  46. package/dist/cli/shared-parsers.js.map +1 -1
  47. package/dist/cli/telemetry-flush.js +4 -4
  48. package/dist/cli/telemetry-flush.js.map +1 -1
  49. package/dist/cli-bundle/bundle-manifest.json +341 -341
  50. package/dist/cli-bundle/chunks/{append-OJQFUQ4T.js → append-5YF3TO7I.js} +5 -5
  51. package/dist/cli-bundle/chunks/append-JHO5K6RP.js +11 -0
  52. package/dist/cli-bundle/chunks/{chunk-WT3ZEOGH.js → chunk-23TCGBRK.js} +16 -7
  53. package/dist/cli-bundle/chunks/{chunk-WT3ZEOGH.js.map → chunk-23TCGBRK.js.map} +1 -1
  54. package/dist/cli-bundle/chunks/{chunk-BCOFWYW4.js → chunk-2BX74BAS.js} +3 -3
  55. package/dist/cli-bundle/chunks/{chunk-APRVSW2O.js → chunk-2CXL335K.js} +3 -3
  56. package/dist/cli-bundle/chunks/{chunk-KG44YSKD.js → chunk-2FUOXSRN.js} +4 -4
  57. package/dist/cli-bundle/chunks/{chunk-HDH3JUGG.js → chunk-2IPNL3DR.js} +3 -3
  58. package/dist/cli-bundle/chunks/{chunk-J6364LFM.js → chunk-2MPMKJF2.js} +9 -18
  59. package/dist/cli-bundle/chunks/{chunk-J6364LFM.js.map → chunk-2MPMKJF2.js.map} +1 -1
  60. package/dist/cli-bundle/chunks/{chunk-GM5QHQU6.js → chunk-2XOSFSTH.js} +5 -5
  61. package/dist/cli-bundle/chunks/{chunk-K3WII2ME.js → chunk-37DRDP2B.js} +5 -5
  62. package/dist/cli-bundle/chunks/{chunk-2WSE6PO2.js → chunk-37V5MXAU.js} +4 -4
  63. package/dist/cli-bundle/chunks/{chunk-UWQHLMEB.js → chunk-3D4YVTNG.js} +8 -8
  64. package/dist/cli-bundle/chunks/{chunk-PMOSXADO.js → chunk-47HXN6RX.js} +3 -3
  65. package/dist/cli-bundle/chunks/{chunk-6CFNAVTF.js → chunk-5HGZKQUL.js} +4 -4
  66. package/dist/cli-bundle/chunks/{chunk-2IFFUZLC.js → chunk-5UKQLQM2.js} +2 -2
  67. package/dist/cli-bundle/chunks/{chunk-DM4H7FP4.js → chunk-633PKXLT.js} +3 -3
  68. package/dist/cli-bundle/chunks/{chunk-XSJUSQAE.js → chunk-646MQXFW.js} +2 -2
  69. package/dist/cli-bundle/chunks/{chunk-ZI6VQWQ7.js → chunk-66MKH7SZ.js} +4 -4
  70. package/dist/cli-bundle/chunks/{chunk-S6MQESFR.js → chunk-67RO3H4N.js} +4 -4
  71. package/dist/cli-bundle/chunks/{chunk-34L5OT3Y.js → chunk-6DYOZS6C.js} +2 -2
  72. package/dist/cli-bundle/chunks/{chunk-RRM5JYJC.js → chunk-6O44IN44.js} +2 -2
  73. package/dist/cli-bundle/chunks/{chunk-ONG5V5CI.js → chunk-6XAZB6SE.js} +97 -69
  74. package/dist/cli-bundle/chunks/chunk-6XAZB6SE.js.map +1 -0
  75. package/dist/cli-bundle/chunks/{chunk-PENXZX3U.js → chunk-74FKFFXO.js} +2 -2
  76. package/dist/cli-bundle/chunks/{chunk-LPYWLWDS.js → chunk-7CTQ7WW5.js} +37 -37
  77. package/dist/cli-bundle/chunks/chunk-7CTQ7WW5.js.map +1 -0
  78. package/dist/cli-bundle/chunks/{chunk-HO4KXD6I.js → chunk-7H5NNCJ5.js} +4 -4
  79. package/dist/cli-bundle/chunks/{chunk-XXXF6PAQ.js → chunk-7LTCLTRG.js} +69 -61
  80. package/dist/cli-bundle/chunks/chunk-7LTCLTRG.js.map +7 -0
  81. package/dist/cli-bundle/chunks/{chunk-TQSZFPIS.js → chunk-AFGKSHAM.js} +4 -4
  82. package/dist/cli-bundle/chunks/{chunk-JXQUXVMI.js → chunk-AFSV5HBB.js} +77 -7
  83. package/dist/cli-bundle/chunks/{chunk-JXQUXVMI.js.map → chunk-AFSV5HBB.js.map} +1 -1
  84. package/dist/cli-bundle/chunks/{chunk-6N2VXVTQ.js → chunk-ARGDWQ4J.js} +2 -2
  85. package/dist/cli-bundle/chunks/{chunk-3U7ZR6M4.js → chunk-B57RJHBZ.js} +4 -4
  86. package/dist/cli-bundle/chunks/{chunk-7B67ZL4N.js → chunk-B6SH2YNN.js} +75 -5
  87. package/dist/cli-bundle/chunks/{chunk-7B67ZL4N.js.map → chunk-B6SH2YNN.js.map} +1 -1
  88. package/dist/cli-bundle/chunks/{chunk-YCQET3OT.js → chunk-BAP7G3N2.js} +2 -2
  89. package/dist/cli-bundle/chunks/{chunk-QKXHFPYM.js → chunk-BIRYX32V.js} +3 -3
  90. package/dist/cli-bundle/chunks/{chunk-RMLWNPH2.js → chunk-BVLOMU6O.js} +2 -2
  91. package/dist/cli-bundle/chunks/{chunk-YBLZ2VE7.js → chunk-CFSUNEL7.js} +320 -239
  92. package/dist/cli-bundle/chunks/chunk-CFSUNEL7.js.map +7 -0
  93. package/dist/cli-bundle/chunks/{chunk-2VPAVL7O.js → chunk-CKX4WOPC.js} +2 -2
  94. package/dist/cli-bundle/chunks/{chunk-TKOVBP6C.js → chunk-D52ZN3BF.js} +2 -2
  95. package/dist/cli-bundle/chunks/{chunk-KPMKHGEA.js → chunk-D53RTYVI.js} +4 -4
  96. package/dist/cli-bundle/chunks/{chunk-ODALILG3.js → chunk-D5XHO4Q7.js} +2 -2
  97. package/dist/cli-bundle/chunks/{chunk-E2OJMKML.js → chunk-DCC2AQBD.js} +18 -9
  98. package/dist/cli-bundle/chunks/{chunk-E2OJMKML.js.map → chunk-DCC2AQBD.js.map} +1 -1
  99. package/dist/cli-bundle/chunks/{chunk-YAQEBNY7.js → chunk-DDFGYUCQ.js} +4 -4
  100. package/dist/cli-bundle/chunks/{chunk-EAB64KLB.js → chunk-DG2EQRIH.js} +4 -4
  101. package/dist/cli-bundle/chunks/{chunk-IG3SWA4A.js → chunk-EHJFUOXL.js} +3 -3
  102. package/dist/cli-bundle/chunks/{chunk-ONREO4ST.js → chunk-EY7ZE3TG.js} +3 -3
  103. package/dist/cli-bundle/chunks/{chunk-EJEXHTY5.js → chunk-FHOBCGQO.js} +2 -2
  104. package/dist/cli-bundle/chunks/{chunk-H3EIEWGR.js → chunk-FL4D53ND.js} +2 -2
  105. package/dist/cli-bundle/chunks/{chunk-WUJQK4YV.js → chunk-FVNWHUME.js} +4 -4
  106. package/dist/cli-bundle/chunks/{chunk-INU6DKT5.js → chunk-FXFCFL73.js} +5 -5
  107. package/dist/cli-bundle/chunks/{chunk-QEHQ2GVG.js → chunk-FY4RLHSC.js} +2 -2
  108. package/dist/cli-bundle/chunks/{chunk-EACOH7AU.js → chunk-FZGM3PNA.js} +8 -8
  109. package/dist/cli-bundle/chunks/{chunk-FNSPG7MU.js → chunk-G6KM4YKY.js} +7 -7
  110. package/dist/cli-bundle/chunks/{chunk-AHVTB5I5.js → chunk-G6MYGULG.js} +4 -4
  111. package/dist/cli-bundle/chunks/{chunk-TSMHDIW4.js → chunk-GLZKZON6.js} +2 -2
  112. package/dist/cli-bundle/chunks/{chunk-2JKGO6QX.js → chunk-H5IOT54C.js} +4 -4
  113. package/dist/cli-bundle/chunks/{chunk-5ZSLZLDN.js → chunk-HF63SBLC.js} +585 -456
  114. package/dist/cli-bundle/chunks/chunk-HF63SBLC.js.map +1 -0
  115. package/dist/cli-bundle/chunks/{chunk-SELVXEZK.js → chunk-HO4DLBNK.js} +2 -2
  116. package/dist/cli-bundle/chunks/{chunk-3CLU2XZO.js → chunk-HSYV4ZYT.js} +4 -4
  117. package/dist/cli-bundle/chunks/{chunk-EH2OPHBI.js → chunk-HTXXXF45.js} +23 -19
  118. package/dist/cli-bundle/chunks/chunk-HTXXXF45.js.map +1 -0
  119. package/dist/cli-bundle/chunks/{chunk-CRVF2JDM.js → chunk-HXVHBERL.js} +8 -8
  120. package/dist/cli-bundle/chunks/{chunk-NU3IMIEA.js → chunk-I7DIDUSP.js} +2 -2
  121. package/dist/cli-bundle/chunks/{chunk-2NCIPMQP.js → chunk-I7GY4X6Y.js} +2 -2
  122. package/dist/cli-bundle/chunks/{chunk-JYFOV7FC.js → chunk-IE5KRAKN.js} +4 -4
  123. package/dist/cli-bundle/chunks/{chunk-UY2ACEMF.js → chunk-ILVOOAT4.js} +5 -5
  124. package/dist/cli-bundle/chunks/{chunk-GOSLKLFE.js → chunk-KH6QAHME.js} +3 -3
  125. package/dist/cli-bundle/chunks/{chunk-J6EY5V4N.js → chunk-KOEZCHRF.js} +9 -9
  126. package/dist/cli-bundle/chunks/{chunk-QKECXBBG.js → chunk-KX62NMZC.js} +3 -3
  127. package/dist/cli-bundle/chunks/{chunk-QKECXBBG.js.map → chunk-KX62NMZC.js.map} +1 -1
  128. package/dist/cli-bundle/chunks/{chunk-WQPUU7XD.js → chunk-L337QKWJ.js} +5 -5
  129. package/dist/cli-bundle/chunks/{chunk-LSG2U345.js → chunk-L6FVNR7X.js} +5 -5
  130. package/dist/cli-bundle/chunks/{chunk-ILX33QXL.js → chunk-LLODAQMP.js} +706 -532
  131. package/dist/cli-bundle/chunks/chunk-LLODAQMP.js.map +7 -0
  132. package/dist/cli-bundle/chunks/{chunk-FMBNM2EN.js → chunk-LSOWTLEM.js} +2 -2
  133. package/dist/cli-bundle/chunks/{chunk-4223PVZT.js → chunk-M7MVOKVV.js} +3 -3
  134. package/dist/cli-bundle/chunks/chunk-MNV226E4.js +834 -0
  135. package/dist/cli-bundle/chunks/chunk-MNV226E4.js.map +1 -0
  136. package/dist/cli-bundle/chunks/{chunk-UMOPHQSU.js → chunk-MR4SHYR4.js} +41 -19
  137. package/dist/cli-bundle/chunks/chunk-MR4SHYR4.js.map +7 -0
  138. package/dist/cli-bundle/chunks/{chunk-BKVG6XOA.js → chunk-MSGETE6I.js} +4 -4
  139. package/dist/cli-bundle/chunks/{chunk-3WM75PWC.js → chunk-N33FD2UI.js} +3 -3
  140. package/dist/cli-bundle/chunks/{chunk-UFXU44HV.js → chunk-N7I2DGLP.js} +4 -4
  141. package/dist/cli-bundle/chunks/{chunk-3S5QVM5H.js → chunk-NCAFUBJX.js} +13 -13
  142. package/dist/cli-bundle/chunks/chunk-NCAFUBJX.js.map +1 -0
  143. package/dist/cli-bundle/chunks/{chunk-6S3YSUYG.js → chunk-NNANAWFH.js} +3 -3
  144. package/dist/cli-bundle/chunks/{chunk-IJIICKVW.js → chunk-NTRQLE2R.js} +2 -2
  145. package/dist/cli-bundle/chunks/{chunk-SDQLJWBO.js → chunk-NVZ6NVHJ.js} +4 -4
  146. package/dist/cli-bundle/chunks/{chunk-H2Z3FYXQ.js → chunk-OWP6QFBV.js} +4 -4
  147. package/dist/cli-bundle/chunks/{chunk-Q7A43DS4.js → chunk-P22HGFFI.js} +2 -2
  148. package/dist/cli-bundle/chunks/{chunk-NLDFBC6J.js → chunk-P56LKFQX.js} +2 -2
  149. package/dist/cli-bundle/chunks/{chunk-NVPZIJVR.js → chunk-PT7MCCGD.js} +2 -2
  150. package/dist/cli-bundle/chunks/{chunk-P74IZQ7A.js → chunk-QKVVV6QO.js} +7 -7
  151. package/dist/cli-bundle/chunks/{chunk-5JLUII3O.js → chunk-QNUAZYGW.js} +321 -240
  152. package/dist/cli-bundle/chunks/chunk-QNUAZYGW.js.map +1 -0
  153. package/dist/cli-bundle/chunks/{chunk-QIPLHNP7.js → chunk-QWBKN3QC.js} +5 -5
  154. package/dist/cli-bundle/chunks/{chunk-7PIWCHTW.js → chunk-R5XTTZSJ.js} +5 -5
  155. package/dist/cli-bundle/chunks/{chunk-JOUQZENX.js → chunk-RC4UOUXA.js} +3 -3
  156. package/dist/cli-bundle/chunks/{chunk-BEP7WJA2.js → chunk-RGMWJLXF.js} +4 -4
  157. package/dist/cli-bundle/chunks/{chunk-NP22ERDF.js → chunk-RTBX3C4C.js} +3 -3
  158. package/dist/cli-bundle/chunks/{chunk-HYB5AZ63.js → chunk-S46R2M3W.js} +117 -71
  159. package/dist/cli-bundle/chunks/chunk-S46R2M3W.js.map +7 -0
  160. package/dist/cli-bundle/chunks/{chunk-H5APFTHZ.js → chunk-S6FF7VW6.js} +18 -18
  161. package/dist/cli-bundle/chunks/chunk-S6FF7VW6.js.map +7 -0
  162. package/dist/cli-bundle/chunks/{chunk-UXONS674.js → chunk-SIJV365F.js} +54 -55
  163. package/dist/cli-bundle/chunks/chunk-SIJV365F.js.map +1 -0
  164. package/dist/cli-bundle/chunks/{chunk-7Z4LKRS4.js → chunk-SPFZV2GR.js} +9 -9
  165. package/dist/cli-bundle/chunks/{chunk-ULTHRDBP.js → chunk-TM5CIO3F.js} +3 -3
  166. package/dist/cli-bundle/chunks/{chunk-4XQ3BDV4.js → chunk-V3VBXQQV.js} +36 -36
  167. package/dist/cli-bundle/chunks/chunk-V3VBXQQV.js.map +7 -0
  168. package/dist/cli-bundle/chunks/{chunk-YAROI3PD.js → chunk-V7MP6YTN.js} +7 -7
  169. package/dist/cli-bundle/chunks/{chunk-OW4JWD5M.js → chunk-VAHZIPWS.js} +4 -4
  170. package/dist/cli-bundle/chunks/{chunk-DYH63FX7.js → chunk-VE6ZSTQW.js} +4 -4
  171. package/dist/cli-bundle/chunks/{chunk-3AUGG2DP.js → chunk-W5E2UUSH.js} +3 -3
  172. package/dist/cli-bundle/chunks/{chunk-BSEQUTQP.js → chunk-WACRQ26A.js} +2 -2
  173. package/dist/cli-bundle/chunks/{chunk-BSEQUTQP.js.map → chunk-WACRQ26A.js.map} +1 -1
  174. package/dist/cli-bundle/chunks/{chunk-UOHFKBUV.js → chunk-WL3SS45P.js} +3 -3
  175. package/dist/cli-bundle/chunks/{chunk-QKJGPFAF.js → chunk-WU3KAN6A.js} +3 -3
  176. package/dist/cli-bundle/chunks/{chunk-IA5FKNII.js → chunk-X2MGQMZO.js} +2 -2
  177. package/dist/cli-bundle/chunks/{chunk-TD3LVC7D.js → chunk-X5YCTFKT.js} +3 -3
  178. package/dist/cli-bundle/chunks/{chunk-B7PE22W6.js → chunk-XC2HEEOV.js} +4 -4
  179. package/dist/cli-bundle/chunks/{chunk-J5AOEGDC.js → chunk-XNPMDSQQ.js} +8 -8
  180. package/dist/cli-bundle/chunks/{chunk-K2X6U4UA.js → chunk-XXLXJL7V.js} +4 -4
  181. package/dist/cli-bundle/chunks/chunk-XYJK6GIQ.js +851 -0
  182. package/dist/cli-bundle/chunks/chunk-XYJK6GIQ.js.map +7 -0
  183. package/dist/cli-bundle/chunks/{chunk-RLCHOOHC.js → chunk-YJSURTBB.js} +2 -2
  184. package/dist/cli-bundle/chunks/{chunk-PGY23YTC.js → chunk-YKFHF37B.js} +3 -3
  185. package/dist/cli-bundle/chunks/{chunk-JFTKLTEF.js → chunk-YQCWK2MB.js} +4 -4
  186. package/dist/cli-bundle/chunks/{chunk-EYLCSJAI.js → chunk-YQEZWI3R.js} +2 -2
  187. package/dist/cli-bundle/chunks/close-BEP7MHF3.js +12 -0
  188. package/dist/cli-bundle/chunks/{close-CWODTPKG.js → close-Y6QFUJQN.js} +5 -5
  189. package/dist/cli-bundle/chunks/{close-many-CQFUY7MR.js → close-many-JJFW7KTT.js} +14 -14
  190. package/dist/cli-bundle/chunks/close-many-QJ6FKJUE.js +23 -0
  191. package/dist/cli-bundle/chunks/comments-2AOZQ5D2.js +13 -0
  192. package/dist/cli-bundle/chunks/{comments-WGLHR7LB.js → comments-TMHMALA5.js} +7 -7
  193. package/dist/cli-bundle/chunks/{copy-LXVDXH7B.js → copy-FWQA5OU4.js} +4 -4
  194. package/dist/cli-bundle/chunks/copy-N3LCQBMC.js +9 -0
  195. package/dist/cli-bundle/chunks/{create-LBVCYMEG.js → create-AQ5SIGZC.js} +9 -9
  196. package/dist/cli-bundle/chunks/{create-J5U6ND4K.js → create-KOGQ3JKD.js} +9 -9
  197. package/dist/cli-bundle/chunks/delete-6G3MBZ6S.js +10 -0
  198. package/dist/cli-bundle/chunks/{delete-PMJBNY5G.js → delete-YYYFOSEA.js} +4 -4
  199. package/dist/cli-bundle/chunks/{deps-OA26IS25.js → deps-5NC4IZH7.js} +5 -5
  200. package/dist/cli-bundle/chunks/{deps-JZ7TMVCB.js → deps-EVTOQMKW.js} +5 -5
  201. package/dist/cli-bundle/chunks/{docs-FEWB2DQB.js → docs-53NUGMIQ.js} +6 -6
  202. package/dist/cli-bundle/chunks/docs-OWRGDMNY.js +14 -0
  203. package/dist/cli-bundle/chunks/{files-EFIWKFTM.js → files-3PXGXYDB.js} +6 -6
  204. package/dist/cli-bundle/chunks/{files-6YFBJRBG.js → files-EGLKHD7O.js} +6 -6
  205. package/dist/cli-bundle/chunks/focus-KZLIA6WS.js +10 -0
  206. package/dist/cli-bundle/chunks/{focus-4QJR7FOQ.js → focus-SRPASFTN.js} +5 -5
  207. package/dist/cli-bundle/chunks/{history-compact-CKRPDTJN.js → history-compact-G4DULDCX.js} +6 -6
  208. package/dist/cli-bundle/chunks/history-compact-HHIUOMZ7.js +16 -0
  209. package/dist/cli-bundle/chunks/{history-redact-BB3TGDAE.js → history-redact-IUSJ6X3E.js} +4 -4
  210. package/dist/cli-bundle/chunks/{history-redact-D225BHOZ.js → history-redact-THHGRQXV.js} +4 -4
  211. package/dist/cli-bundle/chunks/history-repair-KG7SWXI6.js +16 -0
  212. package/dist/cli-bundle/chunks/{history-repair-RQXKQHL4.js → history-repair-LUQWRS7X.js} +6 -6
  213. package/dist/cli-bundle/chunks/{learnings-JLNLCOL5.js → learnings-2MRNBFJF.js} +7 -7
  214. package/dist/cli-bundle/chunks/learnings-ZVHSALJY.js +13 -0
  215. package/dist/cli-bundle/chunks/{notes-GB47XXQQ.js → notes-73JWKWUD.js} +7 -7
  216. package/dist/cli-bundle/chunks/notes-BAKUL5DJ.js +13 -0
  217. package/dist/cli-bundle/chunks/{plan-VDCJ2PCN.js → plan-AZPMCG37.js} +10 -10
  218. package/dist/cli-bundle/chunks/plan-LEAGLPGP.js +24 -0
  219. package/dist/cli-bundle/chunks/{profile-IVXQEL3D.js → profile-AGUKS52S.js} +9 -9
  220. package/dist/cli-bundle/chunks/{profile-FAU7NZML.js → profile-U2B6Y7GE.js} +9 -9
  221. package/dist/cli-bundle/chunks/{register-list-query-UL4UKBBN.js → register-list-query-A5KRJ5J2.js} +16 -16
  222. package/dist/cli-bundle/chunks/{register-list-query-DKA3EH5D.js → register-list-query-NEYP3TXO.js} +16 -16
  223. package/dist/cli-bundle/chunks/{register-mutation-RBBJ52DK.js → register-mutation-6LOPBAHC.js} +29 -29
  224. package/dist/cli-bundle/chunks/{register-mutation-ARFHRW55.js → register-mutation-GCZOALNJ.js} +29 -29
  225. package/dist/cli-bundle/chunks/{register-operations-ZIBBRSED.js → register-operations-6ZZIF27A.js} +35 -35
  226. package/dist/cli-bundle/chunks/{register-operations-ZUJ5JWPE.js → register-operations-REDIAEGI.js} +35 -35
  227. package/dist/cli-bundle/chunks/{register-setup-TDCGWIOS.js → register-setup-BHPMN5SK.js} +15 -15
  228. package/dist/cli-bundle/chunks/{register-setup-BCVLFEYS.js → register-setup-J3JS2ZVT.js} +15 -15
  229. package/dist/cli-bundle/chunks/{restore-25DLT2Q2.js → restore-E3PRGDN3.js} +6 -6
  230. package/dist/cli-bundle/chunks/restore-KIUYTAEJ.js +14 -0
  231. package/dist/cli-bundle/chunks/{schema-FNU3WE4O.js → schema-5JNFQFUW.js} +6 -6
  232. package/dist/cli-bundle/chunks/{schema-NBCM3RAD.js → schema-TMIW4XZC.js} +6 -6
  233. package/dist/cli-bundle/chunks/update-PQQHLYCC.js +21 -0
  234. package/dist/cli-bundle/chunks/{update-XHSIAIXE.js → update-SA6AG23P.js} +12 -12
  235. package/dist/cli-bundle/chunks/update-many-RQVTFJPD.js +36 -0
  236. package/dist/cli-bundle/chunks/update-many-TV3L3KBX.js +32 -0
  237. package/dist/cli-bundle/main.js +153 -855
  238. package/dist/cli-bundle/main.js.map +4 -4
  239. package/dist/cli-bundle/sdk-runtime.js +54 -54
  240. package/dist/cli-bundle/sdk-testing.js +6 -6
  241. package/dist/cli-bundle/sdk.js +195 -59
  242. package/dist/cli-bundle/sdk.js.map +3 -3
  243. package/dist/core/extensions/item-fields.js +2 -2
  244. package/dist/core/extensions/item-fields.js.map +1 -1
  245. package/dist/sdk/cli-bootstrap.d.ts +122 -0
  246. package/dist/sdk/cli-bootstrap.js +879 -0
  247. package/dist/sdk/cli-bootstrap.js.map +1 -0
  248. package/dist/sdk/eval.d.ts +66 -0
  249. package/dist/sdk/eval.js +186 -0
  250. package/dist/sdk/eval.js.map +1 -0
  251. package/dist/sdk/index.d.ts +16 -4
  252. package/dist/sdk/index.js +18 -6
  253. package/dist/sdk/index.js.map +1 -1
  254. package/dist/{cli/commands → sdk/query}/item-filter-options.d.ts +1 -1
  255. package/dist/{cli/commands → sdk/query}/item-filter-options.js +3 -3
  256. package/dist/sdk/query/item-filter-options.js.map +1 -0
  257. package/dist/sdk/query/list.d.ts +254 -0
  258. package/dist/sdk/query/list.js +1073 -0
  259. package/dist/sdk/query/list.js.map +1 -0
  260. package/dist/sdk/query/parsers.d.ts +9 -0
  261. package/dist/sdk/query/parsers.js +45 -0
  262. package/dist/sdk/query/parsers.js.map +1 -0
  263. package/dist/{cli/commands → sdk/query}/search-pagination.js +4 -4
  264. package/dist/sdk/query/search-pagination.js.map +1 -0
  265. package/dist/{cli/commands → sdk/query}/search-rendering.js +3 -3
  266. package/dist/sdk/query/search-rendering.js.map +1 -0
  267. package/dist/sdk/query/search.d.ts +469 -0
  268. package/dist/sdk/query/search.js +2247 -0
  269. package/dist/sdk/query/search.js.map +1 -0
  270. package/dist/sdk/runtime.d.ts +7 -7
  271. package/dist/sdk/runtime.js +13 -7
  272. package/dist/sdk/runtime.js.map +1 -1
  273. package/dist/sdk/search-refresh-worker.d.ts +2 -0
  274. package/dist/sdk/search-refresh-worker.js +19 -0
  275. package/dist/sdk/search-refresh-worker.js.map +1 -0
  276. package/dist/sdk/stats.d.ts +66 -0
  277. package/dist/sdk/stats.js +151 -0
  278. package/dist/sdk/stats.js.map +1 -0
  279. package/dist/sdk/telemetry-flush.d.ts +2 -0
  280. package/dist/sdk/telemetry-flush.js +14 -0
  281. package/dist/sdk/telemetry-flush.js.map +1 -0
  282. package/dist/sdk/telemetry.d.ts +14 -0
  283. package/dist/sdk/telemetry.js +398 -0
  284. package/dist/sdk/telemetry.js.map +1 -0
  285. package/dist/sdk/test/batch.d.ts +94 -0
  286. package/dist/sdk/test/batch.js +492 -0
  287. package/dist/sdk/test/batch.js.map +1 -0
  288. package/dist/sdk/test/entry.d.ts +6 -0
  289. package/dist/sdk/test/entry.js +74 -0
  290. package/dist/sdk/test/entry.js.map +1 -0
  291. package/dist/sdk/test/execution.d.ts +282 -0
  292. package/dist/sdk/test/execution.js +1817 -0
  293. package/dist/sdk/test/execution.js.map +1 -0
  294. package/dist/sdk/test/parsers.d.ts +48 -0
  295. package/dist/sdk/test/parsers.js +522 -0
  296. package/dist/sdk/test/parsers.js.map +1 -0
  297. package/dist/sdk/test/runs.d.ts +92 -0
  298. package/dist/sdk/test/runs.js +195 -0
  299. package/dist/sdk/test/runs.js.map +1 -0
  300. package/docs/SDK.md +122 -0
  301. package/docs/SDK_PRIMITIVE_INVENTORY.md +5 -3
  302. package/docs/examples/sdk-custom-tool/README.md +27 -0
  303. package/docs/examples/sdk-custom-tool/package.json +13 -0
  304. package/docs/examples/sdk-custom-tool/src/cli.ts +36 -0
  305. package/docs/examples/sdk-custom-tool/src/entry.ts +15 -0
  306. package/docs/examples/sdk-custom-tool/src/index.ts +223 -0
  307. package/marketplace.json +2 -2
  308. package/package.json +4 -4
  309. package/packages/pm-beads/package.json +1 -1
  310. package/packages/pm-calendar/package.json +1 -1
  311. package/packages/pm-command-kit/package.json +1 -1
  312. package/packages/pm-governance-audit/extensions/governance-audit/comments-audit.ts +77 -57
  313. package/packages/pm-governance-audit/extensions/governance-audit/dedupe-audit.ts +202 -194
  314. package/packages/pm-governance-audit/extensions/governance-audit/dedupe-merge.ts +227 -153
  315. package/packages/pm-governance-audit/extensions/governance-audit/normalize.ts +169 -125
  316. package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +130 -81
  317. package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +53 -4
  318. package/packages/pm-governance-audit/package.json +1 -1
  319. package/packages/pm-guide-shell/package.json +1 -1
  320. package/packages/pm-kanban/package.json +1 -1
  321. package/packages/pm-lifecycle-hooks/package.json +1 -1
  322. package/packages/pm-linked-test-adapters/package.json +1 -1
  323. package/packages/pm-search-advanced/package.json +1 -1
  324. package/packages/pm-templates/package.json +1 -1
  325. package/packages/pm-todos/package.json +1 -1
  326. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  327. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  328. package/dist/cli/commands/item-filter-options.js.map +0 -1
  329. package/dist/cli/commands/search-pagination.js.map +0 -1
  330. package/dist/cli/commands/search-rendering.js.map +0 -1
  331. package/dist/cli-bundle/chunks/append-UZVHUO74.js +0 -11
  332. package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +0 -1
  333. package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +0 -7
  334. package/dist/cli-bundle/chunks/chunk-5JLUII3O.js.map +0 -1
  335. package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +0 -1
  336. package/dist/cli-bundle/chunks/chunk-EH2OPHBI.js.map +0 -1
  337. package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +0 -7
  338. package/dist/cli-bundle/chunks/chunk-HYB5AZ63.js.map +0 -7
  339. package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +0 -7
  340. package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +0 -1
  341. package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +0 -1
  342. package/dist/cli-bundle/chunks/chunk-UMOPHQSU.js.map +0 -7
  343. package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +0 -1
  344. package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +0 -7
  345. package/dist/cli-bundle/chunks/chunk-YBLZ2VE7.js.map +0 -7
  346. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +0 -58
  347. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +0 -1
  348. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +0 -68
  349. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +0 -7
  350. package/dist/cli-bundle/chunks/close-W6LI2PKM.js +0 -12
  351. package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +0 -23
  352. package/dist/cli-bundle/chunks/comments-E3TNTK24.js +0 -13
  353. package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +0 -9
  354. package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +0 -10
  355. package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +0 -14
  356. package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +0 -10
  357. package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +0 -16
  358. package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +0 -16
  359. package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +0 -13
  360. package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +0 -13
  361. package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +0 -24
  362. package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +0 -14
  363. package/dist/cli-bundle/chunks/update-WWBYOPXO.js +0 -21
  364. package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +0 -32
  365. package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +0 -36
  366. /package/dist/cli-bundle/chunks/{append-OJQFUQ4T.js.map → append-5YF3TO7I.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{append-UZVHUO74.js.map → append-JHO5K6RP.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{chunk-BCOFWYW4.js.map → chunk-2BX74BAS.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{chunk-APRVSW2O.js.map → chunk-2CXL335K.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{chunk-KG44YSKD.js.map → chunk-2FUOXSRN.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{chunk-HDH3JUGG.js.map → chunk-2IPNL3DR.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{chunk-GM5QHQU6.js.map → chunk-2XOSFSTH.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{chunk-K3WII2ME.js.map → chunk-37DRDP2B.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{chunk-2WSE6PO2.js.map → chunk-37V5MXAU.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{chunk-UWQHLMEB.js.map → chunk-3D4YVTNG.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{chunk-PMOSXADO.js.map → chunk-47HXN6RX.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{chunk-6CFNAVTF.js.map → chunk-5HGZKQUL.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{chunk-2IFFUZLC.js.map → chunk-5UKQLQM2.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{chunk-DM4H7FP4.js.map → chunk-633PKXLT.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{chunk-XSJUSQAE.js.map → chunk-646MQXFW.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{chunk-ZI6VQWQ7.js.map → chunk-66MKH7SZ.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{chunk-S6MQESFR.js.map → chunk-67RO3H4N.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{chunk-34L5OT3Y.js.map → chunk-6DYOZS6C.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{chunk-RRM5JYJC.js.map → chunk-6O44IN44.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{chunk-PENXZX3U.js.map → chunk-74FKFFXO.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{chunk-HO4KXD6I.js.map → chunk-7H5NNCJ5.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{chunk-TQSZFPIS.js.map → chunk-AFGKSHAM.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{chunk-6N2VXVTQ.js.map → chunk-ARGDWQ4J.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{chunk-3U7ZR6M4.js.map → chunk-B57RJHBZ.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{chunk-YCQET3OT.js.map → chunk-BAP7G3N2.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{chunk-QKXHFPYM.js.map → chunk-BIRYX32V.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{chunk-RMLWNPH2.js.map → chunk-BVLOMU6O.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{chunk-2VPAVL7O.js.map → chunk-CKX4WOPC.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{chunk-TKOVBP6C.js.map → chunk-D52ZN3BF.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{chunk-KPMKHGEA.js.map → chunk-D53RTYVI.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{chunk-ODALILG3.js.map → chunk-D5XHO4Q7.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{chunk-YAQEBNY7.js.map → chunk-DDFGYUCQ.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{chunk-EAB64KLB.js.map → chunk-DG2EQRIH.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{chunk-IG3SWA4A.js.map → chunk-EHJFUOXL.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{chunk-ONREO4ST.js.map → chunk-EY7ZE3TG.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{chunk-EJEXHTY5.js.map → chunk-FHOBCGQO.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{chunk-H3EIEWGR.js.map → chunk-FL4D53ND.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{chunk-WUJQK4YV.js.map → chunk-FVNWHUME.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{chunk-INU6DKT5.js.map → chunk-FXFCFL73.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{chunk-QEHQ2GVG.js.map → chunk-FY4RLHSC.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{chunk-EACOH7AU.js.map → chunk-FZGM3PNA.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{chunk-FNSPG7MU.js.map → chunk-G6KM4YKY.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{chunk-AHVTB5I5.js.map → chunk-G6MYGULG.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{chunk-TSMHDIW4.js.map → chunk-GLZKZON6.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{chunk-2JKGO6QX.js.map → chunk-H5IOT54C.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{chunk-SELVXEZK.js.map → chunk-HO4DLBNK.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{chunk-3CLU2XZO.js.map → chunk-HSYV4ZYT.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{chunk-CRVF2JDM.js.map → chunk-HXVHBERL.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{chunk-NU3IMIEA.js.map → chunk-I7DIDUSP.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{chunk-2NCIPMQP.js.map → chunk-I7GY4X6Y.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{chunk-JYFOV7FC.js.map → chunk-IE5KRAKN.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{chunk-UY2ACEMF.js.map → chunk-ILVOOAT4.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{chunk-GOSLKLFE.js.map → chunk-KH6QAHME.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{chunk-J6EY5V4N.js.map → chunk-KOEZCHRF.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{chunk-WQPUU7XD.js.map → chunk-L337QKWJ.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{chunk-LSG2U345.js.map → chunk-L6FVNR7X.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{chunk-FMBNM2EN.js.map → chunk-LSOWTLEM.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{chunk-4223PVZT.js.map → chunk-M7MVOKVV.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{chunk-BKVG6XOA.js.map → chunk-MSGETE6I.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{chunk-3WM75PWC.js.map → chunk-N33FD2UI.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{chunk-UFXU44HV.js.map → chunk-N7I2DGLP.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{chunk-6S3YSUYG.js.map → chunk-NNANAWFH.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{chunk-IJIICKVW.js.map → chunk-NTRQLE2R.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{chunk-SDQLJWBO.js.map → chunk-NVZ6NVHJ.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{chunk-H2Z3FYXQ.js.map → chunk-OWP6QFBV.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{chunk-Q7A43DS4.js.map → chunk-P22HGFFI.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{chunk-NLDFBC6J.js.map → chunk-P56LKFQX.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{chunk-NVPZIJVR.js.map → chunk-PT7MCCGD.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{chunk-P74IZQ7A.js.map → chunk-QKVVV6QO.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{chunk-QIPLHNP7.js.map → chunk-QWBKN3QC.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{chunk-7PIWCHTW.js.map → chunk-R5XTTZSJ.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{chunk-JOUQZENX.js.map → chunk-RC4UOUXA.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{chunk-BEP7WJA2.js.map → chunk-RGMWJLXF.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{chunk-NP22ERDF.js.map → chunk-RTBX3C4C.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{chunk-7Z4LKRS4.js.map → chunk-SPFZV2GR.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{chunk-ULTHRDBP.js.map → chunk-TM5CIO3F.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{chunk-YAROI3PD.js.map → chunk-V7MP6YTN.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{chunk-OW4JWD5M.js.map → chunk-VAHZIPWS.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{chunk-DYH63FX7.js.map → chunk-VE6ZSTQW.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{chunk-3AUGG2DP.js.map → chunk-W5E2UUSH.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{chunk-UOHFKBUV.js.map → chunk-WL3SS45P.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{chunk-QKJGPFAF.js.map → chunk-WU3KAN6A.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{chunk-IA5FKNII.js.map → chunk-X2MGQMZO.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{chunk-TD3LVC7D.js.map → chunk-X5YCTFKT.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{chunk-B7PE22W6.js.map → chunk-XC2HEEOV.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{chunk-J5AOEGDC.js.map → chunk-XNPMDSQQ.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{chunk-K2X6U4UA.js.map → chunk-XXLXJL7V.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{chunk-RLCHOOHC.js.map → chunk-YJSURTBB.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{chunk-PGY23YTC.js.map → chunk-YKFHF37B.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{chunk-JFTKLTEF.js.map → chunk-YQCWK2MB.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{chunk-EYLCSJAI.js.map → chunk-YQEZWI3R.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{close-W6LI2PKM.js.map → close-BEP7MHF3.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{close-CWODTPKG.js.map → close-Y6QFUJQN.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{close-many-CQFUY7MR.js.map → close-many-JJFW7KTT.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{close-many-DLDDVSH5.js.map → close-many-QJ6FKJUE.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{comments-E3TNTK24.js.map → comments-2AOZQ5D2.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{comments-WGLHR7LB.js.map → comments-TMHMALA5.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{copy-LXVDXH7B.js.map → copy-FWQA5OU4.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{copy-Q5ZJPUKR.js.map → copy-N3LCQBMC.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{create-LBVCYMEG.js.map → create-AQ5SIGZC.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{create-J5U6ND4K.js.map → create-KOGQ3JKD.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{delete-WNHB3LYW.js.map → delete-6G3MBZ6S.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{delete-PMJBNY5G.js.map → delete-YYYFOSEA.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{deps-OA26IS25.js.map → deps-5NC4IZH7.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{deps-JZ7TMVCB.js.map → deps-EVTOQMKW.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{docs-FEWB2DQB.js.map → docs-53NUGMIQ.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{docs-HA2AIDBB.js.map → docs-OWRGDMNY.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{files-EFIWKFTM.js.map → files-3PXGXYDB.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{files-6YFBJRBG.js.map → files-EGLKHD7O.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{focus-POIW5LTJ.js.map → focus-KZLIA6WS.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{focus-4QJR7FOQ.js.map → focus-SRPASFTN.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{history-compact-CKRPDTJN.js.map → history-compact-G4DULDCX.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{history-compact-FWG2C7FZ.js.map → history-compact-HHIUOMZ7.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{history-redact-BB3TGDAE.js.map → history-redact-IUSJ6X3E.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{history-redact-D225BHOZ.js.map → history-redact-THHGRQXV.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{history-repair-6GEAM7HE.js.map → history-repair-KG7SWXI6.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{history-repair-RQXKQHL4.js.map → history-repair-LUQWRS7X.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{learnings-JLNLCOL5.js.map → learnings-2MRNBFJF.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{learnings-RSNLSWDC.js.map → learnings-ZVHSALJY.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{notes-GB47XXQQ.js.map → notes-73JWKWUD.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{notes-2WDH6DXU.js.map → notes-BAKUL5DJ.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{plan-VDCJ2PCN.js.map → plan-AZPMCG37.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{plan-DOVI2VMW.js.map → plan-LEAGLPGP.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{profile-IVXQEL3D.js.map → profile-AGUKS52S.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{profile-FAU7NZML.js.map → profile-U2B6Y7GE.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{register-list-query-UL4UKBBN.js.map → register-list-query-A5KRJ5J2.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{register-list-query-DKA3EH5D.js.map → register-list-query-NEYP3TXO.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{register-mutation-RBBJ52DK.js.map → register-mutation-6LOPBAHC.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{register-mutation-ARFHRW55.js.map → register-mutation-GCZOALNJ.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{register-operations-ZIBBRSED.js.map → register-operations-6ZZIF27A.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{register-operations-ZUJ5JWPE.js.map → register-operations-REDIAEGI.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{register-setup-TDCGWIOS.js.map → register-setup-BHPMN5SK.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{register-setup-BCVLFEYS.js.map → register-setup-J3JS2ZVT.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{restore-25DLT2Q2.js.map → restore-E3PRGDN3.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{restore-YPMVUUEX.js.map → restore-KIUYTAEJ.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{schema-FNU3WE4O.js.map → schema-5JNFQFUW.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{schema-NBCM3RAD.js.map → schema-TMIW4XZC.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{update-WWBYOPXO.js.map → update-PQQHLYCC.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{update-XHSIAIXE.js.map → update-SA6AG23P.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{update-many-TA7NGQBO.js.map → update-many-RQVTFJPD.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{update-many-OUGIU5SF.js.map → update-many-TV3L3KBX.js.map} +0 -0
  507. /package/dist/{cli/commands → sdk/query}/search-pagination.d.ts +0 -0
  508. /package/dist/{cli/commands → sdk/query}/search-rendering.d.ts +0 -0
@@ -4,7 +4,7 @@
4
4
  * Implements the pm update many command surface and its agent-facing runtime behavior.
5
5
  */
6
6
 
7
- !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]="66fd8f1d-25f8-55fc-85ea-ea3000479f01")}catch(e){}}();
7
+ !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]="19acba6b-a459-52ce-b267-6f1d0db63265")}catch(e){}}();
8
8
  import { pathExists } from "../../core/fs/fs-utils.js";
9
9
  import { createCheckpointId, loadMutationCheckpoint, restoreCheckpointItems, writeMutationCheckpoint, } from "../../core/checkpoint/mutation-checkpoint.js";
10
10
  import { toItemRecord } from "../../core/item/item-record.js";
@@ -25,7 +25,7 @@ import { getSettingsPath, resolvePmRoot } from "../../core/store/paths.js";
25
25
  import { readSettings } from "../../core/store/settings.js";
26
26
  import { resolveAuthor } from "../../core/shared/author.js";
27
27
  import { hasListFilters } from "./list-filter-shared.js";
28
- import { runList } from "./list.js";
28
+ import { runList, } from "./list.js";
29
29
  import { runRestore } from "./restore.js";
30
30
  import { runUpdate } from "./update.js";
31
31
  const UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
@@ -213,7 +213,8 @@ const UNSET_FIELD_ALIASES = {
213
213
  "type-options": "type_options",
214
214
  tags: "tags",
215
215
  };
216
- function sanitizeUpdateOptionsForSummary(options) {
216
+ /** Removes execution-only options from the mutation summary persisted in checkpoints. */
217
+ const sanitizeUpdateOptionsForSummary = (options) => {
217
218
  const summary = {};
218
219
  for (const [key, value] of Object.entries(options)) {
219
220
  if (NON_MUTATION_UPDATE_OPTION_KEYS.has(key)) {
@@ -225,46 +226,61 @@ function sanitizeUpdateOptionsForSummary(options) {
225
226
  summary[key] = value;
226
227
  }
227
228
  return summary;
228
- }
229
- function hasAnyUpdateMutationInput(options) {
229
+ };
230
+ /** Reports whether an update-many request contains at least one mutation input. */
231
+ const hasAnyUpdateMutationInput = (options) => {
230
232
  return Object.keys(sanitizeUpdateOptionsForSummary(options)).length > 0;
231
- }
232
- function toComparablePreviewValue(optionKey, value) {
233
+ };
234
+ /** Trims string preview values while preserving non-string inputs. */
235
+ const trimPreviewValue = (value) => typeof value === "string" ? value.trim() : value;
236
+ /** Converts integer-like preview values to their storage representation. */
237
+ const normalizeIntegerPreviewValue = (value) => {
238
+ const trimmed = String(value).trim();
239
+ const parsed = Number(trimmed);
240
+ return Number.isInteger(parsed) ? parsed : trimmed;
241
+ };
242
+ /** Converts finite numeric preview values to their storage representation. */
243
+ const normalizeNumericPreviewValue = (value) => {
244
+ const trimmed = String(value).trim();
245
+ const parsed = Number(trimmed);
246
+ return Number.isFinite(parsed) ? parsed : trimmed;
247
+ };
248
+ /** Converts supported regression tokens to their boolean storage representation. */
249
+ const normalizeRegressionPreviewValue = (value) => {
250
+ const normalized = String(value).trim().toLowerCase();
251
+ const parsed = new Map([
252
+ ["true", true],
253
+ ["1", true],
254
+ ["false", false],
255
+ ["0", false],
256
+ ]).get(normalized);
257
+ return parsed ?? trimPreviewValue(value);
258
+ };
259
+ const PREVIEW_VALUE_NORMALIZERS = {
260
+ priority: normalizeIntegerPreviewValue,
261
+ estimatedMinutes: normalizeNumericPreviewValue,
262
+ order: normalizeNumericPreviewValue,
263
+ rank: normalizeNumericPreviewValue,
264
+ regression: normalizeRegressionPreviewValue,
265
+ };
266
+ /** Normalizes a CLI mutation value to the storage-shaped value used by previews. */
267
+ const toComparablePreviewValue = (optionKey, value) => {
233
268
  if (value === undefined) {
234
269
  return undefined;
235
270
  }
236
- if (optionKey === "priority") {
237
- const parsed = Number(String(value).trim());
238
- return Number.isInteger(parsed) ? parsed : String(value).trim();
239
- }
240
- if (optionKey === "estimatedMinutes" ||
241
- optionKey === "order" ||
242
- optionKey === "rank") {
243
- const parsed = Number(String(value).trim());
244
- return Number.isFinite(parsed) ? parsed : String(value).trim();
245
- }
246
- if (optionKey === "regression") {
247
- const normalized = String(value).trim().toLowerCase();
248
- if (normalized === "true" || normalized === "1") {
249
- return true;
250
- }
251
- if (normalized === "false" || normalized === "0") {
252
- return false;
253
- }
254
- }
255
- if (typeof value === "string") {
256
- return value.trim();
257
- }
258
- return value;
259
- }
260
- function normalizeUnsetField(rawField) {
271
+ return (PREVIEW_VALUE_NORMALIZERS[optionKey] ?? trimPreviewValue)(value);
272
+ };
273
+ /** Resolves user-facing unset aliases to stored metadata keys. */
274
+ const normalizeUnsetField = (rawField) => {
261
275
  const normalized = rawField.trim().toLowerCase().replaceAll("-", "_");
262
276
  return UNSET_FIELD_ALIASES[normalized] ?? normalized;
263
- }
264
- function areValuesEqual(left, right) {
277
+ };
278
+ /** Compares preview values using the canonical stable serialization contract. */
279
+ const areValuesEqual = (left, right) => {
265
280
  return stableValueEquals(left, right);
266
- }
267
- function normalizeCollectionBeforeValue(field, value) {
281
+ };
282
+ /** Supplies the storage-shaped empty value for an absent collection field. */
283
+ const normalizeCollectionBeforeValue = (field, value) => {
268
284
  if (value !== undefined) {
269
285
  return value;
270
286
  }
@@ -272,8 +288,9 @@ function normalizeCollectionBeforeValue(field, value) {
272
288
  return {};
273
289
  }
274
290
  return [];
275
- }
276
- function collectionValueCount(field, value) {
291
+ };
292
+ /** Counts entries in list and type-option collection values. */
293
+ const collectionValueCount = (field, value) => {
277
294
  if (Array.isArray(value)) {
278
295
  return value.length;
279
296
  }
@@ -281,67 +298,83 @@ function collectionValueCount(field, value) {
281
298
  return Object.keys(value).length;
282
299
  }
283
300
  return 0;
284
- }
285
- function buildCollectionMutationPlans(row, update) {
301
+ };
302
+ /** Resolves the dominant collection mutation using apply-path precedence. */
303
+ const resolveCollectionMutationOperation = (params) => {
304
+ if (params.replace) {
305
+ return "replace";
306
+ }
307
+ if (params.clear) {
308
+ return "clear_or_reset";
309
+ }
310
+ return params.removeCount > 0 ? "merge_remove" : "append";
311
+ };
312
+ /** Reads an optional definition key without indexing through undefined. */
313
+ const readOptionalUpdateValue = (update, key) => (key === undefined ? undefined : update[key]);
314
+ /** Counts array-shaped mutation inputs while treating other shapes as empty. */
315
+ const updateArrayValueCount = (value) => Array.isArray(value) ? value.length : 0;
316
+ /** Builds one collection plan when its definition has an active mutation. */
317
+ const buildCollectionMutationPlan = (definition, row, update) => {
318
+ const addValues = update[definition.addKey];
319
+ const removeValues = readOptionalUpdateValue(update, definition.removeKey);
320
+ const addCount = updateArrayValueCount(addValues);
321
+ const removeCount = updateArrayValueCount(removeValues);
322
+ const clear = update[definition.clearKey] === true;
323
+ const replace = readOptionalUpdateValue(update, definition.replaceKey) === true;
324
+ if (![clear, replace, addCount > 0, removeCount > 0].includes(true)) {
325
+ return undefined;
326
+ }
327
+ const before = normalizeCollectionBeforeValue(definition.field, row[definition.field]);
328
+ return {
329
+ field: definition.field,
330
+ before,
331
+ after: {
332
+ operation: resolveCollectionMutationOperation({
333
+ replace,
334
+ clear,
335
+ removeCount,
336
+ }),
337
+ clear,
338
+ replace,
339
+ add_count: addCount,
340
+ remove_count: removeCount,
341
+ before_count: collectionValueCount(definition.field, before),
342
+ },
343
+ };
344
+ };
345
+ /** Builds collection mutation previews for every active collection option. */
346
+ const buildCollectionMutationPlans = (row, update) => {
286
347
  const changes = [];
287
348
  for (const definition of COLLECTION_MUTATION_PLAN_DEFINITIONS) {
288
- const addValues = update[definition.addKey];
289
- const removeValues = definition.removeKey
290
- ? update[definition.removeKey]
291
- : undefined;
292
- const addCount = Array.isArray(addValues) ? addValues.length : 0;
293
- const removeCount = Array.isArray(removeValues) ? removeValues.length : 0;
294
- const clear = update[definition.clearKey] === true;
295
- const replace = definition.replaceKey
296
- ? update[definition.replaceKey] === true
297
- : false;
298
- if (!clear && !replace && addCount === 0 && removeCount === 0) {
299
- continue;
349
+ const plan = buildCollectionMutationPlan(definition, row, update);
350
+ if (plan !== undefined) {
351
+ changes.push(plan);
300
352
  }
301
- const before = normalizeCollectionBeforeValue(definition.field, row[definition.field]);
302
- const beforeCount = collectionValueCount(definition.field, before);
303
- const operation = replace
304
- ? "replace"
305
- : clear
306
- ? "clear_or_reset"
307
- : removeCount > 0
308
- ? "merge_remove"
309
- : "append";
310
- changes.push({
311
- field: definition.field,
312
- before,
313
- after: {
314
- operation,
315
- clear,
316
- replace,
317
- add_count: addCount,
318
- remove_count: removeCount,
319
- before_count: beforeCount,
320
- },
321
- });
322
353
  }
323
354
  return changes;
324
- }
325
- function normalizeExistingTags(value) {
355
+ };
356
+ /** Keeps only string tags from an existing storage value. */
357
+ const normalizeExistingTags = (value) => {
326
358
  if (!Array.isArray(value)) {
327
359
  return [];
328
360
  }
329
361
  return value.filter((tag) => typeof tag === "string");
330
- }
362
+ };
331
363
  // Tags support three mutation modes that compose: --tags replaces, --add-tags
332
364
  // extends, --remove-tags prunes. Replicate runUpdate's resolution order so the
333
365
  // dry-run preview and the apply-mode actionable detection both account for
334
366
  // additive/subtractive tag mutations (a --add-tags-only update must NOT be
335
367
  // treated as a no-op skip).
336
- function buildTagMutationPlan(row, update) {
337
- const hasReplace = update.tags !== undefined;
338
- const hasAdd = Array.isArray(update.addTags) && update.addTags.length > 0;
339
- const hasRemove = Array.isArray(update.removeTags) && update.removeTags.length > 0;
340
- if (!hasReplace && !hasAdd && !hasRemove) {
368
+ const buildTagMutationPlan = (row, update) => {
369
+ if (![
370
+ update.tags !== undefined,
371
+ updateArrayValueCount(update.addTags) > 0,
372
+ updateArrayValueCount(update.removeTags) > 0,
373
+ ].includes(true)) {
341
374
  return undefined;
342
375
  }
343
376
  const existing = normalizeExistingTags(row.tags);
344
- const baseTags = hasReplace ? parseTags(update.tags) : existing;
377
+ const baseTags = update.tags === undefined ? existing : parseTags(update.tags);
345
378
  const withAdditions = mergeAdditiveTags(baseTags, update.addTags);
346
379
  const after = applyTagRemovals(withAdditions, update.removeTags)
347
380
  .slice()
@@ -351,64 +384,60 @@ function buildTagMutationPlan(row, update) {
351
384
  return undefined;
352
385
  }
353
386
  return { field: "tags", before: existing, after };
354
- }
355
- function buildPlannedItemDiff(item, update = {}, runtimeFieldRegistry) {
356
- const safeUpdate = update;
357
- const row = toItemRecord(item);
358
- const changes = [];
359
- const tagPlan = buildTagMutationPlan(row, safeUpdate);
360
- if (tagPlan) {
361
- changes.push(tagPlan);
362
- }
387
+ };
388
+ /** Adds changed scalar options to a planned item diff. */
389
+ const appendScalarMutationPlans = (changes, row, update) => {
363
390
  for (const [optionKey, itemKey] of Object.entries(UPDATE_OPTION_TO_ITEM_KEY)) {
364
- const candidate = safeUpdate[optionKey];
391
+ const candidate = update[optionKey];
365
392
  if (candidate === undefined) {
366
393
  continue;
367
394
  }
368
395
  const before = row[itemKey];
369
396
  const after = toComparablePreviewValue(optionKey, candidate);
370
- if (areValuesEqual(before, after)) {
371
- continue;
397
+ if (!areValuesEqual(before, after)) {
398
+ changes.push({ field: itemKey, before, after });
372
399
  }
373
- changes.push({
374
- field: itemKey,
375
- before,
376
- after,
377
- });
378
400
  }
379
- changes.push(...buildCollectionMutationPlans(row, safeUpdate));
380
- const runtimeFieldUpdates = collectRuntimeUpdateFieldValues(safeUpdate, runtimeFieldRegistry, ["update_many"]);
381
- for (const [fieldKey, fieldValue] of Object.entries(runtimeFieldUpdates)) {
382
- const before = row[fieldKey];
383
- if (areValuesEqual(before, fieldValue)) {
384
- continue;
401
+ };
402
+ /** Adds changed runtime-schema fields to a planned item diff. */
403
+ const appendRuntimeFieldMutationPlans = (changes, row, update, runtimeFieldRegistry) => {
404
+ const runtimeFieldUpdates = collectRuntimeUpdateFieldValues(update, runtimeFieldRegistry, ["update_many"]);
405
+ for (const [field, after] of Object.entries(runtimeFieldUpdates)) {
406
+ const before = row[field];
407
+ if (!areValuesEqual(before, after)) {
408
+ changes.push({ field, before, after });
385
409
  }
386
- changes.push({
387
- field: fieldKey,
388
- before,
389
- after: fieldValue,
390
- });
391
410
  }
392
- if (safeUpdate.unset && safeUpdate.unset.length > 0) {
393
- for (const rawUnsetField of safeUpdate.unset) {
394
- const field = normalizeUnsetField(rawUnsetField);
395
- const before = row[field];
396
- if (before === undefined) {
397
- continue;
398
- }
399
- changes.push({
400
- field,
401
- before,
402
- after: null,
403
- });
411
+ };
412
+ /** Adds present fields requested through unset options to a planned item diff. */
413
+ const appendUnsetMutationPlans = (changes, row, unset) => {
414
+ for (const rawUnsetField of unset ?? []) {
415
+ const field = normalizeUnsetField(rawUnsetField);
416
+ const before = row[field];
417
+ if (before !== undefined) {
418
+ changes.push({ field, before, after: null });
404
419
  }
405
420
  }
421
+ };
422
+ /** Builds the complete storage-shaped mutation preview for one item. */
423
+ const buildPlannedItemDiff = (item, runtimeFieldRegistry, update = {}) => {
424
+ const row = toItemRecord(item);
425
+ const changes = [];
426
+ const tagPlan = buildTagMutationPlan(row, update);
427
+ if (tagPlan) {
428
+ changes.push(tagPlan);
429
+ }
430
+ appendScalarMutationPlans(changes, row, update);
431
+ changes.push(...buildCollectionMutationPlans(row, update));
432
+ appendRuntimeFieldMutationPlans(changes, row, update, runtimeFieldRegistry);
433
+ appendUnsetMutationPlans(changes, row, update.unset);
406
434
  return {
407
435
  id: item.id,
408
436
  changes,
409
437
  };
410
- }
411
- function normalizeStatusFilter(value, statusRegistry) {
438
+ };
439
+ /** Normalizes an optional list status against the runtime schema. */
440
+ const normalizeStatusFilter = (value, statusRegistry) => {
412
441
  if (value === undefined) {
413
442
  return undefined;
414
443
  }
@@ -418,44 +447,55 @@ function normalizeStatusFilter(value, statusRegistry) {
418
447
  throw new PmCliError(`Invalid --filter-status value "${value}". Allowed: ${allowedStatuses.join(", ")}`, EXIT_CODE.USAGE);
419
448
  }
420
449
  return normalized;
421
- }
422
- function rejectBlankIdsFilter(list) {
450
+ };
451
+ /** Rejects an explicitly blank bulk ID filter before loading the corpus. */
452
+ const rejectBlankIdsFilter = (list) => {
423
453
  if (list?.ids != null && String(list.ids).trim().length === 0) {
424
454
  throw new PmCliError("--ids requires at least one non-empty item ID", EXIT_CODE.USAGE);
425
455
  }
426
- }
427
- // GH-256: validate planned scalar enum/format fields up front so a `--dry-run`
428
- // preview rejects globally-invalid values exactly as apply would (true
429
- // preview==apply parity), and so apply itself fails fast before creating an
430
- // orphan checkpoint. Only VALUE/ENUM/FORMAT correctness is checked here — these
431
- // are invalid regardless of the matched item. Per-item governance and
432
- // workflow-transition rules stay in the apply path (runUpdate). Each field is
433
- // validated only when the caller actually provided it, reusing the exact same
434
- // resolvers and error messages runUpdate raises so single/bulk/dry-run stay
435
- // consistent.
436
- function assertPlannedUpdateValuesValid(update, settings, statusRegistry, pmRoot) {
437
- if (update.priority !== undefined) {
438
- resolvePriority(update.priority);
439
- }
440
- if (update.type !== undefined) {
456
+ };
457
+ const PLANNED_UPDATE_VALIDATORS = [
458
+ ({ update }) => {
459
+ if (update.priority !== undefined) {
460
+ resolvePriority(update.priority);
461
+ }
462
+ },
463
+ ({ update, settings, pmRoot }) => {
464
+ if (update.type === undefined) {
465
+ return;
466
+ }
441
467
  const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
442
468
  if (!resolveTypeName(update.type, typeRegistry)) {
443
469
  throw new PmCliError(buildInvalidTypeError(update.type, typeRegistry.types, resolveItemTypesFilePath(pmRoot, settings.schema)), EXIT_CODE.USAGE);
444
470
  }
471
+ },
472
+ ({ update, statusRegistry }) => {
473
+ if (update.status !== undefined &&
474
+ !normalizeStatusInput(update.status, statusRegistry)) {
475
+ const allowedStatuses = statusRegistry.definitions.map((definition) => definition.id);
476
+ throw new PmCliError(`Invalid --status value "${update.status}". Allowed: ${allowedStatuses.join(", ")}`, EXIT_CODE.USAGE);
477
+ }
478
+ },
479
+ ({ update }) => {
480
+ if (update.deadline !== undefined) {
481
+ resolveIsoOrRelative(update.deadline, new Date(), "deadline");
482
+ }
483
+ },
484
+ ({ update }) => {
485
+ if (update.estimatedMinutes !== undefined) {
486
+ parseOptionalNonNegativeInteger(update.estimatedMinutes, "estimated-minutes");
487
+ }
488
+ },
489
+ ];
490
+ /** Validates globally invalid mutation values before preview or checkpoint work. */
491
+ const assertPlannedUpdateValuesValid = (update, settings, statusRegistry, pmRoot) => {
492
+ const context = { update, settings, statusRegistry, pmRoot };
493
+ for (const validate of PLANNED_UPDATE_VALIDATORS) {
494
+ validate(context);
445
495
  }
446
- if (update.status !== undefined &&
447
- !normalizeStatusInput(update.status, statusRegistry)) {
448
- const allowedStatuses = statusRegistry.definitions.map((definition) => definition.id);
449
- throw new PmCliError(`Invalid --status value "${update.status}". Allowed: ${allowedStatuses.join(", ")}`, EXIT_CODE.USAGE);
450
- }
451
- if (update.deadline !== undefined) {
452
- resolveIsoOrRelative(update.deadline, new Date(), "deadline");
453
- }
454
- if (update.estimatedMinutes !== undefined) {
455
- parseOptionalNonNegativeInteger(update.estimatedMinutes, "estimated-minutes");
456
- }
457
- }
458
- async function runUpdateManyRollback(params) {
496
+ };
497
+ /** Restores every item captured by an update-many checkpoint. */
498
+ const runUpdateManyRollback = async (params) => {
459
499
  const checkpoint = await loadMutationCheckpoint(params.pmRoot, UPDATE_MANY_CHECKPOINT_SUBDIR, params.rollbackId, UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION);
460
500
  const restoreMessage = params.options.update?.message ??
461
501
  `Rollback update-many checkpoint ${checkpoint.id}`;
@@ -480,8 +520,9 @@ async function runUpdateManyRollback(params) {
480
520
  rows: rollback.rows,
481
521
  ids: rollback.restored_ids,
482
522
  };
483
- }
484
- async function writeUpdateManyCheckpoint(params) {
523
+ };
524
+ /** Persists an apply checkpoint and returns its user-facing descriptor. */
525
+ const writeUpdateManyCheckpoint = async (params) => {
485
526
  const checkpointPayload = {
486
527
  schema_version: UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION,
487
528
  id: params.checkpointId,
@@ -499,108 +540,103 @@ async function writeUpdateManyCheckpoint(params) {
499
540
  path: checkpointPath,
500
541
  rollback_command: `pm update-many --rollback ${params.checkpointId}`,
501
542
  };
502
- }
503
- /** Implements run update many for the public runtime surface of this module. */
504
- export async function runUpdateMany(options, global) {
543
+ };
544
+ /** Loads tracker settings and runtime registries for update-many execution. */
545
+ const loadUpdateManyRuntimeContext = async (global) => {
505
546
  const pmRoot = resolvePmRoot(process.cwd(), global.path);
506
547
  if (!(await pathExists(getSettingsPath(pmRoot)))) {
507
548
  throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
508
549
  }
509
550
  const settings = await readSettings(pmRoot);
510
- const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
511
- const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);
512
- const dryRun = options.dryRun === true;
513
- const rollbackId = typeof options.rollback === "string" ? options.rollback : undefined;
514
- const updateSummary = sanitizeUpdateOptionsForSummary(options.update);
515
- rejectBlankIdsFilter(options.list);
516
- if (rollbackId) {
517
- if (dryRun) {
518
- throw new PmCliError("--dry-run cannot be combined with --rollback", EXIT_CODE.USAGE);
519
- }
520
- if (hasListFilters(options.list, options.status)) {
521
- throw new PmCliError("Rollback mode does not accept filter options", EXIT_CODE.USAGE);
522
- }
523
- if (Object.keys(updateSummary).length > 0) {
524
- throw new PmCliError("Rollback mode does not accept update mutation flags", EXIT_CODE.USAGE);
525
- }
526
- return runUpdateManyRollback({ pmRoot, rollbackId, options, global });
527
- }
528
- if (!hasAnyUpdateMutationInput(options.update)) {
529
- throw new PmCliError(`No update-many mutation flags provided. Add at least one mutation flag (for example: ${UPDATE_MANY_MUTATION_FLAG_GUIDANCE}).`, EXIT_CODE.USAGE);
530
- }
531
- // GH-256: validate planned scalar values before listing/checkpointing so
532
- // dry-run previews and apply both reject globally-invalid enum/format input.
533
- assertPlannedUpdateValuesValid(options.update, settings, statusRegistry, pmRoot);
534
- const statusFilter = normalizeStatusFilter(options.status, statusRegistry);
535
- const listed = await runList(statusFilter, { ...options.list, includeBody: true }, global);
536
- const planned = listed.items.map((item) => buildPlannedItemDiff(item, options.update, runtimeFieldRegistry));
537
- const actionable = planned.filter((row) => row.changes.length > 0);
538
- if (dryRun) {
539
- return {
540
- mode: "dry_run",
541
- matched_count: listed.items.length,
542
- dry_run: true,
543
- filters: listed.filters,
544
- planned_update_options: updateSummary,
545
- item_plans: planned,
546
- ids: [],
547
- };
548
- }
549
- if (actionable.length === 0) {
550
- return {
551
- mode: "apply",
552
- matched_count: listed.items.length,
553
- dry_run: false,
554
- filters: listed.filters,
555
- planned_update_options: updateSummary,
556
- updated_count: 0,
557
- skipped_count: listed.items.length,
558
- failed_count: 0,
559
- rows: planned.map((row) => ({
560
- id: row.id,
561
- status: "skipped",
562
- })),
563
- ids: [],
564
- };
565
- }
566
- const nowValue = nowIso();
567
- const checkpointId = createCheckpointId(UPDATE_MANY_CHECKPOINT_SUBDIR, nowValue);
568
- const checkpointEnabled = options.checkpoint !== false;
569
- const checkpointItems = listed.items
570
- .filter((item) => actionable.some((candidate) => candidate.id === item.id))
571
- .map((item) => ({
572
- id: item.id,
573
- target_updated_at: item.updated_at,
574
- }));
575
- let checkpointInfo;
576
- if (checkpointEnabled) {
577
- checkpointInfo = await writeUpdateManyCheckpoint({
578
- pmRoot,
579
- checkpointId,
580
- nowValue,
581
- options,
582
- statusFilter,
583
- filters: listed.filters,
584
- updateSummary,
585
- checkpointItems,
586
- });
587
- }
588
- const applyRows = [];
551
+ return {
552
+ pmRoot,
553
+ settings,
554
+ statusRegistry: resolveRuntimeStatusRegistry(settings.schema),
555
+ runtimeFieldRegistry: resolveRuntimeFieldRegistry(settings.schema),
556
+ };
557
+ };
558
+ /** Validates rollback exclusivity before restoring a checkpoint. */
559
+ const runRequestedUpdateManyRollback = (params) => {
560
+ if (params.options.dryRun === true) {
561
+ throw new PmCliError("--dry-run cannot be combined with --rollback", EXIT_CODE.USAGE);
562
+ }
563
+ if (hasListFilters(params.options.list, params.options.status)) {
564
+ throw new PmCliError("Rollback mode does not accept filter options", EXIT_CODE.USAGE);
565
+ }
566
+ if (Object.keys(params.updateSummary).length > 0) {
567
+ throw new PmCliError("Rollback mode does not accept update mutation flags", EXIT_CODE.USAGE);
568
+ }
569
+ return runUpdateManyRollback({
570
+ pmRoot: params.runtime.pmRoot,
571
+ rollbackId: params.rollbackId,
572
+ options: params.options,
573
+ global: params.global,
574
+ });
575
+ };
576
+ /** Loads complete matching rows and derives their mutation previews. */
577
+ const buildUpdateManyPlan = async (params) => {
578
+ const statusFilter = normalizeStatusFilter(params.options.status, params.runtime.statusRegistry);
579
+ const listed = await runList(statusFilter, {
580
+ ...params.options.list,
581
+ compact: undefined,
582
+ brief: undefined,
583
+ fields: undefined,
584
+ includeBody: true,
585
+ full: true,
586
+ }, params.global);
587
+ const planned = listed.items.map((item) => buildPlannedItemDiff(item, params.runtime.runtimeFieldRegistry, params.options.update));
588
+ return {
589
+ listed,
590
+ planned,
591
+ actionable: planned.filter((row) => row.changes.length > 0),
592
+ updateSummary: params.updateSummary,
593
+ statusFilter,
594
+ };
595
+ };
596
+ /** Builds the non-mutating preview response for a prepared update-many plan. */
597
+ const buildUpdateManyDryRunResult = (plan) => ({
598
+ mode: "dry_run",
599
+ matched_count: plan.listed.items.length,
600
+ dry_run: true,
601
+ filters: plan.listed.filters,
602
+ planned_update_options: plan.updateSummary,
603
+ item_plans: plan.planned,
604
+ ids: [],
605
+ });
606
+ /** Builds the apply response for a plan whose rows are all already current. */
607
+ const buildUpdateManyNoopResult = (plan) => ({
608
+ mode: "apply",
609
+ matched_count: plan.listed.items.length,
610
+ dry_run: false,
611
+ filters: plan.listed.filters,
612
+ planned_update_options: plan.updateSummary,
613
+ updated_count: 0,
614
+ skipped_count: plan.listed.items.length,
615
+ failed_count: 0,
616
+ rows: plan.planned.map((row) => ({
617
+ id: row.id,
618
+ status: "skipped",
619
+ })),
620
+ ids: [],
621
+ });
622
+ /** Applies planned item updates independently while preserving per-row failures. */
623
+ const applyUpdateManyRows = async (params) => {
624
+ const rows = [];
589
625
  const updatedIds = [];
590
- const updateMessage = options.update.message ?? `update-many apply ${checkpointId}`;
591
- const actionableById = new Set(actionable.map((row) => row.id));
592
- for (const item of listed.items) {
626
+ const updateMessage = params.options.update.message ?? `update-many apply ${params.checkpointId}`;
627
+ const actionableById = new Set(params.actionable.map((row) => row.id));
628
+ for (const item of params.items) {
593
629
  if (!actionableById.has(item.id)) {
594
- applyRows.push({ id: item.id, status: "skipped" });
630
+ rows.push({ id: item.id, status: "skipped" });
595
631
  continue;
596
632
  }
597
633
  try {
598
634
  const result = await runUpdate(item.id, {
599
- ...options.update,
635
+ ...params.options.update,
600
636
  message: updateMessage,
601
637
  runtimeFieldCommands: ["update_many"],
602
- }, global);
603
- applyRows.push({
638
+ }, params.global);
639
+ rows.push({
604
640
  id: item.id,
605
641
  status: "updated",
606
642
  changed_fields: result.changed_fields,
@@ -609,30 +645,90 @@ export async function runUpdateMany(options, global) {
609
645
  updatedIds.push(item.id);
610
646
  }
611
647
  catch (error) {
612
- applyRows.push({
648
+ rows.push({
613
649
  id: item.id,
614
650
  status: "failed",
615
651
  error: toErrorMessage(error),
616
652
  });
617
653
  }
618
654
  }
619
- const updatedCount = applyRows.filter((row) => row.status === "updated").length;
620
- const skippedCount = applyRows.filter((row) => row.status === "skipped").length;
621
- const failedCount = applyRows.filter((row) => row.status === "failed").length;
655
+ return { rows, updatedIds };
656
+ };
657
+ /** Applies a prepared plan, checkpointing actionable rows when requested. */
658
+ const applyUpdateManyPlan = async (params) => {
659
+ if (params.plan.actionable.length === 0) {
660
+ return buildUpdateManyNoopResult(params.plan);
661
+ }
662
+ const nowValue = nowIso();
663
+ const checkpointId = createCheckpointId(UPDATE_MANY_CHECKPOINT_SUBDIR, nowValue);
664
+ const actionableById = new Set(params.plan.actionable.map((row) => row.id));
665
+ const checkpointItems = params.plan.listed.items
666
+ .filter((item) => actionableById.has(item.id))
667
+ .map((item) => ({ id: item.id, target_updated_at: item.updated_at }));
668
+ const checkpointInfo = params.options.checkpoint === false
669
+ ? undefined
670
+ : await writeUpdateManyCheckpoint({
671
+ pmRoot: params.runtime.pmRoot,
672
+ checkpointId,
673
+ nowValue,
674
+ options: params.options,
675
+ statusFilter: params.plan.statusFilter,
676
+ filters: params.plan.listed.filters,
677
+ updateSummary: params.plan.updateSummary,
678
+ checkpointItems,
679
+ });
680
+ const applied = await applyUpdateManyRows({
681
+ items: params.plan.listed.items,
682
+ actionable: params.plan.actionable,
683
+ options: params.options,
684
+ global: params.global,
685
+ checkpointId,
686
+ });
687
+ /** Counts apply rows with one terminal status. */
688
+ const countStatus = (status) => applied.rows.filter((row) => row.status === status).length;
622
689
  return {
623
690
  mode: "apply",
624
- matched_count: listed.items.length,
691
+ matched_count: params.plan.listed.items.length,
625
692
  dry_run: false,
626
- filters: listed.filters,
627
- planned_update_options: updateSummary,
693
+ filters: params.plan.listed.filters,
694
+ planned_update_options: params.plan.updateSummary,
628
695
  ...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),
629
- updated_count: updatedCount,
630
- skipped_count: skippedCount,
631
- failed_count: failedCount,
632
- rows: applyRows,
633
- ids: updatedIds,
696
+ updated_count: countStatus("updated"),
697
+ skipped_count: countStatus("skipped"),
698
+ failed_count: countStatus("failed"),
699
+ rows: applied.rows,
700
+ ids: applied.updatedIds,
634
701
  };
635
- }
702
+ };
703
+ /** Implements run update many for the public runtime surface of this module. */
704
+ export const runUpdateMany = async (options, global) => {
705
+ const runtime = await loadUpdateManyRuntimeContext(global);
706
+ const rollbackId = typeof options.rollback === "string" ? options.rollback : undefined;
707
+ const updateSummary = sanitizeUpdateOptionsForSummary(options.update);
708
+ rejectBlankIdsFilter(options.list);
709
+ if (rollbackId !== undefined) {
710
+ return runRequestedUpdateManyRollback({
711
+ runtime,
712
+ rollbackId,
713
+ options,
714
+ global,
715
+ updateSummary,
716
+ });
717
+ }
718
+ if (!hasAnyUpdateMutationInput(options.update)) {
719
+ throw new PmCliError(`No update-many mutation flags provided. Add at least one mutation flag (for example: ${UPDATE_MANY_MUTATION_FLAG_GUIDANCE}).`, EXIT_CODE.USAGE);
720
+ }
721
+ assertPlannedUpdateValuesValid(options.update, runtime.settings, runtime.statusRegistry, runtime.pmRoot);
722
+ const plan = await buildUpdateManyPlan({
723
+ options,
724
+ global,
725
+ runtime,
726
+ updateSummary,
727
+ });
728
+ return options.dryRun === true
729
+ ? buildUpdateManyDryRunResult(plan)
730
+ : applyUpdateManyPlan({ runtime, options, global, plan });
731
+ };
636
732
  /** Public contract for test only update many command, shared by SDK and presentation-layer consumers. */
637
733
  export const _testOnlyUpdateManyCommand = {
638
734
  assertPlannedUpdateValuesValid,
@@ -651,4 +747,4 @@ export const _testOnlyUpdateManyCommand = {
651
747
  toComparablePreviewValue,
652
748
  };
653
749
  //# sourceMappingURL=update-many.js.map
654
- //# debugId=66fd8f1d-25f8-55fc-85ea-ea3000479f01
750
+ //# debugId=19acba6b-a459-52ce-b267-6f1d0db63265