@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
@@ -0,0 +1,92 @@
1
+ import type { GlobalOptions } from "../../core/shared/command-types.js";
2
+ import { type BackgroundLogStream, type BackgroundTestRunKind, type BackgroundTestRunStatus } from "../../core/test/background-runs.js";
3
+ /** Documents the start background run command options payload exchanged by command, SDK, and package integrations. */
4
+ export interface StartBackgroundRunCommandOptions {
5
+ /** Value that configures or reports kind for this contract. */
6
+ kind: BackgroundTestRunKind;
7
+ /** Value that configures or reports command args for this contract. */
8
+ commandArgs: string[];
9
+ /** Value that configures or reports target id for this contract. */
10
+ targetId?: string;
11
+ /** Value that configures or reports status filter for this contract. */
12
+ statusFilter?: string;
13
+ /** Value that configures or reports author for this contract. */
14
+ author?: string;
15
+ /** Value that configures or reports no extensions for this contract. */
16
+ noExtensions?: boolean;
17
+ }
18
+ /** Documents the start background run result payload exchanged by command, SDK, and package integrations. */
19
+ export interface StartBackgroundRunResult {
20
+ /** Value that configures or reports started for this contract. */
21
+ started: boolean;
22
+ /** Value that configures or reports duplicate of for this contract. */
23
+ duplicate_of?: string;
24
+ /** Value that configures or reports run for this contract. */
25
+ run: unknown;
26
+ }
27
+ /** Implements run start background run for the public runtime surface of this module. */
28
+ export declare function runStartBackgroundRun(options: StartBackgroundRunCommandOptions, global: GlobalOptions): Promise<StartBackgroundRunResult>;
29
+ /** Documents the test runs list command options payload exchanged by command, SDK, and package integrations. */
30
+ export interface TestRunsListCommandOptions {
31
+ /** Lifecycle state reported for status. */
32
+ status?: string;
33
+ /** Value that configures or reports limit for this contract. */
34
+ limit?: string;
35
+ }
36
+ /** Implements run test runs list for the public runtime surface of this module. */
37
+ export declare function runTestRunsList(options: TestRunsListCommandOptions, global: GlobalOptions): Promise<{
38
+ runs: unknown[];
39
+ count: number;
40
+ filters: {
41
+ status?: BackgroundTestRunStatus;
42
+ limit?: number;
43
+ };
44
+ }>;
45
+ /** Implements run test runs status for the public runtime surface of this module. */
46
+ export declare function runTestRunsStatus(runId: string, global: GlobalOptions): Promise<{
47
+ run: unknown;
48
+ health: unknown;
49
+ }>;
50
+ /** Documents the test runs logs command options payload exchanged by command, SDK, and package integrations. */
51
+ export interface TestRunsLogsCommandOptions {
52
+ /** Value that configures or reports stream for this contract. */
53
+ stream?: string;
54
+ /** Value that configures or reports tail for this contract. */
55
+ tail?: string;
56
+ }
57
+ /** Implements run test runs logs for the public runtime surface of this module. */
58
+ export declare function runTestRunsLogs(runId: string, options: TestRunsLogsCommandOptions, global: GlobalOptions): Promise<{
59
+ run: unknown;
60
+ stream: BackgroundLogStream;
61
+ tail: number;
62
+ stdout: string[];
63
+ stderr: string[];
64
+ }>;
65
+ /** Documents the test runs stop command options payload exchanged by command, SDK, and package integrations. */
66
+ export interface TestRunsStopCommandOptions {
67
+ /** Value that configures or reports force for this contract. */
68
+ force?: boolean;
69
+ }
70
+ /** Implements run test runs stop for the public runtime surface of this module. */
71
+ export declare function runTestRunsStop(runId: string, options: TestRunsStopCommandOptions, global: GlobalOptions): Promise<{
72
+ run: unknown;
73
+ signal_sent: "SIGTERM" | "SIGKILL" | "none";
74
+ }>;
75
+ /** Documents the test runs resume command options payload exchanged by command, SDK, and package integrations. */
76
+ export interface TestRunsResumeCommandOptions {
77
+ /** Value that configures or reports author for this contract. */
78
+ author?: string;
79
+ /** Value that configures or reports no extensions for this contract. */
80
+ noExtensions?: boolean;
81
+ }
82
+ /** Implements run test runs resume for the public runtime surface of this module. */
83
+ export declare function runTestRunsResume(runId: string, options: TestRunsResumeCommandOptions, global: GlobalOptions): Promise<{
84
+ resumed_from: string;
85
+ run: unknown;
86
+ }>;
87
+ /** Implements run test runs worker for the public runtime surface of this module. */
88
+ export declare function runTestRunsWorker(runId: string, global: GlobalOptions): Promise<{
89
+ id: string;
90
+ status: BackgroundTestRunStatus;
91
+ exit_code?: number;
92
+ }>;
@@ -0,0 +1,195 @@
1
+ /**
2
+ * @module sdk/test/runs
3
+ *
4
+ * Implements the pm test runs command surface and its agent-facing runtime behavior.
5
+ */
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]="2c42bfb9-c598-5a6e-bfff-0c073bb44205")}catch(e){}}();
8
+ import os from "node:os";
9
+ import { pathExists } from "../../core/fs/fs-utils.js";
10
+ import { EXIT_CODE } from "../../core/shared/constants.js";
11
+ import { PmCliError } from "../../core/shared/errors.js";
12
+ import { getBackgroundTestRunStatus, listBackgroundTestRuns, readBackgroundTestRunLogs, resumeBackgroundTestRun, runBackgroundTestRunWorker, spawnBackgroundTestRunWorker, startBackgroundTestRun, stopBackgroundTestRun, } from "../../core/test/background-runs.js";
13
+ import { getSettingsPath, resolveGlobalPmRoot, resolvePmRoot, } from "../../core/store/paths.js";
14
+ import { readSettings } from "../../core/store/settings.js";
15
+ import { parseLimit } from "../../core/shared/numeric-parsers.js";
16
+ const BACKGROUND_STATUS_VALUES = [
17
+ "queued",
18
+ "running",
19
+ "passed",
20
+ "failed",
21
+ "stopped",
22
+ "canceled",
23
+ ];
24
+ const BACKGROUND_STREAM_VALUES = [
25
+ "stdout",
26
+ "stderr",
27
+ "both",
28
+ ];
29
+ function normalizeStatus(value) {
30
+ if (value === undefined) {
31
+ return undefined;
32
+ }
33
+ const normalized = value.trim().toLowerCase();
34
+ if (BACKGROUND_STATUS_VALUES.includes(normalized)) {
35
+ return normalized;
36
+ }
37
+ throw new PmCliError(`Invalid --status value "${value}"`, EXIT_CODE.USAGE);
38
+ }
39
+ function normalizeStream(value) {
40
+ if (value === undefined || value.trim().length === 0) {
41
+ return "stderr";
42
+ }
43
+ const normalized = value.trim().toLowerCase();
44
+ if (BACKGROUND_STREAM_VALUES.includes(normalized)) {
45
+ return normalized;
46
+ }
47
+ throw new PmCliError(`Invalid --stream value "${value}"`, EXIT_CODE.USAGE);
48
+ }
49
+ function resolveWhoamiFallback() {
50
+ try {
51
+ const username = os.userInfo().username.trim();
52
+ if (username.length > 0) {
53
+ return username;
54
+ }
55
+ }
56
+ catch {
57
+ // Fall back to environment-derived attribution.
58
+ }
59
+ return undefined;
60
+ }
61
+ function resolveRequestedBy(author, fallback) {
62
+ const candidates = [
63
+ author,
64
+ process.env.PM_AUTHOR,
65
+ fallback,
66
+ process.env.USER,
67
+ process.env.LOGNAME,
68
+ process.env.USERNAME,
69
+ resolveWhoamiFallback(),
70
+ ];
71
+ for (const candidate of candidates) {
72
+ if (typeof candidate !== "string") {
73
+ continue;
74
+ }
75
+ const trimmed = candidate.trim();
76
+ if (trimmed.length > 0) {
77
+ return trimmed;
78
+ }
79
+ }
80
+ return "unknown";
81
+ }
82
+ async function ensureInitialized(pmRoot) {
83
+ if (!(await pathExists(getSettingsPath(pmRoot)))) {
84
+ throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
85
+ }
86
+ }
87
+ /** Implements run start background run for the public runtime surface of this module. */
88
+ export async function runStartBackgroundRun(options, global) {
89
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
90
+ const globalPmRoot = resolveGlobalPmRoot(process.cwd());
91
+ await ensureInitialized(pmRoot);
92
+ const settings = await readSettings(pmRoot);
93
+ const requestedBy = resolveRequestedBy(options.author, settings.author_default);
94
+ const started = await startBackgroundTestRun({
95
+ pmRoot,
96
+ globalPmRoot,
97
+ kind: options.kind,
98
+ commandArgs: options.commandArgs,
99
+ requestedBy,
100
+ targetId: options.targetId,
101
+ statusFilter: options.statusFilter,
102
+ });
103
+ if (!started.started) {
104
+ return {
105
+ started: false,
106
+ duplicate_of: started.duplicate_of,
107
+ run: started.run,
108
+ };
109
+ }
110
+ const spawned = await spawnBackgroundTestRunWorker({
111
+ pmRoot,
112
+ runId: started.run.id,
113
+ noExtensions: options.noExtensions === true,
114
+ });
115
+ return {
116
+ started: true,
117
+ run: spawned,
118
+ };
119
+ }
120
+ /** Implements run test runs list for the public runtime surface of this module. */
121
+ export async function runTestRunsList(options, global) {
122
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
123
+ await ensureInitialized(pmRoot);
124
+ const status = normalizeStatus(options.status);
125
+ const limit = parseLimit(options.limit, "limit");
126
+ const runs = await listBackgroundTestRuns(pmRoot, { status, limit });
127
+ return {
128
+ runs,
129
+ count: runs.length,
130
+ filters: {
131
+ status,
132
+ limit,
133
+ },
134
+ };
135
+ }
136
+ /** Implements run test runs status for the public runtime surface of this module. */
137
+ export async function runTestRunsStatus(runId, global) {
138
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
139
+ await ensureInitialized(pmRoot);
140
+ const status = await getBackgroundTestRunStatus(pmRoot, runId);
141
+ return {
142
+ run: status.run,
143
+ health: status.health,
144
+ };
145
+ }
146
+ /** Implements run test runs logs for the public runtime surface of this module. */
147
+ export async function runTestRunsLogs(runId, options, global) {
148
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
149
+ await ensureInitialized(pmRoot);
150
+ const stream = normalizeStream(options.stream);
151
+ const tail = parseLimit(options.tail, "tail");
152
+ const logs = await readBackgroundTestRunLogs(pmRoot, runId, stream, tail);
153
+ return {
154
+ run: logs.run,
155
+ stream: logs.stream,
156
+ tail: logs.tail,
157
+ stdout: logs.stdout,
158
+ stderr: logs.stderr,
159
+ };
160
+ }
161
+ /** Implements run test runs stop for the public runtime surface of this module. */
162
+ export async function runTestRunsStop(runId, options, global) {
163
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
164
+ await ensureInitialized(pmRoot);
165
+ const stopped = await stopBackgroundTestRun(pmRoot, runId, options.force === true);
166
+ return {
167
+ run: stopped.run,
168
+ signal_sent: stopped.signal_sent,
169
+ };
170
+ }
171
+ /** Implements run test runs resume for the public runtime surface of this module. */
172
+ export async function runTestRunsResume(runId, options, global) {
173
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
174
+ await ensureInitialized(pmRoot);
175
+ const settings = await readSettings(pmRoot);
176
+ const requestedBy = resolveRequestedBy(options.author, settings.author_default);
177
+ const resumed = await resumeBackgroundTestRun(pmRoot, runId, requestedBy, options.noExtensions === true);
178
+ return {
179
+ resumed_from: runId,
180
+ run: resumed,
181
+ };
182
+ }
183
+ /** Implements run test runs worker for the public runtime surface of this module. */
184
+ export async function runTestRunsWorker(runId, global) {
185
+ const pmRoot = resolvePmRoot(process.cwd(), global.path);
186
+ await ensureInitialized(pmRoot);
187
+ const finished = await runBackgroundTestRunWorker(pmRoot, runId, global.noExtensions === true);
188
+ return {
189
+ id: finished.id,
190
+ status: finished.status,
191
+ exit_code: finished.exit_code,
192
+ };
193
+ }
194
+ //# sourceMappingURL=runs.js.map
195
+ //# debugId=2c42bfb9-c598-5a6e-bfff-0c073bb44205
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs.js","sources":["sdk/test/runs.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/test/runs\n *\n * Implements the pm test runs command surface and its agent-facing runtime behavior.\n */\nimport os from \"node:os\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\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 {\n type BackgroundLogStream,\n type BackgroundTestRunKind,\n type BackgroundTestRunStatus,\n getBackgroundTestRunStatus,\n listBackgroundTestRuns,\n readBackgroundTestRunLogs,\n resumeBackgroundTestRun,\n runBackgroundTestRunWorker,\n spawnBackgroundTestRunWorker,\n startBackgroundTestRun,\n stopBackgroundTestRun,\n} from \"../../core/test/background-runs.js\";\nimport {\n getSettingsPath,\n resolveGlobalPmRoot,\n resolvePmRoot,\n} from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { parseLimit } from \"../../core/shared/numeric-parsers.js\";\n\nconst BACKGROUND_STATUS_VALUES: readonly BackgroundTestRunStatus[] = [\n \"queued\",\n \"running\",\n \"passed\",\n \"failed\",\n \"stopped\",\n \"canceled\",\n];\nconst BACKGROUND_STREAM_VALUES: readonly BackgroundLogStream[] = [\n \"stdout\",\n \"stderr\",\n \"both\",\n];\n\nfunction normalizeStatus(\n value: string | undefined,\n): BackgroundTestRunStatus | undefined {\n if (value === undefined) {\n return undefined;\n }\n const normalized = value.trim().toLowerCase();\n if ((BACKGROUND_STATUS_VALUES as readonly string[]).includes(normalized)) {\n return normalized as BackgroundTestRunStatus;\n }\n throw new PmCliError(`Invalid --status value \"${value}\"`, EXIT_CODE.USAGE);\n}\n\nfunction normalizeStream(value: string | undefined): BackgroundLogStream {\n if (value === undefined || value.trim().length === 0) {\n return \"stderr\";\n }\n const normalized = value.trim().toLowerCase();\n if ((BACKGROUND_STREAM_VALUES as readonly string[]).includes(normalized)) {\n return normalized as BackgroundLogStream;\n }\n throw new PmCliError(`Invalid --stream value \"${value}\"`, EXIT_CODE.USAGE);\n}\n\nfunction resolveWhoamiFallback(): string | undefined {\n try {\n const username = os.userInfo().username.trim();\n if (username.length > 0) {\n return username;\n }\n } catch {\n // Fall back to environment-derived attribution.\n }\n return undefined;\n}\n\nfunction resolveRequestedBy(\n author: string | undefined,\n fallback: string,\n): string {\n const candidates = [\n author,\n process.env.PM_AUTHOR,\n fallback,\n process.env.USER,\n process.env.LOGNAME,\n process.env.USERNAME,\n resolveWhoamiFallback(),\n ];\n for (const candidate of candidates) {\n if (typeof candidate !== \"string\") {\n continue;\n }\n const trimmed = candidate.trim();\n if (trimmed.length > 0) {\n return trimmed;\n }\n }\n return \"unknown\";\n}\n\nasync function ensureInitialized(pmRoot: string): Promise<void> {\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(\n `Tracker is not initialized at ${pmRoot}. Run pm init first.`,\n EXIT_CODE.NOT_FOUND,\n );\n }\n}\n\n/** Documents the start background run command options payload exchanged by command, SDK, and package integrations. */\nexport interface StartBackgroundRunCommandOptions {\n /** Value that configures or reports kind for this contract. */\n kind: BackgroundTestRunKind;\n /** Value that configures or reports command args for this contract. */\n commandArgs: string[];\n /** Value that configures or reports target id for this contract. */\n targetId?: string;\n /** Value that configures or reports status filter for this contract. */\n statusFilter?: string;\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Value that configures or reports no extensions for this contract. */\n noExtensions?: boolean;\n}\n\n/** Documents the start background run result payload exchanged by command, SDK, and package integrations. */\nexport interface StartBackgroundRunResult {\n /** Value that configures or reports started for this contract. */\n started: boolean;\n /** Value that configures or reports duplicate of for this contract. */\n duplicate_of?: string;\n /** Value that configures or reports run for this contract. */\n run: unknown;\n}\n\n/** Implements run start background run for the public runtime surface of this module. */\nexport async function runStartBackgroundRun(\n options: StartBackgroundRunCommandOptions,\n global: GlobalOptions,\n): Promise<StartBackgroundRunResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const globalPmRoot = resolveGlobalPmRoot(process.cwd());\n await ensureInitialized(pmRoot);\n const settings = await readSettings(pmRoot);\n const requestedBy = resolveRequestedBy(\n options.author,\n settings.author_default,\n );\n const started = await startBackgroundTestRun({\n pmRoot,\n globalPmRoot,\n kind: options.kind,\n commandArgs: options.commandArgs,\n requestedBy,\n targetId: options.targetId,\n statusFilter: options.statusFilter,\n });\n if (!started.started) {\n return {\n started: false,\n duplicate_of: started.duplicate_of,\n run: started.run,\n };\n }\n const spawned = await spawnBackgroundTestRunWorker({\n pmRoot,\n runId: started.run.id,\n noExtensions: options.noExtensions === true,\n });\n return {\n started: true,\n run: spawned,\n };\n}\n\n/** Documents the test runs list command options payload exchanged by command, SDK, and package integrations. */\nexport interface TestRunsListCommandOptions {\n /** Lifecycle state reported for status. */\n status?: string;\n /** Value that configures or reports limit for this contract. */\n limit?: string;\n}\n\n/** Implements run test runs list for the public runtime surface of this module. */\nexport async function runTestRunsList(\n options: TestRunsListCommandOptions,\n global: GlobalOptions,\n): Promise<{\n runs: unknown[];\n count: number;\n filters: {\n status?: BackgroundTestRunStatus;\n limit?: number;\n };\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const status = normalizeStatus(options.status);\n const limit = parseLimit(options.limit, \"limit\");\n const runs = await listBackgroundTestRuns(pmRoot, { status, limit });\n return {\n runs,\n count: runs.length,\n filters: {\n status,\n limit,\n },\n };\n}\n\n/** Implements run test runs status for the public runtime surface of this module. */\nexport async function runTestRunsStatus(\n runId: string,\n global: GlobalOptions,\n): Promise<{\n run: unknown;\n health: unknown;\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const status = await getBackgroundTestRunStatus(pmRoot, runId);\n return {\n run: status.run,\n health: status.health,\n };\n}\n\n/** Documents the test runs logs command options payload exchanged by command, SDK, and package integrations. */\nexport interface TestRunsLogsCommandOptions {\n /** Value that configures or reports stream for this contract. */\n stream?: string;\n /** Value that configures or reports tail for this contract. */\n tail?: string;\n}\n\n/** Implements run test runs logs for the public runtime surface of this module. */\nexport async function runTestRunsLogs(\n runId: string,\n options: TestRunsLogsCommandOptions,\n global: GlobalOptions,\n): Promise<{\n run: unknown;\n stream: BackgroundLogStream;\n tail: number;\n stdout: string[];\n stderr: string[];\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const stream = normalizeStream(options.stream);\n const tail = parseLimit(options.tail, \"tail\");\n const logs = await readBackgroundTestRunLogs(pmRoot, runId, stream, tail);\n return {\n run: logs.run,\n stream: logs.stream,\n tail: logs.tail,\n stdout: logs.stdout,\n stderr: logs.stderr,\n };\n}\n\n/** Documents the test runs stop command options payload exchanged by command, SDK, and package integrations. */\nexport interface TestRunsStopCommandOptions {\n /** Value that configures or reports force for this contract. */\n force?: boolean;\n}\n\n/** Implements run test runs stop for the public runtime surface of this module. */\nexport async function runTestRunsStop(\n runId: string,\n options: TestRunsStopCommandOptions,\n global: GlobalOptions,\n): Promise<{\n run: unknown;\n signal_sent: \"SIGTERM\" | \"SIGKILL\" | \"none\";\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const stopped = await stopBackgroundTestRun(\n pmRoot,\n runId,\n options.force === true,\n );\n return {\n run: stopped.run,\n signal_sent: stopped.signal_sent,\n };\n}\n\n/** Documents the test runs resume command options payload exchanged by command, SDK, and package integrations. */\nexport interface TestRunsResumeCommandOptions {\n /** Value that configures or reports author for this contract. */\n author?: string;\n /** Value that configures or reports no extensions for this contract. */\n noExtensions?: boolean;\n}\n\n/** Implements run test runs resume for the public runtime surface of this module. */\nexport async function runTestRunsResume(\n runId: string,\n options: TestRunsResumeCommandOptions,\n global: GlobalOptions,\n): Promise<{\n resumed_from: string;\n run: unknown;\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const settings = await readSettings(pmRoot);\n const requestedBy = resolveRequestedBy(\n options.author,\n settings.author_default,\n );\n const resumed = await resumeBackgroundTestRun(\n pmRoot,\n runId,\n requestedBy,\n options.noExtensions === true,\n );\n return {\n resumed_from: runId,\n run: resumed,\n };\n}\n\n/** Implements run test runs worker for the public runtime surface of this module. */\nexport async function runTestRunsWorker(\n runId: string,\n global: GlobalOptions,\n): Promise<{\n id: string;\n status: BackgroundTestRunStatus;\n exit_code?: number;\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n const finished = await runBackgroundTestRunWorker(\n pmRoot,\n runId,\n global.noExtensions === true,\n );\n return {\n id: finished.id,\n status: finished.status,\n exit_code: finished.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C,MAAM,CAAC,CAAC;IAChC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,kBAAkB,CACpC,OAAO,CAAC,MAAM,EACd,QAAQ,CAAC,cAAc,CACxB,CAAC;IACF,MAAM,OAAO,GAAG,MAAM,uBAAuB,CAC3C,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,CAAC,YAAY,KAAK,IAAI,CAC9B,CAAC;IACF,OAAO;QACL,YAAY,EAAE,KAAK;QACnB,GAAG,EAAE,OAAO;KACb,CAAC;AACJ,CAAC;AAED,qFAAqF;AACrF,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,KAAa,EACb,MAAqB;IAMrB,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IACzD,MAAM,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAChC,MAAM,QAAQ,GAAG,MAAM,0BAA0B,CAC/C,MAAM,EACN,KAAK,EACL,MAAM,CAAC,YAAY,KAAK,IAAI,CAC7B,CAAC;IACF,OAAO;QACL,EAAE,EAAE,QAAQ,CAAC,EAAE;QACf,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,SAAS,EAAE,QAAQ,CAAC,SAAS;KAC9B,CAAC;AACJ,CAAC","debugId":"2c42bfb9-c598-5a6e-bfff-0c073bb44205"}
package/docs/SDK.md CHANGED
@@ -45,7 +45,21 @@ Source of truth:
45
45
  - [`src/sdk/governance/validate.ts`](../src/sdk/governance/validate.ts)
