@unbrained/pm-cli 2026.7.7 → 2026.7.8

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 (393) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cli/commands/completion.js +10 -2
  3. package/dist/cli/commands/completion.js.map +1 -1
  4. package/dist/cli/commands/context.d.ts +1 -0
  5. package/dist/cli/commands/context.js +4 -4
  6. package/dist/cli/commands/context.js.map +1 -1
  7. package/dist/cli/commands/extension.d.ts +23 -19
  8. package/dist/cli/commands/extension.js +167 -57
  9. package/dist/cli/commands/extension.js.map +1 -1
  10. package/dist/cli/commands/search.js +3 -3
  11. package/dist/cli/commands/search.js.map +1 -1
  12. package/dist/cli/help-content.js +28 -2
  13. package/dist/cli/help-content.js.map +1 -1
  14. package/dist/cli/register-list-query.js +3 -2
  15. package/dist/cli/register-list-query.js.map +1 -1
  16. package/dist/cli/register-setup.js +8 -2
  17. package/dist/cli/register-setup.js.map +1 -1
  18. package/dist/cli-bundle/chunks/append-CDPAYYSB.js +11 -0
  19. package/dist/cli-bundle/chunks/{append-PVCTBVJG.js → append-RSPHC423.js} +5 -5
  20. package/dist/cli-bundle/chunks/{chunk-LCFJ7XAM.js → chunk-2BVD4ZD2.js} +267 -232
  21. package/dist/cli-bundle/chunks/chunk-2BVD4ZD2.js.map +7 -0
  22. package/dist/cli-bundle/chunks/{chunk-MHNMCDWR.js → chunk-2RADY7IB.js} +212 -38
  23. package/dist/cli-bundle/chunks/chunk-2RADY7IB.js.map +1 -0
  24. package/dist/cli-bundle/chunks/{chunk-S547WBYG.js → chunk-3FRNNVWY.js} +212 -38
  25. package/dist/cli-bundle/chunks/chunk-3FRNNVWY.js.map +7 -0
  26. package/dist/cli-bundle/chunks/{chunk-H2SMKL2N.js → chunk-3FUXM574.js} +4 -4
  27. package/dist/cli-bundle/chunks/{chunk-DR2V5OIV.js → chunk-3SHDAKMF.js} +3 -3
  28. package/dist/cli-bundle/chunks/{chunk-MRFWUSVA.js → chunk-3UXIMY62.js} +3 -3
  29. package/dist/cli-bundle/chunks/{chunk-WCWVEXGA.js → chunk-3V5C7PUH.js} +2 -2
  30. package/dist/cli-bundle/chunks/{chunk-43YSKY75.js → chunk-3YJDIJIE.js} +3 -3
  31. package/dist/cli-bundle/chunks/{chunk-HX6QXV5P.js → chunk-4I7KS5ES.js} +2 -2
  32. package/dist/cli-bundle/chunks/{chunk-XHCVAZGM.js → chunk-4OCWJ2AP.js} +7 -7
  33. package/dist/cli-bundle/chunks/{chunk-3TYOW6RR.js → chunk-5STY7NVM.js} +4 -4
  34. package/dist/cli-bundle/chunks/{chunk-7VQ3JJN5.js → chunk-5VAZHYVQ.js} +2 -2
  35. package/dist/cli-bundle/chunks/{chunk-MCEUKJKW.js → chunk-6FU5BVRB.js} +4 -4
  36. package/dist/cli-bundle/chunks/{chunk-AJUON7E6.js → chunk-6RR4XM5H.js} +3 -3
  37. package/dist/cli-bundle/chunks/{chunk-TEISGNSH.js → chunk-6TD5QGIB.js} +4 -4
  38. package/dist/cli-bundle/chunks/{chunk-565WYS5W.js → chunk-6WCXSC5V.js} +5 -5
  39. package/dist/cli-bundle/chunks/{chunk-NWWL22C7.js → chunk-6ZKDMEVT.js} +3 -3
  40. package/dist/cli-bundle/chunks/{chunk-VLEA2UTQ.js → chunk-7QKSLAHB.js} +2 -2
  41. package/dist/cli-bundle/chunks/{chunk-S6VC2A2K.js → chunk-7TBUV7XS.js} +4 -4
  42. package/dist/cli-bundle/chunks/{chunk-YPMZMKN7.js → chunk-7UCBLJDF.js} +2 -2
  43. package/dist/cli-bundle/chunks/{chunk-4MZOKTI2.js → chunk-AEOFBBWO.js} +3 -3
  44. package/dist/cli-bundle/chunks/{chunk-TZLYO4PP.js → chunk-ASMRSIDX.js} +16 -16
  45. package/dist/cli-bundle/chunks/{chunk-ZO7CLOY2.js → chunk-BFNFTHWQ.js} +3 -3
  46. package/dist/cli-bundle/chunks/{chunk-YNCFP5AR.js → chunk-BPJ5NYSJ.js} +2 -2
  47. package/dist/cli-bundle/chunks/{chunk-P3MJJW7P.js → chunk-C3YU3TXX.js} +2 -2
  48. package/dist/cli-bundle/chunks/{chunk-SY75LYXR.js → chunk-C6XSTACC.js} +3 -3
  49. package/dist/cli-bundle/chunks/{chunk-2TILG6F2.js → chunk-CGDUIPJL.js} +3 -3
  50. package/dist/cli-bundle/chunks/{chunk-J7BOLHAV.js → chunk-CXH7EMSB.js} +3 -3
  51. package/dist/cli-bundle/chunks/{chunk-6G6O3OPQ.js → chunk-D63PEJTB.js} +7 -7
  52. package/dist/cli-bundle/chunks/{chunk-W5HXHC7C.js → chunk-D6J5673C.js} +4 -4
  53. package/dist/cli-bundle/chunks/{chunk-LZQU6XJG.js → chunk-DUBC6TI3.js} +8 -8
  54. package/dist/cli-bundle/chunks/{chunk-YPD7SQ5P.js → chunk-EEJKHF7M.js} +5 -5
  55. package/dist/cli-bundle/chunks/{chunk-EDO7VXSO.js → chunk-EP2CKDS7.js} +2 -2
  56. package/dist/cli-bundle/chunks/{chunk-S5BNGFN5.js → chunk-EYPIUFWJ.js} +10 -10
  57. package/dist/cli-bundle/chunks/{chunk-SIM5JDON.js → chunk-F5DDGY6R.js} +3 -3
  58. package/dist/cli-bundle/chunks/{chunk-I74FMIWA.js → chunk-FFB3WITE.js} +3 -3
  59. package/dist/cli-bundle/chunks/{chunk-43UQN754.js → chunk-FJR2S7S4.js} +7 -7
  60. package/dist/cli-bundle/chunks/{chunk-X47MKQXU.js → chunk-FL625JJM.js} +166 -64
  61. package/dist/cli-bundle/chunks/chunk-FL625JJM.js.map +7 -0
  62. package/dist/cli-bundle/chunks/{chunk-CJQM7O7R.js → chunk-FOJEBRDD.js} +5 -5
  63. package/dist/cli-bundle/chunks/{chunk-XZWL7VNE.js → chunk-G4FKP4ID.js} +5 -5
  64. package/dist/cli-bundle/chunks/{chunk-Y5IKRUEM.js → chunk-GE44TQMC.js} +167 -65
  65. package/dist/cli-bundle/chunks/chunk-GE44TQMC.js.map +1 -0
  66. package/dist/cli-bundle/chunks/{chunk-E3YQFSFE.js → chunk-GLMJLBLR.js} +3 -3
  67. package/dist/cli-bundle/chunks/{chunk-KTGJ2CBU.js → chunk-GO2X6ZRB.js} +3 -3
  68. package/dist/cli-bundle/chunks/{chunk-YH5NBDFA.js → chunk-GQOKFX2G.js} +8 -8
  69. package/dist/cli-bundle/chunks/{chunk-DDDWVPID.js → chunk-GSQVQINP.js} +4 -4
  70. package/dist/cli-bundle/chunks/{chunk-7ML7JONU.js → chunk-HI27UADG.js} +14 -14
  71. package/dist/cli-bundle/chunks/chunk-HI27UADG.js.map +1 -0
  72. package/dist/cli-bundle/chunks/{chunk-VGO73OCK.js → chunk-HZZ3AC27.js} +3 -3
  73. package/dist/cli-bundle/chunks/{chunk-7Y5N34HX.js → chunk-IINCZYM3.js} +3 -3
  74. package/dist/cli-bundle/chunks/{chunk-GLS6VMWI.js → chunk-INOWVPUD.js} +5 -5
  75. package/dist/cli-bundle/chunks/{chunk-4IQKDKGE.js → chunk-IYRG5AEC.js} +7 -7
  76. package/dist/cli-bundle/chunks/{chunk-PDXJXEZJ.js → chunk-J6AD3GWC.js} +2 -2
  77. package/dist/cli-bundle/chunks/{chunk-52NS7JDP.js → chunk-JH5XDDYS.js} +5 -5
  78. package/dist/cli-bundle/chunks/{chunk-GPIDUMMN.js → chunk-JYVPLGOW.js} +4 -4
  79. package/dist/cli-bundle/chunks/{chunk-EIUBK2LT.js → chunk-K52C6YPA.js} +5 -5
  80. package/dist/cli-bundle/chunks/{chunk-2LEJGRQ7.js → chunk-KFL3XHMA.js} +2 -2
  81. package/dist/cli-bundle/chunks/{chunk-J2VGADNG.js → chunk-KMXVZ2P7.js} +16 -16
  82. package/dist/cli-bundle/chunks/{chunk-XS2TMNXR.js → chunk-LD2NBQ5T.js} +3 -3
  83. package/dist/cli-bundle/chunks/{chunk-II7R6KD4.js → chunk-LG4N6YOK.js} +5 -5
  84. package/dist/cli-bundle/chunks/{chunk-M62RO3XK.js → chunk-LHDHS4Z6.js} +5 -5
  85. package/dist/cli-bundle/chunks/{chunk-F6MT7KKE.js → chunk-MCH6IKK7.js} +3 -3
  86. package/dist/cli-bundle/chunks/{chunk-UO7XAZK6.js → chunk-MFLLULHU.js} +267 -232
  87. package/dist/cli-bundle/chunks/chunk-MFLLULHU.js.map +1 -0
  88. package/dist/cli-bundle/chunks/{chunk-2APXX4TZ.js → chunk-ML27MHNM.js} +23 -7
  89. package/dist/cli-bundle/chunks/chunk-ML27MHNM.js.map +1 -0
  90. package/dist/cli-bundle/chunks/{chunk-IDIBF4E2.js → chunk-MYHFZNBO.js} +8 -8
  91. package/dist/cli-bundle/chunks/{chunk-Y7KYVCZM.js → chunk-NGBWEYNY.js} +5 -5
  92. package/dist/cli-bundle/chunks/{chunk-RB3KLPAH.js → chunk-NRMDT4OV.js} +4 -4
  93. package/dist/cli-bundle/chunks/{chunk-GH73UOSJ.js → chunk-NTOOEVJ4.js} +2 -2
  94. package/dist/cli-bundle/chunks/{chunk-ZNEG2UDO.js → chunk-P2WE5KCU.js} +7 -7
  95. package/dist/cli-bundle/chunks/{chunk-EMXPI36L.js → chunk-PAWPLIWW.js} +5 -5
  96. package/dist/cli-bundle/chunks/{chunk-AGAVEDIE.js → chunk-PCBZ2VJD.js} +4 -4
  97. package/dist/cli-bundle/chunks/{chunk-6XTSYPPO.js → chunk-PJPZTE7P.js} +5 -5
  98. package/dist/cli-bundle/chunks/{chunk-3X542TEY.js → chunk-Q3CFSOQZ.js} +4 -4
  99. package/dist/cli-bundle/chunks/{chunk-4BKDAEDF.js → chunk-QJZM5WO5.js} +3 -3
  100. package/dist/cli-bundle/chunks/{chunk-HHEWQXPD.js → chunk-QLEH6FTQ.js} +4 -4
  101. package/dist/cli-bundle/chunks/{chunk-D2DCTFTL.js → chunk-QYZMZD4L.js} +4 -4
  102. package/dist/cli-bundle/chunks/{chunk-F6YC2A6X.js → chunk-RDJXIAJB.js} +4 -4
  103. package/dist/cli-bundle/chunks/{chunk-6UQCNWFV.js → chunk-RFHLRMLQ.js} +3 -3
  104. package/dist/cli-bundle/chunks/{chunk-Q64AYQYW.js → chunk-RL24NAUX.js} +4 -4
  105. package/dist/cli-bundle/chunks/{chunk-C5ACVMOI.js → chunk-RLHQ3G4M.js} +5 -5
  106. package/dist/cli-bundle/chunks/{chunk-5FIQ4EX3.js → chunk-SCJPFQQT.js} +3 -3
  107. package/dist/cli-bundle/chunks/{chunk-42LXP4VO.js → chunk-SIQGG335.js} +7 -7
  108. package/dist/cli-bundle/chunks/{chunk-TNC6MZUD.js → chunk-SN5X5GTU.js} +4 -4
  109. package/dist/cli-bundle/chunks/{chunk-43SIHQND.js → chunk-TKWTJGD6.js} +5 -5
  110. package/dist/cli-bundle/chunks/{chunk-YCVWWIKY.js → chunk-TR2C6V5T.js} +25 -9
  111. package/dist/cli-bundle/chunks/chunk-TR2C6V5T.js.map +7 -0
  112. package/dist/cli-bundle/chunks/{chunk-FILL6BB2.js → chunk-TTCJCKUJ.js} +14 -14
  113. package/dist/cli-bundle/chunks/chunk-TTCJCKUJ.js.map +7 -0
  114. package/dist/cli-bundle/chunks/{chunk-YTD5GICJ.js → chunk-TU5P744I.js} +4 -4
  115. package/dist/cli-bundle/chunks/{chunk-QFBSP3NI.js → chunk-TUDAYIO7.js} +8 -8
  116. package/dist/cli-bundle/chunks/{chunk-EOUVR7JN.js → chunk-U72GF3I2.js} +3 -3
  117. package/dist/cli-bundle/chunks/{chunk-7PNQA24K.js → chunk-UCRYCT5M.js} +8 -8
  118. package/dist/cli-bundle/chunks/{chunk-FN6SB4HU.js → chunk-UEATYUZW.js} +2 -2
  119. package/dist/cli-bundle/chunks/{chunk-V5ZWKJNY.js → chunk-UFNFHCAC.js} +2 -2
  120. package/dist/cli-bundle/chunks/{chunk-XBX5CBRQ.js → chunk-UH6VFRV6.js} +3 -3
  121. package/dist/cli-bundle/chunks/{chunk-GTM5HQL4.js → chunk-UIHDZS6X.js} +7 -7
  122. package/dist/cli-bundle/chunks/{chunk-TGUK6XN6.js → chunk-UURYLDDC.js} +5 -5
  123. package/dist/cli-bundle/chunks/{chunk-6LCJRGPD.js → chunk-UVFJSKTF.js} +4 -4
  124. package/dist/cli-bundle/chunks/{chunk-3G6UMXT3.js → chunk-W2VFNVSJ.js} +3 -3
  125. package/dist/cli-bundle/chunks/{chunk-DG6BSXZ7.js → chunk-WVEMZZCR.js} +3 -3
  126. package/dist/cli-bundle/chunks/{chunk-RY7PTTUB.js → chunk-XN5BEN2B.js} +5 -5
  127. package/dist/cli-bundle/chunks/{chunk-XC3X7BQR.js → chunk-XPSGJ4IV.js} +8 -8
  128. package/dist/cli-bundle/chunks/{chunk-ARKHKYYS.js → chunk-YQEKE4FO.js} +7 -7
  129. package/dist/cli-bundle/chunks/{chunk-QDABF2RB.js → chunk-YR5R4FMQ.js} +10 -10
  130. package/dist/cli-bundle/chunks/{chunk-XPMXPR7K.js → chunk-YSRXFGNV.js} +3 -3
  131. package/dist/cli-bundle/chunks/{chunk-XXIYUTLK.js → chunk-YUCKM3MD.js} +4 -4
  132. package/dist/cli-bundle/chunks/{chunk-N6ZHDLUY.js → chunk-YUMNZS3X.js} +3 -3
  133. package/dist/cli-bundle/chunks/{chunk-TEKZOS7M.js → chunk-Z2JQH2MG.js} +2 -2
  134. package/dist/cli-bundle/chunks/{chunk-E3LWJUGF.js → chunk-Z6RLSNUX.js} +3 -3
  135. package/dist/cli-bundle/chunks/{chunk-EVEPHNXJ.js → chunk-ZMOPZFVT.js} +4 -4
  136. package/dist/cli-bundle/chunks/close-E3RLZSP2.js +12 -0
  137. package/dist/cli-bundle/chunks/{close-3YYQ5OG2.js → close-K6BFI3OX.js} +5 -5
  138. package/dist/cli-bundle/chunks/{close-many-D366FTIG.js → close-many-6NBL3PM4.js} +13 -13
  139. package/dist/cli-bundle/chunks/close-many-X4YKS3RO.js +22 -0
  140. package/dist/cli-bundle/chunks/{comments-54XDJNFE.js → comments-PLFK5ZKK.js} +7 -7
  141. package/dist/cli-bundle/chunks/comments-ZNOD5PTV.js +13 -0
  142. package/dist/cli-bundle/chunks/copy-F7BUFY4J.js +9 -0
  143. package/dist/cli-bundle/chunks/{copy-44RT5GDW.js → copy-VH3L4MN2.js} +4 -4
  144. package/dist/cli-bundle/chunks/create-AMBMYP6F.js +25 -0
  145. package/dist/cli-bundle/chunks/{create-4GWJWPXG.js → create-TRIBYORN.js} +9 -9
  146. package/dist/cli-bundle/chunks/delete-6KQHZYIP.js +10 -0
  147. package/dist/cli-bundle/chunks/{delete-YQ2VPXNF.js → delete-ZNXUNCZR.js} +4 -4
  148. package/dist/cli-bundle/chunks/{deps-FMANWFRP.js → deps-CVDY7FFK.js} +4 -4
  149. package/dist/cli-bundle/chunks/{deps-BU5EBJDU.js → deps-SZXQHV73.js} +4 -4
  150. package/dist/cli-bundle/chunks/{docs-OQBSJNIA.js → docs-DR74ITCD.js} +6 -6
  151. package/dist/cli-bundle/chunks/docs-WCVYY6I7.js +14 -0
  152. package/dist/cli-bundle/chunks/{files-72HZEBOE.js → files-H5YCA74Z.js} +6 -6
  153. package/dist/cli-bundle/chunks/{files-HTSB2KJG.js → files-QEFQ2M3H.js} +6 -6
  154. package/dist/cli-bundle/chunks/{focus-FOG4ALC2.js → focus-55TRYSNA.js} +5 -5
  155. package/dist/cli-bundle/chunks/focus-N2QGNS5D.js +10 -0
  156. package/dist/cli-bundle/chunks/history-compact-GWQ4UOEI.js +21 -0
  157. package/dist/cli-bundle/chunks/{history-compact-M6IFAMBP.js → history-compact-JJZ4EFL3.js} +9 -9
  158. package/dist/cli-bundle/chunks/history-redact-4GJOLXCM.js +17 -0
  159. package/dist/cli-bundle/chunks/{history-redact-NQX3OGZP.js → history-redact-TPPUT3A5.js} +7 -7
  160. package/dist/cli-bundle/chunks/history-repair-HVCVCGUF.js +19 -0
  161. package/dist/cli-bundle/chunks/{history-repair-NHOJG7WO.js → history-repair-J7PIZ6ZP.js} +9 -9
  162. package/dist/cli-bundle/chunks/{learnings-T63JGKKN.js → learnings-KB6BT4NR.js} +7 -7
  163. package/dist/cli-bundle/chunks/learnings-YYY3U2Y7.js +13 -0
  164. package/dist/cli-bundle/chunks/notes-BGG7VL72.js +13 -0
  165. package/dist/cli-bundle/chunks/{notes-U7L6HQQ2.js → notes-ZTHXVOKM.js} +7 -7
  166. package/dist/cli-bundle/chunks/{plan-TN537L24.js → plan-CJPKFRBK.js} +10 -10
  167. package/dist/cli-bundle/chunks/plan-MK2QY3GA.js +24 -0
  168. package/dist/cli-bundle/chunks/{profile-MHAMXMHQ.js → profile-AQNHXOYA.js} +9 -9
  169. package/dist/cli-bundle/chunks/{profile-TIGLAKJ7.js → profile-HTBFINKQ.js} +9 -9
  170. package/dist/cli-bundle/chunks/{register-list-query-ZCRABAPN.js → register-list-query-EEF33SUJ.js} +16 -15
  171. package/dist/cli-bundle/chunks/{register-list-query-ZCRABAPN.js.map → register-list-query-EEF33SUJ.js.map} +1 -1
  172. package/dist/cli-bundle/chunks/{register-list-query-OHXD7G5N.js → register-list-query-S4FBWIWN.js} +15 -14
  173. package/dist/cli-bundle/chunks/{register-list-query-OHXD7G5N.js.map → register-list-query-S4FBWIWN.js.map} +2 -2
  174. package/dist/cli-bundle/chunks/{register-mutation-XX4H56PE.js → register-mutation-L5Q7AUDN.js} +29 -29
  175. package/dist/cli-bundle/chunks/{register-mutation-P3G4XP6Q.js → register-mutation-QFLRBCI7.js} +29 -29
  176. package/dist/cli-bundle/chunks/{register-operations-V6PIYEDU.js → register-operations-HDE4FVW4.js} +26 -26
  177. package/dist/cli-bundle/chunks/{register-operations-V6VKTG54.js → register-operations-QDU43FCG.js} +26 -26
  178. package/dist/cli-bundle/chunks/{register-setup-6YVUSQYD.js → register-setup-EGMTAXDC.js} +21 -19
  179. package/dist/cli-bundle/chunks/register-setup-EGMTAXDC.js.map +1 -0
  180. package/dist/cli-bundle/chunks/{register-setup-6RVAWT6W.js → register-setup-PNIO3L2P.js} +20 -18
  181. package/dist/cli-bundle/chunks/register-setup-PNIO3L2P.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{restore-HC3YSWF7.js → restore-BTBEZ5CK.js} +7 -7
  183. package/dist/cli-bundle/chunks/restore-EX4UUZL6.js +15 -0
  184. package/dist/cli-bundle/chunks/{schema-DAGSYO6E.js → schema-DGSTYYQB.js} +6 -6
  185. package/dist/cli-bundle/chunks/{schema-UBXJCQAC.js → schema-HAIBEE24.js} +6 -6
  186. package/dist/cli-bundle/chunks/{update-LKD64AFP.js → update-MP4XLU56.js} +12 -12
  187. package/dist/cli-bundle/chunks/update-SDIRJGSY.js +21 -0
  188. package/dist/cli-bundle/chunks/update-many-34AIU6W7.js +31 -0
  189. package/dist/cli-bundle/chunks/update-many-JUPCNOKV.js +35 -0
  190. package/dist/cli-bundle/main.js +39 -13
  191. package/dist/cli-bundle/main.js.map +2 -2
  192. package/dist/cli-bundle/sdk-runtime.js +85 -53
  193. package/dist/cli-bundle/sdk-testing.js +6 -6
  194. package/dist/cli-bundle/sdk.js +87 -55
  195. package/dist/cli-bundle/sdk.js.map +2 -2
  196. package/dist/core/extensions/extension-types.d.ts +1 -0
  197. package/dist/core/extensions/extension-types.js +2 -2
  198. package/dist/core/extensions/extension-types.js.map +1 -1
  199. package/dist/core/extensions/loader.js +268 -231
  200. package/dist/core/extensions/loader.js.map +1 -1
  201. package/dist/sdk/cli-contracts/commander-types.js +3 -3
  202. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  203. package/dist/sdk/cli-contracts/flag-contracts.js +7 -3
  204. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  205. package/dist/sdk/cli-contracts/tool-parameter-tables.js +10 -2
  206. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  207. package/dist/sdk/cli-contracts/tool-schema.js +7 -3
  208. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  209. package/dist/sdk/index.d.ts +1 -1
  210. package/dist/sdk/index.js +3 -3
  211. package/dist/sdk/index.js.map +1 -1
  212. package/dist/sdk/runtime.d.ts +132 -1
  213. package/dist/sdk/runtime.js +200 -2
  214. package/dist/sdk/runtime.js.map +1 -1
  215. package/docs/EXTENSIONS.md +7 -20
  216. package/docs/RELEASING.md +6 -0
  217. package/docs/SDK.md +30 -0
  218. package/package.json +2 -1
  219. package/dist/cli-bundle/chunks/append-F7WPGIQL.js +0 -11
  220. package/dist/cli-bundle/chunks/chunk-2APXX4TZ.js.map +0 -1
  221. package/dist/cli-bundle/chunks/chunk-7ML7JONU.js.map +0 -1
  222. package/dist/cli-bundle/chunks/chunk-FILL6BB2.js.map +0 -7
  223. package/dist/cli-bundle/chunks/chunk-LCFJ7XAM.js.map +0 -7
  224. package/dist/cli-bundle/chunks/chunk-MHNMCDWR.js.map +0 -1
  225. package/dist/cli-bundle/chunks/chunk-S547WBYG.js.map +0 -7
  226. package/dist/cli-bundle/chunks/chunk-UO7XAZK6.js.map +0 -1
  227. package/dist/cli-bundle/chunks/chunk-X47MKQXU.js.map +0 -7
  228. package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js.map +0 -1
  229. package/dist/cli-bundle/chunks/chunk-YCVWWIKY.js.map +0 -7
  230. package/dist/cli-bundle/chunks/close-Z3Q4U7TS.js +0 -12
  231. package/dist/cli-bundle/chunks/close-many-3L2RXH3M.js +0 -22
  232. package/dist/cli-bundle/chunks/comments-HGHC2PN6.js +0 -13
  233. package/dist/cli-bundle/chunks/copy-UGMUGHZA.js +0 -9
  234. package/dist/cli-bundle/chunks/create-AZXCUYKP.js +0 -25
  235. package/dist/cli-bundle/chunks/delete-Y6SXIQ4X.js +0 -10
  236. package/dist/cli-bundle/chunks/docs-VNPBZXEL.js +0 -14
  237. package/dist/cli-bundle/chunks/focus-SUTMKXGX.js +0 -10
  238. package/dist/cli-bundle/chunks/history-compact-NEXRPP2O.js +0 -21
  239. package/dist/cli-bundle/chunks/history-redact-WQJBZ3PX.js +0 -17
  240. package/dist/cli-bundle/chunks/history-repair-CBHMHAJO.js +0 -19
  241. package/dist/cli-bundle/chunks/learnings-M64NTSOR.js +0 -13
  242. package/dist/cli-bundle/chunks/notes-73WE2UV2.js +0 -13
  243. package/dist/cli-bundle/chunks/plan-OSCNYFGC.js +0 -24
  244. package/dist/cli-bundle/chunks/register-setup-6RVAWT6W.js.map +0 -7
  245. package/dist/cli-bundle/chunks/register-setup-6YVUSQYD.js.map +0 -1
  246. package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js +0 -15
  247. package/dist/cli-bundle/chunks/update-CJGG5WMV.js +0 -21
  248. package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js +0 -31
  249. package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js +0 -35
  250. /package/dist/cli-bundle/chunks/{append-F7WPGIQL.js.map → append-CDPAYYSB.js.map} +0 -0
  251. /package/dist/cli-bundle/chunks/{append-PVCTBVJG.js.map → append-RSPHC423.js.map} +0 -0
  252. /package/dist/cli-bundle/chunks/{chunk-H2SMKL2N.js.map → chunk-3FUXM574.js.map} +0 -0
  253. /package/dist/cli-bundle/chunks/{chunk-DR2V5OIV.js.map → chunk-3SHDAKMF.js.map} +0 -0
  254. /package/dist/cli-bundle/chunks/{chunk-MRFWUSVA.js.map → chunk-3UXIMY62.js.map} +0 -0
  255. /package/dist/cli-bundle/chunks/{chunk-WCWVEXGA.js.map → chunk-3V5C7PUH.js.map} +0 -0
  256. /package/dist/cli-bundle/chunks/{chunk-43YSKY75.js.map → chunk-3YJDIJIE.js.map} +0 -0
  257. /package/dist/cli-bundle/chunks/{chunk-HX6QXV5P.js.map → chunk-4I7KS5ES.js.map} +0 -0
  258. /package/dist/cli-bundle/chunks/{chunk-XHCVAZGM.js.map → chunk-4OCWJ2AP.js.map} +0 -0
  259. /package/dist/cli-bundle/chunks/{chunk-3TYOW6RR.js.map → chunk-5STY7NVM.js.map} +0 -0
  260. /package/dist/cli-bundle/chunks/{chunk-7VQ3JJN5.js.map → chunk-5VAZHYVQ.js.map} +0 -0
  261. /package/dist/cli-bundle/chunks/{chunk-MCEUKJKW.js.map → chunk-6FU5BVRB.js.map} +0 -0
  262. /package/dist/cli-bundle/chunks/{chunk-AJUON7E6.js.map → chunk-6RR4XM5H.js.map} +0 -0
  263. /package/dist/cli-bundle/chunks/{chunk-TEISGNSH.js.map → chunk-6TD5QGIB.js.map} +0 -0
  264. /package/dist/cli-bundle/chunks/{chunk-565WYS5W.js.map → chunk-6WCXSC5V.js.map} +0 -0
  265. /package/dist/cli-bundle/chunks/{chunk-NWWL22C7.js.map → chunk-6ZKDMEVT.js.map} +0 -0
  266. /package/dist/cli-bundle/chunks/{chunk-VLEA2UTQ.js.map → chunk-7QKSLAHB.js.map} +0 -0
  267. /package/dist/cli-bundle/chunks/{chunk-S6VC2A2K.js.map → chunk-7TBUV7XS.js.map} +0 -0
  268. /package/dist/cli-bundle/chunks/{chunk-YPMZMKN7.js.map → chunk-7UCBLJDF.js.map} +0 -0
  269. /package/dist/cli-bundle/chunks/{chunk-4MZOKTI2.js.map → chunk-AEOFBBWO.js.map} +0 -0
  270. /package/dist/cli-bundle/chunks/{chunk-TZLYO4PP.js.map → chunk-ASMRSIDX.js.map} +0 -0
  271. /package/dist/cli-bundle/chunks/{chunk-ZO7CLOY2.js.map → chunk-BFNFTHWQ.js.map} +0 -0
  272. /package/dist/cli-bundle/chunks/{chunk-YNCFP5AR.js.map → chunk-BPJ5NYSJ.js.map} +0 -0
  273. /package/dist/cli-bundle/chunks/{chunk-P3MJJW7P.js.map → chunk-C3YU3TXX.js.map} +0 -0
  274. /package/dist/cli-bundle/chunks/{chunk-SY75LYXR.js.map → chunk-C6XSTACC.js.map} +0 -0
  275. /package/dist/cli-bundle/chunks/{chunk-2TILG6F2.js.map → chunk-CGDUIPJL.js.map} +0 -0
  276. /package/dist/cli-bundle/chunks/{chunk-J7BOLHAV.js.map → chunk-CXH7EMSB.js.map} +0 -0
  277. /package/dist/cli-bundle/chunks/{chunk-6G6O3OPQ.js.map → chunk-D63PEJTB.js.map} +0 -0
  278. /package/dist/cli-bundle/chunks/{chunk-W5HXHC7C.js.map → chunk-D6J5673C.js.map} +0 -0
  279. /package/dist/cli-bundle/chunks/{chunk-LZQU6XJG.js.map → chunk-DUBC6TI3.js.map} +0 -0
  280. /package/dist/cli-bundle/chunks/{chunk-YPD7SQ5P.js.map → chunk-EEJKHF7M.js.map} +0 -0
  281. /package/dist/cli-bundle/chunks/{chunk-EDO7VXSO.js.map → chunk-EP2CKDS7.js.map} +0 -0
  282. /package/dist/cli-bundle/chunks/{chunk-S5BNGFN5.js.map → chunk-EYPIUFWJ.js.map} +0 -0
  283. /package/dist/cli-bundle/chunks/{chunk-SIM5JDON.js.map → chunk-F5DDGY6R.js.map} +0 -0
  284. /package/dist/cli-bundle/chunks/{chunk-I74FMIWA.js.map → chunk-FFB3WITE.js.map} +0 -0
  285. /package/dist/cli-bundle/chunks/{chunk-43UQN754.js.map → chunk-FJR2S7S4.js.map} +0 -0
  286. /package/dist/cli-bundle/chunks/{chunk-CJQM7O7R.js.map → chunk-FOJEBRDD.js.map} +0 -0
  287. /package/dist/cli-bundle/chunks/{chunk-XZWL7VNE.js.map → chunk-G4FKP4ID.js.map} +0 -0
  288. /package/dist/cli-bundle/chunks/{chunk-E3YQFSFE.js.map → chunk-GLMJLBLR.js.map} +0 -0
  289. /package/dist/cli-bundle/chunks/{chunk-KTGJ2CBU.js.map → chunk-GO2X6ZRB.js.map} +0 -0
  290. /package/dist/cli-bundle/chunks/{chunk-YH5NBDFA.js.map → chunk-GQOKFX2G.js.map} +0 -0
  291. /package/dist/cli-bundle/chunks/{chunk-DDDWVPID.js.map → chunk-GSQVQINP.js.map} +0 -0
  292. /package/dist/cli-bundle/chunks/{chunk-VGO73OCK.js.map → chunk-HZZ3AC27.js.map} +0 -0
  293. /package/dist/cli-bundle/chunks/{chunk-7Y5N34HX.js.map → chunk-IINCZYM3.js.map} +0 -0
  294. /package/dist/cli-bundle/chunks/{chunk-GLS6VMWI.js.map → chunk-INOWVPUD.js.map} +0 -0
  295. /package/dist/cli-bundle/chunks/{chunk-4IQKDKGE.js.map → chunk-IYRG5AEC.js.map} +0 -0
  296. /package/dist/cli-bundle/chunks/{chunk-PDXJXEZJ.js.map → chunk-J6AD3GWC.js.map} +0 -0
  297. /package/dist/cli-bundle/chunks/{chunk-52NS7JDP.js.map → chunk-JH5XDDYS.js.map} +0 -0
  298. /package/dist/cli-bundle/chunks/{chunk-GPIDUMMN.js.map → chunk-JYVPLGOW.js.map} +0 -0
  299. /package/dist/cli-bundle/chunks/{chunk-EIUBK2LT.js.map → chunk-K52C6YPA.js.map} +0 -0
  300. /package/dist/cli-bundle/chunks/{chunk-2LEJGRQ7.js.map → chunk-KFL3XHMA.js.map} +0 -0
  301. /package/dist/cli-bundle/chunks/{chunk-J2VGADNG.js.map → chunk-KMXVZ2P7.js.map} +0 -0
  302. /package/dist/cli-bundle/chunks/{chunk-XS2TMNXR.js.map → chunk-LD2NBQ5T.js.map} +0 -0
  303. /package/dist/cli-bundle/chunks/{chunk-II7R6KD4.js.map → chunk-LG4N6YOK.js.map} +0 -0
  304. /package/dist/cli-bundle/chunks/{chunk-M62RO3XK.js.map → chunk-LHDHS4Z6.js.map} +0 -0
  305. /package/dist/cli-bundle/chunks/{chunk-F6MT7KKE.js.map → chunk-MCH6IKK7.js.map} +0 -0
  306. /package/dist/cli-bundle/chunks/{chunk-IDIBF4E2.js.map → chunk-MYHFZNBO.js.map} +0 -0
  307. /package/dist/cli-bundle/chunks/{chunk-Y7KYVCZM.js.map → chunk-NGBWEYNY.js.map} +0 -0
  308. /package/dist/cli-bundle/chunks/{chunk-RB3KLPAH.js.map → chunk-NRMDT4OV.js.map} +0 -0
  309. /package/dist/cli-bundle/chunks/{chunk-GH73UOSJ.js.map → chunk-NTOOEVJ4.js.map} +0 -0
  310. /package/dist/cli-bundle/chunks/{chunk-ZNEG2UDO.js.map → chunk-P2WE5KCU.js.map} +0 -0
  311. /package/dist/cli-bundle/chunks/{chunk-EMXPI36L.js.map → chunk-PAWPLIWW.js.map} +0 -0
  312. /package/dist/cli-bundle/chunks/{chunk-AGAVEDIE.js.map → chunk-PCBZ2VJD.js.map} +0 -0
  313. /package/dist/cli-bundle/chunks/{chunk-6XTSYPPO.js.map → chunk-PJPZTE7P.js.map} +0 -0
  314. /package/dist/cli-bundle/chunks/{chunk-3X542TEY.js.map → chunk-Q3CFSOQZ.js.map} +0 -0
  315. /package/dist/cli-bundle/chunks/{chunk-4BKDAEDF.js.map → chunk-QJZM5WO5.js.map} +0 -0
  316. /package/dist/cli-bundle/chunks/{chunk-HHEWQXPD.js.map → chunk-QLEH6FTQ.js.map} +0 -0
  317. /package/dist/cli-bundle/chunks/{chunk-D2DCTFTL.js.map → chunk-QYZMZD4L.js.map} +0 -0
  318. /package/dist/cli-bundle/chunks/{chunk-F6YC2A6X.js.map → chunk-RDJXIAJB.js.map} +0 -0
  319. /package/dist/cli-bundle/chunks/{chunk-6UQCNWFV.js.map → chunk-RFHLRMLQ.js.map} +0 -0
  320. /package/dist/cli-bundle/chunks/{chunk-Q64AYQYW.js.map → chunk-RL24NAUX.js.map} +0 -0
  321. /package/dist/cli-bundle/chunks/{chunk-C5ACVMOI.js.map → chunk-RLHQ3G4M.js.map} +0 -0
  322. /package/dist/cli-bundle/chunks/{chunk-5FIQ4EX3.js.map → chunk-SCJPFQQT.js.map} +0 -0
  323. /package/dist/cli-bundle/chunks/{chunk-42LXP4VO.js.map → chunk-SIQGG335.js.map} +0 -0
  324. /package/dist/cli-bundle/chunks/{chunk-TNC6MZUD.js.map → chunk-SN5X5GTU.js.map} +0 -0
  325. /package/dist/cli-bundle/chunks/{chunk-43SIHQND.js.map → chunk-TKWTJGD6.js.map} +0 -0
  326. /package/dist/cli-bundle/chunks/{chunk-YTD5GICJ.js.map → chunk-TU5P744I.js.map} +0 -0
  327. /package/dist/cli-bundle/chunks/{chunk-QFBSP3NI.js.map → chunk-TUDAYIO7.js.map} +0 -0
  328. /package/dist/cli-bundle/chunks/{chunk-EOUVR7JN.js.map → chunk-U72GF3I2.js.map} +0 -0
  329. /package/dist/cli-bundle/chunks/{chunk-7PNQA24K.js.map → chunk-UCRYCT5M.js.map} +0 -0
  330. /package/dist/cli-bundle/chunks/{chunk-FN6SB4HU.js.map → chunk-UEATYUZW.js.map} +0 -0
  331. /package/dist/cli-bundle/chunks/{chunk-V5ZWKJNY.js.map → chunk-UFNFHCAC.js.map} +0 -0
  332. /package/dist/cli-bundle/chunks/{chunk-XBX5CBRQ.js.map → chunk-UH6VFRV6.js.map} +0 -0
  333. /package/dist/cli-bundle/chunks/{chunk-GTM5HQL4.js.map → chunk-UIHDZS6X.js.map} +0 -0
  334. /package/dist/cli-bundle/chunks/{chunk-TGUK6XN6.js.map → chunk-UURYLDDC.js.map} +0 -0
  335. /package/dist/cli-bundle/chunks/{chunk-6LCJRGPD.js.map → chunk-UVFJSKTF.js.map} +0 -0
  336. /package/dist/cli-bundle/chunks/{chunk-3G6UMXT3.js.map → chunk-W2VFNVSJ.js.map} +0 -0
  337. /package/dist/cli-bundle/chunks/{chunk-DG6BSXZ7.js.map → chunk-WVEMZZCR.js.map} +0 -0
  338. /package/dist/cli-bundle/chunks/{chunk-RY7PTTUB.js.map → chunk-XN5BEN2B.js.map} +0 -0
  339. /package/dist/cli-bundle/chunks/{chunk-XC3X7BQR.js.map → chunk-XPSGJ4IV.js.map} +0 -0
  340. /package/dist/cli-bundle/chunks/{chunk-ARKHKYYS.js.map → chunk-YQEKE4FO.js.map} +0 -0
  341. /package/dist/cli-bundle/chunks/{chunk-QDABF2RB.js.map → chunk-YR5R4FMQ.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{chunk-XPMXPR7K.js.map → chunk-YSRXFGNV.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{chunk-XXIYUTLK.js.map → chunk-YUCKM3MD.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{chunk-N6ZHDLUY.js.map → chunk-YUMNZS3X.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{chunk-TEKZOS7M.js.map → chunk-Z2JQH2MG.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{chunk-E3LWJUGF.js.map → chunk-Z6RLSNUX.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{chunk-EVEPHNXJ.js.map → chunk-ZMOPZFVT.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{close-Z3Q4U7TS.js.map → close-E3RLZSP2.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{close-3YYQ5OG2.js.map → close-K6BFI3OX.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{close-many-D366FTIG.js.map → close-many-6NBL3PM4.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{close-many-3L2RXH3M.js.map → close-many-X4YKS3RO.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{comments-54XDJNFE.js.map → comments-PLFK5ZKK.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{comments-HGHC2PN6.js.map → comments-ZNOD5PTV.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{copy-UGMUGHZA.js.map → copy-F7BUFY4J.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{copy-44RT5GDW.js.map → copy-VH3L4MN2.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{create-AZXCUYKP.js.map → create-AMBMYP6F.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{create-4GWJWPXG.js.map → create-TRIBYORN.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{delete-Y6SXIQ4X.js.map → delete-6KQHZYIP.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{delete-YQ2VPXNF.js.map → delete-ZNXUNCZR.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{deps-FMANWFRP.js.map → deps-CVDY7FFK.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{deps-BU5EBJDU.js.map → deps-SZXQHV73.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{docs-OQBSJNIA.js.map → docs-DR74ITCD.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{docs-VNPBZXEL.js.map → docs-WCVYY6I7.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{files-72HZEBOE.js.map → files-H5YCA74Z.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{files-HTSB2KJG.js.map → files-QEFQ2M3H.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{focus-FOG4ALC2.js.map → focus-55TRYSNA.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{focus-SUTMKXGX.js.map → focus-N2QGNS5D.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{history-compact-NEXRPP2O.js.map → history-compact-GWQ4UOEI.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{history-compact-M6IFAMBP.js.map → history-compact-JJZ4EFL3.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{history-redact-WQJBZ3PX.js.map → history-redact-4GJOLXCM.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{history-redact-NQX3OGZP.js.map → history-redact-TPPUT3A5.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{history-repair-CBHMHAJO.js.map → history-repair-HVCVCGUF.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{history-repair-NHOJG7WO.js.map → history-repair-J7PIZ6ZP.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{learnings-T63JGKKN.js.map → learnings-KB6BT4NR.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{learnings-M64NTSOR.js.map → learnings-YYY3U2Y7.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{notes-73WE2UV2.js.map → notes-BGG7VL72.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{notes-U7L6HQQ2.js.map → notes-ZTHXVOKM.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{plan-TN537L24.js.map → plan-CJPKFRBK.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{plan-OSCNYFGC.js.map → plan-MK2QY3GA.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{profile-MHAMXMHQ.js.map → profile-AQNHXOYA.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{profile-TIGLAKJ7.js.map → profile-HTBFINKQ.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{register-mutation-XX4H56PE.js.map → register-mutation-L5Q7AUDN.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{register-mutation-P3G4XP6Q.js.map → register-mutation-QFLRBCI7.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{register-operations-V6PIYEDU.js.map → register-operations-HDE4FVW4.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{register-operations-V6VKTG54.js.map → register-operations-QDU43FCG.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{restore-HC3YSWF7.js.map → restore-BTBEZ5CK.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{restore-LFAMMRYZ.js.map → restore-EX4UUZL6.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{schema-DAGSYO6E.js.map → schema-DGSTYYQB.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{schema-UBXJCQAC.js.map → schema-HAIBEE24.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{update-LKD64AFP.js.map → update-MP4XLU56.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{update-CJGG5WMV.js.map → update-SDIRJGSY.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{update-many-G4SM7BHC.js.map → update-many-34AIU6W7.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{update-many-VLIV3D7R.js.map → update-many-JUPCNOKV.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../sdk/define.ts", "../../../../../../../sdk/index.ts"],
4
- "sourcesContent": ["/**\n * @module sdk/define\n *\n * Authoring-time typed builders for every extension registration surface.\n *\n * These `define*` helpers are the third leg of the SDK ergonomics tripod:\n * {@link ../core/extensions/loader.js#ExtensionApi | `api.register*`} registers\n * a definition at activation, the `assert*`/`run*` testing helpers verify and\n * invoke it, and these builders let authors *write* the definition with full\n * type-checking and editor inference before it ever reaches `activate`.\n *\n * Every builder is a zero-cost identity function that returns its argument\n * unchanged — exactly like the SDK's {@link ./index.js#defineExtension} and the\n * wider `defineConfig`/`defineComponent` ecosystem convention. Extensions are\n * authored fully in TypeScript (ADR pm-2c28); these builders are where that type\n * safety is anchored at the definition site. Their value is entirely at the type\n * level:\n *\n * - A bare `const cmd = { ... }` satisfies the registration type only\n * structurally and widens its literals; `const cmd = defineCommand({ ... })`\n * checks the object against the contract *and* preserves the narrow literal\n * type, while inferring the nested handler's `context` parameter from the\n * builder signature.\n * - Definitions can be colocated, exported, reused, and unit-tested apart from\n * the `activate` call instead of being trapped as inline literals.\n *\n * Object-definition builders use a generic constraint (`<T extends Def>`) so the\n * narrow literal type survives the round-trip, mirroring `defineExtension`.\n * Function-definition builders are intentionally non-generic: a generic\n * constrained to a whole function type suppresses contextual typing of a bare\n * arrow's parameter (it would fall back to implicit `any`), whereas the\n * non-generic signature lets TypeScript type the handler parameter from the\n * declared function type.\n */\nimport type {\n AfterCommandHook,\n BeforeCommandHook,\n CommandDefinition,\n CommandOverride,\n Exporter,\n ExtensionManifest,\n FlagDefinition,\n Importer,\n OnIndexHook,\n OnReadHook,\n OnWriteHook,\n ParserOverride,\n PreflightOverride,\n RendererOverride,\n SchemaFieldDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SearchProviderDefinition,\n ServiceOverride,\n VectorStoreAdapterDefinition,\n} from \"../core/extensions/loader.js\";\nimport type { ProjectProfileDefinition } from \"../core/profile/profile-presets.js\";\n\n/**\n * Type an extension's in-module manifest mirror (the `manifest` export / field).\n *\n * Completes the `define*` family: the manifest is the one authoring surface that\n * otherwise had no builder. Contract-checks the object against\n * {@link ExtensionManifest} where it is authored, catching a missing required\n * field or a mistyped key at edit time instead of at load time. Pair with\n * {@link ./compose.js#deriveExtensionCapabilities | `deriveExtensionCapabilities`}\n * to keep `capabilities` matched to the surfaces the extension actually registers.\n */\nexport function defineExtensionManifest<TManifest extends ExtensionManifest>(manifest: TManifest): TManifest {\n return manifest;\n}\n\n/**\n * Type a project-profile definition for the profile registry.\n *\n * A profile bundles item types, statuses, fields, per-type workflows, config\n * knobs, create templates, and package recommendations into one declarative\n * archetype that `pm profile apply` stages idempotently. This builder checks the\n * object against {@link ProjectProfileDefinition} where it is authored — catching\n * an invalid field type or a malformed workflow at edit time — while preserving\n * the literal `name`/`types`/`statuses` so a package's archetype stays strongly\n * typed at the definition site, mirroring {@link defineItemType}. It is the\n * authoring anchor a first-party or third-party profile package builds on.\n */\nexport function defineProjectProfile<TProfile extends ProjectProfileDefinition>(profile: TProfile): TProfile {\n return profile;\n}\n\n/**\n * Type a command definition for `api.registerCommand(definition)`.\n *\n * Checks the object against {@link CommandDefinition} and infers the `run`\n * handler's `context` parameter while preserving the literal `name`/`action`\n * types. Pass the result straight to `registerCommand`, or export it so the\n * command can be invoked in tests via `runRegisteredCommandForTest`.\n */\nexport function defineCommand<TDefinition extends CommandDefinition>(definition: TDefinition): TDefinition {\n return definition;\n}\n\n/**\n * Type a single flag definition for a `api.registerFlags(command, flags)` array.\n *\n * Authors compose builders into the array\n * (`api.registerFlags(\"list\", [defineFlag({ long: \"--mine\" })])`) to get\n * per-flag contract checking — `value_type`, `list`, and `default` included —\n * instead of validating a loosely-typed literal array all at once.\n */\nexport function defineFlag<TFlag extends FlagDefinition>(flag: TFlag): TFlag {\n return flag;\n}\n\n/**\n * Type a custom item-type definition for `api.registerItemTypes([...])`.\n *\n * Preserves the literal `name`/`folder`/`aliases` so a project archetype's\n * domain types stay strongly typed where the definition is declared and reused.\n */\nexport function defineItemType<TType extends SchemaItemTypeDefinition>(type: TType): TType {\n return type;\n}\n\n/**\n * Type a custom front-matter field definition for `api.registerItemFields([...])`.\n *\n * Checks `name`/`type`/`optional` against {@link SchemaFieldDefinition} while\n * keeping the field's extra metadata (the contract carries an index signature)\n * intact.\n */\nexport function defineItemField<TField extends SchemaFieldDefinition>(field: TField): TField {\n return field;\n}\n\n/**\n * Type a schema migration definition for `api.registerMigration(definition)`.\n *\n * Preserves the literal `id` and, when `run` is provided, infers the migration\n * runner's context, so the same definition can be registered and later exercised\n * through `runRegisteredMigrationForTest`.\n */\nexport function defineMigration<TMigration extends SchemaMigrationDefinition>(migration: TMigration): TMigration {\n return migration;\n}\n\n/**\n * Type a search-provider definition for `api.registerSearchProvider(provider)`.\n *\n * Infers the `query`/`embed`/`embedBatch` operation contexts and result shapes\n * so a custom retrieval backend is type-checked at the definition site and\n * reusable in `runRegisteredSearchProviderForTest`.\n */\nexport function defineSearchProvider<TProvider extends SearchProviderDefinition>(provider: TProvider): TProvider {\n return provider;\n}\n\n/**\n * Type a vector-store adapter definition for `api.registerVectorStoreAdapter(adapter)`.\n *\n * Infers the `query`/`upsert`/`delete` operation contexts so a package that owns\n * its own semantic index storage gets contract checking before activation and a\n * definition it can drive through `runRegisteredVectorStoreAdapterForTest`.\n */\nexport function defineVectorStoreAdapter<TAdapter extends VectorStoreAdapterDefinition>(adapter: TAdapter): TAdapter {\n return adapter;\n}\n\n/**\n * Type a command-override handler for `api.registerCommand(command, override)`.\n *\n * The non-generic signature lets TypeScript contextually type the override's\n * `context` parameter from {@link CommandOverride}, so a bare arrow authored in\n * a `.js` package still gets a fully-typed argument.\n */\nexport function defineCommandOverride(override: CommandOverride): CommandOverride {\n return override;\n}\n\n/**\n * Type a parser-override handler for `api.registerParser(command, override)`.\n *\n * Contextually types the `context` parameter and the returned\n * {@link ParserOverride} delta so an argument-rewriting override is checked\n * where it is written.\n */\nexport function defineParserOverride(override: ParserOverride): ParserOverride {\n return override;\n}\n\n/**\n * Type a preflight-override handler for `api.registerPreflight(override)`.\n *\n * Contextually types the `context` parameter and the returned gate decision so a\n * package's pre-run validation override is checked at the definition site.\n */\nexport function definePreflightOverride(override: PreflightOverride): PreflightOverride {\n return override;\n}\n\n/**\n * Type a service-override handler for `api.registerService(service, override)`.\n *\n * Contextually types the `context` parameter from {@link ServiceOverride} so a\n * package overriding a built-in service (output formatting, embeddings, and the\n * like) keeps its handler argument typed without an explicit annotation.\n */\nexport function defineServiceOverride(override: ServiceOverride): ServiceOverride {\n return override;\n}\n\n/**\n * Type a renderer-override handler for `api.registerRenderer(format, renderer)`.\n *\n * Contextually types the `context` parameter and the `string | null | undefined`\n * return contract so a custom output renderer is checked where it is authored.\n */\nexport function defineRendererOverride(renderer: RendererOverride): RendererOverride {\n return renderer;\n}\n\n/**\n * Type an importer handler for `api.registerImporter(name, importer, options)`.\n *\n * Contextually types the {@link Importer} `context` (registration, args,\n * options, pm root) so the bridge from an external system into the pm context\n * graph is type-checked and reusable in `runRegisteredImporterForTest`.\n */\nexport function defineImporter(importer: Importer): Importer {\n return importer;\n}\n\n/**\n * Type an exporter handler for `api.registerExporter(name, exporter, options)`.\n *\n * Contextually types the {@link Exporter} `context` so the bridge from the pm\n * context graph out to an external system is checked at the definition site and\n * reusable in `runRegisteredExporterForTest`.\n */\nexport function defineExporter(exporter: Exporter): Exporter {\n return exporter;\n}\n\n/**\n * Type a `before_command` hook for `api.hooks.beforeCommand(hook)`.\n *\n * Contextually types the {@link BeforeCommandHook} `context` so a hook that\n * inspects or annotates a command before it runs keeps its argument typed when\n * authored as a standalone, exportable, testable value.\n */\nexport function defineBeforeCommandHook(hook: BeforeCommandHook): BeforeCommandHook {\n return hook;\n}\n\n/**\n * Type an `after_command` hook for `api.hooks.afterCommand(hook)`.\n *\n * Contextually types the {@link AfterCommandHook} `context` — including the\n * `affected` items pm mutated — so the natural place to react to every change\n * (\"project management = context management\") is checked where it is written.\n */\nexport function defineAfterCommandHook(hook: AfterCommandHook): AfterCommandHook {\n return hook;\n}\n\n/**\n * Type an `on_write` hook for `api.hooks.onWrite(hook)`.\n *\n * Contextually types the {@link OnWriteHook} `context` so a hook reacting to\n * item persistence keeps its argument typed without an explicit annotation.\n */\nexport function defineOnWriteHook(hook: OnWriteHook): OnWriteHook {\n return hook;\n}\n\n/**\n * Type an `on_read` hook for `api.hooks.onRead(hook)`.\n *\n * Contextually types the {@link OnReadHook} `context` so a hook augmenting items\n * as they are read is type-checked at the definition site.\n */\nexport function defineOnReadHook(hook: OnReadHook): OnReadHook {\n return hook;\n}\n\n/**\n * Type an `on_index` hook for `api.hooks.onIndex(hook)`.\n *\n * Contextually types the {@link OnIndexHook} `context` so a hook participating\n * in index/search refresh keeps its argument typed even without TypeScript\n * annotations.\n */\nexport function defineOnIndexHook(hook: OnIndexHook): OnIndexHook {\n return hook;\n}\n", "/**\n * @module sdk/index\n *\n * Defines public SDK APIs and package-author helpers for Index.\n */\nimport {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_TRUST_MODES,\n} from \"../core/extensions/loader.js\";\nexport {\n PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,\n PM_PACKAGE_RESOURCE_KINDS,\n collectPackageExtensionDirectories,\n readPmPackageManifest,\n type PmPackageCatalogLinkMap,\n type PmPackageCatalogMediaMap,\n type PmPackageCatalogMetadata,\n type PmPackageManifest,\n type PmPackageResourceKind,\n type PmPackageResourceMap,\n} from \"../core/packages/manifest.js\";\nexport type { CommanderOptionAliasContract, CommanderOptionRegistrationContract } from \"./cli-contracts.js\";\nexport {\n ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,\n APPEND_FLAG_CONTRACTS,\n CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,\n CALENDAR_FLAG_CONTRACTS,\n CLAIM_FLAG_CONTRACTS,\n CLOSE_FLAG_CONTRACTS,\n CLOSE_MANY_FLAG_CONTRACTS,\n CLOSE_TASK_FLAG_CONTRACTS,\n COMMENTS_AUDIT_FLAG_CONTRACTS,\n COMMENTS_FLAG_CONTRACTS,\n COMPLETION_FLAG_CONTRACTS,\n CONFIG_FLAG_CONTRACTS,\n CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n CONTEXT_FLAG_CONTRACTS,\n CONTRACTS_FLAG_CONTRACTS,\n COPY_FLAG_CONTRACTS,\n CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n CREATE_COMMANDER_STRING_OPTION_CONTRACTS,\n CREATE_FLAG_CONTRACTS,\n DELETE_FLAG_CONTRACTS,\n DEDUPE_AUDIT_FLAG_CONTRACTS,\n DEDUPE_MERGE_FLAG_CONTRACTS,\n DEPS_FLAG_CONTRACTS,\n DOCS_FLAG_CONTRACTS,\n EVAL_FLAG_CONTRACTS,\n EXTENSION_ACTIVATE_FLAG_CONTRACTS,\n EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,\n EXTENSION_ADOPT_FLAG_CONTRACTS,\n EXTENSION_CATALOG_FLAG_CONTRACTS,\n EXTENSION_DEACTIVATE_FLAG_CONTRACTS,\n EXTENSION_DESCRIBE_FLAG_CONTRACTS,\n EXTENSION_DOCTOR_FLAG_CONTRACTS,\n EXTENSION_EXPLORE_FLAG_CONTRACTS,\n EXTENSION_FLAG_CONTRACTS,\n EXTENSION_INIT_FLAG_CONTRACTS,\n EXTENSION_INSTALL_FLAG_CONTRACTS,\n EXTENSION_MANAGE_FLAG_CONTRACTS,\n EXTENSION_RELOAD_FLAG_CONTRACTS,\n EXTENSION_SCOPE_FLAG_CONTRACTS,\n EXTENSION_UNINSTALL_FLAG_CONTRACTS,\n FILES_FLAG_CONTRACTS,\n FOCUS_FLAG_CONTRACTS,\n GC_FLAG_CONTRACTS,\n GET_FLAG_CONTRACTS,\n GLOBAL_FLAG_CONTRACTS,\n GUIDE_FLAG_CONTRACTS,\n HEALTH_FLAG_CONTRACTS,\n HISTORY_COMPACT_FLAG_CONTRACTS,\n HISTORY_FLAG_CONTRACTS,\n HISTORY_REDACT_FLAG_CONTRACTS,\n HISTORY_REPAIR_FLAG_CONTRACTS,\n INIT_FLAG_CONTRACTS,\n INSTALL_FLAG_CONTRACTS,\n LEARNINGS_FLAG_CONTRACTS,\n LIST_COMMANDER_STRING_OPTION_CONTRACTS,\n LIST_FILTER_FLAG_CONTRACTS,\n MEET_FLAG_CONTRACTS,\n NEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n NEXT_FLAG_CONTRACTS,\n NORMALIZE_FLAG_CONTRACTS,\n NOTES_FLAG_CONTRACTS,\n PACKAGE_FLAG_CONTRACTS,\n PACKAGE_INIT_FLAG_CONTRACTS,\n PAUSE_TASK_FLAG_CONTRACTS,\n PLAN_FLAG_CONTRACTS,\n PM_CORE_COMMAND_NAMES,\n PM_EXTENSION_CAPABILITY_CONTRACTS,\n PM_EXTENSION_POLICY_MODE_CONTRACTS,\n PM_EXTENSION_POLICY_SURFACE_CONTRACTS,\n PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,\n PM_EXTENSION_SERVICE_NAME_CONTRACTS,\n PM_EXTENSION_TRUST_MODE_CONTRACTS,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,\n PM_TOOL_ACTIONS,\n PM_TOOL_ACTION_PARAMETER_CONTRACTS,\n PM_TOOL_PARAMETERS_SCHEMA,\n PM_TOOL_PARAMETERS_SCHEMA_MAJOR,\n PM_TOOL_PARAMETERS_SCHEMA_VERSION,\n PROFILE_FLAG_CONTRACTS,\n REINDEX_FLAG_CONTRACTS,\n RELEASE_FLAG_CONTRACTS,\n REMIND_FLAG_CONTRACTS,\n RESTORE_FLAG_CONTRACTS,\n SCHEMA_FLAG_CONTRACTS,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,\n SEARCH_FLAG_CONTRACTS,\n START_TASK_FLAG_CONTRACTS,\n STATS_FLAG_CONTRACTS,\n SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,\n TELEMETRY_FLAG_CONTRACTS,\n TEST_ALL_FLAG_CONTRACTS,\n TEST_FLAG_CONTRACTS,\n TEST_RUNS_FLAG_CONTRACTS,\n TOOL_ACTIVITY_OPTION_CONTRACTS,\n TOOL_AGGREGATE_OPTION_CONTRACTS,\n TOOL_CALENDAR_OPTION_CONTRACTS,\n TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_CONTEXT_OPTION_CONTRACTS,\n TOOL_CREATE_OPTION_CONTRACTS,\n TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS,\n TOOL_DEPS_OPTION_CONTRACTS,\n TOOL_LIST_FILTER_OPTION_CONTRACTS,\n TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS,\n TOOL_SEARCH_FILTER_OPTION_CONTRACTS,\n TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,\n TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_UPDATE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,\n UPDATE_FLAG_CONTRACTS,\n UPDATE_MANY_FLAG_CONTRACTS,\n UPGRADE_FLAG_CONTRACTS,\n compactFlagAliasContracts,\n isPmExtensionCapabilityContract,\n isPmExtensionPolicyModeContract,\n isPmExtensionPolicySurfaceContract,\n isPmExtensionServiceNameContract,\n isPmToolAction,\n readFirstStringFromCommanderOptions,\n readFirstValueFromCommanderOptions,\n readStringArrayFromCommanderOptions,\n resolveSubcommandFlagContractsForCommand,\n toCompletionFlagString,\n withFlagAliasMetadata,\n} from \"./cli-contracts.js\";\nexport type {\n CliFlagContract,\n PmActionSchemaContract,\n PmExtensionCapabilityContract,\n PmExtensionPolicyModeContract,\n PmExtensionPolicySurfaceContract,\n PmExtensionSandboxProfileContract,\n PmExtensionServiceNameContract,\n PmExtensionTrustModeContract,\n PmToolAction,\n ToolOptionFlagContract,\n} from \"./cli-contracts.js\";\nexport * from \"./compose.js\";\nexport * from \"./define.js\";\nexport {\n BASELINE_ITEM_FORMAT_VERSION,\n BUILTIN_ITEM_TYPE_VALUES,\n CONFIDENCE_TEXT_VALUES,\n CURRENT_ITEM_FORMAT_VERSION,\n DEPENDENCY_KIND_VALUES,\n EXIT_CODE,\n ISSUE_SEVERITY_VALUES,\n ITEM_TYPE_VALUES,\n PM_CLI_EXPECTED_ERROR_NAME,\n PmCliError,\n PmClient,\n RISK_VALUES,\n STATUS_VALUES,\n acquireLock,\n appendHistoryEntry,\n canonicalDocument,\n classifyItemFormatVersion,\n clearWorkspaceContractsCache,\n commitImportedItem,\n createHistoryEntry,\n createPmCliExpectedError,\n effectiveItemFormatVersion,\n emptyImportedDocument,\n ensureTrackerInitialized,\n generateItemId,\n getActiveExtensionRegistrations,\n getContracts,\n getHistoryPath,\n getItemPath,\n getSettingsPath,\n getWorkspaceContracts,\n isPmCliExpectedError,\n isTimestampLiteral,\n listAllFrontMatter,\n loadCreateTemplateOptions,\n locateItem,\n normalizeFrontMatter,\n normalizeItemFormatVersion,\n normalizeItemId,\n normalizeRawItemId,\n normalizeStatusInput,\n nowIso,\n parseTags,\n pathExists,\n readBooleanOption,\n readCsvListOption,\n readFileIfExists,\n readLocatedItem,\n readRequiredString,\n readSettings,\n readStringOption,\n removeFileIfExists,\n renderCalendarMarkdown,\n renderCalendarToon,\n renderGuideMarkdown,\n resolveCalendarOutputFormat,\n resolveGuideOutputFormat,\n resolveItemTypeRegistry,\n resolvePmRoot,\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n runAction,\n runActiveOnReadHooks,\n runActiveOnWriteHooks,\n runCalendar,\n runCommentsAudit,\n runCompletion,\n runDedupeAudit,\n runDedupeMerge,\n runGuide,\n runNormalize,\n runReindex,\n runSearch,\n runTemplatesList,\n runTemplatesSave,\n runTemplatesShow,\n runTestRunsList,\n runTestRunsLogs,\n runTestRunsResume,\n runTestRunsStatus,\n runTestRunsStop,\n scanItemFormatVersions,\n selectImportAuthor,\n serializeItemDocument,\n splitFrontMatter,\n toEstimatedMinutesValue,\n toImportBoolean,\n toImportConfidence,\n toImportInteger,\n toImportLinkedDocs,\n toImportLinkedFiles,\n toImportLinkedTests,\n toImportLogEntries,\n toImportNormalizedEnum,\n toImportNumberMap,\n toImportPriority,\n toImportStatus,\n toImportStringList,\n toImportStringMap,\n toImportTags,\n toNonEmptyImportString,\n writeFileAtomic,\n aggregate,\n claim,\n close,\n closeTask,\n context,\n copy,\n create,\n deleteItem,\n focus,\n get,\n list,\n next,\n pauseTask,\n release,\n restore,\n search,\n startTask,\n stats,\n update,\n type AggregateOptions,\n type AggregateResult,\n type AggregateRow,\n type BlockerEntry,\n type CalendarOptions,\n type CalendarResult,\n type CommentsAuditEntry,\n type CommentsAuditHistoryRow,\n type CommentsAuditOptions,\n type CommentsAuditResult,\n type CommentsAuditSummary,\n type CommentsAuditTypeSummary,\n type CommitImportedItemParams,\n type CommitImportedItemResult,\n type CompletionResult,\n type CompletionShell,\n type ContractsCommandOptions,\n type ContractsResult,\n type ContextFocusItem,\n type ContextOptions,\n type ContextOutputFormat,\n type ContextResult,\n type CreatePmCliExpectedErrorOptions,\n type CreateTemplateOptions,\n type DedupeAuditCandidate,\n type DedupeAuditCluster,\n type DedupeAuditOptions,\n type DedupeAuditResult,\n type DedupeMergeChildReparent,\n type DedupeMergeCloseAction,\n type DedupeMergeDuplicateOutcome,\n type DedupeMergeOptions,\n type DedupeMergeResult,\n type Dependency,\n type GetContractsOptions,\n type GetOptions,\n type GetResult,\n type GuideDepth,\n type GuideOptions,\n type GuideOutputFormat,\n type GuideResult,\n type ImportLinkedScope,\n type ItemFormatVersionScanEntry,\n type ItemFormatVersionScanResult,\n type ItemFormatVersionStatus,\n type ItemMetadata,\n type LinkedDoc,\n type LinkedFile,\n type LinkedTest,\n type ListedItem,\n type ListCompactResult,\n type ListOptions,\n type ListResult,\n type ListSortField,\n type ListSortOrder,\n type ListVerboseResult,\n type LogNote,\n type NextActionableItem,\n type NextBlockerRef,\n type NextOptions,\n type NextOutputFormat,\n type NextRecommendation,\n type NextResult,\n type NormalizeCommandOptions,\n type NormalizeResult,\n type PmActionInput,\n type PmActionName,\n type PmActionOptions,\n type PmClientMutationOptions,\n type PmClientOptions,\n type PmClientRunArgs,\n type PmCliExpectedError,\n type ReindexOptions,\n type ReindexResult,\n type SearchCompactResult,\n type SearchHit,\n type SearchHitHighlight,\n type SearchMatchMode,\n type SearchOptions,\n type SearchResult,\n type SearchResultItem,\n type SearchVerboseResult,\n type StatsCommandOptions,\n type StatsResult,\n type TemplatesListResult,\n type TemplatesSaveResult,\n type TemplatesShowResult,\n type TestRunsListCommandOptions,\n type TestRunsLogsCommandOptions,\n type TestRunsResumeCommandOptions,\n type TestRunsStopCommandOptions,\n type ToImportLinkedArtifactsOptions,\n type ToImportLinkedTestsOptions,\n type ToImportLogEntriesOptions,\n type WorkspaceContracts,\n type WorkspaceContractsOptions,\n} from \"./runtime.js\";\nexport {\n BUILTIN_PROFILES,\n listProfiles,\n normalizeProfileName,\n PROFILE_NAMES,\n resolveProfile,\n type ProfileConfigEntry,\n type ProfileName,\n type ProfilePackageRecommendation,\n type ProfileTemplateEntry,\n type ProfileTemplateOptions,\n type ProjectProfileDefinition,\n type ProjectProfileRegistrationInput,\n} from \"../core/profile/profile-presets.js\";\nexport {\n planProfileApplication,\n type ProfileApplicationPlan,\n type ProfileChangeStatus,\n type ProfileComponentChange,\n type ProfileConfigChange,\n type ProfileConfigPlan,\n type ProfileCurrentState,\n type ProfilePackagePlan,\n type ProfileSchemaPlan,\n type ProfileTemplateChange,\n type ProfileTemplatePlan,\n type ProfileWorkflowChange,\n type ProfileWorkflowPlan,\n} from \"../core/profile/profile-plan.js\";\nexport {\n describeProfileComposition,\n describeProjectProfile,\n type ProjectProfileComposition,\n type ProjectProfileDescription,\n type ProjectProfilePackageSummary,\n} from \"../core/profile/profile-describe.js\";\nexport {\n lintProjectProfile,\n PROFILE_LINT_CODES,\n PROFILE_LINT_DIMENSIONS,\n type ProfileLintCode,\n type ProfileLintDimension,\n type ProfileLintSeverity,\n type ProjectProfileLintFinding,\n type ProjectProfileLintReport,\n} from \"../core/profile/profile-lint.js\";\nexport {\n assertExtensionBlueprint,\n assertExtensionCapabilityUsage,\n assertExtensionDeactivated,\n assertExtensionManifestCompatible,\n assertExtensionManifestMatchesBlueprint,\n assertExtensionPreflight,\n assertPackageManifest,\n assertProjectProfile,\n assertRegisteredCommandContract,\n assertRegisteredCommandOverride,\n assertRegisteredExporter,\n assertRegisteredFlags,\n assertRegisteredHook,\n assertRegisteredImporter,\n assertRegisteredItemField,\n assertRegisteredItemType,\n assertRegisteredMigration,\n assertRegisteredParserOverride,\n assertRegisteredPreflightOverride,\n assertRegisteredProfile,\n assertRegisteredRendererOverride,\n assertRegisteredSearchProvider,\n assertRegisteredServiceOverride,\n assertRegisteredVectorStoreAdapter,\n activateExtensionForTest,\n createExtensionTestHarness,\n deactivateExtensionForTest,\n describeExtensionActivation,\n runRegisteredCommandForTest,\n runRegisteredCommandOverrideForTest,\n runRegisteredExporterForTest,\n runRegisteredHookForTest,\n runRegisteredImporterForTest,\n runRegisteredMigrationForTest,\n runRegisteredParserOverrideForTest,\n runRegisteredPreflightOverrideForTest,\n runRegisteredRendererOverrideForTest,\n runRegisteredSearchProviderForTest,\n runRegisteredServiceOverrideForTest,\n runRegisteredVectorStoreAdapterForTest,\n type ActivateExtensionForTestOptions,\n type AssertProjectProfileOptions,\n type DeactivateExtensionForTestOptions,\n type DescribeExtensionActivationOptions,\n type ExtensionActivationSummary,\n type RenderExtensionHarnessMarkdownOptions,\n type RunRegisteredCommandForTestOptions,\n type RunRegisteredExporterForTestOptions,\n type RunRegisteredHookForTestOptions,\n type RunRegisteredImporterForTestOptions,\n type RunRegisteredMigrationForTestOptions,\n type RunRegisteredSearchProviderForTestOptions,\n type RunRegisteredVectorStoreAdapterForTestOptions,\n type SearchProviderOperationContexts,\n type SearchProviderOperationResults,\n type VectorStoreAdapterOperationContexts,\n type VectorStoreAdapterOperationResults,\n type ExtensionCapabilityUsageAssertion,\n type ExtensionCapabilityUsageExpectation,\n type ExtensionDeactivationExpectation,\n type ExtensionManifestBlueprintMatch,\n type ExtensionTestHarness,\n type PackageManifestExpectation,\n type PackageManifestResourceExpectation,\n type RegisteredCommandContractAssertion,\n type RegisteredCommandContractExpectation,\n type RegisteredCommandOverrideExpectation,\n type RegisteredExporterExpectation,\n type RegisteredFlagsExpectation,\n type RegisteredHookExpectation,\n type RegisteredHookKind,\n type RegisteredImporterExpectation,\n type RegisteredItemFieldAssertion,\n type RegisteredItemFieldExpectation,\n type RegisteredItemTypeAssertion,\n type RegisteredItemTypeExpectation,\n type RegisteredMigrationExpectation,\n type RegisteredParserOverrideExpectation,\n type RegisteredPreflightOverrideExpectation,\n type RegisteredProfileAssertion,\n type RegisteredProfileExpectation,\n type RegisteredRendererOverrideExpectation,\n type RegisteredSearchProviderExpectation,\n type RegisteredServiceOverrideExpectation,\n type RegisteredVectorStoreAdapterExpectation,\n} from \"./testing.js\";\n\n/**\n * Canonical extension capability names accepted by pm.\n *\n * Extension manifests should declare one or more of these values in\n * `capabilities`.\n */\nexport const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;\n/**\n * Restricts extension capability values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];\n\n/**\n * Canonical extension governance policy modes and registration surfaces.\n */\nexport const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;\nexport const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;\nexport const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;\nexport const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;\n/**\n * Restricts extension policy mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];\n/**\n * Restricts extension policy surface values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];\n/**\n * Restricts extension trust mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];\n/**\n * Restricts extension sandbox profile values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionSandboxProfile = (typeof EXTENSION_SANDBOX_PROFILES)[number];\n\n/**\n * Versioned capability contract metadata emitted by runtime diagnostics.\n */\nexport { EXTENSION_CAPABILITY_CONTRACT, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES };\n\n/**\n * Least-privilege capability reconciliation helpers: map declared capabilities\n * against the registration surfaces a package actually exercises at activation.\n */\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"../core/extensions/capability-usage.js\";\n\n/**\n * Render an extension/package activation summary\n * ({@link describeExtensionActivation} / {@link describeExtensionBlueprint}) to a\n * deterministic Markdown reference document — the author-facing *render* leg of\n * the describe verb, for drift-free package READMEs.\n */\nexport {\n renderExtensionSurfaceMarkdown,\n type ExtensionSurfaceMarkdownOptions,\n} from \"../core/extensions/activation-summary-markdown.js\";\n\nexport type {\n AfterCommandAffectedItem,\n AfterCommandHook,\n AfterCommandHookContext,\n BeforeCommandHook,\n BeforeCommandHookContext,\n CommandDefinition,\n ExtensionCommandArgumentDefinition,\n CommandHandler,\n CommandHandlerContext,\n CommandHandlerResult,\n CommandOverride,\n CommandOverrideContext,\n ExtensionServiceName,\n Exporter,\n ExtensionActivationResult,\n ExtensionApi,\n ExtensionCommandRegistry,\n ExtensionDeactivationFailure,\n ExtensionDeactivationOptions,\n ExtensionDeactivationResult,\n ExtensionDiagnostic,\n ExtensionDiscoveryResult,\n ExtensionHookRegistry,\n ExtensionSelfIdentity,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionManifestEngines,\n ExtensionGovernancePolicy,\n ExtensionPolicyOverride,\n ExtensionProvenanceMetadata,\n ExtensionRuntimePermissionDeclaration,\n ExtensionSearchMode,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceRegistry,\n FlagValueType,\n FlagDefinition,\n ImportExportContext,\n ImportExportRegistrationOptions,\n Importer,\n OnIndexHook,\n OnIndexHookContext,\n OnReadHook,\n OnReadHookContext,\n OnWriteHook,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverride,\n ParserOverrideContext,\n ParserOverrideDelta,\n PreflightOverride,\n PreflightOverrideContext,\n PreflightOverrideDelta,\n PreflightRuntimeDecision,\n RegisteredExtensionExporter,\n RegisteredExtensionFlagDefinitions,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionProjectProfile,\n RegisteredExtensionSchemaMigrationDefinition,\n RegisteredExtensionSearchProvider,\n RegisteredExtensionServiceOverride,\n RegisteredExtensionVectorStoreAdapter,\n RendererOverride,\n RendererOverrideContext,\n SchemaFieldDefinition,\n SchemaItemTypeCommandOptionPolicyDefinition,\n SchemaItemTypeOptionDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SchemaMigrationRunContext,\n SchemaMigrationRunner,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderDefinition,\n SearchProviderHit,\n SearchProviderQueryContext,\n SearchProviderQueryResult,\n ServiceOverride,\n ServiceOverrideContext,\n VectorStoreAdapterDefinition,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n VectorStoreUpsertPoint,\n} from \"../core/extensions/loader.js\";\n\nexport type { GlobalOptions } from \"../core/shared/command-types.js\";\nexport type { ItemDocument, ItemFrontMatter, ItemStatus, ItemType, PmSettings } from \"../types/index.js\";\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEM,SAAU,wBAA6D,UAAmB;AAC9F,SAAO;AACT;AAcM,SAAU,qBAAgE,SAAiB;AAC/F,SAAO;AACT;AAUM,SAAU,cAAqD,YAAuB;AAC1F,SAAO;AACT;AAUM,SAAU,WAAyC,MAAW;AAClE,SAAO;AACT;AAQM,SAAU,eAAuD,MAAW;AAChF,SAAO;AACT;AASM,SAAU,gBAAsD,OAAa;AACjF,SAAO;AACT;AASM,SAAU,gBAA8D,WAAqB;AACjG,SAAO;AACT;AASM,SAAU,qBAAiE,UAAmB;AAClG,SAAO;AACT;AASM,SAAU,yBAAwE,SAAiB;AACvG,SAAO;AACT;AASM,SAAU,sBAAsB,UAAyB;AAC7D,SAAO;AACT;AASM,SAAU,qBAAqB,UAAwB;AAC3D,SAAO;AACT;AAQM,SAAU,wBAAwB,UAA2B;AACjE,SAAO;AACT;AASM,SAAU,sBAAsB,UAAyB;AAC7D,SAAO;AACT;AAQM,SAAU,uBAAuB,UAA0B;AAC/D,SAAO;AACT;AASM,SAAU,eAAe,UAAkB;AAC/C,SAAO;AACT;AASM,SAAU,eAAe,UAAkB;AAC/C,SAAO;AACT;AASM,SAAU,wBAAwB,MAAuB;AAC7D,SAAO;AACT;AASM,SAAU,uBAAuB,MAAsB;AAC3D,SAAO;AACT;AAQM,SAAU,kBAAkB,MAAiB;AACjD,SAAO;AACT;AAQM,SAAU,iBAAiB,MAAgB;AAC/C,SAAO;AACT;AASM,SAAU,kBAAkB,MAAiB;AACjD,SAAO;AACT;;;;;;;;;;AC8OO,IAAM,yBAAyB;AAS/B,IAAM,yBAAyB;AAC/B,IAAM,4BAA4B;AAClC,IAAM,wBAAwB;AAC9B,IAAM,6BAA6B;",
4
+ "sourcesContent": ["/**\n * @module sdk/define\n *\n * Authoring-time typed builders for every extension registration surface.\n *\n * These `define*` helpers are the third leg of the SDK ergonomics tripod:\n * {@link ../core/extensions/loader.js#ExtensionApi | `api.register*`} registers\n * a definition at activation, the `assert*`/`run*` testing helpers verify and\n * invoke it, and these builders let authors *write* the definition with full\n * type-checking and editor inference before it ever reaches `activate`.\n *\n * Every builder is a zero-cost identity function that returns its argument\n * unchanged — exactly like the SDK's {@link ./index.js#defineExtension} and the\n * wider `defineConfig`/`defineComponent` ecosystem convention. Extensions are\n * authored fully in TypeScript (ADR pm-2c28); these builders are where that type\n * safety is anchored at the definition site. Their value is entirely at the type\n * level:\n *\n * - A bare `const cmd = { ... }` satisfies the registration type only\n * structurally and widens its literals; `const cmd = defineCommand({ ... })`\n * checks the object against the contract *and* preserves the narrow literal\n * type, while inferring the nested handler's `context` parameter from the\n * builder signature.\n * - Definitions can be colocated, exported, reused, and unit-tested apart from\n * the `activate` call instead of being trapped as inline literals.\n *\n * Object-definition builders use a generic constraint (`<T extends Def>`) so the\n * narrow literal type survives the round-trip, mirroring `defineExtension`.\n * Function-definition builders are intentionally non-generic: a generic\n * constrained to a whole function type suppresses contextual typing of a bare\n * arrow's parameter (it would fall back to implicit `any`), whereas the\n * non-generic signature lets TypeScript type the handler parameter from the\n * declared function type.\n */\nimport type {\n AfterCommandHook,\n BeforeCommandHook,\n CommandDefinition,\n CommandOverride,\n Exporter,\n ExtensionManifest,\n FlagDefinition,\n Importer,\n OnIndexHook,\n OnReadHook,\n OnWriteHook,\n ParserOverride,\n PreflightOverride,\n RendererOverride,\n SchemaFieldDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SearchProviderDefinition,\n ServiceOverride,\n VectorStoreAdapterDefinition,\n} from \"../core/extensions/loader.js\";\nimport type { ProjectProfileDefinition } from \"../core/profile/profile-presets.js\";\n\n/**\n * Type an extension's in-module manifest mirror (the `manifest` export / field).\n *\n * Completes the `define*` family: the manifest is the one authoring surface that\n * otherwise had no builder. Contract-checks the object against\n * {@link ExtensionManifest} where it is authored, catching a missing required\n * field or a mistyped key at edit time instead of at load time. Pair with\n * {@link ./compose.js#deriveExtensionCapabilities | `deriveExtensionCapabilities`}\n * to keep `capabilities` matched to the surfaces the extension actually registers.\n */\nexport function defineExtensionManifest<TManifest extends ExtensionManifest>(manifest: TManifest): TManifest {\n return manifest;\n}\n\n/**\n * Type a project-profile definition for the profile registry.\n *\n * A profile bundles item types, statuses, fields, per-type workflows, config\n * knobs, create templates, and package recommendations into one declarative\n * archetype that `pm profile apply` stages idempotently. This builder checks the\n * object against {@link ProjectProfileDefinition} where it is authored — catching\n * an invalid field type or a malformed workflow at edit time — while preserving\n * the literal `name`/`types`/`statuses` so a package's archetype stays strongly\n * typed at the definition site, mirroring {@link defineItemType}. It is the\n * authoring anchor a first-party or third-party profile package builds on.\n */\nexport function defineProjectProfile<TProfile extends ProjectProfileDefinition>(profile: TProfile): TProfile {\n return profile;\n}\n\n/**\n * Type a command definition for `api.registerCommand(definition)`.\n *\n * Checks the object against {@link CommandDefinition} and infers the `run`\n * handler's `context` parameter while preserving the literal `name`/`action`\n * types. Pass the result straight to `registerCommand`, or export it so the\n * command can be invoked in tests via `runRegisteredCommandForTest`.\n */\nexport function defineCommand<TDefinition extends CommandDefinition>(definition: TDefinition): TDefinition {\n return definition;\n}\n\n/**\n * Type a single flag definition for a `api.registerFlags(command, flags)` array.\n *\n * Authors compose builders into the array\n * (`api.registerFlags(\"list\", [defineFlag({ long: \"--mine\" })])`) to get\n * per-flag contract checking — `value_type`, `list`, and `default` included —\n * instead of validating a loosely-typed literal array all at once.\n */\nexport function defineFlag<TFlag extends FlagDefinition>(flag: TFlag): TFlag {\n return flag;\n}\n\n/**\n * Type a custom item-type definition for `api.registerItemTypes([...])`.\n *\n * Preserves the literal `name`/`folder`/`aliases` so a project archetype's\n * domain types stay strongly typed where the definition is declared and reused.\n */\nexport function defineItemType<TType extends SchemaItemTypeDefinition>(type: TType): TType {\n return type;\n}\n\n/**\n * Type a custom front-matter field definition for `api.registerItemFields([...])`.\n *\n * Checks `name`/`type`/`optional` against {@link SchemaFieldDefinition} while\n * keeping the field's extra metadata (the contract carries an index signature)\n * intact.\n */\nexport function defineItemField<TField extends SchemaFieldDefinition>(field: TField): TField {\n return field;\n}\n\n/**\n * Type a schema migration definition for `api.registerMigration(definition)`.\n *\n * Preserves the literal `id` and, when `run` is provided, infers the migration\n * runner's context, so the same definition can be registered and later exercised\n * through `runRegisteredMigrationForTest`.\n */\nexport function defineMigration<TMigration extends SchemaMigrationDefinition>(migration: TMigration): TMigration {\n return migration;\n}\n\n/**\n * Type a search-provider definition for `api.registerSearchProvider(provider)`.\n *\n * Infers the `query`/`embed`/`embedBatch` operation contexts and result shapes\n * so a custom retrieval backend is type-checked at the definition site and\n * reusable in `runRegisteredSearchProviderForTest`.\n */\nexport function defineSearchProvider<TProvider extends SearchProviderDefinition>(provider: TProvider): TProvider {\n return provider;\n}\n\n/**\n * Type a vector-store adapter definition for `api.registerVectorStoreAdapter(adapter)`.\n *\n * Infers the `query`/`upsert`/`delete` operation contexts so a package that owns\n * its own semantic index storage gets contract checking before activation and a\n * definition it can drive through `runRegisteredVectorStoreAdapterForTest`.\n */\nexport function defineVectorStoreAdapter<TAdapter extends VectorStoreAdapterDefinition>(adapter: TAdapter): TAdapter {\n return adapter;\n}\n\n/**\n * Type a command-override handler for `api.registerCommand(command, override)`.\n *\n * The non-generic signature lets TypeScript contextually type the override's\n * `context` parameter from {@link CommandOverride}, so a bare arrow authored in\n * a `.js` package still gets a fully-typed argument.\n */\nexport function defineCommandOverride(override: CommandOverride): CommandOverride {\n return override;\n}\n\n/**\n * Type a parser-override handler for `api.registerParser(command, override)`.\n *\n * Contextually types the `context` parameter and the returned\n * {@link ParserOverride} delta so an argument-rewriting override is checked\n * where it is written.\n */\nexport function defineParserOverride(override: ParserOverride): ParserOverride {\n return override;\n}\n\n/**\n * Type a preflight-override handler for `api.registerPreflight(override)`.\n *\n * Contextually types the `context` parameter and the returned gate decision so a\n * package's pre-run validation override is checked at the definition site.\n */\nexport function definePreflightOverride(override: PreflightOverride): PreflightOverride {\n return override;\n}\n\n/**\n * Type a service-override handler for `api.registerService(service, override)`.\n *\n * Contextually types the `context` parameter from {@link ServiceOverride} so a\n * package overriding a built-in service (output formatting, embeddings, and the\n * like) keeps its handler argument typed without an explicit annotation.\n */\nexport function defineServiceOverride(override: ServiceOverride): ServiceOverride {\n return override;\n}\n\n/**\n * Type a renderer-override handler for `api.registerRenderer(format, renderer)`.\n *\n * Contextually types the `context` parameter and the `string | null | undefined`\n * return contract so a custom output renderer is checked where it is authored.\n */\nexport function defineRendererOverride(renderer: RendererOverride): RendererOverride {\n return renderer;\n}\n\n/**\n * Type an importer handler for `api.registerImporter(name, importer, options)`.\n *\n * Contextually types the {@link Importer} `context` (registration, args,\n * options, pm root) so the bridge from an external system into the pm context\n * graph is type-checked and reusable in `runRegisteredImporterForTest`.\n */\nexport function defineImporter(importer: Importer): Importer {\n return importer;\n}\n\n/**\n * Type an exporter handler for `api.registerExporter(name, exporter, options)`.\n *\n * Contextually types the {@link Exporter} `context` so the bridge from the pm\n * context graph out to an external system is checked at the definition site and\n * reusable in `runRegisteredExporterForTest`.\n */\nexport function defineExporter(exporter: Exporter): Exporter {\n return exporter;\n}\n\n/**\n * Type a `before_command` hook for `api.hooks.beforeCommand(hook)`.\n *\n * Contextually types the {@link BeforeCommandHook} `context` so a hook that\n * inspects or annotates a command before it runs keeps its argument typed when\n * authored as a standalone, exportable, testable value.\n */\nexport function defineBeforeCommandHook(hook: BeforeCommandHook): BeforeCommandHook {\n return hook;\n}\n\n/**\n * Type an `after_command` hook for `api.hooks.afterCommand(hook)`.\n *\n * Contextually types the {@link AfterCommandHook} `context` — including the\n * `affected` items pm mutated — so the natural place to react to every change\n * (\"project management = context management\") is checked where it is written.\n */\nexport function defineAfterCommandHook(hook: AfterCommandHook): AfterCommandHook {\n return hook;\n}\n\n/**\n * Type an `on_write` hook for `api.hooks.onWrite(hook)`.\n *\n * Contextually types the {@link OnWriteHook} `context` so a hook reacting to\n * item persistence keeps its argument typed without an explicit annotation.\n */\nexport function defineOnWriteHook(hook: OnWriteHook): OnWriteHook {\n return hook;\n}\n\n/**\n * Type an `on_read` hook for `api.hooks.onRead(hook)`.\n *\n * Contextually types the {@link OnReadHook} `context` so a hook augmenting items\n * as they are read is type-checked at the definition site.\n */\nexport function defineOnReadHook(hook: OnReadHook): OnReadHook {\n return hook;\n}\n\n/**\n * Type an `on_index` hook for `api.hooks.onIndex(hook)`.\n *\n * Contextually types the {@link OnIndexHook} `context` so a hook participating\n * in index/search refresh keeps its argument typed even without TypeScript\n * annotations.\n */\nexport function defineOnIndexHook(hook: OnIndexHook): OnIndexHook {\n return hook;\n}\n", "/**\n * @module sdk/index\n *\n * Defines public SDK APIs and package-author helpers for Index.\n */\nimport {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_TRUST_MODES,\n} from \"../core/extensions/loader.js\";\nexport {\n PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,\n PM_PACKAGE_RESOURCE_KINDS,\n collectPackageExtensionDirectories,\n readPmPackageManifest,\n type PmPackageCatalogLinkMap,\n type PmPackageCatalogMediaMap,\n type PmPackageCatalogMetadata,\n type PmPackageManifest,\n type PmPackageResourceKind,\n type PmPackageResourceMap,\n} from \"../core/packages/manifest.js\";\nexport type { CommanderOptionAliasContract, CommanderOptionRegistrationContract } from \"./cli-contracts.js\";\nexport {\n ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,\n APPEND_FLAG_CONTRACTS,\n CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,\n CALENDAR_FLAG_CONTRACTS,\n CLAIM_FLAG_CONTRACTS,\n CLOSE_FLAG_CONTRACTS,\n CLOSE_MANY_FLAG_CONTRACTS,\n CLOSE_TASK_FLAG_CONTRACTS,\n COMMENTS_AUDIT_FLAG_CONTRACTS,\n COMMENTS_FLAG_CONTRACTS,\n COMPLETION_FLAG_CONTRACTS,\n CONFIG_FLAG_CONTRACTS,\n CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n CONTEXT_FLAG_CONTRACTS,\n CONTRACTS_FLAG_CONTRACTS,\n COPY_FLAG_CONTRACTS,\n CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n CREATE_COMMANDER_STRING_OPTION_CONTRACTS,\n CREATE_FLAG_CONTRACTS,\n DELETE_FLAG_CONTRACTS,\n DEDUPE_AUDIT_FLAG_CONTRACTS,\n DEDUPE_MERGE_FLAG_CONTRACTS,\n DEPS_FLAG_CONTRACTS,\n DOCS_FLAG_CONTRACTS,\n EVAL_FLAG_CONTRACTS,\n EXTENSION_ACTIVATE_FLAG_CONTRACTS,\n EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,\n EXTENSION_ADOPT_FLAG_CONTRACTS,\n EXTENSION_CATALOG_FLAG_CONTRACTS,\n EXTENSION_DEACTIVATE_FLAG_CONTRACTS,\n EXTENSION_DESCRIBE_FLAG_CONTRACTS,\n EXTENSION_DOCTOR_FLAG_CONTRACTS,\n EXTENSION_EXPLORE_FLAG_CONTRACTS,\n EXTENSION_FLAG_CONTRACTS,\n EXTENSION_INIT_FLAG_CONTRACTS,\n EXTENSION_INSTALL_FLAG_CONTRACTS,\n EXTENSION_MANAGE_FLAG_CONTRACTS,\n EXTENSION_RELOAD_FLAG_CONTRACTS,\n EXTENSION_SCOPE_FLAG_CONTRACTS,\n EXTENSION_UNINSTALL_FLAG_CONTRACTS,\n FILES_FLAG_CONTRACTS,\n FOCUS_FLAG_CONTRACTS,\n GC_FLAG_CONTRACTS,\n GET_FLAG_CONTRACTS,\n GLOBAL_FLAG_CONTRACTS,\n GUIDE_FLAG_CONTRACTS,\n HEALTH_FLAG_CONTRACTS,\n HISTORY_COMPACT_FLAG_CONTRACTS,\n HISTORY_FLAG_CONTRACTS,\n HISTORY_REDACT_FLAG_CONTRACTS,\n HISTORY_REPAIR_FLAG_CONTRACTS,\n INIT_FLAG_CONTRACTS,\n INSTALL_FLAG_CONTRACTS,\n LEARNINGS_FLAG_CONTRACTS,\n LIST_COMMANDER_STRING_OPTION_CONTRACTS,\n LIST_FILTER_FLAG_CONTRACTS,\n MEET_FLAG_CONTRACTS,\n NEXT_COMMANDER_STRING_OPTION_CONTRACTS,\n NEXT_FLAG_CONTRACTS,\n NORMALIZE_FLAG_CONTRACTS,\n NOTES_FLAG_CONTRACTS,\n PACKAGE_FLAG_CONTRACTS,\n PACKAGE_INIT_FLAG_CONTRACTS,\n PAUSE_TASK_FLAG_CONTRACTS,\n PLAN_FLAG_CONTRACTS,\n PM_CORE_COMMAND_NAMES,\n PM_EXTENSION_CAPABILITY_CONTRACTS,\n PM_EXTENSION_POLICY_MODE_CONTRACTS,\n PM_EXTENSION_POLICY_SURFACE_CONTRACTS,\n PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,\n PM_EXTENSION_SERVICE_NAME_CONTRACTS,\n PM_EXTENSION_TRUST_MODE_CONTRACTS,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,\n PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,\n PM_TOOL_ACTIONS,\n PM_TOOL_ACTION_PARAMETER_CONTRACTS,\n PM_TOOL_PARAMETERS_SCHEMA,\n PM_TOOL_PARAMETERS_SCHEMA_MAJOR,\n PM_TOOL_PARAMETERS_SCHEMA_VERSION,\n PROFILE_FLAG_CONTRACTS,\n REINDEX_FLAG_CONTRACTS,\n RELEASE_FLAG_CONTRACTS,\n REMIND_FLAG_CONTRACTS,\n RESTORE_FLAG_CONTRACTS,\n SCHEMA_FLAG_CONTRACTS,\n SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,\n SEARCH_FLAG_CONTRACTS,\n START_TASK_FLAG_CONTRACTS,\n STATS_FLAG_CONTRACTS,\n SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,\n TELEMETRY_FLAG_CONTRACTS,\n TEST_ALL_FLAG_CONTRACTS,\n TEST_FLAG_CONTRACTS,\n TEST_RUNS_FLAG_CONTRACTS,\n TOOL_ACTIVITY_OPTION_CONTRACTS,\n TOOL_AGGREGATE_OPTION_CONTRACTS,\n TOOL_CALENDAR_OPTION_CONTRACTS,\n TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_CONTEXT_OPTION_CONTRACTS,\n TOOL_CREATE_OPTION_CONTRACTS,\n TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS,\n TOOL_DEPS_OPTION_CONTRACTS,\n TOOL_LIST_FILTER_OPTION_CONTRACTS,\n TOOL_NORMALIZE_FILTER_OPTION_CONTRACTS,\n TOOL_SEARCH_FILTER_OPTION_CONTRACTS,\n TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,\n TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,\n TOOL_UPDATE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,\n UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,\n UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,\n UPDATE_FLAG_CONTRACTS,\n UPDATE_MANY_FLAG_CONTRACTS,\n UPGRADE_FLAG_CONTRACTS,\n compactFlagAliasContracts,\n isPmExtensionCapabilityContract,\n isPmExtensionPolicyModeContract,\n isPmExtensionPolicySurfaceContract,\n isPmExtensionServiceNameContract,\n isPmToolAction,\n readFirstStringFromCommanderOptions,\n readFirstValueFromCommanderOptions,\n readStringArrayFromCommanderOptions,\n resolveSubcommandFlagContractsForCommand,\n toCompletionFlagString,\n withFlagAliasMetadata,\n} from \"./cli-contracts.js\";\nexport type {\n CliFlagContract,\n PmActionSchemaContract,\n PmExtensionCapabilityContract,\n PmExtensionPolicyModeContract,\n PmExtensionPolicySurfaceContract,\n PmExtensionSandboxProfileContract,\n PmExtensionServiceNameContract,\n PmExtensionTrustModeContract,\n PmToolAction,\n ToolOptionFlagContract,\n} from \"./cli-contracts.js\";\nexport * from \"./compose.js\";\nexport * from \"./define.js\";\nexport {\n BASELINE_ITEM_FORMAT_VERSION,\n BUILTIN_ITEM_TYPE_VALUES,\n CONFIDENCE_TEXT_VALUES,\n CURRENT_ITEM_FORMAT_VERSION,\n DEPENDENCY_KIND_VALUES,\n EXIT_CODE,\n ISSUE_SEVERITY_VALUES,\n ITEM_TYPE_VALUES,\n PM_CLI_EXPECTED_ERROR_NAME,\n PmCliError,\n PmClient,\n RISK_VALUES,\n STATUS_VALUES,\n acquireLock,\n appendHistoryEntry,\n canonicalDocument,\n classifyItemFormatVersion,\n clearWorkspaceContractsCache,\n commitImportedItem,\n createHistoryEntry,\n createPmCliExpectedError,\n effectiveItemFormatVersion,\n emptyImportedDocument,\n ensureTrackerInitialized,\n generateItemId,\n getActiveExtensionRegistrations,\n getContracts,\n getHistoryPath,\n getItemPath,\n getSettingsPath,\n getWorkspaceContracts,\n isPmCliExpectedError,\n isTimestampLiteral,\n listAllFrontMatter,\n loadCreateTemplateOptions,\n locateItem,\n normalizeFrontMatter,\n normalizeItemFormatVersion,\n normalizeItemId,\n normalizeRawItemId,\n normalizeStatusInput,\n nowIso,\n parseTags,\n pathExists,\n readBooleanOption,\n readCsvListOption,\n readFileIfExists,\n readLocatedItem,\n readRequiredString,\n readSettings,\n readStringOption,\n removeFileIfExists,\n renderCalendarMarkdown,\n renderCalendarToon,\n renderGuideMarkdown,\n resolveCalendarOutputFormat,\n resolveGuideOutputFormat,\n resolveItemTypeRegistry,\n resolvePmRoot,\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n runAction,\n runActiveOnReadHooks,\n runActiveOnWriteHooks,\n runCalendar,\n runCommentsAudit,\n runCompletion,\n runDedupeAudit,\n runDedupeMerge,\n runGuide,\n runNormalize,\n runReindex,\n runSearch,\n runTemplatesList,\n runTemplatesSave,\n runTemplatesShow,\n runTestRunsList,\n runTestRunsLogs,\n runTestRunsResume,\n runTestRunsStatus,\n runTestRunsStop,\n scanItemFormatVersions,\n selectImportAuthor,\n serializeItemDocument,\n splitFrontMatter,\n toEstimatedMinutesValue,\n toImportBoolean,\n toImportConfidence,\n toImportInteger,\n toImportLinkedDocs,\n toImportLinkedFiles,\n toImportLinkedTests,\n toImportLogEntries,\n toImportNormalizedEnum,\n toImportNumberMap,\n toImportPriority,\n toImportStatus,\n toImportStringList,\n toImportStringMap,\n toImportTags,\n toNonEmptyImportString,\n writeFileAtomic,\n aggregate,\n claim,\n close,\n closeTask,\n context,\n copy,\n create,\n deleteItem,\n extension,\n extensionActivate,\n extensionDeactivate,\n extensionList,\n focus,\n get,\n list,\n next,\n packageActivate,\n packageCatalog,\n packageDeactivate,\n packageDescribe,\n packageDoctor,\n packageInstall,\n packageLifecycle,\n packageList,\n packageManage,\n packageReload,\n packageUninstall,\n pauseTask,\n release,\n restore,\n search,\n startTask,\n stats,\n update,\n upgrade,\n type AggregateOptions,\n type AggregateResult,\n type AggregateRow,\n type BlockerEntry,\n type CalendarOptions,\n type CalendarResult,\n type CommentsAuditEntry,\n type CommentsAuditHistoryRow,\n type CommentsAuditOptions,\n type CommentsAuditResult,\n type CommentsAuditSummary,\n type CommentsAuditTypeSummary,\n type CommitImportedItemParams,\n type CommitImportedItemResult,\n type CompletionResult,\n type CompletionShell,\n type ContractsCommandOptions,\n type ContractsResult,\n type ContextFocusItem,\n type ContextOptions,\n type ContextOutputFormat,\n type ContextResult,\n type CreatePmCliExpectedErrorOptions,\n type CreateTemplateOptions,\n type DedupeAuditCandidate,\n type DedupeAuditCluster,\n type DedupeAuditOptions,\n type DedupeAuditResult,\n type DedupeMergeChildReparent,\n type DedupeMergeCloseAction,\n type DedupeMergeDuplicateOutcome,\n type DedupeMergeOptions,\n type DedupeMergeResult,\n type Dependency,\n type ExtensionCommandOptions,\n type ExtensionCommandResult,\n type GetContractsOptions,\n type GetOptions,\n type GetResult,\n type GuideDepth,\n type GuideOptions,\n type GuideOutputFormat,\n type GuideResult,\n type ImportLinkedScope,\n type ItemFormatVersionScanEntry,\n type ItemFormatVersionScanResult,\n type ItemFormatVersionStatus,\n type ItemMetadata,\n type LinkedDoc,\n type LinkedFile,\n type LinkedTest,\n type ListedItem,\n type ListCompactResult,\n type ListOptions,\n type ListResult,\n type ListSortField,\n type ListSortOrder,\n type ListVerboseResult,\n type LogNote,\n type NextActionableItem,\n type NextBlockerRef,\n type NextOptions,\n type NextOutputFormat,\n type NextRecommendation,\n type NextResult,\n type NormalizeCommandOptions,\n type NormalizeResult,\n type PackageCommandOptions,\n type PackageCommandResult,\n type PmActionInput,\n type PmActionName,\n type PmActionOptions,\n type PmClientMutationOptions,\n type PmClientOptions,\n type PmClientRunArgs,\n type PmCliExpectedError,\n type ReindexOptions,\n type ReindexResult,\n type SearchCompactResult,\n type SearchHit,\n type SearchHitHighlight,\n type SearchMatchMode,\n type SearchOptions,\n type SearchResult,\n type SearchResultItem,\n type SearchVerboseResult,\n type StatsCommandOptions,\n type StatsResult,\n type TemplatesListResult,\n type TemplatesSaveResult,\n type TemplatesShowResult,\n type TestRunsListCommandOptions,\n type TestRunsLogsCommandOptions,\n type TestRunsResumeCommandOptions,\n type TestRunsStopCommandOptions,\n type ToImportLinkedArtifactsOptions,\n type ToImportLinkedTestsOptions,\n type ToImportLogEntriesOptions,\n type UpgradeCommandOptions,\n type UpgradeResult,\n type WorkspaceContracts,\n type WorkspaceContractsOptions,\n} from \"./runtime.js\";\nexport {\n BUILTIN_PROFILES,\n listProfiles,\n normalizeProfileName,\n PROFILE_NAMES,\n resolveProfile,\n type ProfileConfigEntry,\n type ProfileName,\n type ProfilePackageRecommendation,\n type ProfileTemplateEntry,\n type ProfileTemplateOptions,\n type ProjectProfileDefinition,\n type ProjectProfileRegistrationInput,\n} from \"../core/profile/profile-presets.js\";\nexport {\n planProfileApplication,\n type ProfileApplicationPlan,\n type ProfileChangeStatus,\n type ProfileComponentChange,\n type ProfileConfigChange,\n type ProfileConfigPlan,\n type ProfileCurrentState,\n type ProfilePackagePlan,\n type ProfileSchemaPlan,\n type ProfileTemplateChange,\n type ProfileTemplatePlan,\n type ProfileWorkflowChange,\n type ProfileWorkflowPlan,\n} from \"../core/profile/profile-plan.js\";\nexport {\n describeProfileComposition,\n describeProjectProfile,\n type ProjectProfileComposition,\n type ProjectProfileDescription,\n type ProjectProfilePackageSummary,\n} from \"../core/profile/profile-describe.js\";\nexport {\n lintProjectProfile,\n PROFILE_LINT_CODES,\n PROFILE_LINT_DIMENSIONS,\n type ProfileLintCode,\n type ProfileLintDimension,\n type ProfileLintSeverity,\n type ProjectProfileLintFinding,\n type ProjectProfileLintReport,\n} from \"../core/profile/profile-lint.js\";\nexport {\n assertExtensionBlueprint,\n assertExtensionCapabilityUsage,\n assertExtensionDeactivated,\n assertExtensionManifestCompatible,\n assertExtensionManifestMatchesBlueprint,\n assertExtensionPreflight,\n assertPackageManifest,\n assertProjectProfile,\n assertRegisteredCommandContract,\n assertRegisteredCommandOverride,\n assertRegisteredExporter,\n assertRegisteredFlags,\n assertRegisteredHook,\n assertRegisteredImporter,\n assertRegisteredItemField,\n assertRegisteredItemType,\n assertRegisteredMigration,\n assertRegisteredParserOverride,\n assertRegisteredPreflightOverride,\n assertRegisteredProfile,\n assertRegisteredRendererOverride,\n assertRegisteredSearchProvider,\n assertRegisteredServiceOverride,\n assertRegisteredVectorStoreAdapter,\n activateExtensionForTest,\n createExtensionTestHarness,\n deactivateExtensionForTest,\n describeExtensionActivation,\n runRegisteredCommandForTest,\n runRegisteredCommandOverrideForTest,\n runRegisteredExporterForTest,\n runRegisteredHookForTest,\n runRegisteredImporterForTest,\n runRegisteredMigrationForTest,\n runRegisteredParserOverrideForTest,\n runRegisteredPreflightOverrideForTest,\n runRegisteredRendererOverrideForTest,\n runRegisteredSearchProviderForTest,\n runRegisteredServiceOverrideForTest,\n runRegisteredVectorStoreAdapterForTest,\n type ActivateExtensionForTestOptions,\n type AssertProjectProfileOptions,\n type DeactivateExtensionForTestOptions,\n type DescribeExtensionActivationOptions,\n type ExtensionActivationSummary,\n type RenderExtensionHarnessMarkdownOptions,\n type RunRegisteredCommandForTestOptions,\n type RunRegisteredExporterForTestOptions,\n type RunRegisteredHookForTestOptions,\n type RunRegisteredImporterForTestOptions,\n type RunRegisteredMigrationForTestOptions,\n type RunRegisteredSearchProviderForTestOptions,\n type RunRegisteredVectorStoreAdapterForTestOptions,\n type SearchProviderOperationContexts,\n type SearchProviderOperationResults,\n type VectorStoreAdapterOperationContexts,\n type VectorStoreAdapterOperationResults,\n type ExtensionCapabilityUsageAssertion,\n type ExtensionCapabilityUsageExpectation,\n type ExtensionDeactivationExpectation,\n type ExtensionManifestBlueprintMatch,\n type ExtensionTestHarness,\n type PackageManifestExpectation,\n type PackageManifestResourceExpectation,\n type RegisteredCommandContractAssertion,\n type RegisteredCommandContractExpectation,\n type RegisteredCommandOverrideExpectation,\n type RegisteredExporterExpectation,\n type RegisteredFlagsExpectation,\n type RegisteredHookExpectation,\n type RegisteredHookKind,\n type RegisteredImporterExpectation,\n type RegisteredItemFieldAssertion,\n type RegisteredItemFieldExpectation,\n type RegisteredItemTypeAssertion,\n type RegisteredItemTypeExpectation,\n type RegisteredMigrationExpectation,\n type RegisteredParserOverrideExpectation,\n type RegisteredPreflightOverrideExpectation,\n type RegisteredProfileAssertion,\n type RegisteredProfileExpectation,\n type RegisteredRendererOverrideExpectation,\n type RegisteredSearchProviderExpectation,\n type RegisteredServiceOverrideExpectation,\n type RegisteredVectorStoreAdapterExpectation,\n} from \"./testing.js\";\n\n/**\n * Canonical extension capability names accepted by pm.\n *\n * Extension manifests should declare one or more of these values in\n * `capabilities`.\n */\nexport const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;\n/**\n * Restricts extension capability values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];\n\n/**\n * Canonical extension governance policy modes and registration surfaces.\n */\nexport const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;\nexport const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;\nexport const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;\nexport const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;\n/**\n * Restricts extension policy mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];\n/**\n * Restricts extension policy surface values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];\n/**\n * Restricts extension trust mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];\n/**\n * Restricts extension sandbox profile values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionSandboxProfile = (typeof EXTENSION_SANDBOX_PROFILES)[number];\n\n/**\n * Versioned capability contract metadata emitted by runtime diagnostics.\n */\nexport { EXTENSION_CAPABILITY_CONTRACT, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES };\n\n/**\n * Least-privilege capability reconciliation helpers: map declared capabilities\n * against the registration surfaces a package actually exercises at activation.\n */\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"../core/extensions/capability-usage.js\";\n\n/**\n * Render an extension/package activation summary\n * ({@link describeExtensionActivation} / {@link describeExtensionBlueprint}) to a\n * deterministic Markdown reference document — the author-facing *render* leg of\n * the describe verb, for drift-free package READMEs.\n */\nexport {\n renderExtensionSurfaceMarkdown,\n type ExtensionSurfaceMarkdownOptions,\n} from \"../core/extensions/activation-summary-markdown.js\";\n\nexport type {\n AfterCommandAffectedItem,\n AfterCommandHook,\n AfterCommandHookContext,\n BeforeCommandHook,\n BeforeCommandHookContext,\n CommandDefinition,\n ExtensionCommandArgumentDefinition,\n CommandHandler,\n CommandHandlerContext,\n CommandHandlerResult,\n CommandOverride,\n CommandOverrideContext,\n ExtensionServiceName,\n Exporter,\n ExtensionActivationResult,\n ExtensionApi,\n ExtensionCommandRegistry,\n ExtensionDeactivationFailure,\n ExtensionDeactivationOptions,\n ExtensionDeactivationResult,\n ExtensionDiagnostic,\n ExtensionDiscoveryResult,\n ExtensionHookRegistry,\n ExtensionSelfIdentity,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionManifestEngines,\n ExtensionGovernancePolicy,\n ExtensionPolicyOverride,\n ExtensionProvenanceMetadata,\n ExtensionRuntimePermissionDeclaration,\n ExtensionSearchMode,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceRegistry,\n FlagValueType,\n FlagDefinition,\n ImportExportContext,\n ImportExportRegistrationOptions,\n Importer,\n OnIndexHook,\n OnIndexHookContext,\n OnReadHook,\n OnReadHookContext,\n OnWriteHook,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverride,\n ParserOverrideContext,\n ParserOverrideDelta,\n PreflightOverride,\n PreflightOverrideContext,\n PreflightOverrideDelta,\n PreflightRuntimeDecision,\n RegisteredExtensionExporter,\n RegisteredExtensionFlagDefinitions,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionProjectProfile,\n RegisteredExtensionSchemaMigrationDefinition,\n RegisteredExtensionSearchProvider,\n RegisteredExtensionServiceOverride,\n RegisteredExtensionVectorStoreAdapter,\n RendererOverride,\n RendererOverrideContext,\n SchemaFieldDefinition,\n SchemaItemTypeCommandOptionPolicyDefinition,\n SchemaItemTypeOptionDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SchemaMigrationRunContext,\n SchemaMigrationRunner,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderDefinition,\n SearchProviderHit,\n SearchProviderQueryContext,\n SearchProviderQueryResult,\n ServiceOverride,\n ServiceOverrideContext,\n VectorStoreAdapterDefinition,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n VectorStoreUpsertPoint,\n} from \"../core/extensions/loader.js\";\n\nexport type { GlobalOptions } from \"../core/shared/command-types.js\";\nexport type { ItemDocument, ItemFrontMatter, ItemStatus, ItemType, PmSettings } from \"../types/index.js\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEM,SAAU,wBAA6D,UAAmB;AAC9F,SAAO;AACT;AAcM,SAAU,qBAAgE,SAAiB;AAC/F,SAAO;AACT;AAUM,SAAU,cAAqD,YAAuB;AAC1F,SAAO;AACT;AAUM,SAAU,WAAyC,MAAW;AAClE,SAAO;AACT;AAQM,SAAU,eAAuD,MAAW;AAChF,SAAO;AACT;AASM,SAAU,gBAAsD,OAAa;AACjF,SAAO;AACT;AASM,SAAU,gBAA8D,WAAqB;AACjG,SAAO;AACT;AASM,SAAU,qBAAiE,UAAmB;AAClG,SAAO;AACT;AASM,SAAU,yBAAwE,SAAiB;AACvG,SAAO;AACT;AASM,SAAU,sBAAsB,UAAyB;AAC7D,SAAO;AACT;AASM,SAAU,qBAAqB,UAAwB;AAC3D,SAAO;AACT;AAQM,SAAU,wBAAwB,UAA2B;AACjE,SAAO;AACT;AASM,SAAU,sBAAsB,UAAyB;AAC7D,SAAO;AACT;AAQM,SAAU,uBAAuB,UAA0B;AAC/D,SAAO;AACT;AASM,SAAU,eAAe,UAAkB;AAC/C,SAAO;AACT;AASM,SAAU,eAAe,UAAkB;AAC/C,SAAO;AACT;AASM,SAAU,wBAAwB,MAAuB;AAC7D,SAAO;AACT;AASM,SAAU,uBAAuB,MAAsB;AAC3D,SAAO;AACT;AAQM,SAAU,kBAAkB,MAAiB;AACjD,SAAO;AACT;AAQM,SAAU,iBAAiB,MAAgB;AAC/C,SAAO;AACT;AASM,SAAU,kBAAkB,MAAiB;AACjD,SAAO;AACT;;;;;;;;;;ACoQO,IAAM,yBAAyB;AAS/B,IAAM,yBAAyB;AAC/B,IAAM,4BAA4B;AAClC,IAAM,wBAAwB;AAC9B,IAAM,6BAA6B;",
6
6
  "names": []
7
7
  }
@@ -1114,6 +1114,7 @@ export interface DiscoverExtensionsOptions {
1114
1114
  settings: PmSettings;
1115
1115
  cwd?: string;
1116
1116
  noExtensions?: boolean;
1117
+ ignoreGlobalExtensions?: boolean;
1117
1118
  reload_token?: string;
1118
1119
  cache_bust?: boolean;
1119
1120
  /**
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0fdb02e4-60e7-5f4c-9f06-d2ec2f03f792")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3e44d901-11ef-5bb5-b0bf-37576240fe79")}catch(e){}}();
3
3
  export const KNOWN_EXTENSION_CAPABILITIES = [
4
4
  "commands",
5
5
  "renderers",
@@ -83,4 +83,4 @@ export function createDefaultExtensionGovernancePolicy() {
83
83
  };
84
84
  }
85
85
  //# sourceMappingURL=extension-types.js.map
86
- //# debugId=0fdb02e4-60e7-5f4c-9f06-d2ec2f03f792
86
+ //# debugId=3e44d901-11ef-5bb5-b0bf-37576240fe79
@@ -1 +1 @@
1
- {"version":3,"file":"extension-types.js","sources":["core/extensions/extension-types.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/extension-types\n *\n * Implements extension runtime contracts and governance for Extension Types.\n */\nimport type {\n ExtensionPolicyOverrideSettings,\n ExtensionPolicySettings,\n ItemDocument,\n ItemFrontMatter,\n ItemStatus,\n PmSettings,\n} from \"../../types/index.js\";\nimport type { GlobalOptions } from \"../shared/command-types.js\";\nimport type { ProjectProfileDefinition, ProjectProfileRegistrationInput } from \"../profile/profile-presets.js\";\n\nexport const KNOWN_EXTENSION_CAPABILITIES = [\n \"commands\",\n \"renderers\",\n \"hooks\",\n \"schema\",\n \"importers\",\n \"search\",\n \"parser\",\n \"preflight\",\n \"services\",\n] as const;\n/**\n * Restricts extension capability values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionCapability = (typeof KNOWN_EXTENSION_CAPABILITIES)[number];\nexport const EXTENSION_CAPABILITY_CONTRACT_VERSION = 2;\nexport const EXTENSION_CAPABILITY_LEGACY_ALIASES: Readonly<Record<string, ExtensionCapability>> = Object.freeze({\n migration: \"schema\",\n validation: \"schema\",\n});\nexport const EXTENSION_CAPABILITY_CONTRACT = Object.freeze({\n version: EXTENSION_CAPABILITY_CONTRACT_VERSION,\n capabilities: [...KNOWN_EXTENSION_CAPABILITIES],\n legacy_aliases: { ...EXTENSION_CAPABILITY_LEGACY_ALIASES },\n});\n\nexport const KNOWN_EXTENSION_POLICY_MODES = [\"off\", \"warn\", \"enforce\"] as const;\n/**\n * Restricts extension policy mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicyMode = (typeof KNOWN_EXTENSION_POLICY_MODES)[number];\nexport const KNOWN_EXTENSION_TRUST_MODES = [\"off\", \"warn\", \"enforce\"] as const;\n/**\n * Restricts extension trust mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionTrustMode = (typeof KNOWN_EXTENSION_TRUST_MODES)[number];\nexport const KNOWN_EXTENSION_SANDBOX_PROFILES = [\"none\", \"restricted\", \"strict\"] as const;\n/**\n * Restricts extension sandbox profile values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionSandboxProfile = (typeof KNOWN_EXTENSION_SANDBOX_PROFILES)[number];\n\nexport const KNOWN_PM_MAX_VERSION_EXCEEDED_MODES = [\"block\", \"warn\"] as const;\n/** How a `pm_max_version` violation is handled for an extension layer. */\nexport type PmMaxVersionExceededMode = (typeof KNOWN_PM_MAX_VERSION_EXCEEDED_MODES)[number];\n/** Optional per-layer override map for `extensions.policy.pm_max_version_exceeded_mode`. */\nexport interface PmMaxVersionExceededModeByLayer {\n global?: PmMaxVersionExceededMode;\n project?: PmMaxVersionExceededMode;\n}\n/**\n * Settings value for `extensions.policy.pm_max_version_exceeded_mode`: either a\n * single mode applied to both layers, or a per-layer override map. Unset (and\n * any unset layer key) defaults to `\"block\"`.\n */\nexport type PmMaxVersionExceededModeSetting = PmMaxVersionExceededMode | PmMaxVersionExceededModeByLayer;\n\nexport const KNOWN_EXTENSION_POLICY_SURFACES = [\n \"commands.override\",\n \"commands.handler\",\n \"hooks.beforecommand\",\n \"hooks.aftercommand\",\n \"hooks.onwrite\",\n \"hooks.onread\",\n \"hooks.onindex\",\n \"schema.flags\",\n \"schema.itemfields\",\n \"schema.itemtypes\",\n \"schema.migrations\",\n \"schema.profiles\",\n \"parser.override\",\n \"preflight.override\",\n \"services.override\",\n \"renderers.override\",\n \"importers.importer\",\n \"importers.exporter\",\n \"search.provider\",\n \"search.vectorstore\",\n] as const;\n/**\n * Restricts extension policy surface values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicySurface = (typeof KNOWN_EXTENSION_POLICY_SURFACES)[number];\n\nexport const KNOWN_EXTENSION_SERVICE_NAMES = [\n \"output_format\",\n \"error_format\",\n \"help_format\",\n \"lock_acquire\",\n \"lock_release\",\n \"history_append\",\n \"item_store_write\",\n \"item_store_delete\",\n] as const;\n/**\n * Restricts extension service name values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionServiceName = (typeof KNOWN_EXTENSION_SERVICE_NAMES)[number];\n\n/**\n * Documents the extension provenance metadata payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionProvenanceMetadata {\n source?: string;\n signature?: string;\n attestation?: string;\n verified?: boolean;\n}\n\n/**\n * Documents the extension runtime permission declaration payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionRuntimePermissionDeclaration {\n fs_read?: boolean;\n fs_write?: boolean;\n network?: boolean;\n env_read?: boolean;\n env_write?: boolean;\n process_spawn?: boolean;\n}\n\n/**\n * Documents the extension activation metadata payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionActivationMetadata {\n commands?: string[];\n}\n\n/**\n * Restricts extension policy override values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicyOverride = ExtensionPolicyOverrideSettings;\n/**\n * Extension governance policy as read from / serialized to settings. Extends the\n * stored settings shape with `pm_max_version_exceeded_mode` (pm-k5e8), which\n * relaxes the default-BLOCK on `pm_max_version` violations to warn-only —\n * globally or per extension layer.\n */\nexport type ExtensionGovernancePolicy = ExtensionPolicySettings & {\n pm_max_version_exceeded_mode?: PmMaxVersionExceededModeSetting;\n};\n\n/**\n * Documents the extension manifest engines payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionManifestEngines {\n pm?: string;\n node?: string;\n [engine: string]: string | undefined;\n}\n\n/**\n * Implements create default extension governance policy for the public runtime surface of this module.\n */\nexport function createDefaultExtensionGovernancePolicy(): ExtensionGovernancePolicy {\n return {\n mode: \"off\",\n trust_mode: \"off\",\n require_provenance: false,\n trusted_extensions: [],\n default_sandbox_profile: \"none\",\n allowed_extensions: [],\n blocked_extensions: [],\n allowed_capabilities: [],\n blocked_capabilities: [],\n allowed_surfaces: [],\n blocked_surfaces: [],\n allowed_commands: [],\n blocked_commands: [],\n allowed_actions: [],\n blocked_actions: [],\n allowed_services: [],\n blocked_services: [],\n extension_overrides: [],\n };\n}\n\n/**\n * Restricts extension layer values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionLayer = \"global\" | \"project\";\n/**\n * Restricts extension status values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionStatus = \"ok\" | \"warn\";\n\n/**\n * Documents the extension manifest payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionManifest {\n name: string;\n version: string;\n entry: string;\n priority: number;\n capabilities: string[];\n manifest_version?: number;\n pm_min_version?: string;\n pm_max_version?: string;\n engines?: ExtensionManifestEngines;\n trusted?: boolean;\n provenance?: ExtensionProvenanceMetadata;\n sandbox_profile?: ExtensionSandboxProfile;\n permissions?: ExtensionRuntimePermissionDeclaration;\n activation?: ExtensionActivationMetadata;\n legacy_capability_aliases?: LegacyExtensionCapabilityAliasMapping[];\n}\n\n/**\n * Documents the extension diagnostic payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDiagnostic {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n name: string | null;\n version: string | null;\n entry: string | null;\n priority: number | null;\n entry_path: string | null;\n enabled: boolean | null;\n status: ExtensionStatus;\n}\n\n/**\n * Documents the effective extension payload exchanged by command, SDK, and package integrations.\n */\nexport interface EffectiveExtension {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n name: string;\n source_package?: string;\n version: string;\n entry: string;\n priority: number;\n entry_path: string;\n manifest_version?: number;\n pm_min_version?: string;\n pm_max_version?: string;\n engines?: ExtensionManifestEngines;\n trusted?: boolean;\n provenance?: ExtensionProvenanceMetadata;\n sandbox_profile?: ExtensionSandboxProfile;\n permissions?: ExtensionRuntimePermissionDeclaration;\n capabilities?: string[];\n activation?: ExtensionActivationMetadata;\n}\n\n/**\n * Documents the extension discovery result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDiscoveryResult {\n disabled_by_flag: boolean;\n roots: {\n global: string;\n project: string;\n };\n configured_enabled: string[];\n configured_disabled: string[];\n discovered: ExtensionDiagnostic[];\n effective: EffectiveExtension[];\n warnings: string[];\n policy: ExtensionGovernancePolicy;\n}\n\n/**\n * Documents the loaded extension payload exchanged by command, SDK, and package integrations.\n */\nexport interface LoadedExtension extends EffectiveExtension {\n module: unknown;\n}\n\n/**\n * Documents the failed extension load payload exchanged by command, SDK, and package integrations.\n */\nexport interface FailedExtensionLoad {\n layer: ExtensionLayer;\n name: string;\n entry_path: string;\n error: string;\n}\n\n/**\n * Documents the extension load result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionLoadResult extends ExtensionDiscoveryResult {\n loaded: LoadedExtension[];\n failed: FailedExtensionLoad[];\n}\n\n/**\n * Documents the before command hook context payload exchanged by command, SDK, and package integrations.\n */\nexport interface BeforeCommandHookContext {\n command: string;\n args: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root: string;\n}\n\n/**\n * Documents the after command hook context payload exchanged by command, SDK, and package integrations.\n */\nexport interface AfterCommandHookContext extends BeforeCommandHookContext {\n ok: boolean;\n error?: string;\n result?: unknown;\n affected?: AfterCommandAffectedItem[];\n}\n\n/**\n * Documents the after command affected item payload exchanged by command, SDK, and package integrations.\n */\nexport interface AfterCommandAffectedItem {\n id: string;\n op?: string;\n item_type?: string;\n previous_status?: ItemStatus;\n status?: ItemStatus;\n previous?: Partial<ItemFrontMatter>;\n current?: Partial<ItemFrontMatter>;\n changed_fields?: string[];\n}\n\n/**\n * Documents the on write hook context payload exchanged by command, SDK, and package integrations.\n */\nexport interface OnWriteHookContext {\n path: string;\n scope: \"project\" | \"global\";\n op: string;\n item_id?: string;\n item_type?: string;\n before?: ItemDocument;\n after?: ItemDocument;\n changed_fields?: string[];\n}\n\n/**\n * Documents the on read hook context payload exchanged by command, SDK, and package integrations.\n */\nexport interface OnReadHookContext {\n path: string;\n scope: \"project\" | \"global\";\n}\n\n/**\n * Documents the on index hook context payload exchanged by command, SDK, and package integrations.\n */\nexport interface OnIndexHookContext {\n mode: string;\n total_items?: number;\n}\n\n/**\n * Restricts before command hook values accepted by command, SDK, and storage contracts.\n */\nexport type BeforeCommandHook = (context: BeforeCommandHookContext) => Promise<void> | void;\n/**\n * Restricts after command hook values accepted by command, SDK, and storage contracts.\n */\nexport type AfterCommandHook = (context: AfterCommandHookContext) => Promise<void> | void;\n/**\n * Restricts on write hook values accepted by command, SDK, and storage contracts.\n */\nexport type OnWriteHook = (context: OnWriteHookContext) => Promise<void> | void;\n/**\n * Restricts on read hook values accepted by command, SDK, and storage contracts.\n */\nexport type OnReadHook = (context: OnReadHookContext) => Promise<void> | void;\n/**\n * Restricts on index hook values accepted by command, SDK, and storage contracts.\n */\nexport type OnIndexHook = (context: OnIndexHookContext) => Promise<void> | void;\n/**\n * Restricts output renderer format values accepted by command, SDK, and storage contracts.\n */\nexport type OutputRendererFormat = \"toon\" | \"json\";\n/**\n * Restricts command override values accepted by command, SDK, and storage contracts.\n */\nexport type CommandOverride = (context: CommandOverrideContext) => unknown;\n/**\n * Restricts renderer override values accepted by command, SDK, and storage contracts.\n */\nexport type RendererOverride = (context: RendererOverrideContext) => string | null | undefined;\n/**\n * Restricts command handler values accepted by command, SDK, and storage contracts.\n */\nexport type CommandHandler = (context: CommandHandlerContext) => unknown;\n/**\n * Restricts parser override values accepted by command, SDK, and storage contracts.\n */\nexport type ParserOverride = (context: ParserOverrideContext) => ParserOverrideDelta | Promise<ParserOverrideDelta>;\n/**\n * Restricts preflight override values accepted by command, SDK, and storage contracts.\n */\nexport type PreflightOverride = (context: PreflightOverrideContext) => PreflightOverrideDelta | Promise<PreflightOverrideDelta>;\n/**\n * Restricts service override values accepted by command, SDK, and storage contracts.\n */\nexport type ServiceOverride = (context: ServiceOverrideContext) => unknown;\n\n/**\n * Documents the registered extension hook payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionHook<THook> {\n layer: ExtensionLayer;\n name: string;\n run: THook;\n}\n\n/**\n * Documents the extension hook registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionHookRegistry {\n beforeCommand: Array<RegisteredExtensionHook<BeforeCommandHook>>;\n afterCommand: Array<RegisteredExtensionHook<AfterCommandHook>>;\n onWrite: Array<RegisteredExtensionHook<OnWriteHook>>;\n onRead: Array<RegisteredExtensionHook<OnReadHook>>;\n onIndex: Array<RegisteredExtensionHook<OnIndexHook>>;\n}\n\n/**\n * Documents the command override context payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandOverrideContext {\n command: string;\n args: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root: string;\n result: unknown;\n}\n\n/**\n * Documents the renderer override context payload exchanged by command, SDK, and package integrations.\n */\nexport interface RendererOverrideContext {\n format: OutputRendererFormat;\n command?: string;\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root?: string;\n result: unknown;\n}\n\n/**\n * Documents the command handler context payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandHandlerContext {\n command: string;\n args: string[];\n options: Record<string, unknown>;\n global: GlobalOptions;\n pm_root: string;\n}\n\n/**\n * Documents the parser override context payload exchanged by command, SDK, and package integrations.\n */\nexport type ParserOverrideContext = CommandHandlerContext;\n\n/**\n * Documents the parser override delta payload exchanged by command, SDK, and package integrations.\n */\nexport interface ParserOverrideDelta {\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n}\n\n/**\n * Documents the preflight override context payload exchanged by command, SDK, and package integrations.\n */\nexport interface PreflightOverrideContext extends CommandHandlerContext {\n decision: PreflightRuntimeDecision;\n}\n\n/**\n * Documents the preflight runtime decision payload exchanged by command, SDK, and package integrations.\n */\nexport interface PreflightRuntimeDecision {\n enforce_item_format_gate: boolean;\n run_preflight_item_format_sync: boolean;\n run_extension_migrations: boolean;\n enforce_mandatory_migration_gate: boolean;\n}\n\n/**\n * Documents the preflight override delta payload exchanged by command, SDK, and package integrations.\n */\nexport interface PreflightOverrideDelta extends ParserOverrideDelta {\n enforce_item_format_gate?: boolean;\n run_preflight_item_format_sync?: boolean;\n run_extension_migrations?: boolean;\n enforce_mandatory_migration_gate?: boolean;\n}\n\n/**\n * Documents the service override context payload exchanged by command, SDK, and package integrations.\n */\nexport interface ServiceOverrideContext {\n service: ExtensionServiceName;\n command?: string;\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root?: string;\n payload: unknown;\n}\n\n/**\n * Documents the extension command argument definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCommandArgumentDefinition {\n name: string;\n required?: boolean;\n variadic?: boolean;\n description?: string;\n}\n\n/**\n * Documents the command definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandDefinition {\n name: string;\n run?: CommandHandler;\n /**\n * @deprecated Use `run` instead. This alias remains for backward compatibility.\n */\n handler?: CommandHandler;\n action?: string;\n description?: string;\n intent?: string;\n examples?: string[];\n failure_hints?: string[];\n arguments?: ExtensionCommandArgumentDefinition[];\n flags?: FlagDefinition[];\n}\n\n/**\n * Optional command-definition metadata for first-class importer/exporter\n * registration.\n *\n * `registerImporter`/`registerExporter` always create a `<name> import` /\n * `<name> export` command path. By default that path only has a handler. When\n * these options are supplied, the auto-created command also gains a full command\n * definition (description, flags, intent, examples, failure hints, positional\n * arguments) — surfaced in help and runtime contracts exactly like\n * `registerCommand`. The registration `name` and `run` handler are implicit, so\n * they are not part of this options object.\n */\nexport interface ImportExportRegistrationOptions {\n action?: string;\n description?: string;\n intent?: string;\n examples?: string[];\n failure_hints?: string[];\n arguments?: ExtensionCommandArgumentDefinition[];\n flags?: FlagDefinition[];\n}\n\n/**\n * Restricts flag value type values accepted by command, SDK, and storage contracts.\n */\nexport type FlagValueType = \"string\" | \"number\" | \"boolean\";\n\n/**\n * Documents the flag definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface FlagDefinition {\n long?: string;\n short?: string;\n value_name?: string;\n description?: string;\n required?: boolean;\n enabled?: boolean;\n visible?: boolean;\n /**\n * Canonical flag value type. Prefer this field; it is the one runtime\n * contracts and help output read first.\n */\n value_type?: FlagValueType;\n /**\n * @deprecated Use `value_type`. Retained for backward compatibility: when\n * both are present `value_type` wins, and `type` resolves only when\n * `value_type` is absent (`value_type ?? type`).\n */\n type?: FlagValueType;\n /**\n * When true, a repeated comma-list flag accumulates values across repeats\n * — parity with core list flags such as `--tags` — instead of the last\n * value winning. Mirrors the core `CliFlagContract.list` field so\n * extension-registered list flags coalesce through the same bootstrap path.\n */\n list?: boolean;\n /**\n * Default value applied when the flag is omitted. Surfaced to runtime\n * contracts and help output. A `list` flag may default to an array of scalars\n * (e.g. `[\"a\", \"b\"]`); the array is flattened/coerced like any list value.\n */\n default?: string | number | boolean | Array<string | number | boolean>;\n [key: string]: unknown;\n}\n\n/**\n * Documents the schema field definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaFieldDefinition {\n name: string;\n type: string;\n optional?: boolean;\n [key: string]: unknown;\n}\n\n/**\n * Documents the schema item type command option policy definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaItemTypeCommandOptionPolicyDefinition {\n command: string;\n option: string;\n enabled?: boolean;\n required?: boolean;\n visible?: boolean;\n [key: string]: unknown;\n}\n\n/**\n * Documents the schema item type option definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaItemTypeOptionDefinition {\n key: string;\n values?: string[];\n required?: boolean;\n aliases?: string[];\n [key: string]: unknown;\n}\n\n/**\n * Documents the schema item type definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaItemTypeDefinition {\n name: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n command_option_policies?: SchemaItemTypeCommandOptionPolicyDefinition[];\n options?: SchemaItemTypeOptionDefinition[];\n [key: string]: unknown;\n}\n\n/**\n * Documents the schema migration run context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaMigrationRunContext {\n id: string;\n command: \"migration\";\n layer: ExtensionLayer;\n extension: string;\n pm_root: string;\n status: string;\n}\n\n/**\n * Restricts schema migration runner values accepted by command, SDK, and storage contracts.\n */\nexport type SchemaMigrationRunner = (context: SchemaMigrationRunContext) => unknown | Promise<unknown>;\n\n/**\n * Documents the schema migration definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaMigrationDefinition {\n id?: string;\n description?: string;\n status?: string;\n mandatory?: boolean;\n run?: SchemaMigrationRunner;\n [key: string]: unknown;\n}\n\n/**\n * Documents the import export context payload exchanged by command, SDK, and package integrations.\n */\nexport interface ImportExportContext {\n registration: string;\n action: \"import\" | \"export\";\n command: string;\n args: string[];\n options: Record<string, unknown>;\n global: GlobalOptions;\n pm_root: string;\n}\n\n/**\n * Restricts importer values accepted by command, SDK, and storage contracts.\n */\nexport type Importer = (context: ImportExportContext) => unknown | Promise<unknown>;\n/**\n * Restricts exporter values accepted by command, SDK, and storage contracts.\n */\nexport type Exporter = (context: ImportExportContext) => unknown | Promise<unknown>;\n\n/**\n * Restricts extension search mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionSearchMode = \"keyword\" | \"semantic\" | \"hybrid\";\n\n/**\n * Documents the search provider query context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderQueryContext {\n query: string;\n mode: ExtensionSearchMode;\n tokens: string[];\n options: Record<string, unknown>;\n settings: PmSettings;\n documents: ItemDocument[];\n [key: string]: unknown;\n}\n\n/**\n * Documents the search provider hit payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderHit {\n id: string;\n score: number;\n matched_fields?: string[];\n [key: string]: unknown;\n}\n\n/**\n * Restricts search provider query result values accepted by command, SDK, and storage contracts.\n */\nexport type SearchProviderQueryResult = SearchProviderHit[] | { hits?: SearchProviderHit[] };\n\n/**\n * Documents the search provider query expansion context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderQueryExpansionContext {\n query: string;\n mode: Exclude<ExtensionSearchMode, \"keyword\">;\n settings: PmSettings;\n [key: string]: unknown;\n}\n\n/**\n * Restricts search provider query expansion result values accepted by command, SDK, and storage contracts.\n */\nexport type SearchProviderQueryExpansionResult = string[] | { queries?: string[] };\n\n/**\n * Documents the search provider rerank candidate payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderRerankCandidate {\n id: string;\n text: string;\n score: number;\n}\n\n/**\n * Documents the search provider rerank hit payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderRerankHit {\n id: string;\n score: number;\n}\n\n/**\n * Restricts search provider rerank result values accepted by command, SDK, and storage contracts.\n */\nexport type SearchProviderRerankResult = SearchProviderRerankHit[] | { hits?: SearchProviderRerankHit[] };\n\n/**\n * Documents the search provider rerank context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderRerankContext {\n query: string;\n mode: \"hybrid\";\n model: string;\n top_k: number;\n settings: PmSettings;\n candidates: SearchProviderRerankCandidate[];\n [key: string]: unknown;\n}\n\n/**\n * Documents the search provider embed batch context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderEmbedBatchContext {\n inputs: string[];\n settings: PmSettings;\n model: string;\n [key: string]: unknown;\n}\n\n/**\n * Documents the search provider embed context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderEmbedContext {\n input: string;\n settings: PmSettings;\n model: string;\n [key: string]: unknown;\n}\n\n/**\n * Documents the search provider definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderDefinition {\n name: string;\n query?: (context: SearchProviderQueryContext) => SearchProviderQueryResult | Promise<SearchProviderQueryResult>;\n queryExpansion?: (\n context: SearchProviderQueryExpansionContext,\n ) => SearchProviderQueryExpansionResult | Promise<SearchProviderQueryExpansionResult>;\n query_expansion?: (\n context: SearchProviderQueryExpansionContext,\n ) => SearchProviderQueryExpansionResult | Promise<SearchProviderQueryExpansionResult>;\n rerank?: (context: SearchProviderRerankContext) => SearchProviderRerankResult | Promise<SearchProviderRerankResult>;\n embedBatch?: (context: SearchProviderEmbedBatchContext) => number[][] | Promise<number[][]>;\n embed_batch?: (context: SearchProviderEmbedBatchContext) => number[][] | Promise<number[][]>;\n embed?: (context: SearchProviderEmbedContext) => number[] | Promise<number[]>;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store query hit payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreQueryHit {\n id: string;\n score: number;\n payload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store query context payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreQueryContext {\n vector: number[];\n limit: number;\n settings: PmSettings;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store upsert point payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreUpsertPoint {\n id: string;\n vector: number[];\n payload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store upsert context payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreUpsertContext {\n points: VectorStoreUpsertPoint[];\n settings: PmSettings;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store delete context payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreDeleteContext {\n ids: string[];\n settings: PmSettings;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store adapter definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreAdapterDefinition {\n name: string;\n query?: (context: VectorStoreQueryContext) => VectorStoreQueryHit[] | Promise<VectorStoreQueryHit[]>;\n upsert?: (context: VectorStoreUpsertContext) => unknown | Promise<unknown>;\n delete?: (context: VectorStoreDeleteContext) => unknown | Promise<unknown>;\n [key: string]: unknown;\n}\n\n/**\n * Documents the registered extension command override payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionCommandOverride {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: CommandOverride;\n}\n\n/**\n * Documents the registered extension command handler payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionCommandHandler {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: CommandHandler;\n}\n\n/**\n * Documents the registered extension parser override payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionParserOverride {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: ParserOverride;\n}\n\n/**\n * Documents the registered extension preflight override payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionPreflightOverride {\n layer: ExtensionLayer;\n name: string;\n run: PreflightOverride;\n}\n\n/**\n * Documents the registered extension service override payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionServiceOverride {\n layer: ExtensionLayer;\n name: string;\n service: ExtensionServiceName;\n run: ServiceOverride;\n}\n\n/**\n * Documents the registered extension renderer override payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionRendererOverride {\n layer: ExtensionLayer;\n name: string;\n format: OutputRendererFormat;\n run: RendererOverride;\n}\n\n/**\n * Documents the extension command registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCommandRegistry {\n overrides: RegisteredExtensionCommandOverride[];\n handlers: RegisteredExtensionCommandHandler[];\n}\n\n/**\n * Documents the extension parser registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionParserRegistry {\n overrides: RegisteredExtensionParserOverride[];\n}\n\n/**\n * Documents the extension preflight registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionPreflightRegistry {\n overrides: RegisteredExtensionPreflightOverride[];\n}\n\n/**\n * Documents the extension service registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionServiceRegistry {\n overrides: RegisteredExtensionServiceOverride[];\n}\n\n/**\n * Documents the extension renderer registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionRendererRegistry {\n overrides: RegisteredExtensionRendererOverride[];\n}\n\n/**\n * Documents the registered extension flag definitions payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionFlagDefinitions {\n layer: ExtensionLayer;\n name: string;\n target_command: string;\n flags: FlagDefinition[];\n}\n\n/**\n * Documents the registered extension command definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionCommandDefinition {\n layer: ExtensionLayer;\n name: string;\n source_package?: string;\n command: string;\n action: string;\n description?: string;\n intent?: string;\n examples: string[];\n failure_hints: string[];\n arguments: ExtensionCommandArgumentDefinition[];\n}\n\n/**\n * Documents the registered extension schema field definitions payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionSchemaFieldDefinitions {\n layer: ExtensionLayer;\n name: string;\n fields: SchemaFieldDefinition[];\n}\n\n/**\n * Documents the registered extension schema item type definitions payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionSchemaItemTypeDefinitions {\n layer: ExtensionLayer;\n name: string;\n types: SchemaItemTypeDefinition[];\n}\n\n/**\n * Documents the registered extension schema migration definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionSchemaMigrationDefinition {\n layer: ExtensionLayer;\n name: string;\n definition: SchemaMigrationDefinition;\n runtime_definition: SchemaMigrationDefinition;\n}\n\n/**\n * Documents the registered extension importer payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionImporter {\n layer: ExtensionLayer;\n name: string;\n importer: string;\n}\n\n/**\n * Documents the registered extension exporter payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionExporter {\n layer: ExtensionLayer;\n name: string;\n exporter: string;\n}\n\n/**\n * Documents the registered extension search provider payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionSearchProvider {\n layer: ExtensionLayer;\n name: string;\n definition: SearchProviderDefinition;\n runtime_definition: SearchProviderDefinition;\n}\n\n/**\n * Documents the registered extension vector store adapter payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionVectorStoreAdapter {\n layer: ExtensionLayer;\n name: string;\n definition: VectorStoreAdapterDefinition;\n runtime_definition: VectorStoreAdapterDefinition;\n}\n\n/**\n * Documents a project profile contributed by an extension via\n * `api.registerProfile(profile)`.\n *\n * A profile is the broadest customization primitive an extension can ship: it\n * bundles item types, custom statuses, fields, per-type workflows, config knobs,\n * create templates, and package recommendations into one declarative archetype\n * that `pm profile apply` stages idempotently — the same shape as the\n * core-baked archetypes. Registering one makes it resolvable by name through\n * `pm profile list/show/apply` for as long as the owning package is active.\n */\nexport interface RegisteredExtensionProjectProfile {\n layer: ExtensionLayer;\n name: string;\n profile: ProjectProfileDefinition;\n}\n\n/**\n * Documents the extension registration registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionRegistrationRegistry {\n commands: RegisteredExtensionCommandDefinition[];\n flags: RegisteredExtensionFlagDefinitions[];\n item_fields: RegisteredExtensionSchemaFieldDefinitions[];\n item_types: RegisteredExtensionSchemaItemTypeDefinitions[];\n migrations: RegisteredExtensionSchemaMigrationDefinition[];\n profiles: RegisteredExtensionProjectProfile[];\n importers: RegisteredExtensionImporter[];\n exporters: RegisteredExtensionExporter[];\n search_providers: RegisteredExtensionSearchProvider[];\n vector_store_adapters: RegisteredExtensionVectorStoreAdapter[];\n}\n\n/**\n * Documents the extension registration counts payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionRegistrationCounts {\n commands: number;\n flags: number;\n item_fields: number;\n item_types: number;\n migrations: number;\n profiles: number;\n importers: number;\n exporters: number;\n search_providers: number;\n vector_store_adapters: number;\n}\n\n/**\n * Read-only identity an extension's `activate(api)` receives about itself, so\n * authors can emit self-identifying logs, gate on their own version, and build\n * better error messages without re-reading the on-disk manifest or duplicating\n * metadata in-module. Exposed as `api.extension`.\n */\nexport interface ExtensionSelfIdentity {\n readonly name: string;\n readonly layer: ExtensionLayer;\n readonly version: string;\n readonly capabilities: readonly ExtensionCapability[];\n readonly pm_min_version?: string;\n readonly pm_max_version?: string;\n readonly source_package?: string;\n}\n\n/**\n * Documents the extension api payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionApi {\n /** Read-only identity of the extension this `api` was created for. */\n readonly extension: ExtensionSelfIdentity;\n registerCommand(command: string, override: CommandOverride): void;\n registerCommand(definition: CommandDefinition): void;\n registerParser(command: string, override: ParserOverride): void;\n registerPreflight(override: PreflightOverride): void;\n registerService(service: ExtensionServiceName, override: ServiceOverride): void;\n registerFlags(targetCommand: string, flags: FlagDefinition[]): void;\n registerItemFields(fields: SchemaFieldDefinition[]): void;\n registerItemTypes(types: SchemaItemTypeDefinition[]): void;\n registerMigration(definition: SchemaMigrationDefinition): void;\n registerProfile(profile: ProjectProfileRegistrationInput): void;\n registerRenderer(format: OutputRendererFormat, renderer: RendererOverride): void;\n registerImporter(name: string, importer: Importer, options?: ImportExportRegistrationOptions): void;\n registerExporter(name: string, exporter: Exporter, options?: ImportExportRegistrationOptions): void;\n registerSearchProvider(provider: SearchProviderDefinition): void;\n registerVectorStoreAdapter(adapter: VectorStoreAdapterDefinition): void;\n hooks: {\n beforeCommand(hook: BeforeCommandHook): void;\n afterCommand(hook: AfterCommandHook): void;\n onWrite(hook: OnWriteHook): void;\n onRead(hook: OnReadHook): void;\n onIndex(hook: OnIndexHook): void;\n };\n}\n\n/**\n * Documents the failed extension activation payload exchanged by command, SDK, and package integrations.\n */\nexport interface FailedExtensionActivation {\n layer: ExtensionLayer;\n name: string;\n entry_path: string;\n error: string;\n trace?: ExtensionActivationFailureTrace;\n}\n\n/**\n * Documents the extension activation failure trace payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionActivationFailureTrace {\n method: string;\n /** `-1` means the failure happened before a numbered registration was accepted. */\n registration_index: number;\n command?: string;\n capability?: ExtensionCapability;\n missing_capability?: ExtensionCapability;\n expected_schema: string;\n received?: unknown;\n hint?: string;\n}\n\n/**\n * Documents the extension activation result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionActivationResult {\n hooks: ExtensionHookRegistry;\n commands: ExtensionCommandRegistry;\n parsers: ExtensionParserRegistry;\n preflight: ExtensionPreflightRegistry;\n services: ExtensionServiceRegistry;\n renderers: ExtensionRendererRegistry;\n registrations: ExtensionRegistrationRegistry;\n failed: FailedExtensionActivation[];\n warnings: string[];\n hook_counts: {\n before_command: number;\n after_command: number;\n on_write: number;\n on_read: number;\n on_index: number;\n };\n command_override_count: number;\n command_handler_count: number;\n parser_override_count: number;\n preflight_override_count: number;\n service_override_count: number;\n renderer_override_count: number;\n registration_counts: ExtensionRegistrationCounts;\n}\n\n/**\n * Documents the extension candidate payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCandidate {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n entry_path: string;\n manifest: ExtensionManifest;\n source_package?: string;\n}\n\n/**\n * Documents the extension layer scan result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionLayerScanResult {\n diagnostics: ExtensionDiagnostic[];\n warnings: string[];\n candidates: ExtensionCandidate[];\n}\n\n/**\n * Documents the scanned extension directory payload exchanged by command, SDK, and package integrations.\n */\nexport interface ScannedExtensionDirectory {\n diagnostic: ExtensionDiagnostic;\n warnings: string[];\n candidate: ExtensionCandidate | null;\n}\n\n/**\n * Documents the legacy extension capability alias mapping payload exchanged by command, SDK, and package integrations.\n */\nexport interface LegacyExtensionCapabilityAliasMapping {\n alias: string;\n target: ExtensionCapability;\n}\n\n/**\n * Documents the discover extensions options payload exchanged by command, SDK, and package integrations.\n */\nexport interface DiscoverExtensionsOptions {\n pmRoot: string;\n settings: PmSettings;\n cwd?: string;\n noExtensions?: boolean;\n reload_token?: string;\n cache_bust?: boolean;\n /**\n * Optional import-stage filter. Discovery still reports the full effective set,\n * but `loadExtensions` imports only entries accepted by this predicate.\n */\n extensionFilter?: (extension: EffectiveExtension) => boolean;\n}\n\n/**\n * Documents the activatable extension payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivatableExtension {\n activate: (api: ExtensionApi) => void | Promise<void>;\n /**\n * Optional teardown lifecycle hook, analogous to VS Code's `deactivate`\n * export. Invoked when the host tears the extension down — on long-running\n * MCP-server reload between requests, or via the `deactivateExtensions`\n * primitive — so an extension can close connections, clear timers, and\n * release buffers it opened during `activate`.\n */\n deactivate?: () => void | Promise<void>;\n}\n\n/**\n * Documents the extension deactivation failure payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDeactivationFailure {\n layer: ExtensionLayer;\n name: string;\n error: string;\n}\n\n/**\n * Documents the extension deactivation options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDeactivationOptions {\n /**\n * Maximum time to wait for each extension's `deactivate` hook. Defaults to\n * 5000ms so a hanging teardown cannot block host shutdown or reload. Set to\n * 0 or Infinity only when the host intentionally wants to wait indefinitely.\n */\n deactivate_timeout_ms?: number;\n}\n\n/**\n * Documents the extension deactivation result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDeactivationResult {\n /** Count of loaded extensions whose `deactivate` hook ran without throwing. */\n deactivated: number;\n warnings: string[];\n failed: ExtensionDeactivationFailure[];\n}\n\n/**\n * Documents the service override result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ServiceOverrideResult {\n handled: boolean;\n result: unknown;\n warnings: string[];\n}\n\n/**\n * Documents the command override result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandOverrideResult {\n overridden: boolean;\n result: unknown;\n warnings: string[];\n}\n\n/**\n * Documents the command handler result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandHandlerResult {\n handled: boolean;\n result: unknown;\n warnings: string[];\n /**\n * Human-readable, single-line, length-bounded message describing why an\n * extension command handler failed. Surfaced to the user/CI so the real cause\n * (e.g. \"Changelog is out of date: CHANGELOG.md\") is visible instead of only\n * the opaque `extension_command_handler_failed` warning code.\n */\n errorMessage?: string;\n}\n\n/**\n * Documents the parser override result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ParserOverrideResult {\n overridden: boolean;\n context: CommandHandlerContext;\n warnings: string[];\n}\n\n/**\n * Documents the preflight override result payload exchanged by command, SDK, and package integrations.\n */\nexport interface PreflightOverrideResult {\n overridden: boolean;\n context: CommandHandlerContext;\n decision: PreflightRuntimeDecision;\n warnings: string[];\n}\n\n/**\n * Documents the renderer override result payload exchanged by command, SDK, and package integrations.\n */\nexport interface RendererOverrideResult {\n overridden: boolean;\n rendered: string | null;\n warnings: string[];\n}\n\n/**\n * Documents the unknown extension capability warning details payload exchanged by command, SDK, and package integrations.\n */\nexport interface UnknownExtensionCapabilityWarningDetails {\n layer: ExtensionLayer;\n name: string;\n capability: string;\n allowed_capabilities: string[];\n capability_contract_version: number;\n suggested_capability?: string;\n suggestion_source?: \"legacy_alias\" | \"nearest_match\";\n legacy_alias_target?: string;\n}\n"],"names":[],"mappings":";;AAgBA,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,UAAU;IACV,WAAW;IACX,OAAO;IACP,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,UAAU;CACF,CAAC;AAKX,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,mCAAmC,GAAkD,MAAM,CAAC,MAAM,CAAC;IAC9G,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,QAAQ;CACrB,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC;IACzD,OAAO,EAAE,qCAAqC;IAC9C,YAAY,EAAE,CAAC,GAAG,4BAA4B,CAAC;IAC/C,cAAc,EAAE,EAAE,GAAG,mCAAmC,EAAE;CAC3D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAKhF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAK/E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAU,CAAC;AAM1F,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;AAe9E,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IACrB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,eAAe;IACf,cAAc;IACd,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,iBAAiB;IACjB,oBAAoB;IACpB,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,oBAAoB;CACZ,CAAC;AAMX,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,eAAe;IACf,cAAc;IACd,aAAa;IACb,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;CACX,CAAC;AA0DX;;GAEG;AACH,MAAM,UAAU,sCAAsC;IACpD,OAAO;QACL,IAAI,EAAE,KAAK;QACX,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,kBAAkB,EAAE,EAAE;QACtB,uBAAuB,EAAE,MAAM;QAC/B,kBAAkB,EAAE,EAAE;QACtB,kBAAkB,EAAE,EAAE;QACtB,oBAAoB,EAAE,EAAE;QACxB,oBAAoB,EAAE,EAAE;QACxB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,eAAe,EAAE,EAAE;QACnB,eAAe,EAAE,EAAE;QACnB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,mBAAmB,EAAE,EAAE;KACxB,CAAC;AACJ,CAAC","debugId":"0fdb02e4-60e7-5f4c-9f06-d2ec2f03f792"}
1
+ {"version":3,"file":"extension-types.js","sources":["core/extensions/extension-types.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/extension-types\n *\n * Implements extension runtime contracts and governance for Extension Types.\n */\nimport type {\n ExtensionPolicyOverrideSettings,\n ExtensionPolicySettings,\n ItemDocument,\n ItemFrontMatter,\n ItemStatus,\n PmSettings,\n} from \"../../types/index.js\";\nimport type { GlobalOptions } from \"../shared/command-types.js\";\nimport type { ProjectProfileDefinition, ProjectProfileRegistrationInput } from \"../profile/profile-presets.js\";\n\nexport const KNOWN_EXTENSION_CAPABILITIES = [\n \"commands\",\n \"renderers\",\n \"hooks\",\n \"schema\",\n \"importers\",\n \"search\",\n \"parser\",\n \"preflight\",\n \"services\",\n] as const;\n/**\n * Restricts extension capability values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionCapability = (typeof KNOWN_EXTENSION_CAPABILITIES)[number];\nexport const EXTENSION_CAPABILITY_CONTRACT_VERSION = 2;\nexport const EXTENSION_CAPABILITY_LEGACY_ALIASES: Readonly<Record<string, ExtensionCapability>> = Object.freeze({\n migration: \"schema\",\n validation: \"schema\",\n});\nexport const EXTENSION_CAPABILITY_CONTRACT = Object.freeze({\n version: EXTENSION_CAPABILITY_CONTRACT_VERSION,\n capabilities: [...KNOWN_EXTENSION_CAPABILITIES],\n legacy_aliases: { ...EXTENSION_CAPABILITY_LEGACY_ALIASES },\n});\n\nexport const KNOWN_EXTENSION_POLICY_MODES = [\"off\", \"warn\", \"enforce\"] as const;\n/**\n * Restricts extension policy mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicyMode = (typeof KNOWN_EXTENSION_POLICY_MODES)[number];\nexport const KNOWN_EXTENSION_TRUST_MODES = [\"off\", \"warn\", \"enforce\"] as const;\n/**\n * Restricts extension trust mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionTrustMode = (typeof KNOWN_EXTENSION_TRUST_MODES)[number];\nexport const KNOWN_EXTENSION_SANDBOX_PROFILES = [\"none\", \"restricted\", \"strict\"] as const;\n/**\n * Restricts extension sandbox profile values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionSandboxProfile = (typeof KNOWN_EXTENSION_SANDBOX_PROFILES)[number];\n\nexport const KNOWN_PM_MAX_VERSION_EXCEEDED_MODES = [\"block\", \"warn\"] as const;\n/** How a `pm_max_version` violation is handled for an extension layer. */\nexport type PmMaxVersionExceededMode = (typeof KNOWN_PM_MAX_VERSION_EXCEEDED_MODES)[number];\n/** Optional per-layer override map for `extensions.policy.pm_max_version_exceeded_mode`. */\nexport interface PmMaxVersionExceededModeByLayer {\n global?: PmMaxVersionExceededMode;\n project?: PmMaxVersionExceededMode;\n}\n/**\n * Settings value for `extensions.policy.pm_max_version_exceeded_mode`: either a\n * single mode applied to both layers, or a per-layer override map. Unset (and\n * any unset layer key) defaults to `\"block\"`.\n */\nexport type PmMaxVersionExceededModeSetting = PmMaxVersionExceededMode | PmMaxVersionExceededModeByLayer;\n\nexport const KNOWN_EXTENSION_POLICY_SURFACES = [\n \"commands.override\",\n \"commands.handler\",\n \"hooks.beforecommand\",\n \"hooks.aftercommand\",\n \"hooks.onwrite\",\n \"hooks.onread\",\n \"hooks.onindex\",\n \"schema.flags\",\n \"schema.itemfields\",\n \"schema.itemtypes\",\n \"schema.migrations\",\n \"schema.profiles\",\n \"parser.override\",\n \"preflight.override\",\n \"services.override\",\n \"renderers.override\",\n \"importers.importer\",\n \"importers.exporter\",\n \"search.provider\",\n \"search.vectorstore\",\n] as const;\n/**\n * Restricts extension policy surface values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicySurface = (typeof KNOWN_EXTENSION_POLICY_SURFACES)[number];\n\nexport const KNOWN_EXTENSION_SERVICE_NAMES = [\n \"output_format\",\n \"error_format\",\n \"help_format\",\n \"lock_acquire\",\n \"lock_release\",\n \"history_append\",\n \"item_store_write\",\n \"item_store_delete\",\n] as const;\n/**\n * Restricts extension service name values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionServiceName = (typeof KNOWN_EXTENSION_SERVICE_NAMES)[number];\n\n/**\n * Documents the extension provenance metadata payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionProvenanceMetadata {\n source?: string;\n signature?: string;\n attestation?: string;\n verified?: boolean;\n}\n\n/**\n * Documents the extension runtime permission declaration payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionRuntimePermissionDeclaration {\n fs_read?: boolean;\n fs_write?: boolean;\n network?: boolean;\n env_read?: boolean;\n env_write?: boolean;\n process_spawn?: boolean;\n}\n\n/**\n * Documents the extension activation metadata payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionActivationMetadata {\n commands?: string[];\n}\n\n/**\n * Restricts extension policy override values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicyOverride = ExtensionPolicyOverrideSettings;\n/**\n * Extension governance policy as read from / serialized to settings. Extends the\n * stored settings shape with `pm_max_version_exceeded_mode` (pm-k5e8), which\n * relaxes the default-BLOCK on `pm_max_version` violations to warn-only —\n * globally or per extension layer.\n */\nexport type ExtensionGovernancePolicy = ExtensionPolicySettings & {\n pm_max_version_exceeded_mode?: PmMaxVersionExceededModeSetting;\n};\n\n/**\n * Documents the extension manifest engines payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionManifestEngines {\n pm?: string;\n node?: string;\n [engine: string]: string | undefined;\n}\n\n/**\n * Implements create default extension governance policy for the public runtime surface of this module.\n */\nexport function createDefaultExtensionGovernancePolicy(): ExtensionGovernancePolicy {\n return {\n mode: \"off\",\n trust_mode: \"off\",\n require_provenance: false,\n trusted_extensions: [],\n default_sandbox_profile: \"none\",\n allowed_extensions: [],\n blocked_extensions: [],\n allowed_capabilities: [],\n blocked_capabilities: [],\n allowed_surfaces: [],\n blocked_surfaces: [],\n allowed_commands: [],\n blocked_commands: [],\n allowed_actions: [],\n blocked_actions: [],\n allowed_services: [],\n blocked_services: [],\n extension_overrides: [],\n };\n}\n\n/**\n * Restricts extension layer values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionLayer = \"global\" | \"project\";\n/**\n * Restricts extension status values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionStatus = \"ok\" | \"warn\";\n\n/**\n * Documents the extension manifest payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionManifest {\n name: string;\n version: string;\n entry: string;\n priority: number;\n capabilities: string[];\n manifest_version?: number;\n pm_min_version?: string;\n pm_max_version?: string;\n engines?: ExtensionManifestEngines;\n trusted?: boolean;\n provenance?: ExtensionProvenanceMetadata;\n sandbox_profile?: ExtensionSandboxProfile;\n permissions?: ExtensionRuntimePermissionDeclaration;\n activation?: ExtensionActivationMetadata;\n legacy_capability_aliases?: LegacyExtensionCapabilityAliasMapping[];\n}\n\n/**\n * Documents the extension diagnostic payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDiagnostic {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n name: string | null;\n version: string | null;\n entry: string | null;\n priority: number | null;\n entry_path: string | null;\n enabled: boolean | null;\n status: ExtensionStatus;\n}\n\n/**\n * Documents the effective extension payload exchanged by command, SDK, and package integrations.\n */\nexport interface EffectiveExtension {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n name: string;\n source_package?: string;\n version: string;\n entry: string;\n priority: number;\n entry_path: string;\n manifest_version?: number;\n pm_min_version?: string;\n pm_max_version?: string;\n engines?: ExtensionManifestEngines;\n trusted?: boolean;\n provenance?: ExtensionProvenanceMetadata;\n sandbox_profile?: ExtensionSandboxProfile;\n permissions?: ExtensionRuntimePermissionDeclaration;\n capabilities?: string[];\n activation?: ExtensionActivationMetadata;\n}\n\n/**\n * Documents the extension discovery result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDiscoveryResult {\n disabled_by_flag: boolean;\n roots: {\n global: string;\n project: string;\n };\n configured_enabled: string[];\n configured_disabled: string[];\n discovered: ExtensionDiagnostic[];\n effective: EffectiveExtension[];\n warnings: string[];\n policy: ExtensionGovernancePolicy;\n}\n\n/**\n * Documents the loaded extension payload exchanged by command, SDK, and package integrations.\n */\nexport interface LoadedExtension extends EffectiveExtension {\n module: unknown;\n}\n\n/**\n * Documents the failed extension load payload exchanged by command, SDK, and package integrations.\n */\nexport interface FailedExtensionLoad {\n layer: ExtensionLayer;\n name: string;\n entry_path: string;\n error: string;\n}\n\n/**\n * Documents the extension load result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionLoadResult extends ExtensionDiscoveryResult {\n loaded: LoadedExtension[];\n failed: FailedExtensionLoad[];\n}\n\n/**\n * Documents the before command hook context payload exchanged by command, SDK, and package integrations.\n */\nexport interface BeforeCommandHookContext {\n command: string;\n args: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root: string;\n}\n\n/**\n * Documents the after command hook context payload exchanged by command, SDK, and package integrations.\n */\nexport interface AfterCommandHookContext extends BeforeCommandHookContext {\n ok: boolean;\n error?: string;\n result?: unknown;\n affected?: AfterCommandAffectedItem[];\n}\n\n/**\n * Documents the after command affected item payload exchanged by command, SDK, and package integrations.\n */\nexport interface AfterCommandAffectedItem {\n id: string;\n op?: string;\n item_type?: string;\n previous_status?: ItemStatus;\n status?: ItemStatus;\n previous?: Partial<ItemFrontMatter>;\n current?: Partial<ItemFrontMatter>;\n changed_fields?: string[];\n}\n\n/**\n * Documents the on write hook context payload exchanged by command, SDK, and package integrations.\n */\nexport interface OnWriteHookContext {\n path: string;\n scope: \"project\" | \"global\";\n op: string;\n item_id?: string;\n item_type?: string;\n before?: ItemDocument;\n after?: ItemDocument;\n changed_fields?: string[];\n}\n\n/**\n * Documents the on read hook context payload exchanged by command, SDK, and package integrations.\n */\nexport interface OnReadHookContext {\n path: string;\n scope: \"project\" | \"global\";\n}\n\n/**\n * Documents the on index hook context payload exchanged by command, SDK, and package integrations.\n */\nexport interface OnIndexHookContext {\n mode: string;\n total_items?: number;\n}\n\n/**\n * Restricts before command hook values accepted by command, SDK, and storage contracts.\n */\nexport type BeforeCommandHook = (context: BeforeCommandHookContext) => Promise<void> | void;\n/**\n * Restricts after command hook values accepted by command, SDK, and storage contracts.\n */\nexport type AfterCommandHook = (context: AfterCommandHookContext) => Promise<void> | void;\n/**\n * Restricts on write hook values accepted by command, SDK, and storage contracts.\n */\nexport type OnWriteHook = (context: OnWriteHookContext) => Promise<void> | void;\n/**\n * Restricts on read hook values accepted by command, SDK, and storage contracts.\n */\nexport type OnReadHook = (context: OnReadHookContext) => Promise<void> | void;\n/**\n * Restricts on index hook values accepted by command, SDK, and storage contracts.\n */\nexport type OnIndexHook = (context: OnIndexHookContext) => Promise<void> | void;\n/**\n * Restricts output renderer format values accepted by command, SDK, and storage contracts.\n */\nexport type OutputRendererFormat = \"toon\" | \"json\";\n/**\n * Restricts command override values accepted by command, SDK, and storage contracts.\n */\nexport type CommandOverride = (context: CommandOverrideContext) => unknown;\n/**\n * Restricts renderer override values accepted by command, SDK, and storage contracts.\n */\nexport type RendererOverride = (context: RendererOverrideContext) => string | null | undefined;\n/**\n * Restricts command handler values accepted by command, SDK, and storage contracts.\n */\nexport type CommandHandler = (context: CommandHandlerContext) => unknown;\n/**\n * Restricts parser override values accepted by command, SDK, and storage contracts.\n */\nexport type ParserOverride = (context: ParserOverrideContext) => ParserOverrideDelta | Promise<ParserOverrideDelta>;\n/**\n * Restricts preflight override values accepted by command, SDK, and storage contracts.\n */\nexport type PreflightOverride = (context: PreflightOverrideContext) => PreflightOverrideDelta | Promise<PreflightOverrideDelta>;\n/**\n * Restricts service override values accepted by command, SDK, and storage contracts.\n */\nexport type ServiceOverride = (context: ServiceOverrideContext) => unknown;\n\n/**\n * Documents the registered extension hook payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionHook<THook> {\n layer: ExtensionLayer;\n name: string;\n run: THook;\n}\n\n/**\n * Documents the extension hook registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionHookRegistry {\n beforeCommand: Array<RegisteredExtensionHook<BeforeCommandHook>>;\n afterCommand: Array<RegisteredExtensionHook<AfterCommandHook>>;\n onWrite: Array<RegisteredExtensionHook<OnWriteHook>>;\n onRead: Array<RegisteredExtensionHook<OnReadHook>>;\n onIndex: Array<RegisteredExtensionHook<OnIndexHook>>;\n}\n\n/**\n * Documents the command override context payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandOverrideContext {\n command: string;\n args: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root: string;\n result: unknown;\n}\n\n/**\n * Documents the renderer override context payload exchanged by command, SDK, and package integrations.\n */\nexport interface RendererOverrideContext {\n format: OutputRendererFormat;\n command?: string;\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root?: string;\n result: unknown;\n}\n\n/**\n * Documents the command handler context payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandHandlerContext {\n command: string;\n args: string[];\n options: Record<string, unknown>;\n global: GlobalOptions;\n pm_root: string;\n}\n\n/**\n * Documents the parser override context payload exchanged by command, SDK, and package integrations.\n */\nexport type ParserOverrideContext = CommandHandlerContext;\n\n/**\n * Documents the parser override delta payload exchanged by command, SDK, and package integrations.\n */\nexport interface ParserOverrideDelta {\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n}\n\n/**\n * Documents the preflight override context payload exchanged by command, SDK, and package integrations.\n */\nexport interface PreflightOverrideContext extends CommandHandlerContext {\n decision: PreflightRuntimeDecision;\n}\n\n/**\n * Documents the preflight runtime decision payload exchanged by command, SDK, and package integrations.\n */\nexport interface PreflightRuntimeDecision {\n enforce_item_format_gate: boolean;\n run_preflight_item_format_sync: boolean;\n run_extension_migrations: boolean;\n enforce_mandatory_migration_gate: boolean;\n}\n\n/**\n * Documents the preflight override delta payload exchanged by command, SDK, and package integrations.\n */\nexport interface PreflightOverrideDelta extends ParserOverrideDelta {\n enforce_item_format_gate?: boolean;\n run_preflight_item_format_sync?: boolean;\n run_extension_migrations?: boolean;\n enforce_mandatory_migration_gate?: boolean;\n}\n\n/**\n * Documents the service override context payload exchanged by command, SDK, and package integrations.\n */\nexport interface ServiceOverrideContext {\n service: ExtensionServiceName;\n command?: string;\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root?: string;\n payload: unknown;\n}\n\n/**\n * Documents the extension command argument definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCommandArgumentDefinition {\n name: string;\n required?: boolean;\n variadic?: boolean;\n description?: string;\n}\n\n/**\n * Documents the command definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandDefinition {\n name: string;\n run?: CommandHandler;\n /**\n * @deprecated Use `run` instead. This alias remains for backward compatibility.\n */\n handler?: CommandHandler;\n action?: string;\n description?: string;\n intent?: string;\n examples?: string[];\n failure_hints?: string[];\n arguments?: ExtensionCommandArgumentDefinition[];\n flags?: FlagDefinition[];\n}\n\n/**\n * Optional command-definition metadata for first-class importer/exporter\n * registration.\n *\n * `registerImporter`/`registerExporter` always create a `<name> import` /\n * `<name> export` command path. By default that path only has a handler. When\n * these options are supplied, the auto-created command also gains a full command\n * definition (description, flags, intent, examples, failure hints, positional\n * arguments) — surfaced in help and runtime contracts exactly like\n * `registerCommand`. The registration `name` and `run` handler are implicit, so\n * they are not part of this options object.\n */\nexport interface ImportExportRegistrationOptions {\n action?: string;\n description?: string;\n intent?: string;\n examples?: string[];\n failure_hints?: string[];\n arguments?: ExtensionCommandArgumentDefinition[];\n flags?: FlagDefinition[];\n}\n\n/**\n * Restricts flag value type values accepted by command, SDK, and storage contracts.\n */\nexport type FlagValueType = \"string\" | \"number\" | \"boolean\";\n\n/**\n * Documents the flag definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface FlagDefinition {\n long?: string;\n short?: string;\n value_name?: string;\n description?: string;\n required?: boolean;\n enabled?: boolean;\n visible?: boolean;\n /**\n * Canonical flag value type. Prefer this field; it is the one runtime\n * contracts and help output read first.\n */\n value_type?: FlagValueType;\n /**\n * @deprecated Use `value_type`. Retained for backward compatibility: when\n * both are present `value_type` wins, and `type` resolves only when\n * `value_type` is absent (`value_type ?? type`).\n */\n type?: FlagValueType;\n /**\n * When true, a repeated comma-list flag accumulates values across repeats\n * — parity with core list flags such as `--tags` — instead of the last\n * value winning. Mirrors the core `CliFlagContract.list` field so\n * extension-registered list flags coalesce through the same bootstrap path.\n */\n list?: boolean;\n /**\n * Default value applied when the flag is omitted. Surfaced to runtime\n * contracts and help output. A `list` flag may default to an array of scalars\n * (e.g. `[\"a\", \"b\"]`); the array is flattened/coerced like any list value.\n */\n default?: string | number | boolean | Array<string | number | boolean>;\n [key: string]: unknown;\n}\n\n/**\n * Documents the schema field definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaFieldDefinition {\n name: string;\n type: string;\n optional?: boolean;\n [key: string]: unknown;\n}\n\n/**\n * Documents the schema item type command option policy definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaItemTypeCommandOptionPolicyDefinition {\n command: string;\n option: string;\n enabled?: boolean;\n required?: boolean;\n visible?: boolean;\n [key: string]: unknown;\n}\n\n/**\n * Documents the schema item type option definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaItemTypeOptionDefinition {\n key: string;\n values?: string[];\n required?: boolean;\n aliases?: string[];\n [key: string]: unknown;\n}\n\n/**\n * Documents the schema item type definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaItemTypeDefinition {\n name: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n command_option_policies?: SchemaItemTypeCommandOptionPolicyDefinition[];\n options?: SchemaItemTypeOptionDefinition[];\n [key: string]: unknown;\n}\n\n/**\n * Documents the schema migration run context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaMigrationRunContext {\n id: string;\n command: \"migration\";\n layer: ExtensionLayer;\n extension: string;\n pm_root: string;\n status: string;\n}\n\n/**\n * Restricts schema migration runner values accepted by command, SDK, and storage contracts.\n */\nexport type SchemaMigrationRunner = (context: SchemaMigrationRunContext) => unknown | Promise<unknown>;\n\n/**\n * Documents the schema migration definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SchemaMigrationDefinition {\n id?: string;\n description?: string;\n status?: string;\n mandatory?: boolean;\n run?: SchemaMigrationRunner;\n [key: string]: unknown;\n}\n\n/**\n * Documents the import export context payload exchanged by command, SDK, and package integrations.\n */\nexport interface ImportExportContext {\n registration: string;\n action: \"import\" | \"export\";\n command: string;\n args: string[];\n options: Record<string, unknown>;\n global: GlobalOptions;\n pm_root: string;\n}\n\n/**\n * Restricts importer values accepted by command, SDK, and storage contracts.\n */\nexport type Importer = (context: ImportExportContext) => unknown | Promise<unknown>;\n/**\n * Restricts exporter values accepted by command, SDK, and storage contracts.\n */\nexport type Exporter = (context: ImportExportContext) => unknown | Promise<unknown>;\n\n/**\n * Restricts extension search mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionSearchMode = \"keyword\" | \"semantic\" | \"hybrid\";\n\n/**\n * Documents the search provider query context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderQueryContext {\n query: string;\n mode: ExtensionSearchMode;\n tokens: string[];\n options: Record<string, unknown>;\n settings: PmSettings;\n documents: ItemDocument[];\n [key: string]: unknown;\n}\n\n/**\n * Documents the search provider hit payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderHit {\n id: string;\n score: number;\n matched_fields?: string[];\n [key: string]: unknown;\n}\n\n/**\n * Restricts search provider query result values accepted by command, SDK, and storage contracts.\n */\nexport type SearchProviderQueryResult = SearchProviderHit[] | { hits?: SearchProviderHit[] };\n\n/**\n * Documents the search provider query expansion context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderQueryExpansionContext {\n query: string;\n mode: Exclude<ExtensionSearchMode, \"keyword\">;\n settings: PmSettings;\n [key: string]: unknown;\n}\n\n/**\n * Restricts search provider query expansion result values accepted by command, SDK, and storage contracts.\n */\nexport type SearchProviderQueryExpansionResult = string[] | { queries?: string[] };\n\n/**\n * Documents the search provider rerank candidate payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderRerankCandidate {\n id: string;\n text: string;\n score: number;\n}\n\n/**\n * Documents the search provider rerank hit payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderRerankHit {\n id: string;\n score: number;\n}\n\n/**\n * Restricts search provider rerank result values accepted by command, SDK, and storage contracts.\n */\nexport type SearchProviderRerankResult = SearchProviderRerankHit[] | { hits?: SearchProviderRerankHit[] };\n\n/**\n * Documents the search provider rerank context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderRerankContext {\n query: string;\n mode: \"hybrid\";\n model: string;\n top_k: number;\n settings: PmSettings;\n candidates: SearchProviderRerankCandidate[];\n [key: string]: unknown;\n}\n\n/**\n * Documents the search provider embed batch context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderEmbedBatchContext {\n inputs: string[];\n settings: PmSettings;\n model: string;\n [key: string]: unknown;\n}\n\n/**\n * Documents the search provider embed context payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderEmbedContext {\n input: string;\n settings: PmSettings;\n model: string;\n [key: string]: unknown;\n}\n\n/**\n * Documents the search provider definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchProviderDefinition {\n name: string;\n query?: (context: SearchProviderQueryContext) => SearchProviderQueryResult | Promise<SearchProviderQueryResult>;\n queryExpansion?: (\n context: SearchProviderQueryExpansionContext,\n ) => SearchProviderQueryExpansionResult | Promise<SearchProviderQueryExpansionResult>;\n query_expansion?: (\n context: SearchProviderQueryExpansionContext,\n ) => SearchProviderQueryExpansionResult | Promise<SearchProviderQueryExpansionResult>;\n rerank?: (context: SearchProviderRerankContext) => SearchProviderRerankResult | Promise<SearchProviderRerankResult>;\n embedBatch?: (context: SearchProviderEmbedBatchContext) => number[][] | Promise<number[][]>;\n embed_batch?: (context: SearchProviderEmbedBatchContext) => number[][] | Promise<number[][]>;\n embed?: (context: SearchProviderEmbedContext) => number[] | Promise<number[]>;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store query hit payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreQueryHit {\n id: string;\n score: number;\n payload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store query context payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreQueryContext {\n vector: number[];\n limit: number;\n settings: PmSettings;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store upsert point payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreUpsertPoint {\n id: string;\n vector: number[];\n payload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store upsert context payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreUpsertContext {\n points: VectorStoreUpsertPoint[];\n settings: PmSettings;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store delete context payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreDeleteContext {\n ids: string[];\n settings: PmSettings;\n [key: string]: unknown;\n}\n\n/**\n * Documents the vector store adapter definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface VectorStoreAdapterDefinition {\n name: string;\n query?: (context: VectorStoreQueryContext) => VectorStoreQueryHit[] | Promise<VectorStoreQueryHit[]>;\n upsert?: (context: VectorStoreUpsertContext) => unknown | Promise<unknown>;\n delete?: (context: VectorStoreDeleteContext) => unknown | Promise<unknown>;\n [key: string]: unknown;\n}\n\n/**\n * Documents the registered extension command override payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionCommandOverride {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: CommandOverride;\n}\n\n/**\n * Documents the registered extension command handler payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionCommandHandler {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: CommandHandler;\n}\n\n/**\n * Documents the registered extension parser override payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionParserOverride {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: ParserOverride;\n}\n\n/**\n * Documents the registered extension preflight override payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionPreflightOverride {\n layer: ExtensionLayer;\n name: string;\n run: PreflightOverride;\n}\n\n/**\n * Documents the registered extension service override payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionServiceOverride {\n layer: ExtensionLayer;\n name: string;\n service: ExtensionServiceName;\n run: ServiceOverride;\n}\n\n/**\n * Documents the registered extension renderer override payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionRendererOverride {\n layer: ExtensionLayer;\n name: string;\n format: OutputRendererFormat;\n run: RendererOverride;\n}\n\n/**\n * Documents the extension command registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCommandRegistry {\n overrides: RegisteredExtensionCommandOverride[];\n handlers: RegisteredExtensionCommandHandler[];\n}\n\n/**\n * Documents the extension parser registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionParserRegistry {\n overrides: RegisteredExtensionParserOverride[];\n}\n\n/**\n * Documents the extension preflight registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionPreflightRegistry {\n overrides: RegisteredExtensionPreflightOverride[];\n}\n\n/**\n * Documents the extension service registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionServiceRegistry {\n overrides: RegisteredExtensionServiceOverride[];\n}\n\n/**\n * Documents the extension renderer registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionRendererRegistry {\n overrides: RegisteredExtensionRendererOverride[];\n}\n\n/**\n * Documents the registered extension flag definitions payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionFlagDefinitions {\n layer: ExtensionLayer;\n name: string;\n target_command: string;\n flags: FlagDefinition[];\n}\n\n/**\n * Documents the registered extension command definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionCommandDefinition {\n layer: ExtensionLayer;\n name: string;\n source_package?: string;\n command: string;\n action: string;\n description?: string;\n intent?: string;\n examples: string[];\n failure_hints: string[];\n arguments: ExtensionCommandArgumentDefinition[];\n}\n\n/**\n * Documents the registered extension schema field definitions payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionSchemaFieldDefinitions {\n layer: ExtensionLayer;\n name: string;\n fields: SchemaFieldDefinition[];\n}\n\n/**\n * Documents the registered extension schema item type definitions payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionSchemaItemTypeDefinitions {\n layer: ExtensionLayer;\n name: string;\n types: SchemaItemTypeDefinition[];\n}\n\n/**\n * Documents the registered extension schema migration definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionSchemaMigrationDefinition {\n layer: ExtensionLayer;\n name: string;\n definition: SchemaMigrationDefinition;\n runtime_definition: SchemaMigrationDefinition;\n}\n\n/**\n * Documents the registered extension importer payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionImporter {\n layer: ExtensionLayer;\n name: string;\n importer: string;\n}\n\n/**\n * Documents the registered extension exporter payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionExporter {\n layer: ExtensionLayer;\n name: string;\n exporter: string;\n}\n\n/**\n * Documents the registered extension search provider payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionSearchProvider {\n layer: ExtensionLayer;\n name: string;\n definition: SearchProviderDefinition;\n runtime_definition: SearchProviderDefinition;\n}\n\n/**\n * Documents the registered extension vector store adapter payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExtensionVectorStoreAdapter {\n layer: ExtensionLayer;\n name: string;\n definition: VectorStoreAdapterDefinition;\n runtime_definition: VectorStoreAdapterDefinition;\n}\n\n/**\n * Documents a project profile contributed by an extension via\n * `api.registerProfile(profile)`.\n *\n * A profile is the broadest customization primitive an extension can ship: it\n * bundles item types, custom statuses, fields, per-type workflows, config knobs,\n * create templates, and package recommendations into one declarative archetype\n * that `pm profile apply` stages idempotently — the same shape as the\n * core-baked archetypes. Registering one makes it resolvable by name through\n * `pm profile list/show/apply` for as long as the owning package is active.\n */\nexport interface RegisteredExtensionProjectProfile {\n layer: ExtensionLayer;\n name: string;\n profile: ProjectProfileDefinition;\n}\n\n/**\n * Documents the extension registration registry payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionRegistrationRegistry {\n commands: RegisteredExtensionCommandDefinition[];\n flags: RegisteredExtensionFlagDefinitions[];\n item_fields: RegisteredExtensionSchemaFieldDefinitions[];\n item_types: RegisteredExtensionSchemaItemTypeDefinitions[];\n migrations: RegisteredExtensionSchemaMigrationDefinition[];\n profiles: RegisteredExtensionProjectProfile[];\n importers: RegisteredExtensionImporter[];\n exporters: RegisteredExtensionExporter[];\n search_providers: RegisteredExtensionSearchProvider[];\n vector_store_adapters: RegisteredExtensionVectorStoreAdapter[];\n}\n\n/**\n * Documents the extension registration counts payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionRegistrationCounts {\n commands: number;\n flags: number;\n item_fields: number;\n item_types: number;\n migrations: number;\n profiles: number;\n importers: number;\n exporters: number;\n search_providers: number;\n vector_store_adapters: number;\n}\n\n/**\n * Read-only identity an extension's `activate(api)` receives about itself, so\n * authors can emit self-identifying logs, gate on their own version, and build\n * better error messages without re-reading the on-disk manifest or duplicating\n * metadata in-module. Exposed as `api.extension`.\n */\nexport interface ExtensionSelfIdentity {\n readonly name: string;\n readonly layer: ExtensionLayer;\n readonly version: string;\n readonly capabilities: readonly ExtensionCapability[];\n readonly pm_min_version?: string;\n readonly pm_max_version?: string;\n readonly source_package?: string;\n}\n\n/**\n * Documents the extension api payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionApi {\n /** Read-only identity of the extension this `api` was created for. */\n readonly extension: ExtensionSelfIdentity;\n registerCommand(command: string, override: CommandOverride): void;\n registerCommand(definition: CommandDefinition): void;\n registerParser(command: string, override: ParserOverride): void;\n registerPreflight(override: PreflightOverride): void;\n registerService(service: ExtensionServiceName, override: ServiceOverride): void;\n registerFlags(targetCommand: string, flags: FlagDefinition[]): void;\n registerItemFields(fields: SchemaFieldDefinition[]): void;\n registerItemTypes(types: SchemaItemTypeDefinition[]): void;\n registerMigration(definition: SchemaMigrationDefinition): void;\n registerProfile(profile: ProjectProfileRegistrationInput): void;\n registerRenderer(format: OutputRendererFormat, renderer: RendererOverride): void;\n registerImporter(name: string, importer: Importer, options?: ImportExportRegistrationOptions): void;\n registerExporter(name: string, exporter: Exporter, options?: ImportExportRegistrationOptions): void;\n registerSearchProvider(provider: SearchProviderDefinition): void;\n registerVectorStoreAdapter(adapter: VectorStoreAdapterDefinition): void;\n hooks: {\n beforeCommand(hook: BeforeCommandHook): void;\n afterCommand(hook: AfterCommandHook): void;\n onWrite(hook: OnWriteHook): void;\n onRead(hook: OnReadHook): void;\n onIndex(hook: OnIndexHook): void;\n };\n}\n\n/**\n * Documents the failed extension activation payload exchanged by command, SDK, and package integrations.\n */\nexport interface FailedExtensionActivation {\n layer: ExtensionLayer;\n name: string;\n entry_path: string;\n error: string;\n trace?: ExtensionActivationFailureTrace;\n}\n\n/**\n * Documents the extension activation failure trace payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionActivationFailureTrace {\n method: string;\n /** `-1` means the failure happened before a numbered registration was accepted. */\n registration_index: number;\n command?: string;\n capability?: ExtensionCapability;\n missing_capability?: ExtensionCapability;\n expected_schema: string;\n received?: unknown;\n hint?: string;\n}\n\n/**\n * Documents the extension activation result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionActivationResult {\n hooks: ExtensionHookRegistry;\n commands: ExtensionCommandRegistry;\n parsers: ExtensionParserRegistry;\n preflight: ExtensionPreflightRegistry;\n services: ExtensionServiceRegistry;\n renderers: ExtensionRendererRegistry;\n registrations: ExtensionRegistrationRegistry;\n failed: FailedExtensionActivation[];\n warnings: string[];\n hook_counts: {\n before_command: number;\n after_command: number;\n on_write: number;\n on_read: number;\n on_index: number;\n };\n command_override_count: number;\n command_handler_count: number;\n parser_override_count: number;\n preflight_override_count: number;\n service_override_count: number;\n renderer_override_count: number;\n registration_counts: ExtensionRegistrationCounts;\n}\n\n/**\n * Documents the extension candidate payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCandidate {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n entry_path: string;\n manifest: ExtensionManifest;\n source_package?: string;\n}\n\n/**\n * Documents the extension layer scan result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionLayerScanResult {\n diagnostics: ExtensionDiagnostic[];\n warnings: string[];\n candidates: ExtensionCandidate[];\n}\n\n/**\n * Documents the scanned extension directory payload exchanged by command, SDK, and package integrations.\n */\nexport interface ScannedExtensionDirectory {\n diagnostic: ExtensionDiagnostic;\n warnings: string[];\n candidate: ExtensionCandidate | null;\n}\n\n/**\n * Documents the legacy extension capability alias mapping payload exchanged by command, SDK, and package integrations.\n */\nexport interface LegacyExtensionCapabilityAliasMapping {\n alias: string;\n target: ExtensionCapability;\n}\n\n/**\n * Documents the discover extensions options payload exchanged by command, SDK, and package integrations.\n */\nexport interface DiscoverExtensionsOptions {\n pmRoot: string;\n settings: PmSettings;\n cwd?: string;\n noExtensions?: boolean;\n ignoreGlobalExtensions?: boolean;\n reload_token?: string;\n cache_bust?: boolean;\n /**\n * Optional import-stage filter. Discovery still reports the full effective set,\n * but `loadExtensions` imports only entries accepted by this predicate.\n */\n extensionFilter?: (extension: EffectiveExtension) => boolean;\n}\n\n/**\n * Documents the activatable extension payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivatableExtension {\n activate: (api: ExtensionApi) => void | Promise<void>;\n /**\n * Optional teardown lifecycle hook, analogous to VS Code's `deactivate`\n * export. Invoked when the host tears the extension down — on long-running\n * MCP-server reload between requests, or via the `deactivateExtensions`\n * primitive — so an extension can close connections, clear timers, and\n * release buffers it opened during `activate`.\n */\n deactivate?: () => void | Promise<void>;\n}\n\n/**\n * Documents the extension deactivation failure payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDeactivationFailure {\n layer: ExtensionLayer;\n name: string;\n error: string;\n}\n\n/**\n * Documents the extension deactivation options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDeactivationOptions {\n /**\n * Maximum time to wait for each extension's `deactivate` hook. Defaults to\n * 5000ms so a hanging teardown cannot block host shutdown or reload. Set to\n * 0 or Infinity only when the host intentionally wants to wait indefinitely.\n */\n deactivate_timeout_ms?: number;\n}\n\n/**\n * Documents the extension deactivation result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDeactivationResult {\n /** Count of loaded extensions whose `deactivate` hook ran without throwing. */\n deactivated: number;\n warnings: string[];\n failed: ExtensionDeactivationFailure[];\n}\n\n/**\n * Documents the service override result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ServiceOverrideResult {\n handled: boolean;\n result: unknown;\n warnings: string[];\n}\n\n/**\n * Documents the command override result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandOverrideResult {\n overridden: boolean;\n result: unknown;\n warnings: string[];\n}\n\n/**\n * Documents the command handler result payload exchanged by command, SDK, and package integrations.\n */\nexport interface CommandHandlerResult {\n handled: boolean;\n result: unknown;\n warnings: string[];\n /**\n * Human-readable, single-line, length-bounded message describing why an\n * extension command handler failed. Surfaced to the user/CI so the real cause\n * (e.g. \"Changelog is out of date: CHANGELOG.md\") is visible instead of only\n * the opaque `extension_command_handler_failed` warning code.\n */\n errorMessage?: string;\n}\n\n/**\n * Documents the parser override result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ParserOverrideResult {\n overridden: boolean;\n context: CommandHandlerContext;\n warnings: string[];\n}\n\n/**\n * Documents the preflight override result payload exchanged by command, SDK, and package integrations.\n */\nexport interface PreflightOverrideResult {\n overridden: boolean;\n context: CommandHandlerContext;\n decision: PreflightRuntimeDecision;\n warnings: string[];\n}\n\n/**\n * Documents the renderer override result payload exchanged by command, SDK, and package integrations.\n */\nexport interface RendererOverrideResult {\n overridden: boolean;\n rendered: string | null;\n warnings: string[];\n}\n\n/**\n * Documents the unknown extension capability warning details payload exchanged by command, SDK, and package integrations.\n */\nexport interface UnknownExtensionCapabilityWarningDetails {\n layer: ExtensionLayer;\n name: string;\n capability: string;\n allowed_capabilities: string[];\n capability_contract_version: number;\n suggested_capability?: string;\n suggestion_source?: \"legacy_alias\" | \"nearest_match\";\n legacy_alias_target?: string;\n}\n"],"names":[],"mappings":";;AAgBA,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,UAAU;IACV,WAAW;IACX,OAAO;IACP,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,UAAU;CACF,CAAC;AAKX,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,mCAAmC,GAAkD,MAAM,CAAC,MAAM,CAAC;IAC9G,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,QAAQ;CACrB,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC;IACzD,OAAO,EAAE,qCAAqC;IAC9C,YAAY,EAAE,CAAC,GAAG,4BAA4B,CAAC;IAC/C,cAAc,EAAE,EAAE,GAAG,mCAAmC,EAAE;CAC3D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAKhF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAK/E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAU,CAAC;AAM1F,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;AAe9E,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IACrB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,eAAe;IACf,cAAc;IACd,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,iBAAiB;IACjB,oBAAoB;IACpB,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,oBAAoB;CACZ,CAAC;AAMX,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,eAAe;IACf,cAAc;IACd,aAAa;IACb,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;CACX,CAAC;AA0DX;;GAEG;AACH,MAAM,UAAU,sCAAsC;IACpD,OAAO;QACL,IAAI,EAAE,KAAK;QACX,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,kBAAkB,EAAE,EAAE;QACtB,uBAAuB,EAAE,MAAM;QAC/B,kBAAkB,EAAE,EAAE;QACtB,kBAAkB,EAAE,EAAE;QACtB,oBAAoB,EAAE,EAAE;QACxB,oBAAoB,EAAE,EAAE;QACxB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,eAAe,EAAE,EAAE;QACnB,eAAe,EAAE,EAAE;QACnB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,mBAAmB,EAAE,EAAE;KACxB,CAAC;AACJ,CAAC","debugId":"3e44d901-11ef-5bb5-b0bf-37576240fe79"}