@unbrained/pm-cli 2026.6.21 → 2026.6.23

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 (429) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/cli/commands/completion.js +7 -4
  3. package/dist/cli/commands/completion.js.map +1 -1
  4. package/dist/cli/commands/contracts.js +4 -3
  5. package/dist/cli/commands/contracts.js.map +1 -1
  6. package/dist/cli/commands/extension/describe.d.ts +70 -0
  7. package/dist/cli/commands/extension/describe.js +76 -0
  8. package/dist/cli/commands/extension/describe.js.map +1 -0
  9. package/dist/cli/commands/extension/doctor.d.ts +11 -0
  10. package/dist/cli/commands/extension/doctor.js +31 -2
  11. package/dist/cli/commands/extension/doctor.js.map +1 -1
  12. package/dist/cli/commands/extension/scaffold.d.ts +16 -2
  13. package/dist/cli/commands/extension/scaffold.js +529 -48
  14. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  15. package/dist/cli/commands/extension.d.ts +3 -1
  16. package/dist/cli/commands/extension.js +35 -5
  17. package/dist/cli/commands/extension.js.map +1 -1
  18. package/dist/cli/help-content.js +20 -4
  19. package/dist/cli/help-content.js.map +1 -1
  20. package/dist/cli/register-setup.js +14 -2
  21. package/dist/cli/register-setup.js.map +1 -1
  22. package/dist/cli-bundle/chunks/{activity-KW3IRP44.js → activity-H2LMOSSW.js} +11 -11
  23. package/dist/cli-bundle/chunks/activity-XUZ2AHCW.js +18 -0
  24. package/dist/cli-bundle/chunks/{aggregate-3ZKQG5SW.js → aggregate-EGJLZQBI.js} +10 -10
  25. package/dist/cli-bundle/chunks/{aggregate-FIGQEIL3.js → aggregate-R725FC3S.js} +10 -10
  26. package/dist/cli-bundle/chunks/{append-EWJYJ7CH.js → append-5J345QGU.js} +8 -8
  27. package/dist/cli-bundle/chunks/{append-QEOLX3XB.js → append-O5HPBMRN.js} +8 -8
  28. package/dist/cli-bundle/chunks/{chunk-GOZUHWFD.js → chunk-2A34E3BA.js} +2 -2
  29. package/dist/cli-bundle/chunks/{chunk-A4Z7ZOL5.js → chunk-2BFPAUAF.js} +31 -15
  30. package/dist/cli-bundle/chunks/chunk-2BFPAUAF.js.map +1 -0
  31. package/dist/cli-bundle/chunks/{chunk-5QICDWMV.js → chunk-2CKH2LMV.js} +2 -2
  32. package/dist/cli-bundle/chunks/{chunk-WQ7NIVDK.js → chunk-2RDVQEWV.js} +4 -4
  33. package/dist/cli-bundle/chunks/{chunk-NSBZ2CKF.js → chunk-2T3JG6V4.js} +2 -2
  34. package/dist/cli-bundle/chunks/{chunk-76Z3YSHV.js → chunk-34EONI5F.js} +2 -2
  35. package/dist/cli-bundle/chunks/{chunk-PUH4D67U.js → chunk-3VY3YQO6.js} +2 -2
  36. package/dist/cli-bundle/chunks/{chunk-N5ZJACJ6.js → chunk-46G6RSB6.js} +8 -8
  37. package/dist/cli-bundle/chunks/{chunk-SRYYRVPB.js → chunk-4BHT5VDC.js} +2 -2
  38. package/dist/cli-bundle/chunks/{chunk-PFSRUHDH.js → chunk-4KD54S3Z.js} +9 -9
  39. package/dist/cli-bundle/chunks/{chunk-QQHISQBJ.js → chunk-55ISXAQH.js} +7 -4
  40. package/dist/cli-bundle/chunks/{chunk-QQHISQBJ.js.map → chunk-55ISXAQH.js.map} +2 -2
  41. package/dist/cli-bundle/chunks/{chunk-NIUEXCFS.js → chunk-5UVVASSA.js} +6 -6
  42. package/dist/cli-bundle/chunks/{chunk-CF55WVVS.js → chunk-5VOINNKT.js} +2 -2
  43. package/dist/cli-bundle/chunks/{chunk-NIGXMNNI.js → chunk-66MEDTUD.js} +2 -2
  44. package/dist/cli-bundle/chunks/{chunk-AZMOLBN3.js → chunk-7AUB5HNA.js} +7 -7
  45. package/dist/cli-bundle/chunks/{chunk-OTHIWLMB.js → chunk-7K2XXO4I.js} +5 -5
  46. package/dist/cli-bundle/chunks/{chunk-7D3SAQXM.js → chunk-7MRQ4HMK.js} +2 -2
  47. package/dist/cli-bundle/chunks/{chunk-EBH56IXK.js → chunk-7SV63ZHD.js} +8 -8
  48. package/dist/cli-bundle/chunks/{chunk-OFYMIDF2.js → chunk-7UGEAPRY.js} +9 -9
  49. package/dist/cli-bundle/chunks/{chunk-LUWW7L4B.js → chunk-7XGQXHFB.js} +3 -3
  50. package/dist/cli-bundle/chunks/{chunk-UEMNL33O.js → chunk-AD3A7ZD6.js} +8 -8
  51. package/dist/cli-bundle/chunks/{chunk-3EWSGA7N.js → chunk-AONIHR2C.js} +12 -12
  52. package/dist/cli-bundle/chunks/{chunk-RVHYI7SL.js → chunk-BB6MDVNQ.js} +8 -8
  53. package/dist/cli-bundle/chunks/chunk-C5AOG6D2.js +691 -0
  54. package/dist/cli-bundle/chunks/chunk-C5AOG6D2.js.map +1 -0
  55. package/dist/cli-bundle/chunks/{chunk-52OCIDPG.js → chunk-CE5P2NQR.js} +5 -5
  56. package/dist/cli-bundle/chunks/{chunk-NXS7ZKAK.js → chunk-CIIK67GW.js} +4 -4
  57. package/dist/cli-bundle/chunks/{chunk-HC4AWIKT.js → chunk-CKGNPJAG.js} +31 -15
  58. package/dist/cli-bundle/chunks/chunk-CKGNPJAG.js.map +7 -0
  59. package/dist/cli-bundle/chunks/{chunk-NB3PYLQ6.js → chunk-DT5LPYOD.js} +5 -5
  60. package/dist/cli-bundle/chunks/{chunk-37QXHBIB.js → chunk-FIGAZ4Y7.js} +3 -3
  61. package/dist/cli-bundle/chunks/{chunk-UV6IYE5U.js → chunk-FXR67XVQ.js} +2 -2
  62. package/dist/cli-bundle/chunks/{chunk-3MDHREEV.js → chunk-G6N5VEOK.js} +3 -3
  63. package/dist/cli-bundle/chunks/{chunk-5PCI3UBT.js → chunk-G6PYHBBR.js} +152 -253
  64. package/dist/cli-bundle/chunks/chunk-G6PYHBBR.js.map +7 -0
  65. package/dist/cli-bundle/chunks/{chunk-2GCDRRIF.js → chunk-GAJVRGGA.js} +12 -12
  66. package/dist/cli-bundle/chunks/{chunk-HCU6WUSY.js → chunk-H2IP4QLJ.js} +9 -9
  67. package/dist/cli-bundle/chunks/{chunk-CZUB4XWO.js → chunk-H4IIJDE4.js} +2 -2
  68. package/dist/cli-bundle/chunks/{chunk-RLK7P77C.js → chunk-HFFUQR73.js} +5 -5
  69. package/dist/cli-bundle/chunks/{chunk-6M4RJS4M.js → chunk-IB3GYLQE.js} +3 -3
  70. package/dist/cli-bundle/chunks/{chunk-SX75ADBK.js → chunk-IPKJ6B36.js} +6 -6
  71. package/dist/cli-bundle/chunks/{chunk-H7NJZWG2.js → chunk-JR2LV3M4.js} +13 -13
  72. package/dist/cli-bundle/chunks/{chunk-PP2U4NMT.js → chunk-KFWBJPSG.js} +5 -5
  73. package/dist/cli-bundle/chunks/{chunk-32R4PIC6.js → chunk-KQMUV6LX.js} +145 -253
  74. package/dist/cli-bundle/chunks/chunk-KQMUV6LX.js.map +1 -0
  75. package/dist/cli-bundle/chunks/{chunk-F7K5GWP3.js → chunk-LRKKONT2.js} +9 -9
  76. package/dist/cli-bundle/chunks/{chunk-5IDI42VV.js → chunk-M4T5DXD5.js} +7 -7
  77. package/dist/cli-bundle/chunks/{chunk-2PKHRP6G.js → chunk-MJTINN54.js} +10 -10
  78. package/dist/cli-bundle/chunks/{chunk-HMOADQVT.js → chunk-MJTSZKK5.js} +107 -3
  79. package/dist/cli-bundle/chunks/chunk-MJTSZKK5.js.map +7 -0
  80. package/dist/cli-bundle/chunks/chunk-MVKFOLLM.js +694 -0
  81. package/dist/cli-bundle/chunks/chunk-MVKFOLLM.js.map +7 -0
  82. package/dist/cli-bundle/chunks/{chunk-QGG32QHW.js → chunk-NCVCO3NZ.js} +3 -3
  83. package/dist/cli-bundle/chunks/{chunk-AIS5PGI3.js → chunk-NK3UPBVG.js} +2 -2
  84. package/dist/cli-bundle/chunks/{chunk-6H4LF7AO.js → chunk-O6LLO73I.js} +2 -2
  85. package/dist/cli-bundle/chunks/{chunk-YCJX76PW.js → chunk-P77P2ILI.js} +2 -2
  86. package/dist/cli-bundle/chunks/{chunk-F5NZWFSW.js → chunk-Q2KNGP7C.js} +7 -7
  87. package/dist/cli-bundle/chunks/{chunk-GMHPNNYG.js → chunk-QH3PJYON.js} +10 -10
  88. package/dist/cli-bundle/chunks/{chunk-NJHMAJ6N.js → chunk-QL5RVYOA.js} +8 -8
  89. package/dist/cli-bundle/chunks/{chunk-O47BPOPC.js → chunk-S26C36QC.js} +2 -2
  90. package/dist/cli-bundle/chunks/{chunk-D7FYS6PG.js → chunk-S2RUQSX2.js} +2 -2
  91. package/dist/cli-bundle/chunks/{chunk-CZPXY7UW.js → chunk-SBQTAVJZ.js} +3 -3
  92. package/dist/cli-bundle/chunks/{chunk-M5XALUSL.js → chunk-SKH7OGE5.js} +2 -2
  93. package/dist/cli-bundle/chunks/{chunk-NJN7LL7U.js → chunk-SKN7LC5W.js} +5 -5
  94. package/dist/cli-bundle/chunks/{chunk-6ZXM2XNF.js → chunk-SR3EKWZG.js} +8 -8
  95. package/dist/cli-bundle/chunks/{chunk-B473GZWW.js → chunk-T5472OMV.js} +3 -3
  96. package/dist/cli-bundle/chunks/{chunk-2EIMPCE4.js → chunk-T72AZDBA.js} +3 -3
  97. package/dist/cli-bundle/chunks/{chunk-6CJWZAN7.js → chunk-TQZH6OD6.js} +7 -7
  98. package/dist/cli-bundle/chunks/{chunk-FWPDUYEY.js → chunk-U2Z5YUSO.js} +7 -7
  99. package/dist/cli-bundle/chunks/{chunk-434HM6Z5.js → chunk-UELRKQQU.js} +100 -3
  100. package/dist/cli-bundle/chunks/chunk-UELRKQQU.js.map +1 -0
  101. package/dist/cli-bundle/chunks/{chunk-HIP7WVTL.js → chunk-UVC5LOR7.js} +4 -4
  102. package/dist/cli-bundle/chunks/{chunk-LEU5GHRC.js → chunk-VAYA4XFX.js} +3 -3
  103. package/dist/cli-bundle/chunks/{chunk-J4MYYSOL.js → chunk-VFAQ4LMN.js} +5 -5
  104. package/dist/cli-bundle/chunks/{chunk-UPE3CDD7.js → chunk-W72GHSJE.js} +7 -7
  105. package/dist/cli-bundle/chunks/{chunk-C4N5I7ZW.js → chunk-WBRKK5QR.js} +3 -3
  106. package/dist/cli-bundle/chunks/{chunk-Z6T4PQI2.js → chunk-WM5ZVBPE.js} +4 -4
  107. package/dist/cli-bundle/chunks/{chunk-TKBHZPKD.js → chunk-WZQWHN4R.js} +3 -3
  108. package/dist/cli-bundle/chunks/{chunk-FKBDKV7Y.js → chunk-XVF4YARA.js} +3 -3
  109. package/dist/cli-bundle/chunks/{chunk-SBGXDO7A.js → chunk-Y4SUQQYH.js} +8 -5
  110. package/dist/cli-bundle/chunks/{chunk-SBGXDO7A.js.map → chunk-Y4SUQQYH.js.map} +1 -1
  111. package/dist/cli-bundle/chunks/{chunk-QZTWBFXJ.js → chunk-YDEXO24S.js} +2 -2
  112. package/dist/cli-bundle/chunks/{chunk-FRUFKWNK.js → chunk-YJ3SUEPD.js} +2 -2
  113. package/dist/cli-bundle/chunks/{chunk-5FIEHKEX.js → chunk-YUDJD3XO.js} +5 -5
  114. package/dist/cli-bundle/chunks/{chunk-Q2J2HJUN.js → chunk-ZQ3ZVXX2.js} +2 -2
  115. package/dist/cli-bundle/chunks/{chunk-C3AZ5ZML.js → chunk-ZRK4O56R.js} +13 -13
  116. package/dist/cli-bundle/chunks/{claim-RC56YUWG.js → claim-4KHAA2RN.js} +10 -10
  117. package/dist/cli-bundle/chunks/{claim-THOJ6CMV.js → claim-CSPJFLNH.js} +10 -10
  118. package/dist/cli-bundle/chunks/close-A3EMKBBY.js +15 -0
  119. package/dist/cli-bundle/chunks/{close-SG5MNCVQ.js → close-W56IOGYG.js} +8 -8
  120. package/dist/cli-bundle/chunks/{close-many-3L3AQZBU.js → close-many-BX5DCSVV.js} +15 -15
  121. package/dist/cli-bundle/chunks/{close-many-DKQLBGLV.js → close-many-TQU5F4E4.js} +15 -15
  122. package/dist/cli-bundle/chunks/{comments-M7ZOZNBX.js → comments-U5KUC4EU.js} +10 -10
  123. package/dist/cli-bundle/chunks/{comments-SKWMDWCW.js → comments-VRECH75R.js} +10 -10
  124. package/dist/cli-bundle/chunks/{config-OZCUABPB.js → config-D3OKQO52.js} +8 -8
  125. package/dist/cli-bundle/chunks/{config-7CK62S7T.js → config-MMJA4LLK.js} +8 -8
  126. package/dist/cli-bundle/chunks/{context-PUG2A7RC.js → context-BLBD3PUB.js} +13 -13
  127. package/dist/cli-bundle/chunks/{context-OEC366TO.js → context-DHLVPXN3.js} +13 -13
  128. package/dist/cli-bundle/chunks/{contracts-3THOLA7L.js → contracts-C3SZCXXG.js} +7 -5
  129. package/dist/cli-bundle/chunks/contracts-C3SZCXXG.js.map +7 -0
  130. package/dist/cli-bundle/chunks/{contracts-N65FXEOL.js → contracts-XGVMMPC5.js} +8 -6
  131. package/dist/cli-bundle/chunks/contracts-XGVMMPC5.js.map +1 -0
  132. package/dist/cli-bundle/chunks/{copy-JPX7VZCH.js → copy-5D5DX3VK.js} +7 -7
  133. package/dist/cli-bundle/chunks/{copy-6QLHILAC.js → copy-HHL3K4QP.js} +7 -7
  134. package/dist/cli-bundle/chunks/{create-Y54ZVVZH.js → create-IXY43O4H.js} +14 -14
  135. package/dist/cli-bundle/chunks/create-QVGFYA2X.js +30 -0
  136. package/dist/cli-bundle/chunks/{delete-63PCMQAJ.js → delete-IBUR3M42.js} +7 -7
  137. package/dist/cli-bundle/chunks/{delete-GDSMGAGJ.js → delete-QQC2FGUH.js} +7 -7
  138. package/dist/cli-bundle/chunks/{deps-XYQ73XRH.js → deps-KWKRHXIN.js} +7 -7
  139. package/dist/cli-bundle/chunks/{deps-T4ZF5G54.js → deps-VTPO4BSE.js} +7 -7
  140. package/dist/cli-bundle/chunks/{docs-EHNPDWUL.js → docs-7CHFHXLN.js} +9 -9
  141. package/dist/cli-bundle/chunks/{docs-C75YIXHC.js → docs-IIO3FEUO.js} +9 -9
  142. package/dist/cli-bundle/chunks/{eval-GTENKE24.js → eval-CEYYEPSX.js} +12 -12
  143. package/dist/cli-bundle/chunks/{eval-3WKDTRMH.js → eval-IO7LREOL.js} +12 -12
  144. package/dist/cli-bundle/chunks/{extension-D5FDZ2CO.js → extension-KCPUWSY2.js} +6 -5
  145. package/dist/cli-bundle/chunks/{extension-46NWACO3.js → extension-UTTQDUYI.js} +6 -5
  146. package/dist/cli-bundle/chunks/{files-X3H7CCBQ.js → files-TPUL6KWB.js} +9 -9
  147. package/dist/cli-bundle/chunks/{files-DSZBOSSN.js → files-Z2HHEFGP.js} +9 -9
  148. package/dist/cli-bundle/chunks/{focus-5STQXDPU.js → focus-JVJCGC2D.js} +8 -8
  149. package/dist/cli-bundle/chunks/{focus-MDVPOWB5.js → focus-YRNNH7IP.js} +8 -8
  150. package/dist/cli-bundle/chunks/{gc-ZMST3WQP.js → gc-O5GUO3SU.js} +3 -3
  151. package/dist/cli-bundle/chunks/{gc-ZC7JHBG7.js → gc-PYVVEELM.js} +3 -3
  152. package/dist/cli-bundle/chunks/{get-NT7L2HUZ.js → get-ENLTEGTX.js} +11 -11
  153. package/dist/cli-bundle/chunks/{get-J2IPJRZW.js → get-X4O3HBEY.js} +11 -11
  154. package/dist/cli-bundle/chunks/{health-WOYBR3KU.js → health-5EXTY44Q.js} +14 -13
  155. package/dist/cli-bundle/chunks/{health-WOYBR3KU.js.map → health-5EXTY44Q.js.map} +1 -1
  156. package/dist/cli-bundle/chunks/{health-IVMA3XQC.js → health-BOTB7YSU.js} +16 -15
  157. package/dist/cli-bundle/chunks/{health-IVMA3XQC.js.map → health-BOTB7YSU.js.map} +1 -1
  158. package/dist/cli-bundle/chunks/{history-RLH2QCRO.js → history-AJTXLT6S.js} +10 -10
  159. package/dist/cli-bundle/chunks/history-AK3E5Z3C.js +20 -0
  160. package/dist/cli-bundle/chunks/{history-compact-UXDIFC33.js → history-compact-43OOUAWD.js} +12 -12
  161. package/dist/cli-bundle/chunks/{history-compact-ZBEBGJM7.js → history-compact-46MRHW3I.js} +12 -12
  162. package/dist/cli-bundle/chunks/{history-redact-P7I7AWMB.js → history-redact-KUUUVUFM.js} +11 -11
  163. package/dist/cli-bundle/chunks/history-redact-TWIYQV5J.js +21 -0
  164. package/dist/cli-bundle/chunks/{history-repair-52KINVIK.js → history-repair-B5PZBOPU.js} +12 -12
  165. package/dist/cli-bundle/chunks/{history-repair-RM5ITLU5.js → history-repair-VQTYOSRS.js} +12 -12
  166. package/dist/cli-bundle/chunks/{init-2BNZOO6F.js → init-BNLVFPRG.js} +11 -10
  167. package/dist/cli-bundle/chunks/init-RCRKW5PL.js +21 -0
  168. package/dist/cli-bundle/chunks/{learnings-YGYVHWJK.js → learnings-MUUU5KMC.js} +10 -10
  169. package/dist/cli-bundle/chunks/{learnings-W6F3FIPL.js → learnings-XSGX52S7.js} +10 -10
  170. package/dist/cli-bundle/chunks/{list-K6FPV4J4.js → list-32U7BSKE.js} +10 -10
  171. package/dist/cli-bundle/chunks/{list-KPAYU5KZ.js → list-ZEEOHLTQ.js} +10 -10
  172. package/dist/cli-bundle/chunks/{notes-PU74EPKV.js → notes-NJ45OZGF.js} +10 -10
  173. package/dist/cli-bundle/chunks/{notes-YTD6ZILW.js → notes-OHU25L3M.js} +10 -10
  174. package/dist/cli-bundle/chunks/{plan-GEQYUCBW.js → plan-KQA7CAKI.js} +14 -14
  175. package/dist/cli-bundle/chunks/{plan-FNXHXRCI.js → plan-LWWAEV5Y.js} +14 -14
  176. package/dist/cli-bundle/chunks/{register-list-query-QI45RMKN.js → register-list-query-DDCHPONM.js} +19 -19
  177. package/dist/cli-bundle/chunks/{register-list-query-PHWYHENI.js → register-list-query-YNPBVIKM.js} +19 -19
  178. package/dist/cli-bundle/chunks/{register-mutation-YINRTS7L.js → register-mutation-7ALWDDAX.js} +33 -33
  179. package/dist/cli-bundle/chunks/{register-mutation-X3BUOQEL.js → register-mutation-LAVKYY63.js} +33 -33
  180. package/dist/cli-bundle/chunks/{register-operations-E5JEASRK.js → register-operations-R4VOQ6EF.js} +32 -32
  181. package/dist/cli-bundle/chunks/{register-operations-MIDTRW7S.js → register-operations-U5JAW3WE.js} +32 -32
  182. package/dist/cli-bundle/chunks/{register-setup-EG2U6CEU.js → register-setup-KBXQDCXE.js} +27 -18
  183. package/dist/cli-bundle/chunks/register-setup-KBXQDCXE.js.map +7 -0
  184. package/dist/cli-bundle/chunks/{register-setup-DYBFLEZX.js → register-setup-RCRUHMSZ.js} +28 -19
  185. package/dist/cli-bundle/chunks/register-setup-RCRUHMSZ.js.map +1 -0
  186. package/dist/cli-bundle/chunks/restore-2ZKT6UDC.js +19 -0
  187. package/dist/cli-bundle/chunks/{restore-XQYSWBV7.js → restore-6K53WOWO.js} +11 -11
  188. package/dist/cli-bundle/chunks/{scheduling-shortcuts-NNT5ASZR.js → scheduling-shortcuts-NJ5UVJFB.js} +14 -14
  189. package/dist/cli-bundle/chunks/{scheduling-shortcuts-HJMTEXKE.js → scheduling-shortcuts-OQVJXG3M.js} +14 -14
  190. package/dist/cli-bundle/chunks/{schema-263RI4WW.js → schema-MNTAVQCY.js} +9 -9
  191. package/dist/cli-bundle/chunks/{schema-TZXW6XWD.js → schema-RBTJ2YXW.js} +9 -9
  192. package/dist/cli-bundle/chunks/{search-SFRJOVDG.js → search-6HOIVZDU.js} +12 -12
  193. package/dist/cli-bundle/chunks/{search-LECJYSXE.js → search-ZWYEMASC.js} +12 -12
  194. package/dist/cli-bundle/chunks/{stats-N7ER2PNK.js → stats-FS742AMA.js} +8 -8
  195. package/dist/cli-bundle/chunks/{stats-VPBGSRQH.js → stats-R5OAJVZK.js} +8 -8
  196. package/dist/cli-bundle/chunks/{telemetry-PP3FUNBU.js → telemetry-7DIGDQUO.js} +4 -4
  197. package/dist/cli-bundle/chunks/{telemetry-L6K3BUIQ.js → telemetry-FWEXSJLQ.js} +4 -4
  198. package/dist/cli-bundle/chunks/{test-3EGNS3T5.js → test-NZF7OT2F.js} +16 -15
  199. package/dist/cli-bundle/chunks/test-QJXLKV26.js +36 -0
  200. package/dist/cli-bundle/chunks/{test-all-NJ5V2QFS.js → test-all-DPN62TX7.js} +16 -15
  201. package/dist/cli-bundle/chunks/{test-all-NJ5V2QFS.js.map → test-all-DPN62TX7.js.map} +1 -1
  202. package/dist/cli-bundle/chunks/{test-all-ZHFAWNC3.js → test-all-KL7TLMJF.js} +18 -17
  203. package/dist/cli-bundle/chunks/{test-all-ZHFAWNC3.js.map → test-all-KL7TLMJF.js.map} +1 -1
  204. package/dist/cli-bundle/chunks/{test-runs-GN3C6GOI.js → test-runs-C6CFIVOS.js} +5 -5
  205. package/dist/cli-bundle/chunks/{test-runs-AJHR6IQF.js → test-runs-IAJDL6CA.js} +5 -5
  206. package/dist/cli-bundle/chunks/update-2XCQNOD6.js +28 -0
  207. package/dist/cli-bundle/chunks/update-IWUCXVH2.js +24 -0
  208. package/dist/cli-bundle/chunks/{update-many-RYQ64CFW.js → update-many-MUTIOAP3.js} +23 -23
  209. package/dist/cli-bundle/chunks/{update-many-N2AN6ZDH.js → update-many-YEH2DQL6.js} +23 -23
  210. package/dist/cli-bundle/chunks/{upgrade-VPCIYAVW.js → upgrade-HYJ3SWWU.js} +8 -7
  211. package/dist/cli-bundle/chunks/{upgrade-VPCIYAVW.js.map → upgrade-HYJ3SWWU.js.map} +1 -1
  212. package/dist/cli-bundle/chunks/{upgrade-TJXFLZIX.js → upgrade-UBNLBZNR.js} +6 -5
  213. package/dist/cli-bundle/chunks/{upgrade-TJXFLZIX.js.map → upgrade-UBNLBZNR.js.map} +1 -1
  214. package/dist/cli-bundle/chunks/{validate-PHKIYGSY.js → validate-6QWQVCX2.js} +21 -20
  215. package/dist/cli-bundle/chunks/{validate-PHKIYGSY.js.map → validate-6QWQVCX2.js.map} +1 -1
  216. package/dist/cli-bundle/chunks/{validate-JMNWEUYF.js → validate-W5V5ZGQX.js} +23 -22
  217. package/dist/cli-bundle/chunks/{validate-JMNWEUYF.js.map → validate-W5V5ZGQX.js.map} +1 -1
  218. package/dist/cli-bundle/main.js +38 -22
  219. package/dist/cli-bundle/main.js.map +2 -2
  220. package/dist/cli.js +3 -3
  221. package/dist/cli.js.map +1 -1
  222. package/dist/core/extensions/activation-summary.d.ts +109 -0
  223. package/dist/core/extensions/activation-summary.js +60 -0
  224. package/dist/core/extensions/activation-summary.js.map +1 -0
  225. package/dist/core/extensions/capability-usage.d.ts +92 -0
  226. package/dist/core/extensions/capability-usage.js +142 -0
  227. package/dist/core/extensions/capability-usage.js.map +1 -0
  228. package/dist/core/extensions/extension-capability-aliases.d.ts +7 -0
  229. package/dist/core/extensions/extension-capability-aliases.js +12 -2
  230. package/dist/core/extensions/extension-capability-aliases.js.map +1 -1
  231. package/dist/core/extensions/index.d.ts +1 -0
  232. package/dist/core/extensions/index.js +3 -2
  233. package/dist/core/extensions/index.js.map +1 -1
  234. package/dist/core/telemetry/runtime.js +5 -2
  235. package/dist/core/telemetry/runtime.js.map +1 -1
  236. package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
  237. package/dist/sdk/cli-contracts/enum-contracts.js +4 -2
  238. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  239. package/dist/sdk/cli-contracts.d.ts +2 -0
  240. package/dist/sdk/cli-contracts.js +26 -13
  241. package/dist/sdk/cli-contracts.js.map +1 -1
  242. package/dist/sdk/compose.d.ts +297 -0
  243. package/dist/sdk/compose.js +420 -0
  244. package/dist/sdk/compose.js.map +1 -0
  245. package/dist/sdk/define.d.ts +194 -0
  246. package/dist/sdk/define.js +205 -0
  247. package/dist/sdk/define.js.map +1 -0
  248. package/dist/sdk/index.d.ts +8 -26
  249. package/dist/sdk/index.js +8 -10
  250. package/dist/sdk/index.js.map +1 -1
  251. package/dist/sdk/testing.d.ts +667 -2
  252. package/dist/sdk/testing.js +654 -18
  253. package/dist/sdk/testing.js.map +1 -1
  254. package/docs/COMMANDS.md +1 -0
  255. package/docs/EXTENSIONS.md +10 -11
  256. package/docs/SDK.md +502 -16
  257. package/package.json +2 -2
  258. package/dist/cli-bundle/chunks/activity-CIHV64UC.js +0 -18
  259. package/dist/cli-bundle/chunks/chunk-32R4PIC6.js.map +0 -1
  260. package/dist/cli-bundle/chunks/chunk-434HM6Z5.js.map +0 -1
  261. package/dist/cli-bundle/chunks/chunk-5PCI3UBT.js.map +0 -7
  262. package/dist/cli-bundle/chunks/chunk-A4Z7ZOL5.js.map +0 -1
  263. package/dist/cli-bundle/chunks/chunk-HC4AWIKT.js.map +0 -7
  264. package/dist/cli-bundle/chunks/chunk-HMOADQVT.js.map +0 -7
  265. package/dist/cli-bundle/chunks/close-DNMHGOCX.js +0 -15
  266. package/dist/cli-bundle/chunks/contracts-3THOLA7L.js.map +0 -7
  267. package/dist/cli-bundle/chunks/contracts-N65FXEOL.js.map +0 -1
  268. package/dist/cli-bundle/chunks/create-NNP6TSFO.js +0 -30
  269. package/dist/cli-bundle/chunks/history-WX3MGFS2.js +0 -20
  270. package/dist/cli-bundle/chunks/history-redact-YQGU3XRA.js +0 -21
  271. package/dist/cli-bundle/chunks/init-SC2P6CHP.js +0 -20
  272. package/dist/cli-bundle/chunks/register-setup-DYBFLEZX.js.map +0 -1
  273. package/dist/cli-bundle/chunks/register-setup-EG2U6CEU.js.map +0 -7
  274. package/dist/cli-bundle/chunks/restore-5KHR2YYQ.js +0 -19
  275. package/dist/cli-bundle/chunks/test-RQCTSWUK.js +0 -35
  276. package/dist/cli-bundle/chunks/update-6YXOGHRT.js +0 -24
  277. package/dist/cli-bundle/chunks/update-V33YUBRP.js +0 -28
  278. /package/dist/cli-bundle/chunks/{activity-KW3IRP44.js.map → activity-H2LMOSSW.js.map} +0 -0
  279. /package/dist/cli-bundle/chunks/{activity-CIHV64UC.js.map → activity-XUZ2AHCW.js.map} +0 -0
  280. /package/dist/cli-bundle/chunks/{aggregate-3ZKQG5SW.js.map → aggregate-EGJLZQBI.js.map} +0 -0
  281. /package/dist/cli-bundle/chunks/{aggregate-FIGQEIL3.js.map → aggregate-R725FC3S.js.map} +0 -0
  282. /package/dist/cli-bundle/chunks/{append-EWJYJ7CH.js.map → append-5J345QGU.js.map} +0 -0
  283. /package/dist/cli-bundle/chunks/{append-QEOLX3XB.js.map → append-O5HPBMRN.js.map} +0 -0
  284. /package/dist/cli-bundle/chunks/{chunk-GOZUHWFD.js.map → chunk-2A34E3BA.js.map} +0 -0
  285. /package/dist/cli-bundle/chunks/{chunk-5QICDWMV.js.map → chunk-2CKH2LMV.js.map} +0 -0
  286. /package/dist/cli-bundle/chunks/{chunk-WQ7NIVDK.js.map → chunk-2RDVQEWV.js.map} +0 -0
  287. /package/dist/cli-bundle/chunks/{chunk-NSBZ2CKF.js.map → chunk-2T3JG6V4.js.map} +0 -0
  288. /package/dist/cli-bundle/chunks/{chunk-76Z3YSHV.js.map → chunk-34EONI5F.js.map} +0 -0
  289. /package/dist/cli-bundle/chunks/{chunk-PUH4D67U.js.map → chunk-3VY3YQO6.js.map} +0 -0
  290. /package/dist/cli-bundle/chunks/{chunk-N5ZJACJ6.js.map → chunk-46G6RSB6.js.map} +0 -0
  291. /package/dist/cli-bundle/chunks/{chunk-SRYYRVPB.js.map → chunk-4BHT5VDC.js.map} +0 -0
  292. /package/dist/cli-bundle/chunks/{chunk-PFSRUHDH.js.map → chunk-4KD54S3Z.js.map} +0 -0
  293. /package/dist/cli-bundle/chunks/{chunk-NIUEXCFS.js.map → chunk-5UVVASSA.js.map} +0 -0
  294. /package/dist/cli-bundle/chunks/{chunk-CF55WVVS.js.map → chunk-5VOINNKT.js.map} +0 -0
  295. /package/dist/cli-bundle/chunks/{chunk-NIGXMNNI.js.map → chunk-66MEDTUD.js.map} +0 -0
  296. /package/dist/cli-bundle/chunks/{chunk-AZMOLBN3.js.map → chunk-7AUB5HNA.js.map} +0 -0
  297. /package/dist/cli-bundle/chunks/{chunk-OTHIWLMB.js.map → chunk-7K2XXO4I.js.map} +0 -0
  298. /package/dist/cli-bundle/chunks/{chunk-7D3SAQXM.js.map → chunk-7MRQ4HMK.js.map} +0 -0
  299. /package/dist/cli-bundle/chunks/{chunk-EBH56IXK.js.map → chunk-7SV63ZHD.js.map} +0 -0
  300. /package/dist/cli-bundle/chunks/{chunk-OFYMIDF2.js.map → chunk-7UGEAPRY.js.map} +0 -0
  301. /package/dist/cli-bundle/chunks/{chunk-LUWW7L4B.js.map → chunk-7XGQXHFB.js.map} +0 -0
  302. /package/dist/cli-bundle/chunks/{chunk-UEMNL33O.js.map → chunk-AD3A7ZD6.js.map} +0 -0
  303. /package/dist/cli-bundle/chunks/{chunk-3EWSGA7N.js.map → chunk-AONIHR2C.js.map} +0 -0
  304. /package/dist/cli-bundle/chunks/{chunk-RVHYI7SL.js.map → chunk-BB6MDVNQ.js.map} +0 -0
  305. /package/dist/cli-bundle/chunks/{chunk-52OCIDPG.js.map → chunk-CE5P2NQR.js.map} +0 -0
  306. /package/dist/cli-bundle/chunks/{chunk-NXS7ZKAK.js.map → chunk-CIIK67GW.js.map} +0 -0
  307. /package/dist/cli-bundle/chunks/{chunk-NB3PYLQ6.js.map → chunk-DT5LPYOD.js.map} +0 -0
  308. /package/dist/cli-bundle/chunks/{chunk-37QXHBIB.js.map → chunk-FIGAZ4Y7.js.map} +0 -0
  309. /package/dist/cli-bundle/chunks/{chunk-UV6IYE5U.js.map → chunk-FXR67XVQ.js.map} +0 -0
  310. /package/dist/cli-bundle/chunks/{chunk-3MDHREEV.js.map → chunk-G6N5VEOK.js.map} +0 -0
  311. /package/dist/cli-bundle/chunks/{chunk-2GCDRRIF.js.map → chunk-GAJVRGGA.js.map} +0 -0
  312. /package/dist/cli-bundle/chunks/{chunk-HCU6WUSY.js.map → chunk-H2IP4QLJ.js.map} +0 -0
  313. /package/dist/cli-bundle/chunks/{chunk-CZUB4XWO.js.map → chunk-H4IIJDE4.js.map} +0 -0
  314. /package/dist/cli-bundle/chunks/{chunk-RLK7P77C.js.map → chunk-HFFUQR73.js.map} +0 -0
  315. /package/dist/cli-bundle/chunks/{chunk-6M4RJS4M.js.map → chunk-IB3GYLQE.js.map} +0 -0
  316. /package/dist/cli-bundle/chunks/{chunk-SX75ADBK.js.map → chunk-IPKJ6B36.js.map} +0 -0
  317. /package/dist/cli-bundle/chunks/{chunk-H7NJZWG2.js.map → chunk-JR2LV3M4.js.map} +0 -0
  318. /package/dist/cli-bundle/chunks/{chunk-PP2U4NMT.js.map → chunk-KFWBJPSG.js.map} +0 -0
  319. /package/dist/cli-bundle/chunks/{chunk-F7K5GWP3.js.map → chunk-LRKKONT2.js.map} +0 -0
  320. /package/dist/cli-bundle/chunks/{chunk-5IDI42VV.js.map → chunk-M4T5DXD5.js.map} +0 -0
  321. /package/dist/cli-bundle/chunks/{chunk-2PKHRP6G.js.map → chunk-MJTINN54.js.map} +0 -0
  322. /package/dist/cli-bundle/chunks/{chunk-QGG32QHW.js.map → chunk-NCVCO3NZ.js.map} +0 -0
  323. /package/dist/cli-bundle/chunks/{chunk-AIS5PGI3.js.map → chunk-NK3UPBVG.js.map} +0 -0
  324. /package/dist/cli-bundle/chunks/{chunk-6H4LF7AO.js.map → chunk-O6LLO73I.js.map} +0 -0
  325. /package/dist/cli-bundle/chunks/{chunk-YCJX76PW.js.map → chunk-P77P2ILI.js.map} +0 -0
  326. /package/dist/cli-bundle/chunks/{chunk-F5NZWFSW.js.map → chunk-Q2KNGP7C.js.map} +0 -0
  327. /package/dist/cli-bundle/chunks/{chunk-GMHPNNYG.js.map → chunk-QH3PJYON.js.map} +0 -0
  328. /package/dist/cli-bundle/chunks/{chunk-NJHMAJ6N.js.map → chunk-QL5RVYOA.js.map} +0 -0
  329. /package/dist/cli-bundle/chunks/{chunk-O47BPOPC.js.map → chunk-S26C36QC.js.map} +0 -0
  330. /package/dist/cli-bundle/chunks/{chunk-D7FYS6PG.js.map → chunk-S2RUQSX2.js.map} +0 -0
  331. /package/dist/cli-bundle/chunks/{chunk-CZPXY7UW.js.map → chunk-SBQTAVJZ.js.map} +0 -0
  332. /package/dist/cli-bundle/chunks/{chunk-M5XALUSL.js.map → chunk-SKH7OGE5.js.map} +0 -0
  333. /package/dist/cli-bundle/chunks/{chunk-NJN7LL7U.js.map → chunk-SKN7LC5W.js.map} +0 -0
  334. /package/dist/cli-bundle/chunks/{chunk-6ZXM2XNF.js.map → chunk-SR3EKWZG.js.map} +0 -0
  335. /package/dist/cli-bundle/chunks/{chunk-B473GZWW.js.map → chunk-T5472OMV.js.map} +0 -0
  336. /package/dist/cli-bundle/chunks/{chunk-2EIMPCE4.js.map → chunk-T72AZDBA.js.map} +0 -0
  337. /package/dist/cli-bundle/chunks/{chunk-6CJWZAN7.js.map → chunk-TQZH6OD6.js.map} +0 -0
  338. /package/dist/cli-bundle/chunks/{chunk-FWPDUYEY.js.map → chunk-U2Z5YUSO.js.map} +0 -0
  339. /package/dist/cli-bundle/chunks/{chunk-HIP7WVTL.js.map → chunk-UVC5LOR7.js.map} +0 -0
  340. /package/dist/cli-bundle/chunks/{chunk-LEU5GHRC.js.map → chunk-VAYA4XFX.js.map} +0 -0
  341. /package/dist/cli-bundle/chunks/{chunk-J4MYYSOL.js.map → chunk-VFAQ4LMN.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{chunk-UPE3CDD7.js.map → chunk-W72GHSJE.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{chunk-C4N5I7ZW.js.map → chunk-WBRKK5QR.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{chunk-Z6T4PQI2.js.map → chunk-WM5ZVBPE.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{chunk-TKBHZPKD.js.map → chunk-WZQWHN4R.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{chunk-FKBDKV7Y.js.map → chunk-XVF4YARA.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{chunk-QZTWBFXJ.js.map → chunk-YDEXO24S.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{chunk-FRUFKWNK.js.map → chunk-YJ3SUEPD.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{chunk-5FIEHKEX.js.map → chunk-YUDJD3XO.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{chunk-Q2J2HJUN.js.map → chunk-ZQ3ZVXX2.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{chunk-C3AZ5ZML.js.map → chunk-ZRK4O56R.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{claim-RC56YUWG.js.map → claim-4KHAA2RN.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{claim-THOJ6CMV.js.map → claim-CSPJFLNH.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{close-DNMHGOCX.js.map → close-A3EMKBBY.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{close-SG5MNCVQ.js.map → close-W56IOGYG.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{close-many-3L3AQZBU.js.map → close-many-BX5DCSVV.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{close-many-DKQLBGLV.js.map → close-many-TQU5F4E4.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{comments-M7ZOZNBX.js.map → comments-U5KUC4EU.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{comments-SKWMDWCW.js.map → comments-VRECH75R.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{config-OZCUABPB.js.map → config-D3OKQO52.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{config-7CK62S7T.js.map → config-MMJA4LLK.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{context-PUG2A7RC.js.map → context-BLBD3PUB.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{context-OEC366TO.js.map → context-DHLVPXN3.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{copy-JPX7VZCH.js.map → copy-5D5DX3VK.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{copy-6QLHILAC.js.map → copy-HHL3K4QP.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{create-Y54ZVVZH.js.map → create-IXY43O4H.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{create-NNP6TSFO.js.map → create-QVGFYA2X.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{delete-63PCMQAJ.js.map → delete-IBUR3M42.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{delete-GDSMGAGJ.js.map → delete-QQC2FGUH.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{deps-XYQ73XRH.js.map → deps-KWKRHXIN.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{deps-T4ZF5G54.js.map → deps-VTPO4BSE.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{docs-EHNPDWUL.js.map → docs-7CHFHXLN.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{docs-C75YIXHC.js.map → docs-IIO3FEUO.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{eval-GTENKE24.js.map → eval-CEYYEPSX.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{eval-3WKDTRMH.js.map → eval-IO7LREOL.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{extension-D5FDZ2CO.js.map → extension-KCPUWSY2.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{extension-46NWACO3.js.map → extension-UTTQDUYI.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{files-X3H7CCBQ.js.map → files-TPUL6KWB.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{files-DSZBOSSN.js.map → files-Z2HHEFGP.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{focus-5STQXDPU.js.map → focus-JVJCGC2D.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{focus-MDVPOWB5.js.map → focus-YRNNH7IP.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{gc-ZMST3WQP.js.map → gc-O5GUO3SU.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{gc-ZC7JHBG7.js.map → gc-PYVVEELM.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{get-NT7L2HUZ.js.map → get-ENLTEGTX.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{get-J2IPJRZW.js.map → get-X4O3HBEY.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{history-RLH2QCRO.js.map → history-AJTXLT6S.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{history-WX3MGFS2.js.map → history-AK3E5Z3C.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{history-compact-UXDIFC33.js.map → history-compact-43OOUAWD.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{history-compact-ZBEBGJM7.js.map → history-compact-46MRHW3I.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{history-redact-P7I7AWMB.js.map → history-redact-KUUUVUFM.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{history-redact-YQGU3XRA.js.map → history-redact-TWIYQV5J.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{history-repair-52KINVIK.js.map → history-repair-B5PZBOPU.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{history-repair-RM5ITLU5.js.map → history-repair-VQTYOSRS.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{init-2BNZOO6F.js.map → init-BNLVFPRG.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{init-SC2P6CHP.js.map → init-RCRKW5PL.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{learnings-YGYVHWJK.js.map → learnings-MUUU5KMC.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{learnings-W6F3FIPL.js.map → learnings-XSGX52S7.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{list-K6FPV4J4.js.map → list-32U7BSKE.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{list-KPAYU5KZ.js.map → list-ZEEOHLTQ.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{notes-PU74EPKV.js.map → notes-NJ45OZGF.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{notes-YTD6ZILW.js.map → notes-OHU25L3M.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{plan-GEQYUCBW.js.map → plan-KQA7CAKI.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{plan-FNXHXRCI.js.map → plan-LWWAEV5Y.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{register-list-query-QI45RMKN.js.map → register-list-query-DDCHPONM.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{register-list-query-PHWYHENI.js.map → register-list-query-YNPBVIKM.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{register-mutation-YINRTS7L.js.map → register-mutation-7ALWDDAX.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{register-mutation-X3BUOQEL.js.map → register-mutation-LAVKYY63.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{register-operations-E5JEASRK.js.map → register-operations-R4VOQ6EF.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{register-operations-MIDTRW7S.js.map → register-operations-U5JAW3WE.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{restore-5KHR2YYQ.js.map → restore-2ZKT6UDC.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{restore-XQYSWBV7.js.map → restore-6K53WOWO.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-NNT5ASZR.js.map → scheduling-shortcuts-NJ5UVJFB.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-HJMTEXKE.js.map → scheduling-shortcuts-OQVJXG3M.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{schema-263RI4WW.js.map → schema-MNTAVQCY.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{schema-TZXW6XWD.js.map → schema-RBTJ2YXW.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{search-SFRJOVDG.js.map → search-6HOIVZDU.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{search-LECJYSXE.js.map → search-ZWYEMASC.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{stats-N7ER2PNK.js.map → stats-FS742AMA.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{stats-VPBGSRQH.js.map → stats-R5OAJVZK.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{telemetry-PP3FUNBU.js.map → telemetry-7DIGDQUO.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{telemetry-L6K3BUIQ.js.map → telemetry-FWEXSJLQ.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{test-3EGNS3T5.js.map → test-NZF7OT2F.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{test-RQCTSWUK.js.map → test-QJXLKV26.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{test-runs-GN3C6GOI.js.map → test-runs-C6CFIVOS.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{test-runs-AJHR6IQF.js.map → test-runs-IAJDL6CA.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{update-V33YUBRP.js.map → update-2XCQNOD6.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{update-6YXOGHRT.js.map → update-IWUCXVH2.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{update-many-RYQ64CFW.js.map → update-many-MUTIOAP3.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{update-many-N2AN6ZDH.js.map → update-many-YEH2DQL6.js.map} +0 -0
@@ -1,7 +1,24 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cdb9b0c1-6fbc-5b77-bcd0-c4630a719641")}catch(e){}}();
3
- import { activateExtensions } from "../core/extensions/loader.js";
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]="9ca86b28-8f2c-5dd3-bdf0-85d3f60e6197")}catch(e){}}();
3
+ import { activateExtensions, deactivateExtensions, runAfterCommandHooks, runBeforeCommandHooks, runCommandHandler, runCommandOverride, runOnIndexHooks, runOnReadHooks, runOnWriteHooks, runParserOverride, runPreflightOverride, runRendererOverride, runServiceOverride, } from "../core/extensions/loader.js";
4
4
  import { createDefaultExtensionGovernancePolicy } from "../core/extensions/extension-types.js";
5
+ import { getMigrationRuntimeDefinition, resolveRegisteredSearchProvider, resolveRegisteredVectorStoreAdapter, } from "../core/extensions/runtime-registrations.js";
6
+ import { collectUsedExtensionCapabilities } from "../core/extensions/capability-usage.js";
7
+ import { normalizeKnownExtensionCapability } from "../core/extensions/extension-capability-aliases.js";
8
+ import { describeExtensionBlueprint, lintExtensionBlueprint } from "./compose.js";
9
+ // `describeExtensionActivation` is the `describe` (enumerate-all) verb that
10
+ // pairs with the `assert*` (verify-one) and `run*` (invoke-one) helpers below.
11
+ // It lives in core (it walks the same registries the loader populates) and is
12
+ // surfaced here so package authors get the whole testing surface from the
13
+ // `@unbrained/pm-cli/sdk/testing` subpath.
14
+ export { describeExtensionActivation, } from "../core/extensions/activation-summary.js";
15
+ // `composeExtension`'s author-time companions: describe a blueprint's surface map
16
+ // and preflight it for capability drift / duplicate / empty-surface footguns
17
+ // without activating. Surfaced through the `@unbrained/pm-cli/sdk/testing` subpath
18
+ // so a package author gets the full author → describe → preflight → test loop here,
19
+ // alongside the assert*/run* helpers; `assertExtensionBlueprint` below is the
20
+ // throwing assertion that pairs with the non-throwing `lintExtensionBlueprint`.
21
+ export { describeExtensionBlueprint, lintExtensionBlueprint };
5
22
  const HOOK_KIND_TO_REGISTRY_FIELD = {
6
23
  before_command: "beforeCommand",
7
24
  after_command: "afterCommand",
@@ -69,6 +86,10 @@ function readTestExtensionManifest(module) {
69
86
  }
70
87
  return {};
71
88
  }
89
+ function resolveTestExtensionName(manifest, explicitName) {
90
+ return (explicitName ??
91
+ (typeof manifest.name === "string" && manifest.name.trim().length > 0 ? manifest.name.trim() : "test-extension"));
92
+ }
72
93
  function readTestExtensionCapabilities(manifest, options) {
73
94
  if (Array.isArray(options.capabilities)) {
74
95
  return [...options.capabilities];
@@ -79,18 +100,14 @@ function readTestExtensionCapabilities(manifest, options) {
79
100
  return [];
80
101
  }
81
102
  /**
82
- * Activate one in-memory extension module for package tests.
83
- *
84
- * This uses pm's real registration validation and activation engine while
85
- * avoiding private loader imports, filesystem manifests, or workspace setup.
103
+ * Build the synthetic single-extension {@link ExtensionLoadResult} shared by the
104
+ * activate/deactivate test helpers, so both stay aligned with the loader's load
105
+ * contract as it evolves. The `loaded` entry mirrors the real on-disk shape
106
+ * (including `capabilities` and the compatibility fields) while leaving
107
+ * filesystem paths empty, since the module is supplied in memory.
86
108
  */
87
- export async function activateExtensionForTest(module, options = {}) {
88
- const manifest = readTestExtensionManifest(module);
89
- const name = options.name ??
90
- (typeof manifest.name === "string" && manifest.name.trim().length > 0 ? manifest.name.trim() : "test-extension");
91
- const layer = options.layer ?? "project";
92
- const capabilities = readTestExtensionCapabilities(manifest, options);
93
- return activateExtensions({
109
+ function buildSingleExtensionLoadResult(module, manifest, identity) {
110
+ return {
94
111
  disabled_by_flag: false,
95
112
  roots: { global: "", project: "" },
96
113
  configured_enabled: [],
@@ -98,19 +115,19 @@ export async function activateExtensionForTest(module, options = {}) {
98
115
  discovered: [],
99
116
  effective: [],
100
117
  warnings: [],
101
- policy: options.policy ?? createDefaultExtensionGovernancePolicy(),
118
+ policy: identity.policy,
102
119
  failed: [],
103
120
  loaded: [
104
121
  {
105
- layer,
122
+ layer: identity.layer,
106
123
  directory: "",
107
124
  manifest_path: "",
108
- name,
125
+ name: identity.name,
109
126
  version: typeof manifest.version === "string" ? manifest.version : "0.0.0",
110
127
  entry: typeof manifest.entry === "string" ? manifest.entry : "./index.js",
111
128
  priority: typeof manifest.priority === "number" ? manifest.priority : 0,
112
129
  entry_path: "",
113
- capabilities,
130
+ capabilities: identity.capabilities,
114
131
  manifest_version: typeof manifest.manifest_version === "number" ? manifest.manifest_version : undefined,
115
132
  pm_min_version: typeof manifest.pm_min_version === "string" ? manifest.pm_min_version : undefined,
116
133
  pm_max_version: typeof manifest.pm_max_version === "string" ? manifest.pm_max_version : undefined,
@@ -123,8 +140,427 @@ export async function activateExtensionForTest(module, options = {}) {
123
140
  module,
124
141
  },
125
142
  ],
143
+ };
144
+ }
145
+ /**
146
+ * Activate one in-memory extension module for package tests.
147
+ *
148
+ * This uses pm's real registration validation and activation engine while
149
+ * avoiding private loader imports, filesystem manifests, or workspace setup.
150
+ */
151
+ export async function activateExtensionForTest(module, options = {}) {
152
+ const manifest = readTestExtensionManifest(module);
153
+ return activateExtensions(buildSingleExtensionLoadResult(module, manifest, {
154
+ name: resolveTestExtensionName(manifest, options.name),
155
+ layer: options.layer ?? "project",
156
+ capabilities: readTestExtensionCapabilities(manifest, options),
157
+ policy: options.policy ?? createDefaultExtensionGovernancePolicy(),
158
+ }));
159
+ }
160
+ /**
161
+ * Deactivate one in-memory extension module for package tests — the teardown
162
+ * counterpart to {@link activateExtensionForTest}.
163
+ *
164
+ * Runs pm's real `deactivateExtensions` engine (including its bounded per-hook
165
+ * timeout and best-effort failure capture) over a single synthetic load entry,
166
+ * so authors can prove an extension's `deactivate` releases the resources its
167
+ * `activate` opened — without importing private loader internals or staging a
168
+ * workspace. Resolve `name`/`layer` the same way {@link activateExtensionForTest}
169
+ * does so a forwarded `activation` result skips a failed extension correctly.
170
+ */
171
+ export async function deactivateExtensionForTest(module, options = {}) {
172
+ const manifest = readTestExtensionManifest(module);
173
+ return deactivateExtensions(buildSingleExtensionLoadResult(module, manifest, {
174
+ name: resolveTestExtensionName(manifest, options.name),
175
+ layer: options.layer ?? "project",
176
+ capabilities: readTestExtensionCapabilities(manifest, {}),
177
+ policy: createDefaultExtensionGovernancePolicy(),
178
+ }), options.activation, options.deactivateTimeoutMs === undefined ? {} : { deactivate_timeout_ms: options.deactivateTimeoutMs });
179
+ }
180
+ /**
181
+ * Invoke a registered extension command handler and return its real
182
+ * {@link CommandHandlerResult} so package tests can assert on behavior — not
183
+ * just that the command was registered.
184
+ *
185
+ * This is the "invoke" verb that completes the package-author testing loop:
186
+ * `activateExtensionForTest` → `assertRegisteredCommandContract` → **run** →
187
+ * `deactivateExtensionForTest`. It runs pm's real handler-dispatch engine
188
+ * (`runCommandHandler`) over `activation.commands`, building the
189
+ * `CommandHandlerContext` with agent-safe global defaults
190
+ * (`{ json: true, quiet: true, noPager: true }`) that callers may override.
191
+ *
192
+ * Because `registerImporter`/`registerExporter` register their handlers under
193
+ * the `"<name> import"` / `"<name> export"` command paths, this same helper
194
+ * exercises importer and exporter handlers too.
195
+ *
196
+ * Throws a descriptive error (listing the available handler command paths) when
197
+ * no handler is registered for `command`, since that is a wiring/typo bug in the
198
+ * test rather than a behavior under test. When a handler is found, the result is
199
+ * returned verbatim: a clean run yields `{ handled: true, result, warnings: [] }`,
200
+ * while a handler that throws a non-exit error yields
201
+ * `{ handled: false, warnings: [code], errorMessage }` so the failure can be
202
+ * asserted. A handler that throws an error carrying a numeric `exitCode`
203
+ * propagates the throw, matching runtime semantics.
204
+ */
205
+ export async function runRegisteredCommandForTest(commands, options) {
206
+ const command = normalizeSdkCommandName(options.command);
207
+ if (command.length === 0) {
208
+ throw new Error("Expected command name must be a non-empty string");
209
+ }
210
+ const hasHandler = commands.handlers.some((entry) => entry.command === command);
211
+ if (!hasHandler) {
212
+ const available = sortedUnique(commands.handlers.map((entry) => entry.command));
213
+ throw new Error(`Expected a registered command handler for "${command}" to invoke. Available command handlers: ${formatAvailable(available)}`);
214
+ }
215
+ return runCommandHandler(commands, {
216
+ command,
217
+ args: options.args ? [...options.args] : [],
218
+ options: options.options ? { ...options.options } : {},
219
+ global: { json: true, quiet: true, noPager: true, ...options.global },
220
+ pm_root: options.pmRoot ?? "",
221
+ });
222
+ }
223
+ /**
224
+ * Fire every registered lifecycle hook of a given `kind` through pm's real hook
225
+ * runner and return the warnings array so package tests can assert on behavior —
226
+ * not just that a hook was registered.
227
+ *
228
+ * This is the hook counterpart to {@link runRegisteredCommandForTest}, extending
229
+ * the package-author "invoke" verb to the `api.hooks.*` surface. Pass the
230
+ * `ExtensionHookRegistry` from `activateExtensionForTest(...).hooks` together with
231
+ * the lifecycle `kind` and a synthetic context. Hooks observe their inputs via a
232
+ * cloned context snapshot (mutations never leak back to the caller), so the
233
+ * observable signal is twofold: any side effects the hook performs, and the
234
+ * returned warnings. A clean run returns `[]`; a hook that throws contributes one
235
+ * `extension_hook_failed:<layer>:<name>:<hookName>` warning, mirroring runtime
236
+ * dispatch which isolates a failing hook without aborting the others.
237
+ *
238
+ * Throws a descriptive error (listing the hook kinds that do have registrations)
239
+ * when no hook of `kind` is registered, since firing a hook the extension never
240
+ * registered is a wiring/typo bug in the test rather than a behavior under test.
241
+ */
242
+ export async function runRegisteredHookForTest(hooks, options) {
243
+ if (hooks[HOOK_KIND_TO_REGISTRY_FIELD[options.kind]].length === 0) {
244
+ const populatedKinds = sortedUnique(Object.keys(HOOK_KIND_TO_REGISTRY_FIELD).filter((kind) => hooks[HOOK_KIND_TO_REGISTRY_FIELD[kind]].length > 0));
245
+ throw new Error(`Expected a registered "${options.kind}" hook to invoke. Hook kinds with registrations: ${formatAvailable(populatedKinds)}`);
246
+ }
247
+ switch (options.kind) {
248
+ case "before_command":
249
+ return runBeforeCommandHooks(hooks, options.context);
250
+ case "after_command":
251
+ return runAfterCommandHooks(hooks, options.context);
252
+ case "on_read":
253
+ return runOnReadHooks(hooks, options.context);
254
+ case "on_write":
255
+ return runOnWriteHooks(hooks, options.context);
256
+ case "on_index":
257
+ return runOnIndexHooks(hooks, options.context);
258
+ }
259
+ }
260
+ /**
261
+ * Invoke a registered parser override through pm's real runner and return the
262
+ * resolved {@link ParserOverrideResult}, so package tests can assert the rewritten
263
+ * args/options/global an override produces for a command before dispatch.
264
+ *
265
+ * Guards that a parser override is registered for the (normalized) target command
266
+ * before delegating: without a match `runParserOverride` would silently return
267
+ * `overridden: false`, hiding a typo'd command name in the test. When a match
268
+ * exists the result is returned verbatim — `overridden: true` with the rewritten
269
+ * context on success, or `overridden: false` with an
270
+ * `extension_parser_override_failed:*` warning when the override throws.
271
+ */
272
+ export async function runRegisteredParserOverrideForTest(parsers, context) {
273
+ const command = normalizeSdkCommandName(context.command);
274
+ if (!parsers.overrides.some((entry) => entry.command === command)) {
275
+ throw new Error(`Expected a registered parser override for command "${command}" to invoke. Available parser override commands: ${formatAvailable(sortedUnique(parsers.overrides.map((entry) => entry.command)))}`);
276
+ }
277
+ return runParserOverride(parsers, context);
278
+ }
279
+ /**
280
+ * Invoke the active preflight override through pm's real runner and return the
281
+ * resolved {@link PreflightOverrideResult}, so package tests can assert the
282
+ * migration/format gate decision an override yields.
283
+ *
284
+ * Unlike command-scoped overrides, the runtime applies the **last** registered
285
+ * preflight override regardless of command, so this helper guards only that at
286
+ * least one preflight override is registered before delegating. The result is
287
+ * returned verbatim — `overridden: true` with the adjusted decision on success,
288
+ * or `overridden: false` with an `extension_preflight_override_failed:*` warning
289
+ * when the override throws.
290
+ */
291
+ export async function runRegisteredPreflightOverrideForTest(preflight, context) {
292
+ if (preflight.overrides.length === 0) {
293
+ throw new Error("Expected a registered preflight override to invoke, but none are registered.");
294
+ }
295
+ return runPreflightOverride(preflight, context);
296
+ }
297
+ /**
298
+ * Invoke a registered command-result override through pm's real runner and return
299
+ * the resolved {@link CommandOverrideResult}, so package tests can assert how an
300
+ * override transforms a command's result payload.
301
+ *
302
+ * Accepts the same `ExtensionCommandRegistry` exposed as
303
+ * `activateExtensionForTest(...).commands` (it carries both handlers and
304
+ * overrides). Guards that an override is registered for the (normalized) target
305
+ * command before delegating, so a typo'd command name surfaces as a clear error
306
+ * rather than a silent `overridden: false`. The result is returned verbatim —
307
+ * including the `extension_command_override_async_unsupported:*` warning the
308
+ * runtime emits when an override returns a Promise (command overrides are
309
+ * synchronous), or an `extension_command_override_failed:*` warning on throw.
310
+ */
311
+ export async function runRegisteredCommandOverrideForTest(commands, context) {
312
+ const command = normalizeSdkCommandName(context.command);
313
+ if (!commands.overrides.some((entry) => entry.command === command)) {
314
+ throw new Error(`Expected a registered command override for command "${command}" to invoke. Available command override commands: ${formatAvailable(sortedUnique(commands.overrides.map((entry) => entry.command)))}`);
315
+ }
316
+ return runCommandOverride(commands, context);
317
+ }
318
+ /**
319
+ * Invoke a registered renderer override through pm's real runner and return the
320
+ * resolved {@link RendererOverrideResult}, so package tests can assert the custom
321
+ * string an override renders for a given output `format`.
322
+ *
323
+ * Guards that a renderer override is registered for `context.format` before
324
+ * delegating, so a wrong format surfaces as a clear error rather than a silent
325
+ * `overridden: false`. The result is returned verbatim — `overridden: true` with
326
+ * the rendered string on success, or `overridden: false` (with an
327
+ * `extension_renderer_invalid_result:*` / `extension_renderer_failed:*` warning
328
+ * where applicable) when the override returns a non-string or throws.
329
+ */
330
+ export async function runRegisteredRendererOverrideForTest(renderers, context) {
331
+ if (!renderers.overrides.some((entry) => entry.format === context.format)) {
332
+ throw new Error(`Expected a registered renderer override for format "${context.format}" to invoke. Available renderer override formats: ${formatAvailable(sortedUnique(renderers.overrides.map((entry) => entry.format)))}`);
333
+ }
334
+ return runRendererOverride(renderers, context);
335
+ }
336
+ /**
337
+ * Invoke a registered service override through pm's real runner and return the
338
+ * resolved {@link ServiceOverrideResult}, so package tests can assert how an
339
+ * override handles an internal service payload (e.g. `output_format`).
340
+ *
341
+ * Guards that a service override is registered for `context.service` before
342
+ * delegating, so a wrong service name surfaces as a clear error rather than a
343
+ * silent `handled: false`. The result is returned verbatim — `handled: true` with
344
+ * the override's result when it claims the payload, or `handled: false` with the
345
+ * original payload (and any `extension_service_override_*` warnings) otherwise.
346
+ */
347
+ export async function runRegisteredServiceOverrideForTest(services, context) {
348
+ if (!services.overrides.some((entry) => entry.service === context.service)) {
349
+ throw new Error(`Expected a registered service override for service "${context.service}" to invoke. Available service override services: ${formatAvailable(sortedUnique(services.overrides.map((entry) => entry.service)))}`);
350
+ }
351
+ return runServiceOverride(services, context);
352
+ }
353
+ /**
354
+ * Maps each search-provider operation to the runtime-definition keys that may
355
+ * hold its function, in priority order. The host accepts both camelCase and
356
+ * snake_case spellings for the multi-word operations, so this helper mirrors that
357
+ * by trying `embedBatch` before `embed_batch` and `queryExpansion` before
358
+ * `query_expansion`.
359
+ */
360
+ const SEARCH_PROVIDER_OPERATION_DEFINITION_KEYS = {
361
+ query: ["query"],
362
+ embed: ["embed"],
363
+ embedBatch: ["embedBatch", "embed_batch"],
364
+ queryExpansion: ["queryExpansion", "query_expansion"],
365
+ rerank: ["rerank"],
366
+ };
367
+ /**
368
+ * Invoke an operation of a registered search provider through the same name
369
+ * resolution the host uses and return the operation's result, so package tests
370
+ * can assert a custom provider's runtime behavior — not just that it registered.
371
+ *
372
+ * This is the search-provider counterpart to {@link runRegisteredCommandForTest},
373
+ * extending the package-author "invoke" verb to the `api.registerSearchProvider`
374
+ * surface. Pass the `ExtensionRegistrationRegistry` from
375
+ * `activateExtensionForTest(...).registrations`, the registered provider name, the
376
+ * `operation` to exercise (`query`, `embed`, `embedBatch`, `queryExpansion`, or
377
+ * `rerank`), and a synthetic context. The provider is resolved via
378
+ * {@link resolveRegisteredSearchProvider} (case-insensitive, last registration
379
+ * wins) and the operation is invoked on its `runtime_definition` — the clone that
380
+ * preserves live functions, matching what the runtime dispatches.
381
+ *
382
+ * Throws a descriptive error listing the available providers when the name is not
383
+ * registered, and a separate error when the resolved provider does not implement
384
+ * the requested operation, since invoking an absent provider/operation is a
385
+ * wiring bug in the test rather than a behavior under test.
386
+ */
387
+ export async function runRegisteredSearchProviderForTest(registrations, options) {
388
+ const registration = resolveRegisteredSearchProvider(registrations, options.provider);
389
+ if (!registration) {
390
+ const available = sortedUnique(registrations.search_providers.map((entry) => entry.definition.name));
391
+ throw new Error(`Expected a registered search provider "${options.provider}" to invoke. Available search providers: ${formatAvailable(available)}`);
392
+ }
393
+ const runtimeDefinition = registration.runtime_definition;
394
+ const operationFn = SEARCH_PROVIDER_OPERATION_DEFINITION_KEYS[options.operation]
395
+ .map((key) => runtimeDefinition[key])
396
+ .find((value) => typeof value === "function");
397
+ if (typeof operationFn !== "function") {
398
+ throw new Error(`Registered search provider "${options.provider}" does not implement the "${options.operation}" operation.`);
399
+ }
400
+ return (await operationFn(options.context));
401
+ }
402
+ /**
403
+ * Invoke an operation of a registered vector store adapter through the same name
404
+ * resolution the host uses and return the operation's result, so package tests
405
+ * can assert a custom adapter's runtime behavior — not just that it registered.
406
+ *
407
+ * This is the vector-store counterpart to {@link runRegisteredSearchProviderForTest}.
408
+ * Pass the `ExtensionRegistrationRegistry` from
409
+ * `activateExtensionForTest(...).registrations`, the registered adapter name, the
410
+ * `operation` to exercise (`query`, `upsert`, or `delete`), and a synthetic
411
+ * context. The adapter is resolved via {@link resolveRegisteredVectorStoreAdapter}
412
+ * (case-insensitive, last registration wins) and the operation is invoked on its
413
+ * `runtime_definition` — the clone that preserves live functions, matching what
414
+ * the runtime dispatches.
415
+ *
416
+ * Throws a descriptive error listing the available adapters when the name is not
417
+ * registered, and a separate error when the resolved adapter does not implement
418
+ * the requested operation.
419
+ */
420
+ export async function runRegisteredVectorStoreAdapterForTest(registrations, options) {
421
+ const registration = resolveRegisteredVectorStoreAdapter(registrations, options.adapter);
422
+ if (!registration) {
423
+ const available = sortedUnique(registrations.vector_store_adapters.map((entry) => entry.definition.name));
424
+ throw new Error(`Expected a registered vector store adapter "${options.adapter}" to invoke. Available vector store adapters: ${formatAvailable(available)}`);
425
+ }
426
+ const operationFn = registration.runtime_definition[options.operation];
427
+ if (typeof operationFn !== "function") {
428
+ throw new Error(`Registered vector store adapter "${options.adapter}" does not implement the "${options.operation}" operation.`);
429
+ }
430
+ return (await operationFn(options.context));
431
+ }
432
+ /**
433
+ * Invoke a registered schema migration's `run` function through the same runtime
434
+ * definition the host executes and return its result, so package tests can assert
435
+ * a migration's behavior — not just that it registered.
436
+ *
437
+ * This completes the package-author "invoke" verb across every executable
438
+ * registration surface. The migration is resolved by id via
439
+ * {@link assertRegisteredMigration} (which throws a descriptive "available
440
+ * migrations" error when absent), then `run` is invoked on its
441
+ * `runtime_definition` with a context mirroring the one
442
+ * `executeRegisteredRuntimeMigrations` builds at runtime: the resolved id,
443
+ * `command: "migration"`, the registering extension's layer/name, the supplied
444
+ * `pmRoot`, and the migration's normalized status. Unlike the runtime — which
445
+ * skips already-applied migrations and folds a throw into a warning — this helper
446
+ * always invokes `run` and lets a throw propagate, so authors can assert both the
447
+ * success result and failure via rejection.
448
+ *
449
+ * Throws when the resolved migration declares no `run` function, since invoking a
450
+ * runless migration is a wiring bug in the test rather than a behavior under test.
451
+ */
452
+ export async function runRegisteredMigrationForTest(registrations, options) {
453
+ const migration = assertRegisteredMigration(registrations, {
454
+ migration: options.migration,
455
+ extensionName: options.extensionName,
456
+ });
457
+ const run = getMigrationRuntimeDefinition(migration).run;
458
+ if (typeof run !== "function") {
459
+ throw new Error(`Registered migration "${options.migration}" does not implement a run function to invoke.`);
460
+ }
461
+ const declaredStatus = migration.definition.status;
462
+ const context = {
463
+ id: migration.definition.id,
464
+ command: "migration",
465
+ layer: migration.layer,
466
+ extension: migration.name,
467
+ pm_root: options.pmRoot ?? "",
468
+ status: (typeof declaredStatus === "string" ? declaredStatus.trim().toLowerCase() : "") || "pending",
469
+ };
470
+ return await run(context);
471
+ }
472
+ /**
473
+ * Invoke a registered extension importer through pm's real handler-dispatch
474
+ * engine and return its {@link CommandHandlerResult}, so package tests can assert
475
+ * an importer's behavior — not just that it registered.
476
+ *
477
+ * This is the importer counterpart to {@link runRegisteredCommandForTest},
478
+ * extending the package-author "invoke" verb to the `api.registerImporter`
479
+ * surface. Because `registerImporter(name, fn)` wraps `fn` into a command handler
480
+ * at the `"<name> import"` path, invoking it through `runRegisteredCommandForTest`
481
+ * requires the author to know that naming convention and to remember that an
482
+ * importer is reachable as a command at all. This helper closes both gaps: it
483
+ * accepts the registered importer name directly, validates via
484
+ * {@link assertRegisteredImporter} that it is genuinely a registered importer
485
+ * (not merely some command parked at that path), derives the command path, and
486
+ * dispatches through the same engine.
487
+ *
488
+ * The full activation result is required because importer execution spans two
489
+ * sub-registries: `registrations.importers` proves the importer exists, while
490
+ * `commands` holds the wrapped handler. The result is returned verbatim from the
491
+ * command engine: a clean run yields `{ handled: true, result, warnings: [] }`
492
+ * (where `result` is the importer's return value), a non-exit throw yields
493
+ * `{ handled: false, warnings: [code], errorMessage }`, and an error carrying a
494
+ * numeric `exitCode` propagates — matching runtime import semantics.
495
+ *
496
+ * Throws a descriptive "available importers" error (via `assertRegisteredImporter`)
497
+ * when no importer matches, since that is a wiring/typo bug in the test rather
498
+ * than a behavior under test.
499
+ */
500
+ export async function runRegisteredImporterForTest(activation, options) {
501
+ const importer = assertRegisteredImporter(activation.registrations, {
502
+ importer: options.importer,
503
+ extensionName: options.extensionName,
504
+ });
505
+ return runRegisteredCommandForTest(activation.commands, {
506
+ command: `${importer.importer} import`,
507
+ args: options.args,
508
+ options: options.options,
509
+ global: options.global,
510
+ pmRoot: options.pmRoot,
126
511
  });
127
512
  }
513
+ /**
514
+ * Invoke a registered extension exporter through pm's real handler-dispatch
515
+ * engine and return its {@link CommandHandlerResult}, so package tests can assert
516
+ * an exporter's behavior — not just that it registered.
517
+ *
518
+ * This is the exporter counterpart to {@link runRegisteredImporterForTest} and
519
+ * the final surface in the package-author "invoke" verb. Because
520
+ * `registerExporter(name, fn)` wraps `fn` into a command handler at the
521
+ * `"<name> export"` path, this helper accepts the registered exporter name
522
+ * directly, validates via {@link assertRegisteredExporter} that it is genuinely a
523
+ * registered exporter, derives the command path, and dispatches through the same
524
+ * engine. See {@link runRegisteredImporterForTest} for the full activation
525
+ * rationale and return semantics (which apply identically here).
526
+ *
527
+ * Throws a descriptive "available exporters" error (via `assertRegisteredExporter`)
528
+ * when no exporter matches, since that is a wiring/typo bug in the test rather
529
+ * than a behavior under test.
530
+ */
531
+ export async function runRegisteredExporterForTest(activation, options) {
532
+ const exporter = assertRegisteredExporter(activation.registrations, {
533
+ exporter: options.exporter,
534
+ extensionName: options.extensionName,
535
+ });
536
+ return runRegisteredCommandForTest(activation.commands, {
537
+ command: `${exporter.exporter} export`,
538
+ args: options.args,
539
+ options: options.options,
540
+ global: options.global,
541
+ pmRoot: options.pmRoot,
542
+ });
543
+ }
544
+ /**
545
+ * Assert that an {@link ExtensionDeactivationResult} reports the expected clean
546
+ * teardown counts, throwing a descriptive error otherwise. Defaults assert the
547
+ * single-extension happy path — exactly one extension deactivated and none
548
+ * failed. Returns the result so assertions can chain.
549
+ */
550
+ export function assertExtensionDeactivated(result, expectation = {}) {
551
+ const expectedDeactivated = expectation.deactivated ?? 1;
552
+ if (result.deactivated !== expectedDeactivated) {
553
+ throw new Error(`Expected ${expectedDeactivated} extension${expectedDeactivated === 1 ? "" : "s"} to deactivate cleanly, ` +
554
+ `but ${result.deactivated} did.`);
555
+ }
556
+ const expectedFailed = expectation.failed ?? 0;
557
+ if (result.failed.length !== expectedFailed) {
558
+ const detail = result.failed.map((failure) => `${failure.layer}:${failure.name} (${failure.error})`).join(", ");
559
+ throw new Error(`Expected ${expectedFailed} teardown failure${expectedFailed === 1 ? "" : "s"}, ` +
560
+ `but observed ${result.failed.length}${detail.length > 0 ? `: ${detail}` : ""}.`);
561
+ }
562
+ return result;
563
+ }
128
564
  /**
129
565
  * Assert that a normalized package manifest advertises expected package
130
566
  * resources. Pair with `readPmPackageManifest(packageRoot)` in package tests.
@@ -512,5 +948,205 @@ export function assertRegisteredMigration(registrations, expectation) {
512
948
  }));
513
949
  throw new Error(`Expected migration "${expectedMigration}"${extensionNameSuffix(expectation.extensionName)} to be registered. Available migrations: ${formatAvailable(available)}`);
514
950
  }
951
+ /**
952
+ * Assert that an activated extension declares no capability it never uses
953
+ * (least privilege). Pass the same capabilities as `manifest.capabilities` via
954
+ * `expectation.declared`; the helper computes what the extension actually
955
+ * registered against and throws when any declared capability is unused.
956
+ *
957
+ * This is the package-test counterpart of the advisory
958
+ * `extension_capability_unused` warning `pm package doctor` emits, letting an
959
+ * author catch an over-broad manifest at `npm test` time. Returns the
960
+ * declared/used/unused breakdown for further assertions.
961
+ */
962
+ export function assertExtensionCapabilityUsage(activation, expectation) {
963
+ const toKnownCapabilitySet = (capabilities, field) => {
964
+ const known = new Set();
965
+ for (const capability of capabilities) {
966
+ const normalized = normalizeKnownExtensionCapability(capability);
967
+ if (normalized === null) {
968
+ throw new Error(`Expected ${field} capability "${capability}" to be a known extension capability. ` +
969
+ "Use canonical capability names (see manifest.capabilities).");
970
+ }
971
+ known.add(normalized);
972
+ }
973
+ return known;
974
+ };
975
+ const declared = [...toKnownCapabilitySet(expectation.declared, "declared")].sort((left, right) => left.localeCompare(right));
976
+ const allowUnused = toKnownCapabilitySet(expectation.allowUnused ?? [], "allowUnused");
977
+ const used = collectUsedExtensionCapabilities(activation, { extensionName: expectation.extensionName });
978
+ const usedSet = new Set(used);
979
+ const unused = declared.filter((capability) => !usedSet.has(capability) && !allowUnused.has(capability));
980
+ if (unused.length > 0) {
981
+ const scopeSuffix = extensionNameSuffix(expectation.extensionName);
982
+ throw new Error(`Expected every declared capability${scopeSuffix} to be exercised, but [${unused.join(", ")}] ${unused.length === 1 ? "is" : "are"} declared yet never registered against. ` +
983
+ `Remove ${unused.length === 1 ? "it" : "them"} from manifest.capabilities for least privilege, ` +
984
+ "or pass allowUnused for capabilities registered only behind a runtime flag.");
985
+ }
986
+ return { declared, used, unused };
987
+ }
988
+ /**
989
+ * Preflight a declarative {@link ExtensionBlueprint} in a test, throwing if it has
990
+ * any `error`-severity issue (today: capability the blueprint exercises but the
991
+ * declared set omits, which would fail activation with `extension_capability_missing`).
992
+ *
993
+ * The throwing counterpart to {@link lintExtensionBlueprint} and the `assert*`
994
+ * family member for declarative authoring: drop `assertExtensionBlueprint(blueprint)`
995
+ * into a package's `node:test`/Vitest suite to fail CI before the blueprint is
996
+ * ever activated. The full {@link ExtensionBlueprintLintResult} is returned on
997
+ * success so a test can still inspect advisory warnings (unused capability,
998
+ * duplicate command, empty surface) without failing on them.
999
+ */
1000
+ export function assertExtensionBlueprint(blueprint, options = {}) {
1001
+ const result = lintExtensionBlueprint(blueprint, options);
1002
+ if (!result.ok) {
1003
+ const errors = result.findings.filter((finding) => finding.severity === "error");
1004
+ throw new Error(`Extension blueprint failed preflight with ${errors.length} ${errors.length === 1 ? "error" : "errors"}:\n` +
1005
+ errors.map((finding) => ` - [${finding.code}] ${finding.message}`).join("\n"));
1006
+ }
1007
+ return result;
1008
+ }
1009
+ /**
1010
+ * Activate one in-memory extension module and return a fluent
1011
+ * {@link ExtensionTestHarness} that binds every SDK testing helper to the right
1012
+ * sub-registry of the resulting activation.
1013
+ *
1014
+ * This is the ergonomic capstone over the standalone helpers: instead of
1015
+ * `activateExtensionForTest(module)` followed by repeatedly threading
1016
+ * `activation.registrations` / `activation.commands` / `activation.hooks` into
1017
+ * each `assertRegistered*` / `runRegistered*` call, an author writes
1018
+ * `const ext = await createExtensionTestHarness(module, { capabilities });` and
1019
+ * then `ext.assertCommandContract(...)`, `await ext.runCommand(...)`,
1020
+ * `await ext.deactivate()` — never needing to know pm's internal registry layout.
1021
+ *
1022
+ * `name` and `layer` are resolved exactly as {@link activateExtensionForTest}
1023
+ * resolves them, and captured so {@link ExtensionTestHarness.deactivate} forwards
1024
+ * a matching skip-key. Activation runs pm's real validation/activation engine, so
1025
+ * every bound helper exercises real wiring and dispatch — not mocks.
1026
+ *
1027
+ * Fails fast: if the module does not activate cleanly (e.g. a registration is
1028
+ * dropped because the manifest omits the required capability), this throws a
1029
+ * descriptive error listing each failure instead of returning a harness whose
1030
+ * registries are empty — which would otherwise surface later as the confusing
1031
+ * `available: (none)` assertion error this helper exists to prevent. Tests that
1032
+ * deliberately exercise a *failed* activation should call
1033
+ * {@link activateExtensionForTest} directly and inspect `activation.failed`.
1034
+ */
1035
+ export async function createExtensionTestHarness(module, options = {}) {
1036
+ const manifest = readTestExtensionManifest(module);
1037
+ const name = resolveTestExtensionName(manifest, options.name);
1038
+ const layer = options.layer ?? "project";
1039
+ const activation = await activateExtensionForTest(module, options);
1040
+ if (activation.failed.length > 0) {
1041
+ const detail = activation.failed
1042
+ .map((failure) => {
1043
+ const missingCapability = failure.trace?.missing_capability;
1044
+ const reason = missingCapability ? `${failure.error}; missing capability "${missingCapability}"` : failure.error;
1045
+ return `${failure.layer}:${failure.name} (${reason})`;
1046
+ })
1047
+ .join(", ");
1048
+ throw new Error(`createExtensionTestHarness could not activate the extension cleanly: ${detail}. ` +
1049
+ "Declare the required capability in the manifest (or pass it via options.capabilities), " +
1050
+ "or use activateExtensionForTest directly to inspect a failed activation.");
1051
+ }
1052
+ return {
1053
+ module,
1054
+ name,
1055
+ layer,
1056
+ activation,
1057
+ assertCommandContract(expectation) {
1058
+ return assertRegisteredCommandContract(activation.registrations, expectation);
1059
+ },
1060
+ assertFlags(expectation) {
1061
+ return assertRegisteredFlags(activation.registrations, expectation);
1062
+ },
1063
+ assertItemField(expectation) {
1064
+ return assertRegisteredItemField(activation.registrations, expectation);
1065
+ },
1066
+ assertItemType(expectation) {
1067
+ return assertRegisteredItemType(activation.registrations, expectation);
1068
+ },
1069
+ assertHook(expectation) {
1070
+ return assertRegisteredHook(activation.hooks, expectation);
1071
+ },
1072
+ assertCommandOverride(expectation) {
1073
+ return assertRegisteredCommandOverride(activation.commands, expectation);
1074
+ },
1075
+ assertParserOverride(expectation) {
1076
+ return assertRegisteredParserOverride(activation.parsers, expectation);
1077
+ },
1078
+ assertPreflightOverride(expectation) {
1079
+ return assertRegisteredPreflightOverride(activation.preflight, expectation);
1080
+ },
1081
+ assertRendererOverride(expectation) {
1082
+ return assertRegisteredRendererOverride(activation.renderers, expectation);
1083
+ },
1084
+ assertServiceOverride(expectation) {
1085
+ return assertRegisteredServiceOverride(activation.services, expectation);
1086
+ },
1087
+ assertSearchProvider(expectation) {
1088
+ return assertRegisteredSearchProvider(activation.registrations, expectation);
1089
+ },
1090
+ assertVectorStoreAdapter(expectation) {
1091
+ return assertRegisteredVectorStoreAdapter(activation.registrations, expectation);
1092
+ },
1093
+ assertImporter(expectation) {
1094
+ return assertRegisteredImporter(activation.registrations, expectation);
1095
+ },
1096
+ assertExporter(expectation) {
1097
+ return assertRegisteredExporter(activation.registrations, expectation);
1098
+ },
1099
+ assertMigration(expectation) {
1100
+ return assertRegisteredMigration(activation.registrations, expectation);
1101
+ },
1102
+ assertCapabilityUsage(expectation) {
1103
+ return assertExtensionCapabilityUsage(activation, expectation);
1104
+ },
1105
+ runCommand(runOptions) {
1106
+ return runRegisteredCommandForTest(activation.commands, runOptions);
1107
+ },
1108
+ runHook(runOptions) {
1109
+ return runRegisteredHookForTest(activation.hooks, runOptions);
1110
+ },
1111
+ runCommandOverride(context) {
1112
+ return runRegisteredCommandOverrideForTest(activation.commands, context);
1113
+ },
1114
+ runParserOverride(context) {
1115
+ return runRegisteredParserOverrideForTest(activation.parsers, context);
1116
+ },
1117
+ runPreflightOverride(context) {
1118
+ return runRegisteredPreflightOverrideForTest(activation.preflight, context);
1119
+ },
1120
+ runRendererOverride(context) {
1121
+ return runRegisteredRendererOverrideForTest(activation.renderers, context);
1122
+ },
1123
+ runServiceOverride(context) {
1124
+ return runRegisteredServiceOverrideForTest(activation.services, context);
1125
+ },
1126
+ runSearchProvider(runOptions) {
1127
+ return runRegisteredSearchProviderForTest(activation.registrations, runOptions);
1128
+ },
1129
+ runVectorStoreAdapter(runOptions) {
1130
+ return runRegisteredVectorStoreAdapterForTest(activation.registrations, runOptions);
1131
+ },
1132
+ runMigration(runOptions) {
1133
+ return runRegisteredMigrationForTest(activation.registrations, runOptions);
1134
+ },
1135
+ runImporter(runOptions) {
1136
+ return runRegisteredImporterForTest(activation, runOptions);
1137
+ },
1138
+ runExporter(runOptions) {
1139
+ return runRegisteredExporterForTest(activation, runOptions);
1140
+ },
1141
+ deactivate(deactivateOptions = {}) {
1142
+ return deactivateExtensionForTest(module, {
1143
+ name,
1144
+ layer,
1145
+ activation,
1146
+ deactivateTimeoutMs: deactivateOptions.deactivateTimeoutMs,
1147
+ });
1148
+ },
1149
+ };
1150
+ }
515
1151
  //# sourceMappingURL=testing.js.map
516
- //# debugId=cdb9b0c1-6fbc-5b77-bcd0-c4630a719641
1152
+ //# debugId=9ca86b28-8f2c-5dd3-bdf0-85d3f60e6197