46
46
  - [`src/sdk/governance/health.ts`](../src/sdk/governance/health.ts)
47
47
  - [`src/sdk/governance/gc.ts`](../src/sdk/governance/gc.ts)
48
+ - [`src/sdk/query/list.ts`](../src/sdk/query/list.ts)
49
+ - [`src/sdk/query/search.ts`](../src/sdk/query/search.ts)
50
+ - [`src/sdk/query/search-pagination.ts`](../src/sdk/query/search-pagination.ts)
51
+ - [`src/sdk/query/search-rendering.ts`](../src/sdk/query/search-rendering.ts)
52
+ - [`src/sdk/query/item-filter-options.ts`](../src/sdk/query/item-filter-options.ts)
53
+ - [`src/sdk/query/parsers.ts`](../src/sdk/query/parsers.ts)
54
+ - [`src/sdk/test/execution.ts`](../src/sdk/test/execution.ts)
55
+ - [`src/sdk/test/batch.ts`](../src/sdk/test/batch.ts)
56
+ - [`src/sdk/test/runs.ts`](../src/sdk/test/runs.ts)
57
+ - [`src/sdk/test/parsers.ts`](../src/sdk/test/parsers.ts)
58
+ - [`src/sdk/eval.ts`](../src/sdk/eval.ts)
59
+ - [`src/sdk/telemetry.ts`](../src/sdk/telemetry.ts)
60
+ - [`src/sdk/stats.ts`](../src/sdk/stats.ts)
48
61
  - [`src/sdk/cli-contracts.ts`](../src/sdk/cli-contracts.ts)
