@unbrained/pm-cli 2026.7.16 → 2026.7.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (620) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +30 -2
  3. package/CONTRIBUTING.md +2 -2
  4. package/dist/cli/bootstrap-args.d.ts +2 -115
  5. package/dist/cli/bootstrap-args.js +4 -831
  6. package/dist/cli/bootstrap-args.js.map +1 -1
  7. package/dist/cli/commands/close.d.ts +1 -1
  8. package/dist/cli/commands/close.js +3 -3
  9. package/dist/cli/commands/close.js.map +1 -1
  10. package/dist/cli/commands/completion.js +47 -5
  11. package/dist/cli/commands/completion.js.map +1 -1
  12. package/dist/cli/commands/context.d.ts +2 -2
  13. package/dist/cli/commands/context.js +42 -28
  14. package/dist/cli/commands/context.js.map +1 -1
  15. package/dist/cli/commands/contracts.js +5 -3
  16. package/dist/cli/commands/contracts.js.map +1 -1
  17. package/dist/cli/commands/eval.d.ts +4 -64
  18. package/dist/cli/commands/eval.js +4 -153
  19. package/dist/cli/commands/eval.js.map +1 -1
  20. package/dist/cli/commands/graph.d.ts +7 -0
  21. package/dist/cli/commands/graph.js +11 -0
  22. package/dist/cli/commands/graph.js.map +1 -0
  23. package/dist/cli/commands/index.d.ts +1 -0
  24. package/dist/cli/commands/index.js +3 -2
  25. package/dist/cli/commands/index.js.map +1 -1
  26. package/dist/cli/commands/linked-test-entry.d.ts +6 -6
  27. package/dist/cli/commands/linked-test-entry.js +4 -65
  28. package/dist/cli/commands/linked-test-entry.js.map +1 -1
  29. package/dist/cli/commands/linked-test-parsers.d.ts +3 -45
  30. package/dist/cli/commands/linked-test-parsers.js +4 -516
  31. package/dist/cli/commands/linked-test-parsers.js.map +1 -1
  32. package/dist/cli/commands/list.d.ts +3 -210
  33. package/dist/cli/commands/list.js +4 -1068
  34. package/dist/cli/commands/list.js.map +1 -1
  35. package/dist/cli/commands/next.d.ts +1 -1
  36. package/dist/cli/commands/next.js +3 -3
  37. package/dist/cli/commands/next.js.map +1 -1
  38. package/dist/cli/commands/search.d.ts +3 -464
  39. package/dist/cli/commands/search.js +4 -2236
  40. package/dist/cli/commands/search.js.map +1 -1
  41. package/dist/cli/commands/stats.d.ts +6 -66
  42. package/dist/cli/commands/stats.js +4 -157
  43. package/dist/cli/commands/stats.js.map +1 -1
  44. package/dist/cli/commands/telemetry.d.ts +6 -14
  45. package/dist/cli/commands/telemetry.js +4 -349
  46. package/dist/cli/commands/telemetry.js.map +1 -1
  47. package/dist/cli/commands/test-all.d.ts +6 -95
  48. package/dist/cli/commands/test-all.js +4 -439
  49. package/dist/cli/commands/test-all.js.map +1 -1
  50. package/dist/cli/commands/test-runs.d.ts +6 -92
  51. package/dist/cli/commands/test-runs.js +4 -189
  52. package/dist/cli/commands/test-runs.js.map +1 -1
  53. package/dist/cli/commands/test.d.ts +6 -244
  54. package/dist/cli/commands/test.js +4 -1780
  55. package/dist/cli/commands/test.js.map +1 -1
  56. package/dist/cli/commands/update-many.d.ts +15 -29
  57. package/dist/cli/commands/update-many.js +355 -259
  58. package/dist/cli/commands/update-many.js.map +1 -1
  59. package/dist/cli/main.js +141 -133
  60. package/dist/cli/main.js.map +1 -1
  61. package/dist/cli/register-list-query.js +49 -7
  62. package/dist/cli/register-list-query.js.map +1 -1
  63. package/dist/cli/register-mutation.js +7 -3
  64. package/dist/cli/register-mutation.js.map +1 -1
  65. package/dist/cli/search-refresh.js +4 -9
  66. package/dist/cli/search-refresh.js.map +1 -1
  67. package/dist/cli/shared-parsers.d.ts +6 -9
  68. package/dist/cli/shared-parsers.js +4 -37
  69. package/dist/cli/shared-parsers.js.map +1 -1
  70. package/dist/cli/telemetry-flush.js +4 -4
  71. package/dist/cli/telemetry-flush.js.map +1 -1
  72. package/dist/cli-bundle/bundle-manifest.json +334 -326
  73. package/dist/cli-bundle/chunks/{append-OJQFUQ4T.js → append-5YF3TO7I.js} +5 -5
  74. package/dist/cli-bundle/chunks/append-JHO5K6RP.js +11 -0
  75. package/dist/cli-bundle/chunks/{chunk-BCOFWYW4.js → chunk-2BX74BAS.js} +3 -3
  76. package/dist/cli-bundle/chunks/{chunk-APRVSW2O.js → chunk-2CXL335K.js} +3 -3
  77. package/dist/cli-bundle/chunks/{chunk-KG44YSKD.js → chunk-2FUOXSRN.js} +4 -4
  78. package/dist/cli-bundle/chunks/{chunk-HDH3JUGG.js → chunk-2IPNL3DR.js} +3 -3
  79. package/dist/cli-bundle/chunks/{chunk-GM5QHQU6.js → chunk-2XOSFSTH.js} +5 -5
  80. package/dist/cli-bundle/chunks/{chunk-UFXU44HV.js → chunk-35FHWD4C.js} +6 -6
  81. package/dist/cli-bundle/chunks/{chunk-2WSE6PO2.js.map → chunk-35FHWD4C.js.map} +1 -7
  82. package/dist/cli-bundle/chunks/{chunk-K3WII2ME.js → chunk-37DRDP2B.js} +5 -5
  83. package/dist/cli-bundle/chunks/{chunk-BKVG6XOA.js → chunk-3CUQZNQ6.js} +67 -509
  84. package/dist/cli-bundle/chunks/chunk-3CUQZNQ6.js.map +7 -0
  85. package/dist/cli-bundle/chunks/chunk-3QDR6ZLU.js +800 -0
  86. package/dist/cli-bundle/chunks/chunk-3QDR6ZLU.js.map +7 -0
  87. package/dist/cli-bundle/chunks/{chunk-5JLUII3O.js → chunk-43UMFKCK.js} +321 -240
  88. package/dist/cli-bundle/chunks/chunk-43UMFKCK.js.map +1 -0
  89. package/dist/cli-bundle/chunks/{chunk-PMOSXADO.js → chunk-47HXN6RX.js} +3 -3
  90. package/dist/cli-bundle/chunks/{chunk-6CFNAVTF.js → chunk-5HGZKQUL.js} +4 -4
  91. package/dist/cli-bundle/chunks/{chunk-2IFFUZLC.js → chunk-5UKQLQM2.js} +2 -2
  92. package/dist/cli-bundle/chunks/{chunk-DM4H7FP4.js → chunk-633PKXLT.js} +3 -3
  93. package/dist/cli-bundle/chunks/{chunk-XSJUSQAE.js → chunk-646MQXFW.js} +2 -2
  94. package/dist/cli-bundle/chunks/{chunk-ZI6VQWQ7.js → chunk-66MKH7SZ.js} +4 -4
  95. package/dist/cli-bundle/chunks/{chunk-S6MQESFR.js → chunk-67RO3H4N.js} +4 -4
  96. package/dist/cli-bundle/chunks/{chunk-34L5OT3Y.js → chunk-6DYOZS6C.js} +2 -2
  97. package/dist/cli-bundle/chunks/{chunk-RRM5JYJC.js → chunk-6O44IN44.js} +2 -2
  98. package/dist/cli-bundle/chunks/{chunk-5ZSLZLDN.js → chunk-6VHUGVNP.js} +608 -456
  99. package/dist/cli-bundle/chunks/chunk-6VHUGVNP.js.map +1 -0
  100. package/dist/cli-bundle/chunks/{chunk-PENXZX3U.js → chunk-74FKFFXO.js} +2 -2
  101. package/dist/cli-bundle/chunks/{chunk-HO4KXD6I.js → chunk-7H5NNCJ5.js} +4 -4
  102. package/dist/cli-bundle/chunks/{chunk-7B67ZL4N.js → chunk-7R6UIHYY.js} +75 -5
  103. package/dist/cli-bundle/chunks/{chunk-7B67ZL4N.js.map → chunk-7R6UIHYY.js.map} +1 -1
  104. package/dist/cli-bundle/chunks/{chunk-3S5QVM5H.js → chunk-7UCY6DR5.js} +193 -22
  105. package/dist/cli-bundle/chunks/chunk-7UCY6DR5.js.map +1 -0
  106. package/dist/cli-bundle/chunks/{chunk-WT3ZEOGH.js → chunk-ADXDCAKP.js} +16 -7
  107. package/dist/cli-bundle/chunks/{chunk-WT3ZEOGH.js.map → chunk-ADXDCAKP.js.map} +1 -1
  108. package/dist/cli-bundle/chunks/{chunk-TQSZFPIS.js → chunk-AFGKSHAM.js} +4 -4
  109. package/dist/cli-bundle/chunks/{chunk-6N2VXVTQ.js → chunk-ARGDWQ4J.js} +2 -2
  110. package/dist/cli-bundle/chunks/{chunk-XXXF6PAQ.js → chunk-AXRT7K5V.js} +83 -62
  111. package/dist/cli-bundle/chunks/chunk-AXRT7K5V.js.map +7 -0
  112. package/dist/cli-bundle/chunks/{chunk-3U7ZR6M4.js → chunk-B57RJHBZ.js} +4 -4
  113. package/dist/cli-bundle/chunks/{chunk-YCQET3OT.js → chunk-BAP7G3N2.js} +2 -2
  114. package/dist/cli-bundle/chunks/{chunk-NLDFBC6J.js → chunk-BDA35QG5.js} +35 -5
  115. package/dist/cli-bundle/chunks/chunk-BDA35QG5.js.map +7 -0
  116. package/dist/cli-bundle/chunks/{chunk-QKXHFPYM.js → chunk-BIRYX32V.js} +3 -3
  117. package/dist/cli-bundle/chunks/{chunk-RMLWNPH2.js → chunk-BVLOMU6O.js} +2 -2
  118. package/dist/cli-bundle/chunks/{chunk-2VPAVL7O.js → chunk-CKX4WOPC.js} +2 -2
  119. package/dist/cli-bundle/chunks/{chunk-TKOVBP6C.js → chunk-D52ZN3BF.js} +2 -2
  120. package/dist/cli-bundle/chunks/{chunk-KPMKHGEA.js → chunk-D53RTYVI.js} +4 -4
  121. package/dist/cli-bundle/chunks/{chunk-ODALILG3.js → chunk-D5XHO4Q7.js} +2 -2
  122. package/dist/cli-bundle/chunks/{chunk-YAQEBNY7.js → chunk-DDFGYUCQ.js} +4 -4
  123. package/dist/cli-bundle/chunks/{chunk-EAB64KLB.js → chunk-DG2EQRIH.js} +4 -4
  124. package/dist/cli-bundle/chunks/{chunk-J6364LFM.js → chunk-DHNG452T.js} +9 -18
  125. package/dist/cli-bundle/chunks/{chunk-J6364LFM.js.map → chunk-DHNG452T.js.map} +1 -1
  126. package/dist/cli-bundle/chunks/{chunk-JXQUXVMI.js → chunk-E4FXM2XB.js} +77 -7
  127. package/dist/cli-bundle/chunks/{chunk-JXQUXVMI.js.map → chunk-E4FXM2XB.js.map} +1 -1
  128. package/dist/cli-bundle/chunks/{chunk-IG3SWA4A.js → chunk-EHJFUOXL.js} +3 -3
  129. package/dist/cli-bundle/chunks/{chunk-P74IZQ7A.js → chunk-EWIT5WIC.js} +7 -7
  130. package/dist/cli-bundle/chunks/chunk-EX7OQT3Y.js +783 -0
  131. package/dist/cli-bundle/chunks/chunk-EX7OQT3Y.js.map +1 -0
  132. package/dist/cli-bundle/chunks/{chunk-ONREO4ST.js → chunk-EY7ZE3TG.js} +3 -3
  133. package/dist/cli-bundle/chunks/{chunk-ILX33QXL.js → chunk-F3VC3GOV.js} +669 -472
  134. package/dist/cli-bundle/chunks/chunk-F3VC3GOV.js.map +7 -0
  135. package/dist/cli-bundle/chunks/{chunk-EJEXHTY5.js → chunk-FHOBCGQO.js} +2 -2
  136. package/dist/cli-bundle/chunks/{chunk-H3EIEWGR.js → chunk-FL4D53ND.js} +2 -2
  137. package/dist/cli-bundle/chunks/{chunk-WUJQK4YV.js → chunk-FVNWHUME.js} +4 -4
  138. package/dist/cli-bundle/chunks/{chunk-INU6DKT5.js → chunk-FXFCFL73.js} +5 -5
  139. package/dist/cli-bundle/chunks/{chunk-QEHQ2GVG.js → chunk-FY4RLHSC.js} +2 -2
  140. package/dist/cli-bundle/chunks/{chunk-AHVTB5I5.js → chunk-G6MYGULG.js} +4 -4
  141. package/dist/cli-bundle/chunks/{chunk-HYB5AZ63.js → chunk-GKPCTQYG.js} +1822 -72
  142. package/dist/cli-bundle/chunks/chunk-GKPCTQYG.js.map +7 -0
  143. package/dist/cli-bundle/chunks/{chunk-TSMHDIW4.js → chunk-GLZKZON6.js} +2 -2
  144. package/dist/cli-bundle/chunks/{chunk-2JKGO6QX.js → chunk-H5IOT54C.js} +4 -4
  145. package/dist/cli-bundle/chunks/{chunk-SELVXEZK.js → chunk-HO4DLBNK.js} +2 -2
  146. package/dist/cli-bundle/chunks/{chunk-CRVF2JDM.js → chunk-HPAYDSR2.js} +8 -8
  147. package/dist/cli-bundle/chunks/{chunk-3CLU2XZO.js → chunk-HSYV4ZYT.js} +4 -4
  148. package/dist/cli-bundle/chunks/{chunk-EH2OPHBI.js → chunk-HTXXXF45.js} +23 -19
  149. package/dist/cli-bundle/chunks/chunk-HTXXXF45.js.map +1 -0
  150. package/dist/cli-bundle/chunks/{chunk-J5AOEGDC.js → chunk-HYTOJW2Q.js} +8 -8
  151. package/dist/cli-bundle/chunks/{chunk-4XQ3BDV4.js → chunk-I3INI567.js} +536 -449
  152. package/dist/cli-bundle/chunks/chunk-I3INI567.js.map +7 -0
  153. package/dist/cli-bundle/chunks/{chunk-NU3IMIEA.js → chunk-I7DIDUSP.js} +2 -2
  154. package/dist/cli-bundle/chunks/{chunk-JYFOV7FC.js → chunk-IE5KRAKN.js} +4 -4
  155. package/dist/cli-bundle/chunks/{chunk-YAROI3PD.js → chunk-IL5SPRMH.js} +7 -7
  156. package/dist/cli-bundle/chunks/{chunk-UY2ACEMF.js → chunk-ILVOOAT4.js} +5 -5
  157. package/dist/cli-bundle/chunks/{chunk-GOSLKLFE.js → chunk-KH6QAHME.js} +3 -3
  158. package/dist/cli-bundle/chunks/{chunk-QKECXBBG.js → chunk-KX62NMZC.js} +3 -3
  159. package/dist/cli-bundle/chunks/{chunk-QKECXBBG.js.map → chunk-KX62NMZC.js.map} +1 -1
  160. package/dist/cli-bundle/chunks/{chunk-WQPUU7XD.js → chunk-L337QKWJ.js} +5 -5
  161. package/dist/cli-bundle/chunks/{chunk-JFTKLTEF.js → chunk-L5BTTDU5.js} +68 -503
  162. package/dist/cli-bundle/chunks/chunk-L5BTTDU5.js.map +1 -0
  163. package/dist/cli-bundle/chunks/{chunk-LSG2U345.js → chunk-L6FVNR7X.js} +5 -5
  164. package/dist/cli-bundle/chunks/{chunk-FMBNM2EN.js → chunk-LSOWTLEM.js} +2 -2
  165. package/dist/cli-bundle/chunks/{chunk-4223PVZT.js → chunk-M7MVOKVV.js} +3 -3
  166. package/dist/cli-bundle/chunks/{chunk-UMOPHQSU.js → chunk-MR4SHYR4.js} +41 -19
  167. package/dist/cli-bundle/chunks/chunk-MR4SHYR4.js.map +7 -0
  168. package/dist/cli-bundle/chunks/{chunk-3WM75PWC.js → chunk-N33FD2UI.js} +3 -3
  169. package/dist/cli-bundle/chunks/{chunk-UXONS674.js → chunk-NCVT6XEL.js} +68 -56
  170. package/dist/cli-bundle/chunks/chunk-NCVT6XEL.js.map +1 -0
  171. package/dist/cli-bundle/chunks/{chunk-6S3YSUYG.js → chunk-NNANAWFH.js} +3 -3
  172. package/dist/cli-bundle/chunks/{chunk-IJIICKVW.js → chunk-NTRQLE2R.js} +2 -2
  173. package/dist/cli-bundle/chunks/{chunk-SDQLJWBO.js → chunk-NVZ6NVHJ.js} +4 -4
  174. package/dist/cli-bundle/chunks/{chunk-E2OJMKML.js → chunk-OGVTB5VO.js} +47 -37
  175. package/dist/cli-bundle/chunks/chunk-OGVTB5VO.js.map +7 -0
  176. package/dist/cli-bundle/chunks/{chunk-H2Z3FYXQ.js → chunk-OWP6QFBV.js} +4 -4
  177. package/dist/cli-bundle/chunks/{chunk-Q7A43DS4.js → chunk-P22HGFFI.js} +2 -2
  178. package/dist/cli-bundle/chunks/{chunk-NVPZIJVR.js → chunk-PT7MCCGD.js} +2 -2
  179. package/dist/cli-bundle/chunks/{chunk-ONG5V5CI.js → chunk-QPGQNLPI.js} +1751 -70
  180. package/dist/cli-bundle/chunks/chunk-QPGQNLPI.js.map +1 -0
  181. package/dist/cli-bundle/chunks/{chunk-J6EY5V4N.js → chunk-QRZNCRNA.js} +9 -9
  182. package/dist/cli-bundle/chunks/{chunk-QIPLHNP7.js → chunk-QWBKN3QC.js} +5 -5
  183. package/dist/cli-bundle/chunks/{chunk-7PIWCHTW.js → chunk-R5XTTZSJ.js} +5 -5
  184. package/dist/cli-bundle/chunks/{chunk-JOUQZENX.js → chunk-RC4UOUXA.js} +3 -3
  185. package/dist/cli-bundle/chunks/{chunk-BEP7WJA2.js → chunk-RGMWJLXF.js} +4 -4
  186. package/dist/cli-bundle/chunks/{chunk-NP22ERDF.js → chunk-RTBX3C4C.js} +3 -3
  187. package/dist/cli-bundle/chunks/{chunk-FNSPG7MU.js → chunk-RXPQ5Q23.js} +7 -7
  188. package/dist/cli-bundle/chunks/{chunk-LPYWLWDS.js → chunk-SIPOACV5.js} +534 -447
  189. package/dist/cli-bundle/chunks/chunk-SIPOACV5.js.map +1 -0
  190. package/dist/cli-bundle/chunks/chunk-TGBTLGPX.js +851 -0
  191. package/dist/cli-bundle/chunks/chunk-TGBTLGPX.js.map +7 -0
  192. package/dist/cli-bundle/chunks/{chunk-2WSE6PO2.js → chunk-TLWJP5BF.js} +5 -5
  193. package/dist/cli-bundle/chunks/chunk-TLWJP5BF.js.map +7 -0
  194. package/dist/cli-bundle/chunks/{chunk-ULTHRDBP.js → chunk-TM5CIO3F.js} +3 -3
  195. package/dist/cli-bundle/chunks/{chunk-UWQHLMEB.js → chunk-TZAE66GQ.js} +8 -8
  196. package/dist/cli-bundle/chunks/{chunk-OW4JWD5M.js → chunk-VAHZIPWS.js} +4 -4
  197. package/dist/cli-bundle/chunks/{chunk-DYH63FX7.js → chunk-VE6ZSTQW.js} +4 -4
  198. package/dist/cli-bundle/chunks/{chunk-3AUGG2DP.js → chunk-W5E2UUSH.js} +3 -3
  199. package/dist/cli-bundle/chunks/{chunk-BSEQUTQP.js → chunk-WACRQ26A.js} +2 -2
  200. package/dist/cli-bundle/chunks/{chunk-BSEQUTQP.js.map → chunk-WACRQ26A.js.map} +1 -1
  201. package/dist/cli-bundle/chunks/{chunk-UOHFKBUV.js → chunk-WL3SS45P.js} +3 -3
  202. package/dist/cli-bundle/chunks/{chunk-H5APFTHZ.js → chunk-WQXRZMFN.js} +204 -33
  203. package/dist/cli-bundle/chunks/chunk-WQXRZMFN.js.map +7 -0
  204. package/dist/cli-bundle/chunks/{chunk-QKJGPFAF.js → chunk-WU3KAN6A.js} +3 -3
  205. package/dist/cli-bundle/chunks/{chunk-IA5FKNII.js → chunk-X2MGQMZO.js} +2 -2
  206. package/dist/cli-bundle/chunks/{chunk-TD3LVC7D.js → chunk-X5YCTFKT.js} +3 -3
  207. package/dist/cli-bundle/chunks/{chunk-B7PE22W6.js → chunk-XC2HEEOV.js} +4 -4
  208. package/dist/cli-bundle/chunks/{chunk-7Z4LKRS4.js → chunk-XPUTSGJU.js} +38 -37
  209. package/dist/cli-bundle/chunks/chunk-XPUTSGJU.js.map +1 -0
  210. package/dist/cli-bundle/chunks/{chunk-YBLZ2VE7.js → chunk-XWBD6DSR.js} +320 -239
  211. package/dist/cli-bundle/chunks/chunk-XWBD6DSR.js.map +7 -0
  212. package/dist/cli-bundle/chunks/chunk-XWYQ2LT4.js +834 -0
  213. package/dist/cli-bundle/chunks/chunk-XWYQ2LT4.js.map +1 -0
  214. package/dist/cli-bundle/chunks/{chunk-K2X6U4UA.js → chunk-XXLXJL7V.js} +4 -4
  215. package/dist/cli-bundle/chunks/{chunk-2NCIPMQP.js → chunk-YFE7JHX3.js} +27 -6
  216. package/dist/cli-bundle/chunks/chunk-YFE7JHX3.js.map +1 -0
  217. package/dist/cli-bundle/chunks/{chunk-EACOH7AU.js → chunk-YIIIAKCE.js} +8 -8
  218. package/dist/cli-bundle/chunks/{chunk-RLCHOOHC.js → chunk-YJSURTBB.js} +2 -2
  219. package/dist/cli-bundle/chunks/{chunk-PGY23YTC.js → chunk-YKFHF37B.js} +3 -3
  220. package/dist/cli-bundle/chunks/{chunk-EYLCSJAI.js → chunk-YQEZWI3R.js} +2 -2
  221. package/dist/cli-bundle/chunks/close-GPD7DTJV.js +12 -0
  222. package/dist/cli-bundle/chunks/{close-CWODTPKG.js → close-X3CF6FQP.js} +5 -5
  223. package/dist/cli-bundle/chunks/{close-many-CQFUY7MR.js → close-many-J7A5EHOQ.js} +14 -14
  224. package/dist/cli-bundle/chunks/close-many-NQLYGPYW.js +23 -0
  225. package/dist/cli-bundle/chunks/comments-2AOZQ5D2.js +13 -0
  226. package/dist/cli-bundle/chunks/{comments-WGLHR7LB.js → comments-TMHMALA5.js} +7 -7
  227. package/dist/cli-bundle/chunks/{copy-LXVDXH7B.js → copy-FWQA5OU4.js} +4 -4
  228. package/dist/cli-bundle/chunks/copy-N3LCQBMC.js +9 -0
  229. package/dist/cli-bundle/chunks/{create-LBVCYMEG.js → create-AQ5SIGZC.js} +9 -9
  230. package/dist/cli-bundle/chunks/{create-J5U6ND4K.js → create-KOGQ3JKD.js} +9 -9
  231. package/dist/cli-bundle/chunks/delete-6G3MBZ6S.js +10 -0
  232. package/dist/cli-bundle/chunks/{delete-PMJBNY5G.js → delete-YYYFOSEA.js} +4 -4
  233. package/dist/cli-bundle/chunks/{deps-JZ7TMVCB.js → deps-MQ4ZIGZB.js} +16 -7
  234. package/dist/cli-bundle/chunks/deps-NIIKXLPB.js +28 -0
  235. package/dist/cli-bundle/chunks/{docs-FEWB2DQB.js → docs-53NUGMIQ.js} +6 -6
  236. package/dist/cli-bundle/chunks/docs-OWRGDMNY.js +14 -0
  237. package/dist/cli-bundle/chunks/{files-EFIWKFTM.js → files-3PXGXYDB.js} +6 -6
  238. package/dist/cli-bundle/chunks/{files-6YFBJRBG.js → files-EGLKHD7O.js} +6 -6
  239. package/dist/cli-bundle/chunks/focus-KZLIA6WS.js +10 -0
  240. package/dist/cli-bundle/chunks/{focus-4QJR7FOQ.js → focus-SRPASFTN.js} +5 -5
  241. package/dist/cli-bundle/chunks/{history-compact-CKRPDTJN.js → history-compact-G4DULDCX.js} +6 -6
  242. package/dist/cli-bundle/chunks/history-compact-HHIUOMZ7.js +16 -0
  243. package/dist/cli-bundle/chunks/{history-redact-BB3TGDAE.js → history-redact-IUSJ6X3E.js} +4 -4
  244. package/dist/cli-bundle/chunks/{history-redact-D225BHOZ.js → history-redact-THHGRQXV.js} +4 -4
  245. package/dist/cli-bundle/chunks/history-repair-KG7SWXI6.js +16 -0
  246. package/dist/cli-bundle/chunks/{history-repair-RQXKQHL4.js → history-repair-LUQWRS7X.js} +6 -6
  247. package/dist/cli-bundle/chunks/{learnings-JLNLCOL5.js → learnings-2MRNBFJF.js} +7 -7
  248. package/dist/cli-bundle/chunks/learnings-ZVHSALJY.js +13 -0
  249. package/dist/cli-bundle/chunks/{notes-GB47XXQQ.js → notes-73JWKWUD.js} +7 -7
  250. package/dist/cli-bundle/chunks/notes-BAKUL5DJ.js +13 -0
  251. package/dist/cli-bundle/chunks/{plan-VDCJ2PCN.js → plan-AZPMCG37.js} +10 -10
  252. package/dist/cli-bundle/chunks/plan-LEAGLPGP.js +24 -0
  253. package/dist/cli-bundle/chunks/{profile-FAU7NZML.js → profile-AVCIIZID.js} +9 -9
  254. package/dist/cli-bundle/chunks/{profile-IVXQEL3D.js → profile-LFYO3HHX.js} +9 -9
  255. package/dist/cli-bundle/chunks/{register-list-query-UL4UKBBN.js → register-list-query-MZUF2EEC.js} +50 -22
  256. package/dist/cli-bundle/chunks/register-list-query-MZUF2EEC.js.map +1 -0
  257. package/dist/cli-bundle/chunks/{register-list-query-DKA3EH5D.js → register-list-query-UKMF55FT.js} +49 -21
  258. package/dist/cli-bundle/chunks/register-list-query-UKMF55FT.js.map +7 -0
  259. package/dist/cli-bundle/chunks/{register-mutation-RBBJ52DK.js → register-mutation-2PBW2GEX.js} +35 -33
  260. package/dist/cli-bundle/chunks/register-mutation-2PBW2GEX.js.map +1 -0
  261. package/dist/cli-bundle/chunks/{register-mutation-ARFHRW55.js → register-mutation-T6RVNJC4.js} +34 -32
  262. package/dist/cli-bundle/chunks/{register-mutation-ARFHRW55.js.map → register-mutation-T6RVNJC4.js.map} +2 -2
  263. package/dist/cli-bundle/chunks/{register-operations-ZIBBRSED.js → register-operations-KHZYR6MG.js} +35 -35
  264. package/dist/cli-bundle/chunks/{register-operations-ZUJ5JWPE.js → register-operations-WPQ2LWZJ.js} +35 -35
  265. package/dist/cli-bundle/chunks/{register-setup-BCVLFEYS.js → register-setup-PGDNOXDQ.js} +15 -15
  266. package/dist/cli-bundle/chunks/{register-setup-TDCGWIOS.js → register-setup-TDN7WAO6.js} +15 -15
  267. package/dist/cli-bundle/chunks/{restore-25DLT2Q2.js → restore-E3PRGDN3.js} +6 -6
  268. package/dist/cli-bundle/chunks/restore-KIUYTAEJ.js +14 -0
  269. package/dist/cli-bundle/chunks/{schema-FNU3WE4O.js → schema-5JNFQFUW.js} +6 -6
  270. package/dist/cli-bundle/chunks/{schema-NBCM3RAD.js → schema-TMIW4XZC.js} +6 -6
  271. package/dist/cli-bundle/chunks/{update-XHSIAIXE.js → update-SQYZA3ZW.js} +12 -12
  272. package/dist/cli-bundle/chunks/update-XZJYS5X7.js +21 -0
  273. package/dist/cli-bundle/chunks/update-many-R24B3GBK.js +36 -0
  274. package/dist/cli-bundle/chunks/update-many-WQ3R3J6N.js +32 -0
  275. package/dist/cli-bundle/main.js +170 -856
  276. package/dist/cli-bundle/main.js.map +4 -4
  277. package/dist/cli-bundle/sdk-runtime.js +57 -54
  278. package/dist/cli-bundle/sdk-testing.js +6 -6
  279. package/dist/cli-bundle/sdk.js +266 -340
  280. package/dist/cli-bundle/sdk.js.map +4 -4
  281. package/dist/core/extensions/item-fields.js +2 -2
  282. package/dist/core/extensions/item-fields.js.map +1 -1
  283. package/dist/core/item/actionability.d.ts +12 -0
  284. package/dist/core/item/actionability.js +39 -4
  285. package/dist/core/item/actionability.js.map +1 -1
  286. package/dist/core/sentry/instrument.d.ts +11 -0
  287. package/dist/core/sentry/instrument.js +21 -2
  288. package/dist/core/sentry/instrument.js.map +1 -1
  289. package/dist/mcp/server.d.ts +16 -18
  290. package/dist/mcp/server.js +84 -31
  291. package/dist/mcp/server.js.map +1 -1
  292. package/dist/mcp/tool-definitions.js +17 -4
  293. package/dist/mcp/tool-definitions.js.map +1 -1
  294. package/dist/sdk/actionability.d.ts +10 -0
  295. package/dist/sdk/actionability.js +14 -0
  296. package/dist/sdk/actionability.js.map +1 -0
  297. package/dist/sdk/cli-bootstrap.d.ts +122 -0
  298. package/dist/sdk/cli-bootstrap.js +879 -0
  299. package/dist/sdk/cli-bootstrap.js.map +1 -0
  300. package/dist/sdk/cli-contracts/enum-contracts.d.ts +6 -2
  301. package/dist/sdk/cli-contracts/enum-contracts.js +19 -2
  302. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  303. package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
  304. package/dist/sdk/cli-contracts/flag-contracts.js +21 -2
  305. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  306. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +2 -0
  307. package/dist/sdk/cli-contracts/tool-option-contracts.js +16 -2
  308. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  309. package/dist/sdk/cli-contracts/tool-parameter-tables.js +80 -3
  310. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  311. package/dist/sdk/cli-contracts/tool-schema.d.ts +20 -0
  312. package/dist/sdk/cli-contracts/tool-schema.js +97 -9
  313. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  314. package/dist/sdk/cli-contracts.d.ts +2 -2
  315. package/dist/sdk/cli-contracts.js +4 -4
  316. package/dist/sdk/cli-contracts.js.map +1 -1
  317. package/dist/sdk/dependencies.d.ts +42 -53
  318. package/dist/sdk/dependencies.js +177 -125
  319. package/dist/sdk/dependencies.js.map +1 -1
  320. package/dist/sdk/eval.d.ts +66 -0
  321. package/dist/sdk/eval.js +186 -0
  322. package/dist/sdk/eval.js.map +1 -0
  323. package/dist/sdk/governance/validate.js +3 -3
  324. package/dist/sdk/governance/validate.js.map +1 -1
  325. package/dist/sdk/graph/analytics.d.ts +124 -0
  326. package/dist/sdk/graph/analytics.js +464 -0
  327. package/dist/sdk/graph/analytics.js.map +1 -0
  328. package/dist/sdk/graph/assembly.d.ts +97 -0
  329. package/dist/sdk/graph/assembly.js +146 -0
  330. package/dist/sdk/graph/assembly.js.map +1 -0
  331. package/dist/sdk/graph/cache.d.ts +66 -0
  332. package/dist/sdk/graph/cache.js +148 -0
  333. package/dist/sdk/graph/cache.js.map +1 -0
  334. package/dist/sdk/graph/governance.d.ts +108 -0
  335. package/dist/sdk/graph/governance.js +360 -0
  336. package/dist/sdk/graph/governance.js.map +1 -0
  337. package/dist/sdk/graph/index.d.ts +16 -0
  338. package/dist/sdk/graph/index.js +20 -0
  339. package/dist/sdk/graph/index.js.map +1 -0
  340. package/dist/sdk/graph/remediation.d.ts +52 -0
  341. package/dist/sdk/graph/remediation.js +148 -0
  342. package/dist/sdk/graph/remediation.js.map +1 -0
  343. package/dist/sdk/graph/run.d.ts +295 -0
  344. package/dist/sdk/graph/run.js +468 -0
  345. package/dist/sdk/graph/run.js.map +1 -0
  346. package/dist/sdk/graph/traversal.d.ts +77 -0
  347. package/dist/sdk/graph/traversal.js +262 -0
  348. package/dist/sdk/graph/traversal.js.map +1 -0
  349. package/dist/sdk/index.d.ts +19 -5
  350. package/dist/sdk/index.js +21 -7
  351. package/dist/sdk/index.js.map +1 -1
  352. package/dist/{cli/commands → sdk/query}/item-filter-options.d.ts +1 -1
  353. package/dist/{cli/commands → sdk/query}/item-filter-options.js +3 -3
  354. package/dist/sdk/query/item-filter-options.js.map +1 -0
  355. package/dist/sdk/query/list.d.ts +262 -0
  356. package/dist/sdk/query/list.js +1089 -0
  357. package/dist/sdk/query/list.js.map +1 -0
  358. package/dist/sdk/query/parsers.d.ts +9 -0
  359. package/dist/sdk/query/parsers.js +45 -0
  360. package/dist/sdk/query/parsers.js.map +1 -0
  361. package/dist/{cli/commands → sdk/query}/search-pagination.js +4 -4
  362. package/dist/sdk/query/search-pagination.js.map +1 -0
  363. package/dist/{cli/commands → sdk/query}/search-rendering.js +3 -3
  364. package/dist/sdk/query/search-rendering.js.map +1 -0
  365. package/dist/sdk/query/search.d.ts +469 -0
  366. package/dist/sdk/query/search.js +2247 -0
  367. package/dist/sdk/query/search.js.map +1 -0
  368. package/dist/sdk/relationship-context.d.ts +42 -0
  369. package/dist/sdk/relationship-context.js +99 -20
  370. package/dist/sdk/relationship-context.js.map +1 -1
  371. package/dist/sdk/relationships.d.ts +13 -0
  372. package/dist/sdk/relationships.js +30 -2
  373. package/dist/sdk/relationships.js.map +1 -1
  374. package/dist/sdk/runtime-input.d.ts +41 -0
  375. package/dist/sdk/runtime-input.js +422 -2
  376. package/dist/sdk/runtime-input.js.map +1 -1
  377. package/dist/sdk/runtime.d.ts +19 -30
  378. package/dist/sdk/runtime.js +30 -376
  379. package/dist/sdk/runtime.js.map +1 -1
  380. package/dist/sdk/search-refresh-worker.d.ts +2 -0
  381. package/dist/sdk/search-refresh-worker.js +19 -0
  382. package/dist/sdk/search-refresh-worker.js.map +1 -0
  383. package/dist/sdk/stats.d.ts +66 -0
  384. package/dist/sdk/stats.js +151 -0
  385. package/dist/sdk/stats.js.map +1 -0
  386. package/dist/sdk/telemetry-flush.d.ts +2 -0
  387. package/dist/sdk/telemetry-flush.js +14 -0
  388. package/dist/sdk/telemetry-flush.js.map +1 -0
  389. package/dist/sdk/telemetry.d.ts +14 -0
  390. package/dist/sdk/telemetry.js +398 -0
  391. package/dist/sdk/telemetry.js.map +1 -0
  392. package/dist/sdk/test/batch.d.ts +94 -0
  393. package/dist/sdk/test/batch.js +492 -0
  394. package/dist/sdk/test/batch.js.map +1 -0
  395. package/dist/sdk/test/entry.d.ts +6 -0
  396. package/dist/sdk/test/entry.js +74 -0
  397. package/dist/sdk/test/entry.js.map +1 -0
  398. package/dist/sdk/test/execution.d.ts +282 -0
  399. package/dist/sdk/test/execution.js +1817 -0
  400. package/dist/sdk/test/execution.js.map +1 -0
  401. package/dist/sdk/test/linked-command-detection.js +12 -3
  402. package/dist/sdk/test/linked-command-detection.js.map +1 -1
  403. package/dist/sdk/test/parsers.d.ts +48 -0
  404. package/dist/sdk/test/parsers.js +522 -0
  405. package/dist/sdk/test/parsers.js.map +1 -0
  406. package/dist/sdk/test/runs.d.ts +92 -0
  407. package/dist/sdk/test/runs.js +195 -0
  408. package/dist/sdk/test/runs.js.map +1 -0
  409. package/docs/AGENT_GUIDE.md +1 -0
  410. package/docs/COMMANDS.md +19 -1
  411. package/docs/RELATIONSHIP_GRAPH.md +99 -3
  412. package/docs/SDK.md +139 -3
  413. package/docs/SDK_PRIMITIVE_INVENTORY.md +5 -3
  414. package/docs/examples/sdk-custom-tool/README.md +27 -0
  415. package/docs/examples/sdk-custom-tool/package.json +13 -0
  416. package/docs/examples/sdk-custom-tool/src/cli.ts +36 -0
  417. package/docs/examples/sdk-custom-tool/src/entry.ts +15 -0
  418. package/docs/examples/sdk-custom-tool/src/index.ts +223 -0
  419. package/marketplace.json +2 -2
  420. package/package.json +4 -4
  421. package/packages/pm-beads/package.json +1 -1
  422. package/packages/pm-calendar/package.json +1 -1
  423. package/packages/pm-command-kit/package.json +1 -1
  424. package/packages/pm-governance-audit/extensions/governance-audit/comments-audit.ts +77 -57
  425. package/packages/pm-governance-audit/extensions/governance-audit/dedupe-audit.ts +202 -194
  426. package/packages/pm-governance-audit/extensions/governance-audit/dedupe-merge.ts +227 -153
  427. package/packages/pm-governance-audit/extensions/governance-audit/normalize.ts +169 -125
  428. package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +130 -81
  429. package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +53 -4
  430. package/packages/pm-governance-audit/package.json +1 -1
  431. package/packages/pm-guide-shell/package.json +1 -1
  432. package/packages/pm-kanban/package.json +1 -1
  433. package/packages/pm-lifecycle-hooks/package.json +1 -1
  434. package/packages/pm-linked-test-adapters/package.json +1 -1
  435. package/packages/pm-search-advanced/package.json +1 -1
  436. package/packages/pm-templates/package.json +1 -1
  437. package/packages/pm-todos/package.json +1 -1
  438. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  439. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  440. package/dist/cli/commands/item-filter-options.js.map +0 -1
  441. package/dist/cli/commands/search-pagination.js.map +0 -1
  442. package/dist/cli/commands/search-rendering.js.map +0 -1
  443. package/dist/cli-bundle/chunks/append-UZVHUO74.js +0 -11
  444. package/dist/cli-bundle/chunks/chunk-2NCIPMQP.js.map +0 -1
  445. package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +0 -1
  446. package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +0 -7
  447. package/dist/cli-bundle/chunks/chunk-5JLUII3O.js.map +0 -1
  448. package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +0 -1
  449. package/dist/cli-bundle/chunks/chunk-7Z4LKRS4.js.map +0 -1
  450. package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js.map +0 -7
  451. package/dist/cli-bundle/chunks/chunk-E2OJMKML.js.map +0 -7
  452. package/dist/cli-bundle/chunks/chunk-EH2OPHBI.js.map +0 -1
  453. package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +0 -7
  454. package/dist/cli-bundle/chunks/chunk-HYB5AZ63.js.map +0 -7
  455. package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +0 -7
  456. package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js.map +0 -1
  457. package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +0 -1
  458. package/dist/cli-bundle/chunks/chunk-NLDFBC6J.js.map +0 -7
  459. package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +0 -1
  460. package/dist/cli-bundle/chunks/chunk-UFXU44HV.js.map +0 -1
  461. package/dist/cli-bundle/chunks/chunk-UMOPHQSU.js.map +0 -7
  462. package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +0 -1
  463. package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +0 -7
  464. package/dist/cli-bundle/chunks/chunk-YBLZ2VE7.js.map +0 -7
  465. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +0 -58
  466. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +0 -1
  467. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +0 -68
  468. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +0 -7
  469. package/dist/cli-bundle/chunks/close-W6LI2PKM.js +0 -12
  470. package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +0 -23
  471. package/dist/cli-bundle/chunks/comments-E3TNTK24.js +0 -13
  472. package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +0 -9
  473. package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +0 -10
  474. package/dist/cli-bundle/chunks/deps-OA26IS25.js +0 -19
  475. package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +0 -14
  476. package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +0 -10
  477. package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +0 -16
  478. package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +0 -16
  479. package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +0 -13
  480. package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +0 -13
  481. package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +0 -24
  482. package/dist/cli-bundle/chunks/register-list-query-DKA3EH5D.js.map +0 -7
  483. package/dist/cli-bundle/chunks/register-list-query-UL4UKBBN.js.map +0 -1
  484. package/dist/cli-bundle/chunks/register-mutation-RBBJ52DK.js.map +0 -1
  485. package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +0 -14
  486. package/dist/cli-bundle/chunks/update-WWBYOPXO.js +0 -21
  487. package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +0 -32
  488. package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +0 -36
  489. /package/dist/cli-bundle/chunks/{append-OJQFUQ4T.js.map → append-5YF3TO7I.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{append-UZVHUO74.js.map → append-JHO5K6RP.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{chunk-BCOFWYW4.js.map → chunk-2BX74BAS.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{chunk-APRVSW2O.js.map → chunk-2CXL335K.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{chunk-KG44YSKD.js.map → chunk-2FUOXSRN.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{chunk-HDH3JUGG.js.map → chunk-2IPNL3DR.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{chunk-GM5QHQU6.js.map → chunk-2XOSFSTH.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{chunk-K3WII2ME.js.map → chunk-37DRDP2B.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{chunk-PMOSXADO.js.map → chunk-47HXN6RX.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{chunk-6CFNAVTF.js.map → chunk-5HGZKQUL.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{chunk-2IFFUZLC.js.map → chunk-5UKQLQM2.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{chunk-DM4H7FP4.js.map → chunk-633PKXLT.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{chunk-XSJUSQAE.js.map → chunk-646MQXFW.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{chunk-ZI6VQWQ7.js.map → chunk-66MKH7SZ.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{chunk-S6MQESFR.js.map → chunk-67RO3H4N.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{chunk-34L5OT3Y.js.map → chunk-6DYOZS6C.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{chunk-RRM5JYJC.js.map → chunk-6O44IN44.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{chunk-PENXZX3U.js.map → chunk-74FKFFXO.js.map} +0 -0
  507. /package/dist/cli-bundle/chunks/{chunk-HO4KXD6I.js.map → chunk-7H5NNCJ5.js.map} +0 -0
  508. /package/dist/cli-bundle/chunks/{chunk-TQSZFPIS.js.map → chunk-AFGKSHAM.js.map} +0 -0
  509. /package/dist/cli-bundle/chunks/{chunk-6N2VXVTQ.js.map → chunk-ARGDWQ4J.js.map} +0 -0
  510. /package/dist/cli-bundle/chunks/{chunk-3U7ZR6M4.js.map → chunk-B57RJHBZ.js.map} +0 -0
  511. /package/dist/cli-bundle/chunks/{chunk-YCQET3OT.js.map → chunk-BAP7G3N2.js.map} +0 -0
  512. /package/dist/cli-bundle/chunks/{chunk-QKXHFPYM.js.map → chunk-BIRYX32V.js.map} +0 -0
  513. /package/dist/cli-bundle/chunks/{chunk-RMLWNPH2.js.map → chunk-BVLOMU6O.js.map} +0 -0
  514. /package/dist/cli-bundle/chunks/{chunk-2VPAVL7O.js.map → chunk-CKX4WOPC.js.map} +0 -0
  515. /package/dist/cli-bundle/chunks/{chunk-TKOVBP6C.js.map → chunk-D52ZN3BF.js.map} +0 -0
  516. /package/dist/cli-bundle/chunks/{chunk-KPMKHGEA.js.map → chunk-D53RTYVI.js.map} +0 -0
  517. /package/dist/cli-bundle/chunks/{chunk-ODALILG3.js.map → chunk-D5XHO4Q7.js.map} +0 -0
  518. /package/dist/cli-bundle/chunks/{chunk-YAQEBNY7.js.map → chunk-DDFGYUCQ.js.map} +0 -0
  519. /package/dist/cli-bundle/chunks/{chunk-EAB64KLB.js.map → chunk-DG2EQRIH.js.map} +0 -0
  520. /package/dist/cli-bundle/chunks/{chunk-IG3SWA4A.js.map → chunk-EHJFUOXL.js.map} +0 -0
  521. /package/dist/cli-bundle/chunks/{chunk-P74IZQ7A.js.map → chunk-EWIT5WIC.js.map} +0 -0
  522. /package/dist/cli-bundle/chunks/{chunk-ONREO4ST.js.map → chunk-EY7ZE3TG.js.map} +0 -0
  523. /package/dist/cli-bundle/chunks/{chunk-EJEXHTY5.js.map → chunk-FHOBCGQO.js.map} +0 -0
  524. /package/dist/cli-bundle/chunks/{chunk-H3EIEWGR.js.map → chunk-FL4D53ND.js.map} +0 -0
  525. /package/dist/cli-bundle/chunks/{chunk-WUJQK4YV.js.map → chunk-FVNWHUME.js.map} +0 -0
  526. /package/dist/cli-bundle/chunks/{chunk-INU6DKT5.js.map → chunk-FXFCFL73.js.map} +0 -0
  527. /package/dist/cli-bundle/chunks/{chunk-QEHQ2GVG.js.map → chunk-FY4RLHSC.js.map} +0 -0
  528. /package/dist/cli-bundle/chunks/{chunk-AHVTB5I5.js.map → chunk-G6MYGULG.js.map} +0 -0
  529. /package/dist/cli-bundle/chunks/{chunk-TSMHDIW4.js.map → chunk-GLZKZON6.js.map} +0 -0
  530. /package/dist/cli-bundle/chunks/{chunk-2JKGO6QX.js.map → chunk-H5IOT54C.js.map} +0 -0
  531. /package/dist/cli-bundle/chunks/{chunk-SELVXEZK.js.map → chunk-HO4DLBNK.js.map} +0 -0
  532. /package/dist/cli-bundle/chunks/{chunk-CRVF2JDM.js.map → chunk-HPAYDSR2.js.map} +0 -0
  533. /package/dist/cli-bundle/chunks/{chunk-3CLU2XZO.js.map → chunk-HSYV4ZYT.js.map} +0 -0
  534. /package/dist/cli-bundle/chunks/{chunk-J5AOEGDC.js.map → chunk-HYTOJW2Q.js.map} +0 -0
  535. /package/dist/cli-bundle/chunks/{chunk-NU3IMIEA.js.map → chunk-I7DIDUSP.js.map} +0 -0
  536. /package/dist/cli-bundle/chunks/{chunk-JYFOV7FC.js.map → chunk-IE5KRAKN.js.map} +0 -0
  537. /package/dist/cli-bundle/chunks/{chunk-YAROI3PD.js.map → chunk-IL5SPRMH.js.map} +0 -0
  538. /package/dist/cli-bundle/chunks/{chunk-UY2ACEMF.js.map → chunk-ILVOOAT4.js.map} +0 -0
  539. /package/dist/cli-bundle/chunks/{chunk-GOSLKLFE.js.map → chunk-KH6QAHME.js.map} +0 -0
  540. /package/dist/cli-bundle/chunks/{chunk-WQPUU7XD.js.map → chunk-L337QKWJ.js.map} +0 -0
  541. /package/dist/cli-bundle/chunks/{chunk-LSG2U345.js.map → chunk-L6FVNR7X.js.map} +0 -0
  542. /package/dist/cli-bundle/chunks/{chunk-FMBNM2EN.js.map → chunk-LSOWTLEM.js.map} +0 -0
  543. /package/dist/cli-bundle/chunks/{chunk-4223PVZT.js.map → chunk-M7MVOKVV.js.map} +0 -0
  544. /package/dist/cli-bundle/chunks/{chunk-3WM75PWC.js.map → chunk-N33FD2UI.js.map} +0 -0
  545. /package/dist/cli-bundle/chunks/{chunk-6S3YSUYG.js.map → chunk-NNANAWFH.js.map} +0 -0
  546. /package/dist/cli-bundle/chunks/{chunk-IJIICKVW.js.map → chunk-NTRQLE2R.js.map} +0 -0
  547. /package/dist/cli-bundle/chunks/{chunk-SDQLJWBO.js.map → chunk-NVZ6NVHJ.js.map} +0 -0
  548. /package/dist/cli-bundle/chunks/{chunk-H2Z3FYXQ.js.map → chunk-OWP6QFBV.js.map} +0 -0
  549. /package/dist/cli-bundle/chunks/{chunk-Q7A43DS4.js.map → chunk-P22HGFFI.js.map} +0 -0
  550. /package/dist/cli-bundle/chunks/{chunk-NVPZIJVR.js.map → chunk-PT7MCCGD.js.map} +0 -0
  551. /package/dist/cli-bundle/chunks/{chunk-J6EY5V4N.js.map → chunk-QRZNCRNA.js.map} +0 -0
  552. /package/dist/cli-bundle/chunks/{chunk-QIPLHNP7.js.map → chunk-QWBKN3QC.js.map} +0 -0
  553. /package/dist/cli-bundle/chunks/{chunk-7PIWCHTW.js.map → chunk-R5XTTZSJ.js.map} +0 -0
  554. /package/dist/cli-bundle/chunks/{chunk-JOUQZENX.js.map → chunk-RC4UOUXA.js.map} +0 -0
  555. /package/dist/cli-bundle/chunks/{chunk-BEP7WJA2.js.map → chunk-RGMWJLXF.js.map} +0 -0
  556. /package/dist/cli-bundle/chunks/{chunk-NP22ERDF.js.map → chunk-RTBX3C4C.js.map} +0 -0
  557. /package/dist/cli-bundle/chunks/{chunk-FNSPG7MU.js.map → chunk-RXPQ5Q23.js.map} +0 -0
  558. /package/dist/cli-bundle/chunks/{chunk-ULTHRDBP.js.map → chunk-TM5CIO3F.js.map} +0 -0
  559. /package/dist/cli-bundle/chunks/{chunk-UWQHLMEB.js.map → chunk-TZAE66GQ.js.map} +0 -0
  560. /package/dist/cli-bundle/chunks/{chunk-OW4JWD5M.js.map → chunk-VAHZIPWS.js.map} +0 -0
  561. /package/dist/cli-bundle/chunks/{chunk-DYH63FX7.js.map → chunk-VE6ZSTQW.js.map} +0 -0
  562. /package/dist/cli-bundle/chunks/{chunk-3AUGG2DP.js.map → chunk-W5E2UUSH.js.map} +0 -0
  563. /package/dist/cli-bundle/chunks/{chunk-UOHFKBUV.js.map → chunk-WL3SS45P.js.map} +0 -0
  564. /package/dist/cli-bundle/chunks/{chunk-QKJGPFAF.js.map → chunk-WU3KAN6A.js.map} +0 -0
  565. /package/dist/cli-bundle/chunks/{chunk-IA5FKNII.js.map → chunk-X2MGQMZO.js.map} +0 -0
  566. /package/dist/cli-bundle/chunks/{chunk-TD3LVC7D.js.map → chunk-X5YCTFKT.js.map} +0 -0
  567. /package/dist/cli-bundle/chunks/{chunk-B7PE22W6.js.map → chunk-XC2HEEOV.js.map} +0 -0
  568. /package/dist/cli-bundle/chunks/{chunk-K2X6U4UA.js.map → chunk-XXLXJL7V.js.map} +0 -0
  569. /package/dist/cli-bundle/chunks/{chunk-EACOH7AU.js.map → chunk-YIIIAKCE.js.map} +0 -0
  570. /package/dist/cli-bundle/chunks/{chunk-RLCHOOHC.js.map → chunk-YJSURTBB.js.map} +0 -0
  571. /package/dist/cli-bundle/chunks/{chunk-PGY23YTC.js.map → chunk-YKFHF37B.js.map} +0 -0
  572. /package/dist/cli-bundle/chunks/{chunk-EYLCSJAI.js.map → chunk-YQEZWI3R.js.map} +0 -0
  573. /package/dist/cli-bundle/chunks/{close-W6LI2PKM.js.map → close-GPD7DTJV.js.map} +0 -0
  574. /package/dist/cli-bundle/chunks/{close-CWODTPKG.js.map → close-X3CF6FQP.js.map} +0 -0
  575. /package/dist/cli-bundle/chunks/{close-many-CQFUY7MR.js.map → close-many-J7A5EHOQ.js.map} +0 -0
  576. /package/dist/cli-bundle/chunks/{close-many-DLDDVSH5.js.map → close-many-NQLYGPYW.js.map} +0 -0
  577. /package/dist/cli-bundle/chunks/{comments-E3TNTK24.js.map → comments-2AOZQ5D2.js.map} +0 -0
  578. /package/dist/cli-bundle/chunks/{comments-WGLHR7LB.js.map → comments-TMHMALA5.js.map} +0 -0
  579. /package/dist/cli-bundle/chunks/{copy-LXVDXH7B.js.map → copy-FWQA5OU4.js.map} +0 -0
  580. /package/dist/cli-bundle/chunks/{copy-Q5ZJPUKR.js.map → copy-N3LCQBMC.js.map} +0 -0
  581. /package/dist/cli-bundle/chunks/{create-LBVCYMEG.js.map → create-AQ5SIGZC.js.map} +0 -0
  582. /package/dist/cli-bundle/chunks/{create-J5U6ND4K.js.map → create-KOGQ3JKD.js.map} +0 -0
  583. /package/dist/cli-bundle/chunks/{delete-WNHB3LYW.js.map → delete-6G3MBZ6S.js.map} +0 -0
  584. /package/dist/cli-bundle/chunks/{delete-PMJBNY5G.js.map → delete-YYYFOSEA.js.map} +0 -0
  585. /package/dist/cli-bundle/chunks/{deps-JZ7TMVCB.js.map → deps-MQ4ZIGZB.js.map} +0 -0
  586. /package/dist/cli-bundle/chunks/{deps-OA26IS25.js.map → deps-NIIKXLPB.js.map} +0 -0
  587. /package/dist/cli-bundle/chunks/{docs-FEWB2DQB.js.map → docs-53NUGMIQ.js.map} +0 -0
  588. /package/dist/cli-bundle/chunks/{docs-HA2AIDBB.js.map → docs-OWRGDMNY.js.map} +0 -0
  589. /package/dist/cli-bundle/chunks/{files-EFIWKFTM.js.map → files-3PXGXYDB.js.map} +0 -0
  590. /package/dist/cli-bundle/chunks/{files-6YFBJRBG.js.map → files-EGLKHD7O.js.map} +0 -0
  591. /package/dist/cli-bundle/chunks/{focus-POIW5LTJ.js.map → focus-KZLIA6WS.js.map} +0 -0
  592. /package/dist/cli-bundle/chunks/{focus-4QJR7FOQ.js.map → focus-SRPASFTN.js.map} +0 -0
  593. /package/dist/cli-bundle/chunks/{history-compact-CKRPDTJN.js.map → history-compact-G4DULDCX.js.map} +0 -0
  594. /package/dist/cli-bundle/chunks/{history-compact-FWG2C7FZ.js.map → history-compact-HHIUOMZ7.js.map} +0 -0
  595. /package/dist/cli-bundle/chunks/{history-redact-BB3TGDAE.js.map → history-redact-IUSJ6X3E.js.map} +0 -0
  596. /package/dist/cli-bundle/chunks/{history-redact-D225BHOZ.js.map → history-redact-THHGRQXV.js.map} +0 -0
  597. /package/dist/cli-bundle/chunks/{history-repair-6GEAM7HE.js.map → history-repair-KG7SWXI6.js.map} +0 -0
  598. /package/dist/cli-bundle/chunks/{history-repair-RQXKQHL4.js.map → history-repair-LUQWRS7X.js.map} +0 -0
  599. /package/dist/cli-bundle/chunks/{learnings-JLNLCOL5.js.map → learnings-2MRNBFJF.js.map} +0 -0
  600. /package/dist/cli-bundle/chunks/{learnings-RSNLSWDC.js.map → learnings-ZVHSALJY.js.map} +0 -0
  601. /package/dist/cli-bundle/chunks/{notes-GB47XXQQ.js.map → notes-73JWKWUD.js.map} +0 -0
  602. /package/dist/cli-bundle/chunks/{notes-2WDH6DXU.js.map → notes-BAKUL5DJ.js.map} +0 -0
  603. /package/dist/cli-bundle/chunks/{plan-VDCJ2PCN.js.map → plan-AZPMCG37.js.map} +0 -0
  604. /package/dist/cli-bundle/chunks/{plan-DOVI2VMW.js.map → plan-LEAGLPGP.js.map} +0 -0
  605. /package/dist/cli-bundle/chunks/{profile-FAU7NZML.js.map → profile-AVCIIZID.js.map} +0 -0
  606. /package/dist/cli-bundle/chunks/{profile-IVXQEL3D.js.map → profile-LFYO3HHX.js.map} +0 -0
  607. /package/dist/cli-bundle/chunks/{register-operations-ZIBBRSED.js.map → register-operations-KHZYR6MG.js.map} +0 -0
  608. /package/dist/cli-bundle/chunks/{register-operations-ZUJ5JWPE.js.map → register-operations-WPQ2LWZJ.js.map} +0 -0
  609. /package/dist/cli-bundle/chunks/{register-setup-BCVLFEYS.js.map → register-setup-PGDNOXDQ.js.map} +0 -0
  610. /package/dist/cli-bundle/chunks/{register-setup-TDCGWIOS.js.map → register-setup-TDN7WAO6.js.map} +0 -0
  611. /package/dist/cli-bundle/chunks/{restore-25DLT2Q2.js.map → restore-E3PRGDN3.js.map} +0 -0
  612. /package/dist/cli-bundle/chunks/{restore-YPMVUUEX.js.map → restore-KIUYTAEJ.js.map} +0 -0
  613. /package/dist/cli-bundle/chunks/{schema-FNU3WE4O.js.map → schema-5JNFQFUW.js.map} +0 -0
  614. /package/dist/cli-bundle/chunks/{schema-NBCM3RAD.js.map → schema-TMIW4XZC.js.map} +0 -0
  615. /package/dist/cli-bundle/chunks/{update-XHSIAIXE.js.map → update-SQYZA3ZW.js.map} +0 -0
  616. /package/dist/cli-bundle/chunks/{update-WWBYOPXO.js.map → update-XZJYS5X7.js.map} +0 -0
  617. /package/dist/cli-bundle/chunks/{update-many-TA7NGQBO.js.map → update-many-R24B3GBK.js.map} +0 -0
  618. /package/dist/cli-bundle/chunks/{update-many-OUGIU5SF.js.map → update-many-WQ3R3J6N.js.map} +0 -0
  619. /package/dist/{cli/commands → sdk/query}/search-pagination.d.ts +0 -0
  620. /package/dist/{cli/commands → sdk/query}/search-rendering.d.ts +0 -0
@@ -0,0 +1,800 @@
1
+ import {
2
+ assembleWorkspaceRelationshipGraph,
3
+ collectDanglingDependencyReferences,
4
+ createRelationshipKindRegistry
5
+ } from "./chunk-3CUQZNQ6.js";
6
+ import {
7
+ createQueryFingerprint,
8
+ encodeQueryCursor,
9
+ resolveQueryCursorStart
10
+ } from "./chunk-M7MVOKVV.js";
11
+ import {
12
+ getActiveExtensionRegistrations,
13
+ isTerminalStatus,
14
+ listAllItemMetadataLight,
15
+ locateItem,
16
+ readLocatedItem,
17
+ readSettings
18
+ } from "./chunk-646MQXFW.js";
19
+ import {
20
+ EXIT_CODE,
21
+ PmCliError,
22
+ getSettingsPath,
23
+ pathExists,
24
+ resolveItemTypeRegistry,
25
+ resolvePmRoot,
26
+ resolveRuntimeStatusRegistry
27
+ } from "./chunk-WACRQ26A.js";
28
+
29
+ // dist/sdk/graph/cache.js
30
+ import { createHash } from "node:crypto";
31
+ !(function() {
32
+ try {
33
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
34
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "6c46fa7f-4566-5a15-ac76-1666770dc806");
35
+ } catch (e2) {
36
+ }
37
+ })();
38
+ var DEFAULT_MAX_RESULTS_PER_WORKSPACE = 64;
39
+ var DEFAULT_MAX_WORKSPACES = 8;
40
+ function fingerprintLine(item, isTerminal) {
41
+ const dependencies = (item.dependencies ?? []).map((rawDependency) => {
42
+ if (typeof rawDependency !== "object" || rawDependency === null)
43
+ return "";
44
+ const dependency = rawDependency;
45
+ return `${typeof dependency.kind === "string" ? dependency.kind : "related"}:${typeof dependency.id === "string" ? dependency.id : ""}`;
46
+ }).sort().join(",");
47
+ return [
48
+ item.id,
49
+ item.title,
50
+ item.status,
51
+ isTerminal(item.status) ? "1" : "0",
52
+ item.parent ?? "",
53
+ item.blocked_by ?? "",
54
+ dependencies
55
+ ].join("\0");
56
+ }
57
+ function computeWorkspaceGraphFingerprint(items, isTerminal = (status) => status === "closed" || status === "canceled") {
58
+ const lines = items.filter((item) => typeof item?.id === "string" && item.id.trim().length > 0).map((item) => fingerprintLine(item, isTerminal)).sort();
59
+ return createHash("sha256").update(lines.join("")).digest("hex");
60
+ }
61
+ function requirePositiveCacheBound(name, value, fallback) {
62
+ const bound = value ?? fallback;
63
+ if (!Number.isInteger(bound) || bound < 1)
64
+ throw new TypeError(`Invalid ${name} bound: ${String(value)}`);
65
+ return bound;
66
+ }
67
+ var WorkspaceGraphCache = class {
68
+ #entries = /* @__PURE__ */ new Map();
69
+ #maxResultsPerWorkspace;
70
+ #maxWorkspaces;
71
+ /** Create a cache, optionally bounding workspaces and memoized results. */
72
+ constructor(options = {}) {
73
+ this.#maxResultsPerWorkspace = requirePositiveCacheBound("maxResultsPerWorkspace", options.maxResultsPerWorkspace, DEFAULT_MAX_RESULTS_PER_WORKSPACE);
74
+ this.#maxWorkspaces = requirePositiveCacheBound("maxWorkspaces", options.maxWorkspaces, DEFAULT_MAX_WORKSPACES);
75
+ }
76
+ /**
77
+ * Resolve the cached assembly for one workspace key and fingerprint,
78
+ * building and storing it on miss. The returned lookup exposes snapshot-
79
+ * scoped memoization for query results derived from the same assembly.
80
+ */
81
+ lookup(key, fingerprint, build) {
82
+ let entry = this.#entries.get(key);
83
+ let assemblyReused = true;
84
+ if (entry === void 0 || entry.fingerprint !== fingerprint) {
85
+ entry = { fingerprint, assembly: build(), results: /* @__PURE__ */ new Map() };
86
+ assemblyReused = false;
87
+ if (!this.#entries.has(key) && this.#entries.size >= this.#maxWorkspaces) {
88
+ this.#entries.delete(this.#entries.keys().next().value);
89
+ }
90
+ }
91
+ this.#entries.delete(key);
92
+ this.#entries.set(key, entry);
93
+ const resolved = entry;
94
+ const maxResults = this.#maxResultsPerWorkspace;
95
+ return {
96
+ assembly: resolved.assembly,
97
+ assemblyReused,
98
+ fingerprint,
99
+ memoize(queryKey, compute) {
100
+ const cached = resolved.results.get(queryKey);
101
+ if (cached !== void 0 || resolved.results.has(queryKey)) {
102
+ resolved.results.delete(queryKey);
103
+ resolved.results.set(queryKey, cached);
104
+ return { value: structuredClone(cached), reused: true };
105
+ }
106
+ const value = compute();
107
+ if (resolved.results.size >= maxResults) {
108
+ resolved.results.delete(resolved.results.keys().next().value);
109
+ }
110
+ resolved.results.set(queryKey, structuredClone(value));
111
+ return { value, reused: false };
112
+ }
113
+ };
114
+ }
115
+ /** Drop every cached workspace entry and memoized result. */
116
+ clear() {
117
+ this.#entries.clear();
118
+ }
119
+ };
120
+ var sharedCache = new WorkspaceGraphCache();
121
+ function workspaceGraphCache() {
122
+ return sharedCache;
123
+ }
124
+ function resetWorkspaceGraphCache() {
125
+ sharedCache.clear();
126
+ }
127
+
128
+ // dist/sdk/relationship-context.js
129
+ !(function() {
130
+ try {
131
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
132
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "cf26c4d0-d60f-5ec5-858f-957ad719383e");
133
+ } catch (e2) {
134
+ }
135
+ })();
136
+ var RELATIONSHIP_CONTEXT_ROLE_PRIORITY = [
137
+ "prerequisite",
138
+ "dependent",
139
+ "ancestor",
140
+ "descendant",
141
+ "provenance",
142
+ "related"
143
+ ];
144
+ var tokenEncoder = new TextEncoder();
145
+ function positiveInteger(value, fallback, field) {
146
+ const resolved = value ?? fallback;
147
+ if (!Number.isInteger(resolved) || resolved < 1)
148
+ throw new TypeError(`Relationship context ${field} must be positive`);
149
+ return resolved;
150
+ }
151
+ function estimateTokens(value) {
152
+ return Math.max(1, Math.ceil(tokenEncoder.encode(JSON.stringify(value)).byteLength / 4));
153
+ }
154
+ function explainDirectEdge(edge, node, registry) {
155
+ const definition = registry.resolve(edge.kind);
156
+ if (definition?.ordering) {
157
+ const sourceFirst = (definition.precedence ?? "source_before_target") === "source_before_target";
158
+ const before = sourceFirst ? edge.source : edge.target;
159
+ return node === before ? "prerequisite" : "dependent";
160
+ }
161
+ if (definition?.hierarchy) {
162
+ const sourceIsParent = (definition.hierarchyDirection ?? "source_parent") === "source_parent";
163
+ const parent = sourceIsParent ? edge.source : edge.target;
164
+ return node === parent ? "ancestor" : "descendant";
165
+ }
166
+ if (edge.kind === "discovered_from" || edge.kind === "incident_from")
167
+ return "provenance";
168
+ return "related";
169
+ }
170
+ function directReasons(rootEdges, root, node, registry) {
171
+ const reasons = rootEdges.filter((edge) => edge.source === root && edge.target === node || edge.target === root && edge.source === node).map((edge) => explainDirectEdge(edge, node, registry));
172
+ return [...new Set(reasons)].sort();
173
+ }
174
+ function primaryRole(roles) {
175
+ return RELATIONSHIP_CONTEXT_ROLE_PRIORITY.find((role) => roles.includes(role));
176
+ }
177
+ function discoverNodes(graph, root, registry, options) {
178
+ const direction = options.direction ?? "both";
179
+ const maxDepth = options.maxDepth ?? 3;
180
+ if (!Number.isInteger(maxDepth) || maxDepth < 0)
181
+ throw new TypeError("Relationship context maxDepth must be non-negative");
182
+ const seen = /* @__PURE__ */ new Set([root]);
183
+ const queue = [
184
+ { id: root, distance: 0 }
185
+ ];
186
+ const rows = [];
187
+ let inspectedEdges = 0;
188
+ let depthTruncated = false;
189
+ for (let index = 0; index < queue.length; index += 1) {
190
+ options.signal?.throwIfAborted();
191
+ const current = queue[index];
192
+ if (current.distance >= maxDepth && depthTruncated)
193
+ continue;
194
+ const adjacent = graph.neighborEdges(current.id, {
195
+ direction,
196
+ kinds: options.kinds,
197
+ signal: options.signal
198
+ });
199
+ inspectedEdges += adjacent.meta.inspectedEdges;
200
+ if (current.distance >= maxDepth) {
201
+ if (adjacent.value.some((row) => !seen.has(row.id)))
202
+ depthTruncated = true;
203
+ continue;
204
+ }
205
+ for (const { id, edge } of adjacent.value) {
206
+ if (seen.has(id))
207
+ continue;
208
+ seen.add(id);
209
+ const row = {
210
+ id,
211
+ distance: current.distance + 1,
212
+ via: current.id,
213
+ role: explainDirectEdge(edge, id, registry)
214
+ };
215
+ rows.push(row);
216
+ queue.push(row);
217
+ }
218
+ }
219
+ rows.sort((left, right) => left.distance - right.distance || left.id.localeCompare(right.id));
220
+ return {
221
+ rows,
222
+ visitedNodes: queue.length,
223
+ inspectedEdges,
224
+ depthTruncated
225
+ };
226
+ }
227
+ function summarizeDirectEdges(graph, root, registry, options) {
228
+ const directEdges = {
229
+ prerequisite: 0,
230
+ dependent: 0,
231
+ ancestor: 0,
232
+ descendant: 0,
233
+ provenance: 0,
234
+ related: 0
235
+ };
236
+ const rows = graph.neighborEdges(root, {
237
+ direction: options.direction ?? "both",
238
+ kinds: options.kinds,
239
+ signal: options.signal
240
+ }).value;
241
+ for (const { id, edge } of rows)
242
+ directEdges[explainDirectEdge(edge, id, registry)] += 1;
243
+ return {
244
+ directEdges,
245
+ directTotal: rows.length,
246
+ rootEdges: rows.map(({ edge }) => edge)
247
+ };
248
+ }
249
+ function selectContextNodes(params) {
250
+ const nodes = [];
251
+ let usedTokens = params.initialTokens;
252
+ for (const candidate of params.candidates) {
253
+ if (nodes.length >= params.nodeLimit)
254
+ break;
255
+ const direct = candidate.distance === 1 ? directReasons(params.rootEdges, params.rootId, candidate.id, params.registry) : [];
256
+ const node = {
257
+ ...params.details.get(candidate.id) ?? { id: candidate.id },
258
+ distance: candidate.distance,
259
+ role: direct.length > 0 ? primaryRole(direct) : candidate.role,
260
+ via: candidate.via,
261
+ reasons: direct.length > 0 ? direct : [
262
+ `${candidate.role} via ${candidate.via} (depth ${candidate.distance})`
263
+ ]
264
+ };
265
+ const cost = estimateTokens(node);
266
+ if (usedTokens + cost > params.tokenBudget)
267
+ break;
268
+ nodes.push(node);
269
+ usedTokens += cost;
270
+ }
271
+ if (params.candidates.length > 0 && nodes.length === 0)
272
+ throw new TypeError("Relationship context tokenBudget cannot fit one node");
273
+ return { nodes, usedTokens };
274
+ }
275
+ function selectContextEdges(params) {
276
+ const kinds = params.options.kinds ? new Set(params.options.kinds.map((kind) => params.registry.require(kind).kind)) : void 0;
277
+ const candidates = params.graph.edges().filter((edge) => {
278
+ if (!params.included.has(edge.source) || !params.included.has(edge.target))
279
+ return false;
280
+ if (kinds === void 0 || kinds.has(edge.kind))
281
+ return true;
282
+ const inverse = params.registry.resolve(edge.kind)?.inverse;
283
+ return inverse !== void 0 && kinds.has(inverse);
284
+ });
285
+ const edges = [];
286
+ let usedTokens = params.initialTokens;
287
+ for (const edge of candidates) {
288
+ if (edges.length >= params.edgeLimit)
289
+ break;
290
+ const cost = estimateTokens(edge);
291
+ if (usedTokens + cost > params.tokenBudget)
292
+ break;
293
+ edges.push(edge);
294
+ usedTokens += cost;
295
+ }
296
+ return { edges, usedTokens, candidateCount: candidates.length };
297
+ }
298
+ function buildRelationshipContext(graph, rootId, details, options = {}) {
299
+ if (!graph.nodes().includes(rootId))
300
+ throw new TypeError(`Relationship node not found: ${rootId}`);
301
+ const nodeLimit = positiveInteger(options.nodeLimit, 20, "nodeLimit");
302
+ const edgeLimit = positiveInteger(options.edgeLimit, 40, "edgeLimit");
303
+ const tokenBudget = positiveInteger(options.tokenBudget, 1200, "tokenBudget");
304
+ const registry = options.registry ?? createRelationshipKindRegistry();
305
+ const byId = new Map(details.map((detail) => [detail.id, detail]));
306
+ const rootDetails = byId.get(rootId) ?? {
307
+ id: rootId
308
+ };
309
+ const { evidence: rootEvidence = [], ...root } = rootDetails;
310
+ const evidence = [...rootEvidence];
311
+ const discovery = discoverNodes(graph, rootId, registry, options);
312
+ const { rootEdges, ...directSummary } = summarizeDirectEdges(graph, rootId, registry, options);
313
+ const fingerprint = createQueryFingerprint("relationship-context", {
314
+ rootId,
315
+ direction: options.direction ?? "both",
316
+ kinds: [...options.kinds ?? []].sort(),
317
+ maxDepth: options.maxDepth ?? 3
318
+ });
319
+ const pageStart = resolveQueryCursorStart(discovery.rows, options.cursor, fingerprint, ({ id }) => id);
320
+ const candidates = discovery.rows.slice(pageStart);
321
+ const initialTokens = estimateTokens(root) + estimateTokens(evidence);
322
+ if (initialTokens > tokenBudget)
323
+ throw new TypeError("Relationship context tokenBudget cannot fit root and evidence");
324
+ const nodeSelection = selectContextNodes({
325
+ candidates,
326
+ details: byId,
327
+ rootEdges,
328
+ rootId,
329
+ registry,
330
+ nodeLimit,
331
+ tokenBudget,
332
+ initialTokens
333
+ });
334
+ const { nodes } = nodeSelection;
335
+ const included = /* @__PURE__ */ new Set([rootId, ...nodes.map(({ id }) => id)]);
336
+ const edgeSelection = selectContextEdges({
337
+ graph,
338
+ included,
339
+ options,
340
+ registry,
341
+ edgeLimit,
342
+ tokenBudget,
343
+ initialTokens: nodeSelection.usedTokens
344
+ });
345
+ const { edges, usedTokens } = edgeSelection;
346
+ const consumed = pageStart + nodes.length;
347
+ const hasMoreNodes = consumed < discovery.rows.length;
348
+ const lastNode = nodes.at(-1);
349
+ const omittedEdges = edgeSelection.candidateCount - edges.length;
350
+ const truncated = discovery.depthTruncated || hasMoreNodes || omittedEdges > 0;
351
+ const summary = {
352
+ rootId,
353
+ ...root.status === void 0 ? {} : { rootStatus: root.status },
354
+ ...directSummary,
355
+ discoveredNodes: discovery.rows.length,
356
+ returnedNodes: nodes.length,
357
+ returnedEdges: edges.length,
358
+ omittedNodes: discovery.rows.length - consumed,
359
+ omittedEdges,
360
+ evidenceCount: evidence.length,
361
+ hasMore: hasMoreNodes
362
+ };
363
+ return {
364
+ root,
365
+ summary,
366
+ nodes,
367
+ edges,
368
+ evidence,
369
+ meta: {
370
+ exact: true,
371
+ truncated,
372
+ completeness: truncated ? "truncated" : "complete",
373
+ nodeLimit,
374
+ edgeLimit,
375
+ tokenBudget,
376
+ usedTokens,
377
+ visitedNodes: discovery.visitedNodes,
378
+ inspectedEdges: discovery.inspectedEdges,
379
+ omittedNodes: discovery.rows.length - consumed,
380
+ omittedEdges,
381
+ ...hasMoreNodes && lastNode ? {
382
+ nextCursor: encodeQueryCursor(fingerprint, lastNode.id, consumed - 1)
383
+ } : {}
384
+ }
385
+ };
386
+ }
387
+
388
+ // dist/sdk/dependencies.js
389
+ !(function() {
390
+ try {
391
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
392
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1f69c8aa-b089-5f6e-8b5a-63695f1e6bbf");
393
+ } catch (e2) {
394
+ }
395
+ })();
396
+ var DEPS_FORMAT_VALUES = ["tree", "graph", "context"];
397
+ var DEPS_COLLAPSE_VALUES = ["none", "repeated"];
398
+ var DEPS_DIRECTION_VALUES = ["outgoing", "incoming", "both"];
399
+ function parseFormat(raw) {
400
+ const candidate = raw?.trim().toLowerCase() ?? "tree";
401
+ if (DEPS_FORMAT_VALUES.includes(candidate)) {
402
+ return candidate;
403
+ }
404
+ throw new PmCliError(`Invalid --format value "${raw}". Use "tree", "graph", or "context".`, EXIT_CODE.USAGE);
405
+ }
406
+ function parsePositiveInteger(raw, flag) {
407
+ if (raw === void 0)
408
+ return void 0;
409
+ const value = typeof raw === "number" ? raw : Number(raw.trim());
410
+ if (!Number.isInteger(value) || value < 1)
411
+ throw new PmCliError(`Invalid --${flag} value "${raw}". Use a positive integer.`, EXIT_CODE.USAGE);
412
+ return value;
413
+ }
414
+ function parseMaxDepth(raw) {
415
+ if (raw === void 0) {
416
+ return void 0;
417
+ }
418
+ const normalized = typeof raw === "number" ? raw : Number(raw.trim());
419
+ if (!Number.isInteger(normalized) || normalized < 0) {
420
+ throw new PmCliError(`Invalid --max-depth value "${raw}". Use a non-negative integer.`, EXIT_CODE.USAGE);
421
+ }
422
+ return normalized;
423
+ }
424
+ function parseCollapse(raw) {
425
+ const candidate = raw?.trim().toLowerCase() ?? "none";
426
+ if (DEPS_COLLAPSE_VALUES.includes(candidate)) {
427
+ return candidate;
428
+ }
429
+ throw new PmCliError(`Invalid --collapse value "${raw}". Use "none" or "repeated".`, EXIT_CODE.USAGE);
430
+ }
431
+ function parseDirection(raw) {
432
+ const candidate = raw?.trim().toLowerCase() ?? "both";
433
+ if (DEPS_DIRECTION_VALUES.includes(candidate)) {
434
+ return candidate;
435
+ }
436
+ throw new PmCliError(`Invalid --direction value "${raw}". Use "outgoing", "incoming", or "both".`, EXIT_CODE.USAGE);
437
+ }
438
+ function parseKinds(raw) {
439
+ if (raw === void 0)
440
+ return void 0;
441
+ const registry = createRelationshipKindRegistry();
442
+ const values = (Array.isArray(raw) ? raw : [raw]).flatMap((value) => value.split(",")).map((value) => value.trim()).filter((value) => value.length > 0);
443
+ if (values.length === 0)
444
+ return void 0;
445
+ const kinds = /* @__PURE__ */ new Set();
446
+ for (const value of values) {
447
+ const definition = registry.resolve(value);
448
+ if (!definition) {
449
+ const known = registry.list().map((entry) => entry.kind).join(", ");
450
+ throw new PmCliError(`Invalid --kind value "${value}". Registered kinds: ${known}.`, EXIT_CODE.USAGE);
451
+ }
452
+ kinds.add(definition.kind);
453
+ }
454
+ return [...kinds].sort();
455
+ }
456
+ function normalizeDependencies(dependencies) {
457
+ if (!dependencies || dependencies.length === 0) {
458
+ return [];
459
+ }
460
+ const sorted = dependencies.map(({ id, kind }) => ({
461
+ id: id.trim(),
462
+ kind: kind.trim().toLowerCase()
463
+ })).sort((left, right) => {
464
+ const byKind = left.kind.localeCompare(right.kind);
465
+ if (byKind !== 0)
466
+ return byKind;
467
+ return left.id.localeCompare(right.id);
468
+ });
469
+ const deduped = /* @__PURE__ */ new Map();
470
+ for (const dependency of sorted) {
471
+ const key = `${dependency.kind.toLowerCase()}::${dependency.id.toLowerCase()}`;
472
+ if (!deduped.has(key)) {
473
+ deduped.set(key, { id: dependency.id, kind: dependency.kind });
474
+ }
475
+ }
476
+ return [...deduped.values()];
477
+ }
478
+ function toIndexedItem(item) {
479
+ return {
480
+ id: item.id,
481
+ title: item.title,
482
+ type: item.type,
483
+ status: item.status,
484
+ dependencies: normalizeDependencies(item.dependencies)
485
+ };
486
+ }
487
+ function toTreeNode(id, index, lineage, maxDepth, collapse, expanded, depth = 0, via) {
488
+ const lookupId = id.trim().toLowerCase();
489
+ const item = index.get(lookupId);
490
+ const baseNode = {
491
+ id: item?.id ?? id,
492
+ title: item?.title,
493
+ type: item?.type,
494
+ status: item?.status,
495
+ via,
496
+ missing: !item,
497
+ cycle: lineage.has(lookupId),
498
+ dependencies: []
499
+ };
500
+ if (!item || baseNode.cycle) {
501
+ return baseNode;
502
+ }
503
+ if (maxDepth !== void 0 && depth >= maxDepth) {
504
+ if (item.dependencies.length > 0) {
505
+ baseNode.truncated = true;
506
+ }
507
+ return baseNode;
508
+ }
509
+ if (collapse === "repeated" && expanded.has(lookupId)) {
510
+ baseNode.collapsed = true;
511
+ return baseNode;
512
+ }
513
+ if (collapse === "repeated") {
514
+ expanded.add(lookupId);
515
+ }
516
+ const nextLineage = new Set(lineage);
517
+ nextLineage.add(lookupId);
518
+ baseNode.dependencies = item.dependencies.map((dependency) => toTreeNode(dependency.id, index, nextLineage, maxDepth, collapse, expanded, depth + 1, dependency.kind));
519
+ return baseNode;
520
+ }
521
+ function mergeGraphNode(existing, candidate) {
522
+ if (!existing) {
523
+ return candidate;
524
+ }
525
+ if (existing.missing && !candidate.missing)
526
+ return candidate;
527
+ return {
528
+ ...existing,
529
+ title: existing.title ?? candidate.title,
530
+ type: existing.type ?? candidate.type,
531
+ status: existing.status ?? candidate.status
532
+ };
533
+ }
534
+ function toGraph(root) {
535
+ const nodesById = /* @__PURE__ */ new Map();
536
+ const edgesByKey = /* @__PURE__ */ new Map();
537
+ const visit = (node) => {
538
+ nodesById.set(node.id, mergeGraphNode(nodesById.get(node.id), {
539
+ id: node.id,
540
+ title: node.title,
541
+ type: node.type,
542
+ status: node.status,
543
+ missing: node.missing
544
+ }));
545
+ for (const child of node.dependencies) {
546
+ nodesById.set(child.id, mergeGraphNode(nodesById.get(child.id), {
547
+ id: child.id,
548
+ title: child.title,
549
+ type: child.type,
550
+ status: child.status,
551
+ missing: child.missing
552
+ }));
553
+ const relationKind = child.via ?? "related";
554
+ const edgeKey = `${node.id}::${child.id}::${relationKind}`;
555
+ if (!edgesByKey.has(edgeKey)) {
556
+ edgesByKey.set(edgeKey, {
557
+ from: node.id,
558
+ to: child.id,
559
+ kind: relationKind
560
+ });
561
+ }
562
+ if (!child.cycle) {
563
+ visit(child);
564
+ }
565
+ }
566
+ };
567
+ visit(root);
568
+ const nodes = [...nodesById.values()].sort((left, right) => left.id.localeCompare(right.id));
569
+ const edges = [...edgesByKey.values()].sort((left, right) => {
570
+ const byFrom = left.from.localeCompare(right.from);
571
+ if (byFrom !== 0)
572
+ return byFrom;
573
+ const byTo = left.to.localeCompare(right.to);
574
+ if (byTo !== 0)
575
+ return byTo;
576
+ return left.kind.localeCompare(right.kind);
577
+ });
578
+ const missingIds = nodes.filter((node) => node.missing).map((node) => node.id);
579
+ return {
580
+ root_id: root.id,
581
+ nodes,
582
+ edges,
583
+ missing_ids: missingIds
584
+ };
585
+ }
586
+ function countDependencyGraph(rootId, index, maxDepth) {
587
+ const nodeIds = /* @__PURE__ */ new Set();
588
+ const edgeKeys = /* @__PURE__ */ new Set();
589
+ const missingIds = /* @__PURE__ */ new Set();
590
+ const expanded = /* @__PURE__ */ new Set();
591
+ const pending = [{ id: rootId, depth: 0 }];
592
+ let pendingIndex = 0;
593
+ while (pendingIndex < pending.length) {
594
+ const current = pending[pendingIndex++];
595
+ const lookupId = current.id.trim().toLowerCase();
596
+ nodeIds.add(lookupId);
597
+ const item = index.get(lookupId);
598
+ if (!item) {
599
+ missingIds.add(lookupId);
600
+ continue;
601
+ }
602
+ if (maxDepth !== void 0 && current.depth >= maxDepth) {
603
+ continue;
604
+ }
605
+ if (expanded.has(lookupId)) {
606
+ continue;
607
+ }
608
+ expanded.add(lookupId);
609
+ for (const dependency of item.dependencies) {
610
+ edgeKeys.add(`${lookupId}::${dependency.id.trim().toLowerCase()}::${dependency.kind}`);
611
+ pending.push({ id: dependency.id, depth: current.depth + 1 });
612
+ }
613
+ }
614
+ return {
615
+ node_count: nodeIds.size,
616
+ edge_count: edgeKeys.size,
617
+ missing_count: missingIds.size
618
+ };
619
+ }
620
+ function parseDepsContextOptions(options) {
621
+ const maxDepth = parseMaxDepth(options.maxDepth);
622
+ const nodeLimit = parsePositiveInteger(options.nodeLimit, "node-limit");
623
+ const edgeLimit = parsePositiveInteger(options.edgeLimit, "edge-limit");
624
+ const tokenBudget = parsePositiveInteger(options.tokenBudget, "token-budget");
625
+ const kinds = parseKinds(options.kind);
626
+ return {
627
+ direction: parseDirection(options.direction),
628
+ ...kinds === void 0 ? {} : { kinds },
629
+ ...maxDepth === void 0 ? {} : { maxDepth },
630
+ ...nodeLimit === void 0 ? {} : { nodeLimit },
631
+ ...edgeLimit === void 0 ? {} : { edgeLimit },
632
+ ...tokenBudget === void 0 ? {} : { tokenBudget },
633
+ ...options.cursor?.trim() ? { cursor: options.cursor.trim() } : {}
634
+ };
635
+ }
636
+ function buildContextFromAssembly(assembly, rootId, options, rootEvidence) {
637
+ return buildRelationshipContext(assembly.graph, rootId, assembly.details.map((detail) => detail.id === rootId && rootEvidence.length > 0 ? { ...detail, evidence: rootEvidence } : detail), options);
638
+ }
639
+ function buildDepsRelationshipContext(rootId, items, options, rootEvidence = []) {
640
+ return buildContextFromAssembly(assembleWorkspaceRelationshipGraph(items), rootId, parseDepsContextOptions(options), rootEvidence);
641
+ }
642
+ function appendEvidencePointers(evidence, label, values, limit) {
643
+ for (const value of values.slice(0, limit)) {
644
+ const trimmed = value?.trim();
645
+ if (trimmed)
646
+ evidence.push(`${label}:${trimmed}`);
647
+ }
648
+ }
649
+ async function collectRootEvidence(pmRoot, id, settings, typeToFolder) {
650
+ const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeToFolder);
651
+ if (!located)
652
+ return [];
653
+ const { document } = await readLocatedItem(located, {
654
+ schema: settings.schema
655
+ });
656
+ const metadata = document.metadata;
657
+ const files = metadata.files ?? [];
658
+ const tests = metadata.tests ?? [];
659
+ const docs = metadata.docs ?? [];
660
+ const counts = [
661
+ ["files", files.length],
662
+ ["tests", tests.length],
663
+ ["docs", docs.length],
664
+ ["comments", (metadata.comments ?? []).length],
665
+ ["notes", (metadata.notes ?? []).length],
666
+ ["learnings", (metadata.learnings ?? []).length]
667
+ ];
668
+ if (counts.every(([, count]) => count === 0))
669
+ return [];
670
+ const evidence = [
671
+ `linked:${counts.map(([key, count]) => `${key}=${count}`).join(",")}`
672
+ ];
673
+ appendEvidencePointers(evidence, "file", files.map((file) => file.path), 3);
674
+ appendEvidencePointers(evidence, "test", tests.map((test) => test.command ?? test.path), 2);
675
+ appendEvidencePointers(evidence, "doc", docs.map((doc) => doc.path), 2);
676
+ return evidence;
677
+ }
678
+ function buildContextDepsResult(params) {
679
+ const { assembly, canonicalId, options, rootEvidence, summaryOnly } = params;
680
+ const contextOptions = parseDepsContextOptions(options);
681
+ const context = buildContextFromAssembly(assembly, canonicalId, contextOptions, rootEvidence);
682
+ const reachable = assembly.graph.closure(canonicalId, {
683
+ direction: contextOptions.direction,
684
+ ...contextOptions.kinds === void 0 ? {} : { kinds: contextOptions.kinds },
685
+ maxDepth: contextOptions.maxDepth ?? 3
686
+ });
687
+ const missingReachable = reachable.value.filter((nodeId) => assembly.missingIdSet.has(nodeId.toLowerCase()));
688
+ const missingReachableSet = new Set(missingReachable.map((nodeId) => nodeId.toLowerCase()));
689
+ const relationshipRegistry = createRelationshipKindRegistry();
690
+ const filteredKinds = contextOptions.kinds ? new Set(contextOptions.kinds.map((kind) => relationshipRegistry.require(kind).kind)) : void 0;
691
+ const packetIds = /* @__PURE__ */ new Set([canonicalId, ...reachable.value]);
692
+ const missingReferences = [
693
+ ...assembly.dangling.active,
694
+ ...assembly.dangling.legacy_terminal
695
+ ].filter((row) => {
696
+ if (row.no_active_blocker_sentinel || !missingReachableSet.has(row.target_id.trim().toLowerCase()) || !packetIds.has(row.holder_id))
697
+ return false;
698
+ if (filteredKinds === void 0)
699
+ return true;
700
+ const definition = relationshipRegistry.resolve(row.kind);
701
+ return definition !== void 0 && (filteredKinds.has(definition.kind) || definition.inverse !== void 0 && filteredKinds.has(definition.inverse));
702
+ });
703
+ const referenceLimit = contextOptions.edgeLimit ?? 40;
704
+ return {
705
+ id: canonicalId,
706
+ format: "context",
707
+ node_count: context.nodes.length + 1,
708
+ edge_count: context.edges.length,
709
+ missing_count: missingReachable.length,
710
+ missing_scope: "traversal",
711
+ missing_reference_count: missingReferences.length,
712
+ ...summaryOnly ? {} : {
713
+ missing_references: missingReferences.slice(0, referenceLimit),
714
+ context
715
+ }
716
+ };
717
+ }
718
+ async function runDeps(id, options, global2) {
719
+ const pmRoot = resolvePmRoot(process.cwd(), global2.path);
720
+ if (!await pathExists(getSettingsPath(pmRoot))) {
721
+ throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
722
+ }
723
+ const format = parseFormat(options.format);
724
+ const maxDepth = parseMaxDepth(options.maxDepth);
725
+ const collapse = parseCollapse(options.collapse);
726
+ const summaryOnly = options.summary === true;
727
+ const settings = await readSettings(pmRoot);
728
+ const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
729
+ const items = await listAllItemMetadataLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, void 0, settings.schema);
730
+ const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
731
+ const index = new Map(items.map((item) => [item.id.trim().toLowerCase(), toIndexedItem(item)]));
732
+ const dangling = collectDanglingDependencyReferences(items, (status) => isTerminalStatus(status, statusRegistry));
733
+ for (const reference of [...dangling.active, ...dangling.legacy_terminal]) {
734
+ const holder = index.get(reference.holder_id.trim().toLowerCase());
735
+ const referenceKind = reference.kind.trim().toLowerCase();
736
+ if (holder && !holder.dependencies.some((dependency) => dependency.id.trim().toLowerCase() === reference.target_id.trim().toLowerCase() && dependency.kind === referenceKind)) {
737
+ holder.dependencies.push({ id: reference.target_id, kind: referenceKind });
738
+ }
739
+ }
740
+ if (!index.has(id.trim().toLowerCase())) {
741
+ throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);
742
+ }
743
+ if (format === "context") {
744
+ const canonicalId = index.get(id.trim().toLowerCase()).id;
745
+ const rootEvidence = summaryOnly ? [] : await collectRootEvidence(pmRoot, canonicalId, settings, typeRegistry.type_to_folder);
746
+ const isTerminal = (status) => isTerminalStatus(status, statusRegistry);
747
+ const lookup = workspaceGraphCache().lookup(pmRoot, computeWorkspaceGraphFingerprint(items, isTerminal), () => assembleWorkspaceRelationshipGraph(items, isTerminal));
748
+ return buildContextDepsResult({
749
+ assembly: lookup.assembly,
750
+ canonicalId,
751
+ options,
752
+ rootEvidence,
753
+ summaryOnly
754
+ });
755
+ }
756
+ if (summaryOnly) {
757
+ return {
758
+ id,
759
+ format,
760
+ ...countDependencyGraph(id, index, maxDepth)
761
+ };
762
+ }
763
+ const tree = toTreeNode(id, index, /* @__PURE__ */ new Set(), maxDepth, collapse, /* @__PURE__ */ new Set());
764
+ const graph = toGraph(tree);
765
+ const baseResult = {
766
+ id,
767
+ format,
768
+ node_count: graph.nodes.length,
769
+ edge_count: graph.edges.length,
770
+ missing_count: graph.missing_ids.length
771
+ };
772
+ if (format === "tree") {
773
+ return {
774
+ ...baseResult,
775
+ tree
776
+ };
777
+ }
778
+ return {
779
+ ...baseResult,
780
+ graph
781
+ };
782
+ }
783
+
784
+ export {
785
+ computeWorkspaceGraphFingerprint,
786
+ WorkspaceGraphCache,
787
+ workspaceGraphCache,
788
+ resetWorkspaceGraphCache,
789
+ buildRelationshipContext,
790
+ DEPS_FORMAT_VALUES,
791
+ DEPS_COLLAPSE_VALUES,
792
+ DEPS_DIRECTION_VALUES,
793
+ parsePositiveInteger,
794
+ parseMaxDepth,
795
+ parseDirection,
796
+ parseKinds,
797
+ buildDepsRelationshipContext,
798
+ runDeps
799
+ };
800
+ //# sourceMappingURL=chunk-3QDR6ZLU.js.map