@unbrained/pm-cli 2026.6.21 → 2026.6.22

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 (406) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cli/commands/completion.js +5 -3
  3. package/dist/cli/commands/completion.js.map +1 -1
  4. package/dist/cli/commands/extension/doctor.d.ts +11 -0
  5. package/dist/cli/commands/extension/doctor.js +31 -2
  6. package/dist/cli/commands/extension/doctor.js.map +1 -1
  7. package/dist/cli/commands/extension/scaffold.d.ts +16 -2
  8. package/dist/cli/commands/extension/scaffold.js +481 -48
  9. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  10. package/dist/cli/commands/extension.d.ts +1 -0
  11. package/dist/cli/commands/extension.js +9 -4
  12. package/dist/cli/commands/extension.js.map +1 -1
  13. package/dist/cli/help-content.js +16 -4
  14. package/dist/cli/help-content.js.map +1 -1
  15. package/dist/cli/register-setup.js +6 -2
  16. package/dist/cli/register-setup.js.map +1 -1
  17. package/dist/cli-bundle/chunks/{activity-KW3IRP44.js → activity-DXS2XMQU.js} +11 -11
  18. package/dist/cli-bundle/chunks/activity-NEOI45NX.js +18 -0
  19. package/dist/cli-bundle/chunks/{aggregate-FIGQEIL3.js → aggregate-IHM4KMQ3.js} +10 -10
  20. package/dist/cli-bundle/chunks/{aggregate-3ZKQG5SW.js → aggregate-NMYDVQF7.js} +10 -10
  21. package/dist/cli-bundle/chunks/{append-EWJYJ7CH.js → append-3HY5G7ET.js} +8 -8
  22. package/dist/cli-bundle/chunks/{append-QEOLX3XB.js → append-K54MDQYC.js} +8 -8
  23. package/dist/cli-bundle/chunks/{chunk-CF55WVVS.js → chunk-25XZN3JD.js} +2 -2
  24. package/dist/cli-bundle/chunks/{chunk-WQ7NIVDK.js → chunk-2LEYMXI6.js} +4 -4
  25. package/dist/cli-bundle/chunks/chunk-3GL6LTUL.js +643 -0
  26. package/dist/cli-bundle/chunks/chunk-3GL6LTUL.js.map +1 -0
  27. package/dist/cli-bundle/chunks/{chunk-FRUFKWNK.js → chunk-3VLPDG3J.js} +2 -2
  28. package/dist/cli-bundle/chunks/{chunk-C3AZ5ZML.js → chunk-44O4JIN6.js} +13 -13
  29. package/dist/cli-bundle/chunks/{chunk-J4MYYSOL.js → chunk-47HTJ6BU.js} +5 -5
  30. package/dist/cli-bundle/chunks/{chunk-YCJX76PW.js → chunk-4JXWVHMN.js} +2 -2
  31. package/dist/cli-bundle/chunks/{chunk-37QXHBIB.js → chunk-4SDKF5BG.js} +3 -3
  32. package/dist/cli-bundle/chunks/chunk-4YJA4LGU.js +646 -0
  33. package/dist/cli-bundle/chunks/chunk-4YJA4LGU.js.map +7 -0
  34. package/dist/cli-bundle/chunks/{chunk-NJHMAJ6N.js → chunk-5SESR24H.js} +8 -8
  35. package/dist/cli-bundle/chunks/{chunk-2EIMPCE4.js → chunk-6FQHNHQQ.js} +3 -3
  36. package/dist/cli-bundle/chunks/{chunk-5FIEHKEX.js → chunk-6UPTNMVW.js} +5 -5
  37. package/dist/cli-bundle/chunks/{chunk-FKBDKV7Y.js → chunk-75VEYQJS.js} +3 -3
  38. package/dist/cli-bundle/chunks/{chunk-GMHPNNYG.js → chunk-77VKGH4L.js} +10 -10
  39. package/dist/cli-bundle/chunks/{chunk-5PCI3UBT.js → chunk-7GCCDXXN.js} +55 -266
  40. package/dist/cli-bundle/chunks/chunk-7GCCDXXN.js.map +7 -0
  41. package/dist/cli-bundle/chunks/{chunk-OFYMIDF2.js → chunk-7MALIV5H.js} +9 -9
  42. package/dist/cli-bundle/chunks/{chunk-A4Z7ZOL5.js → chunk-7MPTFYT3.js} +20 -15
  43. package/dist/cli-bundle/chunks/chunk-7MPTFYT3.js.map +1 -0
  44. package/dist/cli-bundle/chunks/{chunk-RLK7P77C.js → chunk-7PBGTIN3.js} +5 -5
  45. package/dist/cli-bundle/chunks/{chunk-6H4LF7AO.js → chunk-A25LOPRG.js} +2 -2
  46. package/dist/cli-bundle/chunks/{chunk-M5XALUSL.js → chunk-A7E4ZXG2.js} +2 -2
  47. package/dist/cli-bundle/chunks/{chunk-7D3SAQXM.js → chunk-AJXYOYJV.js} +2 -2
  48. package/dist/cli-bundle/chunks/{chunk-HCU6WUSY.js → chunk-B2KR24R4.js} +9 -9
  49. package/dist/cli-bundle/chunks/{chunk-2GCDRRIF.js → chunk-C5SWTISA.js} +12 -12
  50. package/dist/cli-bundle/chunks/{chunk-AIS5PGI3.js → chunk-CLLVBO3I.js} +2 -2
  51. package/dist/cli-bundle/chunks/{chunk-QGG32QHW.js → chunk-CR7KFPAQ.js} +3 -3
  52. package/dist/cli-bundle/chunks/{chunk-UV6IYE5U.js → chunk-CWPBGUC7.js} +2 -2
  53. package/dist/cli-bundle/chunks/{chunk-32R4PIC6.js → chunk-D35LTIFR.js} +55 -259
  54. package/dist/cli-bundle/chunks/chunk-D35LTIFR.js.map +1 -0
  55. package/dist/cli-bundle/chunks/{chunk-QQHISQBJ.js → chunk-DBQUQ3AS.js} +3 -3
  56. package/dist/cli-bundle/chunks/{chunk-5QICDWMV.js → chunk-DHBPJ7VG.js} +2 -2
  57. package/dist/cli-bundle/chunks/{chunk-SRYYRVPB.js → chunk-DMT4ODVN.js} +2 -2
  58. package/dist/cli-bundle/chunks/{chunk-PUH4D67U.js → chunk-DU64SZUQ.js} +2 -2
  59. package/dist/cli-bundle/chunks/{chunk-C4N5I7ZW.js → chunk-EVPVCE4R.js} +3 -3
  60. package/dist/cli-bundle/chunks/{chunk-3EWSGA7N.js → chunk-FK6MV5F5.js} +12 -12
  61. package/dist/cli-bundle/chunks/{chunk-NIUEXCFS.js → chunk-GGAXE22C.js} +6 -6
  62. package/dist/cli-bundle/chunks/{chunk-SX75ADBK.js → chunk-GNDHOR64.js} +6 -6
  63. package/dist/cli-bundle/chunks/{chunk-GOZUHWFD.js → chunk-GU7YHKYP.js} +2 -2
  64. package/dist/cli-bundle/chunks/{chunk-NXS7ZKAK.js → chunk-GXBSFKSX.js} +4 -4
  65. package/dist/cli-bundle/chunks/{chunk-NJN7LL7U.js → chunk-H6FNDCDI.js} +5 -5
  66. package/dist/cli-bundle/chunks/{chunk-FWPDUYEY.js → chunk-HYQV75IB.js} +7 -7
  67. package/dist/cli-bundle/chunks/{chunk-F5NZWFSW.js → chunk-I367IDZP.js} +7 -7
  68. package/dist/cli-bundle/chunks/{chunk-52OCIDPG.js → chunk-I6XE47J2.js} +5 -5
  69. package/dist/cli-bundle/chunks/{chunk-HIP7WVTL.js → chunk-J2TSPY5L.js} +4 -4
  70. package/dist/cli-bundle/chunks/{chunk-2PKHRP6G.js → chunk-JLSC5NPC.js} +10 -10
  71. package/dist/cli-bundle/chunks/{chunk-PP2U4NMT.js → chunk-JY25IOEZ.js} +5 -5
  72. package/dist/cli-bundle/chunks/{chunk-Q2J2HJUN.js → chunk-K25UDYJ4.js} +2 -2
  73. package/dist/cli-bundle/chunks/{chunk-SBGXDO7A.js → chunk-KBTREGVO.js} +3 -3
  74. package/dist/cli-bundle/chunks/{chunk-QZTWBFXJ.js → chunk-KK4TQ3ZP.js} +2 -2
  75. package/dist/cli-bundle/chunks/{chunk-434HM6Z5.js → chunk-KL5ELX2X.js} +81 -3
  76. package/dist/cli-bundle/chunks/chunk-KL5ELX2X.js.map +1 -0
  77. package/dist/cli-bundle/chunks/{chunk-NIGXMNNI.js → chunk-KRJJPDUO.js} +2 -2
  78. package/dist/cli-bundle/chunks/{chunk-AZMOLBN3.js → chunk-MD7XKVWI.js} +7 -7
  79. package/dist/cli-bundle/chunks/{chunk-6ZXM2XNF.js → chunk-MNGAQB2E.js} +8 -8
  80. package/dist/cli-bundle/chunks/{chunk-3MDHREEV.js → chunk-NIWY4V4Z.js} +3 -3
  81. package/dist/cli-bundle/chunks/{chunk-TKBHZPKD.js → chunk-NKZOJPXK.js} +3 -3
  82. package/dist/cli-bundle/chunks/{chunk-CZPXY7UW.js → chunk-NVUATMTC.js} +3 -3
  83. package/dist/cli-bundle/chunks/{chunk-LEU5GHRC.js → chunk-P7ZU73BO.js} +3 -3
  84. package/dist/cli-bundle/chunks/{chunk-NSBZ2CKF.js → chunk-PCH2JTEO.js} +2 -2
  85. package/dist/cli-bundle/chunks/{chunk-B473GZWW.js → chunk-PJS2J7Z4.js} +3 -3
  86. package/dist/cli-bundle/chunks/{chunk-5IDI42VV.js → chunk-QQWEROGS.js} +7 -7
  87. package/dist/cli-bundle/chunks/{chunk-6M4RJS4M.js → chunk-RPRFBXND.js} +3 -3
  88. package/dist/cli-bundle/chunks/{chunk-HMOADQVT.js → chunk-RZZMSY4P.js} +88 -3
  89. package/dist/cli-bundle/chunks/chunk-RZZMSY4P.js.map +7 -0
  90. package/dist/cli-bundle/chunks/{chunk-N5ZJACJ6.js → chunk-SFKQAVZA.js} +8 -8
  91. package/dist/cli-bundle/chunks/{chunk-EBH56IXK.js → chunk-THKDPOS5.js} +8 -8
  92. package/dist/cli-bundle/chunks/{chunk-LUWW7L4B.js → chunk-TIKJAXQW.js} +3 -3
  93. package/dist/cli-bundle/chunks/{chunk-OTHIWLMB.js → chunk-TJABI6PR.js} +5 -5
  94. package/dist/cli-bundle/chunks/{chunk-HC4AWIKT.js → chunk-TRUFOER3.js} +19 -14
  95. package/dist/cli-bundle/chunks/{chunk-HC4AWIKT.js.map → chunk-TRUFOER3.js.map} +2 -2
  96. package/dist/cli-bundle/chunks/{chunk-76Z3YSHV.js → chunk-TZQKEBKF.js} +2 -2
  97. package/dist/cli-bundle/chunks/{chunk-PFSRUHDH.js → chunk-UKK2VTTH.js} +9 -9
  98. package/dist/cli-bundle/chunks/{chunk-H7NJZWG2.js → chunk-V4SM4UAL.js} +13 -13
  99. package/dist/cli-bundle/chunks/{chunk-CZUB4XWO.js → chunk-VB54F347.js} +2 -2
  100. package/dist/cli-bundle/chunks/{chunk-O47BPOPC.js → chunk-WBSYW3NT.js} +2 -2
  101. package/dist/cli-bundle/chunks/{chunk-UPE3CDD7.js → chunk-WQDX7DVG.js} +7 -7
  102. package/dist/cli-bundle/chunks/{chunk-NB3PYLQ6.js → chunk-XKNF3VRJ.js} +5 -5
  103. package/dist/cli-bundle/chunks/{chunk-F7K5GWP3.js → chunk-Y335KFHD.js} +9 -9
  104. package/dist/cli-bundle/chunks/{chunk-D7FYS6PG.js → chunk-Y4BZEND6.js} +2 -2
  105. package/dist/cli-bundle/chunks/{chunk-6CJWZAN7.js → chunk-YATDFWYK.js} +7 -7
  106. package/dist/cli-bundle/chunks/{chunk-UEMNL33O.js → chunk-YJICYNAV.js} +8 -8
  107. package/dist/cli-bundle/chunks/{chunk-Z6T4PQI2.js → chunk-YQSWTVZF.js} +4 -4
  108. package/dist/cli-bundle/chunks/{chunk-RVHYI7SL.js → chunk-YRLLL5TY.js} +8 -8
  109. package/dist/cli-bundle/chunks/{claim-RC56YUWG.js → claim-MPXNVBZQ.js} +10 -10
  110. package/dist/cli-bundle/chunks/{claim-THOJ6CMV.js → claim-SKHJDLW6.js} +10 -10
  111. package/dist/cli-bundle/chunks/{close-SG5MNCVQ.js → close-4RKSL5L6.js} +8 -8
  112. package/dist/cli-bundle/chunks/close-Z6AI736U.js +15 -0
  113. package/dist/cli-bundle/chunks/{close-many-DKQLBGLV.js → close-many-AWTPXLHJ.js} +15 -15
  114. package/dist/cli-bundle/chunks/{close-many-3L3AQZBU.js → close-many-SXODYBDP.js} +15 -15
  115. package/dist/cli-bundle/chunks/{comments-SKWMDWCW.js → comments-OOH64LWW.js} +10 -10
  116. package/dist/cli-bundle/chunks/{comments-M7ZOZNBX.js → comments-YYW5P7AG.js} +10 -10
  117. package/dist/cli-bundle/chunks/{config-OZCUABPB.js → config-3445MCQQ.js} +8 -8
  118. package/dist/cli-bundle/chunks/{config-7CK62S7T.js → config-LCDMKRB2.js} +8 -8
  119. package/dist/cli-bundle/chunks/{context-PUG2A7RC.js → context-DZMIBIVP.js} +13 -13
  120. package/dist/cli-bundle/chunks/{context-OEC366TO.js → context-PJCURODY.js} +13 -13
  121. package/dist/cli-bundle/chunks/{contracts-3THOLA7L.js → contracts-7YDFEJB3.js} +4 -4
  122. package/dist/cli-bundle/chunks/{contracts-N65FXEOL.js → contracts-MP2P3HL5.js} +4 -4
  123. package/dist/cli-bundle/chunks/{copy-JPX7VZCH.js → copy-63IQQRRS.js} +7 -7
  124. package/dist/cli-bundle/chunks/{copy-6QLHILAC.js → copy-TASIH2AZ.js} +7 -7
  125. package/dist/cli-bundle/chunks/create-3BV2VA3Q.js +30 -0
  126. package/dist/cli-bundle/chunks/{create-Y54ZVVZH.js → create-TGSB5GV4.js} +14 -14
  127. package/dist/cli-bundle/chunks/{delete-63PCMQAJ.js → delete-ARILQQLB.js} +7 -7
  128. package/dist/cli-bundle/chunks/{delete-GDSMGAGJ.js → delete-ZQKBZYNK.js} +7 -7
  129. package/dist/cli-bundle/chunks/{deps-T4ZF5G54.js → deps-MSHQR2GY.js} +7 -7
  130. package/dist/cli-bundle/chunks/{deps-XYQ73XRH.js → deps-NJFJIMQ5.js} +7 -7
  131. package/dist/cli-bundle/chunks/{docs-C75YIXHC.js → docs-SS4UKYYA.js} +9 -9
  132. package/dist/cli-bundle/chunks/{docs-EHNPDWUL.js → docs-XK2UVUXX.js} +9 -9
  133. package/dist/cli-bundle/chunks/{eval-GTENKE24.js → eval-FVZGX5IZ.js} +12 -12
  134. package/dist/cli-bundle/chunks/{eval-3WKDTRMH.js → eval-JOTG2YHU.js} +12 -12
  135. package/dist/cli-bundle/chunks/{extension-46NWACO3.js → extension-NLMS47I4.js} +6 -5
  136. package/dist/cli-bundle/chunks/{extension-D5FDZ2CO.js → extension-OQPS27B4.js} +6 -5
  137. package/dist/cli-bundle/chunks/{files-X3H7CCBQ.js → files-3EVJQZ2N.js} +9 -9
  138. package/dist/cli-bundle/chunks/{files-DSZBOSSN.js → files-Y2P6LN5A.js} +9 -9
  139. package/dist/cli-bundle/chunks/{focus-5STQXDPU.js → focus-D5ZUPTII.js} +8 -8
  140. package/dist/cli-bundle/chunks/{focus-MDVPOWB5.js → focus-ZPIFTY4R.js} +8 -8
  141. package/dist/cli-bundle/chunks/{gc-ZMST3WQP.js → gc-LXXDY456.js} +3 -3
  142. package/dist/cli-bundle/chunks/{gc-ZC7JHBG7.js → gc-RNOEQHSX.js} +3 -3
  143. package/dist/cli-bundle/chunks/{get-NT7L2HUZ.js → get-Q3SZGQHD.js} +11 -11
  144. package/dist/cli-bundle/chunks/{get-J2IPJRZW.js → get-W23G7MJX.js} +11 -11
  145. package/dist/cli-bundle/chunks/{health-WOYBR3KU.js → health-5LHSX365.js} +14 -13
  146. package/dist/cli-bundle/chunks/{health-WOYBR3KU.js.map → health-5LHSX365.js.map} +1 -1
  147. package/dist/cli-bundle/chunks/{health-IVMA3XQC.js → health-UDDGJLPP.js} +16 -15
  148. package/dist/cli-bundle/chunks/{health-IVMA3XQC.js.map → health-UDDGJLPP.js.map} +1 -1
  149. package/dist/cli-bundle/chunks/{history-RLH2QCRO.js → history-6CZVFIUJ.js} +10 -10
  150. package/dist/cli-bundle/chunks/history-YRQUD4YM.js +20 -0
  151. package/dist/cli-bundle/chunks/{history-compact-ZBEBGJM7.js → history-compact-M35PDQ4G.js} +12 -12
  152. package/dist/cli-bundle/chunks/{history-compact-UXDIFC33.js → history-compact-VWUSQH6Z.js} +12 -12
  153. package/dist/cli-bundle/chunks/history-redact-27OEOZRZ.js +21 -0
  154. package/dist/cli-bundle/chunks/{history-redact-P7I7AWMB.js → history-redact-AJGARHT3.js} +11 -11
  155. package/dist/cli-bundle/chunks/{history-repair-52KINVIK.js → history-repair-5RDMF7K4.js} +12 -12
  156. package/dist/cli-bundle/chunks/{history-repair-RM5ITLU5.js → history-repair-YUAHIPIN.js} +12 -12
  157. package/dist/cli-bundle/chunks/init-DWAKYRXI.js +21 -0
  158. package/dist/cli-bundle/chunks/{init-2BNZOO6F.js → init-HASX3YNJ.js} +11 -10
  159. package/dist/cli-bundle/chunks/{learnings-W6F3FIPL.js → learnings-JNGUIJDK.js} +10 -10
  160. package/dist/cli-bundle/chunks/{learnings-YGYVHWJK.js → learnings-M4KA6MQE.js} +10 -10
  161. package/dist/cli-bundle/chunks/{list-KPAYU5KZ.js → list-5UU2W24O.js} +10 -10
  162. package/dist/cli-bundle/chunks/{list-K6FPV4J4.js → list-6FMKTIH3.js} +10 -10
  163. package/dist/cli-bundle/chunks/{notes-YTD6ZILW.js → notes-MODH5CBT.js} +10 -10
  164. package/dist/cli-bundle/chunks/{notes-PU74EPKV.js → notes-PYCPLA5Y.js} +10 -10
  165. package/dist/cli-bundle/chunks/{plan-GEQYUCBW.js → plan-DXRIRYRU.js} +14 -14
  166. package/dist/cli-bundle/chunks/{plan-FNXHXRCI.js → plan-EHQALWSC.js} +14 -14
  167. package/dist/cli-bundle/chunks/{register-list-query-QI45RMKN.js → register-list-query-QAASVP2J.js} +19 -19
  168. package/dist/cli-bundle/chunks/{register-list-query-PHWYHENI.js → register-list-query-WE54YJMH.js} +19 -19
  169. package/dist/cli-bundle/chunks/{register-mutation-YINRTS7L.js → register-mutation-B6DZJTY2.js} +33 -33
  170. package/dist/cli-bundle/chunks/{register-mutation-X3BUOQEL.js → register-mutation-CPV4C2KR.js} +33 -33
  171. package/dist/cli-bundle/chunks/{register-operations-E5JEASRK.js → register-operations-AT3BVVX2.js} +32 -32
  172. package/dist/cli-bundle/chunks/{register-operations-MIDTRW7S.js → register-operations-RC4C3423.js} +32 -32
  173. package/dist/cli-bundle/chunks/{register-setup-EG2U6CEU.js → register-setup-HXEHMDHE.js} +23 -18
  174. package/dist/cli-bundle/chunks/register-setup-HXEHMDHE.js.map +7 -0
  175. package/dist/cli-bundle/chunks/{register-setup-DYBFLEZX.js → register-setup-JSMJEFCJ.js} +24 -19
  176. package/dist/cli-bundle/chunks/register-setup-JSMJEFCJ.js.map +1 -0
  177. package/dist/cli-bundle/chunks/{restore-XQYSWBV7.js → restore-FNBV4GWE.js} +11 -11
  178. package/dist/cli-bundle/chunks/restore-XY4YE2OV.js +19 -0
  179. package/dist/cli-bundle/chunks/{scheduling-shortcuts-HJMTEXKE.js → scheduling-shortcuts-ECL6GBMZ.js} +14 -14
  180. package/dist/cli-bundle/chunks/{scheduling-shortcuts-NNT5ASZR.js → scheduling-shortcuts-JRIUREEU.js} +14 -14
  181. package/dist/cli-bundle/chunks/{schema-TZXW6XWD.js → schema-74YENAJL.js} +9 -9
  182. package/dist/cli-bundle/chunks/{schema-263RI4WW.js → schema-TCW3I7QR.js} +9 -9
  183. package/dist/cli-bundle/chunks/{search-SFRJOVDG.js → search-7USZ6XZA.js} +12 -12
  184. package/dist/cli-bundle/chunks/{search-LECJYSXE.js → search-GNAUE65M.js} +12 -12
  185. package/dist/cli-bundle/chunks/{stats-VPBGSRQH.js → stats-CVHASAEU.js} +8 -8
  186. package/dist/cli-bundle/chunks/{stats-N7ER2PNK.js → stats-DQMKJMFT.js} +8 -8
  187. package/dist/cli-bundle/chunks/{telemetry-PP3FUNBU.js → telemetry-7P5EUWCS.js} +4 -4
  188. package/dist/cli-bundle/chunks/{telemetry-L6K3BUIQ.js → telemetry-PQTL5YS2.js} +4 -4
  189. package/dist/cli-bundle/chunks/test-COWPCGBE.js +36 -0
  190. package/dist/cli-bundle/chunks/{test-3EGNS3T5.js → test-FDQZQNZ4.js} +16 -15
  191. package/dist/cli-bundle/chunks/{test-all-ZHFAWNC3.js → test-all-PIPPS4S5.js} +18 -17
  192. package/dist/cli-bundle/chunks/{test-all-ZHFAWNC3.js.map → test-all-PIPPS4S5.js.map} +1 -1
  193. package/dist/cli-bundle/chunks/{test-all-NJ5V2QFS.js → test-all-WQIAZVA6.js} +16 -15
  194. package/dist/cli-bundle/chunks/{test-all-NJ5V2QFS.js.map → test-all-WQIAZVA6.js.map} +1 -1
  195. package/dist/cli-bundle/chunks/{test-runs-GN3C6GOI.js → test-runs-JS6DNCCI.js} +5 -5
  196. package/dist/cli-bundle/chunks/{test-runs-AJHR6IQF.js → test-runs-NZD2QGL5.js} +5 -5
  197. package/dist/cli-bundle/chunks/update-7IYQHX4Q.js +24 -0
  198. package/dist/cli-bundle/chunks/update-IJKDRBIX.js +28 -0
  199. package/dist/cli-bundle/chunks/{update-many-RYQ64CFW.js → update-many-6NTZ5J5D.js} +23 -23
  200. package/dist/cli-bundle/chunks/{update-many-N2AN6ZDH.js → update-many-B3TH5TDS.js} +23 -23
  201. package/dist/cli-bundle/chunks/{upgrade-VPCIYAVW.js → upgrade-4C7VE7MS.js} +8 -7
  202. package/dist/cli-bundle/chunks/{upgrade-VPCIYAVW.js.map → upgrade-4C7VE7MS.js.map} +1 -1
  203. package/dist/cli-bundle/chunks/{upgrade-TJXFLZIX.js → upgrade-76IKZ6EZ.js} +6 -5
  204. package/dist/cli-bundle/chunks/{upgrade-TJXFLZIX.js.map → upgrade-76IKZ6EZ.js.map} +1 -1
  205. package/dist/cli-bundle/chunks/{validate-PHKIYGSY.js → validate-AQU7OCL3.js} +21 -20
  206. package/dist/cli-bundle/chunks/{validate-PHKIYGSY.js.map → validate-AQU7OCL3.js.map} +1 -1
  207. package/dist/cli-bundle/chunks/{validate-JMNWEUYF.js → validate-BPM6Z3OT.js} +23 -22
  208. package/dist/cli-bundle/chunks/{validate-JMNWEUYF.js.map → validate-BPM6Z3OT.js.map} +1 -1
  209. package/dist/cli-bundle/main.js +34 -22
  210. package/dist/cli-bundle/main.js.map +2 -2
  211. package/dist/cli.js +3 -3
  212. package/dist/cli.js.map +1 -1
  213. package/dist/core/extensions/capability-usage.d.ts +82 -0
  214. package/dist/core/extensions/capability-usage.js +133 -0
  215. package/dist/core/extensions/capability-usage.js.map +1 -0
  216. package/dist/core/extensions/extension-capability-aliases.d.ts +7 -0
  217. package/dist/core/extensions/extension-capability-aliases.js +12 -2
  218. package/dist/core/extensions/extension-capability-aliases.js.map +1 -1
  219. package/dist/core/extensions/index.d.ts +1 -0
  220. package/dist/core/extensions/index.js +3 -2
  221. package/dist/core/extensions/index.js.map +1 -1
  222. package/dist/sdk/cli-contracts.d.ts +1 -0
  223. package/dist/sdk/cli-contracts.js +18 -13
  224. package/dist/sdk/cli-contracts.js.map +1 -1
  225. package/dist/sdk/index.d.ts +7 -2
  226. package/dist/sdk/index.js +8 -3
  227. package/dist/sdk/index.js.map +1 -1
  228. package/dist/sdk/testing.d.ts +520 -1
  229. package/dist/sdk/testing.js +477 -18
  230. package/dist/sdk/testing.js.map +1 -1
  231. package/docs/EXTENSIONS.md +4 -8
  232. package/docs/SDK.md +257 -0
  233. package/package.json +2 -2
  234. package/dist/cli-bundle/chunks/activity-CIHV64UC.js +0 -18
  235. package/dist/cli-bundle/chunks/chunk-32R4PIC6.js.map +0 -1
  236. package/dist/cli-bundle/chunks/chunk-434HM6Z5.js.map +0 -1
  237. package/dist/cli-bundle/chunks/chunk-5PCI3UBT.js.map +0 -7
  238. package/dist/cli-bundle/chunks/chunk-A4Z7ZOL5.js.map +0 -1
  239. package/dist/cli-bundle/chunks/chunk-HMOADQVT.js.map +0 -7
  240. package/dist/cli-bundle/chunks/close-DNMHGOCX.js +0 -15
  241. package/dist/cli-bundle/chunks/create-NNP6TSFO.js +0 -30
  242. package/dist/cli-bundle/chunks/history-WX3MGFS2.js +0 -20
  243. package/dist/cli-bundle/chunks/history-redact-YQGU3XRA.js +0 -21
  244. package/dist/cli-bundle/chunks/init-SC2P6CHP.js +0 -20
  245. package/dist/cli-bundle/chunks/register-setup-DYBFLEZX.js.map +0 -1
  246. package/dist/cli-bundle/chunks/register-setup-EG2U6CEU.js.map +0 -7
  247. package/dist/cli-bundle/chunks/restore-5KHR2YYQ.js +0 -19
  248. package/dist/cli-bundle/chunks/test-RQCTSWUK.js +0 -35
  249. package/dist/cli-bundle/chunks/update-6YXOGHRT.js +0 -24
  250. package/dist/cli-bundle/chunks/update-V33YUBRP.js +0 -28
  251. /package/dist/cli-bundle/chunks/{activity-KW3IRP44.js.map → activity-DXS2XMQU.js.map} +0 -0
  252. /package/dist/cli-bundle/chunks/{activity-CIHV64UC.js.map → activity-NEOI45NX.js.map} +0 -0
  253. /package/dist/cli-bundle/chunks/{aggregate-FIGQEIL3.js.map → aggregate-IHM4KMQ3.js.map} +0 -0
  254. /package/dist/cli-bundle/chunks/{aggregate-3ZKQG5SW.js.map → aggregate-NMYDVQF7.js.map} +0 -0
  255. /package/dist/cli-bundle/chunks/{append-EWJYJ7CH.js.map → append-3HY5G7ET.js.map} +0 -0
  256. /package/dist/cli-bundle/chunks/{append-QEOLX3XB.js.map → append-K54MDQYC.js.map} +0 -0
  257. /package/dist/cli-bundle/chunks/{chunk-CF55WVVS.js.map → chunk-25XZN3JD.js.map} +0 -0
  258. /package/dist/cli-bundle/chunks/{chunk-WQ7NIVDK.js.map → chunk-2LEYMXI6.js.map} +0 -0
  259. /package/dist/cli-bundle/chunks/{chunk-FRUFKWNK.js.map → chunk-3VLPDG3J.js.map} +0 -0
  260. /package/dist/cli-bundle/chunks/{chunk-C3AZ5ZML.js.map → chunk-44O4JIN6.js.map} +0 -0
  261. /package/dist/cli-bundle/chunks/{chunk-J4MYYSOL.js.map → chunk-47HTJ6BU.js.map} +0 -0
  262. /package/dist/cli-bundle/chunks/{chunk-YCJX76PW.js.map → chunk-4JXWVHMN.js.map} +0 -0
  263. /package/dist/cli-bundle/chunks/{chunk-37QXHBIB.js.map → chunk-4SDKF5BG.js.map} +0 -0
  264. /package/dist/cli-bundle/chunks/{chunk-NJHMAJ6N.js.map → chunk-5SESR24H.js.map} +0 -0
  265. /package/dist/cli-bundle/chunks/{chunk-2EIMPCE4.js.map → chunk-6FQHNHQQ.js.map} +0 -0
  266. /package/dist/cli-bundle/chunks/{chunk-5FIEHKEX.js.map → chunk-6UPTNMVW.js.map} +0 -0
  267. /package/dist/cli-bundle/chunks/{chunk-FKBDKV7Y.js.map → chunk-75VEYQJS.js.map} +0 -0
  268. /package/dist/cli-bundle/chunks/{chunk-GMHPNNYG.js.map → chunk-77VKGH4L.js.map} +0 -0
  269. /package/dist/cli-bundle/chunks/{chunk-OFYMIDF2.js.map → chunk-7MALIV5H.js.map} +0 -0
  270. /package/dist/cli-bundle/chunks/{chunk-RLK7P77C.js.map → chunk-7PBGTIN3.js.map} +0 -0
  271. /package/dist/cli-bundle/chunks/{chunk-6H4LF7AO.js.map → chunk-A25LOPRG.js.map} +0 -0
  272. /package/dist/cli-bundle/chunks/{chunk-M5XALUSL.js.map → chunk-A7E4ZXG2.js.map} +0 -0
  273. /package/dist/cli-bundle/chunks/{chunk-7D3SAQXM.js.map → chunk-AJXYOYJV.js.map} +0 -0
  274. /package/dist/cli-bundle/chunks/{chunk-HCU6WUSY.js.map → chunk-B2KR24R4.js.map} +0 -0
  275. /package/dist/cli-bundle/chunks/{chunk-2GCDRRIF.js.map → chunk-C5SWTISA.js.map} +0 -0
  276. /package/dist/cli-bundle/chunks/{chunk-AIS5PGI3.js.map → chunk-CLLVBO3I.js.map} +0 -0
  277. /package/dist/cli-bundle/chunks/{chunk-QGG32QHW.js.map → chunk-CR7KFPAQ.js.map} +0 -0
  278. /package/dist/cli-bundle/chunks/{chunk-UV6IYE5U.js.map → chunk-CWPBGUC7.js.map} +0 -0
  279. /package/dist/cli-bundle/chunks/{chunk-QQHISQBJ.js.map → chunk-DBQUQ3AS.js.map} +0 -0
  280. /package/dist/cli-bundle/chunks/{chunk-5QICDWMV.js.map → chunk-DHBPJ7VG.js.map} +0 -0
  281. /package/dist/cli-bundle/chunks/{chunk-SRYYRVPB.js.map → chunk-DMT4ODVN.js.map} +0 -0
  282. /package/dist/cli-bundle/chunks/{chunk-PUH4D67U.js.map → chunk-DU64SZUQ.js.map} +0 -0
  283. /package/dist/cli-bundle/chunks/{chunk-C4N5I7ZW.js.map → chunk-EVPVCE4R.js.map} +0 -0
  284. /package/dist/cli-bundle/chunks/{chunk-3EWSGA7N.js.map → chunk-FK6MV5F5.js.map} +0 -0
  285. /package/dist/cli-bundle/chunks/{chunk-NIUEXCFS.js.map → chunk-GGAXE22C.js.map} +0 -0
  286. /package/dist/cli-bundle/chunks/{chunk-SX75ADBK.js.map → chunk-GNDHOR64.js.map} +0 -0
  287. /package/dist/cli-bundle/chunks/{chunk-GOZUHWFD.js.map → chunk-GU7YHKYP.js.map} +0 -0
  288. /package/dist/cli-bundle/chunks/{chunk-NXS7ZKAK.js.map → chunk-GXBSFKSX.js.map} +0 -0
  289. /package/dist/cli-bundle/chunks/{chunk-NJN7LL7U.js.map → chunk-H6FNDCDI.js.map} +0 -0
  290. /package/dist/cli-bundle/chunks/{chunk-FWPDUYEY.js.map → chunk-HYQV75IB.js.map} +0 -0
  291. /package/dist/cli-bundle/chunks/{chunk-F5NZWFSW.js.map → chunk-I367IDZP.js.map} +0 -0
  292. /package/dist/cli-bundle/chunks/{chunk-52OCIDPG.js.map → chunk-I6XE47J2.js.map} +0 -0
  293. /package/dist/cli-bundle/chunks/{chunk-HIP7WVTL.js.map → chunk-J2TSPY5L.js.map} +0 -0
  294. /package/dist/cli-bundle/chunks/{chunk-2PKHRP6G.js.map → chunk-JLSC5NPC.js.map} +0 -0
  295. /package/dist/cli-bundle/chunks/{chunk-PP2U4NMT.js.map → chunk-JY25IOEZ.js.map} +0 -0
  296. /package/dist/cli-bundle/chunks/{chunk-Q2J2HJUN.js.map → chunk-K25UDYJ4.js.map} +0 -0
  297. /package/dist/cli-bundle/chunks/{chunk-SBGXDO7A.js.map → chunk-KBTREGVO.js.map} +0 -0
  298. /package/dist/cli-bundle/chunks/{chunk-QZTWBFXJ.js.map → chunk-KK4TQ3ZP.js.map} +0 -0
  299. /package/dist/cli-bundle/chunks/{chunk-NIGXMNNI.js.map → chunk-KRJJPDUO.js.map} +0 -0
  300. /package/dist/cli-bundle/chunks/{chunk-AZMOLBN3.js.map → chunk-MD7XKVWI.js.map} +0 -0
  301. /package/dist/cli-bundle/chunks/{chunk-6ZXM2XNF.js.map → chunk-MNGAQB2E.js.map} +0 -0
  302. /package/dist/cli-bundle/chunks/{chunk-3MDHREEV.js.map → chunk-NIWY4V4Z.js.map} +0 -0
  303. /package/dist/cli-bundle/chunks/{chunk-TKBHZPKD.js.map → chunk-NKZOJPXK.js.map} +0 -0
  304. /package/dist/cli-bundle/chunks/{chunk-CZPXY7UW.js.map → chunk-NVUATMTC.js.map} +0 -0
  305. /package/dist/cli-bundle/chunks/{chunk-LEU5GHRC.js.map → chunk-P7ZU73BO.js.map} +0 -0
  306. /package/dist/cli-bundle/chunks/{chunk-NSBZ2CKF.js.map → chunk-PCH2JTEO.js.map} +0 -0
  307. /package/dist/cli-bundle/chunks/{chunk-B473GZWW.js.map → chunk-PJS2J7Z4.js.map} +0 -0
  308. /package/dist/cli-bundle/chunks/{chunk-5IDI42VV.js.map → chunk-QQWEROGS.js.map} +0 -0
  309. /package/dist/cli-bundle/chunks/{chunk-6M4RJS4M.js.map → chunk-RPRFBXND.js.map} +0 -0
  310. /package/dist/cli-bundle/chunks/{chunk-N5ZJACJ6.js.map → chunk-SFKQAVZA.js.map} +0 -0
  311. /package/dist/cli-bundle/chunks/{chunk-EBH56IXK.js.map → chunk-THKDPOS5.js.map} +0 -0
  312. /package/dist/cli-bundle/chunks/{chunk-LUWW7L4B.js.map → chunk-TIKJAXQW.js.map} +0 -0
  313. /package/dist/cli-bundle/chunks/{chunk-OTHIWLMB.js.map → chunk-TJABI6PR.js.map} +0 -0
  314. /package/dist/cli-bundle/chunks/{chunk-76Z3YSHV.js.map → chunk-TZQKEBKF.js.map} +0 -0
  315. /package/dist/cli-bundle/chunks/{chunk-PFSRUHDH.js.map → chunk-UKK2VTTH.js.map} +0 -0
  316. /package/dist/cli-bundle/chunks/{chunk-H7NJZWG2.js.map → chunk-V4SM4UAL.js.map} +0 -0
  317. /package/dist/cli-bundle/chunks/{chunk-CZUB4XWO.js.map → chunk-VB54F347.js.map} +0 -0
  318. /package/dist/cli-bundle/chunks/{chunk-O47BPOPC.js.map → chunk-WBSYW3NT.js.map} +0 -0
  319. /package/dist/cli-bundle/chunks/{chunk-UPE3CDD7.js.map → chunk-WQDX7DVG.js.map} +0 -0
  320. /package/dist/cli-bundle/chunks/{chunk-NB3PYLQ6.js.map → chunk-XKNF3VRJ.js.map} +0 -0
  321. /package/dist/cli-bundle/chunks/{chunk-F7K5GWP3.js.map → chunk-Y335KFHD.js.map} +0 -0
  322. /package/dist/cli-bundle/chunks/{chunk-D7FYS6PG.js.map → chunk-Y4BZEND6.js.map} +0 -0
  323. /package/dist/cli-bundle/chunks/{chunk-6CJWZAN7.js.map → chunk-YATDFWYK.js.map} +0 -0
  324. /package/dist/cli-bundle/chunks/{chunk-UEMNL33O.js.map → chunk-YJICYNAV.js.map} +0 -0
  325. /package/dist/cli-bundle/chunks/{chunk-Z6T4PQI2.js.map → chunk-YQSWTVZF.js.map} +0 -0
  326. /package/dist/cli-bundle/chunks/{chunk-RVHYI7SL.js.map → chunk-YRLLL5TY.js.map} +0 -0
  327. /package/dist/cli-bundle/chunks/{claim-RC56YUWG.js.map → claim-MPXNVBZQ.js.map} +0 -0
  328. /package/dist/cli-bundle/chunks/{claim-THOJ6CMV.js.map → claim-SKHJDLW6.js.map} +0 -0
  329. /package/dist/cli-bundle/chunks/{close-SG5MNCVQ.js.map → close-4RKSL5L6.js.map} +0 -0
  330. /package/dist/cli-bundle/chunks/{close-DNMHGOCX.js.map → close-Z6AI736U.js.map} +0 -0
  331. /package/dist/cli-bundle/chunks/{close-many-DKQLBGLV.js.map → close-many-AWTPXLHJ.js.map} +0 -0
  332. /package/dist/cli-bundle/chunks/{close-many-3L3AQZBU.js.map → close-many-SXODYBDP.js.map} +0 -0
  333. /package/dist/cli-bundle/chunks/{comments-SKWMDWCW.js.map → comments-OOH64LWW.js.map} +0 -0
  334. /package/dist/cli-bundle/chunks/{comments-M7ZOZNBX.js.map → comments-YYW5P7AG.js.map} +0 -0
  335. /package/dist/cli-bundle/chunks/{config-OZCUABPB.js.map → config-3445MCQQ.js.map} +0 -0
  336. /package/dist/cli-bundle/chunks/{config-7CK62S7T.js.map → config-LCDMKRB2.js.map} +0 -0
  337. /package/dist/cli-bundle/chunks/{context-PUG2A7RC.js.map → context-DZMIBIVP.js.map} +0 -0
  338. /package/dist/cli-bundle/chunks/{context-OEC366TO.js.map → context-PJCURODY.js.map} +0 -0
  339. /package/dist/cli-bundle/chunks/{contracts-3THOLA7L.js.map → contracts-7YDFEJB3.js.map} +0 -0
  340. /package/dist/cli-bundle/chunks/{contracts-N65FXEOL.js.map → contracts-MP2P3HL5.js.map} +0 -0
  341. /package/dist/cli-bundle/chunks/{copy-JPX7VZCH.js.map → copy-63IQQRRS.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{copy-6QLHILAC.js.map → copy-TASIH2AZ.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{create-NNP6TSFO.js.map → create-3BV2VA3Q.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{create-Y54ZVVZH.js.map → create-TGSB5GV4.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{delete-63PCMQAJ.js.map → delete-ARILQQLB.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{delete-GDSMGAGJ.js.map → delete-ZQKBZYNK.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{deps-T4ZF5G54.js.map → deps-MSHQR2GY.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{deps-XYQ73XRH.js.map → deps-NJFJIMQ5.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{docs-C75YIXHC.js.map → docs-SS4UKYYA.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{docs-EHNPDWUL.js.map → docs-XK2UVUXX.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{eval-GTENKE24.js.map → eval-FVZGX5IZ.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{eval-3WKDTRMH.js.map → eval-JOTG2YHU.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{extension-46NWACO3.js.map → extension-NLMS47I4.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{extension-D5FDZ2CO.js.map → extension-OQPS27B4.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{files-X3H7CCBQ.js.map → files-3EVJQZ2N.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{files-DSZBOSSN.js.map → files-Y2P6LN5A.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{focus-5STQXDPU.js.map → focus-D5ZUPTII.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{focus-MDVPOWB5.js.map → focus-ZPIFTY4R.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{gc-ZMST3WQP.js.map → gc-LXXDY456.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{gc-ZC7JHBG7.js.map → gc-RNOEQHSX.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{get-NT7L2HUZ.js.map → get-Q3SZGQHD.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{get-J2IPJRZW.js.map → get-W23G7MJX.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{history-RLH2QCRO.js.map → history-6CZVFIUJ.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{history-WX3MGFS2.js.map → history-YRQUD4YM.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{history-compact-ZBEBGJM7.js.map → history-compact-M35PDQ4G.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{history-compact-UXDIFC33.js.map → history-compact-VWUSQH6Z.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{history-redact-YQGU3XRA.js.map → history-redact-27OEOZRZ.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{history-redact-P7I7AWMB.js.map → history-redact-AJGARHT3.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{history-repair-52KINVIK.js.map → history-repair-5RDMF7K4.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{history-repair-RM5ITLU5.js.map → history-repair-YUAHIPIN.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{init-SC2P6CHP.js.map → init-DWAKYRXI.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{init-2BNZOO6F.js.map → init-HASX3YNJ.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{learnings-W6F3FIPL.js.map → learnings-JNGUIJDK.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{learnings-YGYVHWJK.js.map → learnings-M4KA6MQE.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{list-KPAYU5KZ.js.map → list-5UU2W24O.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{list-K6FPV4J4.js.map → list-6FMKTIH3.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{notes-YTD6ZILW.js.map → notes-MODH5CBT.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{notes-PU74EPKV.js.map → notes-PYCPLA5Y.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{plan-GEQYUCBW.js.map → plan-DXRIRYRU.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{plan-FNXHXRCI.js.map → plan-EHQALWSC.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{register-list-query-QI45RMKN.js.map → register-list-query-QAASVP2J.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{register-list-query-PHWYHENI.js.map → register-list-query-WE54YJMH.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{register-mutation-YINRTS7L.js.map → register-mutation-B6DZJTY2.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{register-mutation-X3BUOQEL.js.map → register-mutation-CPV4C2KR.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{register-operations-E5JEASRK.js.map → register-operations-AT3BVVX2.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{register-operations-MIDTRW7S.js.map → register-operations-RC4C3423.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{restore-XQYSWBV7.js.map → restore-FNBV4GWE.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{restore-5KHR2YYQ.js.map → restore-XY4YE2OV.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-HJMTEXKE.js.map → scheduling-shortcuts-ECL6GBMZ.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-NNT5ASZR.js.map → scheduling-shortcuts-JRIUREEU.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{schema-TZXW6XWD.js.map → schema-74YENAJL.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{schema-263RI4WW.js.map → schema-TCW3I7QR.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{search-SFRJOVDG.js.map → search-7USZ6XZA.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{search-LECJYSXE.js.map → search-GNAUE65M.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{stats-VPBGSRQH.js.map → stats-CVHASAEU.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{stats-N7ER2PNK.js.map → stats-DQMKJMFT.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{telemetry-PP3FUNBU.js.map → telemetry-7P5EUWCS.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{telemetry-L6K3BUIQ.js.map → telemetry-PQTL5YS2.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{test-RQCTSWUK.js.map → test-COWPCGBE.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{test-3EGNS3T5.js.map → test-FDQZQNZ4.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{test-runs-GN3C6GOI.js.map → test-runs-JS6DNCCI.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{test-runs-AJHR6IQF.js.map → test-runs-NZD2QGL5.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{update-6YXOGHRT.js.map → update-7IYQHX4Q.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{update-V33YUBRP.js.map → update-IJKDRBIX.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{update-many-RYQ64CFW.js.map → update-many-6NTZ5J5D.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{update-many-N2AN6ZDH.js.map → update-many-B3TH5TDS.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -5,14 +5,14 @@
5
5
  * Bootstraps the executable pm CLI entrypoint and startup optimizations.
6
6
  */
7
7
 
8
- !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]="50b88050-16c3-5d09-886d-d265e0c50a2c")}catch(e){}}();
8
+ !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]="b1ba95ef-36cf-582b-8e85-d085a047afd2")}catch(e){}}();
9
9
  import fs from "node:fs";
10
10
  import * as nodeModule from "node:module";
11
11
  import os from "node:os";
12
12
  import path from "node:path";
13
13
  import { fileURLToPath } from "node:url";
14
14
  function enableNodeCompileCache() {
15
- const enableCompileCache = nodeModule.enableCompileCache;
15
+ const { enableCompileCache } = nodeModule;
16
16
  if (typeof enableCompileCache !== "function" || process.env.PM_CLI_DISABLE_COMPILE_CACHE === "1") {
17
17
  return;
18
18
  }
@@ -82,4 +82,4 @@ if (!printFastVersionIfRequested()) {
82
82
  await runPmCli(process.argv.slice(2));
83
83
  }
84
84
  //# sourceMappingURL=cli.js.map
85
- //# debugId=50b88050-16c3-5d09-886d-d265e0c50a2c
85
+ //# debugId=b1ba95ef-36cf-582b-8e85-d085a047afd2
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sources":["cli.ts"],"sourceRoot":"/","sourcesContent":["#!/usr/bin/env node\n/**\n * @module cli\n *\n * Bootstraps the executable pm CLI entrypoint and startup optimizations.\n */\nimport fs from \"node:fs\";\nimport * as nodeModule from \"node:module\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nfunction enableNodeCompileCache(): void {\n const enableCompileCache = nodeModule.enableCompileCache as\n | ((cacheDir?: string) => { status?: number; message?: string })\n | undefined;\n if (typeof enableCompileCache !== \"function\" || process.env.PM_CLI_DISABLE_COMPILE_CACHE === \"1\") {\n return;\n }\n const userCacheKey =\n typeof process.getuid === \"function\"\n ? String(process.getuid())\n : os.userInfo().username.replace(/[^a-zA-Z0-9._-]/g, \"_\");\n const cacheDir =\n process.env.PM_CLI_COMPILE_CACHE_DIR ?? path.join(os.tmpdir(), `pm-cli-node-compile-cache-${userCacheKey}`);\n try {\n enableCompileCache(cacheDir);\n } catch {\n // Compile caching is a startup optimization only; never block CLI execution.\n }\n}\n\nfunction findPackageJson(startPath: string): string | undefined {\n let current = path.dirname(path.resolve(startPath));\n while (true) {\n const candidate = path.join(current, \"package.json\");\n if (fs.existsSync(candidate)) {\n return candidate;\n }\n const parent = path.dirname(current);\n if (parent === current) {\n return undefined;\n }\n current = parent;\n }\n}\n\nfunction printFastVersionIfRequested(): boolean {\n const args = process.argv.slice(2);\n const versionArgs = args.filter((arg) => arg !== \"--no-extensions\");\n if (versionArgs.length !== 1 || (versionArgs[0] !== \"--version\" && versionArgs[0] !== \"-V\")) {\n return false;\n }\n const version = readPackageVersionForPath(fileURLToPath(import.meta.url));\n if (version === undefined) {\n return false;\n }\n console.log(version);\n return true;\n}\n\nfunction readPackageVersionForPath(startPath: string): string | undefined {\n const packageJsonPath = findPackageJson(startPath);\n if (!packageJsonPath) {\n return undefined;\n }\n try {\n const parsed = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\")) as { version?: unknown };\n if (typeof parsed.version !== \"string\") {\n return undefined;\n }\n return parsed.version;\n } catch {\n return undefined;\n }\n}\n\nexport const _testOnly = {\n enableNodeCompileCache,\n findPackageJson,\n printFastVersionIfRequested,\n readPackageVersionForPath,\n};\n\nif (!printFastVersionIfRequested()) {\n enableNodeCompileCache();\n const { runPmCli } = await import(\"./cli/main.js\");\n await runPmCli(process.argv.slice(2));\n}\n"],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C,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,sBAAsB;IACtB,eAAe;IACf,2BAA2B;IAC3B,yBAAyB;CAC1B,CAAC;AAEF,IAAI,CAAC,2BAA2B,EAAE,EAAE,CAAC;IACnC,sBAAsB,EAAE,CAAC;IACzB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,CAAC;IACnD,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACxC,CAAC","debugId":"50b88050-16c3-5d09-886d-d265e0c50a2c"}
1
+ {"version":3,"file":"cli.js","sources":["cli.ts"],"sourceRoot":"/","sourcesContent":["#!/usr/bin/env node\n/**\n * @module cli\n *\n * Bootstraps the executable pm CLI entrypoint and startup optimizations.\n */\nimport fs from \"node:fs\";\nimport * as nodeModule from \"node:module\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\ntype NodeModuleWithCompileCache = typeof nodeModule & {\n enableCompileCache?: (cacheDir?: string) => { status?: number; message?: string };\n};\n\nfunction enableNodeCompileCache(): void {\n const { enableCompileCache } = nodeModule as NodeModuleWithCompileCache;\n if (typeof enableCompileCache !== \"function\" || process.env.PM_CLI_DISABLE_COMPILE_CACHE === \"1\") {\n return;\n }\n const userCacheKey =\n typeof process.getuid === \"function\"\n ? String(process.getuid())\n : os.userInfo().username.replace(/[^a-zA-Z0-9._-]/g, \"_\");\n const cacheDir =\n process.env.PM_CLI_COMPILE_CACHE_DIR ?? path.join(os.tmpdir(), `pm-cli-node-compile-cache-${userCacheKey}`);\n try {\n enableCompileCache(cacheDir);\n } catch {\n // Compile caching is a startup optimization only; never block CLI execution.\n }\n}\n\nfunction findPackageJson(startPath: string): string | undefined {\n let current = path.dirname(path.resolve(startPath));\n while (true) {\n const candidate = path.join(current, \"package.json\");\n if (fs.existsSync(candidate)) {\n return candidate;\n }\n const parent = path.dirname(current);\n if (parent === current) {\n return undefined;\n }\n current = parent;\n }\n}\n\nfunction printFastVersionIfRequested(): boolean {\n const args = process.argv.slice(2);\n const versionArgs = args.filter((arg) => arg !== \"--no-extensions\");\n if (versionArgs.length !== 1 || (versionArgs[0] !== \"--version\" && versionArgs[0] !== \"-V\")) {\n return false;\n }\n const version = readPackageVersionForPath(fileURLToPath(import.meta.url));\n if (version === undefined) {\n return false;\n }\n console.log(version);\n return true;\n}\n\nfunction readPackageVersionForPath(startPath: string): string | undefined {\n const packageJsonPath = findPackageJson(startPath);\n if (!packageJsonPath) {\n return undefined;\n }\n try {\n const parsed = JSON.parse(fs.readFileSync(packageJsonPath, \"utf8\")) as { version?: unknown };\n if (typeof parsed.version !== \"string\") {\n return undefined;\n }\n return parsed.version;\n } catch {\n return undefined;\n }\n}\n\nexport const _testOnly = {\n enableNodeCompileCache,\n findPackageJson,\n printFastVersionIfRequested,\n readPackageVersionForPath,\n};\n\nif (!printFastVersionIfRequested()) {\n enableNodeCompileCache();\n const { runPmCli } = await import(\"./cli/main.js\");\n await runPmCli(process.argv.slice(2));\n}\n"],"names":[],"mappings":";AACA;;;;GAIG;;;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMzC,SAAS,sBAAsB;IAC7B,MAAM,EAAE,kBAAkB,EAAE,GAAG,UAAwC,CAAC;IACxE,IAAI,OAAO,kBAAkB,KAAK,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,4BAA4B,KAAK,GAAG,EAAE,CAAC;QACjG,O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AC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACxC,CAAC","debugId":"b1ba95ef-36cf-582b-8e85-d085a047afd2"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * @module core/extensions/capability-usage
3
+ *
4
+ * Reconciles the capabilities an extension manifest *declares* against the
5
+ * capabilities it actually *exercises* during activation.
6
+ *
7
+ * The loader already enforces the opposite direction — registering a surface
8
+ * whose capability is absent from `manifest.capabilities` throws an
9
+ * `extension_capability_missing` activation failure. This module closes the
10
+ * least-privilege loop by detecting capabilities a manifest declares but never
11
+ * registers against, so package authors can trim manifests to the minimum
12
+ * grant. Every declared-but-unused capability is an over-broad permission a
13
+ * reviewer would otherwise have to catch by hand.
14
+ */
15
+ import type { ExtensionActivationResult, ExtensionCapability, ExtensionLayer } from "./extension-types.js";
16
+ /**
17
+ * Canonical map from each known extension capability to the human-readable
18
+ * registration surfaces that exercise it.
19
+ *
20
+ * The `satisfies Record<ExtensionCapability, ...>` guard makes this exhaustive
21
+ * at compile time: adding a capability to `KNOWN_EXTENSION_CAPABILITIES`
22
+ * without giving it a registration surface here fails the build, which prevents
23
+ * a capability that has *no* surface from being perpetually flagged as unused.
24
+ */
25
+ export declare const EXTENSION_CAPABILITY_REGISTRATION_SURFACES: {
26
+ readonly commands: readonly ["registerCommand", "command override", "command handler"];
27
+ readonly renderers: readonly ["registerRenderer"];
28
+ readonly hooks: readonly ["hooks.beforeCommand", "hooks.afterCommand", "hooks.onWrite", "hooks.onRead", "hooks.onIndex"];
29
+ readonly schema: readonly ["registerFlags", "registerItemFields", "registerItemTypes", "registerMigration"];
30
+ readonly importers: readonly ["registerImporter", "registerExporter"];
31
+ readonly search: readonly ["registerSearchProvider", "registerVectorStoreAdapter"];
32
+ readonly parser: readonly ["registerParser"];
33
+ readonly preflight: readonly ["registerPreflight"];
34
+ readonly services: readonly ["registerService"];
35
+ };
36
+ /**
37
+ * Per-extension reconciliation of declared versus exercised capabilities.
38
+ */
39
+ export interface ExtensionCapabilityUsageReconciliation {
40
+ /** Layer the extension was loaded from (`global` or `project`). */
41
+ layer: ExtensionLayer;
42
+ /** Extension name as it appears in the manifest. */
43
+ name: string;
44
+ /** Known capabilities declared in the manifest, sorted and de-duplicated. */
45
+ declared: ExtensionCapability[];
46
+ /** Known capabilities the extension actually registered against, sorted. */
47
+ used: ExtensionCapability[];
48
+ /** Declared capabilities with no matching registration (least-privilege gap). */
49
+ unused: ExtensionCapability[];
50
+ }
51
+ /**
52
+ * Options for {@link collectUsedExtensionCapabilities}.
53
+ */
54
+ export interface CollectUsedExtensionCapabilitiesOptions {
55
+ /**
56
+ * Restrict the result to a single extension by name. Names are matched
57
+ * case-insensitively after trimming. Omit to union across every extension in
58
+ * the activation result.
59
+ */
60
+ extensionName?: string;
61
+ }
62
+ /**
63
+ * Collect the known capabilities exercised across an activation result.
64
+ *
65
+ * Without {@link CollectUsedExtensionCapabilitiesOptions.extensionName} the
66
+ * result unions every extension in the activation; with it, only the matching
67
+ * extension's registrations contribute (across both layers).
68
+ */
69
+ export declare function collectUsedExtensionCapabilities(activation: ExtensionActivationResult, options?: CollectUsedExtensionCapabilitiesOptions): ExtensionCapability[];
70
+ /**
71
+ * Reconcile each loaded extension's declared capabilities against what it
72
+ * exercised during activation.
73
+ *
74
+ * Extensions with no known declared capabilities are skipped — there is nothing
75
+ * to reconcile. The returned entries preserve every reconcilable extension even
76
+ * when `unused` is empty so callers can report fully-minimal manifests too.
77
+ */
78
+ export declare function reconcileExtensionCapabilityUsage(loaded: ReadonlyArray<{
79
+ layer: ExtensionLayer;
80
+ name: string;
81
+ capabilities?: readonly string[];
82
+ }>, activation: ExtensionActivationResult): ExtensionCapabilityUsageReconciliation[];
@@ -0,0 +1,133 @@
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){}}();
3
+ import { normalizeKnownExtensionCapability } from "./extension-capability-aliases.js";
4
+ /**
5
+ * Canonical map from each known extension capability to the human-readable
6
+ * registration surfaces that exercise it.
7
+ *
8
+ * The `satisfies Record<ExtensionCapability, ...>` guard makes this exhaustive
9
+ * at compile time: adding a capability to `KNOWN_EXTENSION_CAPABILITIES`
10
+ * without giving it a registration surface here fails the build, which prevents
11
+ * a capability that has *no* surface from being perpetually flagged as unused.
12
+ */
13
+ export const EXTENSION_CAPABILITY_REGISTRATION_SURFACES = {
14
+ commands: ["registerCommand", "command override", "command handler"],
15
+ renderers: ["registerRenderer"],
16
+ hooks: ["hooks.beforeCommand", "hooks.afterCommand", "hooks.onWrite", "hooks.onRead", "hooks.onIndex"],
17
+ schema: ["registerFlags", "registerItemFields", "registerItemTypes", "registerMigration"],
18
+ importers: ["registerImporter", "registerExporter"],
19
+ search: ["registerSearchProvider", "registerVectorStoreAdapter"],
20
+ parser: ["registerParser"],
21
+ preflight: ["registerPreflight"],
22
+ services: ["registerService"],
23
+ };
24
+ // `layer` is a closed enum (`"global" | "project"`) that never contains a
25
+ // colon, so the first colon always separates the layer from the (possibly
26
+ // colon-bearing) name — making the key collision-proof without serialization.
27
+ const USAGE_KEY_SEPARATOR = ":";
28
+ function usageKey(layer, name) {
29
+ return `${layer}${USAGE_KEY_SEPARATOR}${normalizeExtensionName(name)}`;
30
+ }
31
+ function usageKeyName(key) {
32
+ return key.slice(key.indexOf(USAGE_KEY_SEPARATOR) + 1);
33
+ }
34
+ function normalizeExtensionName(name) {
35
+ return name.trim().toLowerCase();
36
+ }
37
+ function normalizeDeclaredCapabilities(capabilities) {
38
+ if (!Array.isArray(capabilities)) {
39
+ return [];
40
+ }
41
+ const known = new Set();
42
+ for (const capability of capabilities) {
43
+ // Unknown capabilities are reported by the separate unknown-capability
44
+ // diagnostic; reconciling them here would double-report a typo as "unused".
45
+ const normalized = normalizeKnownExtensionCapability(capability);
46
+ if (normalized !== null) {
47
+ known.add(normalized);
48
+ }
49
+ }
50
+ return [...known].sort((left, right) => left.localeCompare(right));
51
+ }
52
+ function attributeCapabilityUsage(activation) {
53
+ const usage = new Map();
54
+ const record = (entries, capability) => {
55
+ for (const entry of entries) {
56
+ const key = usageKey(entry.layer, entry.name);
57
+ let exercised = usage.get(key);
58
+ if (exercised === undefined) {
59
+ exercised = new Set();
60
+ usage.set(key, exercised);
61
+ }
62
+ exercised.add(capability);
63
+ }
64
+ };
65
+ const { registrations, commands, parsers, preflight, services, renderers, hooks } = activation;
66
+ record(registrations.commands, "commands");
67
+ record(commands.overrides, "commands");
68
+ record(commands.handlers, "commands");
69
+ record(registrations.flags, "schema");
70
+ record(registrations.item_fields, "schema");
71
+ record(registrations.item_types, "schema");
72
+ record(registrations.migrations, "schema");
73
+ record(registrations.importers, "importers");
74
+ record(registrations.exporters, "importers");
75
+ record(registrations.search_providers, "search");
76
+ record(registrations.vector_store_adapters, "search");
77
+ record(parsers.overrides, "parser");
78
+ record(preflight.overrides, "preflight");
79
+ record(services.overrides, "services");
80
+ record(renderers.overrides, "renderers");
81
+ record(hooks.beforeCommand, "hooks");
82
+ record(hooks.afterCommand, "hooks");
83
+ record(hooks.onWrite, "hooks");
84
+ record(hooks.onRead, "hooks");
85
+ record(hooks.onIndex, "hooks");
86
+ return usage;
87
+ }
88
+ /**
89
+ * Collect the known capabilities exercised across an activation result.
90
+ *
91
+ * Without {@link CollectUsedExtensionCapabilitiesOptions.extensionName} the
92
+ * result unions every extension in the activation; with it, only the matching
93
+ * extension's registrations contribute (across both layers).
94
+ */
95
+ export function collectUsedExtensionCapabilities(activation, options = {}) {
96
+ const usage = attributeCapabilityUsage(activation);
97
+ const filter = options.extensionName !== undefined ? normalizeExtensionName(options.extensionName) : null;
98
+ const used = new Set();
99
+ for (const [key, capabilities] of usage) {
100
+ if (filter !== null && usageKeyName(key) !== filter) {
101
+ continue;
102
+ }
103
+ for (const capability of capabilities) {
104
+ used.add(capability);
105
+ }
106
+ }
107
+ return [...used].sort((left, right) => left.localeCompare(right));
108
+ }
109
+ /**
110
+ * Reconcile each loaded extension's declared capabilities against what it
111
+ * exercised during activation.
112
+ *
113
+ * Extensions with no known declared capabilities are skipped — there is nothing
114
+ * to reconcile. The returned entries preserve every reconcilable extension even
115
+ * when `unused` is empty so callers can report fully-minimal manifests too.
116
+ */
117
+ export function reconcileExtensionCapabilityUsage(loaded, activation) {
118
+ const usage = attributeCapabilityUsage(activation);
119
+ const reconciliations = [];
120
+ for (const extension of loaded) {
121
+ const declared = normalizeDeclaredCapabilities(extension.capabilities);
122
+ if (declared.length === 0) {
123
+ continue;
124
+ }
125
+ const exercised = usage.get(usageKey(extension.layer, extension.name)) ?? new Set();
126
+ const used = [...exercised].sort((left, right) => left.localeCompare(right));
127
+ const unused = declared.filter((capability) => !exercised.has(capability));
128
+ reconciliations.push({ layer: extension.layer, name: extension.name, declared, used, unused });
129
+ }
130
+ return reconciliations;
131
+ }
132
+ //# sourceMappingURL=capability-usage.js.map
133
+ //# debugId=b74f7cd3-95ed-5473-a724-d3afb634a68b
@@ -0,0 +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 });\n }\n return reconciliations;\n}\n"],"names":[],"mappings":";;AAeA,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AAEtF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG;IACxD,QAAQ,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC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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"}
@@ -12,6 +12,13 @@ export declare function normalizeNames(values: string[]): string[];
12
12
  * Implements check whether known extension capability for the public runtime surface of this module.
13
13
  */
14
14
  export declare function isKnownExtensionCapability(value: string): value is ExtensionCapability;
15
+ /**
16
+ * Trim and lower-case a capability token, returning it only when it is a known
17
+ * canonical capability (otherwise `null`). Shared so capability normalization
18
+ * and known-capability filtering stay identical across the doctor and the SDK
19
+ * least-privilege helpers.
20
+ */
21
+ export declare function normalizeKnownExtensionCapability(value: string): ExtensionCapability | null;
15
22
  /**
16
23
  * Implements collect unknown extension capabilities for the public runtime surface of this module.
17
24
  */
@@ -4,7 +4,7 @@
4
4
  * Implements extension runtime contracts and governance for Extension Capability Aliases.
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]="0be603c7-ab83-5880-a57f-8140caf82657")}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]="5723464e-1f10-5a39-96a9-787c0052a036")}catch(e){}}();
8
8
  import { KNOWN_EXTENSION_CAPABILITIES, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES, } from "./extension-types.js";
9
9
  import { levenshteinDistanceWithinLimit } from "../shared/levenshtein.js";
10
10
  /**
@@ -19,6 +19,16 @@ export function normalizeNames(values) {
19
19
  export function isKnownExtensionCapability(value) {
20
20
  return KNOWN_EXTENSION_CAPABILITIES.includes(value);
21
21
  }
22
+ /**
23
+ * Trim and lower-case a capability token, returning it only when it is a known
24
+ * canonical capability (otherwise `null`). Shared so capability normalization
25
+ * and known-capability filtering stay identical across the doctor and the SDK
26
+ * least-privilege helpers.
27
+ */
28
+ export function normalizeKnownExtensionCapability(value) {
29
+ const normalized = value.trim().toLowerCase();
30
+ return isKnownExtensionCapability(normalized) ? normalized : null;
31
+ }
22
32
  /**
23
33
  * Implements collect unknown extension capabilities for the public runtime surface of this module.
24
34
  */
@@ -165,4 +175,4 @@ export function parseLegacyExtensionCapabilityAliasWarning(warning) {
165
175
  return parsed;
166
176
  }
167
177
  //# sourceMappingURL=extension-capability-aliases.js.map
168
- //# debugId=0be603c7-ab83-5880-a57f-8140caf82657
178
+ //# debugId=5723464e-1f10-5a39-96a9-787c0052a036
@@ -1 +1 @@
1
- {"version":3,"file":"extension-capability-aliases.js","sources":["core/extensions/extension-capability-aliases.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/extension-capability-aliases\n *\n * Implements extension runtime contracts and governance for Extension Capability Aliases.\n */\nimport {\n KNOWN_EXTENSION_CAPABILITIES,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n type ExtensionCapability,\n type ExtensionLayer,\n type LegacyExtensionCapabilityAliasMapping,\n type UnknownExtensionCapabilityWarningDetails,\n} from \"./extension-types.js\";\nimport { levenshteinDistanceWithinLimit } from \"../shared/levenshtein.js\";\n\n/**\n * Implements normalize names for the public runtime surface of this module.\n */\nexport function normalizeNames(values: string[]): string[] {\n return [...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))].sort((a, b) =>\n a.localeCompare(b),\n );\n}\n\n/**\n * Implements check whether known extension capability for the public runtime surface of this module.\n */\nexport function isKnownExtensionCapability(value: string): value is ExtensionCapability {\n return (KNOWN_EXTENSION_CAPABILITIES as readonly string[]).includes(value);\n}\n\n/**\n * Implements collect unknown extension capabilities for the public runtime surface of this module.\n */\nexport function collectUnknownExtensionCapabilities(capabilities: readonly string[]): string[] {\n return capabilities.filter((capability) => !isKnownExtensionCapability(capability));\n}\n\n/**\n * Implements resolve legacy extension capability alias for the public runtime surface of this module.\n */\nexport function resolveLegacyExtensionCapabilityAlias(capability: string): ExtensionCapability | null {\n const normalized = capability.trim().toLowerCase();\n if (normalized.length === 0) {\n return null;\n }\n return EXTENSION_CAPABILITY_LEGACY_ALIASES[normalized] ?? null;\n}\n\n/**\n * Implements normalize manifest capabilities for the public runtime surface of this module.\n */\nexport function normalizeManifestCapabilities(rawCapabilities: readonly string[]): {\n capabilities: string[];\n legacy_aliases: LegacyExtensionCapabilityAliasMapping[];\n} {\n const normalizedCapabilities = normalizeNames([...rawCapabilities].map((value) => value.toLowerCase()));\n const remappedCapabilities: string[] = [];\n const legacyAliases: LegacyExtensionCapabilityAliasMapping[] = [];\n for (const capability of normalizedCapabilities) {\n const legacyAliasTarget = resolveLegacyExtensionCapabilityAlias(capability);\n if (legacyAliasTarget) {\n remappedCapabilities.push(legacyAliasTarget);\n legacyAliases.push({\n alias: capability,\n target: legacyAliasTarget,\n });\n continue;\n }\n remappedCapabilities.push(capability);\n }\n const dedupedLegacyAliases = [...new Map(legacyAliases.map((entry) => [`${entry.alias}>${entry.target}`, entry])).values()].sort(\n (left, right) => left.alias.localeCompare(right.alias),\n );\n return {\n capabilities: normalizeNames(remappedCapabilities),\n legacy_aliases: dedupedLegacyAliases,\n };\n}\n\n/**\n * Implements suggest known extension capability for the public runtime surface of this module.\n */\nexport function suggestKnownExtensionCapability(capability: string): string | null {\n const normalized = capability.trim().toLowerCase();\n if (normalized.length === 0) {\n return null;\n }\n const legacyAlias = resolveLegacyExtensionCapabilityAlias(normalized);\n if (legacyAlias) {\n return legacyAlias;\n }\n const maxDistance = Math.max(1, Math.floor(normalized.length * 0.34));\n let bestMatch: string | null = null;\n let bestDistance = Number.POSITIVE_INFINITY;\n for (const candidate of KNOWN_EXTENSION_CAPABILITIES) {\n const distance = levenshteinDistanceWithinLimit(normalized, candidate, maxDistance);\n if (distance !== null && distance < bestDistance) {\n bestDistance = distance;\n bestMatch = candidate;\n }\n }\n return bestMatch;\n}\n\n/**\n * Implements format unknown extension capability warning for the public runtime surface of this module.\n */\nexport function formatUnknownExtensionCapabilityWarning(layer: ExtensionLayer, name: string, capability: string): string {\n const allowed = KNOWN_EXTENSION_CAPABILITIES.join(\",\");\n const suggested = suggestKnownExtensionCapability(capability) ?? \"none\";\n return `extension_capability_unknown:${layer}:${name}:${capability}:allowed=${allowed}:suggested=${suggested}`;\n}\n\n/**\n * Implements format legacy extension capability alias warning for the public runtime surface of this module.\n */\nexport function formatLegacyExtensionCapabilityAliasWarning(\n layer: ExtensionLayer,\n name: string,\n aliases: readonly LegacyExtensionCapabilityAliasMapping[],\n): string {\n const aliasesToken = aliases.map((entry) => `${entry.alias}>${entry.target}`).join(\",\");\n return `extension_capability_legacy_alias:${layer}:${name}:aliases=${aliasesToken}`;\n}\n\n\n/**\n * Implements parse unknown extension capability warning for the public runtime surface of this module.\n */\nexport function parseUnknownExtensionCapabilityWarning(\n warning: string,\n): UnknownExtensionCapabilityWarningDetails | null {\n const match = /^extension_capability_unknown:(global|project):([^:]+):([^:]+):allowed=([^:]+):suggested=([^:]+)$/.exec(\n warning.trim(),\n );\n if (!match) {\n return null;\n }\n const [, layerRaw, name, capability, allowedRaw, suggestedRaw] = match;\n const layer = layerRaw as ExtensionLayer;\n const allowed_capabilities = allowedRaw\n .split(\",\")\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n const legacyAlias = resolveLegacyExtensionCapabilityAlias(capability);\n const suggestedFromWarning = suggestedRaw === \"none\" ? undefined : suggestedRaw;\n const suggested_capability = suggestedFromWarning ?? legacyAlias ?? undefined;\n const suggestion_source = suggested_capability\n ? legacyAlias === suggested_capability\n ? \"legacy_alias\"\n : \"nearest_match\"\n : undefined;\n return {\n layer,\n name,\n capability,\n allowed_capabilities,\n capability_contract_version: EXTENSION_CAPABILITY_CONTRACT_VERSION,\n suggested_capability,\n suggestion_source,\n legacy_alias_target: legacyAlias ?? undefined,\n };\n}\n\n/**\n * Implements parse legacy extension capability alias warning for the public runtime surface of this module.\n */\nexport function parseLegacyExtensionCapabilityAliasWarning(warning: string): UnknownExtensionCapabilityWarningDetails[] {\n const match = /^extension_capability_legacy_alias:(global|project):([^:]+):aliases=(.+)$/.exec(warning.trim());\n if (!match) {\n return [];\n }\n const [, layerRaw, name, aliasesRaw] = match;\n const layer = layerRaw as ExtensionLayer;\n const allowedCapabilities = [...KNOWN_EXTENSION_CAPABILITIES];\n const parsed: UnknownExtensionCapabilityWarningDetails[] = [];\n for (const token of aliasesRaw.split(\",\")) {\n const [rawAlias, rawTarget] = token.split(\">\");\n const alias = rawAlias?.trim();\n const target = rawTarget?.trim().toLowerCase();\n if (!alias || !target || !isKnownExtensionCapability(target)) {\n continue;\n }\n parsed.push({\n layer,\n name,\n capability: alias,\n allowed_capabilities: allowedCapabilities,\n capability_contract_version: EXTENSION_CAPABILITY_CONTRACT_VERSION,\n suggested_capability: target,\n suggestion_source: \"legacy_alias\",\n legacy_alias_target: target,\n });\n }\n return parsed;\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EACL,4BAA4B,EAC5B,qCAAqC,EACrC,mCAAmC,GAKpC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAAgB;IAC7C,OAAO,CAAC,GAAG,IAAI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AG,KAAK,CAAC;IAC7C,MAAM,KAAK,GAAG,QAA0B,CAAC;IACzC,MAAM,mBAAmB,GAAG,CAAC,GAAG,4BAA4B,CAAC,CAAC;IAC9D,MAAM,MAAM,GAA+C,EAAE,CAAC;IAC9D,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1C,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC/B,MAAM,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC/C,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7D,SAAS;QACX,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;YACV,KAAK;YACL,IAAI;YACJ,UAAU,EAAE,KAAK;YACjB,oBAAoB,EAAE,mBAAmB;YACzC,2BAA2B,EAAE,qCAAqC;YAClE,oBAAoB,EAAE,MAAM;YAC5B,iBAAiB,EAAE,cAAc;YACjC,mBAAmB,EAAE,MAAM;SAC5B,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","debugId":"0be603c7-ab83-5880-a57f-8140caf82657"}
1
+ {"version":3,"file":"extension-capability-aliases.js","sources":["core/extensions/extension-capability-aliases.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/extension-capability-aliases\n *\n * Implements extension runtime contracts and governance for Extension Capability Aliases.\n */\nimport {\n KNOWN_EXTENSION_CAPABILITIES,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n type ExtensionCapability,\n type ExtensionLayer,\n type LegacyExtensionCapabilityAliasMapping,\n type UnknownExtensionCapabilityWarningDetails,\n} from \"./extension-types.js\";\nimport { levenshteinDistanceWithinLimit } from \"../shared/levenshtein.js\";\n\n/**\n * Implements normalize names for the public runtime surface of this module.\n */\nexport function normalizeNames(values: string[]): string[] {\n return [...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))].sort((a, b) =>\n a.localeCompare(b),\n );\n}\n\n/**\n * Implements check whether known extension capability for the public runtime surface of this module.\n */\nexport function isKnownExtensionCapability(value: string): value is ExtensionCapability {\n return (KNOWN_EXTENSION_CAPABILITIES as readonly string[]).includes(value);\n}\n\n/**\n * Trim and lower-case a capability token, returning it only when it is a known\n * canonical capability (otherwise `null`). Shared so capability normalization\n * and known-capability filtering stay identical across the doctor and the SDK\n * least-privilege helpers.\n */\nexport function normalizeKnownExtensionCapability(value: string): ExtensionCapability | null {\n const normalized = value.trim().toLowerCase();\n return isKnownExtensionCapability(normalized) ? normalized : null;\n}\n\n/**\n * Implements collect unknown extension capabilities for the public runtime surface of this module.\n */\nexport function collectUnknownExtensionCapabilities(capabilities: readonly string[]): string[] {\n return capabilities.filter((capability) => !isKnownExtensionCapability(capability));\n}\n\n/**\n * Implements resolve legacy extension capability alias for the public runtime surface of this module.\n */\nexport function resolveLegacyExtensionCapabilityAlias(capability: string): ExtensionCapability | null {\n const normalized = capability.trim().toLowerCase();\n if (normalized.length === 0) {\n return null;\n }\n return EXTENSION_CAPABILITY_LEGACY_ALIASES[normalized] ?? null;\n}\n\n/**\n * Implements normalize manifest capabilities for the public runtime surface of this module.\n */\nexport function normalizeManifestCapabilities(rawCapabilities: readonly string[]): {\n capabilities: string[];\n legacy_aliases: LegacyExtensionCapabilityAliasMapping[];\n} {\n const normalizedCapabilities = normalizeNames([...rawCapabilities].map((value) => value.toLowerCase()));\n const remappedCapabilities: string[] = [];\n const legacyAliases: LegacyExtensionCapabilityAliasMapping[] = [];\n for (const capability of normalizedCapabilities) {\n const legacyAliasTarget = resolveLegacyExtensionCapabilityAlias(capability);\n if (legacyAliasTarget) {\n remappedCapabilities.push(legacyAliasTarget);\n legacyAliases.push({\n alias: capability,\n target: legacyAliasTarget,\n });\n continue;\n }\n remappedCapabilities.push(capability);\n }\n const dedupedLegacyAliases = [...new Map(legacyAliases.map((entry) => [`${entry.alias}>${entry.target}`, entry])).values()].sort(\n (left, right) => left.alias.localeCompare(right.alias),\n );\n return {\n capabilities: normalizeNames(remappedCapabilities),\n legacy_aliases: dedupedLegacyAliases,\n };\n}\n\n/**\n * Implements suggest known extension capability for the public runtime surface of this module.\n */\nexport function suggestKnownExtensionCapability(capability: string): string | null {\n const normalized = capability.trim().toLowerCase();\n if (normalized.length === 0) {\n return null;\n }\n const legacyAlias = resolveLegacyExtensionCapabilityAlias(normalized);\n if (legacyAlias) {\n return legacyAlias;\n }\n const maxDistance = Math.max(1, Math.floor(normalized.length * 0.34));\n let bestMatch: string | null = null;\n let bestDistance = Number.POSITIVE_INFINITY;\n for (const candidate of KNOWN_EXTENSION_CAPABILITIES) {\n const distance = levenshteinDistanceWithinLimit(normalized, candidate, maxDistance);\n if (distance !== null && distance < bestDistance) {\n bestDistance = distance;\n bestMatch = candidate;\n }\n }\n return bestMatch;\n}\n\n/**\n * Implements format unknown extension capability warning for the public runtime surface of this module.\n */\nexport function formatUnknownExtensionCapabilityWarning(layer: ExtensionLayer, name: string, capability: string): string {\n const allowed = KNOWN_EXTENSION_CAPABILITIES.join(\",\");\n const suggested = suggestKnownExtensionCapability(capability) ?? \"none\";\n return `extension_capability_unknown:${layer}:${name}:${capability}:allowed=${allowed}:suggested=${suggested}`;\n}\n\n/**\n * Implements format legacy extension capability alias warning for the public runtime surface of this module.\n */\nexport function formatLegacyExtensionCapabilityAliasWarning(\n layer: ExtensionLayer,\n name: string,\n aliases: readonly LegacyExtensionCapabilityAliasMapping[],\n): string {\n const aliasesToken = aliases.map((entry) => `${entry.alias}>${entry.target}`).join(\",\");\n return `extension_capability_legacy_alias:${layer}:${name}:aliases=${aliasesToken}`;\n}\n\n\n/**\n * Implements parse unknown extension capability warning for the public runtime surface of this module.\n */\nexport function parseUnknownExtensionCapabilityWarning(\n warning: string,\n): UnknownExtensionCapabilityWarningDetails | null {\n const match = /^extension_capability_unknown:(global|project):([^:]+):([^:]+):allowed=([^:]+):suggested=([^:]+)$/.exec(\n warning.trim(),\n );\n if (!match) {\n return null;\n }\n const [, layerRaw, name, capability, allowedRaw, suggestedRaw] = match;\n const layer = layerRaw as ExtensionLayer;\n const allowed_capabilities = allowedRaw\n .split(\",\")\n .map((value) => value.trim())\n .filter((value) => value.length > 0);\n const legacyAlias = resolveLegacyExtensionCapabilityAlias(capability);\n const suggestedFromWarning = suggestedRaw === \"none\" ? undefined : suggestedRaw;\n const suggested_capability = suggestedFromWarning ?? legacyAlias ?? undefined;\n const suggestion_source = suggested_capability\n ? legacyAlias === suggested_capability\n ? \"legacy_alias\"\n : \"nearest_match\"\n : undefined;\n return {\n layer,\n name,\n capability,\n allowed_capabilities,\n capability_contract_version: EXTENSION_CAPABILITY_CONTRACT_VERSION,\n suggested_capability,\n suggestion_source,\n legacy_alias_target: legacyAlias ?? undefined,\n };\n}\n\n/**\n * Implements parse legacy extension capability alias warning for the public runtime surface of this module.\n */\nexport function parseLegacyExtensionCapabilityAliasWarning(warning: string): UnknownExtensionCapabilityWarningDetails[] {\n const match = /^extension_capability_legacy_alias:(global|project):([^:]+):aliases=(.+)$/.exec(warning.trim());\n if (!match) {\n return [];\n }\n const [, layerRaw, name, aliasesRaw] = match;\n const layer = layerRaw as ExtensionLayer;\n const allowedCapabilities = [...KNOWN_EXTENSION_CAPABILITIES];\n const parsed: UnknownExtensionCapabilityWarningDetails[] = [];\n for (const token of aliasesRaw.split(\",\")) {\n const [rawAlias, rawTarget] = token.split(\">\");\n const alias = rawAlias?.trim();\n const target = rawTarget?.trim().toLowerCase();\n if (!alias || !target || !isKnownExtensionCapability(target)) {\n continue;\n }\n parsed.push({\n layer,\n name,\n capability: alias,\n allowed_capabilities: allowedCapabilities,\n capability_contract_version: EXTENSION_CAPABILITY_CONTRACT_VERSION,\n suggested_capability: target,\n suggestion_source: \"legacy_alias\",\n legacy_alias_target: target,\n });\n }\n return parsed;\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EACL,4BAA4B,EAC5B,qCAAqC,EACrC,mCAAmC,GAKpC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAAgB;IAC7C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACzG,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CACnB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAAa;IACtD,OAAQ,4BAAkD,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC7E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iCAAiC,CAAC,KAAa;IAC7D,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,OAAO,0BAA0B,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;AACpE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mCAAmC,CAAC,YAA+B;IACjF,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC,CAAC;AACtF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qCAAqC,CAAC,UAAkB;IACtE,MAAM,UA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;YACzC,2BAA2B,EAAE,qCAAqC;YAClE,oBAAoB,EAAE,MAAM;YAC5B,iBAAiB,EAAE,cAAc;YACjC,mBAAmB,EAAE,MAAM;SAC5B,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","debugId":"5723464e-1f10-5a39-96a9-787c0052a036"}
@@ -113,3 +113,4 @@ export declare function runActiveServiceOverride(service: ExtensionServiceName,
113
113
  */
114
114
  export declare function runActiveServiceOverrideSync(service: ExtensionServiceName, payload: unknown): ServiceOverrideResult;
115
115
  export * from "./loader.js";
116
+ export { EXTENSION_CAPABILITY_REGISTRATION_SURFACES, collectUsedExtensionCapabilities, reconcileExtensionCapabilityUsage, type CollectUsedExtensionCapabilitiesOptions, type ExtensionCapabilityUsageReconciliation, } from "./capability-usage.js";
@@ -4,7 +4,7 @@
4
4
  * Implements extension runtime contracts and governance for Index.
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]="c8e3bac0-fd3d-5586-9c22-994b64c9efb3")}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]="abe62b94-a55a-5cdf-8f1a-34360ddc4c25")}catch(e){}}();
8
8
  import { runCommandHandler, runCommandOverride, runOnIndexHooks, runParserOverride, runPreflightOverride, runOnReadHooks, runRendererOverride, runServiceOverride, runServiceOverrideSync, runOnWriteHooks, } from "./loader.js";
9
9
  let activeExtensionHooks = null;
10
10
  let activeExtensionCommands = null;
@@ -330,5 +330,6 @@ export function runActiveServiceOverrideSync(service, payload) {
330
330
  return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));
331
331
  }
332
332
  export * from "./loader.js";
333
+ export { EXTENSION_CAPABILITY_REGISTRATION_SURFACES, collectUsedExtensionCapabilities, reconcileExtensionCapabilityUsage, } from "./capability-usage.js";
333
334
  //# sourceMappingURL=index.js.map
334
- //# debugId=c8e3bac0-fd3d-5586-9c22-994b64c9efb3
335
+ //# debugId=abe62b94-a55a-5cdf-8f1a-34360ddc4c25
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["core/extensions/index.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/index\n *\n * Implements extension runtime contracts and governance for Index.\n */\nimport {\n runCommandHandler,\n runCommandOverride,\n runOnIndexHooks,\n runParserOverride,\n runPreflightOverride,\n runOnReadHooks,\n runRendererOverride,\n runServiceOverride,\n runServiceOverrideSync,\n runOnWriteHooks,\n type CommandHandlerContext,\n type CommandHandlerResult,\n type CommandOverrideContext,\n type CommandOverrideResult,\n type ExtensionCommandRegistry,\n type ExtensionHookRegistry,\n type ExtensionParserRegistry,\n type ExtensionPreflightRegistry,\n type ExtensionRegistrationRegistry,\n type ExtensionRendererRegistry,\n type ExtensionServiceName,\n type ExtensionServiceRegistry,\n type AfterCommandAffectedItem,\n type OnIndexHookContext,\n type OnReadHookContext,\n type OnWriteHookContext,\n type OutputRendererFormat,\n type ParserOverrideContext,\n type ParserOverrideResult,\n type PreflightOverrideContext,\n type PreflightOverrideResult,\n type RendererOverrideResult,\n type ServiceOverrideResult,\n} from \"./loader.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\nlet activeExtensionHooks: ExtensionHookRegistry | null = null;\nlet activeExtensionCommands: ExtensionCommandRegistry | null = null;\nlet activeExtensionParsers: ExtensionParserRegistry | null = null;\nlet activeExtensionPreflight: ExtensionPreflightRegistry | null = null;\nlet activeExtensionServices: ExtensionServiceRegistry | null = null;\nlet activeExtensionRenderers: ExtensionRendererRegistry | null = null;\nlet activeExtensionRegistrations: ExtensionRegistrationRegistry | null = null;\nlet activeCommandContext: Omit<CommandOverrideContext, \"result\"> | null = null;\nlet activeCommandResult: unknown = undefined;\nlet activeAfterCommandAffectedItems: AfterCommandAffectedItem[] = [];\nconst AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS = new Set([\n \"body\",\n \"comments\",\n \"dependencies\",\n \"docs\",\n \"events\",\n \"files\",\n \"learnings\",\n \"notes\",\n \"reminders\",\n \"test_runs\",\n \"tests\",\n]);\n\n/**\n * Implements set active extension hooks for the public runtime surface of this module.\n */\nexport function setActiveExtensionHooks(hooks: ExtensionHookRegistry | null): void {\n activeExtensionHooks = hooks;\n}\n\n/**\n * Implements set active extension commands for the public runtime surface of this module.\n */\nexport function setActiveExtensionCommands(commands: ExtensionCommandRegistry | null): void {\n activeExtensionCommands = commands;\n}\n\n/**\n * Implements set active extension parsers for the public runtime surface of this module.\n */\nexport function setActiveExtensionParsers(parsers: ExtensionParserRegistry | null): void {\n activeExtensionParsers = parsers;\n}\n\n/**\n * Implements set active extension preflight for the public runtime surface of this module.\n */\nexport function setActiveExtensionPreflight(preflight: ExtensionPreflightRegistry | null): void {\n activeExtensionPreflight = preflight;\n}\n\n/**\n * Implements set active extension services for the public runtime surface of this module.\n */\nexport function setActiveExtensionServices(services: ExtensionServiceRegistry | null): void {\n activeExtensionServices = services;\n}\n\n/**\n * Implements set active extension renderers for the public runtime surface of this module.\n */\nexport function setActiveExtensionRenderers(renderers: ExtensionRendererRegistry | null): void {\n activeExtensionRenderers = renderers;\n}\n\n/**\n * Implements set active extension registrations for the public runtime surface of this module.\n */\nexport function setActiveExtensionRegistrations(registrations: ExtensionRegistrationRegistry | null): void {\n activeExtensionRegistrations = registrations;\n}\n\n/**\n * Implements get active extension registrations for the public runtime surface of this module.\n */\nexport function getActiveExtensionRegistrations(): ExtensionRegistrationRegistry | null {\n return activeExtensionRegistrations;\n}\n\n/**\n * Implements set active command context for the public runtime surface of this module.\n */\nexport function setActiveCommandContext(context: Omit<CommandOverrideContext, \"result\"> | null): void {\n activeCommandContext = context;\n}\n\n/**\n * Implements set active command result for the public runtime surface of this module.\n */\nexport function setActiveCommandResult(result: unknown): void {\n activeCommandResult = result;\n}\n\n/**\n * Implements get active command result for the public runtime surface of this module.\n */\nexport function getActiveCommandResult(): unknown {\n return activeCommandResult;\n}\n\n/**\n * Implements record after command affected item for the public runtime surface of this module.\n */\nexport function recordAfterCommandAffectedItem(item: AfterCommandAffectedItem): void {\n if (!item || (activeExtensionHooks?.afterCommand?.length ?? 0) === 0) {\n return;\n }\n activeAfterCommandAffectedItems.push(item);\n}\n\n/**\n * Implements project after command item snapshot for the public runtime surface of this module.\n */\nexport function projectAfterCommandItemSnapshot(\n metadata: ItemFrontMatter,\n changedFields: readonly string[],\n): Partial<ItemFrontMatter> {\n if (!metadata || !metadata.id) {\n return {};\n }\n const snapshot: Record<string, unknown> = {\n id: metadata.id,\n type: metadata.type,\n status: metadata.status,\n };\n if (!Array.isArray(changedFields)) {\n return snapshot as Partial<ItemFrontMatter>;\n }\n const source = metadata as unknown as Record<string, unknown>;\n for (const field of changedFields) {\n if (typeof field !== \"string\") {\n continue;\n }\n const actualField = field.startsWith(\"unset:\") ? field.slice(\"unset:\".length) : field;\n if (\n actualField === \"id\" ||\n actualField === \"type\" ||\n actualField === \"status\" ||\n AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS.has(actualField)\n ) {\n continue;\n }\n if (Object.hasOwn(source, actualField) && source[actualField] !== undefined) {\n snapshot[actualField] = source[actualField];\n }\n }\n return snapshot as Partial<ItemFrontMatter>;\n}\n\n/**\n * Implements consume after command affected items for the public runtime surface of this module.\n */\nexport function consumeAfterCommandAffectedItems(): AfterCommandAffectedItem[] | undefined {\n if (activeAfterCommandAffectedItems.length === 0) {\n return undefined;\n }\n const affected = activeAfterCommandAffectedItems;\n activeAfterCommandAffectedItems = [];\n return affected;\n}\n\n/**\n * Implements clear active extension hooks for the public runtime surface of this module.\n */\nexport function clearActiveExtensionHooks(): void {\n activeExtensionHooks = null;\n activeExtensionCommands = null;\n activeExtensionParsers = null;\n activeExtensionPreflight = null;\n activeExtensionServices = null;\n activeExtensionRenderers = null;\n activeExtensionRegistrations = null;\n activeCommandContext = null;\n activeCommandResult = undefined;\n activeAfterCommandAffectedItems = [];\n}\n\n/**\n * Implements run active on write hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnWriteHooks(context: OnWriteHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnWriteHooks(activeExtensionHooks, context);\n}\n\n/**\n * Implements run active on read hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnReadHooks(context: OnReadHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnReadHooks(activeExtensionHooks, context);\n}\n\n/**\n * Synchronous fast-path predicate: true only when at least one onRead hook is\n * registered. Bulk readers (e.g. the metadata cache scanning hundreds of files)\n * use this to skip per-file `await runActiveOnReadHooks(...)` calls entirely when\n * no extension observes reads, avoiding hundreds of needless microtasks.\n */\nexport function hasActiveOnReadHooks(): boolean {\n return (activeExtensionHooks?.onRead?.length ?? 0) > 0;\n}\n\n/**\n * Implements run active on index hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnIndexHooks(context: OnIndexHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnIndexHooks(activeExtensionHooks, context);\n}\n\n/**\n * Implements run active command override for the public runtime surface of this module.\n */\nexport function runActiveCommandOverride(result: unknown): CommandOverrideResult {\n if (!activeExtensionCommands || !activeCommandContext) {\n return {\n overridden: false,\n result,\n warnings: [],\n };\n }\n return runCommandOverride(activeExtensionCommands, {\n command: activeCommandContext.command,\n args: [...activeCommandContext.args],\n options: activeCommandContext.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext.pm_root,\n result,\n });\n}\n\n/**\n * Implements run active command handler for the public runtime surface of this module.\n */\nexport async function runActiveCommandHandler(context: CommandHandlerContext): Promise<CommandHandlerResult> {\n if (!activeExtensionCommands) {\n return {\n handled: false,\n result: null,\n warnings: [],\n };\n }\n return runCommandHandler(activeExtensionCommands, context);\n}\n\n/**\n * Implements run active parser override for the public runtime surface of this module.\n */\nexport async function runActiveParserOverride(context: ParserOverrideContext): Promise<ParserOverrideResult> {\n if (!activeExtensionParsers) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n warnings: [],\n };\n }\n return runParserOverride(activeExtensionParsers, context);\n}\n\n/**\n * Implements run active preflight override for the public runtime surface of this module.\n */\nexport async function runActivePreflightOverride(context: PreflightOverrideContext): Promise<PreflightOverrideResult> {\n if (!activeExtensionPreflight) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n decision: { ...context.decision },\n warnings: [],\n };\n }\n return runPreflightOverride(activeExtensionPreflight, context);\n}\n\n/**\n * Implements run active renderer override for the public runtime surface of this module.\n */\nexport function runActiveRendererOverride(format: OutputRendererFormat, result: unknown): RendererOverrideResult {\n if (!activeExtensionRenderers) {\n return {\n overridden: false,\n rendered: null,\n warnings: [],\n };\n }\n return runRendererOverride(activeExtensionRenderers, {\n format,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext?.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext?.pm_root,\n result,\n });\n}\n\nfunction buildServiceContext(service: ExtensionServiceName, payload: unknown) {\n return {\n service,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext?.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext?.pm_root,\n payload,\n };\n}\n\n/**\n * Implements run active service override for the public runtime surface of this module.\n */\nexport async function runActiveServiceOverride(\n service: ExtensionServiceName,\n payload: unknown,\n): Promise<ServiceOverrideResult> {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverride(activeExtensionServices, buildServiceContext(service, payload));\n}\n\n/**\n * Implements run active service override sync for the public runtime surface of this module.\n */\nexport function runActiveServiceOverrideSync(service: ExtensionServiceName, payload: unknown): ServiceOverrideResult {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));\n}\n\nexport * from \"./loader.js\";\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,GAwBhB,MAAM,aAAa,CAAC;AAGrB,IAAI,oBAAoB,GAAiC,IAAI,CAAC;AAC9D,IAAI,uBAAuB,GAAoC,IAAI,CAAC;AACpE,IAAI,sBAAsB,GAAmC,IAAI,CAAC;AAClE,IAAI,wBAAwB,GAAsC,IAAI,CAAC;AACvE,IAAI,uBAAuB,GAAoC,IAAI,CAAC;AACpE,IAAI,wBAAwB,GAAqC,IAAI,CAAC;AACtE,IAAI,4BAA4B,GAAyC,IAAI,CAAC;AAC9E,IAAI,oBAAoB,GAAkD,IAAI,CAAC;AAC/E,IAAI,mBAAmB,GAAY,SAAS,CAAC;AAC7C,IAAI,+BAA+B,GAA+B,EAAE,CAAC;AACrE,MAAM,qCAAqC,GAAG,IAAI,GAAG,CAAC;IACpD,MAAM;IACN,UAAU;IACV,cAAc;IACd,MAAM;IACN,QAAQ;IACR,OAAO;IACP,WAAW;IACX,OAAO;IACP,WAAW;IACX,WAAW;IACX,OAAO;CACR,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAmC;I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OAAgB;IAC1F,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC7B,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;IACD,OAAO,sBAAsB,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAChG,CAAC;AAED,cAAc,aAAa,CAAC","debugId":"c8e3bac0-fd3d-5586-9c22-994b64c9efb3"}
1
+ {"version":3,"file":"index.js","sources":["core/extensions/index.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/index\n *\n * Implements extension runtime contracts and governance for Index.\n */\nimport {\n runCommandHandler,\n runCommandOverride,\n runOnIndexHooks,\n runParserOverride,\n runPreflightOverride,\n runOnReadHooks,\n runRendererOverride,\n runServiceOverride,\n runServiceOverrideSync,\n runOnWriteHooks,\n type CommandHandlerContext,\n type CommandHandlerResult,\n type CommandOverrideContext,\n type CommandOverrideResult,\n type ExtensionCommandRegistry,\n type ExtensionHookRegistry,\n type ExtensionParserRegistry,\n type ExtensionPreflightRegistry,\n type ExtensionRegistrationRegistry,\n type ExtensionRendererRegistry,\n type ExtensionServiceName,\n type ExtensionServiceRegistry,\n type AfterCommandAffectedItem,\n type OnIndexHookContext,\n type OnReadHookContext,\n type OnWriteHookContext,\n type OutputRendererFormat,\n type ParserOverrideContext,\n type ParserOverrideResult,\n type PreflightOverrideContext,\n type PreflightOverrideResult,\n type RendererOverrideResult,\n type ServiceOverrideResult,\n} from \"./loader.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\nlet activeExtensionHooks: ExtensionHookRegistry | null = null;\nlet activeExtensionCommands: ExtensionCommandRegistry | null = null;\nlet activeExtensionParsers: ExtensionParserRegistry | null = null;\nlet activeExtensionPreflight: ExtensionPreflightRegistry | null = null;\nlet activeExtensionServices: ExtensionServiceRegistry | null = null;\nlet activeExtensionRenderers: ExtensionRendererRegistry | null = null;\nlet activeExtensionRegistrations: ExtensionRegistrationRegistry | null = null;\nlet activeCommandContext: Omit<CommandOverrideContext, \"result\"> | null = null;\nlet activeCommandResult: unknown = undefined;\nlet activeAfterCommandAffectedItems: AfterCommandAffectedItem[] = [];\nconst AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS = new Set([\n \"body\",\n \"comments\",\n \"dependencies\",\n \"docs\",\n \"events\",\n \"files\",\n \"learnings\",\n \"notes\",\n \"reminders\",\n \"test_runs\",\n \"tests\",\n]);\n\n/**\n * Implements set active extension hooks for the public runtime surface of this module.\n */\nexport function setActiveExtensionHooks(hooks: ExtensionHookRegistry | null): void {\n activeExtensionHooks = hooks;\n}\n\n/**\n * Implements set active extension commands for the public runtime surface of this module.\n */\nexport function setActiveExtensionCommands(commands: ExtensionCommandRegistry | null): void {\n activeExtensionCommands = commands;\n}\n\n/**\n * Implements set active extension parsers for the public runtime surface of this module.\n */\nexport function setActiveExtensionParsers(parsers: ExtensionParserRegistry | null): void {\n activeExtensionParsers = parsers;\n}\n\n/**\n * Implements set active extension preflight for the public runtime surface of this module.\n */\nexport function setActiveExtensionPreflight(preflight: ExtensionPreflightRegistry | null): void {\n activeExtensionPreflight = preflight;\n}\n\n/**\n * Implements set active extension services for the public runtime surface of this module.\n */\nexport function setActiveExtensionServices(services: ExtensionServiceRegistry | null): void {\n activeExtensionServices = services;\n}\n\n/**\n * Implements set active extension renderers for the public runtime surface of this module.\n */\nexport function setActiveExtensionRenderers(renderers: ExtensionRendererRegistry | null): void {\n activeExtensionRenderers = renderers;\n}\n\n/**\n * Implements set active extension registrations for the public runtime surface of this module.\n */\nexport function setActiveExtensionRegistrations(registrations: ExtensionRegistrationRegistry | null): void {\n activeExtensionRegistrations = registrations;\n}\n\n/**\n * Implements get active extension registrations for the public runtime surface of this module.\n */\nexport function getActiveExtensionRegistrations(): ExtensionRegistrationRegistry | null {\n return activeExtensionRegistrations;\n}\n\n/**\n * Implements set active command context for the public runtime surface of this module.\n */\nexport function setActiveCommandContext(context: Omit<CommandOverrideContext, \"result\"> | null): void {\n activeCommandContext = context;\n}\n\n/**\n * Implements set active command result for the public runtime surface of this module.\n */\nexport function setActiveCommandResult(result: unknown): void {\n activeCommandResult = result;\n}\n\n/**\n * Implements get active command result for the public runtime surface of this module.\n */\nexport function getActiveCommandResult(): unknown {\n return activeCommandResult;\n}\n\n/**\n * Implements record after command affected item for the public runtime surface of this module.\n */\nexport function recordAfterCommandAffectedItem(item: AfterCommandAffectedItem): void {\n if (!item || (activeExtensionHooks?.afterCommand?.length ?? 0) === 0) {\n return;\n }\n activeAfterCommandAffectedItems.push(item);\n}\n\n/**\n * Implements project after command item snapshot for the public runtime surface of this module.\n */\nexport function projectAfterCommandItemSnapshot(\n metadata: ItemFrontMatter,\n changedFields: readonly string[],\n): Partial<ItemFrontMatter> {\n if (!metadata || !metadata.id) {\n return {};\n }\n const snapshot: Record<string, unknown> = {\n id: metadata.id,\n type: metadata.type,\n status: metadata.status,\n };\n if (!Array.isArray(changedFields)) {\n return snapshot as Partial<ItemFrontMatter>;\n }\n const source = metadata as unknown as Record<string, unknown>;\n for (const field of changedFields) {\n if (typeof field !== \"string\") {\n continue;\n }\n const actualField = field.startsWith(\"unset:\") ? field.slice(\"unset:\".length) : field;\n if (\n actualField === \"id\" ||\n actualField === \"type\" ||\n actualField === \"status\" ||\n AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS.has(actualField)\n ) {\n continue;\n }\n if (Object.hasOwn(source, actualField) && source[actualField] !== undefined) {\n snapshot[actualField] = source[actualField];\n }\n }\n return snapshot as Partial<ItemFrontMatter>;\n}\n\n/**\n * Implements consume after command affected items for the public runtime surface of this module.\n */\nexport function consumeAfterCommandAffectedItems(): AfterCommandAffectedItem[] | undefined {\n if (activeAfterCommandAffectedItems.length === 0) {\n return undefined;\n }\n const affected = activeAfterCommandAffectedItems;\n activeAfterCommandAffectedItems = [];\n return affected;\n}\n\n/**\n * Implements clear active extension hooks for the public runtime surface of this module.\n */\nexport function clearActiveExtensionHooks(): void {\n activeExtensionHooks = null;\n activeExtensionCommands = null;\n activeExtensionParsers = null;\n activeExtensionPreflight = null;\n activeExtensionServices = null;\n activeExtensionRenderers = null;\n activeExtensionRegistrations = null;\n activeCommandContext = null;\n activeCommandResult = undefined;\n activeAfterCommandAffectedItems = [];\n}\n\n/**\n * Implements run active on write hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnWriteHooks(context: OnWriteHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnWriteHooks(activeExtensionHooks, context);\n}\n\n/**\n * Implements run active on read hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnReadHooks(context: OnReadHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnReadHooks(activeExtensionHooks, context);\n}\n\n/**\n * Synchronous fast-path predicate: true only when at least one onRead hook is\n * registered. Bulk readers (e.g. the metadata cache scanning hundreds of files)\n * use this to skip per-file `await runActiveOnReadHooks(...)` calls entirely when\n * no extension observes reads, avoiding hundreds of needless microtasks.\n */\nexport function hasActiveOnReadHooks(): boolean {\n return (activeExtensionHooks?.onRead?.length ?? 0) > 0;\n}\n\n/**\n * Implements run active on index hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnIndexHooks(context: OnIndexHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnIndexHooks(activeExtensionHooks, context);\n}\n\n/**\n * Implements run active command override for the public runtime surface of this module.\n */\nexport function runActiveCommandOverride(result: unknown): CommandOverrideResult {\n if (!activeExtensionCommands || !activeCommandContext) {\n return {\n overridden: false,\n result,\n warnings: [],\n };\n }\n return runCommandOverride(activeExtensionCommands, {\n command: activeCommandContext.command,\n args: [...activeCommandContext.args],\n options: activeCommandContext.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext.pm_root,\n result,\n });\n}\n\n/**\n * Implements run active command handler for the public runtime surface of this module.\n */\nexport async function runActiveCommandHandler(context: CommandHandlerContext): Promise<CommandHandlerResult> {\n if (!activeExtensionCommands) {\n return {\n handled: false,\n result: null,\n warnings: [],\n };\n }\n return runCommandHandler(activeExtensionCommands, context);\n}\n\n/**\n * Implements run active parser override for the public runtime surface of this module.\n */\nexport async function runActiveParserOverride(context: ParserOverrideContext): Promise<ParserOverrideResult> {\n if (!activeExtensionParsers) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n warnings: [],\n };\n }\n return runParserOverride(activeExtensionParsers, context);\n}\n\n/**\n * Implements run active preflight override for the public runtime surface of this module.\n */\nexport async function runActivePreflightOverride(context: PreflightOverrideContext): Promise<PreflightOverrideResult> {\n if (!activeExtensionPreflight) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n decision: { ...context.decision },\n warnings: [],\n };\n }\n return runPreflightOverride(activeExtensionPreflight, context);\n}\n\n/**\n * Implements run active renderer override for the public runtime surface of this module.\n */\nexport function runActiveRendererOverride(format: OutputRendererFormat, result: unknown): RendererOverrideResult {\n if (!activeExtensionRenderers) {\n return {\n overridden: false,\n rendered: null,\n warnings: [],\n };\n }\n return runRendererOverride(activeExtensionRenderers, {\n format,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext?.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext?.pm_root,\n result,\n });\n}\n\nfunction buildServiceContext(service: ExtensionServiceName, payload: unknown) {\n return {\n service,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext?.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext?.pm_root,\n payload,\n };\n}\n\n/**\n * Implements run active service override for the public runtime surface of this module.\n */\nexport async function runActiveServiceOverride(\n service: ExtensionServiceName,\n payload: unknown,\n): Promise<ServiceOverrideResult> {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverride(activeExtensionServices, buildServiceContext(service, payload));\n}\n\n/**\n * Implements run active service override sync for the public runtime surface of this module.\n */\nexport function runActiveServiceOverrideSync(service: ExtensionServiceName, payload: unknown): ServiceOverrideResult {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));\n}\n\nexport * from \"./loader.js\";\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"./capability-usage.js\";\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,GAwBhB,MAAM,aAAa,CAAC;AAGrB,IAAI,oBAAoB,GAAiC,IAAI,CAAC;AAC9D,IAAI,uBAAuB,GAAoC,IAAI,CAAC;AACpE,IAAI,sBAAsB,GAAmC,IAAI,CAAC;AAClE,IAAI,wBAAwB,GAAsC,IAAI,CAAC;AACvE,IAAI,uBAAuB,GAAoC,IAAI,CAAC;AACpE,IAAI,wBAAwB,GAAqC,IAAI,CAAC;AACtE,IAAI,4BAA4B,GAAyC,IAAI,CAAC;AAC9E,IAAI,oBAAoB,GAAkD,IAAI,CAAC;AAC/E,IAAI,mBAAmB,GAAY,SAAS,CAAC;AAC7C,IAAI,+BAA+B,GAA+B,EAAE,CAAC;AACrE,MAAM,qCAAqC,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E,OAAO;YACf,QAAQ,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;IACD,OAAO,kBAAkB,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAA6B,EAAE,OAAgB;IAC1F,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC7B,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;IACD,OAAO,sBAAsB,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAChG,CAAC;AAED,cAAc,aAAa,CAAC;AAC5B,OAAO,EACL,0CAA0C,EAC1C,gCAAgC,EAChC,iCAAiC,GAGlC,MAAM,uBAAuB,CAAC","debugId":"abe62b94-a55a-5cdf-8f1a-34360ddc4c25"}
@@ -69,6 +69,7 @@ export declare const PLAN_FLAG_CONTRACTS: CliFlagContract[];
69
69
  export declare const INIT_FLAG_CONTRACTS: CliFlagContract[];
70
70
  export declare const CONFIG_FLAG_CONTRACTS: CliFlagContract[];
71
71
  export declare const EXTENSION_FLAG_CONTRACTS: CliFlagContract[];
72
+ export declare const EXTENSION_SCOPE_FLAG_CONTRACTS: CliFlagContract[];
72
73
  export declare const EXTENSION_INIT_FLAG_CONTRACTS: CliFlagContract[];
73
74
  export declare const EXTENSION_INSTALL_FLAG_CONTRACTS: CliFlagContract[];
74
75
  export declare const EXTENSION_UNINSTALL_FLAG_CONTRACTS: CliFlagContract[];