62
+ - [`src/sdk/cli-bootstrap.ts`](../src/sdk/cli-bootstrap.ts)
49
63
  - [`src/sdk/cli-contracts/commander-types.ts`](../src/sdk/cli-contracts/commander-types.ts)
50
64
  - [`src/sdk/cli-contracts/commander-mutation-options.ts`](../src/sdk/cli-contracts/commander-mutation-options.ts)
51
65
 
@@ -137,6 +151,9 @@ Command/action contract exports:
137
151
  - Typed governance and maintenance primitives on `PmClient`: `validate`, `health`, `gc`, `historyRedact`, `historyRepair`, `historyRepairAll`, `historyCompact`, and `historyCompactBulk`
138
152
  - Governance and maintenance option/result contracts: `ValidateCommandOptions` / `ValidateResult`, `RunHealthOptions` / `HealthResult`, `GcCommandOptions` / `GcResult`, `HistoryRedactCommandOptions` / `HistoryRedactResult`, `HistoryRepairCommandOptions` / `HistoryRepairResult` / `HistoryRepairAllResult`, and `HistoryCompactCommandOptions` / `HistoryCompactResult` / `HistoryCompactBulkCommandOptions` / `HistoryCompactBulkResult`
139
153
  - Direct governance engines: `runValidate`, `runHealth`, and `runGc` are public SDK exports used by the CLI compatibility adapters and by custom policy engines that already own `GlobalOptions`. Their structured results are identical to CLI JSON output; no shell process or private core import is required.
