@unbrained/pm-cli 2026.6.22 → 2026.6.24

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 (425) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/cli/commands/completion.js +5 -4
  3. package/dist/cli/commands/completion.js.map +1 -1
  4. package/dist/cli/commands/contracts.js +4 -3
  5. package/dist/cli/commands/contracts.js.map +1 -1
  6. package/dist/cli/commands/extension/describe.d.ts +70 -0
  7. package/dist/cli/commands/extension/describe.js +76 -0
  8. package/dist/cli/commands/extension/describe.js.map +1 -0
  9. package/dist/cli/commands/extension/scaffold.js +183 -47
  10. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  11. package/dist/cli/commands/extension.d.ts +2 -1
  12. package/dist/cli/commands/extension.js +36 -4
  13. package/dist/cli/commands/extension.js.map +1 -1
  14. package/dist/cli/help-content.js +6 -2
  15. package/dist/cli/help-content.js.map +1 -1
  16. package/dist/cli/register-setup.js +10 -2
  17. package/dist/cli/register-setup.js.map +1 -1
  18. package/dist/cli-bundle/chunks/activity-54TXGJ2T.js +18 -0
  19. package/dist/cli-bundle/chunks/{activity-DXS2XMQU.js → activity-N7RVTLBQ.js} +11 -11
  20. package/dist/cli-bundle/chunks/{aggregate-IHM4KMQ3.js → aggregate-63NWNIBR.js} +10 -10
  21. package/dist/cli-bundle/chunks/{aggregate-NMYDVQF7.js → aggregate-YHCYX2EV.js} +10 -10
  22. package/dist/cli-bundle/chunks/{append-3HY5G7ET.js → append-PUKREFV5.js} +8 -8
  23. package/dist/cli-bundle/chunks/{append-K54MDQYC.js → append-VLQQDHMJ.js} +8 -8
  24. package/dist/cli-bundle/chunks/{chunk-DU64SZUQ.js → chunk-2WCYE3IF.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-NKZOJPXK.js → chunk-3BKH2CL3.js} +3 -3
  26. package/dist/cli-bundle/chunks/{chunk-7MALIV5H.js → chunk-4XDGYFHL.js} +9 -9
  27. package/dist/cli-bundle/chunks/{chunk-VB54F347.js → chunk-5BBEWX6C.js} +2 -2
  28. package/dist/cli-bundle/chunks/{chunk-DHBPJ7VG.js → chunk-5S4ZGDB2.js} +2 -2
  29. package/dist/cli-bundle/chunks/{chunk-UKK2VTTH.js → chunk-6EBNFQOR.js} +9 -9
  30. package/dist/cli-bundle/chunks/{chunk-5SESR24H.js → chunk-6EL7SW5C.js} +8 -8
  31. package/dist/cli-bundle/chunks/{chunk-JLSC5NPC.js → chunk-6W3Y65PL.js} +10 -10
  32. package/dist/cli-bundle/chunks/{chunk-HYQV75IB.js → chunk-A66VYUOV.js} +7 -7
  33. package/dist/cli-bundle/chunks/{chunk-I367IDZP.js → chunk-ABYCA5VX.js} +7 -7
  34. package/dist/cli-bundle/chunks/{chunk-47HTJ6BU.js → chunk-AEACLRVH.js} +5 -5
  35. package/dist/cli-bundle/chunks/{chunk-MD7XKVWI.js → chunk-ALKFCIIB.js} +7 -7
  36. package/dist/cli-bundle/chunks/{chunk-B2KR24R4.js → chunk-ALQKV6U7.js} +9 -9
  37. package/dist/cli-bundle/chunks/{chunk-NIWY4V4Z.js → chunk-AYPQUFCX.js} +3 -3
  38. package/dist/cli-bundle/chunks/{chunk-AJXYOYJV.js → chunk-B74BP6IS.js} +2 -2
  39. package/dist/cli-bundle/chunks/{chunk-THKDPOS5.js → chunk-BFFO3AIB.js} +8 -8
  40. package/dist/cli-bundle/chunks/{chunk-CR7KFPAQ.js → chunk-C4C3EJCJ.js} +3 -3
  41. package/dist/cli-bundle/chunks/{chunk-J2TSPY5L.js → chunk-CG3KP6I5.js} +4 -4
  42. package/dist/cli-bundle/chunks/{chunk-CWPBGUC7.js → chunk-CZIFFMZI.js} +2 -2
  43. package/dist/cli-bundle/chunks/{chunk-75VEYQJS.js → chunk-DTABLLVE.js} +3 -3
  44. package/dist/cli-bundle/chunks/{chunk-TIKJAXQW.js → chunk-EOGBMLCE.js} +3 -3
  45. package/dist/cli-bundle/chunks/{chunk-YATDFWYK.js → chunk-EWRSXOIZ.js} +7 -7
  46. package/dist/cli-bundle/chunks/{chunk-RZZMSY4P.js → chunk-EYPINTFR.js} +151 -98
  47. package/dist/cli-bundle/chunks/chunk-EYPINTFR.js.map +7 -0
  48. package/dist/cli-bundle/chunks/{chunk-RPRFBXND.js → chunk-F32L4HR6.js} +3 -3
  49. package/dist/cli-bundle/chunks/{chunk-NVUATMTC.js → chunk-F4BNR2IN.js} +3 -3
  50. package/dist/cli-bundle/chunks/{chunk-Y4BZEND6.js → chunk-FBLT6WGK.js} +2 -2
  51. package/dist/cli-bundle/chunks/{chunk-PCH2JTEO.js → chunk-FMWW2JDU.js} +2 -2
  52. package/dist/cli-bundle/chunks/{chunk-WQDX7DVG.js → chunk-GDUMGZK3.js} +7 -7
  53. package/dist/cli-bundle/chunks/{chunk-KBTREGVO.js → chunk-GQYJEEFX.js} +8 -5
  54. package/dist/cli-bundle/chunks/{chunk-KBTREGVO.js.map → chunk-GQYJEEFX.js.map} +1 -1
  55. package/dist/cli-bundle/chunks/{chunk-FK6MV5F5.js → chunk-HBAEFWX3.js} +12 -12
  56. package/dist/cli-bundle/chunks/{chunk-6UPTNMVW.js → chunk-HC2S36NB.js} +5 -5
  57. package/dist/cli-bundle/chunks/{chunk-XKNF3VRJ.js → chunk-HZF5RLKX.js} +5 -5
  58. package/dist/cli-bundle/chunks/{chunk-4JXWVHMN.js → chunk-I6QMJ2XT.js} +2 -2
  59. package/dist/cli-bundle/chunks/{chunk-44O4JIN6.js → chunk-IAP5KYBQ.js} +13 -13
  60. package/dist/cli-bundle/chunks/{chunk-4YJA4LGU.js → chunk-INPHFO33.js} +160 -42
  61. package/dist/cli-bundle/chunks/chunk-INPHFO33.js.map +7 -0
  62. package/dist/cli-bundle/chunks/{chunk-A7E4ZXG2.js → chunk-IOT6WRL5.js} +2 -2
  63. package/dist/cli-bundle/chunks/{chunk-KRJJPDUO.js → chunk-IXAZI443.js} +2 -2
  64. package/dist/cli-bundle/chunks/{chunk-DMT4ODVN.js → chunk-J3NMWFIN.js} +2 -2
  65. package/dist/cli-bundle/chunks/{chunk-7PBGTIN3.js → chunk-J7I4C5ZB.js} +5 -5
  66. package/dist/cli-bundle/chunks/{chunk-7GCCDXXN.js → chunk-JKL6HRMV.js} +123 -8
  67. package/dist/cli-bundle/chunks/chunk-JKL6HRMV.js.map +7 -0
  68. package/dist/cli-bundle/chunks/{chunk-CLLVBO3I.js → chunk-JPJDP4VU.js} +2 -2
  69. package/dist/cli-bundle/chunks/{chunk-PJS2J7Z4.js → chunk-JV27C7OZ.js} +3 -3
  70. package/dist/cli-bundle/chunks/{chunk-K25UDYJ4.js → chunk-KIEAK7YE.js} +2 -2
  71. package/dist/cli-bundle/chunks/{chunk-GGAXE22C.js → chunk-KJZOSF7J.js} +6 -6
  72. package/dist/cli-bundle/chunks/{chunk-GXBSFKSX.js → chunk-KKX4Z2SE.js} +4 -4
  73. package/dist/cli-bundle/chunks/{chunk-D35LTIFR.js → chunk-L7UXKP2I.js} +110 -9
  74. package/dist/cli-bundle/chunks/chunk-L7UXKP2I.js.map +1 -0
  75. package/dist/cli-bundle/chunks/{chunk-C5SWTISA.js → chunk-LNEDHJNQ.js} +12 -12
  76. package/dist/cli-bundle/chunks/{chunk-YRLLL5TY.js → chunk-LU36E6GU.js} +8 -8
  77. package/dist/cli-bundle/chunks/{chunk-I6XE47J2.js → chunk-M6TUBOGW.js} +5 -5
  78. package/dist/cli-bundle/chunks/{chunk-DBQUQ3AS.js → chunk-MEXZ5XUM.js} +7 -4
  79. package/dist/cli-bundle/chunks/{chunk-DBQUQ3AS.js.map → chunk-MEXZ5XUM.js.map} +2 -2
  80. package/dist/cli-bundle/chunks/{chunk-YJICYNAV.js → chunk-MWMHZOZZ.js} +8 -8
  81. package/dist/cli-bundle/chunks/{chunk-SFKQAVZA.js → chunk-N5B6WZC5.js} +8 -8
  82. package/dist/cli-bundle/chunks/{chunk-3GL6LTUL.js → chunk-NJ73ALW2.js} +161 -43
  83. package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js.map +1 -0
  84. package/dist/cli-bundle/chunks/{chunk-WBSYW3NT.js → chunk-NVXGVEFD.js} +2 -2
  85. package/dist/cli-bundle/chunks/{chunk-7MPTFYT3.js → chunk-OF7V47P3.js} +15 -4
  86. package/dist/cli-bundle/chunks/chunk-OF7V47P3.js.map +1 -0
  87. package/dist/cli-bundle/chunks/{chunk-GNDHOR64.js → chunk-OHDQNKJB.js} +6 -6
  88. package/dist/cli-bundle/chunks/{chunk-2LEYMXI6.js → chunk-OQ2E64FH.js} +4 -4
  89. package/dist/cli-bundle/chunks/{chunk-25XZN3JD.js → chunk-PEL2NLQE.js} +2 -2
  90. package/dist/cli-bundle/chunks/{chunk-H6FNDCDI.js → chunk-PRVTGX64.js} +5 -5
  91. package/dist/cli-bundle/chunks/{chunk-TZQKEBKF.js → chunk-QOUOMPHO.js} +2 -2
  92. package/dist/cli-bundle/chunks/{chunk-77VKGH4L.js → chunk-RAWA3Y7O.js} +10 -10
  93. package/dist/cli-bundle/chunks/{chunk-Y335KFHD.js → chunk-RRP6D345.js} +9 -9
  94. package/dist/cli-bundle/chunks/{chunk-4SDKF5BG.js → chunk-SKC4UTRP.js} +3 -3
  95. package/dist/cli-bundle/chunks/{chunk-TRUFOER3.js → chunk-SMXSDY7J.js} +15 -4
  96. package/dist/cli-bundle/chunks/chunk-SMXSDY7J.js.map +7 -0
  97. package/dist/cli-bundle/chunks/{chunk-JY25IOEZ.js → chunk-SUREE24M.js} +5 -5
  98. package/dist/cli-bundle/chunks/{chunk-A25LOPRG.js → chunk-TIM4OD74.js} +2 -2
  99. package/dist/cli-bundle/chunks/{chunk-KK4TQ3ZP.js → chunk-TKPP4GOO.js} +2 -2
  100. package/dist/cli-bundle/chunks/{chunk-6FQHNHQQ.js → chunk-TSI32UEL.js} +3 -3
  101. package/dist/cli-bundle/chunks/{chunk-TJABI6PR.js → chunk-UACWNBL2.js} +5 -5
  102. package/dist/cli-bundle/chunks/{chunk-EVPVCE4R.js → chunk-V4UYNSEM.js} +3 -3
  103. package/dist/cli-bundle/chunks/{chunk-QQWEROGS.js → chunk-VFJYVXHL.js} +7 -7
  104. package/dist/cli-bundle/chunks/{chunk-KL5ELX2X.js → chunk-VSAABFGQ.js} +144 -98
  105. package/dist/cli-bundle/chunks/chunk-VSAABFGQ.js.map +1 -0
  106. package/dist/cli-bundle/chunks/{chunk-YQSWTVZF.js → chunk-WB5BYQMF.js} +4 -4
  107. package/dist/cli-bundle/chunks/{chunk-MNGAQB2E.js → chunk-XVYKWZNL.js} +8 -8
  108. package/dist/cli-bundle/chunks/{chunk-V4SM4UAL.js → chunk-XXKV4UWE.js} +13 -13
  109. package/dist/cli-bundle/chunks/{chunk-GU7YHKYP.js → chunk-YV2OSAMS.js} +2 -2
  110. package/dist/cli-bundle/chunks/{chunk-P7ZU73BO.js → chunk-ZLWRPBOW.js} +3 -3
  111. package/dist/cli-bundle/chunks/{chunk-3VLPDG3J.js → chunk-ZV7IQ23N.js} +2 -2
  112. package/dist/cli-bundle/chunks/{claim-MPXNVBZQ.js → claim-FZZZCAY6.js} +10 -10
  113. package/dist/cli-bundle/chunks/{claim-SKHJDLW6.js → claim-XK5QBZE3.js} +10 -10
  114. package/dist/cli-bundle/chunks/close-JEBZXONN.js +15 -0
  115. package/dist/cli-bundle/chunks/{close-4RKSL5L6.js → close-QHMVWM7M.js} +8 -8
  116. package/dist/cli-bundle/chunks/{close-many-SXODYBDP.js → close-many-OIXJE2JZ.js} +15 -15
  117. package/dist/cli-bundle/chunks/{close-many-AWTPXLHJ.js → close-many-SUU5BS2C.js} +15 -15
  118. package/dist/cli-bundle/chunks/{comments-YYW5P7AG.js → comments-5YM62D75.js} +10 -10
  119. package/dist/cli-bundle/chunks/{comments-OOH64LWW.js → comments-RH3IBIRH.js} +10 -10
  120. package/dist/cli-bundle/chunks/{config-3445MCQQ.js → config-NCNNWF6R.js} +8 -8
  121. package/dist/cli-bundle/chunks/{config-LCDMKRB2.js → config-SW3U7XP2.js} +8 -8
  122. package/dist/cli-bundle/chunks/{context-PJCURODY.js → context-55VEOYI3.js} +13 -13
  123. package/dist/cli-bundle/chunks/{context-DZMIBIVP.js → context-5LB7UGKE.js} +13 -13
  124. package/dist/cli-bundle/chunks/{contracts-MP2P3HL5.js → contracts-JXFGBOYT.js} +8 -6
  125. package/dist/cli-bundle/chunks/contracts-JXFGBOYT.js.map +1 -0
  126. package/dist/cli-bundle/chunks/{contracts-7YDFEJB3.js → contracts-SY6PDFIK.js} +7 -5
  127. package/dist/cli-bundle/chunks/contracts-SY6PDFIK.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{copy-63IQQRRS.js → copy-IEDBJOOX.js} +7 -7
  129. package/dist/cli-bundle/chunks/{copy-TASIH2AZ.js → copy-N3GE6FYS.js} +7 -7
  130. package/dist/cli-bundle/chunks/create-CLSCHGJJ.js +30 -0
  131. package/dist/cli-bundle/chunks/{create-TGSB5GV4.js → create-O4VONGPG.js} +14 -14
  132. package/dist/cli-bundle/chunks/{delete-ARILQQLB.js → delete-724EQ6OS.js} +7 -7
  133. package/dist/cli-bundle/chunks/{delete-ZQKBZYNK.js → delete-LPEIF7RU.js} +7 -7
  134. package/dist/cli-bundle/chunks/{deps-MSHQR2GY.js → deps-RSBU4SIU.js} +7 -7
  135. package/dist/cli-bundle/chunks/{deps-NJFJIMQ5.js → deps-T3Y6Y7RT.js} +7 -7
  136. package/dist/cli-bundle/chunks/{docs-XK2UVUXX.js → docs-75ZLCO3G.js} +9 -9
  137. package/dist/cli-bundle/chunks/{docs-SS4UKYYA.js → docs-IFS7HZPP.js} +9 -9
  138. package/dist/cli-bundle/chunks/{eval-JOTG2YHU.js → eval-L2KD7W3M.js} +12 -12
  139. package/dist/cli-bundle/chunks/{eval-FVZGX5IZ.js → eval-QGR7JCQO.js} +12 -12
  140. package/dist/cli-bundle/chunks/{extension-OQPS27B4.js → extension-3JYWJ5K2.js} +6 -6
  141. package/dist/cli-bundle/chunks/{extension-NLMS47I4.js → extension-YQF4CPIR.js} +6 -6
  142. package/dist/cli-bundle/chunks/{files-Y2P6LN5A.js → files-5BQWDRDT.js} +9 -9
  143. package/dist/cli-bundle/chunks/{files-3EVJQZ2N.js → files-EPEJMJHQ.js} +9 -9
  144. package/dist/cli-bundle/chunks/{focus-D5ZUPTII.js → focus-DQVJAPOE.js} +8 -8
  145. package/dist/cli-bundle/chunks/{focus-ZPIFTY4R.js → focus-RWGKD76E.js} +8 -8
  146. package/dist/cli-bundle/chunks/{gc-LXXDY456.js → gc-BEJMQT64.js} +3 -3
  147. package/dist/cli-bundle/chunks/{gc-RNOEQHSX.js → gc-JEFQDJPA.js} +3 -3
  148. package/dist/cli-bundle/chunks/{get-W23G7MJX.js → get-LQG6PEVG.js} +11 -11
  149. package/dist/cli-bundle/chunks/{get-Q3SZGQHD.js → get-WVN75H42.js} +11 -11
  150. package/dist/cli-bundle/chunks/{health-UDDGJLPP.js → health-JJJOY7DJ.js} +14 -14
  151. package/dist/cli-bundle/chunks/{health-5LHSX365.js → health-P67NZ6TT.js} +14 -14
  152. package/dist/cli-bundle/chunks/history-ALTM2RRP.js +20 -0
  153. package/dist/cli-bundle/chunks/{history-6CZVFIUJ.js → history-RUKPKNY7.js} +10 -10
  154. package/dist/cli-bundle/chunks/{history-compact-VWUSQH6Z.js → history-compact-NQ7VPRVT.js} +12 -12
  155. package/dist/cli-bundle/chunks/{history-compact-M35PDQ4G.js → history-compact-ZAOWR7GD.js} +12 -12
  156. package/dist/cli-bundle/chunks/history-redact-5YGLWUDH.js +21 -0
  157. package/dist/cli-bundle/chunks/{history-redact-AJGARHT3.js → history-redact-YY4XYVEP.js} +11 -11
  158. package/dist/cli-bundle/chunks/{history-repair-YUAHIPIN.js → history-repair-EHL4ODQY.js} +12 -12
  159. package/dist/cli-bundle/chunks/{history-repair-5RDMF7K4.js → history-repair-YSQH6SY6.js} +12 -12
  160. package/dist/cli-bundle/chunks/init-C4CRHW22.js +21 -0
  161. package/dist/cli-bundle/chunks/{init-HASX3YNJ.js → init-HBFGYS66.js} +11 -11
  162. package/dist/cli-bundle/chunks/{learnings-JNGUIJDK.js → learnings-J555ZFPD.js} +10 -10
  163. package/dist/cli-bundle/chunks/{learnings-M4KA6MQE.js → learnings-KFQO7GEZ.js} +10 -10
  164. package/dist/cli-bundle/chunks/{list-6FMKTIH3.js → list-C7R33MD5.js} +10 -10
  165. package/dist/cli-bundle/chunks/{list-5UU2W24O.js → list-DSN6UNFB.js} +10 -10
  166. package/dist/cli-bundle/chunks/{notes-PYCPLA5Y.js → notes-V4VNIQL4.js} +10 -10
  167. package/dist/cli-bundle/chunks/{notes-MODH5CBT.js → notes-VYJFN2A3.js} +10 -10
  168. package/dist/cli-bundle/chunks/{plan-DXRIRYRU.js → plan-DHRSVSHR.js} +14 -14
  169. package/dist/cli-bundle/chunks/{plan-EHQALWSC.js → plan-RBHQ5PO7.js} +14 -14
  170. package/dist/cli-bundle/chunks/{register-list-query-QAASVP2J.js → register-list-query-CCMHGZTF.js} +19 -19
  171. package/dist/cli-bundle/chunks/{register-list-query-WE54YJMH.js → register-list-query-OM3E2KMY.js} +19 -19
  172. package/dist/cli-bundle/chunks/{register-mutation-B6DZJTY2.js → register-mutation-N3CDEGZU.js} +33 -33
  173. package/dist/cli-bundle/chunks/{register-mutation-CPV4C2KR.js → register-mutation-UXTTWL6N.js} +33 -33
  174. package/dist/cli-bundle/chunks/{register-operations-RC4C3423.js → register-operations-R2FLOCRI.js} +32 -32
  175. package/dist/cli-bundle/chunks/{register-operations-AT3BVVX2.js → register-operations-UDIFMQKD.js} +32 -32
  176. package/dist/cli-bundle/chunks/{register-setup-JSMJEFCJ.js → register-setup-G5LTSFYK.js} +24 -20
  177. package/dist/cli-bundle/chunks/register-setup-G5LTSFYK.js.map +1 -0
  178. package/dist/cli-bundle/chunks/{register-setup-HXEHMDHE.js → register-setup-TWHKICM2.js} +23 -19
  179. package/dist/cli-bundle/chunks/register-setup-TWHKICM2.js.map +7 -0
  180. package/dist/cli-bundle/chunks/{restore-FNBV4GWE.js → restore-LL2WLEDG.js} +11 -11
  181. package/dist/cli-bundle/chunks/restore-LQHXBAY5.js +19 -0
  182. package/dist/cli-bundle/chunks/{scheduling-shortcuts-ECL6GBMZ.js → scheduling-shortcuts-255GI3BU.js} +14 -14
  183. package/dist/cli-bundle/chunks/{scheduling-shortcuts-JRIUREEU.js → scheduling-shortcuts-M4H2ZI64.js} +14 -14
  184. package/dist/cli-bundle/chunks/{schema-74YENAJL.js → schema-C6QA367T.js} +9 -9
  185. package/dist/cli-bundle/chunks/{schema-TCW3I7QR.js → schema-QO5I4FBL.js} +9 -9
  186. package/dist/cli-bundle/chunks/{search-7USZ6XZA.js → search-2EI6EAXH.js} +12 -12
  187. package/dist/cli-bundle/chunks/{search-GNAUE65M.js → search-QBFBLQRO.js} +12 -12
  188. package/dist/cli-bundle/chunks/{stats-CVHASAEU.js → stats-TCW2SZQG.js} +8 -8
  189. package/dist/cli-bundle/chunks/{stats-DQMKJMFT.js → stats-TKC6CAKB.js} +8 -8
  190. package/dist/cli-bundle/chunks/{telemetry-PQTL5YS2.js → telemetry-BT2VSWU2.js} +4 -4
  191. package/dist/cli-bundle/chunks/{telemetry-7P5EUWCS.js → telemetry-LQ6FRTUT.js} +4 -4
  192. package/dist/cli-bundle/chunks/{test-FDQZQNZ4.js → test-NV2DRPUS.js} +16 -16
  193. package/dist/cli-bundle/chunks/test-WA6RZGM2.js +36 -0
  194. package/dist/cli-bundle/chunks/{test-all-PIPPS4S5.js → test-all-DZ76VTPQ.js} +16 -16
  195. package/dist/cli-bundle/chunks/{test-all-WQIAZVA6.js → test-all-REW67LXT.js} +16 -16
  196. package/dist/cli-bundle/chunks/{test-runs-JS6DNCCI.js → test-runs-FQ5WNQLP.js} +5 -5
  197. package/dist/cli-bundle/chunks/{test-runs-NZD2QGL5.js → test-runs-PX73DMMI.js} +5 -5
  198. package/dist/cli-bundle/chunks/update-BSKMQOYH.js +28 -0
  199. package/dist/cli-bundle/chunks/update-FIGYNQ2I.js +24 -0
  200. package/dist/cli-bundle/chunks/{update-many-B3TH5TDS.js → update-many-2ILP6E4Y.js} +23 -23
  201. package/dist/cli-bundle/chunks/{update-many-6NTZ5J5D.js → update-many-Q5ZEI64S.js} +23 -23
  202. package/dist/cli-bundle/chunks/{upgrade-76IKZ6EZ.js → upgrade-DHL74PQH.js} +6 -6
  203. package/dist/cli-bundle/chunks/{upgrade-4C7VE7MS.js → upgrade-FOZKQTQF.js} +6 -6
  204. package/dist/cli-bundle/chunks/{validate-BPM6Z3OT.js → validate-54SYJ7QW.js} +21 -21
  205. package/dist/cli-bundle/chunks/{validate-AQU7OCL3.js → validate-HYZNIB6W.js} +21 -21
  206. package/dist/cli-bundle/main.js +22 -18
  207. package/dist/cli-bundle/main.js.map +2 -2
  208. package/dist/core/extensions/activation-summary.d.ts +109 -0
  209. package/dist/core/extensions/activation-summary.js +60 -0
  210. package/dist/core/extensions/activation-summary.js.map +1 -0
  211. package/dist/core/extensions/capability-usage.d.ts +10 -0
  212. package/dist/core/extensions/capability-usage.js +12 -3
  213. package/dist/core/extensions/capability-usage.js.map +1 -1
  214. package/dist/core/extensions/loader.d.ts +1 -2
  215. package/dist/core/extensions/loader.js +40 -103
  216. package/dist/core/extensions/loader.js.map +1 -1
  217. package/dist/core/extensions/version-compat.d.ts +107 -0
  218. package/dist/core/extensions/version-compat.js +130 -0
  219. package/dist/core/extensions/version-compat.js.map +1 -0
  220. package/dist/core/telemetry/runtime.js +5 -2
  221. package/dist/core/telemetry/runtime.js.map +1 -1
  222. package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
  223. package/dist/sdk/cli-contracts/enum-contracts.js +4 -2
  224. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  225. package/dist/sdk/cli-contracts.d.ts +1 -0
  226. package/dist/sdk/cli-contracts.js +10 -2
  227. package/dist/sdk/cli-contracts.js.map +1 -1
  228. package/dist/sdk/compose.d.ts +636 -0
  229. package/dist/sdk/compose.js +841 -0
  230. package/dist/sdk/compose.js.map +1 -0
  231. package/dist/sdk/define.d.ts +195 -0
  232. package/dist/sdk/define.js +204 -0
  233. package/dist/sdk/define.js.map +1 -0
  234. package/dist/sdk/index.d.ts +4 -27
  235. package/dist/sdk/index.js +5 -12
  236. package/dist/sdk/index.js.map +1 -1
  237. package/dist/sdk/testing.d.ts +221 -2
  238. package/dist/sdk/testing.js +276 -2
  239. package/dist/sdk/testing.js.map +1 -1
  240. package/docs/COMMANDS.md +1 -0
  241. package/docs/EXTENSIONS.md +18 -14
  242. package/docs/SDK.md +445 -16
  243. package/package.json +1 -1
  244. package/dist/cli-bundle/chunks/activity-NEOI45NX.js +0 -18
  245. package/dist/cli-bundle/chunks/chunk-3GL6LTUL.js.map +0 -1
  246. package/dist/cli-bundle/chunks/chunk-4YJA4LGU.js.map +0 -7
  247. package/dist/cli-bundle/chunks/chunk-7GCCDXXN.js.map +0 -7
  248. package/dist/cli-bundle/chunks/chunk-7MPTFYT3.js.map +0 -1
  249. package/dist/cli-bundle/chunks/chunk-D35LTIFR.js.map +0 -1
  250. package/dist/cli-bundle/chunks/chunk-KL5ELX2X.js.map +0 -1
  251. package/dist/cli-bundle/chunks/chunk-RZZMSY4P.js.map +0 -7
  252. package/dist/cli-bundle/chunks/chunk-TRUFOER3.js.map +0 -7
  253. package/dist/cli-bundle/chunks/close-Z6AI736U.js +0 -15
  254. package/dist/cli-bundle/chunks/contracts-7YDFEJB3.js.map +0 -7
  255. package/dist/cli-bundle/chunks/contracts-MP2P3HL5.js.map +0 -1
  256. package/dist/cli-bundle/chunks/create-3BV2VA3Q.js +0 -30
  257. package/dist/cli-bundle/chunks/history-YRQUD4YM.js +0 -20
  258. package/dist/cli-bundle/chunks/history-redact-27OEOZRZ.js +0 -21
  259. package/dist/cli-bundle/chunks/init-DWAKYRXI.js +0 -21
  260. package/dist/cli-bundle/chunks/register-setup-HXEHMDHE.js.map +0 -7
  261. package/dist/cli-bundle/chunks/register-setup-JSMJEFCJ.js.map +0 -1
  262. package/dist/cli-bundle/chunks/restore-XY4YE2OV.js +0 -19
  263. package/dist/cli-bundle/chunks/test-COWPCGBE.js +0 -36
  264. package/dist/cli-bundle/chunks/update-7IYQHX4Q.js +0 -24
  265. package/dist/cli-bundle/chunks/update-IJKDRBIX.js +0 -28
  266. /package/dist/cli-bundle/chunks/{activity-NEOI45NX.js.map → activity-54TXGJ2T.js.map} +0 -0
  267. /package/dist/cli-bundle/chunks/{activity-DXS2XMQU.js.map → activity-N7RVTLBQ.js.map} +0 -0
  268. /package/dist/cli-bundle/chunks/{aggregate-IHM4KMQ3.js.map → aggregate-63NWNIBR.js.map} +0 -0
  269. /package/dist/cli-bundle/chunks/{aggregate-NMYDVQF7.js.map → aggregate-YHCYX2EV.js.map} +0 -0
  270. /package/dist/cli-bundle/chunks/{append-3HY5G7ET.js.map → append-PUKREFV5.js.map} +0 -0
  271. /package/dist/cli-bundle/chunks/{append-K54MDQYC.js.map → append-VLQQDHMJ.js.map} +0 -0
  272. /package/dist/cli-bundle/chunks/{chunk-DU64SZUQ.js.map → chunk-2WCYE3IF.js.map} +0 -0
  273. /package/dist/cli-bundle/chunks/{chunk-NKZOJPXK.js.map → chunk-3BKH2CL3.js.map} +0 -0
  274. /package/dist/cli-bundle/chunks/{chunk-7MALIV5H.js.map → chunk-4XDGYFHL.js.map} +0 -0
  275. /package/dist/cli-bundle/chunks/{chunk-VB54F347.js.map → chunk-5BBEWX6C.js.map} +0 -0
  276. /package/dist/cli-bundle/chunks/{chunk-DHBPJ7VG.js.map → chunk-5S4ZGDB2.js.map} +0 -0
  277. /package/dist/cli-bundle/chunks/{chunk-UKK2VTTH.js.map → chunk-6EBNFQOR.js.map} +0 -0
  278. /package/dist/cli-bundle/chunks/{chunk-5SESR24H.js.map → chunk-6EL7SW5C.js.map} +0 -0
  279. /package/dist/cli-bundle/chunks/{chunk-JLSC5NPC.js.map → chunk-6W3Y65PL.js.map} +0 -0
  280. /package/dist/cli-bundle/chunks/{chunk-HYQV75IB.js.map → chunk-A66VYUOV.js.map} +0 -0
  281. /package/dist/cli-bundle/chunks/{chunk-I367IDZP.js.map → chunk-ABYCA5VX.js.map} +0 -0
  282. /package/dist/cli-bundle/chunks/{chunk-47HTJ6BU.js.map → chunk-AEACLRVH.js.map} +0 -0
  283. /package/dist/cli-bundle/chunks/{chunk-MD7XKVWI.js.map → chunk-ALKFCIIB.js.map} +0 -0
  284. /package/dist/cli-bundle/chunks/{chunk-B2KR24R4.js.map → chunk-ALQKV6U7.js.map} +0 -0
  285. /package/dist/cli-bundle/chunks/{chunk-NIWY4V4Z.js.map → chunk-AYPQUFCX.js.map} +0 -0
  286. /package/dist/cli-bundle/chunks/{chunk-AJXYOYJV.js.map → chunk-B74BP6IS.js.map} +0 -0
  287. /package/dist/cli-bundle/chunks/{chunk-THKDPOS5.js.map → chunk-BFFO3AIB.js.map} +0 -0
  288. /package/dist/cli-bundle/chunks/{chunk-CR7KFPAQ.js.map → chunk-C4C3EJCJ.js.map} +0 -0
  289. /package/dist/cli-bundle/chunks/{chunk-J2TSPY5L.js.map → chunk-CG3KP6I5.js.map} +0 -0
  290. /package/dist/cli-bundle/chunks/{chunk-CWPBGUC7.js.map → chunk-CZIFFMZI.js.map} +0 -0
  291. /package/dist/cli-bundle/chunks/{chunk-75VEYQJS.js.map → chunk-DTABLLVE.js.map} +0 -0
  292. /package/dist/cli-bundle/chunks/{chunk-TIKJAXQW.js.map → chunk-EOGBMLCE.js.map} +0 -0
  293. /package/dist/cli-bundle/chunks/{chunk-YATDFWYK.js.map → chunk-EWRSXOIZ.js.map} +0 -0
  294. /package/dist/cli-bundle/chunks/{chunk-RPRFBXND.js.map → chunk-F32L4HR6.js.map} +0 -0
  295. /package/dist/cli-bundle/chunks/{chunk-NVUATMTC.js.map → chunk-F4BNR2IN.js.map} +0 -0
  296. /package/dist/cli-bundle/chunks/{chunk-Y4BZEND6.js.map → chunk-FBLT6WGK.js.map} +0 -0
  297. /package/dist/cli-bundle/chunks/{chunk-PCH2JTEO.js.map → chunk-FMWW2JDU.js.map} +0 -0
  298. /package/dist/cli-bundle/chunks/{chunk-WQDX7DVG.js.map → chunk-GDUMGZK3.js.map} +0 -0
  299. /package/dist/cli-bundle/chunks/{chunk-FK6MV5F5.js.map → chunk-HBAEFWX3.js.map} +0 -0
  300. /package/dist/cli-bundle/chunks/{chunk-6UPTNMVW.js.map → chunk-HC2S36NB.js.map} +0 -0
  301. /package/dist/cli-bundle/chunks/{chunk-XKNF3VRJ.js.map → chunk-HZF5RLKX.js.map} +0 -0
  302. /package/dist/cli-bundle/chunks/{chunk-4JXWVHMN.js.map → chunk-I6QMJ2XT.js.map} +0 -0
  303. /package/dist/cli-bundle/chunks/{chunk-44O4JIN6.js.map → chunk-IAP5KYBQ.js.map} +0 -0
  304. /package/dist/cli-bundle/chunks/{chunk-A7E4ZXG2.js.map → chunk-IOT6WRL5.js.map} +0 -0
  305. /package/dist/cli-bundle/chunks/{chunk-KRJJPDUO.js.map → chunk-IXAZI443.js.map} +0 -0
  306. /package/dist/cli-bundle/chunks/{chunk-DMT4ODVN.js.map → chunk-J3NMWFIN.js.map} +0 -0
  307. /package/dist/cli-bundle/chunks/{chunk-7PBGTIN3.js.map → chunk-J7I4C5ZB.js.map} +0 -0
  308. /package/dist/cli-bundle/chunks/{chunk-CLLVBO3I.js.map → chunk-JPJDP4VU.js.map} +0 -0
  309. /package/dist/cli-bundle/chunks/{chunk-PJS2J7Z4.js.map → chunk-JV27C7OZ.js.map} +0 -0
  310. /package/dist/cli-bundle/chunks/{chunk-K25UDYJ4.js.map → chunk-KIEAK7YE.js.map} +0 -0
  311. /package/dist/cli-bundle/chunks/{chunk-GGAXE22C.js.map → chunk-KJZOSF7J.js.map} +0 -0
  312. /package/dist/cli-bundle/chunks/{chunk-GXBSFKSX.js.map → chunk-KKX4Z2SE.js.map} +0 -0
  313. /package/dist/cli-bundle/chunks/{chunk-C5SWTISA.js.map → chunk-LNEDHJNQ.js.map} +0 -0
  314. /package/dist/cli-bundle/chunks/{chunk-YRLLL5TY.js.map → chunk-LU36E6GU.js.map} +0 -0
  315. /package/dist/cli-bundle/chunks/{chunk-I6XE47J2.js.map → chunk-M6TUBOGW.js.map} +0 -0
  316. /package/dist/cli-bundle/chunks/{chunk-YJICYNAV.js.map → chunk-MWMHZOZZ.js.map} +0 -0
  317. /package/dist/cli-bundle/chunks/{chunk-SFKQAVZA.js.map → chunk-N5B6WZC5.js.map} +0 -0
  318. /package/dist/cli-bundle/chunks/{chunk-WBSYW3NT.js.map → chunk-NVXGVEFD.js.map} +0 -0
  319. /package/dist/cli-bundle/chunks/{chunk-GNDHOR64.js.map → chunk-OHDQNKJB.js.map} +0 -0
  320. /package/dist/cli-bundle/chunks/{chunk-2LEYMXI6.js.map → chunk-OQ2E64FH.js.map} +0 -0
  321. /package/dist/cli-bundle/chunks/{chunk-25XZN3JD.js.map → chunk-PEL2NLQE.js.map} +0 -0
  322. /package/dist/cli-bundle/chunks/{chunk-H6FNDCDI.js.map → chunk-PRVTGX64.js.map} +0 -0
  323. /package/dist/cli-bundle/chunks/{chunk-TZQKEBKF.js.map → chunk-QOUOMPHO.js.map} +0 -0
  324. /package/dist/cli-bundle/chunks/{chunk-77VKGH4L.js.map → chunk-RAWA3Y7O.js.map} +0 -0
  325. /package/dist/cli-bundle/chunks/{chunk-Y335KFHD.js.map → chunk-RRP6D345.js.map} +0 -0
  326. /package/dist/cli-bundle/chunks/{chunk-4SDKF5BG.js.map → chunk-SKC4UTRP.js.map} +0 -0
  327. /package/dist/cli-bundle/chunks/{chunk-JY25IOEZ.js.map → chunk-SUREE24M.js.map} +0 -0
  328. /package/dist/cli-bundle/chunks/{chunk-A25LOPRG.js.map → chunk-TIM4OD74.js.map} +0 -0
  329. /package/dist/cli-bundle/chunks/{chunk-KK4TQ3ZP.js.map → chunk-TKPP4GOO.js.map} +0 -0
  330. /package/dist/cli-bundle/chunks/{chunk-6FQHNHQQ.js.map → chunk-TSI32UEL.js.map} +0 -0
  331. /package/dist/cli-bundle/chunks/{chunk-TJABI6PR.js.map → chunk-UACWNBL2.js.map} +0 -0
  332. /package/dist/cli-bundle/chunks/{chunk-EVPVCE4R.js.map → chunk-V4UYNSEM.js.map} +0 -0
  333. /package/dist/cli-bundle/chunks/{chunk-QQWEROGS.js.map → chunk-VFJYVXHL.js.map} +0 -0
  334. /package/dist/cli-bundle/chunks/{chunk-YQSWTVZF.js.map → chunk-WB5BYQMF.js.map} +0 -0
  335. /package/dist/cli-bundle/chunks/{chunk-MNGAQB2E.js.map → chunk-XVYKWZNL.js.map} +0 -0
  336. /package/dist/cli-bundle/chunks/{chunk-V4SM4UAL.js.map → chunk-XXKV4UWE.js.map} +0 -0
  337. /package/dist/cli-bundle/chunks/{chunk-GU7YHKYP.js.map → chunk-YV2OSAMS.js.map} +0 -0
  338. /package/dist/cli-bundle/chunks/{chunk-P7ZU73BO.js.map → chunk-ZLWRPBOW.js.map} +0 -0
  339. /package/dist/cli-bundle/chunks/{chunk-3VLPDG3J.js.map → chunk-ZV7IQ23N.js.map} +0 -0
  340. /package/dist/cli-bundle/chunks/{claim-MPXNVBZQ.js.map → claim-FZZZCAY6.js.map} +0 -0
  341. /package/dist/cli-bundle/chunks/{claim-SKHJDLW6.js.map → claim-XK5QBZE3.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{close-Z6AI736U.js.map → close-JEBZXONN.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{close-4RKSL5L6.js.map → close-QHMVWM7M.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{close-many-SXODYBDP.js.map → close-many-OIXJE2JZ.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{close-many-AWTPXLHJ.js.map → close-many-SUU5BS2C.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{comments-YYW5P7AG.js.map → comments-5YM62D75.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{comments-OOH64LWW.js.map → comments-RH3IBIRH.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{config-3445MCQQ.js.map → config-NCNNWF6R.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{config-LCDMKRB2.js.map → config-SW3U7XP2.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{context-PJCURODY.js.map → context-55VEOYI3.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{context-DZMIBIVP.js.map → context-5LB7UGKE.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{copy-63IQQRRS.js.map → copy-IEDBJOOX.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{copy-TASIH2AZ.js.map → copy-N3GE6FYS.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{create-3BV2VA3Q.js.map → create-CLSCHGJJ.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{create-TGSB5GV4.js.map → create-O4VONGPG.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{delete-ARILQQLB.js.map → delete-724EQ6OS.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{delete-ZQKBZYNK.js.map → delete-LPEIF7RU.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{deps-MSHQR2GY.js.map → deps-RSBU4SIU.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{deps-NJFJIMQ5.js.map → deps-T3Y6Y7RT.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{docs-XK2UVUXX.js.map → docs-75ZLCO3G.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{docs-SS4UKYYA.js.map → docs-IFS7HZPP.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{eval-JOTG2YHU.js.map → eval-L2KD7W3M.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{eval-FVZGX5IZ.js.map → eval-QGR7JCQO.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{extension-OQPS27B4.js.map → extension-3JYWJ5K2.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{extension-NLMS47I4.js.map → extension-YQF4CPIR.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{files-Y2P6LN5A.js.map → files-5BQWDRDT.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{files-3EVJQZ2N.js.map → files-EPEJMJHQ.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{focus-D5ZUPTII.js.map → focus-DQVJAPOE.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{focus-ZPIFTY4R.js.map → focus-RWGKD76E.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{gc-LXXDY456.js.map → gc-BEJMQT64.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{gc-RNOEQHSX.js.map → gc-JEFQDJPA.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{get-W23G7MJX.js.map → get-LQG6PEVG.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{get-Q3SZGQHD.js.map → get-WVN75H42.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{health-UDDGJLPP.js.map → health-JJJOY7DJ.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{health-5LHSX365.js.map → health-P67NZ6TT.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{history-YRQUD4YM.js.map → history-ALTM2RRP.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{history-6CZVFIUJ.js.map → history-RUKPKNY7.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{history-compact-VWUSQH6Z.js.map → history-compact-NQ7VPRVT.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{history-compact-M35PDQ4G.js.map → history-compact-ZAOWR7GD.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{history-redact-27OEOZRZ.js.map → history-redact-5YGLWUDH.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{history-redact-AJGARHT3.js.map → history-redact-YY4XYVEP.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{history-repair-YUAHIPIN.js.map → history-repair-EHL4ODQY.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{history-repair-5RDMF7K4.js.map → history-repair-YSQH6SY6.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{init-DWAKYRXI.js.map → init-C4CRHW22.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{init-HASX3YNJ.js.map → init-HBFGYS66.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{learnings-JNGUIJDK.js.map → learnings-J555ZFPD.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{learnings-M4KA6MQE.js.map → learnings-KFQO7GEZ.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{list-6FMKTIH3.js.map → list-C7R33MD5.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{list-5UU2W24O.js.map → list-DSN6UNFB.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{notes-PYCPLA5Y.js.map → notes-V4VNIQL4.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{notes-MODH5CBT.js.map → notes-VYJFN2A3.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{plan-DXRIRYRU.js.map → plan-DHRSVSHR.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{plan-EHQALWSC.js.map → plan-RBHQ5PO7.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{register-list-query-QAASVP2J.js.map → register-list-query-CCMHGZTF.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{register-list-query-WE54YJMH.js.map → register-list-query-OM3E2KMY.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{register-mutation-B6DZJTY2.js.map → register-mutation-N3CDEGZU.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{register-mutation-CPV4C2KR.js.map → register-mutation-UXTTWL6N.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{register-operations-RC4C3423.js.map → register-operations-R2FLOCRI.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{register-operations-AT3BVVX2.js.map → register-operations-UDIFMQKD.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{restore-FNBV4GWE.js.map → restore-LL2WLEDG.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{restore-XY4YE2OV.js.map → restore-LQHXBAY5.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-ECL6GBMZ.js.map → scheduling-shortcuts-255GI3BU.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-JRIUREEU.js.map → scheduling-shortcuts-M4H2ZI64.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{schema-74YENAJL.js.map → schema-C6QA367T.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{schema-TCW3I7QR.js.map → schema-QO5I4FBL.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{search-7USZ6XZA.js.map → search-2EI6EAXH.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{search-GNAUE65M.js.map → search-QBFBLQRO.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{stats-CVHASAEU.js.map → stats-TCW2SZQG.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{stats-DQMKJMFT.js.map → stats-TKC6CAKB.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{telemetry-PQTL5YS2.js.map → telemetry-BT2VSWU2.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{telemetry-7P5EUWCS.js.map → telemetry-LQ6FRTUT.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{test-FDQZQNZ4.js.map → test-NV2DRPUS.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{test-COWPCGBE.js.map → test-WA6RZGM2.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{test-all-PIPPS4S5.js.map → test-all-DZ76VTPQ.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{test-all-WQIAZVA6.js.map → test-all-REW67LXT.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{test-runs-JS6DNCCI.js.map → test-runs-FQ5WNQLP.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{test-runs-NZD2QGL5.js.map → test-runs-PX73DMMI.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{update-IJKDRBIX.js.map → update-BSKMQOYH.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{update-7IYQHX4Q.js.map → update-FIGYNQ2I.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{update-many-B3TH5TDS.js.map → update-many-2ILP6E4Y.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{update-many-6NTZ5J5D.js.map → update-many-Q5ZEI64S.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{upgrade-76IKZ6EZ.js.map → upgrade-DHL74PQH.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{upgrade-4C7VE7MS.js.map → upgrade-FOZKQTQF.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{validate-BPM6Z3OT.js.map → validate-54SYJ7QW.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{validate-AQU7OCL3.js.map → validate-HYZNIB6W.js.map} +0 -0
@@ -0,0 +1,109 @@
1
+ /**
2
+ * @module core/extensions/activation-summary
3
+ *
4
+ * Enumerates *what* an extension activation registered, by name, in one pass.
5
+ *
6
+ * {@link ./extension-types.js#ExtensionActivationResult | `ExtensionActivationResult`}
7
+ * already carries per-surface *counts* (`hook_counts`, `registration_counts`,
8
+ * the various `*_count` fields), but answering "what does this extension
9
+ * register?" otherwise means walking fifteen-plus sub-registries by hand
10
+ * (`registrations.commands`/`flags`/`item_types`/`item_fields`/`migrations`/
11
+ * `importers`/`exporters`/`search_providers`/`vector_store_adapters`,
12
+ * `commands.overrides`/`handlers`, the `parsers`/`preflight`/`services`/
13
+ * `renderers` override registries, and the five `hooks.*` arrays).
14
+ *
15
+ * {@link describeExtensionActivation} flattens all of them into one sorted,
16
+ * deterministic {@link ExtensionActivationSummary} of identifiers — the
17
+ * `describe` (enumerate-all) verb that complements the SDK's `assert*`
18
+ * (verify-one) and `run*` (invoke-one) testing helpers. It serves two callers:
19
+ *
20
+ * - **Agents** get a single token-efficient view of an activation instead of
21
+ * traversing every registry ("project management = context management").
22
+ * - **Package authors** can assert their *entire* registration surface in one
23
+ * `deepEqual` — a least-privilege "I register exactly these surfaces and
24
+ * nothing more" check, the positive counterpart to
25
+ * {@link ./capability-usage.js#reconcileExtensionCapabilityUsage}.
26
+ */
27
+ import type { ExtensionActivationResult, ExtensionCapability, ExtensionServiceName, OutputRendererFormat } from "./extension-types.js";
28
+ /**
29
+ * Flat, name-level enumeration of every surface an activation registered.
30
+ *
31
+ * Arrays are de-duplicated for deterministic equality. Most are locale-sorted;
32
+ * {@link ExtensionActivationSummary.hooks} is the exception — it is emitted in
33
+ * canonical lifecycle order to mirror `ExtensionActivationResult.hook_counts`,
34
+ * not alphabetically. The three command fields capture distinct dimensions and
35
+ * can overlap: a command
36
+ * registered via `api.registerCommand(definition)` appears in both
37
+ * {@link ExtensionActivationSummary.commands} (its declared definition) and
38
+ * {@link ExtensionActivationSummary.command_handlers} (its executable handler),
39
+ * whereas a built-in command replaced via `api.registerCommand(name, override)`
40
+ * appears only in {@link ExtensionActivationSummary.command_overrides}.
41
+ */
42
+ export interface ExtensionActivationSummary {
43
+ /** Known capabilities the registered surfaces exercise (sorted, de-duplicated). */
44
+ capabilities: ExtensionCapability[];
45
+ /** Full command paths declared via `registerCommand`'s definition form. */
46
+ commands: string[];
47
+ /** Built-in command paths replaced by an `registerCommand(name, override)` handler. */
48
+ command_overrides: string[];
49
+ /**
50
+ * Full command paths backed by an extension-provided handler. A superset of
51
+ * {@link ExtensionActivationSummary.commands} that also includes the
52
+ * `<name> import`/`<name> export` paths synthesized for importers/exporters.
53
+ */
54
+ command_handlers: string[];
55
+ /** Lifecycle hook kinds with at least one registered hook (canonical order). */
56
+ hooks: string[];
57
+ /** Command paths that received extension-registered flags. */
58
+ flag_commands: string[];
59
+ /** Custom item-type names registered via `registerItemTypes`. */
60
+ item_types: string[];
61
+ /** Custom front-matter field names registered via `registerItemFields`. */
62
+ item_fields: string[];
63
+ /** Schema migration ids registered via `registerMigration` (id-less migrations are omitted — they carry no identifier). */
64
+ migrations: string[];
65
+ /** Importer names registered via `registerImporter`. */
66
+ importers: string[];
67
+ /** Exporter names registered via `registerExporter`. */
68
+ exporters: string[];
69
+ /** Search-provider names registered via `registerSearchProvider`. */
70
+ search_providers: string[];
71
+ /** Vector-store adapter names registered via `registerVectorStoreAdapter`. */
72
+ vector_store_adapters: string[];
73
+ /** Command paths with a parser override registered via `registerParser`. */
74
+ parser_overrides: string[];
75
+ /** Built-in service names overridden via `registerService`. */
76
+ service_overrides: ExtensionServiceName[];
77
+ /** Output formats with a renderer override registered via `registerRenderer`. */
78
+ renderer_overrides: OutputRendererFormat[];
79
+ /**
80
+ * Count of registered preflight overrides. The surface carries no per-entry
81
+ * identifier, so this is a `number` rather than `string[]` — the only numeric
82
+ * field in the summary.
83
+ */
84
+ preflight_overrides: number;
85
+ }
86
+ /**
87
+ * Options for {@link describeExtensionActivation}.
88
+ */
89
+ export interface DescribeExtensionActivationOptions {
90
+ /**
91
+ * Restrict the summary to a single extension by name. Names are matched
92
+ * case-insensitively after trimming, mirroring
93
+ * {@link ./capability-usage.js#collectUsedExtensionCapabilities}. Omit to
94
+ * union across every extension in the activation result.
95
+ */
96
+ extensionName?: string;
97
+ }
98
+ /**
99
+ * Summarize, by name, every registration surface an activation exercised.
100
+ *
101
+ * Walks the same sub-registries the loader populates and the capability
102
+ * reconciler attributes, returning a flat {@link ExtensionActivationSummary}
103
+ * whose arrays are sorted and de-duplicated. With
104
+ * {@link DescribeExtensionActivationOptions.extensionName} only the matching
105
+ * extension's registrations contribute (across both layers); without it the
106
+ * summary unions every extension in the activation. Failed activations register
107
+ * nothing, so they contribute only an empty summary.
108
+ */
109
+ export declare function describeExtensionActivation(activation: ExtensionActivationResult, options?: DescribeExtensionActivationOptions): ExtensionActivationSummary;
@@ -0,0 +1,60 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="13c88992-4da1-549d-8644-3ac448f6960e")}catch(e){}}();
3
+ import { collectUsedExtensionCapabilities, normalizeExtensionName } from "./capability-usage.js";
4
+ /**
5
+ * Canonical lifecycle hook kinds paired with their {@link ExtensionHookRegistry}
6
+ * field, ordered to match `ExtensionActivationResult.hook_counts` so a summary's
7
+ * `hooks` list reads in the same stable order the runtime reports counts in.
8
+ */
9
+ const HOOK_REGISTRY_FIELD_TO_KIND = [
10
+ ["beforeCommand", "before_command"],
11
+ ["afterCommand", "after_command"],
12
+ ["onWrite", "on_write"],
13
+ ["onRead", "on_read"],
14
+ ["onIndex", "on_index"],
15
+ ];
16
+ /**
17
+ * Summarize, by name, every registration surface an activation exercised.
18
+ *
19
+ * Walks the same sub-registries the loader populates and the capability
20
+ * reconciler attributes, returning a flat {@link ExtensionActivationSummary}
21
+ * whose arrays are sorted and de-duplicated. With
22
+ * {@link DescribeExtensionActivationOptions.extensionName} only the matching
23
+ * extension's registrations contribute (across both layers); without it the
24
+ * summary unions every extension in the activation. Failed activations register
25
+ * nothing, so they contribute only an empty summary.
26
+ */
27
+ export function describeExtensionActivation(activation, options = {}) {
28
+ // Match both sides with the same normalizer collectUsedExtensionCapabilities
29
+ // uses for the `capabilities` field below, so a filtered summary's named
30
+ // surfaces and capabilities never disagree for a stored name with whitespace.
31
+ const filter = options.extensionName !== undefined ? normalizeExtensionName(options.extensionName) : null;
32
+ const matches = (name) => filter === null || normalizeExtensionName(name) === filter;
33
+ const collect = (entries, identify) => sortUnique(entries.filter((entry) => matches(entry.name)).map(identify));
34
+ const collectFlat = (entries, expand) => sortUnique(entries.filter((entry) => matches(entry.name)).flatMap(expand));
35
+ const { registrations, commands, parsers, preflight, services, renderers, hooks } = activation;
36
+ return {
37
+ capabilities: collectUsedExtensionCapabilities(activation, options),
38
+ commands: collect(registrations.commands, (entry) => entry.command),
39
+ command_overrides: collect(commands.overrides, (entry) => entry.command),
40
+ command_handlers: collect(commands.handlers, (entry) => entry.command),
41
+ hooks: HOOK_REGISTRY_FIELD_TO_KIND.filter(([field]) => hooks[field].some((entry) => matches(entry.name))).map(([, kind]) => kind),
42
+ flag_commands: collect(registrations.flags, (entry) => entry.target_command),
43
+ item_types: collectFlat(registrations.item_types, (entry) => entry.types.map((type) => type.name)),
44
+ item_fields: collectFlat(registrations.item_fields, (entry) => entry.fields.map((field) => field.name)),
45
+ migrations: collectFlat(registrations.migrations, (entry) => typeof entry.definition.id === "string" ? [entry.definition.id] : []),
46
+ importers: collect(registrations.importers, (entry) => entry.importer),
47
+ exporters: collect(registrations.exporters, (entry) => entry.exporter),
48
+ search_providers: collect(registrations.search_providers, (entry) => entry.definition.name),
49
+ vector_store_adapters: collect(registrations.vector_store_adapters, (entry) => entry.definition.name),
50
+ parser_overrides: collect(parsers.overrides, (entry) => entry.command),
51
+ service_overrides: collect(services.overrides, (entry) => entry.service),
52
+ renderer_overrides: collect(renderers.overrides, (entry) => entry.format),
53
+ preflight_overrides: preflight.overrides.filter((entry) => matches(entry.name)).length,
54
+ };
55
+ }
56
+ function sortUnique(values) {
57
+ return [...new Set(values)].sort((left, right) => left.localeCompare(right));
58
+ }
59
+ //# sourceMappingURL=activation-summary.js.map
60
+ //# debugId=13c88992-4da1-549d-8644-3ac448f6960e
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activation-summary.js","sources":["core/extensions/activation-summary.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/activation-summary\n *\n * Enumerates *what* an extension activation registered, by name, in one pass.\n *\n * {@link ./extension-types.js#ExtensionActivationResult | `ExtensionActivationResult`}\n * already carries per-surface *counts* (`hook_counts`, `registration_counts`,\n * the various `*_count` fields), but answering \"what does this extension\n * register?\" otherwise means walking fifteen-plus sub-registries by hand\n * (`registrations.commands`/`flags`/`item_types`/`item_fields`/`migrations`/\n * `importers`/`exporters`/`search_providers`/`vector_store_adapters`,\n * `commands.overrides`/`handlers`, the `parsers`/`preflight`/`services`/\n * `renderers` override registries, and the five `hooks.*` arrays).\n *\n * {@link describeExtensionActivation} flattens all of them into one sorted,\n * deterministic {@link ExtensionActivationSummary} of identifiers — the\n * `describe` (enumerate-all) verb that complements the SDK's `assert*`\n * (verify-one) and `run*` (invoke-one) testing helpers. It serves two callers:\n *\n * - **Agents** get a single token-efficient view of an activation instead of\n * traversing every registry (\"project management = context management\").\n * - **Package authors** can assert their *entire* registration surface in one\n * `deepEqual` — a least-privilege \"I register exactly these surfaces and\n * nothing more\" check, the positive counterpart to\n * {@link ./capability-usage.js#reconcileExtensionCapabilityUsage}.\n */\nimport type {\n ExtensionActivationResult,\n ExtensionCapability,\n ExtensionHookRegistry,\n ExtensionServiceName,\n OutputRendererFormat,\n} from \"./extension-types.js\";\nimport { collectUsedExtensionCapabilities, normalizeExtensionName } from \"./capability-usage.js\";\n\n/**\n * Canonical lifecycle hook kinds paired with their {@link ExtensionHookRegistry}\n * field, ordered to match `ExtensionActivationResult.hook_counts` so a summary's\n * `hooks` list reads in the same stable order the runtime reports counts in.\n */\nconst HOOK_REGISTRY_FIELD_TO_KIND = [\n [\"beforeCommand\", \"before_command\"],\n [\"afterCommand\", \"after_command\"],\n [\"onWrite\", \"on_write\"],\n [\"onRead\", \"on_read\"],\n [\"onIndex\", \"on_index\"],\n] as const satisfies ReadonlyArray<readonly [keyof ExtensionHookRegistry, string]>;\n\n/**\n * Flat, name-level enumeration of every surface an activation registered.\n *\n * Arrays are de-duplicated for deterministic equality. Most are locale-sorted;\n * {@link ExtensionActivationSummary.hooks} is the exception — it is emitted in\n * canonical lifecycle order to mirror `ExtensionActivationResult.hook_counts`,\n * not alphabetically. The three command fields capture distinct dimensions and\n * can overlap: a command\n * registered via `api.registerCommand(definition)` appears in both\n * {@link ExtensionActivationSummary.commands} (its declared definition) and\n * {@link ExtensionActivationSummary.command_handlers} (its executable handler),\n * whereas a built-in command replaced via `api.registerCommand(name, override)`\n * appears only in {@link ExtensionActivationSummary.command_overrides}.\n */\nexport interface ExtensionActivationSummary {\n /** Known capabilities the registered surfaces exercise (sorted, de-duplicated). */\n capabilities: ExtensionCapability[];\n /** Full command paths declared via `registerCommand`'s definition form. */\n commands: string[];\n /** Built-in command paths replaced by an `registerCommand(name, override)` handler. */\n command_overrides: string[];\n /**\n * Full command paths backed by an extension-provided handler. A superset of\n * {@link ExtensionActivationSummary.commands} that also includes the\n * `<name> import`/`<name> export` paths synthesized for importers/exporters.\n */\n command_handlers: string[];\n /** Lifecycle hook kinds with at least one registered hook (canonical order). */\n hooks: string[];\n /** Command paths that received extension-registered flags. */\n flag_commands: string[];\n /** Custom item-type names registered via `registerItemTypes`. */\n item_types: string[];\n /** Custom front-matter field names registered via `registerItemFields`. */\n item_fields: string[];\n /** Schema migration ids registered via `registerMigration` (id-less migrations are omitted — they carry no identifier). */\n migrations: string[];\n /** Importer names registered via `registerImporter`. */\n importers: string[];\n /** Exporter names registered via `registerExporter`. */\n exporters: string[];\n /** Search-provider names registered via `registerSearchProvider`. */\n search_providers: string[];\n /** Vector-store adapter names registered via `registerVectorStoreAdapter`. */\n vector_store_adapters: string[];\n /** Command paths with a parser override registered via `registerParser`. */\n parser_overrides: string[];\n /** Built-in service names overridden via `registerService`. */\n service_overrides: ExtensionServiceName[];\n /** Output formats with a renderer override registered via `registerRenderer`. */\n renderer_overrides: OutputRendererFormat[];\n /**\n * Count of registered preflight overrides. The surface carries no per-entry\n * identifier, so this is a `number` rather than `string[]` — the only numeric\n * field in the summary.\n */\n preflight_overrides: number;\n}\n\n/**\n * Options for {@link describeExtensionActivation}.\n */\nexport interface DescribeExtensionActivationOptions {\n /**\n * Restrict the summary to a single extension by name. Names are matched\n * case-insensitively after trimming, mirroring\n * {@link ./capability-usage.js#collectUsedExtensionCapabilities}. Omit to\n * union across every extension in the activation result.\n */\n extensionName?: string;\n}\n\n/**\n * Summarize, by name, every registration surface an activation exercised.\n *\n * Walks the same sub-registries the loader populates and the capability\n * reconciler attributes, returning a flat {@link ExtensionActivationSummary}\n * whose arrays are sorted and de-duplicated. With\n * {@link DescribeExtensionActivationOptions.extensionName} only the matching\n * extension's registrations contribute (across both layers); without it the\n * summary unions every extension in the activation. Failed activations register\n * nothing, so they contribute only an empty summary.\n */\nexport function describeExtensionActivation(\n activation: ExtensionActivationResult,\n options: DescribeExtensionActivationOptions = {},\n): ExtensionActivationSummary {\n // Match both sides with the same normalizer collectUsedExtensionCapabilities\n // uses for the `capabilities` field below, so a filtered summary's named\n // surfaces and capabilities never disagree for a stored name with whitespace.\n const filter = options.extensionName !== undefined ? normalizeExtensionName(options.extensionName) : null;\n const matches = (name: string): boolean => filter === null || normalizeExtensionName(name) === filter;\n const collect = <TEntry extends { name: string }, TValue extends string>(\n entries: readonly TEntry[],\n identify: (entry: TEntry) => TValue,\n ): TValue[] => sortUnique(entries.filter((entry) => matches(entry.name)).map(identify));\n const collectFlat = <TEntry extends { name: string }>(\n entries: readonly TEntry[],\n expand: (entry: TEntry) => readonly string[],\n ): string[] => sortUnique(entries.filter((entry) => matches(entry.name)).flatMap(expand));\n const { registrations, commands, parsers, preflight, services, renderers, hooks } = activation;\n return {\n capabilities: collectUsedExtensionCapabilities(activation, options),\n commands: collect(registrations.commands, (entry) => entry.command),\n command_overrides: collect(commands.overrides, (entry) => entry.command),\n command_handlers: collect(commands.handlers, (entry) => entry.command),\n hooks: HOOK_REGISTRY_FIELD_TO_KIND.filter(([field]) => hooks[field].some((entry) => matches(entry.name))).map(\n ([, kind]) => kind,\n ),\n flag_commands: collect(registrations.flags, (entry) => entry.target_command),\n item_types: collectFlat(registrations.item_types, (entry) => entry.types.map((type) => type.name)),\n item_fields: collectFlat(registrations.item_fields, (entry) => entry.fields.map((field) => field.name)),\n migrations: collectFlat(registrations.migrations, (entry) =>\n typeof entry.definition.id === \"string\" ? [entry.definition.id] : [],\n ),\n importers: collect(registrations.importers, (entry) => entry.importer),\n exporters: collect(registrations.exporters, (entry) => entry.exporter),\n search_providers: collect(registrations.search_providers, (entry) => entry.definition.name),\n vector_store_adapters: collect(registrations.vector_store_adapters, (entry) => entry.definition.name),\n parser_overrides: collect(parsers.overrides, (entry) => entry.command),\n service_overrides: collect(services.overrides, (entry) => entry.service),\n renderer_overrides: collect(renderers.overrides, (entry) => entry.format),\n preflight_overrides: preflight.overrides.filter((entry) => matches(entry.name)).length,\n };\n}\n\nfunction sortUnique<TValue extends string>(values: readonly TValue[]): TValue[] {\n return [...new Set(values)].sort((left, right) => left.localeCompare(right));\n}\n"],"names":[],"mappings":";;AAiCA,OAAO,EAAE,gCAAgC,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEjG;;;;GAIG;AACH,MAAM,2BAA2B,GAAG;IAClC,CAAC,eAAe,EAAE,gBAAgB,CAAC;IACnC,CAAC,cAAc,EAAE,eAAe,CAAC;IACjC,CAAC,SAAS,EAAE,UAAU,CAAC;IACvB,CAAC,QAAQ,EAAE,SAAS,CAAC;IACrB,CAAC,SAAS,EAAE,UAAU,CAAC;CACyD,CAAC;AA0EnF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,2BAA2B,CACzC,UAAqC,EACrC,UAA8C,EAAE;IAEhD,6EAA6E;IAC7E,yEAAyE;IACzE,8EAA8E;IAC9E,MAAM,MAAM,GAAG,OAAO,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1G,MAAM,OAAO,GAAG,CAAC,IAAY,EAAW,EAAE,CAAC,MAAM,KAAK,IAAI,IAAI,sBAAsB,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC;IACtG,MAAM,OAAO,GAAG,CACd,OAA0B,EAC1B,QAAmC,EACzB,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAA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E,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;QACxE,kBAAkB,EAAE,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;QACzE,mBAAmB,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM;KACvF,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAwB,MAAyB;IAClE,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/E,CAAC","debugId":"13c88992-4da1-549d-8644-3ac448f6960e"}
@@ -59,6 +59,16 @@ export interface CollectUsedExtensionCapabilitiesOptions {
59
59
  */
60
60
  extensionName?: string;
61
61
  }
62
+ /**
63
+ * Canonical extension-name normalization (trim + lowercase) used to match an
64
+ * `extensionName` filter against a registration's stored `name`.
65
+ *
66
+ * Activation stores `extension.name` verbatim — the synthetic test-activation
67
+ * path (`activateExtensionForTest`) never trims it — so any helper that filters
68
+ * by extension name must normalize both sides with this function to stay
69
+ * consistent, including {@link ../extensions/activation-summary.js#describeExtensionActivation}.
70
+ */
71
+ export declare function normalizeExtensionName(name: string): string;
62
72
  /**
63
73
  * Collect the known capabilities exercised across an activation result.
64
74
  *
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b74f7cd3-95ed-5473-a724-d3afb634a68b")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f6134b79-a7d0-57d9-b25a-8e3e7b4af416")}catch(e){}}();
3
3
  import { normalizeKnownExtensionCapability } from "./extension-capability-aliases.js";
4
4
  /**
5
5
  * Canonical map from each known extension capability to the human-readable
@@ -31,7 +31,16 @@ function usageKey(layer, name) {
31
31
  function usageKeyName(key) {
32
32
  return key.slice(key.indexOf(USAGE_KEY_SEPARATOR) + 1);
33
33
  }
34
- function normalizeExtensionName(name) {
34
+ /**
35
+ * Canonical extension-name normalization (trim + lowercase) used to match an
36
+ * `extensionName` filter against a registration's stored `name`.
37
+ *
38
+ * Activation stores `extension.name` verbatim — the synthetic test-activation
39
+ * path (`activateExtensionForTest`) never trims it — so any helper that filters
40
+ * by extension name must normalize both sides with this function to stay
41
+ * consistent, including {@link ../extensions/activation-summary.js#describeExtensionActivation}.
42
+ */
43
+ export function normalizeExtensionName(name) {
35
44
  return name.trim().toLowerCase();
36
45
  }
37
46
  function normalizeDeclaredCapabilities(capabilities) {
@@ -130,4 +139,4 @@ export function reconcileExtensionCapabilityUsage(loaded, activation) {
130
139
  return reconciliations;
131
140
  }
132
141
  //# sourceMappingURL=capability-usage.js.map
133
- //# debugId=b74f7cd3-95ed-5473-a724-d3afb634a68b
142
+ //# debugId=f6134b79-a7d0-57d9-b25a-8e3e7b4af416
@@ -1 +1 @@
1
- {"version":3,"file":"capability-usage.js","sources":["core/extensions/capability-usage.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/capability-usage\n *\n * Reconciles the capabilities an extension manifest *declares* against the\n * capabilities it actually *exercises* during activation.\n *\n * The loader already enforces the opposite direction — registering a surface\n * whose capability is absent from `manifest.capabilities` throws an\n * `extension_capability_missing` activation failure. This module closes the\n * least-privilege loop by detecting capabilities a manifest declares but never\n * registers against, so package authors can trim manifests to the minimum\n * grant. Every declared-but-unused capability is an over-broad permission a\n * reviewer would otherwise have to catch by hand.\n */\nimport type { ExtensionActivationResult, ExtensionCapability, ExtensionLayer } from \"./extension-types.js\";\nimport { normalizeKnownExtensionCapability } from \"./extension-capability-aliases.js\";\n\n/**\n * Canonical map from each known extension capability to the human-readable\n * registration surfaces that exercise it.\n *\n * The `satisfies Record<ExtensionCapability, ...>` guard makes this exhaustive\n * at compile time: adding a capability to `KNOWN_EXTENSION_CAPABILITIES`\n * without giving it a registration surface here fails the build, which prevents\n * a capability that has *no* surface from being perpetually flagged as unused.\n */\nexport const EXTENSION_CAPABILITY_REGISTRATION_SURFACES = {\n commands: [\"registerCommand\", \"command override\", \"command handler\"],\n renderers: [\"registerRenderer\"],\n hooks: [\"hooks.beforeCommand\", \"hooks.afterCommand\", \"hooks.onWrite\", \"hooks.onRead\", \"hooks.onIndex\"],\n schema: [\"registerFlags\", \"registerItemFields\", \"registerItemTypes\", \"registerMigration\"],\n importers: [\"registerImporter\", \"registerExporter\"],\n search: [\"registerSearchProvider\", \"registerVectorStoreAdapter\"],\n parser: [\"registerParser\"],\n preflight: [\"registerPreflight\"],\n services: [\"registerService\"],\n} as const satisfies Record<ExtensionCapability, readonly string[]>;\n\n/**\n * Per-extension reconciliation of declared versus exercised capabilities.\n */\nexport interface ExtensionCapabilityUsageReconciliation {\n /** Layer the extension was loaded from (`global` or `project`). */\n layer: ExtensionLayer;\n /** Extension name as it appears in the manifest. */\n name: string;\n /** Known capabilities declared in the manifest, sorted and de-duplicated. */\n declared: ExtensionCapability[];\n /** Known capabilities the extension actually registered against, sorted. */\n used: ExtensionCapability[];\n /** Declared capabilities with no matching registration (least-privilege gap). */\n unused: ExtensionCapability[];\n}\n\n/**\n * Options for {@link collectUsedExtensionCapabilities}.\n */\nexport interface CollectUsedExtensionCapabilitiesOptions {\n /**\n * Restrict the result to a single extension by name. Names are matched\n * case-insensitively after trimming. Omit to union across every extension in\n * the activation result.\n */\n extensionName?: string;\n}\n\n// `layer` is a closed enum (`\"global\" | \"project\"`) that never contains a\n// colon, so the first colon always separates the layer from the (possibly\n// colon-bearing) name — making the key collision-proof without serialization.\nconst USAGE_KEY_SEPARATOR = \":\";\n\nfunction usageKey(layer: ExtensionLayer, name: string): string {\n return `${layer}${USAGE_KEY_SEPARATOR}${normalizeExtensionName(name)}`;\n}\n\nfunction usageKeyName(key: string): string {\n return key.slice(key.indexOf(USAGE_KEY_SEPARATOR) + 1);\n}\n\nfunction normalizeExtensionName(name: string): string {\n return name.trim().toLowerCase();\n}\n\nfunction normalizeDeclaredCapabilities(capabilities: readonly string[] | undefined): ExtensionCapability[] {\n if (!Array.isArray(capabilities)) {\n return [];\n }\n const known = new Set<ExtensionCapability>();\n for (const capability of capabilities) {\n // Unknown capabilities are reported by the separate unknown-capability\n // diagnostic; reconciling them here would double-report a typo as \"unused\".\n const normalized = normalizeKnownExtensionCapability(capability);\n if (normalized !== null) {\n known.add(normalized);\n }\n }\n return [...known].sort((left, right) => left.localeCompare(right));\n}\n\nfunction attributeCapabilityUsage(activation: ExtensionActivationResult): Map<string, Set<ExtensionCapability>> {\n const usage = new Map<string, Set<ExtensionCapability>>();\n const record = (\n entries: ReadonlyArray<{ layer: ExtensionLayer; name: string }>,\n capability: ExtensionCapability,\n ): void => {\n for (const entry of entries) {\n const key = usageKey(entry.layer, entry.name);\n let exercised = usage.get(key);\n if (exercised === undefined) {\n exercised = new Set<ExtensionCapability>();\n usage.set(key, exercised);\n }\n exercised.add(capability);\n }\n };\n const { registrations, commands, parsers, preflight, services, renderers, hooks } = activation;\n record(registrations.commands, \"commands\");\n record(commands.overrides, \"commands\");\n record(commands.handlers, \"commands\");\n record(registrations.flags, \"schema\");\n record(registrations.item_fields, \"schema\");\n record(registrations.item_types, \"schema\");\n record(registrations.migrations, \"schema\");\n record(registrations.importers, \"importers\");\n record(registrations.exporters, \"importers\");\n record(registrations.search_providers, \"search\");\n record(registrations.vector_store_adapters, \"search\");\n record(parsers.overrides, \"parser\");\n record(preflight.overrides, \"preflight\");\n record(services.overrides, \"services\");\n record(renderers.overrides, \"renderers\");\n record(hooks.beforeCommand, \"hooks\");\n record(hooks.afterCommand, \"hooks\");\n record(hooks.onWrite, \"hooks\");\n record(hooks.onRead, \"hooks\");\n record(hooks.onIndex, \"hooks\");\n return usage;\n}\n\n/**\n * Collect the known capabilities exercised across an activation result.\n *\n * Without {@link CollectUsedExtensionCapabilitiesOptions.extensionName} the\n * result unions every extension in the activation; with it, only the matching\n * extension's registrations contribute (across both layers).\n */\nexport function collectUsedExtensionCapabilities(\n activation: ExtensionActivationResult,\n options: CollectUsedExtensionCapabilitiesOptions = {},\n): ExtensionCapability[] {\n const usage = attributeCapabilityUsage(activation);\n const filter = options.extensionName !== undefined ? normalizeExtensionName(options.extensionName) : null;\n const used = new Set<ExtensionCapability>();\n for (const [key, capabilities] of usage) {\n if (filter !== null && usageKeyName(key) !== filter) {\n continue;\n }\n for (const capability of capabilities) {\n used.add(capability);\n }\n }\n return [...used].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Reconcile each loaded extension's declared capabilities against what it\n * exercised during activation.\n *\n * Extensions with no known declared capabilities are skipped — there is nothing\n * to reconcile. The returned entries preserve every reconcilable extension even\n * when `unused` is empty so callers can report fully-minimal manifests too.\n */\nexport function reconcileExtensionCapabilityUsage(\n loaded: ReadonlyArray<{ layer: ExtensionLayer; name: string; capabilities?: readonly string[] }>,\n activation: ExtensionActivationResult,\n): ExtensionCapabilityUsageReconciliation[] {\n const usage = attributeCapabilityUsage(activation);\n const reconciliations: ExtensionCapabilityUsageReconciliation[] = [];\n for (const extension of loaded) {\n const declared = normalizeDeclaredCapabilities(extension.capabilities);\n if (declared.length === 0) {\n continue;\n }\n const exercised = usage.get(usageKey(extension.layer, extension.name)) ?? new Set<ExtensionCapability>();\n const used = [...exercised].sort((left, right) => left.localeCompare(right));\n const unused = declared.filter((capability) => !exercised.has(capability));\n reconciliations.push({ layer: extension.layer, name: extension.name, declared, used, unused });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AAE,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,GAAG,EAAuB,CAAC;QACzG,MAAM,IAAI,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QAC3E,eAAe,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC","debugId":"b74f7cd3-95ed-5473-a724-d3afb634a68b"}
1
+ {"version":3,"file":"capability-usage.js","sources":["core/extensions/capability-usage.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/capability-usage\n *\n * Reconciles the capabilities an extension manifest *declares* against the\n * capabilities it actually *exercises* during activation.\n *\n * The loader already enforces the opposite direction — registering a surface\n * whose capability is absent from `manifest.capabilities` throws an\n * `extension_capability_missing` activation failure. This module closes the\n * least-privilege loop by detecting capabilities a manifest declares but never\n * registers against, so package authors can trim manifests to the minimum\n * grant. Every declared-but-unused capability is an over-broad permission a\n * reviewer would otherwise have to catch by hand.\n */\nimport type { ExtensionActivationResult, ExtensionCapability, ExtensionLayer } from \"./extension-types.js\";\nimport { normalizeKnownExtensionCapability } from \"./extension-capability-aliases.js\";\n\n/**\n * Canonical map from each known extension capability to the human-readable\n * registration surfaces that exercise it.\n *\n * The `satisfies Record<ExtensionCapability, ...>` guard makes this exhaustive\n * at compile time: adding a capability to `KNOWN_EXTENSION_CAPABILITIES`\n * without giving it a registration surface here fails the build, which prevents\n * a capability that has *no* surface from being perpetually flagged as unused.\n */\nexport const EXTENSION_CAPABILITY_REGISTRATION_SURFACES = {\n commands: [\"registerCommand\", \"command override\", \"command handler\"],\n renderers: [\"registerRenderer\"],\n hooks: [\"hooks.beforeCommand\", \"hooks.afterCommand\", \"hooks.onWrite\", \"hooks.onRead\", \"hooks.onIndex\"],\n schema: [\"registerFlags\", \"registerItemFields\", \"registerItemTypes\", \"registerMigration\"],\n importers: [\"registerImporter\", \"registerExporter\"],\n search: [\"registerSearchProvider\", \"registerVectorStoreAdapter\"],\n parser: [\"registerParser\"],\n preflight: [\"registerPreflight\"],\n services: [\"registerService\"],\n} as const satisfies Record<ExtensionCapability, readonly string[]>;\n\n/**\n * Per-extension reconciliation of declared versus exercised capabilities.\n */\nexport interface ExtensionCapabilityUsageReconciliation {\n /** Layer the extension was loaded from (`global` or `project`). */\n layer: ExtensionLayer;\n /** Extension name as it appears in the manifest. */\n name: string;\n /** Known capabilities declared in the manifest, sorted and de-duplicated. */\n declared: ExtensionCapability[];\n /** Known capabilities the extension actually registered against, sorted. */\n used: ExtensionCapability[];\n /** Declared capabilities with no matching registration (least-privilege gap). */\n unused: ExtensionCapability[];\n}\n\n/**\n * Options for {@link collectUsedExtensionCapabilities}.\n */\nexport interface CollectUsedExtensionCapabilitiesOptions {\n /**\n * Restrict the result to a single extension by name. Names are matched\n * case-insensitively after trimming. Omit to union across every extension in\n * the activation result.\n */\n extensionName?: string;\n}\n\n// `layer` is a closed enum (`\"global\" | \"project\"`) that never contains a\n// colon, so the first colon always separates the layer from the (possibly\n// colon-bearing) name — making the key collision-proof without serialization.\nconst USAGE_KEY_SEPARATOR = \":\";\n\nfunction usageKey(layer: ExtensionLayer, name: string): string {\n return `${layer}${USAGE_KEY_SEPARATOR}${normalizeExtensionName(name)}`;\n}\n\nfunction usageKeyName(key: string): string {\n return key.slice(key.indexOf(USAGE_KEY_SEPARATOR) + 1);\n}\n\n/**\n * Canonical extension-name normalization (trim + lowercase) used to match an\n * `extensionName` filter against a registration's stored `name`.\n *\n * Activation stores `extension.name` verbatim — the synthetic test-activation\n * path (`activateExtensionForTest`) never trims it — so any helper that filters\n * by extension name must normalize both sides with this function to stay\n * consistent, including {@link ../extensions/activation-summary.js#describeExtensionActivation}.\n */\nexport function normalizeExtensionName(name: string): string {\n return name.trim().toLowerCase();\n}\n\nfunction normalizeDeclaredCapabilities(capabilities: readonly string[] | undefined): ExtensionCapability[] {\n if (!Array.isArray(capabilities)) {\n return [];\n }\n const known = new Set<ExtensionCapability>();\n for (const capability of capabilities) {\n // Unknown capabilities are reported by the separate unknown-capability\n // diagnostic; reconciling them here would double-report a typo as \"unused\".\n const normalized = normalizeKnownExtensionCapability(capability);\n if (normalized !== null) {\n known.add(normalized);\n }\n }\n return [...known].sort((left, right) => left.localeCompare(right));\n}\n\nfunction attributeCapabilityUsage(activation: ExtensionActivationResult): Map<string, Set<ExtensionCapability>> {\n const usage = new Map<string, Set<ExtensionCapability>>();\n const record = (\n entries: ReadonlyArray<{ layer: ExtensionLayer; name: string }>,\n capability: ExtensionCapability,\n ): void => {\n for (const entry of entries) {\n const key = usageKey(entry.layer, entry.name);\n let exercised = usage.get(key);\n if (exercised === undefined) {\n exercised = new Set<ExtensionCapability>();\n usage.set(key, exercised);\n }\n exercised.add(capability);\n }\n };\n const { registrations, commands, parsers, preflight, services, renderers, hooks } = activation;\n record(registrations.commands, \"commands\");\n record(commands.overrides, \"commands\");\n record(commands.handlers, \"commands\");\n record(registrations.flags, \"schema\");\n record(registrations.item_fields, \"schema\");\n record(registrations.item_types, \"schema\");\n record(registrations.migrations, \"schema\");\n record(registrations.importers, \"importers\");\n record(registrations.exporters, \"importers\");\n record(registrations.search_providers, \"search\");\n record(registrations.vector_store_adapters, \"search\");\n record(parsers.overrides, \"parser\");\n record(preflight.overrides, \"preflight\");\n record(services.overrides, \"services\");\n record(renderers.overrides, \"renderers\");\n record(hooks.beforeCommand, \"hooks\");\n record(hooks.afterCommand, \"hooks\");\n record(hooks.onWrite, \"hooks\");\n record(hooks.onRead, \"hooks\");\n record(hooks.onIndex, \"hooks\");\n return usage;\n}\n\n/**\n * Collect the known capabilities exercised across an activation result.\n *\n * Without {@link CollectUsedExtensionCapabilitiesOptions.extensionName} the\n * result unions every extension in the activation; with it, only the matching\n * extension's registrations contribute (across both layers).\n */\nexport function collectUsedExtensionCapabilities(\n activation: ExtensionActivationResult,\n options: CollectUsedExtensionCapabilitiesOptions = {},\n): ExtensionCapability[] {\n const usage = attributeCapabilityUsage(activation);\n const filter = options.extensionName !== undefined ? normalizeExtensionName(options.extensionName) : null;\n const used = new Set<ExtensionCapability>();\n for (const [key, capabilities] of usage) {\n if (filter !== null && usageKeyName(key) !== filter) {\n continue;\n }\n for (const capability of capabilities) {\n used.add(capability);\n }\n }\n return [...used].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Reconcile each loaded extension's declared capabilities against what it\n * exercised during activation.\n *\n * Extensions with no known declared capabilities are skipped — there is nothing\n * to reconcile. The returned entries preserve every reconcilable extension even\n * when `unused` is empty so callers can report fully-minimal manifests too.\n */\nexport function reconcileExtensionCapabilityUsage(\n loaded: ReadonlyArray<{ layer: ExtensionLayer; name: string; capabilities?: readonly string[] }>,\n activation: ExtensionActivationResult,\n): ExtensionCapabilityUsageReconciliation[] {\n const usage = attributeCapabilityUsage(activation);\n const reconciliations: ExtensionCapabilityUsageReconciliation[] = [];\n for (const extension of loaded) {\n const declared = normalizeDeclaredCapabilities(extension.capabilities);\n if (declared.length === 0) {\n continue;\n }\n const exercised = usage.get(usageKey(extension.layer, extension.name)) ?? new Set<ExtensionCapability>();\n const used = [...exercised].sort((left, right) => left.localeCompare(right));\n const unused = declared.filter((capability) => !exercised.has(capability));\n reconciliations.push({ layer: extension.layer, name: extension.name, declared, used, unused });\n }\n return reconciliations;\n}\n"],"names":[],"mappings":";;AAeA,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AAEtF;;;;;;;;GAQG;AACH,MAAM,CAAC,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AS,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QAC3E,eAAe,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC","debugId":"f6134b79-a7d0-57d9-b25a-8e3e7b4af416"}
@@ -1,3 +1,4 @@
1
+ import { compareComparableVersions, parseComparableVersion } from "./version-compat.js";
1
2
  import { type NormalizedExtensionPolicy } from "./extension-policy.js";
2
3
  export { parseUnknownExtensionCapabilityWarning, parseLegacyExtensionCapabilityAliasWarning, } from "./extension-capability-aliases.js";
3
4
  export { createEmptyExtensionHookRegistry, createEmptyExtensionCommandRegistry, createEmptyExtensionParserRegistry, createEmptyExtensionPreflightRegistry, createEmptyExtensionServiceRegistry, createEmptyExtensionRendererRegistry, createEmptyExtensionRegistrationRegistry, } from "./extension-registries.js";
@@ -21,8 +22,6 @@ declare function readManagedExtensionSourcePackages(extensionsRoot: string): Pro
21
22
  * Implements discover extensions for the public runtime surface of this module.
22
23
  */
23
24
  export declare function discoverExtensions(options: DiscoverExtensionsOptions): Promise<ExtensionDiscoveryResult>;
24
- declare function parseComparableVersion(value: string): number[] | null;
25
- declare function compareComparableVersions(currentVersion: string, minimumVersion: string): number | null;
26
25
  declare function readCurrentPmCliVersion(): Promise<string | null>;
27
26
  declare function resolveCurrentPmCliVersion(): Promise<string | null>;
28
27
  declare function evaluatePmMinVersionCompatibility(layer: ExtensionLayer, manifest: ExtensionManifest): Promise<{
@@ -4,7 +4,7 @@
4
4
  * Implements extension runtime contracts and governance for Loader.
5
5
  */
6
6
 
7
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7c9e6f67-48e5-5952-a7a7-341aafa36244")}catch(e){}}();
7
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7c5d988c-8be5-5308-90c9-b1245d50fbab")}catch(e){}}();
8
8
  import fs from "node:fs/promises";
9
9
  import path from "node:path";
10
10
  import { pathToFileURL } from "node:url";
@@ -15,6 +15,7 @@ import { resolveGlobalPmRoot } from "../store/paths.js";
15
15
  import { asRecordLoose } from "../shared/primitives.js";
16
16
  import { flattenFlagListValue, isFlagDefaultValueCoercible, resolveFlagValueKind } from "./flag-value-types.js";
17
17
  import { KNOWN_ITEM_FIELD_TYPES, normalizeItemFieldType, suggestKnownItemFieldType } from "./item-field-types.js";
18
+ import { compareComparableVersions, evaluatePmMaxVersionBound, evaluatePmMinVersionBound, parseComparableVersion, } from "./version-compat.js";
18
19
  // Cohesive helper groups now live in sibling modules. They are imported for the
19
20
  // discovery/activation code that stays here and re-exported below so existing
20
21
  // import sites (sdk/index.ts, commands/extension.ts, health.ts, tests, …) keep
@@ -563,33 +564,6 @@ function formatUnknownError(error) {
563
564
  }
564
565
  return String(error);
565
566
  }
566
- function parseComparableVersion(value) {
567
- const normalized = value.trim().replace(/^>=\s*/, "").replace(/^v/i, "");
568
- const release = normalized.split(/[+-]/, 1)[0];
569
- if (!/^\d+(?:[.-]\d+)*$/.test(release)) {
570
- return null;
571
- }
572
- return release.split(/[.-]/).map((part) => Number(part));
573
- }
574
- function compareComparableVersions(currentVersion, minimumVersion) {
575
- const currentParts = parseComparableVersion(currentVersion);
576
- const minimumParts = parseComparableVersion(minimumVersion);
577
- if (!currentParts || !minimumParts) {
578
- return null;
579
- }
580
- const width = Math.max(currentParts.length, minimumParts.length);
581
- for (let index = 0; index < width; index += 1) {
582
- const current = currentParts[index] ?? 0;
583
- const minimum = minimumParts[index] ?? 0;
584
- if (current > minimum) {
585
- return 1;
586
- }
587
- if (current < minimum) {
588
- return -1;
589
- }
590
- }
591
- return 0;
592
- }
593
567
  async function readCurrentPmCliVersion() {
594
568
  try {
595
569
  const packageRoot = resolvePmPackageRootFromModule(import.meta.url, ["../../.."]);
@@ -605,87 +579,50 @@ function resolveCurrentPmCliVersion() {
605
579
  currentPmCliVersionPromise ??= readCurrentPmCliVersion();
606
580
  return currentPmCliVersionPromise;
607
581
  }
608
- async function evaluatePmMinVersionCompatibility(layer, manifest) {
609
- if (typeof manifest.pm_min_version !== "string" || manifest.pm_min_version.trim().length === 0) {
610
- return { allowed: true };
611
- }
612
- if (!parseComparableVersion(manifest.pm_min_version)) {
613
- return {
614
- allowed: false,
615
- warning: `extension_pm_min_version_invalid:${layer}:${manifest.name}:required=${manifest.pm_min_version}`,
616
- };
617
- }
618
- const currentVersion = await resolveCurrentPmCliVersion();
619
- if (!currentVersion) {
620
- return {
621
- allowed: true,
622
- warning: `extension_pm_min_version_unchecked:${layer}:${manifest.name}:required=${manifest.pm_min_version}:current=unknown`,
623
- };
582
+ function formatPmVersionCompatibilityWarning(layer, manifest, evaluation) {
583
+ const current = evaluation.current ?? "unknown";
584
+ if (evaluation.kind === "pm_min_version") {
585
+ switch (evaluation.status) {
586
+ case "invalid":
587
+ return `extension_pm_min_version_invalid:${layer}:${manifest.name}:required=${evaluation.required}`;
588
+ case "unchecked":
589
+ return `extension_pm_min_version_unchecked:${layer}:${manifest.name}:required=${evaluation.required}:current=${current}`;
590
+ case "unmet":
591
+ return `extension_pm_min_version_unmet:${layer}:${manifest.name}:required=${evaluation.required}:current=${current}`;
592
+ default:
593
+ return undefined;
594
+ }
624
595
  }
625
- const comparison = compareComparableVersions(currentVersion, manifest.pm_min_version);
626
- if (comparison === null) {
627
- return {
628
- allowed: true,
629
- warning: `extension_pm_min_version_unchecked:${layer}:${manifest.name}:required=${manifest.pm_min_version}:current=${currentVersion}`,
630
- };
596
+ switch (evaluation.status) {
597
+ case "invalid":
598
+ return `extension_pm_max_version_invalid:${layer}:${manifest.name}:allowed=${evaluation.required}`;
599
+ case "unchecked":
600
+ return `extension_pm_max_version_unchecked:${layer}:${manifest.name}:allowed=${evaluation.required}:current=${current}`;
601
+ case "exceeded_warn":
602
+ return `extension_pm_max_version_exceeded_warn:${layer}:${manifest.name}:allowed=${evaluation.required}:current=${current}`;
603
+ case "exceeded":
604
+ return `extension_pm_max_version_exceeded:${layer}:${manifest.name}:allowed=${evaluation.required}:current=${current}`;
605
+ default:
606
+ return undefined;
631
607
  }
632
- if (comparison < 0) {
633
- return {
634
- allowed: false,
635
- warning: `extension_pm_min_version_unmet:${layer}:${manifest.name}:required=${manifest.pm_min_version}:current=${currentVersion}`,
636
- };
608
+ }
609
+ async function evaluatePmMinVersionCompatibility(layer, manifest) {
610
+ // Resolve the current CLI version only when a bound is declared, so the common
611
+ // no-bound case never reads package.json.
612
+ if (manifest.pm_min_version === undefined) {
613
+ return { allowed: true };
637
614
  }
638
- return { allowed: true };
615
+ const evaluation = evaluatePmMinVersionBound(manifest.pm_min_version, await resolveCurrentPmCliVersion());
616
+ const warning = formatPmVersionCompatibilityWarning(layer, manifest, evaluation);
617
+ return warning ? { allowed: evaluation.allowed, warning } : { allowed: evaluation.allowed };
639
618
  }
640
619
  async function evaluatePmMaxVersionCompatibility(layer, manifest, exceededMode) {
641
- if (typeof manifest.pm_max_version !== "string" || manifest.pm_max_version.trim().length === 0) {
620
+ if (manifest.pm_max_version === undefined) {
642
621
  return { allowed: true };
643
622
  }
644
- // An upper bound must be an exact version. parseComparableVersion leniently strips a
645
- // leading ">=" (for engines.pm min-version compat), which would turn a range-like
646
- // ">=2026.6.1" into an inclusive max and wrongly block newer CLIs reject range prefixes.
647
- if (/^[<>=~^]/.test(manifest.pm_max_version.trim())) {
648
- return {
649
- allowed: false,
650
- warning: `extension_pm_max_version_invalid:${layer}:${manifest.name}:allowed=${manifest.pm_max_version}`,
651
- };
652
- }
653
- if (!parseComparableVersion(manifest.pm_max_version)) {
654
- return {
655
- allowed: false,
656
- warning: `extension_pm_max_version_invalid:${layer}:${manifest.name}:allowed=${manifest.pm_max_version}`,
657
- };
658
- }
659
- const currentVersion = await resolveCurrentPmCliVersion();
660
- if (!currentVersion) {
661
- return {
662
- allowed: true,
663
- warning: `extension_pm_max_version_unchecked:${layer}:${manifest.name}:allowed=${manifest.pm_max_version}:current=unknown`,
664
- };
665
- }
666
- const comparison = compareComparableVersions(currentVersion, manifest.pm_max_version);
667
- if (comparison === null) {
668
- return {
669
- allowed: true,
670
- warning: `extension_pm_max_version_unchecked:${layer}:${manifest.name}:allowed=${manifest.pm_max_version}:current=${currentVersion}`,
671
- };
672
- }
673
- if (comparison > 0) {
674
- // pm-k5e8: `extensions.policy.pm_max_version_exceeded_mode` (default "block",
675
- // per-layer overridable) relaxes this to warn-only so operators can keep
676
- // pinned extensions loading during a CLI upgrade window.
677
- if (exceededMode === "warn") {
678
- return {
679
- allowed: true,
680
- warning: `extension_pm_max_version_exceeded_warn:${layer}:${manifest.name}:allowed=${manifest.pm_max_version}:current=${currentVersion}`,
681
- };
682
- }
683
- return {
684
- allowed: false,
685
- warning: `extension_pm_max_version_exceeded:${layer}:${manifest.name}:allowed=${manifest.pm_max_version}:current=${currentVersion}`,
686
- };
687
- }
688
- return { allowed: true };
623
+ const evaluation = evaluatePmMaxVersionBound(manifest.pm_max_version, await resolveCurrentPmCliVersion(), exceededMode);
624
+ const warning = formatPmVersionCompatibilityWarning(layer, manifest, evaluation);
625
+ return warning ? { allowed: evaluation.allowed, warning } : { allowed: evaluation.allowed };
689
626
  }
690
627
  async function fingerprintPath(pathToInspect) {
691
628
  try {
@@ -1997,4 +1934,4 @@ export const _testOnlyLoader = {
1997
1934
  },
1998
1935
  };
1999
1936
  //# sourceMappingURL=loader.js.map
2000
- //# debugId=7c9e6f67-48e5-5952-a7a7-341aafa36244
1937
+ //# debugId=7c5d988c-8be5-5308-90c9-b1245d50fbab