@unbrained/pm-cli 2026.7.14 → 2026.7.15

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 (708) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +48 -0
  3. package/README.md +14 -11
  4. package/dist/cli/argv-utils.d.ts +1 -4
  5. package/dist/cli/argv-utils.js +3 -13
  6. package/dist/cli/argv-utils.js.map +1 -1
  7. package/dist/cli/bootstrap-args.d.ts +6 -4
  8. package/dist/cli/bootstrap-args.js +51 -16
  9. package/dist/cli/bootstrap-args.js.map +1 -1
  10. package/dist/cli/bundle-integrity.d.ts +49 -0
  11. package/dist/cli/bundle-integrity.js +111 -0
  12. package/dist/cli/bundle-integrity.js.map +1 -0
  13. package/dist/cli/commands/completion.js +7 -2
  14. package/dist/cli/commands/completion.js.map +1 -1
  15. package/dist/cli/commands/config.d.ts +6 -163
  16. package/dist/cli/commands/config.js +4 -1133
  17. package/dist/cli/commands/config.js.map +1 -1
  18. package/dist/cli/commands/context.d.ts +2 -4
  19. package/dist/cli/commands/context.js +10 -85
  20. package/dist/cli/commands/context.js.map +1 -1
  21. package/dist/cli/commands/create.d.ts +1 -0
  22. package/dist/cli/commands/create.js +3 -2
  23. package/dist/cli/commands/create.js.map +1 -1
  24. package/dist/cli/commands/extension/describe.d.ts +2 -91
  25. package/dist/cli/commands/extension/describe.js +4 -142
  26. package/dist/cli/commands/extension/describe.js.map +1 -1
  27. package/dist/cli/commands/extension/scaffold.d.ts +2 -36
  28. package/dist/cli/commands/extension/scaffold.js +4 -2435
  29. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  30. package/dist/cli/commands/extension/shared.d.ts +2 -28
  31. package/dist/cli/commands/extension/shared.js +4 -130
  32. package/dist/cli/commands/extension/shared.js.map +1 -1
  33. package/dist/cli/commands/extension.d.ts +3 -400
  34. package/dist/cli/commands/extension.js +4 -2183
  35. package/dist/cli/commands/extension.js.map +1 -1
  36. package/dist/cli/commands/gc.d.ts +6 -56
  37. package/dist/cli/commands/gc.js +4 -270
  38. package/dist/cli/commands/gc.js.map +1 -1
  39. package/dist/cli/commands/get.d.ts +18 -5
  40. package/dist/cli/commands/get.js +117 -58
  41. package/dist/cli/commands/get.js.map +1 -1
  42. package/dist/cli/commands/health.d.ts +6 -184
  43. package/dist/cli/commands/health.js +4 -1747
  44. package/dist/cli/commands/health.js.map +1 -1
  45. package/dist/cli/commands/history-compact.d.ts +4 -139
  46. package/dist/cli/commands/history-compact.js +5 -510
  47. package/dist/cli/commands/history-compact.js.map +1 -1
  48. package/dist/cli/commands/history-redact.d.ts +8 -120
  49. package/dist/cli/commands/history-redact.js +6 -581
  50. package/dist/cli/commands/history-redact.js.map +1 -1
  51. package/dist/cli/commands/history-repair.d.ts +7 -89
  52. package/dist/cli/commands/history-repair.js +5 -257
  53. package/dist/cli/commands/history-repair.js.map +1 -1
  54. package/dist/cli/commands/history.d.ts +1 -2
  55. package/dist/cli/commands/history.js +6 -48
  56. package/dist/cli/commands/history.js.map +1 -1
  57. package/dist/cli/commands/index.d.ts +1 -0
  58. package/dist/cli/commands/index.js +3 -2
  59. package/dist/cli/commands/index.js.map +1 -1
  60. package/dist/cli/commands/init-agent-guidance.d.ts +6 -113
  61. package/dist/cli/commands/init-agent-guidance.js +4 -431
  62. package/dist/cli/commands/init-agent-guidance.js.map +1 -1
  63. package/dist/cli/commands/init.d.ts +6 -181
  64. package/dist/cli/commands/init.js +4 -690
  65. package/dist/cli/commands/init.js.map +1 -1
  66. package/dist/cli/commands/next.js +3 -3
  67. package/dist/cli/commands/next.js.map +1 -1
  68. package/dist/cli/commands/profile.d.ts +4 -174
  69. package/dist/cli/commands/profile.js +4 -425
  70. package/dist/cli/commands/profile.js.map +1 -1
  71. package/dist/cli/commands/restore.d.ts +4 -19
  72. package/dist/cli/commands/restore.js +9 -158
  73. package/dist/cli/commands/restore.js.map +1 -1
  74. package/dist/cli/commands/schema.d.ts +7 -507
  75. package/dist/cli/commands/schema.js +5 -1254
  76. package/dist/cli/commands/schema.js.map +1 -1
  77. package/dist/cli/commands/test.d.ts +2 -4
  78. package/dist/cli/commands/test.js +7 -97
  79. package/dist/cli/commands/test.js.map +1 -1
  80. package/dist/cli/commands/validate.d.ts +9 -249
  81. package/dist/cli/commands/validate.js +9 -2150
  82. package/dist/cli/commands/validate.js.map +1 -1
  83. package/dist/cli/extension-command-help.js +18 -4
  84. package/dist/cli/extension-command-help.js.map +1 -1
  85. package/dist/cli/extension-command-options.js +3 -3
  86. package/dist/cli/extension-command-options.js.map +1 -1
  87. package/dist/cli/help-content.js +7 -3
  88. package/dist/cli/help-content.js.map +1 -1
  89. package/dist/cli/main.js +20 -30
  90. package/dist/cli/main.js.map +1 -1
  91. package/dist/cli/register-list-query.js +4 -2
  92. package/dist/cli/register-list-query.js.map +1 -1
  93. package/dist/cli/register-mutation.js +11 -3
  94. package/dist/cli/register-mutation.js.map +1 -1
  95. package/dist/cli/register-setup.js +4 -2
  96. package/dist/cli/register-setup.js.map +1 -1
  97. package/dist/cli/registration-helpers.js +3 -2
  98. package/dist/cli/registration-helpers.js.map +1 -1
  99. package/dist/cli-bundle/bundle-manifest.json +782 -0
  100. package/dist/cli-bundle/chunks/{append-PVZJDM6J.js → append-OJQFUQ4T.js} +5 -5
  101. package/dist/cli-bundle/chunks/append-UZVHUO74.js +11 -0
  102. package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js → chunk-2IFFUZLC.js} +2 -2
  103. package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js → chunk-2JKGO6QX.js} +4 -4
  104. package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js → chunk-2NCIPMQP.js} +2 -2
  105. package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js → chunk-2VPAVL7O.js} +2 -2
  106. package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js → chunk-2WSE6PO2.js} +4 -4
  107. package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js → chunk-34L5OT3Y.js} +2 -2
  108. package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js → chunk-3AUGG2DP.js} +3 -3
  109. package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js → chunk-3CLU2XZO.js} +4 -4
  110. package/dist/cli-bundle/chunks/{chunk-N3CMP4NI.js → chunk-3S5QVM5H.js} +43 -7
  111. package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +1 -0
  112. package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js +64 -0
  113. package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js.map +7 -0
  114. package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js → chunk-3WM75PWC.js} +3 -3
  115. package/dist/cli-bundle/chunks/chunk-4223PVZT.js +121 -0
  116. package/dist/cli-bundle/chunks/chunk-4223PVZT.js.map +7 -0
  117. package/dist/cli-bundle/chunks/{chunk-5URI7TPJ.js → chunk-4XQ3BDV4.js} +281 -164
  118. package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +7 -0
  119. package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js → chunk-5JLUII3O.js} +13 -13
  120. package/dist/cli-bundle/chunks/{chunk-MKL4CP2I.js → chunk-5ZSLZLDN.js} +631 -246
  121. package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{chunk-Q37E63AM.js → chunk-6CFNAVTF.js} +21 -141
  123. package/dist/cli-bundle/chunks/chunk-6CFNAVTF.js.map +7 -0
  124. package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js → chunk-6N2VXVTQ.js} +2 -2
  125. package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js → chunk-6S3YSUYG.js} +3 -3
  126. package/dist/cli-bundle/chunks/{chunk-ZUKSZVBW.js → chunk-7B67ZL4N.js} +8 -7
  127. package/dist/cli-bundle/chunks/chunk-7B67ZL4N.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{chunk-IA3YFTXT.js → chunk-7PIWCHTW.js} +11 -13
  129. package/dist/cli-bundle/chunks/chunk-7PIWCHTW.js.map +1 -0
  130. package/dist/cli-bundle/chunks/{chunk-BPD26E3P.js → chunk-7Z4LKRS4.js} +291 -81
  131. package/dist/cli-bundle/chunks/chunk-7Z4LKRS4.js.map +1 -0
  132. package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js → chunk-AHVTB5I5.js} +4 -4
  133. package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js → chunk-APRVSW2O.js} +3 -3
  134. package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js → chunk-B7PE22W6.js} +4 -4
  135. package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js → chunk-BCOFWYW4.js} +3 -3
  136. package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js → chunk-BEP7WJA2.js} +4 -4
  137. package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js +1114 -0
  138. package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js.map +7 -0
  139. package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js → chunk-BSEQUTQP.js} +2 -2
  140. package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js.map → chunk-BSEQUTQP.js.map} +2 -2
  141. package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js → chunk-CRVF2JDM.js} +10 -10
  142. package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js → chunk-DM4H7FP4.js} +3 -3
  143. package/dist/cli-bundle/chunks/chunk-DUT67M43.js +5 -0
  144. package/dist/cli-bundle/chunks/{chunk-44LNIULG.js → chunk-DYH63FX7.js} +4 -4
  145. package/dist/cli-bundle/chunks/{chunk-LWTIRS3Y.js → chunk-E2OJMKML.js} +306 -82
  146. package/dist/cli-bundle/chunks/chunk-E2OJMKML.js.map +7 -0
  147. package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js → chunk-EAB64KLB.js} +4 -4
  148. package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js → chunk-EACOH7AU.js} +10 -10
  149. package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js → chunk-EH2OPHBI.js} +10 -10
  150. package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js.map → chunk-EH2OPHBI.js.map} +1 -1
  151. package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js → chunk-EJEXHTY5.js} +2 -2
  152. package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js → chunk-EYLCSJAI.js} +2 -2
  153. package/dist/cli-bundle/chunks/{chunk-655STMGA.js → chunk-FMBNM2EN.js} +2 -2
  154. package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js → chunk-FNSPG7MU.js} +12 -12
  155. package/dist/cli-bundle/chunks/{chunk-5CT5BW6E.js → chunk-GM5QHQU6.js} +46 -40
  156. package/dist/cli-bundle/chunks/chunk-GM5QHQU6.js.map +7 -0
  157. package/dist/cli-bundle/chunks/{chunk-FTQLW4JD.js → chunk-GOSLKLFE.js} +418 -24
  158. package/dist/cli-bundle/chunks/chunk-GOSLKLFE.js.map +1 -0
  159. package/dist/cli-bundle/chunks/{chunk-KB726FMH.js → chunk-H2Z3FYXQ.js} +4 -4
  160. package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js +162 -0
  161. package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js.map +1 -0
  162. package/dist/cli-bundle/chunks/{chunk-2QIQGYPW.js → chunk-H5APFTHZ.js} +53 -10
  163. package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +7 -0
  164. package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js +118 -0
  165. package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js.map +1 -0
  166. package/dist/cli-bundle/chunks/{chunk-ZAYYDNB3.js → chunk-HO4KXD6I.js} +22 -142
  167. package/dist/cli-bundle/chunks/chunk-HO4KXD6I.js.map +1 -0
  168. package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js → chunk-HYB5AZ63.js} +203 -62
  169. package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js.map → chunk-HYB5AZ63.js.map} +3 -3
  170. package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js → chunk-IA5FKNII.js} +2 -2
  171. package/dist/cli-bundle/chunks/{chunk-JL7WZ4O2.js → chunk-IG3SWA4A.js} +33 -9
  172. package/dist/cli-bundle/chunks/chunk-IG3SWA4A.js.map +7 -0
  173. package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js → chunk-IJIICKVW.js} +2 -2
  174. package/dist/cli-bundle/chunks/{chunk-IGED7NH2.js → chunk-ILX33QXL.js} +668 -251
  175. package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +7 -0
  176. package/dist/cli-bundle/chunks/{chunk-UGTVWL3E.js → chunk-INU6DKT5.js} +47 -41
  177. package/dist/cli-bundle/chunks/chunk-INU6DKT5.js.map +1 -0
  178. package/dist/cli-bundle/chunks/{chunk-UB2QYSTO.js → chunk-J5AOEGDC.js} +26 -18
  179. package/dist/cli-bundle/chunks/chunk-J5AOEGDC.js.map +1 -0
  180. package/dist/cli-bundle/chunks/{chunk-4DY4KPQI.js → chunk-J6364LFM.js} +1330 -937
  181. package/dist/cli-bundle/chunks/chunk-J6364LFM.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{chunk-DVOLZJ3C.js → chunk-J6EY5V4N.js} +1295 -939
  183. package/dist/cli-bundle/chunks/chunk-J6EY5V4N.js.map +1 -0
  184. package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js +1097 -0
  185. package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js.map +1 -0
  186. package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js → chunk-JOUQZENX.js} +3 -3
  187. package/dist/cli-bundle/chunks/{chunk-J4NZOP3I.js → chunk-JXQUXVMI.js} +9 -8
  188. package/dist/cli-bundle/chunks/chunk-JXQUXVMI.js.map +1 -0
  189. package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js → chunk-JYFOV7FC.js} +4 -4
  190. package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js → chunk-K2X6U4UA.js} +4 -4
  191. package/dist/cli-bundle/chunks/{chunk-6OTZMORS.js → chunk-K3WII2ME.js} +27 -27
  192. package/dist/cli-bundle/chunks/chunk-K3WII2ME.js.map +7 -0
  193. package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js → chunk-KG44YSKD.js} +4 -4
  194. package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js → chunk-KPMKHGEA.js} +4 -4
  195. package/dist/cli-bundle/chunks/{chunk-QASRVKUQ.js → chunk-LPYWLWDS.js} +257 -163
  196. package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +1 -0
  197. package/dist/cli-bundle/chunks/{chunk-RGXD5JJR.js → chunk-LSG2U345.js} +19 -12
  198. package/dist/cli-bundle/chunks/chunk-LSG2U345.js.map +7 -0
  199. package/dist/cli-bundle/chunks/chunk-MIQDDLB5.js +5 -0
  200. package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js → chunk-NLDFBC6J.js} +2 -2
  201. package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js → chunk-NP22ERDF.js} +3 -3
  202. package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js → chunk-NU3IMIEA.js} +2 -2
  203. package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js → chunk-NVPZIJVR.js} +2 -2
  204. package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js → chunk-ODALILG3.js} +2 -2
  205. package/dist/cli-bundle/chunks/{chunk-CDJYP7OQ.js → chunk-ONG5V5CI.js} +190 -63
  206. package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +1 -0
  207. package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js → chunk-ONREO4ST.js} +3 -3
  208. package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js +61 -0
  209. package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js.map +1 -0
  210. package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js → chunk-P74IZQ7A.js} +12 -12
  211. package/dist/cli-bundle/chunks/chunk-PENXZX3U.js +172 -0
  212. package/dist/cli-bundle/chunks/chunk-PENXZX3U.js.map +7 -0
  213. package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js → chunk-PGY23YTC.js} +3 -3
  214. package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js → chunk-PMOSXADO.js} +3 -3
  215. package/dist/cli-bundle/chunks/chunk-PNTULOGU.js +9 -0
  216. package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js → chunk-Q7A43DS4.js} +2 -2
  217. package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js → chunk-QEHQ2GVG.js} +2 -2
  218. package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js → chunk-QIPLHNP7.js} +7 -7
  219. package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js → chunk-QKECXBBG.js} +3 -3
  220. package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js.map → chunk-QKECXBBG.js.map} +1 -1
  221. package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js → chunk-QKJGPFAF.js} +3 -3
  222. package/dist/cli-bundle/chunks/{chunk-F7PSHRNO.js → chunk-QKXHFPYM.js} +27 -10
  223. package/dist/cli-bundle/chunks/chunk-QKXHFPYM.js.map +1 -0
  224. package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js → chunk-RLCHOOHC.js} +2 -2
  225. package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js → chunk-RMLWNPH2.js} +2 -2
  226. package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js → chunk-RRM5JYJC.js} +2 -2
  227. package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js → chunk-S6MQESFR.js} +4 -4
  228. package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js → chunk-SDQLJWBO.js} +4 -4
  229. package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js → chunk-SELVXEZK.js} +2 -2
  230. package/dist/cli-bundle/chunks/{chunk-DYEX6NFH.js → chunk-TD3LVC7D.js} +438 -23
  231. package/dist/cli-bundle/chunks/chunk-TD3LVC7D.js.map +7 -0
  232. package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js → chunk-TKOVBP6C.js} +2 -2
  233. package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js → chunk-TQSZFPIS.js} +4 -4
  234. package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js → chunk-TSMHDIW4.js} +2 -2
  235. package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js → chunk-UFXU44HV.js} +4 -4
  236. package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js → chunk-ULTHRDBP.js} +3 -3
  237. package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js → chunk-UMOPHQSU.js} +9 -9
  238. package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js.map → chunk-UMOPHQSU.js.map} +2 -2
  239. package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js → chunk-UOHFKBUV.js} +3 -3
  240. package/dist/cli-bundle/chunks/{chunk-PHKP3AGR.js → chunk-UWQHLMEB.js} +35 -18
  241. package/dist/cli-bundle/chunks/chunk-UWQHLMEB.js.map +7 -0
  242. package/dist/cli-bundle/chunks/{chunk-6TTOHMTB.js → chunk-UXONS674.js} +45 -112
  243. package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +1 -0
  244. package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js → chunk-UY2ACEMF.js} +7 -7
  245. package/dist/cli-bundle/chunks/{chunk-6PKA3SJQ.js → chunk-WQPUU7XD.js} +19 -28
  246. package/dist/cli-bundle/chunks/chunk-WQPUU7XD.js.map +1 -0
  247. package/dist/cli-bundle/chunks/{chunk-7TQMR6LK.js → chunk-WT3ZEOGH.js} +70 -20
  248. package/dist/cli-bundle/chunks/chunk-WT3ZEOGH.js.map +7 -0
  249. package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js → chunk-WUJQK4YV.js} +4 -4
  250. package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js → chunk-XSJUSQAE.js} +2 -2
  251. package/dist/cli-bundle/chunks/{chunk-6MHSBDGD.js → chunk-XXXF6PAQ.js} +50 -117
  252. package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +7 -0
  253. package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js → chunk-YAQEBNY7.js} +4 -4
  254. package/dist/cli-bundle/chunks/{chunk-7QDSYUMF.js → chunk-YAROI3PD.js} +44 -21
  255. package/dist/cli-bundle/chunks/chunk-YAROI3PD.js.map +1 -0
  256. package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js → chunk-YBLZ2VE7.js} +13 -13
  257. package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js → chunk-YCQET3OT.js} +2 -2
  258. package/dist/cli-bundle/chunks/chunk-YUSOJDWM.js +9 -0
  259. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +58 -0
  260. package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +1 -0
  261. package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js → chunk-ZI6VQWQ7.js} +4 -4
  262. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +68 -0
  263. package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +7 -0
  264. package/dist/cli-bundle/chunks/{close-LZECOMHO.js → close-CWODTPKG.js} +5 -5
  265. package/dist/cli-bundle/chunks/close-W6LI2PKM.js +12 -0
  266. package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js → close-many-CQFUY7MR.js} +15 -13
  267. package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +23 -0
  268. package/dist/cli-bundle/chunks/comments-E3TNTK24.js +13 -0
  269. package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js → comments-WGLHR7LB.js} +7 -7
  270. package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js → copy-LXVDXH7B.js} +4 -4
  271. package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +9 -0
  272. package/dist/cli-bundle/chunks/{create-F53OBTOU.js → create-J5U6ND4K.js} +9 -9
  273. package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js → create-LBVCYMEG.js} +9 -9
  274. package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js → delete-PMJBNY5G.js} +4 -4
  275. package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +10 -0
  276. package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js → deps-JZ7TMVCB.js} +7 -4
  277. package/dist/cli-bundle/chunks/{deps-U57I7EAK.js → deps-OA26IS25.js} +7 -4
  278. package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js → docs-FEWB2DQB.js} +6 -6
  279. package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +14 -0
  280. package/dist/cli-bundle/chunks/{files-TBZD7V6H.js → files-6YFBJRBG.js} +6 -6
  281. package/dist/cli-bundle/chunks/{files-TTY6N2AV.js → files-EFIWKFTM.js} +6 -6
  282. package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js → focus-4QJR7FOQ.js} +5 -5
  283. package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +10 -0
  284. package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js → history-compact-CKRPDTJN.js} +6 -10
  285. package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +16 -0
  286. package/dist/cli-bundle/chunks/history-redact-BB3TGDAE.js +15 -0
  287. package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js → history-redact-D225BHOZ.js} +5 -6
  288. package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +16 -0
  289. package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js → history-repair-RQXKQHL4.js} +6 -8
  290. package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js → learnings-JLNLCOL5.js} +7 -7
  291. package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +13 -0
  292. package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +13 -0
  293. package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js → notes-GB47XXQQ.js} +7 -7
  294. package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +24 -0
  295. package/dist/cli-bundle/chunks/{plan-2NNEO46V.js → plan-VDCJ2PCN.js} +10 -10
  296. package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js → profile-FAU7NZML.js} +10 -10
  297. package/dist/cli-bundle/chunks/{profile-U725ATWZ.js → profile-IVXQEL3D.js} +10 -10
  298. package/dist/cli-bundle/chunks/{register-list-query-BUWCYHBT.js → register-list-query-DKA3EH5D.js} +22 -19
  299. package/dist/cli-bundle/chunks/register-list-query-DKA3EH5D.js.map +7 -0
  300. package/dist/cli-bundle/chunks/{register-list-query-KTZ6AGE7.js → register-list-query-UL4UKBBN.js} +23 -20
  301. package/dist/cli-bundle/chunks/register-list-query-UL4UKBBN.js.map +1 -0
  302. package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js → register-mutation-ARFHRW55.js} +36 -32
  303. package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js.map → register-mutation-ARFHRW55.js.map} +2 -2
  304. package/dist/cli-bundle/chunks/{register-mutation-4FMGJJF7.js → register-mutation-RBBJ52DK.js} +37 -33
  305. package/dist/cli-bundle/chunks/register-mutation-RBBJ52DK.js.map +1 -0
  306. package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js → register-operations-ZIBBRSED.js} +41 -39
  307. package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js.map → register-operations-ZIBBRSED.js.map} +1 -1
  308. package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js → register-operations-ZUJ5JWPE.js} +39 -37
  309. package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js.map → register-operations-ZUJ5JWPE.js.map} +1 -1
  310. package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js → register-setup-BCVLFEYS.js} +29 -17
  311. package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js.map → register-setup-BCVLFEYS.js.map} +2 -2
  312. package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js → register-setup-TDCGWIOS.js} +19 -18
  313. package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js.map → register-setup-TDCGWIOS.js.map} +1 -1
  314. package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js → restore-25DLT2Q2.js} +6 -6
  315. package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +14 -0
  316. package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js → schema-FNU3WE4O.js} +7 -6
  317. package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js → schema-NBCM3RAD.js} +7 -6
  318. package/dist/cli-bundle/chunks/update-WWBYOPXO.js +21 -0
  319. package/dist/cli-bundle/chunks/update-WWBYOPXO.js.map +7 -0
  320. package/dist/cli-bundle/chunks/{update-Q3UCILNR.js → update-XHSIAIXE.js} +12 -12
  321. package/dist/cli-bundle/chunks/update-XHSIAIXE.js.map +1 -0
  322. package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +32 -0
  323. package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js.map +7 -0
  324. package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +36 -0
  325. package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js.map +1 -0
  326. package/dist/cli-bundle/main.js +826 -43
  327. package/dist/cli-bundle/main.js.map +4 -4
  328. package/dist/cli-bundle/sdk-runtime.js +70 -57
  329. package/dist/cli-bundle/sdk-testing.js +6 -6
  330. package/dist/cli-bundle/sdk.js +876 -74
  331. package/dist/cli-bundle/sdk.js.map +4 -4
  332. package/dist/cli.js +5 -4
  333. package/dist/cli.js.map +1 -1
  334. package/dist/core/diagnostics/remediation.js +12 -2
  335. package/dist/core/diagnostics/remediation.js.map +1 -1
  336. package/dist/core/history/projection.d.ts +39 -0
  337. package/dist/core/history/projection.js +164 -0
  338. package/dist/core/history/projection.js.map +1 -0
  339. package/dist/core/history/read.d.ts +3 -0
  340. package/dist/core/history/read.js +55 -0
  341. package/dist/core/history/read.js.map +1 -0
  342. package/dist/core/output/output-control.d.ts +18 -0
  343. package/dist/core/output/output-control.js +26 -0
  344. package/dist/core/output/output-control.js.map +1 -0
  345. package/dist/core/output/output.js +20 -8
  346. package/dist/core/output/output.js.map +1 -1
  347. package/dist/core/sentry/helpers.js +10 -2
  348. package/dist/core/sentry/helpers.js.map +1 -1
  349. package/dist/core/shared/command-types.d.ts +2 -0
  350. package/dist/core/shared/command-types.js +2 -2
  351. package/dist/core/shared/command-types.js.map +1 -1
  352. package/dist/core/shared/errors.d.ts +11 -0
  353. package/dist/core/shared/errors.js +2 -2
  354. package/dist/core/shared/errors.js.map +1 -1
  355. package/dist/mcp/server.d.ts +2 -2
  356. package/dist/mcp/tool-definitions.js +5 -5
  357. package/dist/mcp/tool-definitions.js.map +1 -1
  358. package/dist/sdk/author-attribution.d.ts +35 -0
  359. package/dist/sdk/author-attribution.js +118 -0
  360. package/dist/sdk/author-attribution.js.map +1 -0
  361. package/dist/sdk/cli-contracts/command-aliases.d.ts +7 -0
  362. package/dist/sdk/cli-contracts/command-aliases.js +17 -0
  363. package/dist/sdk/cli-contracts/command-aliases.js.map +1 -0
  364. package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
  365. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  366. package/dist/sdk/cli-contracts/tool-option-contracts.js +6 -2
  367. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  368. package/dist/sdk/cli-contracts/tool-parameter-tables.js +21 -2
  369. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  370. package/dist/sdk/cli-contracts/tool-schema.js +3 -3
  371. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  372. package/dist/sdk/cli-contracts.d.ts +1 -0
  373. package/dist/sdk/cli-contracts.js +3 -2
  374. package/dist/sdk/cli-contracts.js.map +1 -1
  375. package/dist/sdk/cli-program.d.ts +8 -0
  376. package/dist/sdk/cli-program.js +39 -0
  377. package/dist/sdk/cli-program.js.map +1 -0
  378. package/dist/sdk/command-line.d.ts +11 -0
  379. package/dist/sdk/command-line.js +40 -0
  380. package/dist/sdk/command-line.js.map +1 -0
  381. package/dist/sdk/config.d.ts +163 -0
  382. package/dist/sdk/config.js +1087 -0
  383. package/dist/sdk/config.js.map +1 -0
  384. package/dist/sdk/context-relevance.d.ts +21 -0
  385. package/dist/sdk/context-relevance.js +70 -2
  386. package/dist/sdk/context-relevance.js.map +1 -1
  387. package/dist/sdk/dependencies.d.ts +15 -2
  388. package/dist/sdk/dependencies.js +97 -8
  389. package/dist/sdk/dependencies.js.map +1 -1
  390. package/dist/{cli/commands → sdk}/extension/bundled-catalog.d.ts +1 -1
  391. package/dist/{cli/commands → sdk}/extension/bundled-catalog.js +12 -12
  392. package/dist/sdk/extension/bundled-catalog.js.map +1 -0
  393. package/dist/sdk/extension/concurrency.d.ts +7 -0
  394. package/dist/sdk/extension/concurrency.js +26 -0
  395. package/dist/sdk/extension/concurrency.js.map +1 -0
  396. package/dist/sdk/extension/describe.d.ts +91 -0
  397. package/dist/sdk/extension/describe.js +144 -0
  398. package/dist/sdk/extension/describe.js.map +1 -0
  399. package/dist/{cli/commands → sdk}/extension/doctor.d.ts +3 -3
  400. package/dist/{cli/commands → sdk}/extension/doctor.js +7 -7
  401. package/dist/sdk/extension/doctor.js.map +1 -0
  402. package/dist/sdk/extension/install-runtime.d.ts +26 -0
  403. package/dist/sdk/extension/install-runtime.js +269 -0
  404. package/dist/sdk/extension/install-runtime.js.map +1 -0
  405. package/dist/sdk/extension/install-snapshot.d.ts +23 -0
  406. package/dist/sdk/extension/install-snapshot.js +66 -0
  407. package/dist/sdk/extension/install-snapshot.js.map +1 -0
  408. package/dist/{cli/commands → sdk}/extension/install-sources.d.ts +3 -3
  409. package/dist/{cli/commands → sdk}/extension/install-sources.js +15 -12
  410. package/dist/sdk/extension/install-sources.js.map +1 -0
  411. package/dist/{cli/commands → sdk}/extension/managed-state.js +6 -6
  412. package/dist/sdk/extension/managed-state.js.map +1 -0
  413. package/dist/sdk/extension/scaffold.d.ts +36 -0
  414. package/dist/sdk/extension/scaffold.js +2436 -0
  415. package/dist/sdk/extension/scaffold.js.map +1 -0
  416. package/dist/sdk/extension/shared.d.ts +28 -0
  417. package/dist/sdk/extension/shared.js +140 -0
  418. package/dist/sdk/extension/shared.js.map +1 -0
  419. package/dist/sdk/extension/update-check.d.ts +15 -0
  420. package/dist/sdk/extension/update-check.js +68 -0
  421. package/dist/sdk/extension/update-check.js.map +1 -0
  422. package/dist/sdk/extension.d.ts +367 -0
  423. package/dist/sdk/extension.js +2174 -0
  424. package/dist/sdk/extension.js.map +1 -0
  425. package/dist/sdk/governance/gc.d.ts +56 -0
  426. package/dist/sdk/governance/gc.js +276 -0
  427. package/dist/sdk/governance/gc.js.map +1 -0
  428. package/dist/sdk/governance/health.d.ts +187 -0
  429. package/dist/sdk/governance/health.js +1796 -0
  430. package/dist/sdk/governance/health.js.map +1 -0
  431. package/dist/sdk/governance/validate.d.ts +255 -0
  432. package/dist/sdk/governance/validate.js +2175 -0
  433. package/dist/sdk/governance/validate.js.map +1 -0
  434. package/dist/sdk/history-compact.d.ts +142 -0
  435. package/dist/sdk/history-compact.js +508 -0
  436. package/dist/sdk/history-compact.js.map +1 -0
  437. package/dist/sdk/history-mcp.d.ts +17 -0
  438. package/dist/sdk/history-mcp.js +68 -0
  439. package/dist/sdk/history-mcp.js.map +1 -0
  440. package/dist/sdk/history-read.d.ts +31 -0
  441. package/dist/sdk/history-read.js +58 -0
  442. package/dist/sdk/history-read.js.map +1 -0
  443. package/dist/sdk/history-redact.d.ts +120 -0
  444. package/dist/sdk/history-redact.js +577 -0
  445. package/dist/sdk/history-redact.js.map +1 -0
  446. package/dist/sdk/history-repair.d.ts +89 -0
  447. package/dist/sdk/history-repair.js +263 -0
  448. package/dist/sdk/history-repair.js.map +1 -0
  449. package/dist/sdk/index.d.ts +25 -1
  450. package/dist/sdk/index.js +27 -3
  451. package/dist/sdk/index.js.map +1 -1
  452. package/dist/sdk/init-agent-guidance.d.ts +113 -0
  453. package/dist/sdk/init-agent-guidance.js +437 -0
  454. package/dist/sdk/init-agent-guidance.js.map +1 -0
  455. package/dist/sdk/init.d.ts +186 -0
  456. package/dist/sdk/init.js +733 -0
  457. package/dist/sdk/init.js.map +1 -0
  458. package/dist/sdk/invocation-author.d.ts +2 -0
  459. package/dist/sdk/invocation-author.js +39 -0
  460. package/dist/sdk/invocation-author.js.map +1 -0
  461. package/dist/sdk/item-children.d.ts +45 -0
  462. package/dist/sdk/item-children.js +75 -0
  463. package/dist/sdk/item-children.js.map +1 -0
  464. package/dist/sdk/item-schedule.d.ts +26 -0
  465. package/dist/sdk/item-schedule.js +28 -0
  466. package/dist/sdk/item-schedule.js.map +1 -0
  467. package/dist/sdk/output.d.ts +7 -0
  468. package/dist/sdk/output.js +11 -0
  469. package/dist/sdk/output.js.map +1 -0
  470. package/dist/sdk/pagination.d.ts +4 -1
  471. package/dist/sdk/pagination.js +13 -5
  472. package/dist/sdk/pagination.js.map +1 -1
  473. package/dist/sdk/profile.d.ts +176 -0
  474. package/dist/sdk/profile.js +431 -0
  475. package/dist/sdk/profile.js.map +1 -0
  476. package/dist/sdk/relationship-analytics.d.ts +108 -0
  477. package/dist/sdk/relationship-analytics.js +292 -0
  478. package/dist/sdk/relationship-analytics.js.map +1 -0
  479. package/dist/sdk/relationship-context.d.ts +67 -0
  480. package/dist/sdk/relationship-context.js +207 -0
  481. package/dist/sdk/relationship-context.js.map +1 -0
  482. package/dist/sdk/relationship-history.d.ts +109 -0
  483. package/dist/sdk/relationship-history.js +401 -0
  484. package/dist/sdk/relationship-history.js.map +1 -0
  485. package/dist/sdk/relationships.d.ts +145 -0
  486. package/dist/sdk/relationships.js +551 -0
  487. package/dist/sdk/relationships.js.map +1 -0
  488. package/dist/sdk/runtime-input.d.ts +10 -0
  489. package/dist/sdk/runtime-input.js +60 -0
  490. package/dist/sdk/runtime-input.js.map +1 -0
  491. package/dist/sdk/runtime.d.ts +31 -8
  492. package/dist/sdk/runtime.js +61 -57
  493. package/dist/sdk/runtime.js.map +1 -1
  494. package/dist/sdk/schema.d.ts +507 -0
  495. package/dist/sdk/schema.js +1269 -0
  496. package/dist/sdk/schema.js.map +1 -0
  497. package/dist/{cli/commands → sdk}/templates.d.ts +1 -1
  498. package/dist/{cli/commands → sdk}/templates.js +9 -9
  499. package/dist/sdk/templates.js.map +1 -0
  500. package/dist/{cli/commands → sdk}/test/linked-command-detection.d.ts +10 -2
  501. package/dist/sdk/test/linked-command-detection.js +525 -0
  502. package/dist/sdk/test/linked-command-detection.js.map +1 -0
  503. package/docs/COMMANDS.md +58 -40
  504. package/docs/EXTENSIONS.md +10 -1
  505. package/docs/RELATIONSHIP_GRAPH.md +113 -0
  506. package/docs/RELEASING.md +2 -0
  507. package/docs/SDK.md +156 -9
  508. package/docs/SDK_CUSTOMIZATION_PRIMITIVES.md +79 -0
  509. package/marketplace.json +2 -2
  510. package/package.json +3 -2
  511. package/packages/pm-beads/package.json +1 -1
  512. package/packages/pm-calendar/package.json +1 -1
  513. package/packages/pm-command-kit/package.json +1 -1
  514. package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +76 -16
  515. package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +8 -0
  516. package/packages/pm-governance-audit/package.json +1 -1
  517. package/packages/pm-guide-shell/package.json +1 -1
  518. package/packages/pm-kanban/package.json +1 -1
  519. package/packages/pm-lifecycle-hooks/package.json +1 -1
  520. package/packages/pm-linked-test-adapters/package.json +1 -1
  521. package/packages/pm-search-advanced/package.json +1 -1
  522. package/packages/pm-templates/package.json +1 -1
  523. package/packages/pm-todos/package.json +1 -1
  524. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  525. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  526. package/scripts/bundle-cli.mjs +66 -23
  527. package/dist/cli/commands/extension/bundled-catalog.js.map +0 -1
  528. package/dist/cli/commands/extension/doctor.js.map +0 -1
  529. package/dist/cli/commands/extension/install-sources.js.map +0 -1
  530. package/dist/cli/commands/extension/managed-state.js.map +0 -1
  531. package/dist/cli/commands/templates.js.map +0 -1
  532. package/dist/cli/commands/test/linked-command-detection.js +0 -248
  533. package/dist/cli/commands/test/linked-command-detection.js.map +0 -1
  534. package/dist/cli-bundle/chunks/append-DYQWQK2J.js +0 -11
  535. package/dist/cli-bundle/chunks/chunk-2GA3NK35.js +0 -530
  536. package/dist/cli-bundle/chunks/chunk-2GA3NK35.js.map +0 -1
  537. package/dist/cli-bundle/chunks/chunk-2QIQGYPW.js.map +0 -7
  538. package/dist/cli-bundle/chunks/chunk-4DY4KPQI.js.map +0 -7
  539. package/dist/cli-bundle/chunks/chunk-4WREH7RT.js +0 -554
  540. package/dist/cli-bundle/chunks/chunk-4WREH7RT.js.map +0 -7
  541. package/dist/cli-bundle/chunks/chunk-5CT5BW6E.js.map +0 -7
  542. package/dist/cli-bundle/chunks/chunk-5URI7TPJ.js.map +0 -7
  543. package/dist/cli-bundle/chunks/chunk-6MHSBDGD.js.map +0 -7
  544. package/dist/cli-bundle/chunks/chunk-6OTZMORS.js.map +0 -7
  545. package/dist/cli-bundle/chunks/chunk-6PKA3SJQ.js.map +0 -1
  546. package/dist/cli-bundle/chunks/chunk-6TTOHMTB.js.map +0 -1
  547. package/dist/cli-bundle/chunks/chunk-7QDSYUMF.js.map +0 -1
  548. package/dist/cli-bundle/chunks/chunk-7TQMR6LK.js.map +0 -7
  549. package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js +0 -312
  550. package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js.map +0 -7
  551. package/dist/cli-bundle/chunks/chunk-BPD26E3P.js.map +0 -1
  552. package/dist/cli-bundle/chunks/chunk-CDJYP7OQ.js.map +0 -1
  553. package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js +0 -858
  554. package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js.map +0 -1
  555. package/dist/cli-bundle/chunks/chunk-DVOLZJ3C.js.map +0 -1
  556. package/dist/cli-bundle/chunks/chunk-DYEX6NFH.js.map +0 -7
  557. package/dist/cli-bundle/chunks/chunk-F7PSHRNO.js.map +0 -1
  558. package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js +0 -875
  559. package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js.map +0 -7
  560. package/dist/cli-bundle/chunks/chunk-FTQLW4JD.js.map +0 -1
  561. package/dist/cli-bundle/chunks/chunk-IA3YFTXT.js.map +0 -1
  562. package/dist/cli-bundle/chunks/chunk-IGED7NH2.js.map +0 -7
  563. package/dist/cli-bundle/chunks/chunk-J4NZOP3I.js.map +0 -1
  564. package/dist/cli-bundle/chunks/chunk-JL7WZ4O2.js.map +0 -7
  565. package/dist/cli-bundle/chunks/chunk-L24HCJFC.js +0 -309
  566. package/dist/cli-bundle/chunks/chunk-L24HCJFC.js.map +0 -1
  567. package/dist/cli-bundle/chunks/chunk-LWTIRS3Y.js.map +0 -7
  568. package/dist/cli-bundle/chunks/chunk-MKL4CP2I.js.map +0 -1
  569. package/dist/cli-bundle/chunks/chunk-N3CMP4NI.js.map +0 -1
  570. package/dist/cli-bundle/chunks/chunk-PHKP3AGR.js.map +0 -7
  571. package/dist/cli-bundle/chunks/chunk-Q37E63AM.js.map +0 -7
  572. package/dist/cli-bundle/chunks/chunk-QASRVKUQ.js.map +0 -1
  573. package/dist/cli-bundle/chunks/chunk-RGXD5JJR.js.map +0 -7
  574. package/dist/cli-bundle/chunks/chunk-UB2QYSTO.js.map +0 -1
  575. package/dist/cli-bundle/chunks/chunk-UGTVWL3E.js.map +0 -1
  576. package/dist/cli-bundle/chunks/chunk-ZAYYDNB3.js.map +0 -1
  577. package/dist/cli-bundle/chunks/chunk-ZUKSZVBW.js.map +0 -7
  578. package/dist/cli-bundle/chunks/close-RI4JQQHU.js +0 -12
  579. package/dist/cli-bundle/chunks/close-many-LY2XJ52M.js +0 -21
  580. package/dist/cli-bundle/chunks/comments-35M273DN.js +0 -13
  581. package/dist/cli-bundle/chunks/copy-NPYM7M7U.js +0 -9
  582. package/dist/cli-bundle/chunks/delete-ODRWJWAM.js +0 -10
  583. package/dist/cli-bundle/chunks/docs-G7N4E2JO.js +0 -14
  584. package/dist/cli-bundle/chunks/focus-U5TRVCRS.js +0 -10
  585. package/dist/cli-bundle/chunks/history-compact-M7GHYVFN.js +0 -20
  586. package/dist/cli-bundle/chunks/history-redact-JIHZLHDP.js +0 -16
  587. package/dist/cli-bundle/chunks/history-repair-NAFCHLH7.js +0 -18
  588. package/dist/cli-bundle/chunks/learnings-SONGPSHI.js +0 -13
  589. package/dist/cli-bundle/chunks/notes-BSD53H2W.js +0 -13
  590. package/dist/cli-bundle/chunks/plan-AWLYGBNV.js +0 -24
  591. package/dist/cli-bundle/chunks/register-list-query-BUWCYHBT.js.map +0 -7
  592. package/dist/cli-bundle/chunks/register-list-query-KTZ6AGE7.js.map +0 -1
  593. package/dist/cli-bundle/chunks/register-mutation-4FMGJJF7.js.map +0 -1
  594. package/dist/cli-bundle/chunks/restore-66GLMHIX.js +0 -14
  595. package/dist/cli-bundle/chunks/update-2XGHIVQ2.js +0 -21
  596. package/dist/cli-bundle/chunks/update-many-75K57FS3.js +0 -34
  597. package/dist/cli-bundle/chunks/update-many-U42YA445.js +0 -30
  598. /package/dist/cli-bundle/chunks/{append-PVZJDM6J.js.map → append-OJQFUQ4T.js.map} +0 -0
  599. /package/dist/cli-bundle/chunks/{append-DYQWQK2J.js.map → append-UZVHUO74.js.map} +0 -0
  600. /package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js.map → chunk-2IFFUZLC.js.map} +0 -0
  601. /package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js.map → chunk-2JKGO6QX.js.map} +0 -0
  602. /package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js.map → chunk-2NCIPMQP.js.map} +0 -0
  603. /package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js.map → chunk-2VPAVL7O.js.map} +0 -0
  604. /package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js.map → chunk-2WSE6PO2.js.map} +0 -0
  605. /package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js.map → chunk-34L5OT3Y.js.map} +0 -0
  606. /package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js.map → chunk-3AUGG2DP.js.map} +0 -0
  607. /package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js.map → chunk-3CLU2XZO.js.map} +0 -0
  608. /package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js.map → chunk-3WM75PWC.js.map} +0 -0
  609. /package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js.map → chunk-5JLUII3O.js.map} +0 -0
  610. /package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js.map → chunk-6N2VXVTQ.js.map} +0 -0
  611. /package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js.map → chunk-6S3YSUYG.js.map} +0 -0
  612. /package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js.map → chunk-AHVTB5I5.js.map} +0 -0
  613. /package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js.map → chunk-APRVSW2O.js.map} +0 -0
  614. /package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js.map → chunk-B7PE22W6.js.map} +0 -0
  615. /package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js.map → chunk-BCOFWYW4.js.map} +0 -0
  616. /package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js.map → chunk-BEP7WJA2.js.map} +0 -0
  617. /package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js.map → chunk-CRVF2JDM.js.map} +0 -0
  618. /package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js.map → chunk-DM4H7FP4.js.map} +0 -0
  619. /package/dist/cli-bundle/chunks/{close-LZECOMHO.js.map → chunk-DUT67M43.js.map} +0 -0
  620. /package/dist/cli-bundle/chunks/{chunk-44LNIULG.js.map → chunk-DYH63FX7.js.map} +0 -0
  621. /package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js.map → chunk-EAB64KLB.js.map} +0 -0
  622. /package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js.map → chunk-EACOH7AU.js.map} +0 -0
  623. /package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js.map → chunk-EJEXHTY5.js.map} +0 -0
  624. /package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js.map → chunk-EYLCSJAI.js.map} +0 -0
  625. /package/dist/cli-bundle/chunks/{chunk-655STMGA.js.map → chunk-FMBNM2EN.js.map} +0 -0
  626. /package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js.map → chunk-FNSPG7MU.js.map} +0 -0
  627. /package/dist/cli-bundle/chunks/{chunk-KB726FMH.js.map → chunk-H2Z3FYXQ.js.map} +0 -0
  628. /package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js.map → chunk-IA5FKNII.js.map} +0 -0
  629. /package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js.map → chunk-IJIICKVW.js.map} +0 -0
  630. /package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js.map → chunk-JOUQZENX.js.map} +0 -0
  631. /package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js.map → chunk-JYFOV7FC.js.map} +0 -0
  632. /package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js.map → chunk-K2X6U4UA.js.map} +0 -0
  633. /package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js.map → chunk-KG44YSKD.js.map} +0 -0
  634. /package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js.map → chunk-KPMKHGEA.js.map} +0 -0
  635. /package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js.map → chunk-MIQDDLB5.js.map} +0 -0
  636. /package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js.map → chunk-NLDFBC6J.js.map} +0 -0
  637. /package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js.map → chunk-NP22ERDF.js.map} +0 -0
  638. /package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js.map → chunk-NU3IMIEA.js.map} +0 -0
  639. /package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js.map → chunk-NVPZIJVR.js.map} +0 -0
  640. /package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js.map → chunk-ODALILG3.js.map} +0 -0
  641. /package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js.map → chunk-ONREO4ST.js.map} +0 -0
  642. /package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js.map → chunk-P74IZQ7A.js.map} +0 -0
  643. /package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js.map → chunk-PGY23YTC.js.map} +0 -0
  644. /package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js.map → chunk-PMOSXADO.js.map} +0 -0
  645. /package/dist/cli-bundle/chunks/{close-RI4JQQHU.js.map → chunk-PNTULOGU.js.map} +0 -0
  646. /package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js.map → chunk-Q7A43DS4.js.map} +0 -0
  647. /package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js.map → chunk-QEHQ2GVG.js.map} +0 -0
  648. /package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js.map → chunk-QIPLHNP7.js.map} +0 -0
  649. /package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js.map → chunk-QKJGPFAF.js.map} +0 -0
  650. /package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js.map → chunk-RLCHOOHC.js.map} +0 -0
  651. /package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js.map → chunk-RMLWNPH2.js.map} +0 -0
  652. /package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js.map → chunk-RRM5JYJC.js.map} +0 -0
  653. /package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js.map → chunk-S6MQESFR.js.map} +0 -0
  654. /package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js.map → chunk-SDQLJWBO.js.map} +0 -0
  655. /package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js.map → chunk-SELVXEZK.js.map} +0 -0
  656. /package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js.map → chunk-TKOVBP6C.js.map} +0 -0
  657. /package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js.map → chunk-TQSZFPIS.js.map} +0 -0
  658. /package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js.map → chunk-TSMHDIW4.js.map} +0 -0
  659. /package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js.map → chunk-UFXU44HV.js.map} +0 -0
  660. /package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js.map → chunk-ULTHRDBP.js.map} +0 -0
  661. /package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js.map → chunk-UOHFKBUV.js.map} +0 -0
  662. /package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js.map → chunk-UY2ACEMF.js.map} +0 -0
  663. /package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js.map → chunk-WUJQK4YV.js.map} +0 -0
  664. /package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js.map → chunk-XSJUSQAE.js.map} +0 -0
  665. /package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js.map → chunk-YAQEBNY7.js.map} +0 -0
  666. /package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js.map → chunk-YBLZ2VE7.js.map} +0 -0
  667. /package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js.map → chunk-YCQET3OT.js.map} +0 -0
  668. /package/dist/cli-bundle/chunks/{close-many-LY2XJ52M.js.map → chunk-YUSOJDWM.js.map} +0 -0
  669. /package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js.map → chunk-ZI6VQWQ7.js.map} +0 -0
  670. /package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js.map → close-CWODTPKG.js.map} +0 -0
  671. /package/dist/cli-bundle/chunks/{comments-35M273DN.js.map → close-W6LI2PKM.js.map} +0 -0
  672. /package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js.map → close-many-CQFUY7MR.js.map} +0 -0
  673. /package/dist/cli-bundle/chunks/{copy-NPYM7M7U.js.map → close-many-DLDDVSH5.js.map} +0 -0
  674. /package/dist/cli-bundle/chunks/{create-F53OBTOU.js.map → comments-E3TNTK24.js.map} +0 -0
  675. /package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js.map → comments-WGLHR7LB.js.map} +0 -0
  676. /package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js.map → copy-LXVDXH7B.js.map} +0 -0
  677. /package/dist/cli-bundle/chunks/{delete-ODRWJWAM.js.map → copy-Q5ZJPUKR.js.map} +0 -0
  678. /package/dist/cli-bundle/chunks/{deps-U57I7EAK.js.map → create-J5U6ND4K.js.map} +0 -0
  679. /package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js.map → create-LBVCYMEG.js.map} +0 -0
  680. /package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js.map → delete-PMJBNY5G.js.map} +0 -0
  681. /package/dist/cli-bundle/chunks/{docs-G7N4E2JO.js.map → delete-WNHB3LYW.js.map} +0 -0
  682. /package/dist/cli-bundle/chunks/{files-TTY6N2AV.js.map → deps-JZ7TMVCB.js.map} +0 -0
  683. /package/dist/cli-bundle/chunks/{files-TBZD7V6H.js.map → deps-OA26IS25.js.map} +0 -0
  684. /package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js.map → docs-FEWB2DQB.js.map} +0 -0
  685. /package/dist/cli-bundle/chunks/{focus-U5TRVCRS.js.map → docs-HA2AIDBB.js.map} +0 -0
  686. /package/dist/cli-bundle/chunks/{history-compact-M7GHYVFN.js.map → files-6YFBJRBG.js.map} +0 -0
  687. /package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js.map → files-EFIWKFTM.js.map} +0 -0
  688. /package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js.map → focus-4QJR7FOQ.js.map} +0 -0
  689. /package/dist/cli-bundle/chunks/{history-redact-JIHZLHDP.js.map → focus-POIW5LTJ.js.map} +0 -0
  690. /package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js.map → history-compact-CKRPDTJN.js.map} +0 -0
  691. /package/dist/cli-bundle/chunks/{history-repair-NAFCHLH7.js.map → history-compact-FWG2C7FZ.js.map} +0 -0
  692. /package/dist/cli-bundle/chunks/{learnings-SONGPSHI.js.map → history-redact-BB3TGDAE.js.map} +0 -0
  693. /package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js.map → history-redact-D225BHOZ.js.map} +0 -0
  694. /package/dist/cli-bundle/chunks/{notes-BSD53H2W.js.map → history-repair-6GEAM7HE.js.map} +0 -0
  695. /package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js.map → history-repair-RQXKQHL4.js.map} +0 -0
  696. /package/dist/cli-bundle/chunks/{plan-2NNEO46V.js.map → learnings-JLNLCOL5.js.map} +0 -0
  697. /package/dist/cli-bundle/chunks/{plan-AWLYGBNV.js.map → learnings-RSNLSWDC.js.map} +0 -0
  698. /package/dist/cli-bundle/chunks/{profile-U725ATWZ.js.map → notes-2WDH6DXU.js.map} +0 -0
  699. /package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js.map → notes-GB47XXQQ.js.map} +0 -0
  700. /package/dist/cli-bundle/chunks/{restore-66GLMHIX.js.map → plan-DOVI2VMW.js.map} +0 -0
  701. /package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js.map → plan-VDCJ2PCN.js.map} +0 -0
  702. /package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js.map → profile-FAU7NZML.js.map} +0 -0
  703. /package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js.map → profile-IVXQEL3D.js.map} +0 -0
  704. /package/dist/cli-bundle/chunks/{update-Q3UCILNR.js.map → restore-25DLT2Q2.js.map} +0 -0
  705. /package/dist/cli-bundle/chunks/{update-2XGHIVQ2.js.map → restore-YPMVUUEX.js.map} +0 -0
  706. /package/dist/cli-bundle/chunks/{update-many-75K57FS3.js.map → schema-FNU3WE4O.js.map} +0 -0
  707. /package/dist/cli-bundle/chunks/{update-many-U42YA445.js.map → schema-NBCM3RAD.js.map} +0 -0
  708. /package/dist/{cli/commands → sdk}/extension/managed-state.d.ts +0 -0