154
+ - Execution and diagnostics engines: `runTest`, `runLinkedTests`, `runTestAll`, `runStartBackgroundRun`, `runTestRunsList`, `runTestRunsStatus`, `runTestRunsLogs`, `runTestRunsStop`, `runTestRunsResume`, `runTestRunsWorker`, `runEval`, `runTelemetry`, and `runStats`. Their CLI modules are compatibility re-exports of SDK-owned implementations.
155
+ - Execution and diagnostics contracts: `TestCommandOptions` / `TestResult` / `TestRunResult`, `TestAllCommandOptions` / `TestAllResult`, `StartBackgroundRunCommandOptions` / `StartBackgroundRunResult`, `TestRuns*CommandOptions`, `EvalOptions` / `EvalResult`, `TelemetryCommandOptions` / `TelemetrySubcommand`, and `StatsCommandOptions` / `StatsResult`.
156
+ - Linked-test authoring primitives: `parseLinkedTestJsonEntries`, the `parseLinkedTest*` field parsers, `LINKED_TEST_PM_CONTEXT_MODE_VALUES`, `LINKED_TEST_PROTECTED_ENV_KEYS`, `classifyLinkedTestFailure`, `countFailureCategories`, and `summarizeContextPreflight` let custom hosts validate, execute, classify, and report linked tests without duplicating CLI policy.
140
157
  - Typed plan workflow primitives on `PmClient`: `plan`, `planCreate`, `planShow`, `planAddStep`, `planUpdateStep`, `planCompleteStep`, `planBlockStep`, `planReorderStep`, `planRemoveStep`, `planLink`, `planUnlink`, `planDecision`, `planDiscovery`, `planValidation`, `planResume`, `planApprove`, and `planMaterialize`
