@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
@@ -4,7 +4,7 @@
4
4
  * Implements extension package-management support for Scaffold.
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]="3abac9c3-3fc0-575e-8f5d-d2624fe7a20c")}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]="4513e1ea-24a5-55b1-9465-78d5d9febba7")}catch(e){}}();
8
8
  import fs from "node:fs/promises";
9
9
  import path from "node:path";
10
10
  import { pathExists } from "../../../core/fs/fs-utils.js";
@@ -17,18 +17,453 @@ import { normalizeManagedDirectoryName } from "./shared.js";
17
17
  // tracks the manifest schema generation (currently 1).
18
18
  const SCAFFOLD_MANIFEST_VERSION = 1;
19
19
  const SCAFFOLD_PM_MIN_VERSION = "2026.5.0";
20
+ const SCAFFOLD_DECLARED_PERMISSIONS = {
21
+ fs_read: false,
22
+ fs_write: false,
23
+ network: false,
24
+ env_read: false,
25
+ env_write: false,
26
+ process_spawn: false,
27
+ };
28
+ /**
29
+ * Capability shapes the package/extension scaffolder can target via the
30
+ * `--capability` selector. `commands` emits the default command-only starter;
31
+ * `hooks` additionally wires an `after_command` lifecycle reactor, `search`
32
+ * wires an in-memory provider/adapter pair, and `importers` wires importer and
33
+ * exporter command primitives so authors can customize project context movement
34
+ * without starting from a blank extension.
35
+ */
36
+ export const SCAFFOLD_CAPABILITIES = ["commands", "hooks", "search", "importers"];
37
+ const SCAFFOLD_MANIFEST_CAPABILITIES = {
38
+ commands: ["commands"],
39
+ hooks: ["commands", "hooks"],
40
+ search: ["commands", "search"],
41
+ importers: ["commands", "schema", "importers"],
42
+ };
43
+ const SAMPLE_TEST_CAPABILITIES_LITERAL = {
44
+ commands: '["commands"]',
45
+ hooks: '["commands", "hooks"]',
46
+ search: '["commands", "search"]',
47
+ importers: '["commands", "schema", "importers"]',
48
+ };
49
+ const ENTRYPOINT_BULLETS = {
50
+ commands: "- `index.js`: starter command registration plus a `deactivate` teardown stub.",
51
+ hooks: "- `index.js`: starter command registration, an `after_command` lifecycle hook, and a `deactivate` teardown stub.",
52
+ search: "- `index.js`: starter command registration, a search provider, a vector-store adapter, and a `deactivate` teardown stub.",
53
+ importers: "- `index.js`: starter command registration, importer/exporter command registrations, and a `deactivate` teardown stub.",
54
+ };
55
+ const SAMPLE_TEST_BULLETS = {
56
+ commands: "- `index.test.js`: sample `node:test` suite covering activation, command invocation, and teardown via the SDK testing helpers.",
57
+ hooks: "- `index.test.js`: sample `node:test` suite covering activation, command invocation, the after_command hook, and teardown via the SDK testing helpers.",
58
+ search: "- `index.test.js`: sample `node:test` suite covering activation, command invocation, search provider/vector adapter invocation, and teardown via the SDK testing helpers.",
59
+ importers: "- `index.test.js`: sample `node:test` suite covering activation, command invocation, importer/exporter invocation, and teardown via the SDK testing helpers.",
60
+ };
61
+ const PACKAGE_CAPABILITY_README_SECTIONS = {
62
+ commands: [],
63
+ hooks: [
64
+ "",
65
+ "## Lifecycle Hook",
66
+ "`index.js` registers an `after_command` hook via `api.hooks.afterCommand`.",
67
+ "pm fires it once a command finishes, passing the command outcome and the",
68
+ "items it mutated (`context.affected`). React there to keep external context",
69
+ "in sync - sync records, emit telemetry, or refresh derived state. The",
70
+ "`hooks` capability in `manifest.json` is what grants the hook registration;",
71
+ "remove it (and the hook) if your package only needs commands.",
72
+ ],
73
+ search: [
74
+ "",
75
+ "## Search Provider",
76
+ "`index.js` registers a deterministic in-memory search provider and",
77
+ "vector-store adapter through `api.registerSearchProvider` and",
78
+ "`api.registerVectorStoreAdapter`. Replace the sample scoring,",
79
+ "embedding, and storage behavior with your project-specific retrieval",
80
+ "logic. The `search` capability in `manifest.json` grants both",
81
+ "registrations.",
82
+ ],
83
+ importers: [
84
+ "",
85
+ "## Importer and Exporter",
86
+ "`index.js` registers paired project-context import/export commands through",
87
+ "`api.registerImporter` and `api.registerExporter`. Replace the starter",
88
+ "payloads with your domain adapter: GitHub issues, CSV rows, documents,",
89
+ "tickets, or another project-management source of truth. The `importers`",
90
+ "capability grants both registrations, and `schema` grants the example",
91
+ "command flag metadata.",
92
+ ],
93
+ };
94
+ const EXTENSION_CAPABILITY_README_SECTIONS = {
95
+ commands: [],
96
+ hooks: [
97
+ "",
98
+ "## Lifecycle Hook",
99
+ "`index.js` registers an `after_command` hook via `api.hooks.afterCommand`.",
100
+ "pm fires it once a command finishes, passing the command outcome and the",
101
+ "items it mutated (`context.affected`). React there to keep external context",
102
+ "in sync. The `hooks` capability in `manifest.json` grants the registration;",
103
+ "remove it (and the hook) if your extension only needs commands.",
104
+ ],
105
+ search: [
106
+ "",
107
+ "## Search Provider",
108
+ "`index.js` registers a deterministic in-memory search provider and",
109
+ "vector-store adapter through `api.registerSearchProvider` and",
110
+ "`api.registerVectorStoreAdapter`. Replace the sample scoring, embedding,",
111
+ "and storage behavior with your project-specific retrieval logic. The",
112
+ "`search` capability in `manifest.json` grants both registrations.",
113
+ ],
114
+ importers: [
115
+ "",
116
+ "## Importer and Exporter",
117
+ "`index.js` registers paired project-context import/export commands through",
118
+ "`api.registerImporter` and `api.registerExporter`. Replace the starter",
119
+ "payloads with your domain adapter. The `importers` capability grants both",
120
+ "registrations, and `schema` grants the example command flag metadata.",
121
+ ],
122
+ };
123
+ /**
124
+ * Build the `activate` body lines for the starter entrypoint. The base body
125
+ * always registers the starter command; capability-specific variants append
126
+ * the matching SDK surface so generated packages demonstrate one runnable
127
+ * customization primitive end to end.
128
+ */
129
+ function buildActivateBodyLines(extensionName, commandName, capability) {
130
+ const searchProviderName = `${extensionName}-search`;
131
+ const vectorAdapterName = `${extensionName}-vector`;
132
+ const adapterName = `${extensionName.replace(/-/g, " ")} items`;
133
+ const commandLines = [
134
+ " api.registerCommand({",
135
+ ` name: ${JSON.stringify(commandName)},`,
136
+ ' description: "Starter scaffold command. Replace with your own behavior.",',
137
+ " run: async (context) => ({",
138
+ " ok: true,",
139
+ ` source: ${JSON.stringify(extensionName)},`,
140
+ " command: context.command,",
141
+ ' message: "Starter extension scaffold is active.",',
142
+ " }),",
143
+ " });",
144
+ ];
145
+ if (capability === "commands") {
146
+ return commandLines;
147
+ }
148
+ if (capability === "search") {
149
+ return [
150
+ ...commandLines,
151
+ "",
152
+ " // Search providers let packages customize how pm ranks and retrieves",
153
+ " // project context. This starter is deterministic and dependency-free:",
154
+ " // replace the scoring with your domain retrieval, embedding, or rerank",
155
+ " // logic as the package grows.",
156
+ " api.registerSearchProvider({",
157
+ ` name: ${JSON.stringify(searchProviderName)},`,
158
+ " query: async (context) => {",
159
+ " const needle = context.query.toLowerCase();",
160
+ " const hits = context.documents",
161
+ " .filter((document) => {",
162
+ " const title = String(document.metadata.title ?? \"\").toLowerCase();",
163
+ " return title.includes(needle);",
164
+ " })",
165
+ " .map((document) => ({",
166
+ " id: document.metadata.id,",
167
+ " score: 1,",
168
+ ' matched_fields: ["title"],',
169
+ " }));",
170
+ " return { hits };",
171
+ " },",
172
+ " embed: async (context) => [context.input.length],",
173
+ " });",
174
+ "",
175
+ " // Vector-store adapters let packages own semantic index storage. This",
176
+ " // starter returns a stable in-memory hit so generated tests can exercise",
177
+ " // the adapter without external services.",
178
+ " api.registerVectorStoreAdapter({",
179
+ ` name: ${JSON.stringify(vectorAdapterName)},`,
180
+ " query: async (context) => [{ id: \"starter-vector-hit\", score: context.limit }],",
181
+ " upsert: async (context) => ({ upserted: context.points.length }),",
182
+ " delete: async (context) => ({ deleted: context.ids.length }),",
183
+ " });",
184
+ ];
185
+ }
186
+ if (capability === "importers") {
187
+ return [
188
+ ...commandLines,
189
+ "",
190
+ " // Importers/exporters are the bridge between pm's context graph and",
191
+ " // another project-management system. Keep the starter deterministic so",
192
+ " // package tests can run without touching the network or filesystem; replace",
193
+ " // these payloads with your adapter's real mapping as the package grows.",
194
+ " api.registerImporter(",
195
+ ` ${JSON.stringify(adapterName)},`,
196
+ " async (context) => ({",
197
+ " imported: 1,",
198
+ " source: context.options.source ?? \"starter\",",
199
+ " args: context.args,",
200
+ " }),",
201
+ " {",
202
+ ` action: ${JSON.stringify(`${adapterName} import`)},`,
203
+ ' description: "Import starter records into pm context.",',
204
+ " flags: [",
205
+ " {",
206
+ ' long: "--source",',
207
+ ' value_name: "name",',
208
+ ' value_type: "string",',
209
+ ' description: "Source name or path to import from.",',
210
+ " },",
211
+ " ],",
212
+ " },",
213
+ " );",
214
+ "",
215
+ " api.registerExporter(",
216
+ ` ${JSON.stringify(adapterName)},`,
217
+ " async (context) => ({",
218
+ " exported: true,",
219
+ " destination: context.options.destination ?? \"stdout\",",
220
+ " args: context.args,",
221
+ " }),",
222
+ " {",
223
+ ` action: ${JSON.stringify(`${adapterName} export`)},`,
224
+ ' description: "Export pm context into starter records.",',
225
+ " flags: [",
226
+ " {",
227
+ ' long: "--destination",',
228
+ ' value_name: "name",',
229
+ ' value_type: "string",',
230
+ ' description: "Destination name or path to export to.",',
231
+ " },",
232
+ " ],",
233
+ " },",
234
+ " );",
235
+ ];
236
+ }
237
+ return [
238
+ ...commandLines,
239
+ "",
240
+ " // after_command hooks fire once pm finishes a command, receiving the items",
241
+ " // it mutated. This is the natural place to react to every change - sync to",
242
+ " // an external system, emit telemetry, or refresh derived context",
243
+ ' // ("project management = context management"). This starter is a documented',
244
+ " // no-op on the success path; replace the body with your own reaction.",
245
+ " api.hooks.afterCommand((context) => {",
246
+ " if (!context.ok) {",
247
+ " return;",
248
+ " }",
249
+ " // `context.affected` lists the items pm mutated (id, status,",
250
+ " // changed_fields). React here, e.g.:",
251
+ " // for (const item of context.affected ?? []) { /* ...item.id... */ }",
252
+ " });",
253
+ ];
254
+ }
255
+ /**
256
+ * Build the colocated `node:test` sample suite for the chosen capability. Every
257
+ * variant covers activation, command invocation, and teardown via the SDK
258
+ * testing helpers; the `hooks` variant adds a test that asserts the
259
+ * `after_command` hook is registered and fires cleanly through the public SDK
260
+ * testing helper `runRegisteredHookForTest`.
261
+ */
262
+ function buildSampleTestSource(extensionName, commandName, capability) {
263
+ const hooksEnabled = capability === "hooks";
264
+ const searchEnabled = capability === "search";
265
+ const importersEnabled = capability === "importers";
266
+ const capabilitiesLiteral = SAMPLE_TEST_CAPABILITIES_LITERAL[capability];
267
+ const searchProviderName = `${extensionName}-search`;
268
+ const vectorAdapterName = `${extensionName}-vector`;
269
+ const adapterName = `${extensionName.replace(/-/g, " ")} items`;
270
+ const importNames = [
271
+ " activateExtensionForTest,",
272
+ " assertExtensionDeactivated,",
273
+ " assertRegisteredCommandContract,",
274
+ ...(hooksEnabled ? [" assertRegisteredHook,"] : []),
275
+ ...(searchEnabled ? [" assertRegisteredSearchProvider,", " assertRegisteredVectorStoreAdapter,"] : []),
276
+ ...(importersEnabled ? [" assertRegisteredImporter,", " assertRegisteredExporter,"] : []),
277
+ " deactivateExtensionForTest,",
278
+ " runRegisteredCommandForTest,",
279
+ ...(hooksEnabled ? [" runRegisteredHookForTest,"] : []),
280
+ ...(searchEnabled ? [" runRegisteredSearchProviderForTest,", " runRegisteredVectorStoreAdapterForTest,"] : []),
281
+ ...(importersEnabled ? [" runRegisteredImporterForTest,", " runRegisteredExporterForTest,"] : []),
282
+ ];
283
+ const hookTestLines = hooksEnabled
284
+ ? [
285
+ `test(${JSON.stringify(`${extensionName} reacts to commands via its after_command hook`)}, async () => {`,
286
+ " const activation = await activateExtensionForTest(extension, {",
287
+ ` name: ${JSON.stringify(extensionName)},`,
288
+ ` capabilities: ${capabilitiesLiteral},`,
289
+ " });",
290
+ " // assertRegisteredHook throws unless an after_command hook is registered,",
291
+ " // so reaching the next line already proves the hook is wired.",
292
+ " assertRegisteredHook(activation.hooks, {",
293
+ ' kind: "after_command",',
294
+ ` extensionName: ${JSON.stringify(extensionName)},`,
295
+ " });",
296
+ " // runRegisteredHookForTest fires the hook through pm's real runner with a",
297
+ " // synthetic context and returns the warnings it produced; a clean hook",
298
+ " // returns none. Replace the context/assertions as your hook grows.",
299
+ " const warnings = await runRegisteredHookForTest(activation.hooks, {",
300
+ ' kind: "after_command",',
301
+ " context: {",
302
+ ` command: ${JSON.stringify(commandName)},`,
303
+ " args: [],",
304
+ ' pm_root: "",',
305
+ " ok: true,",
306
+ " affected: [],",
307
+ " },",
308
+ " });",
309
+ " assert.deepEqual(warnings, []);",
310
+ "});",
311
+ "",
312
+ ]
313
+ : [];
314
+ const searchTestLines = searchEnabled
315
+ ? [
316
+ `test(${JSON.stringify(`${extensionName} registers and invokes search primitives`)}, async () => {`,
317
+ " const activation = await activateExtensionForTest(extension, {",
318
+ ` name: ${JSON.stringify(extensionName)},`,
319
+ ` capabilities: ${capabilitiesLiteral},`,
320
+ " });",
321
+ " assertRegisteredSearchProvider(activation.registrations, {",
322
+ ` provider: ${JSON.stringify(searchProviderName)},`,
323
+ ` extensionName: ${JSON.stringify(extensionName)},`,
324
+ " });",
325
+ " assertRegisteredVectorStoreAdapter(activation.registrations, {",
326
+ ` adapter: ${JSON.stringify(vectorAdapterName)},`,
327
+ ` extensionName: ${JSON.stringify(extensionName)},`,
328
+ " });",
329
+ "",
330
+ " const query = await runRegisteredSearchProviderForTest(activation.registrations, {",
331
+ ` provider: ${JSON.stringify(searchProviderName)},`,
332
+ ' operation: "query",',
333
+ " context: {",
334
+ ' query: "sync",',
335
+ ' mode: "semantic",',
336
+ ' tokens: ["sync"],',
337
+ " options: {},",
338
+ " settings: {},",
339
+ " documents: [",
340
+ ' { metadata: { id: "pm-1", title: "Sync external context" }, body: "" },',
341
+ ' { metadata: { id: "pm-2", title: "Unrelated task" }, body: "" },',
342
+ " ],",
343
+ " },",
344
+ " });",
345
+ ' assert.deepEqual(query, { hits: [{ id: "pm-1", score: 1, matched_fields: ["title"] }] });',
346
+ "",
347
+ " const embedding = await runRegisteredSearchProviderForTest(activation.registrations, {",
348
+ ` provider: ${JSON.stringify(searchProviderName)},`,
349
+ ' operation: "embed",',
350
+ ' context: { input: "abc", settings: {}, model: "starter-model" },',
351
+ " });",
352
+ " assert.deepEqual(embedding, [3]);",
353
+ "",
354
+ " const vectorHits = await runRegisteredVectorStoreAdapterForTest(activation.registrations, {",
355
+ ` adapter: ${JSON.stringify(vectorAdapterName)},`,
356
+ ' operation: "query",',
357
+ " context: { vector: [0.1, 0.2], limit: 2, settings: {} },",
358
+ " });",
359
+ ' assert.deepEqual(vectorHits, [{ id: "starter-vector-hit", score: 2 }]);',
360
+ "});",
361
+ "",
362
+ ]
363
+ : [];
364
+ const importerTestLines = importersEnabled
365
+ ? [
366
+ `test(${JSON.stringify(`${extensionName} registers and invokes import/export primitives`)}, async () => {`,
367
+ " const activation = await activateExtensionForTest(extension, {",
368
+ ` name: ${JSON.stringify(extensionName)},`,
369
+ ` capabilities: ${capabilitiesLiteral},`,
370
+ " });",
371
+ " assertRegisteredImporter(activation.registrations, {",
372
+ ` importer: ${JSON.stringify(adapterName)},`,
373
+ ` extensionName: ${JSON.stringify(extensionName)},`,
374
+ " });",
375
+ " assertRegisteredExporter(activation.registrations, {",
376
+ ` exporter: ${JSON.stringify(adapterName)},`,
377
+ ` extensionName: ${JSON.stringify(extensionName)},`,
378
+ " });",
379
+ "",
380
+ " const imported = await runRegisteredImporterForTest(activation, {",
381
+ ` importer: ${JSON.stringify(adapterName)},`,
382
+ ' options: { source: "tickets" },',
383
+ ' args: ["batch-1"],',
384
+ " });",
385
+ " assert.equal(imported.handled, true);",
386
+ ' assert.deepEqual(imported.result, { imported: 1, source: "tickets", args: ["batch-1"] });',
387
+ "",
388
+ " const exported = await runRegisteredExporterForTest(activation, {",
389
+ ` exporter: ${JSON.stringify(adapterName)},`,
390
+ ' options: { destination: "archive" },',
391
+ ' args: ["done"],',
392
+ " });",
393
+ " assert.equal(exported.handled, true);",
394
+ ' assert.deepEqual(exported.result, { exported: true, destination: "archive", args: ["done"] });',
395
+ "});",
396
+ "",
397
+ ]
398
+ : [];
399
+ return [
400
+ 'import assert from "node:assert/strict";',
401
+ 'import { test } from "node:test";',
402
+ "import {",
403
+ ...importNames,
404
+ '} from "@unbrained/pm-cli/sdk/testing";',
405
+ 'import extension from "./index.js";',
406
+ "",
407
+ `test(${JSON.stringify(`${extensionName} registers its starter command`)}, async () => {`,
408
+ " // `capabilities` mirrors manifest.json so the in-memory activation grants",
409
+ " // the capabilities the entrypoint relies on.",
410
+ " const activation = await activateExtensionForTest(extension, {",
411
+ ` name: ${JSON.stringify(extensionName)},`,
412
+ ` capabilities: ${capabilitiesLiteral},`,
413
+ " });",
414
+ " // assertRegisteredCommandContract throws if the command is not",
415
+ " // registered, so reaching here already proves the wiring; assert on the",
416
+ " // returned definition to demonstrate inspecting registered metadata.",
417
+ " const registered = assertRegisteredCommandContract(activation.registrations, {",
418
+ ` command: ${JSON.stringify(commandName)},`,
419
+ ` extensionName: ${JSON.stringify(extensionName)},`,
420
+ " });",
421
+ ' assert.equal(typeof registered.command.description, "string");',
422
+ "",
423
+ " // runRegisteredCommandForTest invokes the handler through pm's real",
424
+ " // dispatch engine, so this asserts behavior - not just that the command",
425
+ " // is wired. Replace these assertions as you flesh out your command.",
426
+ " const invocation = await runRegisteredCommandForTest(activation.commands, {",
427
+ ` command: ${JSON.stringify(commandName)},`,
428
+ " });",
429
+ " assert.equal(invocation.handled, true);",
430
+ " assert.equal(invocation.result.ok, true);",
431
+ ` assert.equal(invocation.result.command, ${JSON.stringify(commandName)});`,
432
+ "});",
433
+ "",
434
+ ...hookTestLines,
435
+ ...searchTestLines,
436
+ ...importerTestLines,
437
+ `test(${JSON.stringify(`${extensionName} tears down cleanly via deactivate`)}, async () => {`,
438
+ " // deactivateExtensionForTest runs pm's real teardown engine over the",
439
+ " // module, so this proves your `deactivate` hook runs without throwing.",
440
+ " const teardown = await deactivateExtensionForTest(extension, {",
441
+ ` name: ${JSON.stringify(extensionName)},`,
442
+ " });",
443
+ " // assertExtensionDeactivated throws unless exactly one extension tore down",
444
+ " // with no failures, so reaching the next line already proves teardown ran.",
445
+ " assertExtensionDeactivated(teardown);",
446
+ " assert.equal(teardown.deactivated, 1);",
447
+ "});",
448
+ "",
449
+ ].join("\n");
450
+ }
20
451
  /**
21
452
  * Implements build starter extension scaffold files for the public runtime surface of this module.
22
453
  */