@@ -1,55 +1,56 @@
1
- import {
2
- runFiles
3
- } from "./chunk-FS6UM5WH.js";
4
1
  import {
5
2
  runDocs
6
- } from "./chunk-JAF4TUQ7.js";
7
- import {
8
- isRemoteLinkedArtifactReference
9
- } from "./chunk-FIGXOCEQ.js";
3
+ } from "./chunk-ODALILG3.js";
10
4
  import {
11
- collectDanglingDependencyReferences
12
- } from "./chunk-B5DZYTT3.js";
5
+ collectDanglingDependencyReferences,
6
+ createRelationshipKindRegistry
7
+ } from "./chunk-BKVG6XOA.js";
13
8
  import {
14
9
  scanHistoryDrift
15
- } from "./chunk-M6ASXYCU.js";
10
+ } from "./chunk-KG44YSKD.js";
16
11
  import {
17
- wrapOwnershipConflict
18
- } from "./chunk-VJTAEIPC.js";
12
+ runFiles
13
+ } from "./chunk-ZI6VQWQ7.js";
14
+ import {
15
+ isRemoteLinkedArtifactReference
16
+ } from "./chunk-WUJQK4YV.js";
19
17
  import {
20
18
  runUpdate
21
- } from "./chunk-OBDLEQG5.js";
19
+ } from "./chunk-CRVF2JDM.js";
22
20
  import {
23
- resolveAuthor
24
- } from "./chunk-YRYYFGV3.js";
21
+ wrapOwnershipConflict
22
+ } from "./chunk-QIPLHNP7.js";
25
23
  import {
26
24
  PM_TELEMETRY_SOURCE_CONTEXT_VALUES,
27
25
  TELEMETRY_MAX_QUEUE_ENTRY_ATTEMPTS,
28
26
  TELEMETRY_SCHEMA_VERSION,
29
27
  flushTelemetryQueueNow
30
- } from "./chunk-WRKB56FC.js";
28
+ } from "./chunk-NP22ERDF.js";
31
29
  import {
32
30
  buildCapabilityContractMetadata,
33
31
  buildRegistrationCollisionRemediation,
34
32
  collectUnknownCapabilityGuidance,
35
33
  readManagedExtensionState,
36
34
  runInit
37
- } from "./chunk-4DY4KPQI.js";
35
+ } from "./chunk-J6364LFM.js";
38
36
  import {
39
37
  collectStaleVectorizationIds,
40
38
  runNext
41
- } from "./chunk-LWTIRS3Y.js";
39
+ } from "./chunk-E2OJMKML.js";
42
40
  import {
43
41
  computeContentFieldUtilization
44
- } from "./chunk-6MHSBDGD.js";
42
+ } from "./chunk-XXXF6PAQ.js";
45
43
  import {
46
44
  computeMetadataCoverage,
47
45
  groupItemsByDimension,
48
46
  lifecycleClassifierFromStatusRegistry
49
- } from "./chunk-W6HZ55JO.js";
47
+ } from "./chunk-IJIICKVW.js";
50
48
  import {
51
49
  parseLimit
52
- } from "./chunk-YQYG2V23.js";
50
+ } from "./chunk-NU3IMIEA.js";
51
+ import {
52
+ resolveAuthor
53
+ } from "./chunk-YRYYFGV3.js";
53
54
  import {
54
55
  buildVectorizationEmbeddingIdentity,
55
56
  hasVectorizationEmbeddingIdentityChanged,
@@ -59,7 +60,7 @@ import {
59
60
  resolveProviderConfigSource,
60
61
  resolveSettingsWithSemanticRuntimeDefaults,
61
62
  resolveVectorStores
62
- } from "./chunk-ZUKSZVBW.js";
63
+ } from "./chunk-7B67ZL4N.js";
63
64
  import {
64
65
  ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,
65
66
  ACTIVITY_FLAG_CONTRACTS,
@@ -149,7 +150,7 @@ import {
149
150
  UPGRADE_FLAG_CONTRACTS,
150
151
  VALIDATE_FLAG_CONTRACTS,
151
152
  compactFlagAliasContracts
152
- } from "./chunk-2QIQGYPW.js";
153
+ } from "./chunk-H5APFTHZ.js";
153
154
  import {
154
155
  LINKED_TEST_PM_CONTEXT_MODE_VALUES,
155
156
  LINKED_TEST_PROTECTED_ENV_KEYS,
@@ -166,12 +167,12 @@ import {
166
167
  parseLinkedTestRegexList,
167
168
  parseLinkedTestStringList,
168
169
  runCreate
169
- } from "./chunk-OI4S4KCI.js";
170
+ } from "./chunk-UMOPHQSU.js";
170
171
  import {
171
172
  createStdinTokenResolver,
172
173
  parseCsvKv,
173
174
  parseOptionalNumber
174
- } from "./chunk-WD6MSYMP.js";
175
+ } from "./chunk-TKOVBP6C.js";
175
176
  import {
176
177
  CURRENT_ITEM_FORMAT_VERSION,
177
178
  compareTimestampStrings,
@@ -198,7 +199,7 @@ import {
198
199
  stableValueEquals,
199
200
  toItemRecord,
200
201
  writeSettings
201
- } from "./chunk-T4BRCB6Z.js";
202
+ } from "./chunk-XSJUSQAE.js";
202
203
  import {
203
204
  DEFAULT_VALIDATE_CLOSURE_LIKE_METADATA_FIELD_PATTERNS,
204
205
  DEFAULT_VALIDATE_STALE_BLOCKER_REASON_PATTERNS,
@@ -240,7 +241,7 @@ import {
240
241
  statusIsTerminal,
241
242
  toNonEmptyStringOrUndefined,
242
243
  writeFileAtomic
243
- } from "./chunk-AFWZRL7M.js";
244
+ } from "./chunk-BSEQUTQP.js";
244
245
 