141
158
  - Plan contracts: `PlanSubcommand`, `PlanCommandOptions`, `PlanCommandResult`, `PlanResultPlan`, `PlanStepSummary`, `PlanShowDepth`, and `PlanTemplateName`
142
159
  - Typed package and extension lifecycle primitives on `PmClient`: `extension`, `extensionList`, `extensionActivate`, `extensionDeactivate`, `package`, `packageList`, `packageInstall`, `packageUninstall`, `packageDoctor`, `packageManage`, `packageDescribe`, `packageReload`, `packageCatalog`, `packageActivate`, `packageDeactivate`, and `upgrade`
@@ -147,6 +164,29 @@ Command/action contract exports:
147
164
  - `PM_PROVIDER_TOOL_PARAMETERS_SCHEMA`
148
165
  - `PM_TOOL_ACTION_PARAMETER_CONTRACTS`
149
166
 
167
+ ### Build an entire custom project tool
168
+
169
+ The [SDK-only custom-tool exemplar](examples/sdk-custom-tool/README.md)
170
+ is the acceptance reference for applications that use pm as a universal
171
+ context engine rather than as an extension host. It imports only
172
+ `@unbrained/pm-cli/sdk` and composes schema customization, custom workflow
173
+ statuses, lifecycle mutations, annotations, linked resources, dependency
174
+ graphs, bounded context, search, health, and validation into a standalone
175
+ domain CLI.
176
+
177
+ Copy its reusable client pattern when building a company workflow,
178
+ domain-specific tracker, VCS-like system, or other application whose durable
179
+ state and business rules fit pm's public primitives. Keep the executable layer
180
+ thin: domain logic belongs in a reusable SDK client, while argv parsing and
181
+ rendering stay at the edge.
182
+
183
+ Embedded hosts can also import the SDK-owned bootstrap normalization primitives
184
+ (`normalizeBootstrapInvocation`, `parseBootstrapGlobalOptions`, and related
185
+ contracts) when they intentionally expose pm-compatible argv. Every
186
+ `runPmCli()` call constructs a fresh Commander graph, so extension commands,
187
+ extension flags, and runtime schema options from one workspace cannot leak into
188
+ the next in-process invocation.
189
+
150
190
  ### Plan workflows