23
- export function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary) {
454
+ export function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary, capability = "commands") {
24
455
  const packageName = `pm-${extensionName}`;
456
+ const capabilities = SCAFFOLD_MANIFEST_CAPABILITIES[capability];
25
457
  const manifest = `${JSON.stringify({
26
458
  name: extensionName,
27
459
  version: "0.1.0",
28
460
  entry: "./index.js",
29
- capabilities: ["commands"],
30
461
  manifest_version: SCAFFOLD_MANIFEST_VERSION,
31
462
  pm_min_version: SCAFFOLD_PM_MIN_VERSION,
463
+ trusted: true,
464
+ sandbox_profile: "strict",
465
+ permissions: { ...SCAFFOLD_DECLARED_PERMISSIONS },
466
+ capabilities,
32
467
  }, null, 2)}\n`;
33
468
  // Keep scaffolds dependency-light by default: even package mode can be
34
469
  // installed before peer dependencies are materialized in the generated root.
@@ -37,23 +472,24 @@ export function buildStarterExtensionScaffoldFiles(extensionName, commandName, v
37
472
  const entrypoint = [
38
473
  '/** @param {import("@unbrained/pm-cli/sdk").ExtensionApi} api */',
39
474
  "export function activate(api) {",
40
- " api.registerCommand({",
41
- ` name: ${JSON.stringify(commandName)},`,
42
- ' description: "Starter scaffold command. Replace with your own behavior.",',
43
- " run: async (context) => ({",
44
- " ok: true,",
45
- ` source: ${JSON.stringify(extensionName)},`,
46
- " command: context.command,",
47
- ' message: "Starter extension scaffold is active.",',
48
- " }),",
49
- " });",
475
+ ...buildActivateBodyLines(extensionName, commandName, capability),
50
476
  "}",
51
477
  "",
478
+ "// `deactivate` is the teardown counterpart to `activate`: pm runs it on host",
479
+ "// shutdown/reload (e.g. the MCP server between requests) to release anything",
480
+ "// `activate` opened - timers, connections, caches. This starter holds no such",
481
+ "// resources, so it stays a documented no-op; add cleanup here as you grow.",
482
+ "export function deactivate() {}",
483
+ "",
52
484
  "export default {",
53
485
  " activate,",
486
+ " deactivate,",
54
487
  "};",
55
488
  "",
56
489
  ].join("\n");
490
+ // README bullet describing what index.js wires, kept in sync with the chosen
491
+ // capability so the generated docs match the generated code.
492
+ const entrypointBullet = ENTRYPOINT_BULLETS[capability];
57
493
  if (vocabulary === "package") {
58
494
  const packageJson = `${JSON.stringify({
59
495
  name: packageName,
@@ -82,34 +518,52 @@ export function buildStarterExtensionScaffoldFiles(extensionName, commandName, v
82
518
  },
83
519
  },
84
520
  }, null, 2)}\n`;
85
- // node:test sample: demonstrates validating command registration with the
86
- // SDK testing helpers without adding a third-party test runner. Uses the
87
- // package's own `commands` capability scaffold as the unit under test.
88
- const sampleTest = [
89
- 'import assert from "node:assert/strict";',
90
- 'import { test } from "node:test";',
91
- 'import { activateExtensionForTest, assertRegisteredCommandContract } from "@unbrained/pm-cli/sdk/testing";',
92
- 'import extension from "./index.js";',
93
- "",
94
- `test(${JSON.stringify(`${extensionName} registers its starter command`)}, async () => {`,
95
- " // `capabilities` mirrors manifest.json so the in-memory activation grants",
96
- " // the `commands` capability the entrypoint relies on.",
97
- " const activation = await activateExtensionForTest(extension, {",
98
- ` name: ${JSON.stringify(extensionName)},`,
99
- ' capabilities: ["commands"],',
100
- " });",
101
- " // assertRegisteredCommandContract throws if the command is not",
102
- " // registered, so reaching here already proves the wiring; assert on the",
103
- " // returned definition to demonstrate inspecting registered metadata.",
104
- " const registered = assertRegisteredCommandContract(activation.registrations, {",
105
- ` command: ${JSON.stringify(commandName)},`,
106
- ` extensionName: ${JSON.stringify(extensionName)},`,
107
- " });",
108
- ' assert.equal(typeof registered.command.description, "string");',
109
- "});",
110
- "",
111
- ].join("\n");
521
+ // node:test sample: demonstrates validating the package with the SDK testing
522
+ // helpers without adding a third-party test runner. The suite covers the
523
+ // capability the scaffold targets (command invocation, and for the hooks
524
+ // capability, the after_command lifecycle hook).
525
+ const sampleTest = buildSampleTestSource(extensionName, commandName, capability);
526
+ const sampleTestBullet = SAMPLE_TEST_BULLETS[capability];
112
527
  const gitignore = ["node_modules/", "*.log", ""].join("\n");
528
+ const searchProviderName = `${extensionName}-search`;
529
+ const vectorAdapterName = `${extensionName}-vector`;
530
+ const adapterName = `${extensionName.replace(/-/g, " ")} items`;
531
+ const defineBuilderImports = [
532
+ "defineCommand",
533
+ ...(capability === "hooks" ? ["defineAfterCommandHook"] : []),
534
+ ...(capability === "search" ? ["defineSearchProvider", "defineVectorStoreAdapter"] : []),
535
+ ...(capability === "importers" ? ["defineImporter", "defineExporter"] : []),
536
+ ].join(", ");
537
+ const defineBuilderSnippet = [
538
+ "```js",
539
+ `import { ${defineBuilderImports} } from "@unbrained/pm-cli/sdk";`,
540
+ "",
541
+ "export const pingCommand = defineCommand({",
542
+ ` name: ${JSON.stringify(commandName)},`,
543
+ ' description: "Starter scaffold command. Replace with your own behavior.",',
544
+ " run: (context) => ({ ok: true, command: context.command }),",
545
+ "});",
546
+ ];
547
+ if (capability === "hooks") {
548
+ defineBuilderSnippet.push("", "export const afterCommandHook = defineAfterCommandHook((context) => {", " if (!context.ok) return;", " // React to context.affected here as your package grows.", "});");
549
+ }
550
+ if (capability === "search") {
551
+ defineBuilderSnippet.push("", "export const searchProvider = defineSearchProvider({", ` name: ${JSON.stringify(searchProviderName)},`, " query: async (context) => ({", " hits: context.documents", " .filter((document) => String(document.metadata.title ?? \"\").toLowerCase().includes(context.query.toLowerCase()))", " .map((document) => ({ id: document.metadata.id, score: 1, matched_fields: [\"title\"] })),", " }),", " embed: async (context) => [context.input.length],", "});", "", "export const vectorStoreAdapter = defineVectorStoreAdapter({", ` name: ${JSON.stringify(vectorAdapterName)},`, " query: async (context) => [{ id: \"starter-vector-hit\", score: context.limit }],", " upsert: async (context) => ({ upserted: context.points.length }),", " delete: async (context) => ({ deleted: context.ids.length }),", "});");
552
+ }
553
+ if (capability === "importers") {
554
+ defineBuilderSnippet.push("", "export const importer = defineImporter(async (context) => ({", " imported: 1,", " source: context.options.source ?? \"starter\",", " args: context.args,", "}));", "", "export const exporter = defineExporter(async (context) => ({", " exported: true,", " destination: context.options.destination ?? \"stdout\",", " args: context.args,", "}));");
555
+ }
556
+ defineBuilderSnippet.push("", "export function activate(api) {", " api.registerCommand(pingCommand);");
557
+ if (capability === "hooks") {
558
+ defineBuilderSnippet.push(" api.hooks.afterCommand(afterCommandHook);");
559
+ }
560
+ if (capability === "search") {
561
+ defineBuilderSnippet.push(" api.registerSearchProvider(searchProvider);", " api.registerVectorStoreAdapter(vectorStoreAdapter);");
562
+ }
563
+ if (capability === "importers") {
564
+ defineBuilderSnippet.push(` api.registerImporter(${JSON.stringify(adapterName)}, importer, {`, ` action: ${JSON.stringify(`${adapterName} import`)},`, ' description: "Import starter records into pm context.",', " flags: [", " {", ' long: "--source",', ' value_name: "name",', ' value_type: "string",', ' description: "Source name or path to import from.",', " },", " ],", " });", ` api.registerExporter(${JSON.stringify(adapterName)}, exporter, {`, ` action: ${JSON.stringify(`${adapterName} export`)},`, ' description: "Export pm context into starter records.",', " flags: [", " {", ' long: "--destination",', ' value_name: "name",', ' value_type: "string",', ' description: "Destination name or path to export to.",', " },", " ],", " });");
565
+ }
566
+ defineBuilderSnippet.push("}", "", "export function deactivate() {}", "", "export default { activate, deactivate };", "```");
113
567
  const packageReadme = [
114
568
  `# ${packageName}`,
115
569
  "",
@@ -118,8 +572,8 @@ export function buildStarterExtensionScaffoldFiles(extensionName, commandName, v
118
572
  "## Included Files",
119
573
  "- `package.json`: package metadata, `test` script, and `pm` resource manifest.",
120
574
  "- `manifest.json`: extension metadata and capabilities.",
121
- "- `index.js`: starter command registration using the `commands` capability.",
122
- "- `index.test.js`: sample `node:test` suite using the SDK testing helpers.",
575
+ entrypointBullet,
576
+ sampleTestBullet,
123
577
  "- `.gitignore`: ignores `node_modules/` and log files.",
124
578
  "",
125
579
  "## Quick Start",
@@ -136,7 +590,17 @@ export function buildStarterExtensionScaffoldFiles(extensionName, commandName, v
136
590
  "npm test",
137
591
  "```",
138
592
  "`npm test` runs `node --test`, which executes `index.test.js` against the",
139
- "`@unbrained/pm-cli/sdk/testing` helpers no extra test runner required.",
593
+ "`@unbrained/pm-cli/sdk/testing` helpers - no extra test runner required.",
594
+ "",
595
+ "## Authoring With define* Builders",
596
+ "`index.js` stays import-free so the package can be installed locally before",
597
+ "`npm install` materializes peer dependencies. After installing dependencies,",
598
+ "use the public SDK authoring builders for exported definitions you want",
599
+ "editor type-checking, contextual handler inference, and direct unit tests for:",
600
+ ...defineBuilderSnippet,
601
+ "The builders return their argument unchanged; runtime validation still lives",
602
+ "in `api.register*`, and behavior validation lives in `sdk/testing`.",
603
+ ...PACKAGE_CAPABILITY_README_SECTIONS[capability],
140
604
  "",
141
605
  "## Compatibility Bounds",
142
606
  "`manifest.json` cannot hold comments, so the version-compatibility fields are documented here:",
@@ -144,6 +608,9 @@ export function buildStarterExtensionScaffoldFiles(extensionName, commandName, v
144
608
  `- \`pm_min_version\` (string): lowest pm CLI version that may load this package. Scaffolded as \`${SCAFFOLD_PM_MIN_VERSION}\`. The loader blocks the package on older CLIs.`,
145
609
  "- `pm_max_version` (string, optional): highest pm CLI version that may load this package. Add it to block CLIs that are newer than the version you have validated against. The loader blocks the package when the CLI exceeds this bound.",
146
610
  "",
611
+ "## Policy Metadata",
612
+ "The starter command is pure compute, so `manifest.json` declares `trusted: true`, `sandbox_profile: \"strict\"`, and all six permission keys as `false`. Keep that least-privilege shape for pure packages; relax only the specific permission your package actually needs and verify with `pm package doctor --project --detail deep --trace`.",
613
+ "",
147
614
  "## Notes",
148
615
  "- Keep simple starter runtime behavior at the package root so local installs work without dependency bootstrapping.",
149
616
  "- Move larger runtimes into subdirectories only after adding package dependencies and validating `pm package doctor`.",
@@ -167,7 +634,7 @@ export function buildStarterExtensionScaffoldFiles(extensionName, commandName, v
167
634
  "",
168
635
  "## Included Files",
169
636
  "- `manifest.json`: extension metadata and capabilities.",
170
- "- `index.js`: starter command registration using the `commands` capability.",
637
+ entrypointBullet,
171
638
  "",
172
639
  "## Quick Start",
173
640
  "```bash",
@@ -175,6 +642,7 @@ export function buildStarterExtensionScaffoldFiles(extensionName, commandName, v
175
642
  `pm ${commandName}`,
176
643
  "pm extension --doctor --project --detail summary",
177
644
  "```",
645
+ ...EXTENSION_CAPABILITY_README_SECTIONS[capability],
178
646
  "",
179
647
  "## Compatibility Bounds",
180
648
  "`manifest.json` cannot hold comments, so the version-compatibility fields are documented here:",
@@ -182,9 +650,13 @@ export function buildStarterExtensionScaffoldFiles(extensionName, commandName, v
182
650
  `- \`pm_min_version\` (string): lowest pm CLI version that may load this extension. Scaffolded as \`${SCAFFOLD_PM_MIN_VERSION}\`. The loader blocks the extension on older CLIs.`,
183
651
  "- `pm_max_version` (string, optional): highest pm CLI version that may load this extension. Add it to block CLIs that are newer than the version you have validated against. The loader blocks the extension when the CLI exceeds this bound.",
184
652
  "",
653
+ "## Policy Metadata",
654
+ "The starter command is pure compute, so `manifest.json` declares `trusted: true`, `sandbox_profile: \"strict\"`, and all six permission keys as `false`. Keep that least-privilege shape for pure extensions; relax only the specific permission your extension actually needs and verify with `pm extension --doctor --project --detail deep --trace`.",
655
+ "",
185
656
  "## Notes",
186
657
  "- This scaffold uses ESM exports so it works in package scopes with `type: module`.",
187
658
  "- Update `manifest.json` capabilities and `index.js` command behavior as your extension evolves.",
659
+ "- Release any resources `activate` opens (timers, connections, caches) in the `deactivate` teardown hook.",
188
660
  "",
189
661
  ].join("\n");
190
662
  return {
@@ -196,12 +668,20 @@ export function buildStarterExtensionScaffoldFiles(extensionName, commandName, v
196
668
  /**
197
669
  * Implements scaffold extension project for the public runtime surface of this module.
198
670
  */
199
- export async function scaffoldExtensionProject(target, vocabulary = "extension") {
671
+ export async function scaffoldExtensionProject(target, vocabulary = "extension", capability = "commands") {
672
+ const normalizedCapability = capability.trim().toLowerCase();
673
+ if (!SCAFFOLD_CAPABILITIES.includes(normalizedCapability)) {
674
+ throw new PmCliError(`Unknown scaffold capability "${capability}". Supported capabilities: ${SCAFFOLD_CAPABILITIES.join(", ")}.`, EXIT_CODE.USAGE);
675
+ }
676
+ const resolvedCapability = normalizedCapability;
200
677
  const normalizedTarget = target.trim();
201
678
  const targetPath = path.resolve(process.cwd(), normalizedTarget);
202
679
  const extensionName = normalizeManagedDirectoryName(path.basename(targetPath));
203
- const commandName = `${extensionName} ping`;
204
- const scaffoldFiles = buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary);
680
+ // Hyphenated top-level command groups can surface in help but fail dispatch in
681
+ // Commander, so generated starters use space-separated command words while the
682
+ // manifest and package identity keep their normalized directory names.
683
+ const commandName = `${extensionName.replace(/-/g, " ")} ping`;
684
+ const scaffoldFiles = buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary, resolvedCapability);
205
685
  let createdDirectory = false;
206
686
  if (await pathExists(targetPath)) {
207
687
  const existingTargetStats = await fs.stat(targetPath);
@@ -243,10 +723,11 @@ export async function scaffoldExtensionProject(target, vocabulary = "extension")
243
723
  return {
244
724
  extension_name: extensionName,
245
725
  command_name: commandName,
726
+ capability: resolvedCapability,
246
727
  target_path: targetPath,
247
728
  created_directory: createdDirectory,
248
729
  files,
249
730
  };
250
731
  }
251
732
  //# sourceMappingURL=scaffold.js.map
252
- //# debugId=3abac9c3-3fc0-575e-8f5d-d2624fe7a20c
733
+ //# debugId=4513e1ea-24a5-55b1-9465-78d5d9febba7