245
246
  // dist/sdk/start-task-status.js
246
247
  !(function() {
@@ -440,7 +441,7 @@ async function runRelease(id, force, global2, options = {}) {
440
441
  !(function() {
441
442
  try {
442
443
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
443
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7365c8ff-f8c3-535e-ac57-f580b9d0e159");
444
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "478bf194-a9d0-5c6a-b70e-d15164927fda");
444
445
  } catch (e2) {
445
446
  }
446
447
  })();
@@ -578,12 +579,12 @@ var TOOLS = [
578
579
  },
579
580
  {
580
581
  name: "pm_get",
581
- description: "Read one pm item. Pass options.depth='brief' or options.fields='id,title,status' for low-token inspection.",
582
+ description: "Read one pm item with shared SDK projections. Pass options.depth='brief' or options.fields='id,title,status' for low-token inspection, options.fields='id,schedule.start_at' for schedule context, or options.at='7' / an ISO timestamp for a verified mutation-free historical read. Parent results include bounded child counts, samples, and continuation metadata.",
582
583
  inputSchema: objectSchema({
583
584
  id: idSchema,
584
585
  options: {
585
586
  type: "object",
586
- description: "Get options such as depth=brief|standard|deep|full or fields=id,title,status."
587
+ description: "Get options such as depth=brief|standard|deep|full, fields=id,title,status, or at=<version|ISO timestamp>."
587
588
  }
588
589
  }, ["id"])
589
590
  },
@@ -739,7 +740,7 @@ var TOOLS = [
739
740
  },
740
741
  {
741
742
  name: "pm_deps",
742
- description: "List, add, or remove dependencies for a pm item. Use options.add to declare a dependency and options.remove to drop one; omit both to list current dependencies.",
743
+ description: "Read dependency trees/graphs or one bounded explainable relationship context packet. Use options.format=context with depth, node, edge, token, and cursor bounds.",
743
744
  inputSchema: objectSchema({ id: idSchema, options: { type: "object" } }, [
744
745
  "id"
745
746
  ])
@@ -2398,7 +2399,7 @@ async function runContracts(options, global2) {
2398
2399
  return result;
2399
2400
  }
2400
2401
 
2401
- // dist/cli/commands/gc.js
2402
+ // dist/sdk/governance/gc.js
2402
2403
  import fs3 from "node:fs/promises";
2403
2404
  import path3 from "node:path";
2404
2405
 
@@ -2765,11 +2766,11 @@ async function runLockGc(pmRoot, options) {
2765
2766
  return result;
2766
2767
  }
2767
2768
 
2768
- // dist/cli/commands/gc.js
2769
+ // dist/sdk/governance/gc.js
2769
2770
  !(function() {
2770
2771
  try {
2771
2772
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
2772
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "710fdc3d-a93c-57dc-a014-61c41b8be67a");
2773
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "68767a06-5737-53dc-91a4-aa9ef5c8c6a7");
2773
2774
  } catch (e2) {
2774
2775
  }
2775
2776
  })();
@@ -3007,15 +3008,126 @@ async function runGc(global2, options = {}) {
3007
3008
  };
3008
3009
  }