151
191
 
152
192
  Custom tools can manage durable plans without shelling out or importing CLI internals. The typed façade uses the same engine and result envelopes as `pm plan` and MCP `pm_plan`:
@@ -785,6 +825,87 @@ the same bounded maintenance engine as the CLI. Prefer these typed calls over
785
825
  shelling out when building CI, editor integrations, or long-running agent
786
826
  runtimes.
787
827
 
828
+ ### Query execution
829
+
830
+ Tracked by [pm-rjqr](../.agents/pm/features/pm-rjqr.toon) and the SDK boundary
831
+ capstone [pm-9x6e](../.agents/pm/tasks/pm-9x6e.toon).
832
+
833
+ `runList` and `runSearch` are SDK-owned query engines, including filtering,
834
+ projection, pagination, keyword and semantic ranking, extension-provider
835
+ dispatch, and token-efficient response metadata. Their historical CLI module
836
+ paths are identity-preserving compatibility exports, while `runEval` consumes
837
+ the SDK search engine directly. Package authors can import these functions and
838
+ their typed result contracts from `@unbrained/pm-cli/sdk` without importing CLI
839
+ implementation modules.
840
+
841
+ List result rows are modeled by projection: `ListFullResult` contains complete
842
+ `ListedItem` records, tree ordering may enrich them with `ListTreeMetadata`, and
843
+ compact or `fields` projections return `ListProjectedItem` dictionaries. Use
844
+ `full: true` when an integration requires complete item metadata; the overload
845
+ then returns `ListFullResult` without an assertion or cast.
846
+
847
+ ### Execution and diagnostics
848
+
849
+ Tracked by [pm-oslr](../.agents/pm/features/pm-oslr.toon) and the SDK boundary
850
+ capstone [pm-9x6e](../.agents/pm/tasks/pm-9x6e.toon).
851
+
852
+ Test execution, background-run supervision, search evaluation, telemetry
853
+ inspection, and tracker statistics are SDK-owned primitives. A custom CI host or
854
+ project-specific tool can compose the same sandboxing, context-preflight,
855
+ deduplication, failure classification, progress, consent, and structured-result
856
+ behavior as the CLI without spawning `pm` or importing `src/core` modules:
857
+
858
+ ```ts
859
+ import {
860
+ runEval,
861
+ runTelemetry,
862
+ runTest,
863
+ runTestAll,
864
+ runTestRunsStatus,
865
+ type GlobalOptions,
866
+ } from "@unbrained/pm-cli/sdk";
867
+
868
+ const pmRoot = "/path/to/project/.agents/pm";
869
+ const itemId = "pm-example";
870
+ const runId = "test-run-example";
871
+ const global: GlobalOptions = { path: pmRoot };
872
+
873
+ const itemRun = await runTest(
874
+ itemId,
875
+ {
876
+ run: true,
877
+ autoPmContext: true,
878
+ checkContext: true,
879
+ failOnEmptyTestRun: true,
880
+ },
881
+ global,
882
+ );
883
+
884
+ const workspaceRun = await runTestAll(
885
+ { status: "open", autoPmContext: true, failOnSkipped: true },
886
+ global,
887
+ );
888
+ const background = await runTestRunsStatus(runId, global);
889
+ const relevance = await runEval({ mode: "keyword", k: 10 }, global);
890
+ const telemetry = await runTelemetry(
891
+ { subcommand: "stats", limit: 20 },
892
+ global,
893
+ );
894
+ ```
895
+
896
+ `runTest` and `runTestAll` always execute linked commands in isolated project and
897
+ global tracker roots. `pm_context_mode`, run-level overrides, automatic tracker
898
+ context, assertion requirements, empty-run detection, and failure categories are
899
+ part of the SDK result contract rather than presentation-layer behavior.
900
+ Background-run helpers return durable records and health/log projections; the
901
+ host remains responsible for its own rendering and exit-code policy.
902
+
903
+ `runTelemetry` retains consent and storage ownership inside the primitive:
904
+ `status` and `stats` are observational, `flush` uses the consent-aware queue
905
+ runtime, and `clear` disables telemetry and removes runtime artifacts. `runEval`
906
+ uses the same live search path and unrounded gate decision as `pm eval`, returning
907
+ compact rounded report metrics for stable machine output.
908
+
788
909
  ### Context relevance and evaluation
