@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,108 @@
1
+ /**
2
+ * @module sdk/graph/governance
3
+ *
4
+ * Policy-aware relationship-graph quality audit shared by validation, health,
5
+ * and package governance surfaces. The audit inspects one assembled workspace
6
+ * graph and reports machine-readable findings — integrity gaps, ordering
7
+ * cycles, duplicated edge spellings, stale lifecycle blocks, and coverage
8
+ * outliers — without inventing edges or assuming that sparse connectivity is
9
+ * defective. Findings gate severity on lifecycle: contradictions confined to
10
+ * terminal items downgrade to informational `legacy_*` codes because repairing
11
+ * them would mutate closed history. Every finding names the violated policy,
12
+ * carries a deterministic bounded sample, and proposes a safe next action so
13
+ * agents can plan remediation without re-deriving context.
14
+ */
15
+ import type { RelationshipEdge } from "../relationships.js";
16
+ import type { WorkspaceRelationshipAssembly } from "./assembly.js";
17
+ /** Severity ladder shared by every relationship audit finding. */
18
+ export type RelationshipAuditSeverity = "error" | "warning" | "info";
19
+ /** Machine-readable identifier for one relationship audit finding family. */
20
+ export type RelationshipAuditFindingCode = "missing_reference_active" | "missing_reference_terminal" | "legacy_no_blocker_sentinel" | "ordering_cycle" | "legacy_ordering_cycle" | "duplicate_edge" | "legacy_duplicate_edge" | "stale_lifecycle_block" | "isolated_active_node" | "sparse_active_node";
21
+ /** One policy-aware relationship audit finding with bounded evidence. */
22
+ export interface RelationshipAuditFinding {
23
+ /** Machine-readable finding family identifier. */
24
+ code: RelationshipAuditFindingCode;
25
+ /** Severity of the violated policy. */
26
+ severity: RelationshipAuditSeverity;
27
+ /** Policy statement this finding violates. */
28
+ policy: string;
29
+ /** Human-readable summary including the affected count. */
30
+ message: string;
31
+ /** Total number of affected subjects, independent of sample bounding. */
32
+ count: number;
33
+ /** Deterministic bounded sample of affected subjects. */
34
+ sample: string[];
35
+ /** Whether {@link sample} was truncated by the configured sample bound. */
36
+ sample_truncated: boolean;
37
+ /** Safe machine-actionable next step; audits never invent or auto-apply edges. */
38
+ remediation: string;
39
+ }
40
+ /** Aggregate structural coverage metrics for one assembled workspace graph. */
41
+ export interface RelationshipCoverageProfile {
42
+ /** Total indexed nodes including materialized missing placeholders. */
43
+ nodes: number;
44
+ /** Total deduplicated indexed edges. */
45
+ edges: number;
46
+ /** Deterministic per-kind edge counts. */
47
+ edges_by_kind: Record<string, number>;
48
+ /** Nodes whose lifecycle status is active (non-terminal, non-missing). */
49
+ active_nodes: number;
50
+ /** Materialized placeholder nodes for referenced-but-absent items. */
51
+ missing_nodes: number;
52
+ /** Active nodes with no incident edges at all. */
53
+ isolated_active_nodes: number;
54
+ /** Active nodes with at most one incident edge, isolates included. */
55
+ degree_leq_one_active_nodes: number;
56
+ }
57
+ /** Tuning and policy inputs accepted by the relationship audit. */
58
+ export interface RelationshipAuditOptions {
59
+ /** Terminal-lifecycle predicate; defaults to the built-in closed/canceled statuses. */
60
+ isTerminal?: (status: string) => boolean;
61
+ /** Blocked-lifecycle predicate for stale-block detection; defaults to `status === "blocked"`. */
62
+ isBlocked?: (status: string) => boolean;
63
+ /** Node identifiers that are explicitly valid isolates (roots, archives, scratch work). */
64
+ exemptIsolates?: readonly string[];
65
+ /** Maximum sample entries retained per finding; defaults to 25. */
66
+ maxSampleSize?: number;
67
+ /** Abort signal checked between finding families. */
68
+ signal?: AbortSignal;
69
+ }
70
+ /** Complete deterministic result of one relationship-graph audit. */
71
+ export interface RelationshipAuditReport {
72
+ /** Findings ordered by severity, then code, then first sample subject. */
73
+ findings: RelationshipAuditFinding[];
74
+ /** Structural coverage metrics computed during the audit. */
75
+ profile: RelationshipCoverageProfile;
76
+ }
77
+ /** One duplicate-edge group in semantic orientation with its stored spellings. */
78
+ export interface DuplicateRelationshipEdgeGroup {
79
+ /** Semantic tail node shared by every stored spelling. */
80
+ from: string;
81
+ /** Semantic head node shared by every stored spelling. */
82
+ to: string;
83
+ /** Stored parallel edges sorted by kind. */
84
+ edges: RelationshipEdge[];
85
+ }
86
+ /** Format one duplicate-edge group as a compact deterministic evidence string. */
87
+ export declare function formatDuplicateEdgeGroup(group: DuplicateRelationshipEdgeGroup): string;
88
+ /**
89
+ * Collect the groups of parallel same-family stored edges over the directed
90
+ * ordering and hierarchy families. Each family joins a kind with its inverse
91
+ * spelling in semantic orientation, so a reciprocal pair such as
92
+ * `A blocked_by B` plus `B blocks A` collapses onto one oriented endpoint
93
+ * pair. Only groups holding at least two stored spellings are returned, in
94
+ * deterministic orientation order with per-group edges sorted by kind, source,
95
+ * then target — the exact stored identities remediation planning targets.
96
+ */
97
+ export declare function collectDuplicateRelationshipEdgeGroups(assembly: WorkspaceRelationshipAssembly): DuplicateRelationshipEdgeGroup[];
98
+ /**
99
+ * Audit one assembled workspace relationship graph against the shared
100
+ * governance policy and return deterministic machine-readable findings plus a
101
+ * structural coverage profile.
102
+ *
103
+ * The audit is read-only and never proposes inventing an edge: integrity
104
+ * findings report evidence for investigation, coverage findings honor explicit
105
+ * isolate exemptions, and cycle findings enumerate the strongly connected
106
+ * members so callers can decide which edge to retype, remove, or waive.
107
+ */
108
+ export declare function auditWorkspaceRelationshipGraph(assembly: WorkspaceRelationshipAssembly, options?: RelationshipAuditOptions): RelationshipAuditReport;
@@ -0,0 +1,360 @@
1
+
2
+ !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]="a78eee2f-0423-565f-91b6-88d0ab46d529")}catch(e){}}();
3
+ import { isTransitiveKind, orientTransitiveEdge, transitiveFamilyKey, } from "./analytics.js";
4
+ /** Default bounded sample size applied to every finding family. */
5
+ const DEFAULT_MAX_SAMPLE_SIZE = 25;
6
+ /** Rank used to order findings by decreasing severity. */
7
+ const SEVERITY_RANK = {
8
+ error: 0,
9
+ warning: 1,
10
+ info: 2,
11
+ };
12
+ /** Build one finding with deterministic bounded sampling over sorted subjects. */
13
+ function buildFinding(code, severity, policy, describe, subjects, maxSampleSize, remediation) {
14
+ const sorted = [...subjects].sort((left, right) => left.localeCompare(right));
15
+ return {
16
+ code,
17
+ severity,
18
+ policy,
19
+ message: describe(sorted.length),
20
+ count: sorted.length,
21
+ sample: sorted.slice(0, maxSampleSize),
22
+ sample_truncated: sorted.length > maxSampleSize,
23
+ remediation,
24
+ };
25
+ }
26
+ /** Resolve the ordering-only successor adjacency for cycle analysis. */
27
+ function buildOrderingAdjacency(assembly) {
28
+ const registry = assembly.graph.registry();
29
+ const successors = new Map();
30
+ for (const edge of assembly.graph.edges()) {
31
+ const definition = registry.require(edge.kind);
32
+ if (!definition.ordering)
33
+ continue;
34
+ // Orient every ordering edge predecessor -> successor so inverse spellings
35
+ // (blocked_by/blocks) land in one canonical execution-order digraph.
36
+ const [predecessor, successor] = (definition.precedence ?? "source_before_target") ===
37
+ "target_before_source"
38
+ ? [edge.target, edge.source]
39
+ : [edge.source, edge.target];
40
+ const adjacent = successors.get(predecessor);
41
+ if (adjacent)
42
+ adjacent.push(successor);
43
+ else
44
+ successors.set(predecessor, [successor]);
45
+ }
46
+ for (const adjacent of successors.values())
47
+ adjacent.sort((left, right) => left.localeCompare(right));
48
+ return successors;
49
+ }
50
+ /** Register one newly discovered Tarjan node. */
51
+ function registerTarjanNode(node, state) {
52
+ state.indexes.set(node, state.nextIndex);
53
+ state.lowLinks.set(node, state.nextIndex);
54
+ state.nextIndex += 1;
55
+ state.stack.push(node);
56
+ state.onStack.add(node);
57
+ }
58
+ /** Visit one pending successor, returning whether the frame had work left. */
59
+ function visitNextTarjanNeighbor(frame, frames, successors, state) {
60
+ const neighbors = successors.get(frame.node) ?? [];
61
+ if (frame.neighborIndex >= neighbors.length)
62
+ return false;
63
+ const neighbor = neighbors[frame.neighborIndex];
64
+ frame.neighborIndex += 1;
65
+ if (!state.indexes.has(neighbor)) {
66
+ registerTarjanNode(neighbor, state);
67
+ frames.push({ node: neighbor, neighborIndex: 0 });
68
+ }
69
+ else if (state.onStack.has(neighbor)) {
70
+ state.lowLinks.set(frame.node, Math.min(state.lowLinks.get(frame.node), state.indexes.get(neighbor)));
71
+ }
72
+ return true;
73
+ }
74
+ /** Complete one Tarjan frame and emit its component when it is a root. */
75
+ function completeTarjanFrame(frame, frames, successors, state) {
76
+ frames.pop();
77
+ const parent = frames.at(-1);
78
+ if (parent)
79
+ state.lowLinks.set(parent.node, Math.min(state.lowLinks.get(parent.node), state.lowLinks.get(frame.node)));
80
+ if (state.lowLinks.get(frame.node) !== state.indexes.get(frame.node))
81
+ return;
82
+ const component = [];
83
+ while (true) {
84
+ const member = state.stack.pop();
85
+ state.onStack.delete(member);
86
+ component.push(member);
87
+ if (member === frame.node)
88
+ break;
89
+ }
90
+ if (component.length > 1 ||
91
+ (component.length === 1 &&
92
+ successors.get(component[0])?.includes(component[0])))
93
+ state.components.push(component.sort((left, right) => left.localeCompare(right)));
94
+ }
95
+ /**
96
+ * Enumerate strongly connected components with more than one member over the
97
+ * ordering-only digraph using an iterative Tarjan traversal. Only order-bearing
98
+ * kinds participate: associative kinds such as `related` cannot create
99
+ * execution-order contradictions and stay out of cycle analysis by policy.
100
+ */
101
+ function collectOrderingCycles(successors) {
102
+ const state = {
103
+ indexes: new Map(),
104
+ lowLinks: new Map(),
105
+ onStack: new Set(),
106
+ stack: [],
107
+ components: [],
108
+ nextIndex: 0,
109
+ };
110
+ const roots = [...successors.keys()].sort((left, right) => left.localeCompare(right));
111
+ for (const root of roots) {
112
+ if (state.indexes.has(root))
113
+ continue;
114
+ // Explicit frame stack keeps the traversal safe on deep dependency chains.
115
+ const frames = [{ node: root, neighborIndex: 0 }];
116
+ registerTarjanNode(root, state);
117
+ while (frames.length > 0) {
118
+ const frame = frames.at(-1);
119
+ if (visitNextTarjanNeighbor(frame, frames, successors, state))
120
+ continue;
121
+ completeTarjanFrame(frame, frames, successors, state);
122
+ }
123
+ }
124
+ return state.components.sort((left, right) => left[0].localeCompare(right[0]));
125
+ }
126
+ /** Format one dangling reference as a compact deterministic evidence string. */
127
+ function formatDanglingReference(reference) {
128
+ return `${reference.holder_id} -> ${reference.target_id} (${reference.kind})`;
129
+ }
130
+ /** Append one finding only when its subject collection is non-empty. */
131
+ function appendFinding(findings, subjects, maxSampleSize, code, severity, policy, describe, remediation) {
132
+ if (subjects.length === 0)
133
+ return;
134
+ findings.push(buildFinding(code, severity, policy, describe, subjects, maxSampleSize, remediation));
135
+ }
136
+ /** Collect dangling-reference and retired-sentinel governance findings. */
137
+ function collectIntegrityFindings(assembly, isTerminal, maxSampleSize) {
138
+ const findings = [];
139
+ const references = [
140
+ ...assembly.dangling.active,
141
+ ...assembly.dangling.legacy_terminal,
142
+ ].filter((reference) => !reference.no_active_blocker_sentinel);
143
+ appendFinding(findings, references
144
+ .filter((reference) => !isTerminal(reference.holder_status))
145
+ .map(formatDanglingReference), maxSampleSize, "missing_reference_active", "error", "Active items must not reference absent targets; missing prerequisites distort scheduling.", (count) => `${count} active dangling reference(s) to absent items`, "Restore or re-create the referenced item, or remove/retype the reference on the holder.");
146
+ appendFinding(findings, references
147
+ .filter((reference) => isTerminal(reference.holder_status))
148
+ .map(formatDanglingReference), maxSampleSize, "missing_reference_terminal", "info", "Terminal items may retain historical references, but absent targets remain unexplainable context.", (count) => `${count} terminal dangling reference(s) to absent items`, "Leave as history debt or clean up in a dedicated changelog-safe closed-item batch.");
149
+ appendFinding(findings, assembly.dangling.no_active_blocker_sentinels.map(formatDanglingReference), maxSampleSize, "legacy_no_blocker_sentinel", "info", "The pre-structured-dependency no-active-blocker sentinel is retired; real edges carry blocker state.", (count) => `${count} legacy no-active-blocker sentinel reference(s)`, "Delete the sentinel reference; blocker state is derived from blocked_by edges.");
150
+ return findings;
151
+ }
152
+ /** Decide whether one audited node still participates in active scheduling. */
153
+ function isActiveAuditMember(member, nodeStates) {
154
+ const state = nodeStates.get(member);
155
+ // A trimmed or custom assembly may omit a member's details. Treat that
156
+ // unknown lifecycle conservatively as active so contradictions are never
157
+ // silently downgraded to legacy history debt.
158
+ if (!state)
159
+ return true;
160
+ return !state.terminal;
161
+ }
162
+ /** Collect ordering-cycle and lifecycle-block governance findings. */
163
+ function collectOrderingFindings(assembly, nodeStates, isBlocked, maxSampleSize) {
164
+ const findings = [];
165
+ const orderingAdjacency = buildOrderingAdjacency(assembly);
166
+ for (const cycle of collectOrderingCycles(orderingAdjacency)) {
167
+ // A cycle whose members are all terminal is a historical contradiction:
168
+ // it cannot make live work unschedulable, and "repairing" it would touch
169
+ // closed items (changelog drag), so it downgrades to informational debt.
170
+ const active = cycle.some((member) => isActiveAuditMember(member, nodeStates));
171
+ findings.push(active
172
+ ? buildFinding("ordering_cycle", "error", "Order-bearing relationship kinds must stay acyclic; a cycle makes every member unschedulable.", (count) => `execution-order cycle across ${count} item(s)`, cycle, maxSampleSize, "Remove or retype one ordering edge inside the cycle, or split the work so precedence is linear.")
173
+ : buildFinding("legacy_ordering_cycle", "info", "Ordering cycles between exclusively terminal items are historical contradictions with no scheduling effect.", (count) => `terminal-only execution-order cycle across ${count} item(s)`, cycle, maxSampleSize, "Leave as history debt, or clean up in a dedicated changelog-safe closed-item batch; never repair closed items ad hoc."));
174
+ }
175
+ const predecessorsByNode = new Map();
176
+ for (const [predecessor, adjacent] of orderingAdjacency)
177
+ for (const successor of adjacent) {
178
+ const predecessors = predecessorsByNode.get(successor);
179
+ if (predecessors)
180
+ predecessors.push(predecessor);
181
+ else
182
+ predecessorsByNode.set(successor, [predecessor]);
183
+ }
184
+ const staleLifecycleBlocks = [...nodeStates.values()]
185
+ .filter((state) => !state.missing &&
186
+ !state.terminal &&
187
+ isBlocked(state.status) &&
188
+ !(predecessorsByNode.get(state.id) ?? []).some((predecessor) => {
189
+ const predecessorState = nodeStates.get(predecessor);
190
+ // A trimmed/custom assembly may omit predecessor details. Treat that
191
+ // unknown state conservatively as potentially open instead of
192
+ // falsely declaring the lifecycle block stale.
193
+ return predecessorState === undefined || !predecessorState.terminal;
194
+ }))
195
+ .map((state) => state.id);
196
+ appendFinding(findings, staleLifecycleBlocks, maxSampleSize, "stale_lifecycle_block", "warning", "A blocked lifecycle status must be backed by at least one open ordering predecessor.", (count) => `${count} status-blocked item(s) with no open blocker edge`, "Re-open the missing prerequisite as an edge, or move the item back to an active status.");
197
+ return findings;
198
+ }
199
+ /** Format one duplicate-edge group as a compact deterministic evidence string. */
200
+ export function formatDuplicateEdgeGroup(group) {
201
+ const kinds = group.edges
202
+ .map((edge) => edge.kind)
203
+ .sort((left, right) => left.localeCompare(right));
204
+ return `${group.from} -> ${group.to} (${kinds.join(" + ")})`;
205
+ }
206
+ /**
207
+ * Collect the groups of parallel same-family stored edges over the directed
208
+ * ordering and hierarchy families. Each family joins a kind with its inverse
209
+ * spelling in semantic orientation, so a reciprocal pair such as
210
+ * `A blocked_by B` plus `B blocks A` collapses onto one oriented endpoint
211
+ * pair. Only groups holding at least two stored spellings are returned, in
212
+ * deterministic orientation order with per-group edges sorted by kind, source,
213
+ * then target — the exact stored identities remediation planning targets.
214
+ */
215
+ export function collectDuplicateRelationshipEdgeGroups(assembly) {
216
+ const registry = assembly.graph.registry();
217
+ const groups = new Map();
218
+ for (const edge of assembly.graph.edges()) {
219
+ const definition = registry.require(edge.kind);
220
+ if (!isTransitiveKind(definition))
221
+ continue;
222
+ const oriented = orientTransitiveEdge(edge, definition);
223
+ if (oriented.from === oriented.to)
224
+ continue;
225
+ const key = `${transitiveFamilyKey(definition)}::${oriented.from}::${oriented.to}`;
226
+ const group = groups.get(key);
227
+ if (group)
228
+ group.edges.push(edge);
229
+ else
230
+ groups.set(key, { ...oriented, edges: [edge] });
231
+ }
232
+ const duplicated = [...groups.values()].filter((group) => group.edges.length >= 2);
233
+ // Within one oriented group every stored spelling has a distinct kind: a
234
+ // same-kind restatement of the same oriented pair would carry identical
235
+ // endpoints and is deduplicated by edge identity during graph construction.
236
+ for (const group of duplicated)
237
+ group.edges.sort((left, right) => left.kind.localeCompare(right.kind));
238
+ return duplicated.sort((left, right) => left.from.localeCompare(right.from) || left.to.localeCompare(right.to));
239
+ }
240
+ /**
241
+ * Collect duplicate stored-edge findings from the oriented duplicate groups.
242
+ * Transitive-reduction redundancy analysis deliberately skips the direct edge
243
+ * under test, so these exact parallels are invisible there and this is the
244
+ * only surface that reports them.
245
+ */
246
+ function collectDuplicateEdgeFindings(assembly, nodeStates, maxSampleSize) {
247
+ const active = [];
248
+ const legacy = [];
249
+ for (const group of collectDuplicateRelationshipEdgeGroups(assembly)) {
250
+ const subjects = isActiveAuditMember(group.from, nodeStates) ||
251
+ isActiveAuditMember(group.to, nodeStates)
252
+ ? active
253
+ : legacy;
254
+ subjects.push(formatDuplicateEdgeGroup(group));
255
+ }
256
+ const findings = [];
257
+ appendFinding(findings, active, maxSampleSize, "duplicate_edge", "info", "One semantic relationship should be stored once; parallel same-family spellings (reciprocal inverse pairs included) add no information and skew degree metrics.", (count) => `${count} duplicated relationship(s) between active endpoints`, "Remove all but one stored spelling of the relationship; keep the canonical direction the holder declared first.");
258
+ appendFinding(findings, legacy, maxSampleSize, "legacy_duplicate_edge", "info", "Duplicated spellings between exclusively terminal items are historical noise with no scheduling effect.", (count) => `${count} duplicated relationship(s) between terminal endpoints`, "Leave as history debt or clean up in a dedicated changelog-safe closed-item batch.");
259
+ return findings;
260
+ }
261
+ /** Compute structural coverage metrics and coverage-policy findings. */
262
+ function collectCoverageReport(assembly, nodeStates, exemptIsolates, maxSampleSize, edgesByKind) {
263
+ let activeNodes = 0;
264
+ let missingNodes = 0;
265
+ let isolatedActiveNodes = 0;
266
+ let degreeLeqOneActive = 0;
267
+ const isolates = [];
268
+ const sparse = [];
269
+ for (const id of assembly.graph.nodes()) {
270
+ const state = nodeStates.get(id);
271
+ /* c8 ignore next -- every graph node originates from assembly details by construction */
272
+ if (!state)
273
+ continue;
274
+ if (state.missing) {
275
+ missingNodes += 1;
276
+ continue;
277
+ }
278
+ if (state.terminal)
279
+ continue;
280
+ activeNodes += 1;
281
+ const degree = assembly.graph.incidentEdges(id).length;
282
+ if (degree > 1)
283
+ continue;
284
+ degreeLeqOneActive += 1;
285
+ if (degree === 0)
286
+ isolatedActiveNodes += 1;
287
+ if (exemptIsolates.has(id.toLowerCase()))
288
+ continue;
289
+ if (degree === 0)
290
+ isolates.push(id);
291
+ else
292
+ sparse.push(id);
293
+ }
294
+ const findings = [];
295
+ appendFinding(findings, isolates, maxSampleSize, "isolated_active_node", "warning", "Active work should be reachable from the graph unless explicitly declared a valid isolate.", (count) => `${count} active item(s) with no relationships`, "Link the item to its parent, prerequisite, or origin — or register it as an exempt isolate.");
296
+ appendFinding(findings, sparse, maxSampleSize, "sparse_active_node", "info", "Active items with a single edge often miss an honest semantic partner; sparse is not automatically defective.", (count) => `${count} active item(s) with exactly one relationship`, "Investigate for an honest second edge (story->task, defect family, cross-epic complement); do not fabricate one.");
297
+ return {
298
+ findings,
299
+ profile: {
300
+ nodes: assembly.graph.nodes().length,
301
+ edges: assembly.graph.edges().length,
302
+ edges_by_kind: Object.fromEntries(Object.entries(edgesByKind).sort(([left], [right]) => left.localeCompare(right))),
303
+ active_nodes: activeNodes,
304
+ missing_nodes: missingNodes,
305
+ isolated_active_nodes: isolatedActiveNodes,
306
+ degree_leq_one_active_nodes: degreeLeqOneActive,
307
+ },
308
+ };
309
+ }
310
+ /**
311
+ * Audit one assembled workspace relationship graph against the shared
312
+ * governance policy and return deterministic machine-readable findings plus a
313
+ * structural coverage profile.
314
+ *
315
+ * The audit is read-only and never proposes inventing an edge: integrity
316
+ * findings report evidence for investigation, coverage findings honor explicit
317
+ * isolate exemptions, and cycle findings enumerate the strongly connected
318
+ * members so callers can decide which edge to retype, remove, or waive.
319
+ */
320
+ export function auditWorkspaceRelationshipGraph(assembly, options = {}) {
321
+ const isTerminal = options.isTerminal ??
322
+ ((status) => status === "closed" || status === "canceled");
323
+ const isBlocked = options.isBlocked ?? ((status) => status === "blocked");
324
+ const maxSampleSize = options.maxSampleSize ?? DEFAULT_MAX_SAMPLE_SIZE;
325
+ if (!Number.isInteger(maxSampleSize) || maxSampleSize < 1)
326
+ throw new TypeError(`Invalid audit sample bound: ${String(options.maxSampleSize)}`);
327
+ const exemptIsolates = new Set((options.exemptIsolates ?? [])
328
+ .filter((id) => typeof id === "string")
329
+ .map((id) => id.trim().toLowerCase()));
330
+ const nodeStates = new Map(assembly.details.map((detail) => [
331
+ detail.id,
332
+ {
333
+ id: detail.id,
334
+ status: detail.status,
335
+ missing: assembly.missingIdSet.has(detail.id.toLowerCase()),
336
+ terminal: isTerminal(detail.status),
337
+ },
338
+ ]));
339
+ options.signal?.throwIfAborted();
340
+ const edgesByKind = {};
341
+ for (const edge of assembly.graph.edges())
342
+ edgesByKind[edge.kind] = (edgesByKind[edge.kind] ?? 0) + 1;
343
+ const findings = collectIntegrityFindings(assembly, isTerminal, maxSampleSize);
344
+ options.signal?.throwIfAborted();
345
+ findings.push(...collectOrderingFindings(assembly, nodeStates, isBlocked, maxSampleSize));
346
+ options.signal?.throwIfAborted();
347
+ findings.push(...collectDuplicateEdgeFindings(assembly, nodeStates, maxSampleSize));
348
+ options.signal?.throwIfAborted();
349
+ const coverage = collectCoverageReport(assembly, nodeStates, exemptIsolates, maxSampleSize, edgesByKind);
350
+ findings.push(...coverage.findings);
351
+ findings.sort((left, right) => SEVERITY_RANK[left.severity] - SEVERITY_RANK[right.severity] ||
352
+ left.code.localeCompare(right.code) ||
353
+ left.sample[0].localeCompare(right.sample[0]));
354
+ return {
355
+ findings,
356
+ profile: coverage.profile,
357
+ };
358
+ }
359
+ //# sourceMappingURL=governance.js.map
360
+ //# debugId=a78eee2f-0423-565f-91b6-88d0ab46d529
@@ -0,0 +1 @@
1
+ {"version":3,"file":"governance.js","sources":["sdk/graph/governance.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/graph/governance\n *\n * Policy-aware relationship-graph quality audit shared by validation, health,\n * and package governance surfaces. The audit inspects one assembled workspace\n * graph and reports machine-readable findings — integrity gaps, ordering\n * cycles, duplicated edge spellings, stale lifecycle blocks, and coverage\n * outliers — without inventing edges or assuming that sparse connectivity is\n * defective. Findings gate severity on lifecycle: contradictions confined to\n * terminal items downgrade to informational `legacy_*` codes because repairing\n * them would mutate closed history. Every finding names the violated policy,\n * carries a deterministic bounded sample, and proposes a safe next action so\n * agents can plan remediation without re-deriving context.\n */\nimport type { RelationshipEdge } from \"../relationships.js\";\nimport {\n isTransitiveKind,\n orientTransitiveEdge,\n transitiveFamilyKey,\n} from \"./analytics.js\";\nimport type { WorkspaceRelationshipAssembly } from \"./assembly.js\";\n\n/** Severity ladder shared by every relationship audit finding. */\nexport type RelationshipAuditSeverity = \"error\" | \"warning\" | \"info\";\n\n/** Machine-readable identifier for one relationship audit finding family. */\nexport type RelationshipAuditFindingCode =\n | \"missing_reference_active\"\n | \"missing_reference_terminal\"\n | \"legacy_no_blocker_sentinel\"\n | \"ordering_cycle\"\n | \"legacy_ordering_cycle\"\n | \"duplicate_edge\"\n | \"legacy_duplicate_edge\"\n | \"stale_lifecycle_block\"\n | \"isolated_active_node\"\n | \"sparse_active_node\";\n\n/** One policy-aware relationship audit finding with bounded evidence. */\nexport interface RelationshipAuditFinding {\n /** Machine-readable finding family identifier. */\n code: RelationshipAuditFindingCode;\n /** Severity of the violated policy. */\n severity: RelationshipAuditSeverity;\n /** Policy statement this finding violates. */\n policy: string;\n /** Human-readable summary including the affected count. */\n message: string;\n /** Total number of affected subjects, independent of sample bounding. */\n count: number;\n /** Deterministic bounded sample of affected subjects. */\n sample: string[];\n /** Whether {@link sample} was truncated by the configured sample bound. */\n sample_truncated: boolean;\n /** Safe machine-actionable next step; audits never invent or auto-apply edges. */\n remediation: string;\n}\n\n/** Aggregate structural coverage metrics for one assembled workspace graph. */\nexport interface RelationshipCoverageProfile {\n /** Total indexed nodes including materialized missing placeholders. */\n nodes: number;\n /** Total deduplicated indexed edges. */\n edges: number;\n /** Deterministic per-kind edge counts. */\n edges_by_kind: Record<string, number>;\n /** Nodes whose lifecycle status is active (non-terminal, non-missing). */\n active_nodes: number;\n /** Materialized placeholder nodes for referenced-but-absent items. */\n missing_nodes: number;\n /** Active nodes with no incident edges at all. */\n isolated_active_nodes: number;\n /** Active nodes with at most one incident edge, isolates included. */\n degree_leq_one_active_nodes: number;\n}\n\n/** Tuning and policy inputs accepted by the relationship audit. */\nexport interface RelationshipAuditOptions {\n /** Terminal-lifecycle predicate; defaults to the built-in closed/canceled statuses. */\n isTerminal?: (status: string) => boolean;\n /** Blocked-lifecycle predicate for stale-block detection; defaults to `status === \"blocked\"`. */\n isBlocked?: (status: string) => boolean;\n /** Node identifiers that are explicitly valid isolates (roots, archives, scratch work). */\n exemptIsolates?: readonly string[];\n /** Maximum sample entries retained per finding; defaults to 25. */\n maxSampleSize?: number;\n /** Abort signal checked between finding families. */\n signal?: AbortSignal;\n}\n\n/** Complete deterministic result of one relationship-graph audit. */\nexport interface RelationshipAuditReport {\n /** Findings ordered by severity, then code, then first sample subject. */\n findings: RelationshipAuditFinding[];\n /** Structural coverage metrics computed during the audit. */\n profile: RelationshipCoverageProfile;\n}\n\n/** Default bounded sample size applied to every finding family. */\nconst DEFAULT_MAX_SAMPLE_SIZE = 25;\n\n/** Rank used to order findings by decreasing severity. */\nconst SEVERITY_RANK: Record<RelationshipAuditSeverity, number> = {\n error: 0,\n warning: 1,\n info: 2,\n};\n\n/** Internal per-node lifecycle classification resolved once per audit. */\ninterface AuditNodeState {\n /** Original-case node identifier. */\n id: string;\n /** Raw lifecycle status string from assembly details. */\n status: string;\n /** Whether the node is a materialized missing placeholder. */\n missing: boolean;\n /** Whether the node's lifecycle status is terminal. */\n terminal: boolean;\n}\n\n/** Mutable state shared by iterative Tarjan frames. */\ninterface TarjanState {\n /** Discovery index assigned to each visited node. */\n indexes: Map<string, number>;\n /** Lowest reachable discovery index per visited node. */\n lowLinks: Map<string, number>;\n /** Nodes that still belong to an unfinished component. */\n onStack: Set<string>;\n /** Component-membership stack. */\n stack: string[];\n /** Completed cyclic components. */\n components: string[][];\n /** Discovery index assigned to the next unseen node. */\n nextIndex: number;\n}\n\n/** One explicit depth-first frame used by iterative Tarjan traversal. */\ninterface TarjanFrame {\n /** Node currently being expanded. */\n node: string;\n /** Index of the next successor to inspect. */\n neighborIndex: number;\n}\n\n/** Build one finding with deterministic bounded sampling over sorted subjects. */\nfunction buildFinding(\n code: RelationshipAuditFindingCode,\n severity: RelationshipAuditSeverity,\n policy: string,\n describe: (count: number) => string,\n subjects: readonly string[],\n maxSampleSize: number,\n remediation: string,\n): RelationshipAuditFinding {\n const sorted = [...subjects].sort((left, right) => left.localeCompare(right));\n return {\n code,\n severity,\n policy,\n message: describe(sorted.length),\n count: sorted.length,\n sample: sorted.slice(0, maxSampleSize),\n sample_truncated: sorted.length > maxSampleSize,\n remediation,\n };\n}\n/** Resolve the ordering-only successor adjacency for cycle analysis. */\nfunction buildOrderingAdjacency(\n assembly: WorkspaceRelationshipAssembly,\n): Map<string, string[]> {\n const registry = assembly.graph.registry();\n const successors = new Map<string, string[]>();\n for (const edge of assembly.graph.edges()) {\n const definition = registry.require(edge.kind);\n if (!definition.ordering) continue;\n // Orient every ordering edge predecessor -> successor so inverse spellings\n // (blocked_by/blocks) land in one canonical execution-order digraph.\n const [predecessor, successor] =\n (definition.precedence ?? \"source_before_target\") ===\n \"target_before_source\"\n ? [edge.target, edge.source]\n : [edge.source, edge.target];\n const adjacent = successors.get(predecessor);\n if (adjacent) adjacent.push(successor);\n else successors.set(predecessor, [successor]);\n }\n for (const adjacent of successors.values())\n adjacent.sort((left, right) => left.localeCompare(right));\n return successors;\n}\n\n/** Register one newly discovered Tarjan node. */\nfunction registerTarjanNode(node: string, state: TarjanState): void {\n state.indexes.set(node, state.nextIndex);\n state.lowLinks.set(node, state.nextIndex);\n state.nextIndex += 1;\n state.stack.push(node);\n state.onStack.add(node);\n}\n\n/** Visit one pending successor, returning whether the frame had work left. */\nfunction visitNextTarjanNeighbor(\n frame: TarjanFrame,\n frames: TarjanFrame[],\n successors: Map<string, string[]>,\n state: TarjanState,\n): boolean {\n const neighbors = successors.get(frame.node) ?? [];\n if (frame.neighborIndex >= neighbors.length) return false;\n const neighbor = neighbors[frame.neighborIndex]!;\n frame.neighborIndex += 1;\n if (!state.indexes.has(neighbor)) {\n registerTarjanNode(neighbor, state);\n frames.push({ node: neighbor, neighborIndex: 0 });\n } else if (state.onStack.has(neighbor)) {\n state.lowLinks.set(\n frame.node,\n Math.min(state.lowLinks.get(frame.node)!, state.indexes.get(neighbor)!),\n );\n }\n return true;\n}\n\n/** Complete one Tarjan frame and emit its component when it is a root. */\nfunction completeTarjanFrame(\n frame: TarjanFrame,\n frames: TarjanFrame[],\n successors: Map<string, string[]>,\n state: TarjanState,\n): void {\n frames.pop();\n const parent = frames.at(-1);\n if (parent)\n state.lowLinks.set(\n parent.node,\n Math.min(\n state.lowLinks.get(parent.node)!,\n state.lowLinks.get(frame.node)!,\n ),\n );\n if (state.lowLinks.get(frame.node) !== state.indexes.get(frame.node)) return;\n const component: string[] = [];\n while (true) {\n const member = state.stack.pop()!;\n state.onStack.delete(member);\n component.push(member);\n if (member === frame.node) break;\n }\n if (\n component.length > 1 ||\n (component.length === 1 &&\n successors.get(component[0]!)?.includes(component[0]!))\n )\n state.components.push(\n component.sort((left, right) => left.localeCompare(right)),\n );\n}\n\n/**\n * Enumerate strongly connected components with more than one member over the\n * ordering-only digraph using an iterative Tarjan traversal. Only order-bearing\n * kinds participate: associative kinds such as `related` cannot create\n * execution-order contradictions and stay out of cycle analysis by policy.\n */\nfunction collectOrderingCycles(successors: Map<string, string[]>): string[][] {\n const state: TarjanState = {\n indexes: new Map(),\n lowLinks: new Map(),\n onStack: new Set(),\n stack: [],\n components: [],\n nextIndex: 0,\n };\n const roots = [...successors.keys()].sort((left, right) =>\n left.localeCompare(right),\n );\n for (const root of roots) {\n if (state.indexes.has(root)) continue;\n // Explicit frame stack keeps the traversal safe on deep dependency chains.\n const frames: TarjanFrame[] = [{ node: root, neighborIndex: 0 }];\n registerTarjanNode(root, state);\n while (frames.length > 0) {\n const frame = frames.at(-1)!;\n if (visitNextTarjanNeighbor(frame, frames, successors, state)) continue;\n completeTarjanFrame(frame, frames, successors, state);\n }\n }\n return state.components.sort((left, right) =>\n left[0]!.localeCompare(right[0]!),\n );\n}\n\n/** Format one dangling reference as a compact deterministic evidence string. */\nfunction formatDanglingReference(reference: {\n holder_id: string;\n target_id: string;\n kind: string;\n}): string {\n return `${reference.holder_id} -> ${reference.target_id} (${reference.kind})`;\n}\n\n/** Append one finding only when its subject collection is non-empty. */\nfunction appendFinding(\n findings: RelationshipAuditFinding[],\n subjects: readonly string[],\n maxSampleSize: number,\n code: RelationshipAuditFindingCode,\n severity: RelationshipAuditSeverity,\n policy: string,\n describe: (count: number) => string,\n remediation: string,\n): void {\n if (subjects.length === 0) return;\n findings.push(\n buildFinding(\n code,\n severity,\n policy,\n describe,\n subjects,\n maxSampleSize,\n remediation,\n ),\n );\n}\n\n/** Collect dangling-reference and retired-sentinel governance findings. */\nfunction collectIntegrityFindings(\n assembly: WorkspaceRelationshipAssembly,\n isTerminal: (status: string) => boolean,\n maxSampleSize: number,\n): RelationshipAuditFinding[] {\n const findings: RelationshipAuditFinding[] = [];\n const references = [\n ...assembly.dangling.active,\n ...assembly.dangling.legacy_terminal,\n ].filter((reference) => !reference.no_active_blocker_sentinel);\n appendFinding(\n findings,\n references\n .filter((reference) => !isTerminal(reference.holder_status))\n .map(formatDanglingReference),\n maxSampleSize,\n \"missing_reference_active\",\n \"error\",\n \"Active items must not reference absent targets; missing prerequisites distort scheduling.\",\n (count) => `${count} active dangling reference(s) to absent items`,\n \"Restore or re-create the referenced item, or remove/retype the reference on the holder.\",\n );\n appendFinding(\n findings,\n references\n .filter((reference) => isTerminal(reference.holder_status))\n .map(formatDanglingReference),\n maxSampleSize,\n \"missing_reference_terminal\",\n \"info\",\n \"Terminal items may retain historical references, but absent targets remain unexplainable context.\",\n (count) => `${count} terminal dangling reference(s) to absent items`,\n \"Leave as history debt or clean up in a dedicated changelog-safe closed-item batch.\",\n );\n appendFinding(\n findings,\n assembly.dangling.no_active_blocker_sentinels.map(formatDanglingReference),\n maxSampleSize,\n \"legacy_no_blocker_sentinel\",\n \"info\",\n \"The pre-structured-dependency no-active-blocker sentinel is retired; real edges carry blocker state.\",\n (count) => `${count} legacy no-active-blocker sentinel reference(s)`,\n \"Delete the sentinel reference; blocker state is derived from blocked_by edges.\",\n );\n return findings;\n}\n\n/** Decide whether one audited node still participates in active scheduling. */\nfunction isActiveAuditMember(\n member: string,\n nodeStates: Map<string, AuditNodeState>,\n): boolean {\n const state = nodeStates.get(member);\n // A trimmed or custom assembly may omit a member's details. Treat that\n // unknown lifecycle conservatively as active so contradictions are never\n // silently downgraded to legacy history debt.\n if (!state) return true;\n return !state.terminal;\n}\n\n/** Collect ordering-cycle and lifecycle-block governance findings. */\nfunction collectOrderingFindings(\n assembly: WorkspaceRelationshipAssembly,\n nodeStates: Map<string, AuditNodeState>,\n isBlocked: (status: string) => boolean,\n maxSampleSize: number,\n): RelationshipAuditFinding[] {\n const findings: RelationshipAuditFinding[] = [];\n const orderingAdjacency = buildOrderingAdjacency(assembly);\n for (const cycle of collectOrderingCycles(orderingAdjacency)) {\n // A cycle whose members are all terminal is a historical contradiction:\n // it cannot make live work unschedulable, and \"repairing\" it would touch\n // closed items (changelog drag), so it downgrades to informational debt.\n const active = cycle.some((member) =>\n isActiveAuditMember(member, nodeStates),\n );\n findings.push(\n active\n ? buildFinding(\n \"ordering_cycle\",\n \"error\",\n \"Order-bearing relationship kinds must stay acyclic; a cycle makes every member unschedulable.\",\n (count) => `execution-order cycle across ${count} item(s)`,\n cycle,\n maxSampleSize,\n \"Remove or retype one ordering edge inside the cycle, or split the work so precedence is linear.\",\n )\n : buildFinding(\n \"legacy_ordering_cycle\",\n \"info\",\n \"Ordering cycles between exclusively terminal items are historical contradictions with no scheduling effect.\",\n (count) => `terminal-only execution-order cycle across ${count} item(s)`,\n cycle,\n maxSampleSize,\n \"Leave as history debt, or clean up in a dedicated changelog-safe closed-item batch; never repair closed items ad hoc.\",\n ),\n );\n }\n const predecessorsByNode = new Map<string, string[]>();\n for (const [predecessor, adjacent] of orderingAdjacency)\n for (const successor of adjacent) {\n const predecessors = predecessorsByNode.get(successor);\n if (predecessors) predecessors.push(predecessor);\n else predecessorsByNode.set(successor, [predecessor]);\n }\n const staleLifecycleBlocks = [...nodeStates.values()]\n .filter(\n (state) =>\n !state.missing &&\n !state.terminal &&\n isBlocked(state.status) &&\n !(predecessorsByNode.get(state.id) ?? []).some((predecessor) => {\n const predecessorState = nodeStates.get(predecessor);\n // A trimmed/custom assembly may omit predecessor details. Treat that\n // unknown state conservatively as potentially open instead of\n // falsely declaring the lifecycle block stale.\n return predecessorState === undefined || !predecessorState.terminal;\n }),\n )\n .map((state) => state.id);\n appendFinding(\n findings,\n staleLifecycleBlocks,\n maxSampleSize,\n \"stale_lifecycle_block\",\n \"warning\",\n \"A blocked lifecycle status must be backed by at least one open ordering predecessor.\",\n (count) => `${count} status-blocked item(s) with no open blocker edge`,\n \"Re-open the missing prerequisite as an edge, or move the item back to an active status.\",\n );\n return findings;\n}\n\n/** One duplicate-edge group in semantic orientation with its stored spellings. */\nexport interface DuplicateRelationshipEdgeGroup {\n /** Semantic tail node shared by every stored spelling. */\n from: string;\n /** Semantic head node shared by every stored spelling. */\n to: string;\n /** Stored parallel edges sorted by kind. */\n edges: RelationshipEdge[];\n}\n\n/** Format one duplicate-edge group as a compact deterministic evidence string. */\nexport function formatDuplicateEdgeGroup(\n group: DuplicateRelationshipEdgeGroup,\n): string {\n const kinds = group.edges\n .map((edge) => edge.kind)\n .sort((left, right) => left.localeCompare(right));\n return `${group.from} -> ${group.to} (${kinds.join(\" + \")})`;\n}\n\n/**\n * Collect the groups of parallel same-family stored edges over the directed\n * ordering and hierarchy families. Each family joins a kind with its inverse\n * spelling in semantic orientation, so a reciprocal pair such as\n * `A blocked_by B` plus `B blocks A` collapses onto one oriented endpoint\n * pair. Only groups holding at least two stored spellings are returned, in\n * deterministic orientation order with per-group edges sorted by kind, source,\n * then target — the exact stored identities remediation planning targets.\n */\nexport function collectDuplicateRelationshipEdgeGroups(\n assembly: WorkspaceRelationshipAssembly,\n): DuplicateRelationshipEdgeGroup[] {\n const registry = assembly.graph.registry();\n const groups = new Map<string, DuplicateRelationshipEdgeGroup>();\n for (const edge of assembly.graph.edges()) {\n const definition = registry.require(edge.kind);\n if (!isTransitiveKind(definition)) continue;\n const oriented = orientTransitiveEdge(edge, definition);\n if (oriented.from === oriented.to) continue;\n const key = `${transitiveFamilyKey(definition)}::${oriented.from}::${oriented.to}`;\n const group = groups.get(key);\n if (group) group.edges.push(edge);\n else groups.set(key, { ...oriented, edges: [edge] });\n }\n const duplicated = [...groups.values()].filter(\n (group) => group.edges.length >= 2,\n );\n // Within one oriented group every stored spelling has a distinct kind: a\n // same-kind restatement of the same oriented pair would carry identical\n // endpoints and is deduplicated by edge identity during graph construction.\n for (const group of duplicated)\n group.edges.sort((left, right) => left.kind.localeCompare(right.kind));\n return duplicated.sort(\n (left, right) =>\n left.from.localeCompare(right.from) || left.to.localeCompare(right.to),\n );\n}\n\n/**\n * Collect duplicate stored-edge findings from the oriented duplicate groups.\n * Transitive-reduction redundancy analysis deliberately skips the direct edge\n * under test, so these exact parallels are invisible there and this is the\n * only surface that reports them.\n */\nfunction collectDuplicateEdgeFindings(\n assembly: WorkspaceRelationshipAssembly,\n nodeStates: Map<string, AuditNodeState>,\n maxSampleSize: number,\n): RelationshipAuditFinding[] {\n const active: string[] = [];\n const legacy: string[] = [];\n for (const group of collectDuplicateRelationshipEdgeGroups(assembly)) {\n const subjects =\n isActiveAuditMember(group.from, nodeStates) ||\n isActiveAuditMember(group.to, nodeStates)\n ? active\n : legacy;\n subjects.push(formatDuplicateEdgeGroup(group));\n }\n const findings: RelationshipAuditFinding[] = [];\n appendFinding(\n findings,\n active,\n maxSampleSize,\n \"duplicate_edge\",\n \"info\",\n \"One semantic relationship should be stored once; parallel same-family spellings (reciprocal inverse pairs included) add no information and skew degree metrics.\",\n (count) => `${count} duplicated relationship(s) between active endpoints`,\n \"Remove all but one stored spelling of the relationship; keep the canonical direction the holder declared first.\",\n );\n appendFinding(\n findings,\n legacy,\n maxSampleSize,\n \"legacy_duplicate_edge\",\n \"info\",\n \"Duplicated spellings between exclusively terminal items are historical noise with no scheduling effect.\",\n (count) => `${count} duplicated relationship(s) between terminal endpoints`,\n \"Leave as history debt or clean up in a dedicated changelog-safe closed-item batch.\",\n );\n return findings;\n}\n\n/** Compute structural coverage metrics and coverage-policy findings. */\nfunction collectCoverageReport(\n assembly: WorkspaceRelationshipAssembly,\n nodeStates: Map<string, AuditNodeState>,\n exemptIsolates: Set<string>,\n maxSampleSize: number,\n edgesByKind: Record<string, number>,\n): RelationshipAuditReport {\n let activeNodes = 0;\n let missingNodes = 0;\n let isolatedActiveNodes = 0;\n let degreeLeqOneActive = 0;\n const isolates: string[] = [];\n const sparse: string[] = [];\n for (const id of assembly.graph.nodes()) {\n const state = nodeStates.get(id);\n /* c8 ignore next -- every graph node originates from assembly details by construction */\n if (!state) continue;\n if (state.missing) {\n missingNodes += 1;\n continue;\n }\n if (state.terminal) continue;\n activeNodes += 1;\n const degree = assembly.graph.incidentEdges(id).length;\n if (degree > 1) continue;\n degreeLeqOneActive += 1;\n if (degree === 0) isolatedActiveNodes += 1;\n if (exemptIsolates.has(id.toLowerCase())) continue;\n if (degree === 0) isolates.push(id);\n else sparse.push(id);\n }\n const findings: RelationshipAuditFinding[] = [];\n appendFinding(\n findings,\n isolates,\n maxSampleSize,\n \"isolated_active_node\",\n \"warning\",\n \"Active work should be reachable from the graph unless explicitly declared a valid isolate.\",\n (count) => `${count} active item(s) with no relationships`,\n \"Link the item to its parent, prerequisite, or origin — or register it as an exempt isolate.\",\n );\n appendFinding(\n findings,\n sparse,\n maxSampleSize,\n \"sparse_active_node\",\n \"info\",\n \"Active items with a single edge often miss an honest semantic partner; sparse is not automatically defective.\",\n (count) => `${count} active item(s) with exactly one relationship`,\n \"Investigate for an honest second edge (story->task, defect family, cross-epic complement); do not fabricate one.\",\n );\n return {\n findings,\n profile: {\n nodes: assembly.graph.nodes().length,\n edges: assembly.graph.edges().length,\n edges_by_kind: Object.fromEntries(\n Object.entries(edgesByKind).sort(([left], [right]) =>\n left.localeCompare(right),\n ),\n ),\n active_nodes: activeNodes,\n missing_nodes: missingNodes,\n isolated_active_nodes: isolatedActiveNodes,\n degree_leq_one_active_nodes: degreeLeqOneActive,\n },\n };\n}\n\n/**\n * Audit one assembled workspace relationship graph against the shared\n * governance policy and return deterministic machine-readable findings plus a\n * structural coverage profile.\n *\n * The audit is read-only and never proposes inventing an edge: integrity\n * findings report evidence for investigation, coverage findings honor explicit\n * isolate exemptions, and cycle findings enumerate the strongly connected\n * members so callers can decide which edge to retype, remove, or waive.\n */\nexport function auditWorkspaceRelationshipGraph(\n assembly: WorkspaceRelationshipAssembly,\n options: RelationshipAuditOptions = {},\n): RelationshipAuditReport {\n const isTerminal =\n options.isTerminal ??\n ((status: string) => status === \"closed\" || status === \"canceled\");\n const isBlocked =\n options.isBlocked ?? ((status: string) => status === \"blocked\");\n const maxSampleSize = options.maxSampleSize ?? DEFAULT_MAX_SAMPLE_SIZE;\n if (!Number.isInteger(maxSampleSize) || maxSampleSize < 1)\n throw new TypeError(\n `Invalid audit sample bound: ${String(options.maxSampleSize)}`,\n );\n const exemptIsolates = new Set(\n (options.exemptIsolates ?? [])\n .filter((id): id is string => typeof id === \"string\")\n .map((id) => id.trim().toLowerCase()),\n );\n const nodeStates = new Map<string, AuditNodeState>(\n assembly.details.map((detail) => [\n detail.id,\n {\n id: detail.id,\n status: detail.status,\n missing: assembly.missingIdSet.has(detail.id.toLowerCase()),\n terminal: isTerminal(detail.status),\n },\n ]),\n );\n options.signal?.throwIfAborted();\n\n const edgesByKind: Record<string, number> = {};\n for (const edge of assembly.graph.edges())\n edgesByKind[edge.kind] = (edgesByKind[edge.kind] ?? 0) + 1;\n const findings = collectIntegrityFindings(\n assembly,\n isTerminal,\n maxSampleSize,\n );\n options.signal?.throwIfAborted();\n findings.push(\n ...collectOrderingFindings(assembly, nodeStates, isBlocked, maxSampleSize),\n );\n options.signal?.throwIfAborted();\n findings.push(\n ...collectDuplicateEdgeFindings(assembly, nodeStates, maxSampleSize),\n );\n options.signal?.throwIfAborted();\n const coverage = collectCoverageReport(\n assembly,\n nodeStates,\n exemptIsolates,\n maxSampleSize,\n edgesByKind,\n );\n findings.push(...coverage.findings);\n\n findings.sort(\n (left, right) =>\n SEVERITY_RANK[left.severity] - SEVERITY_RANK[right.severity] ||\n left.code.localeCompare(right.code) ||\n left.sample[0]!.localeCompare(right.sample[0]!),\n );\n return {\n findings,\n profile: coverage.profile,\n };\n}\n"],"names":[],"mappings":";;AAeA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AA+ExB,mEAAmE;AACnE,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC,0DAA0D;AAC1D,MAAM,aAAa,GAA8C;IAC/D,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,CAAC;CACR,CAAC;AAsCF,kFAAkF;AAClF,SAAS,YAAY,CACnB,IAAkC,EAClC,QAAmC,EACnC,MAAc,EACd,QAAmC,EACnC,QAA2B,EAC3B,aAAqB,EACrB,WAAmB;IAEnB,MAAM,MAAM,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAA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BAA4B,CAAC,QAAQ,EAAE,UAAU,EAAE,aAAa,CAAC,CACrE,CAAC;IACF,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,qBAAqB,CACpC,QAAQ,EACR,UAAU,EACV,cAAc,EACd,aAAa,EACb,WAAW,CACZ,CAAC;IACF,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEpC,QAAQ,CAAC,IAAI,CACX,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CACd,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC;QAC5D,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAE,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAE,CAAC,CAClD,CAAC;IACF,OAAO;QACL,QAAQ;QACR,OAAO,EAAE,QAAQ,CAAC,OAAO;KAC1B,CAAC;AACJ,CAAC","debugId":"a78eee2f-0423-565f-91b6-88d0ab46d529"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @module sdk/graph
3
+ *
4
+ * Public workspace graph toolkit: one-pass relationship assembly with
5
+ * missing-reference governance, registry-semantics traversal (hierarchy,
6
+ * execution order, bounded path enumeration), and the policy-aware
7
+ * relationship audit. Everything here layers on the dependency-free kernel in
8
+ * `sdk/relationships` and is safe for CLI, MCP, extension, and non-PM callers.
9
+ */
10
+ export { computeRelationshipDominators, detectRelationshipCommunities, findRedundantRelationshipEdges, type GraphCommunityOptions, type GraphDominatorOptions, type GraphRedundancyOptions, type RedundantRelationshipEdge, type RelationshipCommunity, type RelationshipCommunityAnalysis, type RelationshipDominatorAnalysis, type RelationshipDominatorRow, } from "./analytics.js";
11
+ export { assembleWorkspaceRelationshipGraph, collectDanglingDependencyReferences, collectMissingDependencyTargetIds, type DanglingDependencyReference, type DanglingDependencyReferenceSummary, type DependencyReferenceHolder, type DependencyReferenceSource, type WorkspaceRelationshipAssembly, type WorkspaceRelationshipItem, type WorkspaceRelationshipNodeDetails, } from "./assembly.js";
12
+ export { auditWorkspaceRelationshipGraph, collectDuplicateRelationshipEdgeGroups, formatDuplicateEdgeGroup, type DuplicateRelationshipEdgeGroup, type RelationshipAuditFinding, type RelationshipAuditFindingCode, type RelationshipAuditOptions, type RelationshipAuditReport, type RelationshipAuditSeverity, type RelationshipCoverageProfile, } from "./governance.js";
13
+ export { enumerateRelationshipPaths, hierarchyAncestors, hierarchyDescendants, orderingPredecessors, orderingSuccessors, type GraphPathOptions, type GraphTraversalOptions, type RelationshipPath, } from "./traversal.js";
14
+ export { computeWorkspaceGraphFingerprint, resetWorkspaceGraphCache, workspaceGraphCache, WorkspaceGraphCache, type GraphCacheMetadata, type WorkspaceGraphCacheLookup, } from "./cache.js";
15
+ export { planRelationshipRemediation, type RelationshipRemediationCode, type RelationshipRemediationConfidence, type RelationshipRemediationOperation, type RelationshipRemediationPlan, type RelationshipRemediationPlanOptions, type RelationshipRemediationStep, } from "./remediation.js";
16
+ export { GRAPH_SUBCOMMAND_VALUES, parseGraphSubcommand, runGraph, type GraphAnalyzeResult, type GraphAuditResult, type GraphCommandOptions, type GraphCommunitiesResult, type GraphCommunityRow, type GraphDominatorRow, type GraphDominatorsResult, type GraphExecutionSummary, type GraphImpactResult, type GraphImpactRow, type GraphKnowledgeSummary, type GraphPathRow, type GraphPathsResult, type GraphPlanResult, type GraphQueryCost, type GraphRedundancyResult, type GraphRedundancyRow, type GraphResult, type GraphSubcommand, type GraphTraversalResult, } from "./run.js";
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @module sdk/graph
3
+ *
4
+ * Public workspace graph toolkit: one-pass relationship assembly with
5
+ * missing-reference governance, registry-semantics traversal (hierarchy,
6
+ * execution order, bounded path enumeration), and the policy-aware
7
+ * relationship audit. Everything here layers on the dependency-free kernel in
8
+ * `sdk/relationships` and is safe for CLI, MCP, extension, and non-PM callers.
9
+ */
10
+
11
+ !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]="fc1760dc-36e8-522f-8e91-28fa04f269a0")}catch(e){}}();
12
+ export { computeRelationshipDominators, detectRelationshipCommunities, findRedundantRelationshipEdges, } from "./analytics.js";
13
+ export { assembleWorkspaceRelationshipGraph, collectDanglingDependencyReferences, collectMissingDependencyTargetIds, } from "./assembly.js";
14
+ export { auditWorkspaceRelationshipGraph, collectDuplicateRelationshipEdgeGroups, formatDuplicateEdgeGroup, } from "./governance.js";
15
+ export { enumerateRelationshipPaths, hierarchyAncestors, hierarchyDescendants, orderingPredecessors, orderingSuccessors, } from "./traversal.js";
16
+ export { computeWorkspaceGraphFingerprint, resetWorkspaceGraphCache, workspaceGraphCache, WorkspaceGraphCache, } from "./cache.js";
17
+ export { planRelationshipRemediation, } from "./remediation.js";
18
+ export { GRAPH_SUBCOMMAND_VALUES, parseGraphSubcommand, runGraph, } from "./run.js";
19
+ //# sourceMappingURL=index.js.map
20
+ //# debugId=fc1760dc-36e8-522f-8e91-28fa04f269a0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["sdk/graph/index.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/graph\n *\n * Public workspace graph toolkit: one-pass relationship assembly with\n * missing-reference governance, registry-semantics traversal (hierarchy,\n * execution order, bounded path enumeration), and the policy-aware\n * relationship audit. Everything here layers on the dependency-free kernel in\n * `sdk/relationships` and is safe for CLI, MCP, extension, and non-PM callers.\n */\nexport {\n computeRelationshipDominators,\n detectRelationshipCommunities,\n findRedundantRelationshipEdges,\n type GraphCommunityOptions,\n type GraphDominatorOptions,\n type GraphRedundancyOptions,\n type RedundantRelationshipEdge,\n type RelationshipCommunity,\n type RelationshipCommunityAnalysis,\n type RelationshipDominatorAnalysis,\n type RelationshipDominatorRow,\n} from \"./analytics.js\";\nexport {\n assembleWorkspaceRelationshipGraph,\n collectDanglingDependencyReferences,\n collectMissingDependencyTargetIds,\n type DanglingDependencyReference,\n type DanglingDependencyReferenceSummary,\n type DependencyReferenceHolder,\n type DependencyReferenceSource,\n type WorkspaceRelationshipAssembly,\n type WorkspaceRelationshipItem,\n type WorkspaceRelationshipNodeDetails,\n} from \"./assembly.js\";\nexport {\n auditWorkspaceRelationshipGraph,\n collectDuplicateRelationshipEdgeGroups,\n formatDuplicateEdgeGroup,\n type DuplicateRelationshipEdgeGroup,\n type RelationshipAuditFinding,\n type RelationshipAuditFindingCode,\n type RelationshipAuditOptions,\n type RelationshipAuditReport,\n type RelationshipAuditSeverity,\n type RelationshipCoverageProfile,\n} from \"./governance.js\";\nexport {\n enumerateRelationshipPaths,\n hierarchyAncestors,\n hierarchyDescendants,\n orderingPredecessors,\n orderingSuccessors,\n type GraphPathOptions,\n type GraphTraversalOptions,\n type RelationshipPath,\n} from \"./traversal.js\";\nexport {\n computeWorkspaceGraphFingerprint,\n resetWorkspaceGraphCache,\n workspaceGraphCache,\n WorkspaceGraphCache,\n type GraphCacheMetadata,\n type WorkspaceGraphCacheLookup,\n} from \"./cache.js\";\nexport {\n planRelationshipRemediation,\n type RelationshipRemediationCode,\n type RelationshipRemediationConfidence,\n type RelationshipRemediationOperation,\n type RelationshipRemediationPlan,\n type RelationshipRemediationPlanOptions,\n type RelationshipRemediationStep,\n} from \"./remediation.js\";\nexport {\n GRAPH_SUBCOMMAND_VALUES,\n parseGraphSubcommand,\n runGraph,\n type GraphAnalyzeResult,\n type GraphAuditResult,\n type GraphCommandOptions,\n type GraphCommunitiesResult,\n type GraphCommunityRow,\n type GraphDominatorRow,\n type GraphDominatorsResult,\n type GraphExecutionSummary,\n type GraphImpactResult,\n type GraphImpactRow,\n type GraphKnowledgeSummary,\n type GraphPathRow,\n type GraphPathsResult,\n type GraphPlanResult,\n type GraphQueryCost,\n type GraphRedundancyResult,\n type GraphRedundancyRow,\n type GraphResult,\n type GraphSubcommand,\n type GraphTraversalResult,\n} from \"./run.js\";\n"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;;AACH,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,8BAA8B,GAS/B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,kCAAkC,EAClC,mCAAmC,EACnC,iCAAiC,GAQlC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,+BAA+B,EAC/B,sCAAsC,EACtC,wBAAwB,GAQzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,0BAA0B,EAC1B,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,GAInB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,GAGpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,2BAA2B,GAO5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,QAAQ,GAqBT,MAAM,UAAU,CAAC","debugId":"fc1760dc-36e8-522f-8e91-28fa04f269a0"}