3009
3010
 
3010
- // dist/cli/commands/health.js
3011
+ // dist/cli/commands/gc.js
3012
+ !(function() {
3013
+ try {
3014
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3015
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f8fdc0cf-cf97-5a26-95c9-58a3eadc911b");
3016
+ } catch (e2) {
3017
+ }
3018
+ })();
3019
+
3020
+ // dist/sdk/author-attribution.js
3011
3021
  import fs4 from "node:fs/promises";
3012
3022
  import path4 from "node:path";
3023
+ !(function() {
3024
+ try {
3025
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3026
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "d34bc045-ebaa-5085-ab4e-7866236c2d52");
3027
+ } catch (e2) {
3028
+ }
3029
+ })();
3030
+ var HISTORY_AUTHOR_ATTRIBUTION_BASELINE = "2026-07-15T06:22:12.276Z";
3031
+ var HISTORY_AUTHOR_ATTRIBUTION_BASELINE_MS = Date.parse(HISTORY_AUTHOR_ATTRIBUTION_BASELINE);
3032
+ var HISTORY_AUTHOR_EVENT_CLASSIFICATIONS = [
3033
+ ["attributed", "attributed"],
3034
+ ["legacy_unknown", "actionable_unknown"]
3035
+ ];
3036
+ var historyStringValue = (value) => typeof value === "string" ? value : "";
3037
+ var classifyHistoryAuthorEvent = (parsed) => {
3038
+ const record = parsed ?? {};
3039
+ const author = historyStringValue(record.author).trim().toLowerCase();
3040
+ const authorClass = Number(["", "unknown"].includes(author));
3041
+ const timestampClass = Number(Date.parse(historyStringValue(record.ts)) >= HISTORY_AUTHOR_ATTRIBUTION_BASELINE_MS);
3042
+ return HISTORY_AUTHOR_EVENT_CLASSIFICATIONS[authorClass][timestampClass];
3043
+ };
3044
+ var inspectHistoryAuthorStream = (itemId, raw, sampleLimit = 20) => {
3045
+ const samples = [];
3046
+ const unknownCounts = {
3047
+ legacy_unknown: 0,
3048
+ actionable_unknown: 0
3049
+ };
3050
+ const boundedSampleLimit = Math.max(0, sampleLimit);
3051
+ let checkedEvents = 0;
3052
+ for (const [index, line] of raw.split(/\r?\n/).entries()) {
3053
+ let parsed;
3054
+ try {
3055
+ parsed = JSON.parse(line);
3056
+ } catch {
3057
+ continue;
3058
+ }
3059
+ checkedEvents += 1;
3060
+ const classification = classifyHistoryAuthorEvent(parsed);
3061
+ if (classification === "attributed") {
3062
+ continue;
3063
+ }
3064
+ unknownCounts[classification] += 1;
3065
+ if (samples.length < boundedSampleLimit) {
3066
+ samples.push({ item_id: itemId, line: index + 1 });
3067
+ }
3068
+ }
3069
+ return {
3070
+ checked_events: checkedEvents,
3071
+ unknown_event_count: unknownCounts.legacy_unknown + unknownCounts.actionable_unknown,
3072
+ legacy_unknown_event_count: unknownCounts.legacy_unknown,
3073
+ actionable_unknown_event_count: unknownCounts.actionable_unknown,
3074
+ samples
3075
+ };
3076
+ };
3077
+ var scanHistoryAuthorAttribution = async (pmRoot, sampleLimit = 20) => {
3078
+ const historyDirectory = path4.join(pmRoot, "history");
3079
+ let fileNames;
3080
+ try {
3081
+ fileNames = (await fs4.readdir(historyDirectory)).filter((fileName) => fileName.endsWith(".jsonl")).sort((left, right) => left.localeCompare(right));
3082
+ } catch {
3083
+ fileNames = [];
3084
+ }
3085
+ const affectedItemIds = /* @__PURE__ */ new Set();
3086
+ const samples = [];
3087
+ let checkedStreams = 0;
3088
+ let checkedEvents = 0;
3089
+ let unknownEventCount = 0;
3090
+ let legacyUnknownEventCount = 0;
3091
+ let actionableUnknownEventCount = 0;
3092
+ for (const fileName of fileNames) {
3093
+ let raw;
3094
+ try {
3095
+ raw = await fs4.readFile(path4.join(historyDirectory, fileName), "utf8");
3096
+ } catch {
3097
+ continue;
3098
+ }
3099
+ const itemId = fileName.slice(0, -".jsonl".length);
3100
+ const inspected = inspectHistoryAuthorStream(itemId, raw, sampleLimit - samples.length);
3101
+ checkedStreams += 1;
3102
+ checkedEvents += inspected.checked_events;
3103
+ unknownEventCount += inspected.unknown_event_count;
3104
+ legacyUnknownEventCount += inspected.legacy_unknown_event_count;
3105
+ actionableUnknownEventCount += inspected.actionable_unknown_event_count;
3106
+ if (inspected.unknown_event_count > 0) {
3107
+ affectedItemIds.add(itemId);
3108
+ }
3109
+ samples.push(...inspected.samples);
3110
+ }
3111
+ return {
3112
+ checked_streams: checkedStreams,
3113
+ checked_events: checkedEvents,
3114
+ unknown_event_count: unknownEventCount,
3115
+ legacy_unknown_event_count: legacyUnknownEventCount,
3116
+ actionable_unknown_event_count: actionableUnknownEventCount,
3117
+ affected_item_ids: [...affectedItemIds].sort((left, right) => left.localeCompare(right)),
3118
+ samples
3119
+ };
3120
+ };
3121
+
3122
+ // dist/sdk/governance/health.js
3123
+ import fs5 from "node:fs/promises";
3124
+ import path5 from "node:path";
3013
3125
 
3014
3126
  // dist/core/diagnostics/remediation.js
3015
3127
  !(function() {
3016
3128
  try {
3017
3129
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3018
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f2d1dec6-35b4-57af-a2a8-64dc798c734c");
3130
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1bdd780e-bbbd-5c62-8fb9-9668f942f4d6");
3019
3131
  } catch (e2) {
3020
3132
  }
3021
3133
  })();