789
910
 
790
911
  Tracked by [pm-4k6b](../.agents/pm/features/pm-4k6b.toon),
@@ -2226,6 +2347,7 @@ search degrades gracefully and emits warning codes instead of hard-failing.
2226
2347
 
2227
2348
  Runnable examples:
2228
2349
 
2350
+ - [SDK-only custom project tool](examples/sdk-custom-tool/README.md)
2229
2351
  - [SDK contract consumer](examples/sdk-contract-consumer/README.md)
2230
2352
  - [SDK app embedding](examples/sdk-app-embedding/README.md)
2231
2353
  - [CI examples](examples/ci/)
@@ -1,6 +1,6 @@
1
1
  # SDK Primitive Inventory
2
2
 
3
- Tracked work: [pm-lodl](../.agents/pm/tasks/pm-lodl.toon), [pm-8778](../.agents/pm/tasks/pm-8778.toon), parent [pm-usfg](../.agents/pm/epics/pm-usfg.toon).
3
+ Tracked work: [pm-lodl](../.agents/pm/tasks/pm-lodl.toon), [pm-8778](../.agents/pm/tasks/pm-8778.toon), [pm-rjqr](../.agents/pm/features/pm-rjqr.toon), [pm-oslr](../.agents/pm/features/pm-oslr.toon), capstone [pm-9x6e](../.agents/pm/tasks/pm-9x6e.toon), parent [pm-usfg](../.agents/pm/epics/pm-usfg.toon).
4
4
 
5
5
  This inventory is the current SDK-first migration map for the principle `project management = context management`.
6
6
  The exact per-source CLI/MCP module inventory is checked in at [`scripts/release/sdk-import-boundary-baseline.json`](../scripts/release/sdk-import-boundary-baseline.json): each `allowed_private_core_imports[]` entry names one command, helper, or MCP source file and the private `src/core` modules it currently imports. The static quality gate reads that file and fails when `src/cli` or `src/mcp` adds a new private `src/core` import, uses a computed dynamic `import()` that cannot be ratcheted, or leaves a stale baseline entry after an import has been removed.