@@ -3165,6 +3277,11 @@ var REMEDIATION_REGISTRY = Object.freeze([
3165
3277
  command: "pm history-compact <id>",
3166
3278
  summary: "The history stream exceeds the configured compaction threshold; compact it (pm history-compact --all-streams sweeps every over-threshold stream in one pass)."
3167
3279
  },
3280
+ {
3281
+ code: "history_unknown_author_events",
3282
+ command: "pm validate --check-history-drift --fix-hints",
3283
+ summary: "Historical mutations lack attributable authorship. Configure PM_AUTHOR, pass global --author, or set author_default so future audit events are attributable."
3284
+ },
3168
3285
  // --- pm health: locks ---
3169
3286
  {
3170
3287
  code: "locks_stale_count",
@@ -3334,6 +3451,11 @@ var REMEDIATION_REGISTRY = Object.freeze([
3334
3451
  command: "pm history-repair <id>",
3335
3452
  summary: "Re-anchor the history chains of the items with a broken history chain."
3336
3453
  },
3454
+ {
3455
+ code: "validate_history_unknown_author_events",
3456
+ command: "pm config project set author_default <stable-agent-id>",
3457
+ summary: "Historical mutations lack attributable authorship. Set a stable default or use invocation-wide --author for future events; existing audit history remains append-only."
3458
+ },
3337
3459
  // --- pm validate: command_references ---
3338
3460
  {
3339
3461
  code: "validate_command_references_stale_pm_ids",
@@ -3377,19 +3499,19 @@ function buildRemediationCommands(warnings) {
3377
3499
  return Object.values(buildRemediationMap(warnings));
3378
3500
  }
3379
3501
 
3380
- // dist/cli/commands/health.js
3502
+ // dist/sdk/governance/health.js
3381
3503
  !(function() {
3382
3504
  try {
3383
3505
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3384
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "782d84da-e6b9-5205-b2f0-e217d7f0daa5");
3506
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9e3d1799-829e-5a99-b960-a2b809511ef7");
3385
3507
  } catch (e2) {
3386
3508
  }
3387
3509
  })();
3388
3510
  var PM_TELEMETRY_SOURCE_CONTEXT_SET = new Set(PM_TELEMETRY_SOURCE_CONTEXT_VALUES);
3389
3511
  var STALE_VECTORIZATION_SUMMARY_LIMIT = 25;
3390
3512
  var BRIEF_HEALTH_DETAIL_LIMIT = 8;
3391
- var TELEMETRY_QUEUE_RELATIVE_PATH = path4.join("runtime", "telemetry", "events.jsonl");
3392
- var TELEMETRY_STATE_RELATIVE_PATH = path4.join("runtime", "telemetry", "state.json");
3513
+ var TELEMETRY_QUEUE_RELATIVE_PATH = path5.join("runtime", "telemetry", "events.jsonl");
3514
+ var TELEMETRY_STATE_RELATIVE_PATH = path5.join("runtime", "telemetry", "state.json");
3393
3515
  var TELEMETRY_ENDPOINT_PROBE_TIMEOUT_MS = 2500;
3394
3516
  var TELEMETRY_QUEUE_HIGH_WATER_MARK = 500;
3395
3517
  var TELEMETRY_QUEUE_HIGH_RETRY_THRESHOLD = TELEMETRY_MAX_QUEUE_ENTRY_ATTEMPTS - 3;
@@ -3421,29 +3543,29 @@ function isExpectedUnmanagedExtension(name, directory) {
3421
3543
  }
3422
3544
  async function isDirectory(targetPath) {
3423
3545
  try {
3424
- const stats = await fs4.stat(targetPath);
3546
+ const stats = await fs5.stat(targetPath);
3425
3547
  return stats.isDirectory();
3426
3548
  } catch {
3427
3549
  return false;
3428
3550
  }
3429
3551
  }
3430
3552
  async function countHistoryStreams(pmRoot, compactPolicy) {
3431
- const historyDir = path4.join(pmRoot, "history");
3553
+ const historyDir = path5.join(pmRoot, "history");
3432
3554
  if (!await isDirectory(historyDir)) {
3433
3555
  return { count: 0, warnings: [], over_threshold: [], max_entries: null };
3434
3556
  }
3435
- const historyFiles = (await fs4.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((left, right) => left.localeCompare(right));
3557
+ const historyFiles = (await fs5.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((left, right) => left.localeCompare(right));
3436
3558
  const policyActive = compactPolicy.enabled;
3437
3559
  const maxEntries = policyActive ? compactPolicy.max_entries : null;
3438
3560
  const warnings = [];
3439
3561
  const overThreshold = [];
3440
3562
  for (const fileName of historyFiles) {
3441
- const streamPath = path4.join(historyDir, fileName);
3563
+ const streamPath = path5.join(historyDir, fileName);
3442
3564
  warnings.push(...await runActiveOnReadHooks({ path: streamPath, scope: "project" }));
3443
3565
  if (!policyActive) {
3444
3566
  continue;
3445
3567
  }
3446
- const raw = await fs4.readFile(streamPath, "utf8");
3568
+ const raw = await fs5.readFile(streamPath, "utf8");
3447
3569
  let entries = 0;
3448
3570
  for (const line of raw.split(/\r?\n/)) {
3449
3571
  if (line.trim().length > 0) {
@@ -3465,16 +3587,16 @@ async function countHistoryStreams(pmRoot, compactPolicy) {
3465
3587
  };
3466
3588
  }
3467
3589
  function normalizeRelativePath(pmRoot, targetPath) {
3468
- return path4.relative(pmRoot, targetPath).replaceAll("\\", "/");
3590
+ return path5.relative(pmRoot, targetPath).replaceAll("\\", "/");
3469
3591
  }
3470
3592
  async function listItemDocumentPaths(pmRoot, typeToFolder) {
3471
3593
  const folders = [...new Set(Object.values(typeToFolder))].sort((left, right) => left.localeCompare(right));
3472
3594
  const itemPaths = [];
3473
3595
  for (const folder of folders) {
3474
- const directoryPath = path4.join(pmRoot, folder);
3596
+ const directoryPath = path5.join(pmRoot, folder);
3475
3597
  let entries = [];
3476
3598
  try {
3477
- entries = await fs4.readdir(directoryPath);
3599
+ entries = await fs5.readdir(directoryPath);
3478
3600
  } catch (error) {
3479
3601
  if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
3480
3602
  continue;
@@ -3485,7 +3607,7 @@ async function listItemDocumentPaths(pmRoot, typeToFolder) {
3485
3607
  if (!ITEM_FILE_EXTENSIONS.some((extension) => entry.toLowerCase().endsWith(extension))) {
3486
3608
  continue;
3487
3609
  }
3488
- itemPaths.push(path4.join(directoryPath, entry));
3610
+ itemPaths.push(path5.join(directoryPath, entry));
3489
3611
  }
3490
3612
  }
3491
3613
  itemPaths.sort((left, right) => normalizeRelativePath(pmRoot, left).localeCompare(normalizeRelativePath(pmRoot, right)));
@@ -3505,7 +3627,7 @@ async function buildIntegrityCheck(pmRoot, typeToFolder, schema) {
3505
3627
  const relativePath = normalizeRelativePath(pmRoot, itemPath);
3506
3628
  let raw = "";
3507
3629
  try {
3508
- raw = await fs4.readFile(itemPath, "utf8");
3630
+ raw = await fs5.readFile(itemPath, "utf8");
3509
3631
  } catch {
3510
3632
  itemUnreadable.push(relativePath);
3511
3633
  continue;
@@ -3534,13 +3656,13 @@ async function buildIntegrityCheck(pmRoot, typeToFolder, schema) {
3534
3656
  }
3535
3657
  }
3536
3658
  const formatVersionScan = scanItemFormatVersions(formatVersionEntries);
3537
- const historyDir = path4.join(pmRoot, "history");
3659
+ const historyDir = path5.join(pmRoot, "history");
3538
3660
  const historyUnreadable = [];
3539
3661
  const historyConflictMarkers = [];
3540
3662
  const historyInvalidJson = [];
3541
3663
  let historyFiles = [];
3542
3664
  try {
3543
- historyFiles = (await fs4.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((left, right) => left.localeCompare(right));
3665
+ historyFiles = (await fs5.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((left, right) => left.localeCompare(right));
3544
3666
  } catch (error) {
3545
3667
  if (shouldReportHistoryDirectoryUnreadable(error)) {
3546
3668
  historyUnreadable.push("history");
@@ -3548,10 +3670,10 @@ async function buildIntegrityCheck(pmRoot, typeToFolder, schema) {
3548
3670
  }
3549
3671
  for (const fileName of historyFiles) {
3550
3672
  const itemId = fileName.slice(0, -".jsonl".length);
3551
- const historyPath = path4.join(historyDir, fileName);
3673
+ const historyPath = path5.join(historyDir, fileName);
3552
3674
  let raw = "";
3553
3675
  try {
3554
- raw = await fs4.readFile(historyPath, "utf8");
3676
+ raw = await fs5.readFile(historyPath, "utf8");
3555
3677
  } catch {
3556
3678
  historyUnreadable.push(itemId);
3557
3679
  continue;
@@ -4027,8 +4149,19 @@ var HEALTH_DETAIL_SUMMARIZERS = {
4027
4149
  capability_guidance: summarizeRecordList(details.capability_guidance, limit)
4028
4150
  };
4029
4151
  },
4030
- // Storage details are already compact counters; keep the pre-refactor pass-through shape.
4031
- storage: (details) => details,
4152
+ storage: (details, limit) => {
4153
+ const authorAttribution = typeof details.author_attribution === "object" && details.author_attribution !== null ? details.author_attribution : void 0;
4154
+ return {
4155
+ ...details,
4156
+ ...authorAttribution ? {
4157
+ author_attribution: {
4158
+ ...authorAttribution,
4159
+ affected_item_ids: summarizeStringList(authorAttribution.affected_item_ids, limit),
4160
+ samples: summarizeRecordList(authorAttribution.samples, limit)
4161
+ }
4162
+ } : {}
4163
+ };
4164
+ },
4032
4165
  locks: (details) => ({
4033
4166
  active_lock_count: details.active_lock_count,
4034
4167
  stale_lock_count: details.stale_lock_count,
@@ -4334,8 +4467,8 @@ async function probeTelemetryEndpointHealth(endpoint) {
4334
4467
  }
4335
4468
  async function buildTelemetryCheck(settings, options) {
4336
4469
  const globalPmRoot = resolveGlobalPmRoot(process.cwd());
4337
- const queuePath = path4.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH);
4338
- const statePath = path4.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH);
4470
+ const queuePath = path5.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH);
4471
+ const statePath = path5.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH);
4339
4472
  const queueRaw = await readFileIfExists(queuePath);
4340
4473
  const queueExists = queueRaw !== null;
4341
4474
  const queueSizeBytes = queueRaw ? Buffer.byteLength(queueRaw, "utf8") : 0;
@@ -4666,7 +4799,7 @@ async function scanHealthDirectories(pmRoot, typeRegistry, strictDirectories) {
4666
4799
  const missingOptionalDirs = [];
4667
4800
  const hookWarnings = [];
4668
4801
  for (const relativeDir of [...requiredDirs, ...optionalDirs]) {
4669
- const directoryPath = path4.join(pmRoot, relativeDir);
4802
+ const directoryPath = path5.join(pmRoot, relativeDir);
4670
4803
  hookWarnings.push(...await runActiveOnReadHooks({
4671
4804
  path: directoryPath,
4672
4805
  scope: "project"
@@ -4746,13 +4879,20 @@ function buildSettingsValuesHealthCheck(settingWarnings) {
4746
4879
  details: { warnings: settingWarnings }
4747
4880
  };
4748
4881
  }
4749
- function buildStorageHealthCheck(items, settings, historySummary) {
4882
+ var resolveUnknownAuthorEventCount = (authorAttribution) => authorAttribution.unknown_event_count ?? 0;
4883
+ var resolveActionableUnknownAuthorEventCount = (authorAttribution) => authorAttribution.actionable_unknown_event_count ?? resolveUnknownAuthorEventCount(authorAttribution);
4884
+ function buildStorageHealthCheck(items, settings, historySummary, authorAttribution) {
4885
+ const unknownAuthorEventCount = resolveUnknownAuthorEventCount(authorAttribution);
4886
+ const actionableUnknownAuthorEventCount = resolveActionableUnknownAuthorEventCount(authorAttribution);
4887
+ const hasAuthorEvents = unknownAuthorEventCount > 0;
4888
+ const hasActionableAuthorWarnings = actionableUnknownAuthorEventCount > 0;
4750
4889
  return {
4751
4890
  name: "storage",
4752
- status: historySummary.over_threshold.length === 0 ? "ok" : "warn",
4891
+ status: historySummary.over_threshold.length === 0 && !hasActionableAuthorWarnings ? "ok" : "warn",
4753
4892
  details: {
4754
4893
  items: items.length,
4755
4894
  history_streams: historySummary.count,
4895
+ ...hasAuthorEvents ? { author_attribution: authorAttribution } : {},
4756
4896
  ...historySummary.max_entries !== null ? {
4757
4897
  compact_policy: {
4758
4898
  enabled: settings.history.compact_policy.enabled,
@@ -4775,6 +4915,7 @@ function collectHealthWarnings(params) {
4775
4915
  ...params.extensionCheck.warnings,
4776
4916
  ...params.historyPolicyWarnings,
4777
4917
  ...params.historySummary.warnings,
4918
+ ...params.authorAttributionWarnings,
4778
4919
  ...params.locksCheck.warnings,
4779
4920
  ...params.integrityCheck.warnings,
4780
4921
  ...params.historyDriftCheck.warnings,
@@ -4794,7 +4935,10 @@ function buildHealthRemediationSources(params) {
4794
4935
  settings_values: params.settingWarnings,
4795
4936
  telemetry: params.telemetryCheck.warnings,
4796
4937
  extensions: params.extensionCheck.warnings,
4797
- storage: params.historySummary.over_threshold.map((id) => `history_stream_over_compact_threshold:${id}`),
4938
+ storage: [
4939
+ ...params.historySummary.over_threshold.map((id) => `history_stream_over_compact_threshold:${id}`),
4940
+ ...params.authorAttributionWarnings
4941
+ ],
4798
4942
  locks: params.locksCheck.warnings,
4799
4943
  integrity: params.integrityCheck.warnings,
4800
4944
  history_drift: params.historyDriftCheck.warnings,
@@ -4868,6 +5012,9 @@ async function runHealth(global2, options = {}) {
4868
5012
  commandLabel: "health"
4869
5013
  });
4870
5014
  const historySummary = await countHistoryStreams(pmRoot, settings.history.compact_policy);
5015
+ const authorAttribution = await scanHistoryAuthorAttribution(pmRoot);
5016
+ const actionableUnknownAuthorEventCount = resolveActionableUnknownAuthorEventCount(authorAttribution);
5017
+ const authorAttributionWarnings = actionableUnknownAuthorEventCount > 0 ? [`history_unknown_author_events:${actionableUnknownAuthorEventCount}`] : [];
4871
5018
  const locksCheck = await buildLocksCheck(pmRoot);
4872
5019
  const integrityCheck = skipPolicy.skipIntegrity ? buildSkippedHealthCheck("integrity") : await buildIntegrityCheck(pmRoot, typeRegistry.type_to_folder, settings.schema);
4873
5020
  const historyDriftCheck = skipPolicy.skipDrift ? buildSkippedHealthCheck("history_drift") : await buildHistoryDriftCheck(pmRoot, itemsWithBody);
@@ -4878,7 +5025,7 @@ async function runHealth(global2, options = {}) {
4878
5025
  buildSettingsValuesHealthCheck(settingWarnings),
4879
5026
  telemetryCheck.check,
4880
5027
  extensionCheck.check,
4881
- buildStorageHealthCheck(items, settings, historySummary),
5028
+ buildStorageHealthCheck(items, settings, historySummary, authorAttribution),
4882
5029
  locksCheck.check,
4883
5030
  integrityCheck.check,
4884
5031
  historyDriftCheck.check,
@@ -4893,6 +5040,7 @@ async function runHealth(global2, options = {}) {
4893
5040
  extensionCheck,
4894
5041
  historyPolicyWarnings: historyPolicy.warnings,
4895
5042
  historySummary,
5043
+ authorAttributionWarnings,
4896
5044
  locksCheck,
4897
5045
  integrityCheck,
4898
5046
  historyDriftCheck,
@@ -4907,6 +5055,7 @@ async function runHealth(global2, options = {}) {
4907
5055
  telemetryCheck,
4908
5056
  extensionCheck,
4909
5057
  historySummary,
5058
+ authorAttributionWarnings,
4910
5059
  locksCheck,
4911
5060
  integrityCheck,
4912
5061
  historyDriftCheck,
@@ -4924,6 +5073,38 @@ async function runHealth(global2, options = {}) {
4924
5073
  };
4925
5074
  return projectHealthResult(result, options, skipPolicy.summaryMode);
4926
5075
  }
5076
+ var _testOnlyHealthCommand = {
5077
+ buildExtensionHealthTriageSummary,
5078
+ buildCapabilityContractMetadata,
5079
+ buildVectorizationProviderDetails,
5080
+ collectUnknownCapabilityGuidance,
5081
+ isAdvisoryHealthWarning,
5082
+ isDirectory,
5083
+ isExpectedUnmanagedExtension,
5084
+ listItemDocumentPaths,
5085
+ normalizeEndpointForDisplay,
5086
+ normalizeExtensionNameForMatch,
5087
+ parseTelemetryQueue,
5088
+ probeTelemetryEndpointHealth,
5089
+ resolveActionableUnknownAuthorEventCount,
5090
+ resolveUnknownAuthorEventCount,
5091
+ selectStaleItemDetail,
5092
+ summarizeHealthCheckDetails,
5093
+ summarizeExtensionList,
5094
+ summarizeRecordList,
5095
+ summarizeStringList,
5096
+ telemetryEnvFlagEnabled,
5097
+ warningCode
5098
+ };
5099
+
5100
+ // dist/cli/commands/health.js
5101
+ !(function() {
5102
+ try {
5103
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5104
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "8986ec2e-8077-5774-b31d-63a628398df1");
5105
+ } catch (e2) {
5106
+ }
5107
+ })();
4927
5108
 
4928
5109
  // dist/cli/commands/scheduling-shortcuts.js
4929
5110
  !(function() {
@@ -4995,8 +5176,8 @@ function runRemind(title, options, global2) {
4995
5176
  }
4996
5177
 
4997
5178
  // dist/cli/commands/stats.js
4998
- import fs5 from "node:fs/promises";
4999
- import path5 from "node:path";
5179
+ import fs6 from "node:fs/promises";
5180
+ import path6 from "node:path";
5000
5181
 
5001
5182
  // dist/core/history/history-storage-stats.js
5002
5183
  !(function() {
@@ -5120,7 +5301,7 @@ function isNotFoundError(error) {
5120
5301
  return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
5121
5302
  }
5122
5303
  async function readHistoryStreamContents(pmRoot) {
5123
- const historyDir = path5.join(pmRoot, "history");
5304
+ const historyDir = path6.join(pmRoot, "history");
5124
5305
  if (!await pathExists(historyDir)) {
5125
5306
  return [];
5126
5307
  }
@@ -5128,13 +5309,13 @@ async function readHistoryStreamContents(pmRoot) {
5128
5309
  path: historyDir,
5129
5310
  scope: "project"
5130
5311
  });
5131
- const historyFiles = (await fs5.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((a, b) => a.localeCompare(b));
5312
+ const historyFiles = (await fs6.readdir(historyDir)).filter((entry) => entry.endsWith(".jsonl")).sort((a, b) => a.localeCompare(b));
5132
5313
  const streams = [];
5133
5314
  for (const file of historyFiles) {
5134
- const historyPath = path5.join(historyDir, file);
5315
+ const historyPath = path6.join(historyDir, file);
5135
5316
  let raw;
5136
5317
  try {
5137
- raw = await fs5.readFile(historyPath, "utf8");
5318
+ raw = await fs6.readFile(historyPath, "utf8");
5138
5319
  } catch (error) {
5139
5320
  if (isNotFoundError(error)) {
5140
5321
  continue;
@@ -5209,8 +5390,8 @@ async function runStats(global2, options = {}) {
5209
5390
  }
5210
5391
 
5211
5392
  // dist/cli/commands/telemetry.js
5212
- import fs6 from "node:fs/promises";
5213
- import path6 from "node:path";
5393
+ import fs7 from "node:fs/promises";
5394
+ import path7 from "node:path";
5214
5395
  !(function() {
5215
5396
  try {
5216
5397
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
@@ -5218,9 +5399,9 @@ import path6 from "node:path";
5218
5399
  } catch (e2) {
5219
5400
  }
5220
5401
  })();
5221
- var TELEMETRY_QUEUE_RELATIVE_PATH2 = path6.join("runtime", "telemetry", "events.jsonl");
5222
- var TELEMETRY_STATE_RELATIVE_PATH2 = path6.join("runtime", "telemetry", "state.json");
5223
- var TELEMETRY_RUNTIME_RELATIVE_PATH = path6.join("runtime", "telemetry");
5402
+ var TELEMETRY_QUEUE_RELATIVE_PATH2 = path7.join("runtime", "telemetry", "events.jsonl");
5403
+ var TELEMETRY_STATE_RELATIVE_PATH2 = path7.join("runtime", "telemetry", "state.json");
5404
+ var TELEMETRY_RUNTIME_RELATIVE_PATH = path7.join("runtime", "telemetry");
5224
5405
  var DEFAULT_STATS_LIMIT = 20;
5225
5406
  var TELEMETRY_SUBCOMMANDS = [
5226
5407
  "status",
@@ -5397,8 +5578,8 @@ async function readTelemetryRuntimeState(statePath) {
5397
5578
  }
5398
5579
  async function buildTelemetryStatusSummary(globalPmRoot) {
5399
5580
  const settings = await readSettings(globalPmRoot);
5400
- const queuePath = path6.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2);
5401
- const statePath = path6.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2);
5581
+ const queuePath = path7.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2);
5582
+ const statePath = path7.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2);
5402
5583
  const queueRaw = await readFileIfExists(queuePath);
5403
5584
  const queue = parseTelemetryQueue2(queueRaw);
5404
5585
  const runtimeState = await readTelemetryRuntimeState(statePath);
@@ -5428,8 +5609,8 @@ async function runTelemetry(options, _global) {
5428
5609
  void _global;
5429
5610
  const subcommand = normalizeTelemetrySubcommand(options.subcommand);
5430
5611
  const globalPmRoot = resolveGlobalPmRoot(process.cwd());
5431
- const queuePath = path6.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2);
5432
- const statePath = path6.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2);
5612
+ const queuePath = path7.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH2);
5613
+ const statePath = path7.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH2);
5433
5614
  if (subcommand === "status") {
5434
5615
  return {
5435
5616
  action: "telemetry",
@@ -5482,9 +5663,9 @@ async function runTelemetry(options, _global) {
5482
5663
  if (settingsChanged) {
5483
5664
  await writeSettings(globalPmRoot, settings, "telemetry:clear");
5484
5665
  }
5485
- const telemetryRuntimePath = path6.join(globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);
5666
+ const telemetryRuntimePath = path7.join(globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);
5486
5667
  const existed = await pathExists(telemetryRuntimePath);
5487
- await fs6.rm(telemetryRuntimePath, { recursive: true, force: true });
5668
+ await fs7.rm(telemetryRuntimePath, { recursive: true, force: true });
5488
5669
  const queueExistsAfter = await pathExists(queuePath);
5489
5670
  const stateExistsAfter = await pathExists(statePath);
5490
5671
  return {
@@ -5503,7 +5684,7 @@ async function runTelemetry(options, _global) {
5503
5684
  import { spawn } from "node:child_process";
5504
5685
  import { cp, mkdir, mkdtemp, readdir, rm } from "node:fs/promises";
5505
5686
  import { tmpdir } from "node:os";
5506
- import path7 from "node:path";
5687
+ import path8 from "node:path";
5507
5688
 
5508
5689
  // dist/core/test/item-test-run-tracking.js
5509
5690
  !(function() {
@@ -5672,21 +5853,234 @@ function resolveLinkedTestRunSelection(tests, selector) {
5672
5853
  };
5673
5854
  }
5674
5855
 
5675
- // dist/cli/commands/test/linked-command-detection.js
5856
+ // dist/sdk/test/linked-command-detection.js
5676
5857
  !(function() {
5677
5858
  try {
5678
5859
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5679
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "447e4c2e-5145-5166-ab5b-46b57ece5cb6");
5860
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "3b8460ce-e579-5c5a-94ca-b6cc616c088b");
5680
5861
  } catch (e2) {
5681
5862
  }
5682
5863
  })();
5683
- var PM_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["--path"]);
5684
- var NPX_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set([
5685
- "-p",
5686
- "--package",
5687
- "-c",
5688
- "--call"
5864
+ var PM_SUBCOMMANDS_WITH_ITEM_REFERENCE = /* @__PURE__ */ new Set([
5865
+ "get",
5866
+ "history",
5867
+ "restore",
5868
+ "update",
5869
+ "close",
5870
+ "delete",
5871
+ "append",
5872
+ "claim",
5873
+ "release",
5874
+ "comments",
5875
+ "notes",
5876
+ "learnings",
5877
+ "files",
5878
+ "docs",
5879
+ "deps",
5880
+ "test"
5881
+ ]);
5882
+ var PM_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set([
5883
+ "--pm-path",
5884
+ "--path",
5885
+ "--author"
5689
5886
  ]);
5887
+ var PM_ITEM_REFERENCE_FLAGS_WITH_VALUE = {
5888
+ get: /* @__PURE__ */ new Set([
5889
+ "--depth",
5890
+ "--fields",
5891
+ "--tree-depth",
5892
+ "--tree_depth",
5893
+ "--at",
5894
+ "--format"
5895
+ ]),
5896
+ history: /* @__PURE__ */ new Set(["--limit", "--field", "--format"]),
5897
+ restore: /* @__PURE__ */ new Set(["--message"]),
5898
+ update: /* @__PURE__ */ new Set([
5899
+ "--title",
5900
+ "-t",
5901
+ "--description",
5902
+ "-d",
5903
+ "--body",
5904
+ "-b",
5905
+ "--status",
5906
+ "-s",
5907
+ "--close-reason",
5908
+ "--close_reason",
5909
+ "--priority",
5910
+ "-p",
5911
+ "--type",
5912
+ "--tags",
5913
+ "--add-tags",
5914
+ "--add_tags",
5915
+ "--remove-tags",
5916
+ "--remove_tags",
5917
+ "--deadline",
5918
+ "--estimated-minutes",
5919
+ "--estimate",
5920
+ "--estimated_minutes",
5921
+ "--acceptance-criteria",
5922
+ "--ac",
5923
+ "--acceptance_criteria",
5924
+ "--definition-of-ready",
5925
+ "--definition_of_ready",
5926
+ "--order",
5927
+ "--rank",
5928
+ "--goal",
5929
+ "--objective",
5930
+ "--value",
5931
+ "--impact",
5932
+ "--outcome",
5933
+ "--why-now",
5934
+ "--why_now",
5935
+ "--message",
5936
+ "--assignee",
5937
+ "--parent",
5938
+ "--reviewer",
5939
+ "--risk",
5940
+ "--confidence",
5941
+ "--sprint",
5942
+ "--release",
5943
+ "--blocked-by",
5944
+ "--blocked_by",
5945
+ "--blocked-reason",
5946
+ "--blocked_reason",
5947
+ "--unblock-note",
5948
+ "--unblock_note",
5949
+ "--reporter",
5950
+ "--severity",
5951
+ "--environment",
5952
+ "--repro-steps",
5953
+ "--repro_steps",
5954
+ "--resolution",
5955
+ "--expected-result",
5956
+ "--expected_result",
5957
+ "--expected",
5958
+ "--actual-result",
5959
+ "--actual_result",
5960
+ "--actual",
5961
+ "--affected-version",
5962
+ "--affected_version",
5963
+ "--fixed-version",
5964
+ "--fixed_version",
5965
+ "--component",
5966
+ "--regression",
5967
+ "--customer-impact",
5968
+ "--customer_impact",
5969
+ "--dep",
5970
+ "--dep-remove",
5971
+ "--dep_remove",
5972
+ "--comment",
5973
+ "--note",
5974
+ "--learning",
5975
+ "--file",
5976
+ "--test",
5977
+ "--doc",
5978
+ "--reminder",
5979
+ "--event",
5980
+ "--type-option",
5981
+ "--type_option",
5982
+ "--field",
5983
+ "--unset",
5984
+ "--body-file"
5985
+ ]),
5986
+ close: /* @__PURE__ */ new Set([
5987
+ "--reason",
5988
+ "-r",
5989
+ "--close-reason",
5990
+ "--duplicate-of",
5991
+ "-d",
5992
+ "--message",
5993
+ "-m",
5994
+ "--validate-close",
5995
+ "--resolution",
5996
+ "--expected-result",
5997
+ "--expected_result",
5998
+ "--expected",
5999
+ "--actual-result",
6000
+ "--actual_result",
6001
+ "--actual"
6002
+ ]),
6003
+ delete: /* @__PURE__ */ new Set(["--message"]),
6004
+ append: /* @__PURE__ */ new Set(["--body", "--text", "--message"]),
6005
+ claim: /* @__PURE__ */ new Set([
6006
+ "--assignee",
6007
+ "--message",
6008
+ "--type",
6009
+ "--tag",
6010
+ "--priority",
6011
+ "--assignee-filter",
6012
+ "--parent",
6013
+ "--sprint",
6014
+ "--release",
6015
+ "--max-attempts"
6016
+ ]),
6017
+ release: /* @__PURE__ */ new Set(["--assignee", "--message"]),
6018
+ comments: /* @__PURE__ */ new Set([
6019
+ "--add",
6020
+ "--body",
6021
+ "--comment",
6022
+ "--file",
6023
+ "--edit",
6024
+ "--delete",
6025
+ "--limit",
6026
+ "--message"
6027
+ ]),
6028
+ notes: /* @__PURE__ */ new Set([
6029
+ "--add",
6030
+ "--file",
6031
+ "--edit",
6032
+ "--delete",
6033
+ "--limit",
6034
+ "--message"
6035
+ ]),
6036
+ learnings: /* @__PURE__ */ new Set([
6037
+ "--add",
6038
+ "--file",
6039
+ "--edit",
6040
+ "--delete",
6041
+ "--limit",
6042
+ "--message"
6043
+ ]),
6044
+ files: /* @__PURE__ */ new Set([
6045
+ "--add",
6046
+ "--add-glob",
6047
+ "--remove",
6048
+ "--migrate",
6049
+ "--note",
6050
+ "--message"
6051
+ ]),
6052
+ docs: /* @__PURE__ */ new Set([
6053
+ "--add",
6054
+ "--add-glob",
6055
+ "--remove",
6056
+ "--migrate",
6057
+ "--note",
6058
+ "--message"
6059
+ ]),
6060
+ deps: /* @__PURE__ */ new Set([
6061
+ "--format",
6062
+ "--max-depth",
6063
+ "--collapse",
6064
+ "--node-limit",
6065
+ "--edge-limit",
6066
+ "--token-budget",
6067
+ "--cursor"
6068
+ ]),
6069
+ test: /* @__PURE__ */ new Set([
6070
+ "--add",
6071
+ "--add-json",
6072
+ "--remove",
6073
+ "--match",
6074
+ "--only-index",
6075
+ "--timeout",
6076
+ "--env-set",
6077
+ "--env-clear",
6078
+ "--pm-context",
6079
+ "--message"
6080
+ ])
6081
+ };
6082
+ var NPX_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set(["-p", "--package"]);
6083
+ var NPX_COMMAND_STRING_FLAGS = /* @__PURE__ */ new Set(["-c", "--call"]);
5690
6084
  var PNPM_GLOBAL_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set([
5691
6085
  "-c",
5692
6086
  "-C",
@@ -5716,6 +6110,37 @@ var SCRIPT_RUN_FLAGS_WITH_VALUE = /* @__PURE__ */ new Set([
5716
6110
  function splitNormalizedCommandSegments(normalizedCommand) {
5717
6111
  return normalizedCommand.split(/&&|\|\||\||;/).map((segment) => segment.trim()).filter((segment) => segment.length > 0);
5718
6112
  }
6113
+ function extractPmInvocationArgsFromSegment(segment) {
6114
+ const tokens = stripLeadingEnvAssignments(segment.split(" ").filter((token) => token.length > 0));
6115
+ if (tokens.length === 0)
6116
+ return null;
6117
+ const [executable, ...args] = tokens;
6118
+ if (isPmExecutableToken(executable) || isPmCliScriptToken(executable)) {
6119
+ return args;
6120
+ }
6121
+ if (executable === "node" && args[0] && isPmCliScriptToken(args[0])) {
6122
+ return args.slice(1);
6123
+ }
6124
+ const invocation = executable === "npx" || executable === "bunx" ? parseNpxCommand(args) : executable === "pnpm" ? parsePnpmDlxCommand(args) : executable === "npm" ? parseNpmExecCommand(args) : null;
6125
+ return invocation && (isPmExecutableToken(invocation.command) || isPmCliPackageToken(invocation.command)) ? invocation.args : null;
6126
+ }
6127
+ var extractReferencedPmItemIdsFromCommand = (command, idPrefix = "pm") => {
6128
+ const normalizedPrefix = idPrefix.trim().toLowerCase().replace(/-+$/, "");
6129
+ if (normalizedPrefix.length === 0)
6130
+ return [];
6131
+ const normalizedCommand = command.trim().replaceAll("\\", "/").replaceAll('"', "").replaceAll("'", "").replaceAll(/\s+/g, " ").toLowerCase();
6132
+ const ids = /* @__PURE__ */ new Set();
6133
+ for (const segment of splitNormalizedCommandSegments(normalizedCommand)) {
6134
+ const invocationArgs = extractPmInvocationArgsFromSegment(segment);
6135
+ const context = invocationArgs ? resolvePmSubcommandContext(invocationArgs) : null;
6136
+ const candidate = context && PM_SUBCOMMANDS_WITH_ITEM_REFERENCE.has(context.subcommand) ? firstPositionalToken(context.remaining, PM_ITEM_REFERENCE_FLAGS_WITH_VALUE[context.subcommand]) : void 0;
6137
+ const normalizedCandidate = candidate?.trim().toLowerCase();
6138
+ if (normalizedCandidate?.startsWith(`${normalizedPrefix}-`) === true && normalizedCandidate.length > normalizedPrefix.length + 1) {
6139
+ ids.add(candidate);
6140
+ }
6141
+ }
6142
+ return [...ids].sort((left, right) => left.localeCompare(right));
6143
+ };
5719
6144
  function stripLeadingEnvAssignments(tokens) {
5720
6145
  let start = 0;
5721
6146
  if (tokens[start] === "env") {
@@ -5785,15 +6210,16 @@ function parseNpxCommand(tokens) {
5785
6210
  if (!token.startsWith("-")) {
5786
6211
  break;
5787
6212
  }
5788
- if (token.includes("=")) {
5789
- index += 1;
5790
- continue;
6213
+ const inlineCommandMatch = /^(?:-c|--call)=(.*)$/.exec(token);
6214
+ if (inlineCommandMatch) {
6215
+ const command2 = inlineCommandMatch[1];
6216
+ return command2 ? { command: command2, args: tokens.slice(index + 1) } : null;
5791
6217
  }
5792
- if (NPX_FLAGS_WITH_VALUE.has(token)) {
5793
- index += 2;
5794
- continue;
6218
+ if (NPX_COMMAND_STRING_FLAGS.has(token)) {
6219
+ index += 1;
6220
+ break;
5795
6221
  }
5796
- index += 1;
6222
+ index += NPX_FLAGS_WITH_VALUE.has(token) && !token.includes("=") ? 2 : 1;
5797
6223
  }
5798
6224
  const command = tokens[index];
5799
6225
  if (!command) {
@@ -5868,11 +6294,18 @@ function resolvePmSubcommandContext(args) {
5868
6294
  }
5869
6295
  return null;
5870
6296
  }
5871
- function firstPositionalToken(tokens) {
5872
- for (const token of tokens) {
6297
+ function firstPositionalToken(tokens, flagsWithValue = /* @__PURE__ */ new Set()) {
6298
+ for (let index = 0; index < tokens.length; index += 1) {
6299
+ const token = tokens[index];
6300
+ if (token === "--") {
6301
+ return tokens[index + 1];
6302
+ }
5873
6303
  if (!token.startsWith("-")) {
5874
6304
  return token;
5875
6305
  }
6306
+ if (!token.includes("=") && (PM_GLOBAL_FLAGS_WITH_VALUE.has(token) || flagsWithValue.has(token))) {
6307
+ index += 1;
6308
+ }
5876
6309
  }
5877
6310
  return void 0;
5878
6311
  }
@@ -5881,7 +6314,7 @@ function firstPositionalToken(tokens) {
5881
6314
  !(function() {
5882
6315
  try {
5883
6316
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5884
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "294ec091-2861-594b-90d2-af380ce24b9d");
6317
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1f9bc440-299f-5f61-be67-cad0c40f56a7");
5885
6318
  } catch (e2) {
5886
6319
  }
5887
6320
  })();
@@ -5910,24 +6343,6 @@ var LINKED_TEST_INFRA_COLLISION_PATTERNS = [
5910
6343
  /web server[^.\n]*already running/i,
5911
6344
  /failed to listen on/i
5912
6345
  ];
5913
- var PM_SUBCOMMANDS_WITH_ITEM_REFERENCE = /* @__PURE__ */ new Set([
5914
- "get",
5915
- "history",
5916
- "restore",
5917
- "update",
5918
- "close",
5919
- "delete",
5920
- "append",
5921
- "claim",
5922
- "release",
5923
- "comments",
5924
- "notes",
5925
- "learnings",
5926
- "files",
5927
- "docs",
5928
- "deps",
5929
- "test"
5930
- ]);
5931
6346
  var PM_TRACKER_READ_SUBCOMMANDS = /* @__PURE__ */ new Set([
5932
6347
  "activity",
5933
6348
  "calendar",
@@ -6104,51 +6519,6 @@ function mergeEnvClearDirectives(entries, optionName) {
6104
6519
  }
6105
6520
  return [...new Set(values)];
6106
6521
  }
6107
- function looksLikePrefixedItemId(token, idPrefix) {
6108
- const normalizedPrefix = idPrefix.trim().toLowerCase().replace(/-+$/, "");
6109
- if (normalizedPrefix.length === 0) {
6110
- return false;
6111
- }
6112
- const normalized = token.trim().toLowerCase();
6113
- if (!normalized.startsWith(`${normalizedPrefix}-`)) {
6114
- return false;
6115
- }
6116
- return normalized.length > normalizedPrefix.length + 1;
6117
- }
6118
- function extractPmInvocationArgsFromSegment(segment) {
6119
- const rawTokens = segment.split(" ").filter((token) => token.length > 0);
6120
- const tokens = stripLeadingEnvAssignments(rawTokens);
6121
- if (tokens.length === 0) {
6122
- return null;
6123
- }
6124
- const [executable, ...args] = tokens;
6125
- if (isPmExecutableToken(executable) || isPmCliScriptToken(executable)) {
6126
- return args;
6127
- }
6128
- if (executable === "node" && args.length > 0 && isPmCliScriptToken(args[0])) {
6129
- return args.slice(1);
6130
- }
6131
- return extractPackageManagerPmInvocationArgs(executable, args);
6132
- }
6133
- function extractPackageManagerPmInvocationArgs(executable, args) {
6134
- const parsed = parsePackageManagerPmInvocation(executable, args);
6135
- if (!parsed || !isPmExecutableToken(parsed.command) && !isPmCliPackageToken(parsed.command)) {
6136
- return null;
6137
- }
6138
- return parsed.args;
6139
- }
6140
- function parsePackageManagerPmInvocation(executable, args) {
6141
- if (executable === "npx" || executable === "bunx") {
6142
- return parseNpxCommand(args);
6143
- }
6144
- if (executable === "pnpm") {
6145
- return parsePnpmDlxCommand(args);
6146
- }
6147
- if (executable === "npm") {
6148
- return parseNpmExecCommand(args);
6149
- }
6150
- return null;
6151
- }
6152
6522
  function commandInvokesPmCli(command) {
6153
6523
  const normalizedCommand = normalizeCommandForValidation(command);
6154
6524
  return splitNormalizedCommandSegments(normalizedCommand).some((segment) => extractPmInvocationArgsFromSegment(segment) !== null);
@@ -6167,31 +6537,6 @@ function commandInvokesPmTrackerReadCommand(command) {
6167
6537
  return PM_TRACKER_READ_SUBCOMMANDS.has(context.subcommand);
6168
6538
  });
6169
6539
  }
6170
- function extractReferencedPmItemIdsFromCommand(command, idPrefix = "pm") {
6171
- const normalizedCommand = normalizeCommandForValidation(command);
6172
- const ids = /* @__PURE__ */ new Set();
6173
- for (const segment of splitNormalizedCommandSegments(normalizedCommand)) {
6174
- const invocationArgs = extractPmInvocationArgsFromSegment(segment);
6175
- if (!invocationArgs) {
6176
- continue;
6177
- }
6178
- const context = resolvePmSubcommandContext(invocationArgs);
6179
- if (!context) {
6180
- continue;
6181
- }
6182
- if (!PM_SUBCOMMANDS_WITH_ITEM_REFERENCE.has(context.subcommand)) {
6183
- continue;
6184
- }
6185
- const candidate = firstPositionalToken(context.remaining);
6186
- if (!candidate) {
6187
- continue;
6188
- }
6189
- if (looksLikePrefixedItemId(candidate, idPrefix)) {
6190
- ids.add(candidate);
6191
- }
6192
- }
6193
- return [...ids].sort((left, right) => left.localeCompare(right));
6194
- }
6195
6540
  function resolveDirectRunnerSubcommand(parsed) {
6196
6541
  if (!parsed) {
6197
6542
  return void 0;
@@ -6301,7 +6646,7 @@ function packageManagerInvokesUnsafeDirectTestRunner(executable, args) {
6301
6646
  return isDirectTestRunnerSubcommand(parseNpxCommand(args)?.command);
6302
6647
  }
6303
6648
  if (executable === "pnpm" || executable === "npm") {
6304
- return isDirectTestRunnerSubcommand(parsePackageManagerPmInvocation(executable, args)?.command) || firstDirectTestRunnerSubcommand(executable, args) === "vitest";
6649
+ return isDirectTestRunnerSubcommand((executable === "pnpm" ? parsePnpmDlxCommand(args) : parseNpmExecCommand(args))?.command) || firstDirectTestRunnerSubcommand(executable, args) === "vitest";
6305
6650
  }
6306
6651
  return (executable === "yarn" || executable === "bun") && firstDirectTestRunnerSubcommand(executable, args) === "vitest";
6307
6652
  }
@@ -6778,7 +7123,7 @@ async function copyIntoSandboxIfPresent(sourcePath, targetPath, recursive = fals
6778
7123
  if (!await pathExists(sourcePath)) {
6779
7124
  return;
6780
7125
  }
6781
- await mkdir(path7.dirname(targetPath), { recursive: true });
7126
+ await mkdir(path8.dirname(targetPath), { recursive: true });
6782
7127
  try {
6783
7128
  if (recursive) {
6784
7129
  await cp(sourcePath, targetPath, { recursive: true, force: true });
@@ -6794,9 +7139,9 @@ async function copyIntoSandboxIfPresent(sourcePath, targetPath, recursive = fals
6794
7139
  }
6795
7140
  async function seedLinkedTestSandbox(sandboxPmPath, sandboxGlobalPath, sourceRoots) {
6796
7141
  await copyIntoSandboxIfPresent(getSettingsPath(sourceRoots.projectPmRoot), getSettingsPath(sandboxPmPath));
6797
- await copyIntoSandboxIfPresent(path7.join(sourceRoots.projectPmRoot, "extensions"), path7.join(sandboxPmPath, "extensions"), true);
7142
+ await copyIntoSandboxIfPresent(path8.join(sourceRoots.projectPmRoot, "extensions"), path8.join(sandboxPmPath, "extensions"), true);
6798
7143
  await copyIntoSandboxIfPresent(getSettingsPath(sourceRoots.globalPmRoot), getSettingsPath(sandboxGlobalPath));
6799
- await copyIntoSandboxIfPresent(path7.join(sourceRoots.globalPmRoot, "extensions"), path7.join(sandboxGlobalPath, "extensions"), true);
7144
+ await copyIntoSandboxIfPresent(path8.join(sourceRoots.globalPmRoot, "extensions"), path8.join(sandboxGlobalPath, "extensions"), true);
6800
7145
  }
6801
7146
  async function seedLinkedTestTrackerData(sourceRoot, sandboxRoot) {
6802
7147
  if (!await pathExists(sourceRoot)) {
@@ -6807,8 +7152,8 @@ async function seedLinkedTestTrackerData(sourceRoot, sandboxRoot) {
6807
7152
  if (LINKED_TEST_TRACKER_DIRS_TO_SKIP.has(entry.name)) {
6808
7153
  continue;
6809
7154
  }
6810
- const sourcePath = path7.join(sourceRoot, entry.name);
6811
- const targetPath = path7.join(sandboxRoot, entry.name);
7155
+ const sourcePath = path8.join(sourceRoot, entry.name);
7156
+ const targetPath = path8.join(sandboxRoot, entry.name);
6812
7157
  if (entry.isDirectory()) {
6813
7158
  await copyIntoSandboxIfPresent(sourcePath, targetPath, true);
6814
7159
  continue;
@@ -6828,7 +7173,7 @@ async function countLinkedTestItemFiles(pmRoot) {
6828
7173
  if (!entry.isDirectory() || LINKED_TEST_ITEM_COUNT_DIRS_TO_SKIP.has(entry.name)) {
6829
7174
  continue;
6830
7175
  }
6831
- const folderPath = path7.join(pmRoot, entry.name);
7176
+ const folderPath = path8.join(pmRoot, entry.name);
6832
7177
  let files;
6833
7178
  try {
6834
7179
  files = await readdir(folderPath, { withFileTypes: true });
@@ -7023,10 +7368,10 @@ ${stderr}`;
7023
7368
  function createLinkedTestSandboxLayout(sandboxRoot) {
7024
7369
  return {
7025
7370
  root: sandboxRoot,
7026
- schemaProjectPmPath: path7.join(sandboxRoot, "schema", "project", ".agents", "pm"),
7027
- schemaGlobalPmPath: path7.join(sandboxRoot, "schema", "global"),
7028
- trackerProjectPmPath: path7.join(sandboxRoot, "tracker", "project", ".agents", "pm"),
7029
- trackerGlobalPmPath: path7.join(sandboxRoot, "tracker", "global")
7371
+ schemaProjectPmPath: path8.join(sandboxRoot, "schema", "project", ".agents", "pm"),
7372
+ schemaGlobalPmPath: path8.join(sandboxRoot, "schema", "global"),
7373
+ trackerProjectPmPath: path8.join(sandboxRoot, "tracker", "project", ".agents", "pm"),
7374
+ trackerGlobalPmPath: path8.join(sandboxRoot, "tracker", "global")
7030
7375
  };
7031
7376
  }
7032
7377
  async function initializeLinkedTestSandboxes(layout) {
@@ -7226,7 +7571,7 @@ async function runSingleLinkedTest(params) {
7226
7571
  }
7227
7572
  async function runLinkedTests(tests, defaultTimeoutSeconds, options) {
7228
7573
  const results = [];
7229
- const sandboxRoot = await mkdtemp(path7.join(tmpdir(), "pm-linked-test-"));
7574
+ const sandboxRoot = await mkdtemp(path8.join(tmpdir(), "pm-linked-test-"));
7230
7575
  const layout = createLinkedTestSandboxLayout(sandboxRoot);
7231
7576
  const runLevelPmContextMode = parsePmContextMode(options?.pmContext);
7232
7577
  const progressMode = options?.progress === true ? "always" : "auto";
@@ -7892,10 +8237,10 @@ async function runTestAll(options, global2) {
7892
8237
  import os from "node:os";
7893
8238
 
7894
8239
  // dist/core/test/background-runs.js
7895
- import fs7 from "node:fs/promises";
8240
+ import fs8 from "node:fs/promises";
7896
8241
  import { spawn as spawn2 } from "node:child_process";
7897
8242
  import { createHash, randomBytes } from "node:crypto";
7898
- import path8 from "node:path";
8243
+ import path9 from "node:path";
7899
8244
  !(function() {
7900
8245
  try {
7901
8246
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
@@ -7940,7 +8285,7 @@ function buildBackgroundTestRunFingerprint(kind, commandArgs, pmRoot) {
7940
8285
  const payload = {
7941
8286
  kind,
7942
8287
  command: normalizeCommandArgs(commandArgs),
7943
- pm_root: path8.resolve(pmRoot)
8288
+ pm_root: path9.resolve(pmRoot)
7944
8289
  };
7945
8290
  return createHash("sha256").update(JSON.stringify(payload)).digest("hex");
7946
8291
  }
@@ -7995,8 +8340,8 @@ async function listBackgroundRunRecordPaths(pmRoot) {
7995
8340
  if (!await pathExists(recordsRoot)) {
7996
8341
  return [];
7997
8342
  }
7998
- const entries = await fs7.readdir(recordsRoot, { withFileTypes: true });
7999
- return entries.filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => path8.join(recordsRoot, entry.name)).sort((left, right) => right.localeCompare(left));
8343
+ const entries = await fs8.readdir(recordsRoot, { withFileTypes: true });
8344
+ return entries.filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => path9.join(recordsRoot, entry.name)).sort((left, right) => right.localeCompare(left));
8000
8345
  }
8001
8346
  function parseLinuxRssStatus(raw) {
8002
8347
  const match = raw.match(/^VmRSS:\s+(\d+)\s+kB$/m);
@@ -8010,7 +8355,7 @@ async function readLinuxRssBytes(pid) {
8010
8355
  return void 0;
8011
8356
  }
8012
8357
  try {
8013
- const raw = await fs7.readFile(`/proc/${pid}/status`, "utf8");
8358
+ const raw = await fs8.readFile(`/proc/${pid}/status`, "utf8");
8014
8359
  return parseLinuxRssStatus(raw);
8015
8360
  } catch {
8016
8361
  return void 0;
@@ -8038,7 +8383,7 @@ async function readLinuxCpuSeconds(pid) {
8038
8383
  return {};
8039
8384
  }
8040
8385
  try {
8041
- const raw = await fs7.readFile(`/proc/${pid}/stat`, "utf8");
8386
+ const raw = await fs8.readFile(`/proc/${pid}/stat`, "utf8");
8042
8387
  return parseLinuxCpuStat(raw);
8043
8388
  } catch {
8044
8389
  return {};
@@ -8174,18 +8519,18 @@ function tailLines(value, limit) {
8174
8519
  async function resolveBackgroundCliEntry(cwd) {
8175
8520
  const configured = process.env.PM_BACKGROUND_CLI_ENTRY?.trim();
8176
8521
  if (configured && configured.length > 0) {
8177
- const resolvedConfigured = path8.resolve(cwd, configured);
8522
+ const resolvedConfigured = path9.resolve(cwd, configured);
8178
8523
  if (await pathExists(resolvedConfigured)) {
8179
8524
  return resolvedConfigured;
8180
8525
  }
8181
8526
  }
8182
- const distEntry = path8.resolve(cwd, "dist", "cli.js");
8527
+ const distEntry = path9.resolve(cwd, "dist", "cli.js");
8183
8528
  if (await pathExists(distEntry)) {
8184
8529
  return distEntry;
8185
8530
  }
8186
8531
  const argvEntry = process.argv[1]?.trim();
8187
8532
  if (argvEntry && argvEntry.length > 0) {
8188
- const resolvedArgvEntry = path8.resolve(cwd, argvEntry);
8533
+ const resolvedArgvEntry = path9.resolve(cwd, argvEntry);
8189
8534
  if (await pathExists(resolvedArgvEntry)) {
8190
8535
  return resolvedArgvEntry;
8191
8536
  }
@@ -8242,8 +8587,8 @@ async function startBackgroundTestRun(options) {
8242
8587
  const stdoutPath = getTestRunStdoutPath(options.pmRoot, runId);
8243
8588
  const stderrPath = getTestRunStderrPath(options.pmRoot, runId);
8244
8589
  const resultPath = getTestRunResultPath(options.pmRoot, runId);
8245
- await fs7.writeFile(stdoutPath, "", "utf8");
8246
- await fs7.writeFile(stderrPath, "", "utf8");
8590
+ await fs8.writeFile(stdoutPath, "", "utf8");
8591
+ await fs8.writeFile(stderrPath, "", "utf8");
8247
8592
  const record = {
8248
8593
  id: runId,
8249
8594
  kind: options.kind,
@@ -8322,7 +8667,7 @@ async function spawnBackgroundTestRunWorker(options) {
8322
8667
  }
8323
8668
  async function appendFileOrdered(queue, filePath, text) {
8324
8669
  await queue;
8325
- await fs7.appendFile(filePath, text, "utf8");
8670
+ await fs8.appendFile(filePath, text, "utf8");
8326
8671
  }
8327
8672
  function resolvePositiveEnvInteger(name, fallback) {
8328
8673
  const parsed = Number.parseInt(process.env[name] ?? "", 10);
@@ -8908,11 +9253,11 @@ async function runTestRunsWorker(runId, global2) {
8908
9253
  };
8909
9254
  }
8910
9255
 
8911
- // dist/cli/commands/validate.js
8912
- import fs8 from "node:fs/promises";
9256
+ // dist/sdk/governance/validate.js
9257
+ import fs9 from "node:fs/promises";
8913
9258
  import { realpathSync } from "node:fs";
8914
9259
  import { execFile } from "node:child_process";
8915
- import path9 from "node:path";
9260
+ import path10 from "node:path";
8916
9261
  import { promisify } from "node:util";
8917
9262
 
8918
9263
  // dist/core/validate/fix-planning.js
@@ -9253,8 +9598,8 @@ function buildMissingLinkedPathRows(rows, lookup) {
9253
9598
  });
9254
9599
  }
9255
9600
  }
9256
- return [...buckets.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([path10, bucket]) => ({
9257
- path: path10,
9601
+ return [...buckets.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([path11, bucket]) => ({
9602
+ path: path11,
9258
9603
  classification: bucket.classification,
9259
9604
  items: [...bucket.owners.values()].map((owner) => {
9260
9605
  const metadata = lookup(owner.item_id);
@@ -9284,11 +9629,11 @@ function summarizeMissingLinkedPathRows(rows) {
9284
9629
  return lines;
9285
9630
  }
9286
9631
 
9287
- // dist/cli/commands/validate.js
9632
+ // dist/sdk/governance/validate.js
9288
9633
  !(function() {
9289
9634
  try {
9290
9635
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
9291
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "fef78b9a-56c5-57af-8bc3-4407b251edfa");
9636
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "362d2563-06b2-58f4-8c37-62e0de1eb95b");
9292
9637
  } catch (e2) {
9293
9638
  }
9294
9639
  })();
@@ -9402,6 +9747,7 @@ var METADATA_TRUNCATED_KEY_BY_FIELD = {
9402
9747
  release: "missing_release_truncated"
9403
9748
  };
9404
9749
  var GIT_LS_FILES_MAX_BUFFER = 32 * 1024 * 1024;
9750
+ var GIT_LS_FILES_TIMEOUT_MS = 1e4;
9405
9751
  var FILE_LIST_SUMMARY_LIMIT = 40;
9406
9752
  var DIAGNOSTIC_LIST_SUMMARY_LIMIT = 5;
9407
9753
  var LINKED_ARTIFACT_MAX_PATH_LENGTH = 4096;
@@ -9597,16 +9943,16 @@ function resolveFileScanMode(scanMode) {
9597
9943
  throw new PmCliError(`Unknown --scan-mode value "${scanMode}". Supported values: ${VALIDATE_FILE_SCAN_MODES.join(", ")}.`, EXIT_CODE.USAGE);
9598
9944
  }
9599
9945
  function resolveWorkspaceRoot(pmRoot) {
9600
- const resolvedPmRoot = path9.resolve(pmRoot);
9946
+ const resolvedPmRoot = path10.resolve(pmRoot);
9601
9947
  const normalizedPmRoot = resolvedPmRoot.replaceAll("\\", "/");
9602
9948
  if (normalizedPmRoot.endsWith("/.agents/pm")) {
9603
- return path9.dirname(path9.dirname(resolvedPmRoot));
9949
+ return path10.dirname(path10.dirname(resolvedPmRoot));
9604
9950
  }
9605
- const resolvedCwd = path9.resolve(process.cwd());
9951
+ const resolvedCwd = path10.resolve(process.cwd());
9606
9952
  const canonicalPmRoot = realpathForWorkspaceRoot(resolvedPmRoot);
9607
9953
  const canonicalCwd = realpathForWorkspaceRoot(resolvedCwd);
9608
- const relativeFromPmRoot = path9.relative(canonicalPmRoot, canonicalCwd);
9609
- const cwdInsidePmRoot = relativeFromPmRoot.length === 0 || !relativeFromPmRoot.startsWith("..") && !path9.isAbsolute(relativeFromPmRoot);
9954
+ const relativeFromPmRoot = path10.relative(canonicalPmRoot, canonicalCwd);
9955
+ const cwdInsidePmRoot = relativeFromPmRoot.length === 0 || !relativeFromPmRoot.startsWith("..") && !path10.isAbsolute(relativeFromPmRoot);
9610
9956
  if (cwdInsidePmRoot) {
9611
9957
  return resolvedPmRoot;
9612
9958
  }
@@ -9616,14 +9962,14 @@ function realpathForWorkspaceRoot(inputPath) {
9616
9962
  try {
9617
9963
  return realpathSync.native(inputPath);
9618
9964
  } catch {
9619
- return path9.resolve(inputPath);
9965
+ return path10.resolve(inputPath);
9620
9966
  }
9621
9967
  }
9622
9968
  async function listFilesRecursive(basePath, relativePath, output) {
9623
- const targetDirectory = relativePath.length > 0 ? path9.join(basePath, relativePath) : basePath;
9969
+ const targetDirectory = relativePath.length > 0 ? path10.join(basePath, relativePath) : basePath;
9624
9970
  let entries;
9625
9971
  try {
9626
- entries = await fs8.readdir(targetDirectory, { withFileTypes: true });
9972
+ entries = await fs9.readdir(targetDirectory, { withFileTypes: true });
9627
9973
  } catch (error) {
9628
9974
  if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
9629
9975
  return;
@@ -9634,7 +9980,7 @@ async function listFilesRecursive(basePath, relativePath, output) {
9634
9980
  if (entry.name.startsWith(".")) {
9635
9981
  continue;
9636
9982
  }
9637
- const childRelative = relativePath.length > 0 ? path9.join(relativePath, entry.name) : entry.name;
9983
+ const childRelative = relativePath.length > 0 ? path10.join(relativePath, entry.name) : entry.name;
9638
9984
  if (entry.isDirectory()) {
9639
9985
  if (DIRECTORY_IGNORE_SET.has(entry.name)) {
9640
9986
  continue;
@@ -9654,9 +10000,9 @@ async function collectDefaultProjectFileCandidates(workspaceRoot) {
9654
10000
  await listFilesRecursive(workspaceRoot, directory, discovered);
9655
10001
  }
9656
10002
  for (const candidate of FILE_SCAN_ROOT_FILES) {
9657
- const absolute = path9.join(workspaceRoot, candidate);
10003
+ const absolute = path10.join(workspaceRoot, candidate);
9658
10004
  try {
9659
- const stats = await fs8.stat(absolute);
10005
+ const stats = await fs9.stat(absolute);
9660
10006
  if (stats.isFile()) {
9661
10007
  discovered.push(normalizeRelativePath2(candidate));
9662
10008
  }
@@ -9671,7 +10017,8 @@ async function collectTrackedGitFileCandidates(workspaceRoot) {
9671
10017
  cwd: workspaceRoot,
9672
10018
  encoding: "utf8",
9673
10019
  maxBuffer: GIT_LS_FILES_MAX_BUFFER,
9674
- windowsHide: true
10020
+ windowsHide: true,
10021
+ timeout: GIT_LS_FILES_TIMEOUT_MS
9675
10022
  });
9676
10023
  const discovered = stdout.split("\0").map((value) => normalizeRelativePath2(value)).filter((value) => value.length > 0);
9677
10024
  return [...new Set(discovered)].sort((left, right) => left.localeCompare(right));
@@ -9685,7 +10032,7 @@ function resolvePmInternalCandidatePrefixes(pmRoot, workspaceRoot) {
9685
10032
  if (configuredDefault.length > 0) {
9686
10033
  prefixes.add(configuredDefault);
9687
10034
  }
9688
- const relativePmRoot = normalizeRelativeDirectoryPath(path9.relative(workspaceRoot, pmRoot));
10035
+ const relativePmRoot = normalizeRelativeDirectoryPath(path10.relative(workspaceRoot, pmRoot));
9689
10036
  if (relativePmRoot.length > 0 && !relativePmRoot.startsWith("..")) {
9690
10037
  prefixes.add(relativePmRoot);
9691
10038
  }
@@ -10031,7 +10378,7 @@ function buildResolutionCheck(items, statusRegistry, verboseDiagnostics) {
10031
10378
  function escapeRegExp(value) {
10032
10379
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
10033
10380
  }
10034
- function buildLifecycleDependencyGraph(activeItems, idPrefix = "pm") {
10381
+ function buildLifecycleDependencyGraph(activeItems, idPrefix = "pm", relationshipRegistry = createRelationshipKindRegistry()) {
10035
10382
  const activeItemIds = new Set(activeItems.map((item) => item.id));
10036
10383
  const graph = /* @__PURE__ */ new Map();
10037
10384
  const sortedItems = [...activeItems].sort((left, right) => left.id.localeCompare(right.id));
@@ -10042,6 +10389,12 @@ function buildLifecycleDependencyGraph(activeItems, idPrefix = "pm") {
10042
10389
  edges.add(blockedBy);
10043
10390
  }
10044
10391
  for (const dependency of item.dependencies ?? []) {
10392
+ const dependencyKind = toMeaningfulString(dependency.kind);
10393
+ if (!dependencyKind)
10394
+ continue;
10395
+ const relationshipDefinition = relationshipRegistry.resolve(dependencyKind);
10396
+ if (!relationshipDefinition?.ordering)
10397
+ continue;
10045
10398
  const dependencyId = toMeaningfulString(dependency.id);
10046
10399
  if (!dependencyId || !activeItemIds.has(dependencyId)) {
10047
10400
  continue;
@@ -10159,30 +10512,30 @@ function resolveLifecycleDependencyCycleSamplePath(component, graph) {
10159
10512
  return [start, start];
10160
10513
  }
10161
10514
  const componentSet = new Set(component);
10162
- const path10 = [start];
10515
+ const path11 = [start];
10163
10516
  const visited = /* @__PURE__ */ new Set([start]);
10164
10517
  const search = (current) => {
10165
10518
  const neighbors = (graph.get(current) ?? []).filter((candidate) => componentSet.has(candidate));
10166
10519
  for (const next of neighbors) {
10167
- if (next === start && path10.length > 1) {
10168
- path10.push(start);
10520
+ if (next === start && path11.length > 1) {
10521
+ path11.push(start);
10169
10522
  return true;
10170
10523
  }
10171
10524
  if (visited.has(next)) {
10172
10525
  continue;
10173
10526
  }
10174
10527
  visited.add(next);
10175
- path10.push(next);
10528
+ path11.push(next);
10176
10529
  if (search(next)) {
10177
10530
  return true;
10178
10531
  }
10179
- path10.pop();
10532
+ path11.pop();
10180
10533
  visited.delete(next);
10181
10534
  }
10182
10535
  return false;
10183
10536
  };
10184
10537
  if (search(start)) {
10185
- return [...path10];
10538
+ return [...path11];
10186
10539
  }
10187
10540
  return [...component, start];
10188
10541
  }
@@ -10440,12 +10793,12 @@ function linkedArtifactPathExceedsFilesystemLimits(artifactPath) {
10440
10793
  return normalized.length > LINKED_ARTIFACT_MAX_PATH_LENGTH || normalized.split(/[\\/]/).some((segment) => segment.length > LINKED_ARTIFACT_MAX_SEGMENT_LENGTH);
10441
10794
  }
10442
10795
  async function linkedArtifactIsMissing(workspaceRoot, artifactPath) {
10443
- const absolutePath = path9.isAbsolute(artifactPath) ? artifactPath : path9.resolve(workspaceRoot, artifactPath);
10796
+ const absolutePath = path10.isAbsolute(artifactPath) ? artifactPath : path10.resolve(workspaceRoot, artifactPath);
10444
10797
  if (linkedArtifactPathExceedsFilesystemLimits(absolutePath)) {
10445
10798
  return false;
10446
10799
  }
10447
10800
  try {
10448
- const stats = await fs8.stat(absolutePath);
10801
+ const stats = await fs9.stat(absolutePath);
10449
10802
  return !stats.isFile() && !stats.isDirectory();
10450
10803
  } catch (error) {
10451
10804
  const code = typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
@@ -10819,7 +11172,7 @@ function buildFormatVersionCheck(items, verboseDiagnostics) {
10819
11172
  };
10820
11173
  }
10821
11174
  var VALIDATE_AUTO_FIX_MESSAGE = "pm validate auto-fix";
10822
- async function applyValidateFix(fix, global2) {
11175
+ async function applyValidateFix(fix, global2, services) {
10823
11176
  switch (fix.kind) {
10824
11177
  case "set_resolution":
10825
11178
  case "set_close_reason":
@@ -10840,7 +11193,10 @@ async function applyValidateFix(fix, global2) {
10840
11193
  } else {
10841
11194
  updateOptions.unset = ["parent"];
10842
11195
  }
10843
- await runUpdate(fix.item_id, updateOptions, global2);
11196
+ if (!services.runUpdate) {
11197
+ throw new PmCliError("Applying validate metadata/lifecycle fixes requires a runUpdate mutation service.", EXIT_CODE.USAGE);
11198
+ }
11199
+ await services.runUpdate(fix.item_id, updateOptions, global2);
10844
11200
  return;
10845
11201
  }
10846
11202
  case "prune_file_link": {
@@ -10857,7 +11213,7 @@ function pruneBatchKey(fix) {
10857
11213
  }
10858
11214
  return `${fix.kind}:${fix.item_id}`;
10859
11215
  }
10860
- async function applyValidateFixes(applicable, global2) {
11216
+ async function applyValidateFixes(applicable, global2, services) {
10861
11217
  const applied = [];
10862
11218
  const failed = [];
10863
11219
  const pruneBatches = /* @__PURE__ */ new Map();
@@ -10865,7 +11221,7 @@ async function applyValidateFixes(applicable, global2) {
10865
11221
  const batchKey = pruneBatchKey(fix);
10866
11222
  if (batchKey === null) {
10867
11223
  try {
10868
- await applyValidateFix(fix, global2);
11224
+ await applyValidateFix(fix, global2, services);
10869
11225
  applied.push(fix);
10870
11226
  } catch (error) {
10871
11227
  failed.push({ fix, error });
@@ -10898,6 +11254,44 @@ async function applyValidateFixes(applicable, global2) {
10898
11254
  }
10899
11255
  return { applied, failed };
10900
11256
  }
11257
+ var _testOnlyValidateCommand = {
11258
+ applyValidateFix,
11259
+ applyValidateFixes,
11260
+ attachValidateFixHints,
11261
+ buildCommandReferencesCheck,
11262
+ buildDependencyReferencesCheck,
11263
+ buildCloseReasonBackfillRows,
11264
+ buildFilesCheck,
11265
+ buildLifecycleCheck,
11266
+ buildLifecycleDependencyGraph,
11267
+ buildLifecycleParentGraph,
11268
+ buildEstimateBackfillRows,
11269
+ buildMetadataCounts,
11270
+ buildMissingFieldOccurrences,
11271
+ buildOrphanedPathRows,
11272
+ classifyOrphanedPath,
11273
+ collectDefaultProjectFileCandidates,
11274
+ collectTrackedGitFileCandidates,
11275
+ detectLifecycleDependencyCycles,
11276
+ detectLifecycleParentCycles,
11277
+ escapeRegExp,
11278
+ extractItemIds,
11279
+ findLifecycleDependencyCycleComponents,
11280
+ isMetadataFieldMissing,
11281
+ linkedArtifactPathExceedsFilesystemLimits,
11282
+ listFilesRecursive,
11283
+ resolveDependencyCycleSeverity,
11284
+ resolveParentCycleSeverity,
11285
+ resolveFileScanMode,
11286
+ resolveLifecycleDependencyCycleSamplePath,
11287
+ resolveRequestedChecks,
11288
+ resolveValidateMetadataProfile,
11289
+ resolveWorkspaceRoot,
11290
+ sharedDirectoryPrefixLength,
11291
+ summarizeOrphanedPathRows,
11292
+ summarizeDuplicateIssueCodes,
11293
+ toMeaningfulString
11294
+ };
10901
11295
  function recordValidateCheck(state, built, fixHintsEnabled) {
10902
11296
  if (fixHintsEnabled) {
10903
11297
  attachValidateFixHints(built.check, built.warnings);
@@ -10963,7 +11357,7 @@ function planValidateFixes(options, state, settings) {
10963
11357
  }
10964
11358
  return planned;
10965
11359
  }
10966
- async function buildValidateFixesSummary(options, state, settings, grantedFixScopes, global2) {
11360
+ async function buildValidateFixesSummary(options, state, settings, grantedFixScopes, global2, services) {
10967
11361
  if (options.autoFix !== true && options.pruneMissing !== true) {
10968
11362
  return void 0;
10969
11363
  }
@@ -10973,7 +11367,7 @@ async function buildValidateFixesSummary(options, state, settings, grantedFixSco
10973
11367
  const appliedFixRows = [];
10974
11368
  const failedFixRows = [];
10975
11369
  if (!dryRun) {
10976
- const applied = await applyValidateFixes(applicable, global2);
11370
+ const applied = await applyValidateFixes(applicable, global2, services);
10977
11371
  appliedFixRows.push(...applied.applied.map(toFixOutputRow));
10978
11372
  failedFixRows.push(...applied.failed.map(({ fix, error }) => ({
10979
11373
  ...toFixOutputRow(fix),
@@ -10998,7 +11392,7 @@ async function buildValidateFixesSummary(options, state, settings, grantedFixSco
10998
11392
  failed_fixes: failedFixRows
10999
11393
  };
11000
11394
  }
11001
- async function runValidate(options, global2) {
11395
+ async function runValidate(options, global2, services = {}) {
11002
11396
  const fixesRequested = options.autoFix === true || options.pruneMissing === true;
11003
11397
  if (options.dryRun === true && !fixesRequested) {
11004
11398
  throw new PmCliError("--dry-run requires --auto-fix or --prune-missing (there is nothing to preview otherwise).", EXIT_CODE.USAGE);
@@ -11017,6 +11411,12 @@ async function runValidate(options, global2) {
11017
11411
  const itemReadWarnings = [];
11018
11412
  const items = await listAllItemMetadataWithBody(pmRoot, settings.item_format, typeRegistry.type_to_folder, itemReadWarnings, settings.schema);
11019
11413
  const requestedChecks = resolveRequestedChecks(options);
11414
+ if (requestedChecks.has("history_drift")) {
11415
+ const authorAttribution = await scanHistoryAuthorAttribution(pmRoot);
11416
+ if (authorAttribution.actionable_unknown_event_count > 0) {
11417
+ itemReadWarnings.push(`validate_history_unknown_author_events:${authorAttribution.actionable_unknown_event_count}`);
11418
+ }
11419
+ }
11020
11420
  const metadataProfileSource = typeof options.metadataProfile === "string" ? "option" : "settings";
11021
11421
  const metadataProfile = resolveValidateMetadataProfile(typeof options.metadataProfile === "string" ? options.metadataProfile : settings.validation.metadata_profile);
11022
11422
  const metadataPolicy = resolveValidateMetadataPolicy(metadataProfile, metadataProfileSource, settings.validation.metadata_required_fields);
@@ -11041,7 +11441,7 @@ async function runValidate(options, global2) {
11041
11441
  fileScanMode,
11042
11442
  initialWarnings: [...new Set(itemReadWarnings)]
11043
11443
  });
11044
- const fixes = fixesRequested ? await buildValidateFixesSummary(options, state, settings, grantedFixScopes, global2) : void 0;
11444
+ const fixes = fixesRequested ? await buildValidateFixesSummary(options, state, settings, grantedFixScopes, global2, services) : void 0;
11045
11445
  const normalizedWarnings = [...new Set(state.warnings)].sort((left, right) => left.localeCompare(right));
11046
11446
  const hasErrors = state.checks.some((check) => check.status === "error");
11047
11447
  return {
@@ -11054,6 +11454,18 @@ async function runValidate(options, global2) {
11054
11454
  };
11055
11455
  }
11056
11456
 
11457
+ // dist/cli/commands/validate.js
11458
+ !(function() {
11459
+ try {
11460
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
11461
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "205e06c5-a6c9-5ac3-8d4a-13b3f76bb3b1");
11462
+ } catch (e2) {
11463
+ }
11464
+ })();
11465
+ var runValidate2 = (options, global2) => runValidate(options, global2, {
11466
+ runUpdate: (id, updateOptions, updateGlobal) => runUpdate(id, updateOptions, updateGlobal)
11467
+ });
11468
+
11057
11469
  export {
11058
11470
  resolveStartTaskInProgressStatus,
11059
11471
  runClaim,
@@ -11061,7 +11473,10 @@ export {
11061
11473
  runRelease,
11062
11474
  runContracts,
11063
11475
  runGc,
11476
+ inspectHistoryAuthorStream,
11477
+ scanHistoryAuthorAttribution,
11064
11478
  runHealth,
11479
+ _testOnlyHealthCommand,
11065
11480
  runMeet,
11066
11481
  runEvent,
11067
11482
  runRemind,
@@ -11076,6 +11491,8 @@ export {
11076
11491
  runTestRunsStop,
11077
11492
  runTestRunsResume,
11078
11493
  runTestRunsWorker,
11079
- runValidate
11494
+ _testOnlyValidateCommand,
11495
+ runValidate,
11496
+ runValidate2
11080
11497
  };
11081
- //# sourceMappingURL=chunk-IGED7NH2.js.map
11498
+ //# sourceMappingURL=chunk-ILX33QXL.js.map