@@ -9,6 +9,7 @@ The exact per-source CLI/MCP module inventory is checked in at [`scripts/release
9
9
 
10
10
  - Boundary scope: `src/cli.ts`, `src/cli/**`, `src/mcp.ts`, and `src/mcp/**`.
11
11
  - Current scan size and private-edge counts are derived from [`scripts/release/sdk-import-boundary-baseline.json`](../scripts/release/sdk-import-boundary-baseline.json) and the `pnpm quality:static` ratchet output.
12
+ - Current enforced baseline after the query/execution bundle: 51 CLI/MCP source modules and 412 private-core import edges, down from 62 sources and 538 edges at the start of the bundle.
12
13
  - Type-only imports and re-exports are intentionally counted because they still expose presentation layers to private core contracts.
13
14
  - Baseline owner: [pm-8778](../.agents/pm/tasks/pm-8778.toon).
14
15
  - Ratchet rule: SDK promotion PRs must shrink the baseline when they move a primitive behind `src/sdk`; no PR may grow it.
@@ -36,12 +37,13 @@ Use [`scripts/release/sdk-import-boundary-baseline.json`](../scripts/release/sdk
36
37
  | --- | --- | --- |
37
38
  | `create`, `update`, `update-many`, `copy`, `delete`, `restore` | [pm-98cz](../.agents/pm/features/pm-98cz.toon) | Item CRUD and replay paths should become typed lifecycle SDK calls. |
38
39
  | `claim`, `release`, `focus`, lifecycle shortcut helpers | [pm-98cz](../.agents/pm/features/pm-98cz.toon) | Ownership and actionable-state changes belong beside lifecycle primitives. |
39
- | `list`, `get`, `search`, `context`, `next`, `aggregate`, `stats` | [pm-rjqr](../.agents/pm/features/pm-rjqr.toon) | Read models should be reusable by CLI, MCP, and custom agents without shelling out. |
40
+ | `list`, `get`, `search`, `context`, `next`, `aggregate`, `stats` | [pm-rjqr](../.agents/pm/features/pm-rjqr.toon) | `list` and `search` implementations now live under `src/sdk/query/**`; remaining read models should follow the same SDK-owned pattern. |
40
41
  | `comments`, `notes`, `learnings`, `files`, `docs`, `deps`, `append` | [pm-zwpp](../.agents/pm/features/pm-zwpp.toon) | Annotation/link mutation semantics must be stable SDK primitives. |
41
42
  | `schema`, `config`, `profile`, `init`, `init-agent-guidance` | [pm-3mna](../.agents/pm/features/pm-3mna.toon) | Universal customization requires programmatic schema, profile, and config APIs. |
42
43
  | `history`, `activity`, `history-redact`, `history-repair`, `history-compact` | [pm-4a7m](../.agents/pm/features/pm-4a7m.toon) | Audited history read, activity, rewrite, and checkpoint operations need explicit public contracts. |
43
44
  | `plan` | [pm-je50](../.agents/pm/features/pm-je50.toon) | Plan harness operations should be usable by external orchestrators through SDK calls. |
44
- | `test`, `test-all`, `test-runs`, `eval`, `telemetry`, `reindex` | [pm-oslr](../.agents/pm/features/pm-oslr.toon) | Execution helpers should return typed run state and diagnostics instead of CLI-only text. |
45
+ | `test`, `test-all`, `test-runs`, `eval`, `telemetry`, `stats` | [pm-oslr](../.agents/pm/features/pm-oslr.toon) | Implementations live under `src/sdk/test/**`, `src/sdk/eval.ts`, `src/sdk/telemetry.ts`, and `src/sdk/stats.ts`; CLI paths are compatibility exports with typed structured results. |
46
+ | `reindex` | [pm-rjqr](../.agents/pm/features/pm-rjqr.toon) / [pm-9x6e](../.agents/pm/tasks/pm-9x6e.toon) | Search-index refresh remains part of the query/read ownership and terminal boundary burn-down. |
45
47
  | `extension`, `upgrade`, package lifecycle helpers | [pm-ugqx](../.agents/pm/epics/pm-ugqx.toon) | Existing package-author SDK surfaces stay public; package lifecycle can move behind SDK runtime helpers. |
46
48
  | `src/mcp/**` | [pm-usfg](../.agents/pm/epics/pm-usfg.toon) | MCP tools should call SDK primitives directly once each family is promoted. |
47
49
 
@@ -0,0 +1,27 @@
1
+ # SDK-only custom project tool
2
+
3
+ Tracked by [pm-cbwg](../../../.agents/pm/features/pm-cbwg.toon) and
4
+ [pm-w89s](../../../.agents/pm/stories/pm-w89s.toon).
5
+
6
+ This package is the end-to-end acceptance proof for pm's universal-tool goal.
7
+ It is a standalone domain CLI, not an extension: its implementation imports
8
+ only `@unbrained/pm-cli/sdk` and composes customization, lifecycle, query,
9
+ context, annotation, linked-resource, relationship, and governance primitives.
10
+
11
+ Run the acceptance suite, including the executable adapter contract, against
12
+ fresh temporary workspaces:
13
+
14
+ ```bash
15
+ node scripts/run-tests.mjs test -- tests/unit/sdk/sdk-universal-tool-exemplar.spec.ts
16
+ ```
17
+
18
+ The `pm-custom` flow registers a `Deliverable` type and `reviewing` status,
19
+ creates a related parent/child graph, records comments/notes/learnings, links
20
+ workspace evidence, reads list/search/context/dependency projections, closes
21
+ the work with resolution evidence, and returns health/history verification as
22
+ structured JSON. It never imports `src/core`, `src/cli`, or spawns `pm`.
23
+
24
+ Use [src/index.ts](src/index.ts) as the copyable library pattern and
25
+ [src/cli.ts](src/cli.ts) as the process-independent executable adapter. The
26
+ package maps `pm-custom` to [src/entry.ts](src/entry.ts), which wires that
27
+ adapter to Node.js arguments, author identity, output streams, and exit status.
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "@unbrained/pm-sdk-custom-tool",
3
+ "version": "2026.7.16",
4
+ "private": true,
5
+ "type": "module",
6
+ "description": "SDK-only exemplar for building a complete custom project-management tool on pm primitives.",
7
+ "bin": {
8
+ "pm-custom": "src/entry.ts"
9
+ },
10
+ "peerDependencies": {
11
+ "@unbrained/pm-cli": ">=2026.7.16"
12
+ }
13
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @module docs/examples/sdk-custom-tool/cli
3
+ *
4
+ * Runs the SDK-only exemplar as a small domain CLI.
5
+ */
6
+ import {
7
+ runUniversalToolScenario,
8
+ type UniversalToolScenarioOptions,
9
+ type UniversalToolScenarioResult,
10
+ } from "./index.ts";
11
+
12
+ /** Scenario boundary accepted by the executable adapter. */
13
+ export type UniversalToolScenarioRunner = (
14
+ options: UniversalToolScenarioOptions,
15
+ ) => Promise<UniversalToolScenarioResult>;
16
+
17
+ /** Run the exemplar CLI against process-independent argument and I/O ports. */
18
+ export async function runUniversalToolCli(
19
+ args: string[],
20
+ author: string | undefined,
21
+ writeOutput: (value: string) => void,
22
+ writeError: (value: string) => void,
23
+ runScenario: UniversalToolScenarioRunner = runUniversalToolScenario,
24
+ ): Promise<number> {
25
+ const workspace = args[0];
26
+ if (!workspace) {
27
+ writeError("Usage: pm-custom <workspace>\n");
28
+ return 2;
29
+ }
30
+ const result = await runScenario({
31
+ workspace,
32
+ author: author ?? "pm-sdk-custom-tool",
33
+ });
34
+ writeOutput(`${JSON.stringify(result, null, 2)}\n`);
35
+ return 0;
36
+ }
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @module docs/examples/sdk-custom-tool/entry
4
+ *
5
+ * Connects the process-independent SDK exemplar adapter to Node.js process
6
+ * arguments, author identity, output streams, and exit status.
7
+ */
8
+ import { runUniversalToolCli } from "./cli.ts";
9
+
10
+ process.exitCode = await runUniversalToolCli(
11
+ process.argv.slice(2),
12
+ process.env.PM_AUTHOR,
13
+ (value) => process.stdout.write(value),
14
+ (value) => process.stderr.write(value),
15
+ );