@unbrained/pm-cli 2026.6.20 → 2026.6.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/cli/commands/completion.js +5 -3
  3. package/dist/cli/commands/completion.js.map +1 -1
  4. package/dist/cli/commands/extension/doctor.d.ts +11 -0
  5. package/dist/cli/commands/extension/doctor.js +31 -2
  6. package/dist/cli/commands/extension/doctor.js.map +1 -1
  7. package/dist/cli/commands/extension/scaffold.d.ts +16 -2
  8. package/dist/cli/commands/extension/scaffold.js +499 -20
  9. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  10. package/dist/cli/commands/extension.d.ts +1 -0
  11. package/dist/cli/commands/extension.js +16 -4
  12. package/dist/cli/commands/extension.js.map +1 -1
  13. package/dist/cli/commands/health.js +15 -3
  14. package/dist/cli/commands/health.js.map +1 -1
  15. package/dist/cli/commands/validate.d.ts +1 -1
  16. package/dist/cli/commands/validate.js +44 -2
  17. package/dist/cli/commands/validate.js.map +1 -1
  18. package/dist/cli/help-content.js +16 -4
  19. package/dist/cli/help-content.js.map +1 -1
  20. package/dist/cli/register-setup.js +6 -2
  21. package/dist/cli/register-setup.js.map +1 -1
  22. package/dist/cli-bundle/chunks/{activity-KEEITOTB.js → activity-DXS2XMQU.js} +11 -11
  23. package/dist/cli-bundle/chunks/activity-NEOI45NX.js +18 -0
  24. package/dist/cli-bundle/chunks/{aggregate-5BTHOHW2.js → aggregate-IHM4KMQ3.js} +10 -10
  25. package/dist/cli-bundle/chunks/{aggregate-GB2LJNTZ.js → aggregate-NMYDVQF7.js} +10 -10
  26. package/dist/cli-bundle/chunks/{append-BBM4MNVD.js → append-3HY5G7ET.js} +8 -8
  27. package/dist/cli-bundle/chunks/{append-BFV5UYWS.js → append-K54MDQYC.js} +8 -8
  28. package/dist/cli-bundle/chunks/{chunk-DKWIPIJY.js → chunk-25XZN3JD.js} +2 -2
  29. package/dist/cli-bundle/chunks/{chunk-GF44HVZL.js → chunk-2LEYMXI6.js} +4 -4
  30. package/dist/cli-bundle/chunks/chunk-3GL6LTUL.js +643 -0
  31. package/dist/cli-bundle/chunks/chunk-3GL6LTUL.js.map +1 -0
  32. package/dist/cli-bundle/chunks/{chunk-XNQ3YH6N.js → chunk-3VLPDG3J.js} +2 -2
  33. package/dist/cli-bundle/chunks/{chunk-W2ZESOQE.js → chunk-44O4JIN6.js} +13 -13
  34. package/dist/cli-bundle/chunks/{chunk-RADIHKJ3.js → chunk-47HTJ6BU.js} +5 -5
  35. package/dist/cli-bundle/chunks/{chunk-B3LROPTV.js → chunk-4JXWVHMN.js} +2 -2
  36. package/dist/cli-bundle/chunks/{chunk-HWHZ7EY7.js → chunk-4SDKF5BG.js} +3 -3
  37. package/dist/cli-bundle/chunks/chunk-4YJA4LGU.js +646 -0
  38. package/dist/cli-bundle/chunks/chunk-4YJA4LGU.js.map +7 -0
  39. package/dist/cli-bundle/chunks/{chunk-RNKUCHUQ.js → chunk-5SESR24H.js} +8 -8
  40. package/dist/cli-bundle/chunks/{chunk-RICT5QYR.js → chunk-6FQHNHQQ.js} +3 -3
  41. package/dist/cli-bundle/chunks/{chunk-FA5O2DEG.js → chunk-6UPTNMVW.js} +5 -5
  42. package/dist/cli-bundle/chunks/{chunk-4KFL5OYK.js → chunk-75VEYQJS.js} +3 -3
  43. package/dist/cli-bundle/chunks/{chunk-2ZY5SLNR.js → chunk-77VKGH4L.js} +10 -10
  44. package/dist/cli-bundle/chunks/{chunk-H3ZTSYPA.js → chunk-7GCCDXXN.js} +57 -223
  45. package/dist/cli-bundle/chunks/chunk-7GCCDXXN.js.map +7 -0
  46. package/dist/cli-bundle/chunks/{chunk-6Y7IQ6XN.js → chunk-7MALIV5H.js} +9 -9
  47. package/dist/cli-bundle/chunks/{chunk-MFCFHL27.js → chunk-7MPTFYT3.js} +20 -15
  48. package/dist/cli-bundle/chunks/chunk-7MPTFYT3.js.map +1 -0
  49. package/dist/cli-bundle/chunks/{chunk-NMQNXH4U.js → chunk-7PBGTIN3.js} +5 -5
  50. package/dist/cli-bundle/chunks/{chunk-3KVCMB2M.js → chunk-A25LOPRG.js} +2 -2
  51. package/dist/cli-bundle/chunks/{chunk-6KSFULO6.js → chunk-A7E4ZXG2.js} +2 -2
  52. package/dist/cli-bundle/chunks/{chunk-ZHCSGIUX.js → chunk-AJXYOYJV.js} +2 -2
  53. package/dist/cli-bundle/chunks/{chunk-PF5GLFPU.js → chunk-B2KR24R4.js} +9 -9
  54. package/dist/cli-bundle/chunks/{chunk-ZYG4TR32.js → chunk-C5SWTISA.js} +12 -12
  55. package/dist/cli-bundle/chunks/{chunk-F4EYOSNC.js → chunk-CLLVBO3I.js} +2 -2
  56. package/dist/cli-bundle/chunks/{chunk-5MWA46UN.js → chunk-CR7KFPAQ.js} +61 -4
  57. package/dist/cli-bundle/chunks/chunk-CR7KFPAQ.js.map +7 -0
  58. package/dist/cli-bundle/chunks/{chunk-4PW4C3ZB.js → chunk-CWPBGUC7.js} +2 -2
  59. package/dist/cli-bundle/chunks/{chunk-LTUB7ARL.js → chunk-D35LTIFR.js} +57 -216
  60. package/dist/cli-bundle/chunks/chunk-D35LTIFR.js.map +1 -0
  61. package/dist/cli-bundle/chunks/{chunk-J7VSEFWB.js → chunk-DBQUQ3AS.js} +3 -3
  62. package/dist/cli-bundle/chunks/{chunk-2LUNPA3U.js → chunk-DHBPJ7VG.js} +2 -2
  63. package/dist/cli-bundle/chunks/{chunk-6FSPWUBI.js → chunk-DMT4ODVN.js} +2 -2
  64. package/dist/cli-bundle/chunks/{chunk-XXGAWTH5.js → chunk-DU64SZUQ.js} +2 -2
  65. package/dist/cli-bundle/chunks/{chunk-CNPWCUDR.js → chunk-EVPVCE4R.js} +3 -3
  66. package/dist/cli-bundle/chunks/{chunk-ACULWT7G.js → chunk-FK6MV5F5.js} +12 -12
  67. package/dist/cli-bundle/chunks/{chunk-XKJDCJEH.js → chunk-GGAXE22C.js} +6 -6
  68. package/dist/cli-bundle/chunks/{chunk-SL233DQD.js → chunk-GNDHOR64.js} +6 -6
  69. package/dist/cli-bundle/chunks/{chunk-U3WTMYBX.js → chunk-GU7YHKYP.js} +2 -2
  70. package/dist/cli-bundle/chunks/{chunk-26OQTCGH.js → chunk-GXBSFKSX.js} +4 -4
  71. package/dist/cli-bundle/chunks/{chunk-AOCYDQLT.js → chunk-H6FNDCDI.js} +5 -5
  72. package/dist/cli-bundle/chunks/{chunk-ICEWMJYH.js → chunk-HYQV75IB.js} +7 -7
  73. package/dist/cli-bundle/chunks/{chunk-5XK2RYJR.js → chunk-I367IDZP.js} +7 -7
  74. package/dist/cli-bundle/chunks/{chunk-E4E7UQBT.js → chunk-I6XE47J2.js} +5 -5
  75. package/dist/cli-bundle/chunks/{chunk-NKTUBA2C.js → chunk-J2TSPY5L.js} +4 -4
  76. package/dist/cli-bundle/chunks/{chunk-IWKD7B33.js → chunk-JINYH2DB.js} +23 -2
  77. package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +7 -0
  78. package/dist/cli-bundle/chunks/{chunk-DYOJJTCG.js → chunk-JLSC5NPC.js} +10 -10
  79. package/dist/cli-bundle/chunks/{chunk-FXKPUMIR.js → chunk-JY25IOEZ.js} +5 -5
  80. package/dist/cli-bundle/chunks/{chunk-NCGQ27PK.js → chunk-K25UDYJ4.js} +2 -2
  81. package/dist/cli-bundle/chunks/{chunk-3WAKNI2W.js → chunk-KBTREGVO.js} +3 -3
  82. package/dist/cli-bundle/chunks/{chunk-KCJZREBI.js → chunk-KK4TQ3ZP.js} +2 -2
  83. package/dist/cli-bundle/chunks/{chunk-AZ75OVK4.js → chunk-KL5ELX2X.js} +82 -3
  84. package/dist/cli-bundle/chunks/chunk-KL5ELX2X.js.map +1 -0
  85. package/dist/cli-bundle/chunks/{chunk-7MMXBIRZ.js → chunk-KRJJPDUO.js} +2 -2
  86. package/dist/cli-bundle/chunks/{chunk-BYNJWB5F.js → chunk-MD7XKVWI.js} +7 -7
  87. package/dist/cli-bundle/chunks/{chunk-WFOITX4A.js → chunk-MNGAQB2E.js} +8 -8
  88. package/dist/cli-bundle/chunks/{chunk-II4BRHKM.js → chunk-NIWY4V4Z.js} +3 -3
  89. package/dist/cli-bundle/chunks/{chunk-YT4Z2OVB.js → chunk-NKZOJPXK.js} +3 -3
  90. package/dist/cli-bundle/chunks/{chunk-YBQF4CAW.js → chunk-NVUATMTC.js} +3 -3
  91. package/dist/cli-bundle/chunks/{chunk-FSOJCFDS.js → chunk-P7ZU73BO.js} +55 -5
  92. package/dist/cli-bundle/chunks/chunk-P7ZU73BO.js.map +1 -0
  93. package/dist/cli-bundle/chunks/{chunk-MTQK5ZSB.js → chunk-PCH2JTEO.js} +2 -2
  94. package/dist/cli-bundle/chunks/{chunk-VE3BUO3R.js → chunk-PJS2J7Z4.js} +3 -3
  95. package/dist/cli-bundle/chunks/{chunk-2QJLN4KM.js → chunk-QQWEROGS.js} +7 -7
  96. package/dist/cli-bundle/chunks/{chunk-OLEP5TJH.js → chunk-R2EMWY7Q.js} +24 -3
  97. package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +1 -0
  98. package/dist/cli-bundle/chunks/{chunk-6DZO5NN7.js → chunk-RPRFBXND.js} +3 -3
  99. package/dist/cli-bundle/chunks/{chunk-QWAJPGEI.js → chunk-RZZMSY4P.js} +91 -5
  100. package/dist/cli-bundle/chunks/chunk-RZZMSY4P.js.map +7 -0
  101. package/dist/cli-bundle/chunks/{chunk-BBSUVIIT.js → chunk-SFKQAVZA.js} +8 -8
  102. package/dist/cli-bundle/chunks/{chunk-X3CD2VUI.js → chunk-THKDPOS5.js} +8 -8
  103. package/dist/cli-bundle/chunks/{chunk-OVSFW4KD.js → chunk-TIKJAXQW.js} +3 -3
  104. package/dist/cli-bundle/chunks/{chunk-4YMX7XFI.js → chunk-TJABI6PR.js} +5 -5
  105. package/dist/cli-bundle/chunks/{chunk-VONJSFUW.js → chunk-TRUFOER3.js} +19 -14
  106. package/dist/cli-bundle/chunks/{chunk-VONJSFUW.js.map → chunk-TRUFOER3.js.map} +2 -2
  107. package/dist/cli-bundle/chunks/{chunk-AW4PYYNF.js → chunk-TZQKEBKF.js} +2 -2
  108. package/dist/cli-bundle/chunks/{chunk-QUTJOHGK.js → chunk-UKK2VTTH.js} +9 -9
  109. package/dist/cli-bundle/chunks/{chunk-ATRXPXAL.js → chunk-V4SM4UAL.js} +13 -13
  110. package/dist/cli-bundle/chunks/{chunk-6KARQMC6.js → chunk-VB54F347.js} +2 -2
  111. package/dist/cli-bundle/chunks/{chunk-6LTSLEHD.js → chunk-WBSYW3NT.js} +2 -2
  112. package/dist/cli-bundle/chunks/{chunk-4S4INK3B.js → chunk-WQDX7DVG.js} +7 -7
  113. package/dist/cli-bundle/chunks/{chunk-ETJKPURB.js → chunk-XKNF3VRJ.js} +5 -5
  114. package/dist/cli-bundle/chunks/{chunk-BZWIDTDE.js → chunk-Y335KFHD.js} +9 -9
  115. package/dist/cli-bundle/chunks/{chunk-K2LBDYDC.js → chunk-Y4BZEND6.js} +2 -2
  116. package/dist/cli-bundle/chunks/{chunk-EOFROIC5.js → chunk-YATDFWYK.js} +7 -7
  117. package/dist/cli-bundle/chunks/{chunk-EKMHDL6Z.js → chunk-YJICYNAV.js} +8 -8
  118. package/dist/cli-bundle/chunks/{chunk-WMQBNVZL.js → chunk-YQSWTVZF.js} +4 -4
  119. package/dist/cli-bundle/chunks/{chunk-FBBPCSJM.js → chunk-YRLLL5TY.js} +8 -8
  120. package/dist/cli-bundle/chunks/{claim-G57ZJLZ4.js → claim-MPXNVBZQ.js} +10 -10
  121. package/dist/cli-bundle/chunks/{claim-TRSDQO6L.js → claim-SKHJDLW6.js} +10 -10
  122. package/dist/cli-bundle/chunks/{close-4QMUQMON.js → close-4RKSL5L6.js} +8 -8
  123. package/dist/cli-bundle/chunks/close-Z6AI736U.js +15 -0
  124. package/dist/cli-bundle/chunks/{close-many-3UWKJRQK.js → close-many-AWTPXLHJ.js} +15 -15
  125. package/dist/cli-bundle/chunks/{close-many-A7U62CRI.js → close-many-SXODYBDP.js} +15 -15
  126. package/dist/cli-bundle/chunks/{comments-URWDZP2I.js → comments-OOH64LWW.js} +10 -10
  127. package/dist/cli-bundle/chunks/{comments-4EM7XR74.js → comments-YYW5P7AG.js} +10 -10
  128. package/dist/cli-bundle/chunks/{config-PSZ5GWAK.js → config-3445MCQQ.js} +8 -8
  129. package/dist/cli-bundle/chunks/{config-GRJYZ2O3.js → config-LCDMKRB2.js} +8 -8
  130. package/dist/cli-bundle/chunks/{context-BCR34RKM.js → context-DZMIBIVP.js} +13 -13
  131. package/dist/cli-bundle/chunks/{context-A46YAV2F.js → context-PJCURODY.js} +13 -13
  132. package/dist/cli-bundle/chunks/{contracts-JOPCQNDP.js → contracts-7YDFEJB3.js} +4 -4
  133. package/dist/cli-bundle/chunks/{contracts-HPT25X4D.js → contracts-MP2P3HL5.js} +4 -4
  134. package/dist/cli-bundle/chunks/{copy-KBTIUW7L.js → copy-63IQQRRS.js} +7 -7
  135. package/dist/cli-bundle/chunks/{copy-X7V6AEDB.js → copy-TASIH2AZ.js} +7 -7
  136. package/dist/cli-bundle/chunks/create-3BV2VA3Q.js +30 -0
  137. package/dist/cli-bundle/chunks/{create-ZPZKJDFQ.js → create-TGSB5GV4.js} +14 -14
  138. package/dist/cli-bundle/chunks/{delete-FGKVPUQZ.js → delete-ARILQQLB.js} +7 -7
  139. package/dist/cli-bundle/chunks/{delete-2ZI6CJZM.js → delete-ZQKBZYNK.js} +7 -7
  140. package/dist/cli-bundle/chunks/{deps-IUJOBF2H.js → deps-MSHQR2GY.js} +7 -7
  141. package/dist/cli-bundle/chunks/{deps-SJCEFU3C.js → deps-NJFJIMQ5.js} +7 -7
  142. package/dist/cli-bundle/chunks/{docs-UWJ75CKR.js → docs-SS4UKYYA.js} +9 -9
  143. package/dist/cli-bundle/chunks/{docs-2LXF5SVC.js → docs-XK2UVUXX.js} +9 -9
  144. package/dist/cli-bundle/chunks/{eval-ZTT3F3SL.js → eval-FVZGX5IZ.js} +12 -12
  145. package/dist/cli-bundle/chunks/{eval-FRIDCTM2.js → eval-JOTG2YHU.js} +12 -12
  146. package/dist/cli-bundle/chunks/{extension-VRYTNNSV.js → extension-NLMS47I4.js} +6 -5
  147. package/dist/cli-bundle/chunks/{extension-XFQG3BXL.js → extension-OQPS27B4.js} +6 -5
  148. package/dist/cli-bundle/chunks/{files-AJOGTTAN.js → files-3EVJQZ2N.js} +9 -9
  149. package/dist/cli-bundle/chunks/{files-B2RUCA32.js → files-Y2P6LN5A.js} +9 -9
  150. package/dist/cli-bundle/chunks/{focus-7N36RIMT.js → focus-D5ZUPTII.js} +8 -8
  151. package/dist/cli-bundle/chunks/{focus-CFE33IYC.js → focus-ZPIFTY4R.js} +8 -8
  152. package/dist/cli-bundle/chunks/{gc-SBF2FGHK.js → gc-LXXDY456.js} +3 -3
  153. package/dist/cli-bundle/chunks/{gc-OYJK4YBY.js → gc-RNOEQHSX.js} +3 -3
  154. package/dist/cli-bundle/chunks/{get-LLFWSPXW.js → get-Q3SZGQHD.js} +11 -11
  155. package/dist/cli-bundle/chunks/{get-577VLZZ7.js → get-W23G7MJX.js} +11 -11
  156. package/dist/cli-bundle/chunks/{health-PBJS7W2T.js → health-5LHSX365.js} +33 -19
  157. package/dist/cli-bundle/chunks/health-5LHSX365.js.map +7 -0
  158. package/dist/cli-bundle/chunks/{health-C2PUT6JZ.js → health-UDDGJLPP.js} +34 -20
  159. package/dist/cli-bundle/chunks/health-UDDGJLPP.js.map +1 -0
  160. package/dist/cli-bundle/chunks/{history-4FJK6Y3O.js → history-6CZVFIUJ.js} +10 -10
  161. package/dist/cli-bundle/chunks/history-YRQUD4YM.js +20 -0
  162. package/dist/cli-bundle/chunks/{history-compact-AXR6R6GU.js → history-compact-M35PDQ4G.js} +12 -12
  163. package/dist/cli-bundle/chunks/{history-compact-HXF3OT7G.js → history-compact-VWUSQH6Z.js} +12 -12
  164. package/dist/cli-bundle/chunks/history-redact-27OEOZRZ.js +21 -0
  165. package/dist/cli-bundle/chunks/{history-redact-UMPD4G3K.js → history-redact-AJGARHT3.js} +11 -11
  166. package/dist/cli-bundle/chunks/{history-repair-WHOK2ICG.js → history-repair-5RDMF7K4.js} +12 -12
  167. package/dist/cli-bundle/chunks/{history-repair-X57HE5EA.js → history-repair-YUAHIPIN.js} +12 -12
  168. package/dist/cli-bundle/chunks/init-DWAKYRXI.js +21 -0
  169. package/dist/cli-bundle/chunks/{init-N7MIIYCU.js → init-HASX3YNJ.js} +11 -10
  170. package/dist/cli-bundle/chunks/{learnings-GZRBIEAN.js → learnings-JNGUIJDK.js} +10 -10
  171. package/dist/cli-bundle/chunks/{learnings-FPG7WAVW.js → learnings-M4KA6MQE.js} +10 -10
  172. package/dist/cli-bundle/chunks/{list-ZDQ2OBSO.js → list-5UU2W24O.js} +10 -10
  173. package/dist/cli-bundle/chunks/{list-MZBCSKLU.js → list-6FMKTIH3.js} +10 -10
  174. package/dist/cli-bundle/chunks/{notes-LW53PFLH.js → notes-MODH5CBT.js} +10 -10
  175. package/dist/cli-bundle/chunks/{notes-WQAP67EC.js → notes-PYCPLA5Y.js} +10 -10
  176. package/dist/cli-bundle/chunks/{plan-VZKICKIJ.js → plan-DXRIRYRU.js} +14 -14
  177. package/dist/cli-bundle/chunks/{plan-AVJ4VJQO.js → plan-EHQALWSC.js} +14 -14
  178. package/dist/cli-bundle/chunks/{register-list-query-7BD6ZHU5.js → register-list-query-QAASVP2J.js} +19 -19
  179. package/dist/cli-bundle/chunks/{register-list-query-CM4SVAQA.js → register-list-query-WE54YJMH.js} +19 -19
  180. package/dist/cli-bundle/chunks/{register-mutation-ANZIWHUF.js → register-mutation-B6DZJTY2.js} +33 -33
  181. package/dist/cli-bundle/chunks/{register-mutation-PLFHAS4N.js → register-mutation-CPV4C2KR.js} +33 -33
  182. package/dist/cli-bundle/chunks/{register-operations-KQPQIFF2.js → register-operations-AT3BVVX2.js} +32 -32
  183. package/dist/cli-bundle/chunks/{register-operations-VLGCAWIW.js → register-operations-RC4C3423.js} +32 -32
  184. package/dist/cli-bundle/chunks/{register-setup-KPTZ36D4.js → register-setup-HXEHMDHE.js} +23 -18
  185. package/dist/cli-bundle/chunks/register-setup-HXEHMDHE.js.map +7 -0
  186. package/dist/cli-bundle/chunks/{register-setup-TMEF6V7O.js → register-setup-JSMJEFCJ.js} +24 -19
  187. package/dist/cli-bundle/chunks/register-setup-JSMJEFCJ.js.map +1 -0
  188. package/dist/cli-bundle/chunks/{restore-64JKQV7G.js → restore-FNBV4GWE.js} +11 -11
  189. package/dist/cli-bundle/chunks/restore-XY4YE2OV.js +19 -0
  190. package/dist/cli-bundle/chunks/{scheduling-shortcuts-X6D6VSZR.js → scheduling-shortcuts-ECL6GBMZ.js} +14 -14
  191. package/dist/cli-bundle/chunks/{scheduling-shortcuts-4ION7QAX.js → scheduling-shortcuts-JRIUREEU.js} +14 -14
  192. package/dist/cli-bundle/chunks/{schema-TA3NF3RG.js → schema-74YENAJL.js} +9 -9
  193. package/dist/cli-bundle/chunks/{schema-OA4RSVMI.js → schema-TCW3I7QR.js} +9 -9
  194. package/dist/cli-bundle/chunks/{search-UAIHEQZL.js → search-7USZ6XZA.js} +12 -12
  195. package/dist/cli-bundle/chunks/{search-INCM5I4J.js → search-GNAUE65M.js} +12 -12
  196. package/dist/cli-bundle/chunks/{stats-RHEMG4CE.js → stats-CVHASAEU.js} +8 -8
  197. package/dist/cli-bundle/chunks/{stats-WQWTIA5Y.js → stats-DQMKJMFT.js} +8 -8
  198. package/dist/cli-bundle/chunks/{telemetry-XA5D2QEO.js → telemetry-7P5EUWCS.js} +4 -4
  199. package/dist/cli-bundle/chunks/{telemetry-G6UKGKJU.js → telemetry-PQTL5YS2.js} +4 -4
  200. package/dist/cli-bundle/chunks/test-COWPCGBE.js +36 -0
  201. package/dist/cli-bundle/chunks/{test-ZMQF23P3.js → test-FDQZQNZ4.js} +16 -15
  202. package/dist/cli-bundle/chunks/{test-all-ZNQBMUOI.js → test-all-PIPPS4S5.js} +18 -17
  203. package/dist/cli-bundle/chunks/{test-all-ZNQBMUOI.js.map → test-all-PIPPS4S5.js.map} +1 -1
  204. package/dist/cli-bundle/chunks/{test-all-WUBBJCPU.js → test-all-WQIAZVA6.js} +16 -15
  205. package/dist/cli-bundle/chunks/{test-all-WUBBJCPU.js.map → test-all-WQIAZVA6.js.map} +1 -1
  206. package/dist/cli-bundle/chunks/{test-runs-N7LI7HLH.js → test-runs-JS6DNCCI.js} +5 -5
  207. package/dist/cli-bundle/chunks/{test-runs-RFA42EEX.js → test-runs-NZD2QGL5.js} +5 -5
  208. package/dist/cli-bundle/chunks/update-7IYQHX4Q.js +24 -0
  209. package/dist/cli-bundle/chunks/update-IJKDRBIX.js +28 -0
  210. package/dist/cli-bundle/chunks/{update-many-6XFR7TFG.js → update-many-6NTZ5J5D.js} +23 -23
  211. package/dist/cli-bundle/chunks/{update-many-NMRUQZL2.js → update-many-B3TH5TDS.js} +23 -23
  212. package/dist/cli-bundle/chunks/{upgrade-QMCSONWR.js → upgrade-4C7VE7MS.js} +8 -7
  213. package/dist/cli-bundle/chunks/{upgrade-QMCSONWR.js.map → upgrade-4C7VE7MS.js.map} +1 -1
  214. package/dist/cli-bundle/chunks/{upgrade-EJTME2YQ.js → upgrade-76IKZ6EZ.js} +6 -5
  215. package/dist/cli-bundle/chunks/{upgrade-EJTME2YQ.js.map → upgrade-76IKZ6EZ.js.map} +1 -1
  216. package/dist/cli-bundle/chunks/{validate-KIIJY5RC.js → validate-AQU7OCL3.js} +62 -23
  217. package/dist/cli-bundle/chunks/validate-AQU7OCL3.js.map +7 -0
  218. package/dist/cli-bundle/chunks/{validate-3SUCHXXX.js → validate-BPM6Z3OT.js} +63 -24
  219. package/dist/cli-bundle/chunks/validate-BPM6Z3OT.js.map +1 -0
  220. package/dist/cli-bundle/main.js +34 -22
  221. package/dist/cli-bundle/main.js.map +2 -2
  222. package/dist/cli.js +3 -3
  223. package/dist/cli.js.map +1 -1
  224. package/dist/core/diagnostics/remediation.js +23 -2
  225. package/dist/core/diagnostics/remediation.js.map +1 -1
  226. package/dist/core/extensions/capability-usage.d.ts +82 -0
  227. package/dist/core/extensions/capability-usage.js +133 -0
  228. package/dist/core/extensions/capability-usage.js.map +1 -0
  229. package/dist/core/extensions/extension-capability-aliases.d.ts +7 -0
  230. package/dist/core/extensions/extension-capability-aliases.js +12 -2
  231. package/dist/core/extensions/extension-capability-aliases.js.map +1 -1
  232. package/dist/core/extensions/index.d.ts +1 -0
  233. package/dist/core/extensions/index.js +3 -2
  234. package/dist/core/extensions/index.js.map +1 -1
  235. package/dist/core/item/item-format-version.d.ts +87 -0
  236. package/dist/core/item/item-format-version.js +85 -0
  237. package/dist/core/item/item-format-version.js.map +1 -0
  238. package/dist/core/item/item-format.js +8 -2
  239. package/dist/core/item/item-format.js.map +1 -1
  240. package/dist/core/shared/constants.js +3 -2
  241. package/dist/core/shared/constants.js.map +1 -1
  242. package/dist/sdk/cli-contracts.d.ts +1 -0
  243. package/dist/sdk/cli-contracts.js +18 -13
  244. package/dist/sdk/cli-contracts.js.map +1 -1
  245. package/dist/sdk/index.d.ts +7 -2
  246. package/dist/sdk/index.js +8 -3
  247. package/dist/sdk/index.js.map +1 -1
  248. package/dist/sdk/runtime.d.ts +1 -0
  249. package/dist/sdk/runtime.js +3 -2
  250. package/dist/sdk/runtime.js.map +1 -1
  251. package/dist/sdk/testing.d.ts +567 -1
  252. package/dist/sdk/testing.js +573 -18
  253. package/dist/sdk/testing.js.map +1 -1
  254. package/dist/types.d.ts +7 -0
  255. package/dist/types.js +2 -2
  256. package/dist/types.js.map +1 -1
  257. package/docs/ARCHITECTURE.md +2 -0
  258. package/docs/COMMANDS.md +2 -0
  259. package/docs/EXTENSIONS.md +4 -8
  260. package/docs/SDK.md +328 -0
  261. package/package.json +2 -2
  262. package/packages/pm-command-kit/README.md +4 -0
  263. package/packages/pm-todos/extensions/todos/runtime.js +191 -8
  264. package/packages/pm-todos/extensions/todos/runtime.ts +207 -7
  265. package/dist/cli-bundle/chunks/activity-7G7NNNZQ.js +0 -18
  266. package/dist/cli-bundle/chunks/chunk-5MWA46UN.js.map +0 -7
  267. package/dist/cli-bundle/chunks/chunk-AZ75OVK4.js.map +0 -1
  268. package/dist/cli-bundle/chunks/chunk-FSOJCFDS.js.map +0 -1
  269. package/dist/cli-bundle/chunks/chunk-H3ZTSYPA.js.map +0 -7
  270. package/dist/cli-bundle/chunks/chunk-IWKD7B33.js.map +0 -7
  271. package/dist/cli-bundle/chunks/chunk-LTUB7ARL.js.map +0 -1
  272. package/dist/cli-bundle/chunks/chunk-MFCFHL27.js.map +0 -1
  273. package/dist/cli-bundle/chunks/chunk-OLEP5TJH.js.map +0 -1
  274. package/dist/cli-bundle/chunks/chunk-QWAJPGEI.js.map +0 -7
  275. package/dist/cli-bundle/chunks/close-NNZZTZ5V.js +0 -15
  276. package/dist/cli-bundle/chunks/create-4KOAQ6ME.js +0 -30
  277. package/dist/cli-bundle/chunks/health-C2PUT6JZ.js.map +0 -1
  278. package/dist/cli-bundle/chunks/health-PBJS7W2T.js.map +0 -7
  279. package/dist/cli-bundle/chunks/history-ZXNWG6H4.js +0 -20
  280. package/dist/cli-bundle/chunks/history-redact-GV633Z4H.js +0 -21
  281. package/dist/cli-bundle/chunks/init-KQWZSNBX.js +0 -20
  282. package/dist/cli-bundle/chunks/register-setup-KPTZ36D4.js.map +0 -7
  283. package/dist/cli-bundle/chunks/register-setup-TMEF6V7O.js.map +0 -1
  284. package/dist/cli-bundle/chunks/restore-GKM26SAW.js +0 -19
  285. package/dist/cli-bundle/chunks/test-XF7BYLMZ.js +0 -35
  286. package/dist/cli-bundle/chunks/update-CPNOG73P.js +0 -24
  287. package/dist/cli-bundle/chunks/update-T5AYT6ZN.js +0 -28
  288. package/dist/cli-bundle/chunks/validate-3SUCHXXX.js.map +0 -1
  289. package/dist/cli-bundle/chunks/validate-KIIJY5RC.js.map +0 -7
  290. /package/dist/cli-bundle/chunks/{activity-KEEITOTB.js.map → activity-DXS2XMQU.js.map} +0 -0
  291. /package/dist/cli-bundle/chunks/{activity-7G7NNNZQ.js.map → activity-NEOI45NX.js.map} +0 -0
  292. /package/dist/cli-bundle/chunks/{aggregate-5BTHOHW2.js.map → aggregate-IHM4KMQ3.js.map} +0 -0
  293. /package/dist/cli-bundle/chunks/{aggregate-GB2LJNTZ.js.map → aggregate-NMYDVQF7.js.map} +0 -0
  294. /package/dist/cli-bundle/chunks/{append-BBM4MNVD.js.map → append-3HY5G7ET.js.map} +0 -0
  295. /package/dist/cli-bundle/chunks/{append-BFV5UYWS.js.map → append-K54MDQYC.js.map} +0 -0
  296. /package/dist/cli-bundle/chunks/{chunk-DKWIPIJY.js.map → chunk-25XZN3JD.js.map} +0 -0
  297. /package/dist/cli-bundle/chunks/{chunk-GF44HVZL.js.map → chunk-2LEYMXI6.js.map} +0 -0
  298. /package/dist/cli-bundle/chunks/{chunk-XNQ3YH6N.js.map → chunk-3VLPDG3J.js.map} +0 -0
  299. /package/dist/cli-bundle/chunks/{chunk-W2ZESOQE.js.map → chunk-44O4JIN6.js.map} +0 -0
  300. /package/dist/cli-bundle/chunks/{chunk-RADIHKJ3.js.map → chunk-47HTJ6BU.js.map} +0 -0
  301. /package/dist/cli-bundle/chunks/{chunk-B3LROPTV.js.map → chunk-4JXWVHMN.js.map} +0 -0
  302. /package/dist/cli-bundle/chunks/{chunk-HWHZ7EY7.js.map → chunk-4SDKF5BG.js.map} +0 -0
  303. /package/dist/cli-bundle/chunks/{chunk-RNKUCHUQ.js.map → chunk-5SESR24H.js.map} +0 -0
  304. /package/dist/cli-bundle/chunks/{chunk-RICT5QYR.js.map → chunk-6FQHNHQQ.js.map} +0 -0
  305. /package/dist/cli-bundle/chunks/{chunk-FA5O2DEG.js.map → chunk-6UPTNMVW.js.map} +0 -0
  306. /package/dist/cli-bundle/chunks/{chunk-4KFL5OYK.js.map → chunk-75VEYQJS.js.map} +0 -0
  307. /package/dist/cli-bundle/chunks/{chunk-2ZY5SLNR.js.map → chunk-77VKGH4L.js.map} +0 -0
  308. /package/dist/cli-bundle/chunks/{chunk-6Y7IQ6XN.js.map → chunk-7MALIV5H.js.map} +0 -0
  309. /package/dist/cli-bundle/chunks/{chunk-NMQNXH4U.js.map → chunk-7PBGTIN3.js.map} +0 -0
  310. /package/dist/cli-bundle/chunks/{chunk-3KVCMB2M.js.map → chunk-A25LOPRG.js.map} +0 -0
  311. /package/dist/cli-bundle/chunks/{chunk-6KSFULO6.js.map → chunk-A7E4ZXG2.js.map} +0 -0
  312. /package/dist/cli-bundle/chunks/{chunk-ZHCSGIUX.js.map → chunk-AJXYOYJV.js.map} +0 -0
  313. /package/dist/cli-bundle/chunks/{chunk-PF5GLFPU.js.map → chunk-B2KR24R4.js.map} +0 -0
  314. /package/dist/cli-bundle/chunks/{chunk-ZYG4TR32.js.map → chunk-C5SWTISA.js.map} +0 -0
  315. /package/dist/cli-bundle/chunks/{chunk-F4EYOSNC.js.map → chunk-CLLVBO3I.js.map} +0 -0
  316. /package/dist/cli-bundle/chunks/{chunk-4PW4C3ZB.js.map → chunk-CWPBGUC7.js.map} +0 -0
  317. /package/dist/cli-bundle/chunks/{chunk-J7VSEFWB.js.map → chunk-DBQUQ3AS.js.map} +0 -0
  318. /package/dist/cli-bundle/chunks/{chunk-2LUNPA3U.js.map → chunk-DHBPJ7VG.js.map} +0 -0
  319. /package/dist/cli-bundle/chunks/{chunk-6FSPWUBI.js.map → chunk-DMT4ODVN.js.map} +0 -0
  320. /package/dist/cli-bundle/chunks/{chunk-XXGAWTH5.js.map → chunk-DU64SZUQ.js.map} +0 -0
  321. /package/dist/cli-bundle/chunks/{chunk-CNPWCUDR.js.map → chunk-EVPVCE4R.js.map} +0 -0
  322. /package/dist/cli-bundle/chunks/{chunk-ACULWT7G.js.map → chunk-FK6MV5F5.js.map} +0 -0
  323. /package/dist/cli-bundle/chunks/{chunk-XKJDCJEH.js.map → chunk-GGAXE22C.js.map} +0 -0
  324. /package/dist/cli-bundle/chunks/{chunk-SL233DQD.js.map → chunk-GNDHOR64.js.map} +0 -0
  325. /package/dist/cli-bundle/chunks/{chunk-U3WTMYBX.js.map → chunk-GU7YHKYP.js.map} +0 -0
  326. /package/dist/cli-bundle/chunks/{chunk-26OQTCGH.js.map → chunk-GXBSFKSX.js.map} +0 -0
  327. /package/dist/cli-bundle/chunks/{chunk-AOCYDQLT.js.map → chunk-H6FNDCDI.js.map} +0 -0
  328. /package/dist/cli-bundle/chunks/{chunk-ICEWMJYH.js.map → chunk-HYQV75IB.js.map} +0 -0
  329. /package/dist/cli-bundle/chunks/{chunk-5XK2RYJR.js.map → chunk-I367IDZP.js.map} +0 -0
  330. /package/dist/cli-bundle/chunks/{chunk-E4E7UQBT.js.map → chunk-I6XE47J2.js.map} +0 -0
  331. /package/dist/cli-bundle/chunks/{chunk-NKTUBA2C.js.map → chunk-J2TSPY5L.js.map} +0 -0
  332. /package/dist/cli-bundle/chunks/{chunk-DYOJJTCG.js.map → chunk-JLSC5NPC.js.map} +0 -0
  333. /package/dist/cli-bundle/chunks/{chunk-FXKPUMIR.js.map → chunk-JY25IOEZ.js.map} +0 -0
  334. /package/dist/cli-bundle/chunks/{chunk-NCGQ27PK.js.map → chunk-K25UDYJ4.js.map} +0 -0
  335. /package/dist/cli-bundle/chunks/{chunk-3WAKNI2W.js.map → chunk-KBTREGVO.js.map} +0 -0
  336. /package/dist/cli-bundle/chunks/{chunk-KCJZREBI.js.map → chunk-KK4TQ3ZP.js.map} +0 -0
  337. /package/dist/cli-bundle/chunks/{chunk-7MMXBIRZ.js.map → chunk-KRJJPDUO.js.map} +0 -0
  338. /package/dist/cli-bundle/chunks/{chunk-BYNJWB5F.js.map → chunk-MD7XKVWI.js.map} +0 -0
  339. /package/dist/cli-bundle/chunks/{chunk-WFOITX4A.js.map → chunk-MNGAQB2E.js.map} +0 -0
  340. /package/dist/cli-bundle/chunks/{chunk-II4BRHKM.js.map → chunk-NIWY4V4Z.js.map} +0 -0
  341. /package/dist/cli-bundle/chunks/{chunk-YT4Z2OVB.js.map → chunk-NKZOJPXK.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{chunk-YBQF4CAW.js.map → chunk-NVUATMTC.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{chunk-MTQK5ZSB.js.map → chunk-PCH2JTEO.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{chunk-VE3BUO3R.js.map → chunk-PJS2J7Z4.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{chunk-2QJLN4KM.js.map → chunk-QQWEROGS.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{chunk-6DZO5NN7.js.map → chunk-RPRFBXND.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{chunk-BBSUVIIT.js.map → chunk-SFKQAVZA.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{chunk-X3CD2VUI.js.map → chunk-THKDPOS5.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{chunk-OVSFW4KD.js.map → chunk-TIKJAXQW.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{chunk-4YMX7XFI.js.map → chunk-TJABI6PR.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{chunk-AW4PYYNF.js.map → chunk-TZQKEBKF.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{chunk-QUTJOHGK.js.map → chunk-UKK2VTTH.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{chunk-ATRXPXAL.js.map → chunk-V4SM4UAL.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{chunk-6KARQMC6.js.map → chunk-VB54F347.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{chunk-6LTSLEHD.js.map → chunk-WBSYW3NT.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{chunk-4S4INK3B.js.map → chunk-WQDX7DVG.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{chunk-ETJKPURB.js.map → chunk-XKNF3VRJ.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{chunk-BZWIDTDE.js.map → chunk-Y335KFHD.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{chunk-K2LBDYDC.js.map → chunk-Y4BZEND6.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{chunk-EOFROIC5.js.map → chunk-YATDFWYK.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{chunk-EKMHDL6Z.js.map → chunk-YJICYNAV.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{chunk-WMQBNVZL.js.map → chunk-YQSWTVZF.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{chunk-FBBPCSJM.js.map → chunk-YRLLL5TY.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{claim-G57ZJLZ4.js.map → claim-MPXNVBZQ.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{claim-TRSDQO6L.js.map → claim-SKHJDLW6.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{close-4QMUQMON.js.map → close-4RKSL5L6.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{close-NNZZTZ5V.js.map → close-Z6AI736U.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{close-many-3UWKJRQK.js.map → close-many-AWTPXLHJ.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{close-many-A7U62CRI.js.map → close-many-SXODYBDP.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{comments-URWDZP2I.js.map → comments-OOH64LWW.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{comments-4EM7XR74.js.map → comments-YYW5P7AG.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{config-PSZ5GWAK.js.map → config-3445MCQQ.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{config-GRJYZ2O3.js.map → config-LCDMKRB2.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{context-BCR34RKM.js.map → context-DZMIBIVP.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{context-A46YAV2F.js.map → context-PJCURODY.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{contracts-JOPCQNDP.js.map → contracts-7YDFEJB3.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{contracts-HPT25X4D.js.map → contracts-MP2P3HL5.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{copy-KBTIUW7L.js.map → copy-63IQQRRS.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{copy-X7V6AEDB.js.map → copy-TASIH2AZ.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{create-4KOAQ6ME.js.map → create-3BV2VA3Q.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{create-ZPZKJDFQ.js.map → create-TGSB5GV4.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{delete-FGKVPUQZ.js.map → delete-ARILQQLB.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{delete-2ZI6CJZM.js.map → delete-ZQKBZYNK.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{deps-IUJOBF2H.js.map → deps-MSHQR2GY.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{deps-SJCEFU3C.js.map → deps-NJFJIMQ5.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{docs-UWJ75CKR.js.map → docs-SS4UKYYA.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{docs-2LXF5SVC.js.map → docs-XK2UVUXX.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{eval-ZTT3F3SL.js.map → eval-FVZGX5IZ.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{eval-FRIDCTM2.js.map → eval-JOTG2YHU.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{extension-VRYTNNSV.js.map → extension-NLMS47I4.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{extension-XFQG3BXL.js.map → extension-OQPS27B4.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{files-AJOGTTAN.js.map → files-3EVJQZ2N.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{files-B2RUCA32.js.map → files-Y2P6LN5A.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{focus-7N36RIMT.js.map → focus-D5ZUPTII.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{focus-CFE33IYC.js.map → focus-ZPIFTY4R.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{gc-SBF2FGHK.js.map → gc-LXXDY456.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{gc-OYJK4YBY.js.map → gc-RNOEQHSX.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{get-LLFWSPXW.js.map → get-Q3SZGQHD.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{get-577VLZZ7.js.map → get-W23G7MJX.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{history-4FJK6Y3O.js.map → history-6CZVFIUJ.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{history-ZXNWG6H4.js.map → history-YRQUD4YM.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{history-compact-AXR6R6GU.js.map → history-compact-M35PDQ4G.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{history-compact-HXF3OT7G.js.map → history-compact-VWUSQH6Z.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{history-redact-GV633Z4H.js.map → history-redact-27OEOZRZ.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{history-redact-UMPD4G3K.js.map → history-redact-AJGARHT3.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{history-repair-WHOK2ICG.js.map → history-repair-5RDMF7K4.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{history-repair-X57HE5EA.js.map → history-repair-YUAHIPIN.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{init-KQWZSNBX.js.map → init-DWAKYRXI.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{init-N7MIIYCU.js.map → init-HASX3YNJ.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{learnings-GZRBIEAN.js.map → learnings-JNGUIJDK.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{learnings-FPG7WAVW.js.map → learnings-M4KA6MQE.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{list-ZDQ2OBSO.js.map → list-5UU2W24O.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{list-MZBCSKLU.js.map → list-6FMKTIH3.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{notes-LW53PFLH.js.map → notes-MODH5CBT.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{notes-WQAP67EC.js.map → notes-PYCPLA5Y.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{plan-VZKICKIJ.js.map → plan-DXRIRYRU.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{plan-AVJ4VJQO.js.map → plan-EHQALWSC.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{register-list-query-7BD6ZHU5.js.map → register-list-query-QAASVP2J.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{register-list-query-CM4SVAQA.js.map → register-list-query-WE54YJMH.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{register-mutation-ANZIWHUF.js.map → register-mutation-B6DZJTY2.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{register-mutation-PLFHAS4N.js.map → register-mutation-CPV4C2KR.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{register-operations-KQPQIFF2.js.map → register-operations-AT3BVVX2.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{register-operations-VLGCAWIW.js.map → register-operations-RC4C3423.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{restore-64JKQV7G.js.map → restore-FNBV4GWE.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{restore-GKM26SAW.js.map → restore-XY4YE2OV.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-X6D6VSZR.js.map → scheduling-shortcuts-ECL6GBMZ.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-4ION7QAX.js.map → scheduling-shortcuts-JRIUREEU.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{schema-TA3NF3RG.js.map → schema-74YENAJL.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{schema-OA4RSVMI.js.map → schema-TCW3I7QR.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{search-UAIHEQZL.js.map → search-7USZ6XZA.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{search-INCM5I4J.js.map → search-GNAUE65M.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{stats-RHEMG4CE.js.map → stats-CVHASAEU.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{stats-WQWTIA5Y.js.map → stats-DQMKJMFT.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{telemetry-XA5D2QEO.js.map → telemetry-7P5EUWCS.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{telemetry-G6UKGKJU.js.map → telemetry-PQTL5YS2.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{test-XF7BYLMZ.js.map → test-COWPCGBE.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{test-ZMQF23P3.js.map → test-FDQZQNZ4.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{test-runs-N7LI7HLH.js.map → test-runs-JS6DNCCI.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{test-runs-RFA42EEX.js.map → test-runs-NZD2QGL5.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{update-CPNOG73P.js.map → update-7IYQHX4Q.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{update-T5AYT6ZN.js.map → update-IJKDRBIX.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{update-many-6XFR7TFG.js.map → update-many-6NTZ5J5D.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{update-many-NMRUQZL2.js.map → update-many-B3TH5TDS.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"testing.js","sources":["sdk/testing.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/testing\n *\n * Defines public SDK APIs and package-author helpers for Testing.\n */\nimport type {\n ExtensionActivationResult,\n ExtensionCapability,\n ExtensionCommandRegistry,\n ExtensionGovernancePolicy,\n ExtensionHookRegistry,\n ExtensionLayer,\n ExtensionManifest,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n FlagDefinition,\n OutputRendererFormat,\n RegisteredExtensionCommandDefinition,\n RegisteredExtensionCommandOverride,\n RegisteredExtensionExporter,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionParserOverride,\n RegisteredExtensionPreflightOverride,\n RegisteredExtensionRendererOverride,\n RegisteredExtensionSchemaFieldDefinitions,\n RegisteredExtensionSchemaItemTypeDefinitions,\n RegisteredExtensionSearchProvider,\n RegisteredExtensionVectorStoreAdapter,\n SchemaFieldDefinition,\n SchemaItemTypeDefinition,\n} from \"../core/extensions/loader.js\";\nimport { activateExtensions } from \"../core/extensions/loader.js\";\nimport { createDefaultExtensionGovernancePolicy } from \"../core/extensions/extension-types.js\";\nimport type { PmPackageManifest, PmPackageResourceKind } from \"../core/packages/manifest.js\";\n\ninterface TestExtensionModule {\n manifest?: Partial<ExtensionManifest>;\n activate?: unknown;\n default?: TestExtensionModule;\n}\n\n/**\n * Documents the activate extension for test options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivateExtensionForTestOptions {\n name?: string;\n layer?: ExtensionLayer;\n capabilities?: readonly ExtensionCapability[];\n policy?: ExtensionGovernancePolicy;\n}\n\n/**\n * Documents the registered command contract expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandContractExpectation {\n command: string;\n action?: string;\n extensionName?: string;\n arguments?: string[];\n flags?: string[];\n}\n\n/**\n * Documents the registered command contract assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandContractAssertion {\n command: RegisteredExtensionCommandDefinition;\n flags: FlagDefinition[];\n}\n\n/**\n * Public hook lifecycle kinds an extension can register through `api.hooks.*`.\n */\nexport type RegisteredHookKind = \"before_command\" | \"after_command\" | \"on_read\" | \"on_write\" | \"on_index\";\n\nconst HOOK_KIND_TO_REGISTRY_FIELD: Record<RegisteredHookKind, keyof ExtensionHookRegistry> = {\n before_command: \"beforeCommand\",\n after_command: \"afterCommand\",\n on_read: \"onRead\",\n on_write: \"onWrite\",\n on_index: \"onIndex\",\n};\n\n/**\n * Documents the registered hook expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredHookExpectation {\n kind: RegisteredHookKind;\n extensionName?: string;\n}\n\n/**\n * Documents the registered search provider expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredSearchProviderExpectation {\n provider: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered vector store adapter expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredVectorStoreAdapterExpectation {\n adapter: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered importer expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredImporterExpectation {\n importer: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered exporter expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExporterExpectation {\n exporter: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered item field expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemFieldExpectation {\n field: string;\n extensionName?: string;\n type?: SchemaFieldDefinition[\"type\"];\n}\n\n/**\n * Documents the registered item field assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemFieldAssertion {\n registration: RegisteredExtensionSchemaFieldDefinitions;\n field: SchemaFieldDefinition;\n}\n\n/**\n * Documents the registered item type expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemTypeExpectation {\n itemType: string;\n extensionName?: string;\n folder?: string;\n}\n\n/**\n * Documents the registered item type assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemTypeAssertion {\n registration: RegisteredExtensionSchemaItemTypeDefinitions;\n itemType: SchemaItemTypeDefinition;\n}\n\n/**\n * Documents the registered command override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandOverrideExpectation {\n command: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered parser override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredParserOverrideExpectation {\n command: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered preflight override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredPreflightOverrideExpectation {\n extensionName?: string;\n}\n\n/**\n * Documents the registered renderer override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredRendererOverrideExpectation {\n format: OutputRendererFormat;\n extensionName?: string;\n}\n\n/**\n * Restricts package manifest resource expectation values accepted by command, SDK, and storage contracts.\n */\nexport type PackageManifestResourceExpectation = Partial<Record<PmPackageResourceKind, readonly string[]>>;\n\n/**\n * Documents the package manifest expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface PackageManifestExpectation {\n packageName?: string;\n aliases?: readonly string[];\n resources?: PackageManifestResourceExpectation;\n}\n\nfunction normalizeSdkIdentifier(value: string): string {\n return value.trim().toLowerCase();\n}\n\nfunction extensionNameSuffix(extensionName: string | undefined): string {\n return extensionName ? ` from extension \"${extensionName}\"` : \"\";\n}\n\nfunction sortedUnique(values: readonly string[]): string[] {\n return [...new Set(values)].sort((left, right) => left.localeCompare(right));\n}\n\nfunction normalizeSdkCommandName(command: string): string {\n return command\n .trim()\n .toLowerCase()\n .split(/\\s+/)\n .filter((part) => part.length > 0)\n .join(\" \");\n}\n\nfunction formatAvailable(values: readonly string[]): string {\n return values.length > 0 ? values.join(\", \") : \"(none)\";\n}\n\nfunction assertStringSetIncludes(\n actual: readonly string[] | undefined,\n expected: readonly string[],\n label: string,\n): void {\n const actualValues = new Set(actual ?? []);\n const missing = sortedUnique(expected.filter((value) => !actualValues.has(value)));\n if (missing.length > 0) {\n throw new Error(\n `Expected package manifest ${label} to include ${missing.join(\", \")}; available: ${formatAvailable(\n sortedUnique(actual ?? []),\n )}`,\n );\n }\n}\n\nfunction collectFlagLabels(flags: readonly FlagDefinition[]): Set<string> {\n const labels = new Set<string>();\n for (const flag of flags) {\n if (typeof flag.long === \"string\" && flag.long.trim().length > 0) {\n labels.add(flag.long.trim());\n }\n if (typeof flag.short === \"string\" && flag.short.trim().length > 0) {\n labels.add(flag.short.trim());\n }\n }\n return labels;\n}\n\nfunction readTestExtensionManifest(module: unknown): Partial<ExtensionManifest> {\n if (module && typeof module === \"object\") {\n const testModule = module as TestExtensionModule;\n const manifest = testModule.manifest;\n if (manifest && typeof manifest === \"object\") {\n return manifest;\n }\n const defaultExport = testModule.default;\n const defaultManifest = defaultExport?.manifest;\n if (defaultManifest && typeof defaultManifest === \"object\") {\n return defaultManifest;\n }\n if (defaultExport && typeof defaultExport === \"object\" && (\"name\" in defaultExport || \"capabilities\" in defaultExport)) {\n return defaultExport as Partial<ExtensionManifest>;\n }\n if (\"name\" in testModule || \"capabilities\" in testModule) {\n return testModule as Partial<ExtensionManifest>;\n }\n }\n return {};\n}\n\nfunction readTestExtensionCapabilities(\n manifest: Partial<ExtensionManifest>,\n options: ActivateExtensionForTestOptions,\n): ExtensionCapability[] {\n if (Array.isArray(options.capabilities)) {\n return [...options.capabilities];\n }\n if (Array.isArray(manifest.capabilities)) {\n return manifest.capabilities.filter((capability): capability is ExtensionCapability => typeof capability === \"string\");\n }\n return [];\n}\n\n/**\n * Activate one in-memory extension module for package tests.\n *\n * This uses pm's real registration validation and activation engine while\n * avoiding private loader imports, filesystem manifests, or workspace setup.\n */\nexport async function activateExtensionForTest(\n module: unknown,\n options: ActivateExtensionForTestOptions = {},\n): Promise<ExtensionActivationResult> {\n const manifest = readTestExtensionManifest(module);\n const name =\n options.name ??\n (typeof manifest.name === \"string\" && manifest.name.trim().length > 0 ? manifest.name.trim() : \"test-extension\");\n const layer = options.layer ?? \"project\";\n const capabilities = readTestExtensionCapabilities(manifest, options);\n\n return activateExtensions({\n disabled_by_flag: false,\n roots: { global: \"\", project: \"\" },\n configured_enabled: [],\n configured_disabled: [],\n discovered: [],\n effective: [],\n warnings: [],\n policy: options.policy ?? createDefaultExtensionGovernancePolicy(),\n failed: [],\n loaded: [\n {\n layer,\n directory: \"\",\n manifest_path: \"\",\n name,\n version: typeof manifest.version === \"string\" ? manifest.version : \"0.0.0\",\n entry: typeof manifest.entry === \"string\" ? manifest.entry : \"./index.js\",\n priority: typeof manifest.priority === \"number\" ? manifest.priority : 0,\n entry_path: \"\",\n capabilities,\n manifest_version: typeof manifest.manifest_version === \"number\" ? manifest.manifest_version : undefined,\n pm_min_version: typeof manifest.pm_min_version === \"string\" ? manifest.pm_min_version : undefined,\n pm_max_version: typeof manifest.pm_max_version === \"string\" ? manifest.pm_max_version : undefined,\n engines: manifest.engines,\n trusted: manifest.trusted,\n provenance: manifest.provenance,\n sandbox_profile: manifest.sandbox_profile,\n permissions: manifest.permissions,\n activation: manifest.activation,\n module,\n },\n ],\n });\n}\n\n/**\n * Assert that a normalized package manifest advertises expected package\n * resources. Pair with `readPmPackageManifest(packageRoot)` in package tests.\n */\nexport function assertPackageManifest(\n manifest: PmPackageManifest,\n expectation: PackageManifestExpectation,\n): PmPackageManifest {\n if (expectation.packageName !== undefined && manifest.package_name !== expectation.packageName) {\n throw new Error(\n `Expected package manifest package_name to be \"${expectation.packageName}\"; received \"${\n manifest.package_name ?? \"(none)\"\n }\"`,\n );\n }\n if (expectation.aliases !== undefined) {\n assertStringSetIncludes(manifest.aliases, expectation.aliases, \"aliases\");\n }\n if (expectation.resources !== undefined) {\n for (const [kind, expectedPaths] of Object.entries(expectation.resources) as Array<\n [PmPackageResourceKind, readonly string[]]\n >) {\n assertStringSetIncludes(manifest.resources[kind], expectedPaths, `pm.${kind}`);\n }\n }\n return manifest;\n}\n\n/**\n * Assert that an activated extension registration registry contains a command\n * contract with the expected public metadata.\n */\nexport function assertRegisteredCommandContract(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredCommandContractExpectation,\n): RegisteredCommandContractAssertion {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const commandCandidates = registrations.commands.filter((entry) => entry.command === expectedCommand);\n const command = expectation.extensionName\n ? commandCandidates.find((entry) => entry.name === expectation.extensionName)\n : commandCandidates[0];\n if (!command) {\n const available = registrations.commands.map((entry) => entry.command).sort((left, right) => left.localeCompare(right));\n const extensionSuffix = expectation.extensionName ? ` from extension \"${expectation.extensionName}\"` : \"\";\n throw new Error(\n `Expected extension command \"${expectedCommand}\"${extensionSuffix} to be registered. Available commands: ${formatAvailable(\n available,\n )}`,\n );\n }\n\n if (expectation.action !== undefined && command.action !== expectation.action) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" action \"${expectation.action}\", received \"${command.action}\"`,\n );\n }\n\n if (expectation.arguments !== undefined) {\n const actualArguments = (command.arguments ?? []).map((argument) => argument.name);\n const missingArguments = expectation.arguments.filter((argument) => !actualArguments.includes(argument));\n if (missingArguments.length > 0) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" arguments ${formatAvailable(\n expectation.arguments,\n )}; missing ${formatAvailable(missingArguments)}; available ${formatAvailable(actualArguments)}`,\n );\n }\n }\n\n const flags = registrations.flags\n .filter(\n (entry) =>\n entry.target_command === expectedCommand &&\n (expectation.extensionName === undefined || entry.name === expectation.extensionName),\n )\n .flatMap((entry) => entry.flags);\n\n if (expectation.flags !== undefined) {\n const actualFlagLabels = collectFlagLabels(flags);\n const missingFlags = expectation.flags.filter((flag) => !actualFlagLabels.has(flag));\n if (missingFlags.length > 0) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" flags ${formatAvailable(expectation.flags)}; missing ${formatAvailable(\n missingFlags,\n )}; available ${formatAvailable([...actualFlagLabels].sort((left, right) => left.localeCompare(right)))}`,\n );\n }\n }\n\n return { command, flags };\n}\n\n/**\n * Assert that an activated extension hook registry contains a hook of the\n * expected lifecycle kind (optionally scoped to a specific extension).\n *\n * Hooks are surfaced via `ExtensionActivationResult.hooks`, not the command\n * registration registry, so this helper accepts an `ExtensionHookRegistry`.\n */\nexport function assertRegisteredHook<TKind extends RegisteredHookKind>(\n hooks: ExtensionHookRegistry,\n expectation: RegisteredHookExpectation & { kind: TKind },\n): ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number] {\n const field = HOOK_KIND_TO_REGISTRY_FIELD[expectation.kind];\n const candidates = hooks[field] as ReadonlyArray<RegisteredExtensionHook<unknown>>;\n const hook = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!hook) {\n const available = sortedUnique(candidates.map((entry) => entry.name));\n throw new Error(\n `Expected a \"${expectation.kind}\" hook${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available \"${expectation.kind}\" hooks: ${formatAvailable(available)}`,\n );\n }\n\n return hook as ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number];\n}\n\n/**\n * Assert that an activated extension registration registry contains a search\n * provider with the expected name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredSearchProvider(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredSearchProviderExpectation,\n): RegisteredExtensionSearchProvider {\n const expectedProvider = normalizeSdkIdentifier(expectation.provider);\n if (expectedProvider.length === 0) {\n throw new Error(\"Expected search provider name must be a non-empty string\");\n }\n\n const candidates = registrations.search_providers.filter(\n (entry) => normalizeSdkIdentifier(entry.definition.name) === expectedProvider,\n );\n const provider = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!provider) {\n const available = sortedUnique(registrations.search_providers.map((entry) => entry.definition.name));\n throw new Error(\n `Expected search provider \"${expectedProvider}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available search providers: ${formatAvailable(available)}`,\n );\n }\n\n return provider;\n}\n\n/**\n * Assert that an activated extension registration registry contains a vector\n * store adapter with the expected name (optionally scoped to a specific\n * extension).\n */\nexport function assertRegisteredVectorStoreAdapter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredVectorStoreAdapterExpectation,\n): RegisteredExtensionVectorStoreAdapter {\n const expectedAdapter = normalizeSdkIdentifier(expectation.adapter);\n if (expectedAdapter.length === 0) {\n throw new Error(\"Expected vector store adapter name must be a non-empty string\");\n }\n\n const candidates = registrations.vector_store_adapters.filter(\n (entry) => normalizeSdkIdentifier(entry.definition.name) === expectedAdapter,\n );\n const adapter = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!adapter) {\n const available = sortedUnique(registrations.vector_store_adapters.map((entry) => entry.definition.name));\n throw new Error(\n `Expected vector store adapter \"${expectedAdapter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available vector store adapters: ${formatAvailable(available)}`,\n );\n }\n\n return adapter;\n}\n\n/**\n * Assert that an activated extension registration registry contains an importer\n * for the expected format/name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredImporter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredImporterExpectation,\n): RegisteredExtensionImporter {\n const expectedImporter = normalizeSdkIdentifier(expectation.importer);\n if (expectedImporter.length === 0) {\n throw new Error(\"Expected importer name must be a non-empty string\");\n }\n\n const candidates = registrations.importers.filter(\n (entry) => normalizeSdkIdentifier(entry.importer) === expectedImporter,\n );\n const importer = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!importer) {\n const available = sortedUnique(registrations.importers.map((entry) => entry.importer));\n throw new Error(\n `Expected importer \"${expectedImporter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available importers: ${formatAvailable(available)}`,\n );\n }\n\n return importer;\n}\n\n/**\n * Assert that an activated extension registration registry contains an exporter\n * for the expected format/name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredExporter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredExporterExpectation,\n): RegisteredExtensionExporter {\n const expectedExporter = normalizeSdkIdentifier(expectation.exporter);\n if (expectedExporter.length === 0) {\n throw new Error(\"Expected exporter name must be a non-empty string\");\n }\n\n const candidates = registrations.exporters.filter(\n (entry) => normalizeSdkIdentifier(entry.exporter) === expectedExporter,\n );\n const exporter = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!exporter) {\n const available = sortedUnique(registrations.exporters.map((entry) => entry.exporter));\n throw new Error(\n `Expected exporter \"${expectedExporter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available exporters: ${formatAvailable(available)}`,\n );\n }\n\n return exporter;\n}\n\n/**\n * Assert that an activated extension registration registry contains a custom\n * item field definition (optionally scoped to a specific extension).\n */\nexport function assertRegisteredItemField(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredItemFieldExpectation,\n): RegisteredItemFieldAssertion {\n const expectedField = normalizeSdkIdentifier(expectation.field);\n if (expectedField.length === 0) {\n throw new Error(\"Expected item field name must be a non-empty string\");\n }\n\n const candidates = registrations.item_fields\n .filter((entry) => expectation.extensionName === undefined || entry.name === expectation.extensionName)\n .map((registration) => ({\n registration,\n field: registration.fields.find((field) => normalizeSdkIdentifier(field.name) === expectedField),\n }))\n .filter((entry): entry is RegisteredItemFieldAssertion => entry.field !== undefined);\n\n const match = candidates.find((entry) => expectation.type === undefined || entry.field.type === expectation.type);\n if (!match) {\n const available = sortedUnique(\n registrations.item_fields.flatMap((entry) => entry.fields.map((field) => `${field.name}:${field.type}`)),\n );\n throw new Error(\n `Expected item field \"${expectedField}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available item fields: ${formatAvailable(available)}`,\n );\n }\n\n return match;\n}\n\n/**\n * Assert that an activated extension registration registry contains a custom\n * item type definition (optionally scoped to a specific extension).\n */\nexport function assertRegisteredItemType(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredItemTypeExpectation,\n): RegisteredItemTypeAssertion {\n const expectedType = normalizeSdkIdentifier(expectation.itemType);\n if (expectedType.length === 0) {\n throw new Error(\"Expected item type name must be a non-empty string\");\n }\n\n const candidates = registrations.item_types\n .filter((entry) => expectation.extensionName === undefined || entry.name === expectation.extensionName)\n .map((registration) => ({\n registration,\n itemType: registration.types.find((itemType) => normalizeSdkIdentifier(itemType.name) === expectedType),\n }))\n .filter((entry): entry is RegisteredItemTypeAssertion => entry.itemType !== undefined);\n\n const match = candidates.find((entry) => expectation.folder === undefined || entry.itemType.folder === expectation.folder);\n if (!match) {\n const available = sortedUnique(\n registrations.item_types.flatMap((entry) => entry.types.map((itemType) => `${itemType.name}:${itemType.folder}`)),\n );\n throw new Error(\n `Expected item type \"${expectedType}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available item types: ${formatAvailable(available)}`,\n );\n }\n\n return match;\n}\n\n/**\n * Assert that an activated extension command registry contains a command\n * override registered via `api.registerCommand(command, override)` (optionally\n * scoped to a specific extension).\n *\n * Command overrides are surfaced via `ExtensionActivationResult.commands`, not\n * the command registration registry, so this helper accepts an\n * `ExtensionCommandRegistry`.\n */\nexport function assertRegisteredCommandOverride(\n commands: ExtensionCommandRegistry,\n expectation: RegisteredCommandOverrideExpectation,\n): RegisteredExtensionCommandOverride {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const candidates = commands.overrides.filter((entry) => entry.command === expectedCommand);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(commands.overrides.map((entry) => entry.command));\n throw new Error(\n `Expected command override \"${expectedCommand}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available command overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension parser registry contains a parser override\n * registered via `api.registerParser(command, override)` (optionally scoped to\n * a specific extension).\n *\n * Parser overrides are surfaced via `ExtensionActivationResult.parsers`, not the\n * command registration registry, so this helper accepts an\n * `ExtensionParserRegistry`.\n */\nexport function assertRegisteredParserOverride(\n parsers: ExtensionParserRegistry,\n expectation: RegisteredParserOverrideExpectation,\n): RegisteredExtensionParserOverride {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const candidates = parsers.overrides.filter((entry) => entry.command === expectedCommand);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(parsers.overrides.map((entry) => entry.command));\n throw new Error(\n `Expected parser override \"${expectedCommand}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available parser overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension preflight registry contains a preflight\n * override registered via `api.registerPreflight(override)` (optionally scoped\n * to a specific extension).\n *\n * Preflight overrides are global (they run for every command and carry no\n * `command` field), so the expectation only accepts an optional\n * `extensionName`. Preflight overrides are surfaced via\n * `ExtensionActivationResult.preflight`.\n */\nexport function assertRegisteredPreflightOverride(\n preflight: ExtensionPreflightRegistry,\n expectation: RegisteredPreflightOverrideExpectation = {},\n): RegisteredExtensionPreflightOverride {\n const override = expectation.extensionName\n ? preflight.overrides.find((entry) => entry.name === expectation.extensionName)\n : preflight.overrides[0];\n if (!override) {\n const available = sortedUnique(preflight.overrides.map((entry) => entry.name));\n throw new Error(\n `Expected a preflight override${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available preflight overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension renderer registry contains a renderer\n * override registered via `api.registerRenderer(format, renderer)` for the\n * expected output format (optionally scoped to a specific extension).\n *\n * Renderer overrides are surfaced via `ExtensionActivationResult.renderers`.\n */\nexport function assertRegisteredRendererOverride(\n renderers: ExtensionRendererRegistry,\n expectation: RegisteredRendererOverrideExpectation,\n): RegisteredExtensionRendererOverride {\n const expectedFormat = normalizeSdkIdentifier(expectation.format);\n if (expectedFormat.length === 0) {\n throw new Error(\"Expected renderer format must be a non-empty string\");\n }\n\n const candidates = renderers.overrides.filter((entry) => entry.format === expectedFormat);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(renderers.overrides.map((entry) => entry.format));\n throw new Error(\n `Expected renderer override \"${expectedFormat}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available renderer overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n"],"names":[],"mappings":";;AAkCA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,sCAAsC,EAAE,MAAM,uCAAuC,CAAC;AA2C/F,MAAM,2BAA2B,GAA4D;IAC3F,cAAc,EAAE,eAAe;IAC/B,aAAa,EAAE,cAAc;IAC7B,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAyHF,SAAS,sBAAsB,CAAC,KAAa;IAC3C,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACpC,CAAC;AAED,SAAS,mBAAmB,CAAC,aAAiC;IAC5D,OAAO,aAAa,CAAC,CAAC,CAAC,oBAAoB,aAAa,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;AACnE,CAAC;AAED,SAAS,YAAY,CAAC,MAAyB;IAC7C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,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71727c3dfe10"}
1
+ {"version":3,"file":"testing.js","sources":["sdk/testing.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/testing\n *\n * Defines public SDK APIs and package-author helpers for Testing.\n */\nimport type {\n AfterCommandHookContext,\n BeforeCommandHookContext,\n CommandHandlerResult,\n CommandOverrideContext,\n CommandOverrideResult,\n ExtensionActivationResult,\n ExtensionCapability,\n ExtensionCommandRegistry,\n ExtensionDeactivationResult,\n ExtensionGovernancePolicy,\n ExtensionHookRegistry,\n ExtensionLayer,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceName,\n ExtensionServiceRegistry,\n FlagDefinition,\n OnIndexHookContext,\n OnReadHookContext,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverrideContext,\n ParserOverrideResult,\n PreflightOverrideContext,\n PreflightOverrideResult,\n RegisteredExtensionCommandDefinition,\n RegisteredExtensionCommandOverride,\n RegisteredExtensionExporter,\n RegisteredExtensionFlagDefinitions,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionParserOverride,\n RegisteredExtensionPreflightOverride,\n RegisteredExtensionRendererOverride,\n RegisteredExtensionSchemaFieldDefinitions,\n RegisteredExtensionSchemaItemTypeDefinitions,\n RegisteredExtensionSchemaMigrationDefinition,\n RegisteredExtensionSearchProvider,\n RegisteredExtensionServiceOverride,\n RegisteredExtensionVectorStoreAdapter,\n RendererOverrideContext,\n RendererOverrideResult,\n SchemaFieldDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationRunContext,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderQueryContext,\n SearchProviderQueryExpansionContext,\n SearchProviderQueryExpansionResult,\n SearchProviderQueryResult,\n SearchProviderRerankContext,\n SearchProviderRerankResult,\n ServiceOverrideContext,\n ServiceOverrideResult,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n} from \"../core/extensions/loader.js\";\nimport {\n activateExtensions,\n deactivateExtensions,\n runAfterCommandHooks,\n runBeforeCommandHooks,\n runCommandHandler,\n runCommandOverride,\n runOnIndexHooks,\n runOnReadHooks,\n runOnWriteHooks,\n runParserOverride,\n runPreflightOverride,\n runRendererOverride,\n runServiceOverride,\n} from \"../core/extensions/loader.js\";\nimport { createDefaultExtensionGovernancePolicy } from \"../core/extensions/extension-types.js\";\nimport {\n getMigrationRuntimeDefinition,\n resolveRegisteredSearchProvider,\n resolveRegisteredVectorStoreAdapter,\n} from \"../core/extensions/runtime-registrations.js\";\nimport { collectUsedExtensionCapabilities } from \"../core/extensions/capability-usage.js\";\nimport { normalizeKnownExtensionCapability } from \"../core/extensions/extension-capability-aliases.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport type { PmPackageManifest, PmPackageResourceKind } from \"../core/packages/manifest.js\";\n\ninterface TestExtensionModule {\n manifest?: Partial<ExtensionManifest>;\n activate?: unknown;\n default?: TestExtensionModule;\n}\n\n/**\n * Documents the activate extension for test options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivateExtensionForTestOptions {\n name?: string;\n layer?: ExtensionLayer;\n capabilities?: readonly ExtensionCapability[];\n policy?: ExtensionGovernancePolicy;\n}\n\n/**\n * Documents the deactivate extension for test options payload exchanged by command, SDK, and package integrations.\n */\nexport interface DeactivateExtensionForTestOptions {\n /** Overrides the in-memory extension name (defaults to `manifest.name` or `\"test-extension\"`). */\n name?: string;\n /** Overrides the layer recorded for the in-memory extension (defaults to `\"project\"`). */\n layer?: ExtensionLayer;\n /**\n * Activation result returned by `activateExtensionForTest`. When provided, an\n * extension whose `activate` failed is skipped — mirroring the host teardown\n * contract that never deactivates a never-initialized extension. Pass the same\n * `name`/`layer` to both helpers so the skip key matches.\n */\n activation?: Pick<ExtensionActivationResult, \"failed\">;\n /**\n * Per-hook teardown bound, forwarded as `deactivate_timeout_ms`. Use `0` (or\n * `Infinity`) to wait indefinitely; omit to keep the host default.\n */\n deactivateTimeoutMs?: number;\n}\n\n/**\n * Options for {@link runRegisteredCommandForTest} — the inputs forwarded to a\n * registered extension command handler when exercising its behavior in a test.\n */\nexport interface RunRegisteredCommandForTestOptions {\n /**\n * Full registered command path to invoke, e.g. `\"hello\"` or `\"todos import\"`.\n * Matched against `commands.handlers[].command` after normalization (trimmed,\n * lower-cased, internal whitespace collapsed), mirroring runtime dispatch.\n */\n command: string;\n /** Positional arguments forwarded as `context.args` (default: none). */\n args?: readonly string[];\n /** Parsed flags/options forwarded as `context.options` (default: none). */\n options?: Record<string, unknown>;\n /**\n * Global option overrides merged onto the agent-safe test defaults\n * (`{ json: true, quiet: true, noPager: true }`), forwarded as `context.global`.\n */\n global?: Partial<GlobalOptions>;\n /**\n * Resolved pm workspace root forwarded as `context.pm_root` (default: `\"\"`).\n * Most pure handlers ignore it; set it when the handler reads workspace files.\n */\n pmRoot?: string;\n}\n\n/**\n * Options for {@link runRegisteredHookForTest} — the lifecycle `kind` to fire and\n * the synthetic context handed to every registered hook of that kind.\n *\n * The union keeps `context` type-safe per kind: `kind: \"on_write\"` requires an\n * {@link OnWriteHookContext}, `kind: \"after_command\"` an\n * {@link AfterCommandHookContext}, and so on — so authors cannot accidentally\n * pass an index context to a read hook.\n */\nexport type RunRegisteredHookForTestOptions =\n | { kind: \"before_command\"; context: BeforeCommandHookContext }\n | { kind: \"after_command\"; context: AfterCommandHookContext }\n | { kind: \"on_read\"; context: OnReadHookContext }\n | { kind: \"on_write\"; context: OnWriteHookContext }\n | { kind: \"on_index\"; context: OnIndexHookContext };\n\n/**\n * Maps each invokable search-provider operation to the context type its function\n * receives, keeping {@link runRegisteredSearchProviderForTest} type-safe per\n * operation. Mirrors the operations the host dispatches to a registered provider:\n * semantic `query`, single/batch embedding (`embed`/`embedBatch`),\n * `queryExpansion`, and `rerank`.\n */\nexport interface SearchProviderOperationContexts {\n query: SearchProviderQueryContext;\n embed: SearchProviderEmbedContext;\n embedBatch: SearchProviderEmbedBatchContext;\n queryExpansion: SearchProviderQueryExpansionContext;\n rerank: SearchProviderRerankContext;\n}\n\n/**\n * Maps each invokable search-provider operation to the result type its function\n * returns, so {@link runRegisteredSearchProviderForTest} resolves a precise return\n * type from the chosen `operation` instead of a union the caller must narrow.\n */\nexport interface SearchProviderOperationResults {\n query: SearchProviderQueryResult;\n embed: number[];\n embedBatch: number[][];\n queryExpansion: SearchProviderQueryExpansionResult;\n rerank: SearchProviderRerankResult;\n}\n\n/**\n * Options for {@link runRegisteredSearchProviderForTest}: the registered\n * `provider` name to resolve, the `operation` to invoke, and the synthetic\n * `context` handed to that operation. The discriminated union keeps `context`\n * type-safe per operation — `operation: \"embed\"` requires a\n * {@link SearchProviderEmbedContext}, `operation: \"rerank\"` a\n * {@link SearchProviderRerankContext}, and so on.\n */\nexport type RunRegisteredSearchProviderForTestOptions = {\n [Operation in keyof SearchProviderOperationContexts]: {\n /** Registered provider name to resolve, matched case-insensitively as the host does. */\n provider: string;\n /** Provider operation to invoke. */\n operation: Operation;\n /** Synthetic context handed to the resolved operation function. */\n context: SearchProviderOperationContexts[Operation];\n };\n}[keyof SearchProviderOperationContexts];\n\n/**\n * Maps each invokable vector-store-adapter operation to the context type its\n * function receives, keeping {@link runRegisteredVectorStoreAdapterForTest}\n * type-safe per operation. Mirrors the operations the host dispatches to a\n * registered adapter: nearest-neighbour `query`, `upsert`, and `delete`.\n */\nexport interface VectorStoreAdapterOperationContexts {\n query: VectorStoreQueryContext;\n upsert: VectorStoreUpsertContext;\n delete: VectorStoreDeleteContext;\n}\n\n/**\n * Maps each invokable vector-store-adapter operation to the result type its\n * function returns. Only `query` has a structured result\n * ({@link VectorStoreQueryHit}[]); `upsert`/`delete` report success by not\n * throwing, so their result is `unknown` and typically ignored.\n */\nexport interface VectorStoreAdapterOperationResults {\n query: VectorStoreQueryHit[];\n upsert: unknown;\n delete: unknown;\n}\n\n/**\n * Options for {@link runRegisteredVectorStoreAdapterForTest}: the registered\n * `adapter` name to resolve, the `operation` to invoke, and the synthetic\n * `context` handed to that operation. The discriminated union keeps `context`\n * type-safe per operation — `operation: \"upsert\"` requires a\n * {@link VectorStoreUpsertContext}, `operation: \"delete\"` a\n * {@link VectorStoreDeleteContext}, and so on.\n */\nexport type RunRegisteredVectorStoreAdapterForTestOptions = {\n [Operation in keyof VectorStoreAdapterOperationContexts]: {\n /** Registered adapter name to resolve, matched case-insensitively as the host does. */\n adapter: string;\n /** Adapter operation to invoke. */\n operation: Operation;\n /** Synthetic context handed to the resolved operation function. */\n context: VectorStoreAdapterOperationContexts[Operation];\n };\n}[keyof VectorStoreAdapterOperationContexts];\n\n/**\n * Options for {@link runRegisteredMigrationForTest}: which registered migration\n * to invoke and the workspace root its run context reports.\n */\nexport interface RunRegisteredMigrationForTestOptions {\n /** Registered migration id to resolve, matched case-insensitively against `definition.id`. */\n migration: string;\n /** Optional extension name to disambiguate when several extensions register the same id. */\n extensionName?: string;\n /** Resolved pm workspace root forwarded as `context.pm_root` (default `\"\"`). */\n pmRoot?: string;\n}\n\n/**\n * Options for {@link runRegisteredImporterForTest} — the registered importer name\n * to invoke plus the synthetic invocation context forwarded to its handler.\n *\n * The `importer` name is the value passed to `api.registerImporter(name, ...)`,\n * resolved case-insensitively (and whitespace-collapsed) against\n * `registrations.importers`; the helper derives the `\"<name> import\"` command\n * path internally, so authors never hand-build it.\n */\nexport interface RunRegisteredImporterForTestOptions {\n /** Registered importer name to resolve, e.g. `\"csv\"` for a `\"csv import\"` handler. */\n importer: string;\n /** Optional extension name to disambiguate when several extensions register the same importer. */\n extensionName?: string;\n /** Positional arguments forwarded as `context.args` (default: none). */\n args?: readonly string[];\n /** Parsed flags/options forwarded as `context.options` (default: none). */\n options?: Record<string, unknown>;\n /**\n * Global option overrides merged onto the agent-safe test defaults\n * (`{ json: true, quiet: true, noPager: true }`), forwarded as `context.global`.\n */\n global?: Partial<GlobalOptions>;\n /** Resolved pm workspace root forwarded as `context.pm_root` (default: `\"\"`). */\n pmRoot?: string;\n}\n\n/**\n * Options for {@link runRegisteredExporterForTest} — the registered exporter name\n * to invoke plus the synthetic invocation context forwarded to its handler.\n *\n * The `exporter` name is the value passed to `api.registerExporter(name, ...)`,\n * resolved case-insensitively (and whitespace-collapsed) against\n * `registrations.exporters`; the helper derives the `\"<name> export\"` command\n * path internally, so authors never hand-build it.\n */\nexport interface RunRegisteredExporterForTestOptions {\n /** Registered exporter name to resolve, e.g. `\"csv\"` for a `\"csv export\"` handler. */\n exporter: string;\n /** Optional extension name to disambiguate when several extensions register the same exporter. */\n extensionName?: string;\n /** Positional arguments forwarded as `context.args` (default: none). */\n args?: readonly string[];\n /** Parsed flags/options forwarded as `context.options` (default: none). */\n options?: Record<string, unknown>;\n /**\n * Global option overrides merged onto the agent-safe test defaults\n * (`{ json: true, quiet: true, noPager: true }`), forwarded as `context.global`.\n */\n global?: Partial<GlobalOptions>;\n /** Resolved pm workspace root forwarded as `context.pm_root` (default: `\"\"`). */\n pmRoot?: string;\n}\n\n/**\n * Documents the extension deactivation expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDeactivationExpectation {\n /** Expected count of extensions whose `deactivate` ran without throwing (default `1`). */\n deactivated?: number;\n /** Expected count of teardown failures (default `0`). */\n failed?: number;\n}\n\n/**\n * Documents the registered command contract expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandContractExpectation {\n command: string;\n action?: string;\n extensionName?: string;\n arguments?: string[];\n flags?: string[];\n}\n\n/**\n * Documents the registered command contract assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandContractAssertion {\n command: RegisteredExtensionCommandDefinition;\n flags: FlagDefinition[];\n}\n\n/**\n * Documents the registered flags expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredFlagsExpectation {\n targetCommand: string;\n extensionName?: string;\n flags?: string[];\n}\n\n/**\n * Public hook lifecycle kinds an extension can register through `api.hooks.*`.\n */\nexport type RegisteredHookKind = \"before_command\" | \"after_command\" | \"on_read\" | \"on_write\" | \"on_index\";\n\nconst HOOK_KIND_TO_REGISTRY_FIELD: Record<RegisteredHookKind, keyof ExtensionHookRegistry> = {\n before_command: \"beforeCommand\",\n after_command: \"afterCommand\",\n on_read: \"onRead\",\n on_write: \"onWrite\",\n on_index: \"onIndex\",\n};\n\n/**\n * Documents the registered hook expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredHookExpectation {\n kind: RegisteredHookKind;\n extensionName?: string;\n}\n\n/**\n * Documents the registered search provider expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredSearchProviderExpectation {\n provider: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered vector store adapter expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredVectorStoreAdapterExpectation {\n adapter: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered importer expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredImporterExpectation {\n importer: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered exporter expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExporterExpectation {\n exporter: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered item field expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemFieldExpectation {\n field: string;\n extensionName?: string;\n type?: SchemaFieldDefinition[\"type\"];\n}\n\n/**\n * Documents the registered item field assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemFieldAssertion {\n registration: RegisteredExtensionSchemaFieldDefinitions;\n field: SchemaFieldDefinition;\n}\n\n/**\n * Documents the registered item type expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemTypeExpectation {\n itemType: string;\n extensionName?: string;\n folder?: string;\n}\n\n/**\n * Documents the registered item type assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemTypeAssertion {\n registration: RegisteredExtensionSchemaItemTypeDefinitions;\n itemType: SchemaItemTypeDefinition;\n}\n\n/**\n * Documents the registered command override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandOverrideExpectation {\n command: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered parser override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredParserOverrideExpectation {\n command: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered preflight override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredPreflightOverrideExpectation {\n extensionName?: string;\n}\n\n/**\n * Documents the registered renderer override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredRendererOverrideExpectation {\n format: OutputRendererFormat;\n extensionName?: string;\n}\n\n/**\n * Documents the registered service override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredServiceOverrideExpectation {\n service: ExtensionServiceName;\n extensionName?: string;\n}\n\n/**\n * Documents the registered migration expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredMigrationExpectation {\n migration: string;\n extensionName?: string;\n mandatory?: boolean;\n}\n\n/**\n * Documents the extension capability usage expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCapabilityUsageExpectation {\n /**\n * Capabilities the manifest declares. Mirror `manifest.capabilities` here so\n * the assertion fails when the manifest grants more than the code uses.\n */\n declared: readonly ExtensionCapability[];\n /** Restrict reconciliation to a single extension when the activation has several. */\n extensionName?: string;\n /**\n * Capabilities allowed to be declared without being exercised (e.g. ones a\n * runtime registers only behind a config flag). These are excluded from the\n * least-privilege failure.\n */\n allowUnused?: readonly ExtensionCapability[];\n}\n\n/**\n * Documents the extension capability usage assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCapabilityUsageAssertion {\n /** Declared capabilities considered, sorted and de-duplicated. */\n declared: ExtensionCapability[];\n /** Capabilities the extension actually registered against, sorted. */\n used: ExtensionCapability[];\n /** Declared capabilities with no matching registration after the allowlist. */\n unused: ExtensionCapability[];\n}\n\n/**\n * Restricts package manifest resource expectation values accepted by command, SDK, and storage contracts.\n */\nexport type PackageManifestResourceExpectation = Partial<Record<PmPackageResourceKind, readonly string[]>>;\n\n/**\n * Documents the package manifest expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface PackageManifestExpectation {\n packageName?: string;\n aliases?: readonly string[];\n resources?: PackageManifestResourceExpectation;\n}\n\nfunction normalizeSdkIdentifier(value: string): string {\n return value.trim().toLowerCase();\n}\n\nfunction extensionNameSuffix(extensionName: string | undefined): string {\n return extensionName ? ` from extension \"${extensionName}\"` : \"\";\n}\n\nfunction sortedUnique(values: readonly string[]): string[] {\n return [...new Set(values)].sort((left, right) => left.localeCompare(right));\n}\n\nfunction normalizeSdkCommandName(command: string): string {\n return command\n .trim()\n .toLowerCase()\n .split(/\\s+/)\n .filter((part) => part.length > 0)\n .join(\" \");\n}\n\nfunction formatAvailable(values: readonly string[]): string {\n return values.length > 0 ? values.join(\", \") : \"(none)\";\n}\n\nfunction assertStringSetIncludes(\n actual: readonly string[] | undefined,\n expected: readonly string[],\n label: string,\n): void {\n const actualValues = new Set(actual ?? []);\n const missing = sortedUnique(expected.filter((value) => !actualValues.has(value)));\n if (missing.length > 0) {\n throw new Error(\n `Expected package manifest ${label} to include ${missing.join(\", \")}; available: ${formatAvailable(\n sortedUnique(actual ?? []),\n )}`,\n );\n }\n}\n\nfunction collectFlagLabels(flags: readonly FlagDefinition[]): Set<string> {\n const labels = new Set<string>();\n for (const flag of flags) {\n if (typeof flag.long === \"string\" && flag.long.trim().length > 0) {\n labels.add(flag.long.trim());\n }\n if (typeof flag.short === \"string\" && flag.short.trim().length > 0) {\n labels.add(flag.short.trim());\n }\n }\n return labels;\n}\n\nfunction readTestExtensionManifest(module: unknown): Partial<ExtensionManifest> {\n if (module && typeof module === \"object\") {\n const testModule = module as TestExtensionModule;\n const manifest = testModule.manifest;\n if (manifest && typeof manifest === \"object\") {\n return manifest;\n }\n const defaultExport = testModule.default;\n const defaultManifest = defaultExport?.manifest;\n if (defaultManifest && typeof defaultManifest === \"object\") {\n return defaultManifest;\n }\n if (defaultExport && typeof defaultExport === \"object\" && (\"name\" in defaultExport || \"capabilities\" in defaultExport)) {\n return defaultExport as Partial<ExtensionManifest>;\n }\n if (\"name\" in testModule || \"capabilities\" in testModule) {\n return testModule as Partial<ExtensionManifest>;\n }\n }\n return {};\n}\n\nfunction resolveTestExtensionName(manifest: Partial<ExtensionManifest>, explicitName: string | undefined): string {\n return (\n explicitName ??\n (typeof manifest.name === \"string\" && manifest.name.trim().length > 0 ? manifest.name.trim() : \"test-extension\")\n );\n}\n\nfunction readTestExtensionCapabilities(\n manifest: Partial<ExtensionManifest>,\n options: ActivateExtensionForTestOptions,\n): ExtensionCapability[] {\n if (Array.isArray(options.capabilities)) {\n return [...options.capabilities];\n }\n if (Array.isArray(manifest.capabilities)) {\n return manifest.capabilities.filter((capability): capability is ExtensionCapability => typeof capability === \"string\");\n }\n return [];\n}\n\n/**\n * Build the synthetic single-extension {@link ExtensionLoadResult} shared by the\n * activate/deactivate test helpers, so both stay aligned with the loader's load\n * contract as it evolves. The `loaded` entry mirrors the real on-disk shape\n * (including `capabilities` and the compatibility fields) while leaving\n * filesystem paths empty, since the module is supplied in memory.\n */\nfunction buildSingleExtensionLoadResult(\n module: unknown,\n manifest: Partial<ExtensionManifest>,\n identity: { name: string; layer: ExtensionLayer; capabilities: ExtensionCapability[]; policy: ExtensionGovernancePolicy },\n): ExtensionLoadResult {\n return {\n disabled_by_flag: false,\n roots: { global: \"\", project: \"\" },\n configured_enabled: [],\n configured_disabled: [],\n discovered: [],\n effective: [],\n warnings: [],\n policy: identity.policy,\n failed: [],\n loaded: [\n {\n layer: identity.layer,\n directory: \"\",\n manifest_path: \"\",\n name: identity.name,\n version: typeof manifest.version === \"string\" ? manifest.version : \"0.0.0\",\n entry: typeof manifest.entry === \"string\" ? manifest.entry : \"./index.js\",\n priority: typeof manifest.priority === \"number\" ? manifest.priority : 0,\n entry_path: \"\",\n capabilities: identity.capabilities,\n manifest_version: typeof manifest.manifest_version === \"number\" ? manifest.manifest_version : undefined,\n pm_min_version: typeof manifest.pm_min_version === \"string\" ? manifest.pm_min_version : undefined,\n pm_max_version: typeof manifest.pm_max_version === \"string\" ? manifest.pm_max_version : undefined,\n engines: manifest.engines,\n trusted: manifest.trusted,\n provenance: manifest.provenance,\n sandbox_profile: manifest.sandbox_profile,\n permissions: manifest.permissions,\n activation: manifest.activation,\n module,\n },\n ],\n };\n}\n\n/**\n * Activate one in-memory extension module for package tests.\n *\n * This uses pm's real registration validation and activation engine while\n * avoiding private loader imports, filesystem manifests, or workspace setup.\n */\nexport async function activateExtensionForTest(\n module: unknown,\n options: ActivateExtensionForTestOptions = {},\n): Promise<ExtensionActivationResult> {\n const manifest = readTestExtensionManifest(module);\n return activateExtensions(\n buildSingleExtensionLoadResult(module, manifest, {\n name: resolveTestExtensionName(manifest, options.name),\n layer: options.layer ?? \"project\",\n capabilities: readTestExtensionCapabilities(manifest, options),\n policy: options.policy ?? createDefaultExtensionGovernancePolicy(),\n }),\n );\n}\n\n/**\n * Deactivate one in-memory extension module for package tests — the teardown\n * counterpart to {@link activateExtensionForTest}.\n *\n * Runs pm's real `deactivateExtensions` engine (including its bounded per-hook\n * timeout and best-effort failure capture) over a single synthetic load entry,\n * so authors can prove an extension's `deactivate` releases the resources its\n * `activate` opened — without importing private loader internals or staging a\n * workspace. Resolve `name`/`layer` the same way {@link activateExtensionForTest}\n * does so a forwarded `activation` result skips a failed extension correctly.\n */\nexport async function deactivateExtensionForTest(\n module: unknown,\n options: DeactivateExtensionForTestOptions = {},\n): Promise<ExtensionDeactivationResult> {\n const manifest = readTestExtensionManifest(module);\n return deactivateExtensions(\n buildSingleExtensionLoadResult(module, manifest, {\n name: resolveTestExtensionName(manifest, options.name),\n layer: options.layer ?? \"project\",\n capabilities: readTestExtensionCapabilities(manifest, {}),\n policy: createDefaultExtensionGovernancePolicy(),\n }),\n options.activation,\n options.deactivateTimeoutMs === undefined ? {} : { deactivate_timeout_ms: options.deactivateTimeoutMs },\n );\n}\n\n/**\n * Invoke a registered extension command handler and return its real\n * {@link CommandHandlerResult} so package tests can assert on behavior — not\n * just that the command was registered.\n *\n * This is the \"invoke\" verb that completes the package-author testing loop:\n * `activateExtensionForTest` → `assertRegisteredCommandContract` → **run** →\n * `deactivateExtensionForTest`. It runs pm's real handler-dispatch engine\n * (`runCommandHandler`) over `activation.commands`, building the\n * `CommandHandlerContext` with agent-safe global defaults\n * (`{ json: true, quiet: true, noPager: true }`) that callers may override.\n *\n * Because `registerImporter`/`registerExporter` register their handlers under\n * the `\"<name> import\"` / `\"<name> export\"` command paths, this same helper\n * exercises importer and exporter handlers too.\n *\n * Throws a descriptive error (listing the available handler command paths) when\n * no handler is registered for `command`, since that is a wiring/typo bug in the\n * test rather than a behavior under test. When a handler is found, the result is\n * returned verbatim: a clean run yields `{ handled: true, result, warnings: [] }`,\n * while a handler that throws a non-exit error yields\n * `{ handled: false, warnings: [code], errorMessage }` so the failure can be\n * asserted. A handler that throws an error carrying a numeric `exitCode`\n * propagates the throw, matching runtime semantics.\n */\nexport async function runRegisteredCommandForTest(\n commands: ExtensionCommandRegistry,\n options: RunRegisteredCommandForTestOptions,\n): Promise<CommandHandlerResult> {\n const command = normalizeSdkCommandName(options.command);\n if (command.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n const hasHandler = commands.handlers.some((entry) => entry.command === command);\n if (!hasHandler) {\n const available = sortedUnique(commands.handlers.map((entry) => entry.command));\n throw new Error(\n `Expected a registered command handler for \"${command}\" to invoke. Available command handlers: ${formatAvailable(\n available,\n )}`,\n );\n }\n return runCommandHandler(commands, {\n command,\n args: options.args ? [...options.args] : [],\n options: options.options ? { ...options.options } : {},\n global: { json: true, quiet: true, noPager: true, ...options.global },\n pm_root: options.pmRoot ?? \"\",\n });\n}\n\n/**\n * Fire every registered lifecycle hook of a given `kind` through pm's real hook\n * runner and return the warnings array so package tests can assert on behavior —\n * not just that a hook was registered.\n *\n * This is the hook counterpart to {@link runRegisteredCommandForTest}, extending\n * the package-author \"invoke\" verb to the `api.hooks.*` surface. Pass the\n * `ExtensionHookRegistry` from `activateExtensionForTest(...).hooks` together with\n * the lifecycle `kind` and a synthetic context. Hooks observe their inputs via a\n * cloned context snapshot (mutations never leak back to the caller), so the\n * observable signal is twofold: any side effects the hook performs, and the\n * returned warnings. A clean run returns `[]`; a hook that throws contributes one\n * `extension_hook_failed:<layer>:<name>:<hookName>` warning, mirroring runtime\n * dispatch which isolates a failing hook without aborting the others.\n *\n * Throws a descriptive error (listing the hook kinds that do have registrations)\n * when no hook of `kind` is registered, since firing a hook the extension never\n * registered is a wiring/typo bug in the test rather than a behavior under test.\n */\nexport async function runRegisteredHookForTest(\n hooks: ExtensionHookRegistry,\n options: RunRegisteredHookForTestOptions,\n): Promise<string[]> {\n if (hooks[HOOK_KIND_TO_REGISTRY_FIELD[options.kind]].length === 0) {\n const populatedKinds = sortedUnique(\n (Object.keys(HOOK_KIND_TO_REGISTRY_FIELD) as RegisteredHookKind[]).filter(\n (kind) => hooks[HOOK_KIND_TO_REGISTRY_FIELD[kind]].length > 0,\n ),\n );\n throw new Error(\n `Expected a registered \"${options.kind}\" hook to invoke. Hook kinds with registrations: ${formatAvailable(\n populatedKinds,\n )}`,\n );\n }\n switch (options.kind) {\n case \"before_command\":\n return runBeforeCommandHooks(hooks, options.context);\n case \"after_command\":\n return runAfterCommandHooks(hooks, options.context);\n case \"on_read\":\n return runOnReadHooks(hooks, options.context);\n case \"on_write\":\n return runOnWriteHooks(hooks, options.context);\n case \"on_index\":\n return runOnIndexHooks(hooks, options.context);\n }\n}\n\n/**\n * Invoke a registered parser override through pm's real runner and return the\n * resolved {@link ParserOverrideResult}, so package tests can assert the rewritten\n * args/options/global an override produces for a command before dispatch.\n *\n * Guards that a parser override is registered for the (normalized) target command\n * before delegating: without a match `runParserOverride` would silently return\n * `overridden: false`, hiding a typo'd command name in the test. When a match\n * exists the result is returned verbatim — `overridden: true` with the rewritten\n * context on success, or `overridden: false` with an\n * `extension_parser_override_failed:*` warning when the override throws.\n */\nexport async function runRegisteredParserOverrideForTest(\n parsers: ExtensionParserRegistry,\n context: ParserOverrideContext,\n): Promise<ParserOverrideResult> {\n const command = normalizeSdkCommandName(context.command);\n if (!parsers.overrides.some((entry) => entry.command === command)) {\n throw new Error(\n `Expected a registered parser override for command \"${command}\" to invoke. Available parser override commands: ${formatAvailable(\n sortedUnique(parsers.overrides.map((entry) => entry.command)),\n )}`,\n );\n }\n return runParserOverride(parsers, context);\n}\n\n/**\n * Invoke the active preflight override through pm's real runner and return the\n * resolved {@link PreflightOverrideResult}, so package tests can assert the\n * migration/format gate decision an override yields.\n *\n * Unlike command-scoped overrides, the runtime applies the **last** registered\n * preflight override regardless of command, so this helper guards only that at\n * least one preflight override is registered before delegating. The result is\n * returned verbatim — `overridden: true` with the adjusted decision on success,\n * or `overridden: false` with an `extension_preflight_override_failed:*` warning\n * when the override throws.\n */\nexport async function runRegisteredPreflightOverrideForTest(\n preflight: ExtensionPreflightRegistry,\n context: PreflightOverrideContext,\n): Promise<PreflightOverrideResult> {\n if (preflight.overrides.length === 0) {\n throw new Error(\n \"Expected a registered preflight override to invoke, but none are registered.\",\n );\n }\n return runPreflightOverride(preflight, context);\n}\n\n/**\n * Invoke a registered command-result override through pm's real runner and return\n * the resolved {@link CommandOverrideResult}, so package tests can assert how an\n * override transforms a command's result payload.\n *\n * Accepts the same `ExtensionCommandRegistry` exposed as\n * `activateExtensionForTest(...).commands` (it carries both handlers and\n * overrides). Guards that an override is registered for the (normalized) target\n * command before delegating, so a typo'd command name surfaces as a clear error\n * rather than a silent `overridden: false`. The result is returned verbatim —\n * including the `extension_command_override_async_unsupported:*` warning the\n * runtime emits when an override returns a Promise (command overrides are\n * synchronous), or an `extension_command_override_failed:*` warning on throw.\n */\nexport async function runRegisteredCommandOverrideForTest(\n commands: ExtensionCommandRegistry,\n context: CommandOverrideContext,\n): Promise<CommandOverrideResult> {\n const command = normalizeSdkCommandName(context.command);\n if (!commands.overrides.some((entry) => entry.command === command)) {\n throw new Error(\n `Expected a registered command override for command \"${command}\" to invoke. Available command override commands: ${formatAvailable(\n sortedUnique(commands.overrides.map((entry) => entry.command)),\n )}`,\n );\n }\n return runCommandOverride(commands, context);\n}\n\n/**\n * Invoke a registered renderer override through pm's real runner and return the\n * resolved {@link RendererOverrideResult}, so package tests can assert the custom\n * string an override renders for a given output `format`.\n *\n * Guards that a renderer override is registered for `context.format` before\n * delegating, so a wrong format surfaces as a clear error rather than a silent\n * `overridden: false`. The result is returned verbatim — `overridden: true` with\n * the rendered string on success, or `overridden: false` (with an\n * `extension_renderer_invalid_result:*` / `extension_renderer_failed:*` warning\n * where applicable) when the override returns a non-string or throws.\n */\nexport async function runRegisteredRendererOverrideForTest(\n renderers: ExtensionRendererRegistry,\n context: RendererOverrideContext,\n): Promise<RendererOverrideResult> {\n if (!renderers.overrides.some((entry) => entry.format === context.format)) {\n throw new Error(\n `Expected a registered renderer override for format \"${context.format}\" to invoke. Available renderer override formats: ${formatAvailable(\n sortedUnique(renderers.overrides.map((entry) => entry.format)),\n )}`,\n );\n }\n return runRendererOverride(renderers, context);\n}\n\n/**\n * Invoke a registered service override through pm's real runner and return the\n * resolved {@link ServiceOverrideResult}, so package tests can assert how an\n * override handles an internal service payload (e.g. `output_format`).\n *\n * Guards that a service override is registered for `context.service` before\n * delegating, so a wrong service name surfaces as a clear error rather than a\n * silent `handled: false`. The result is returned verbatim — `handled: true` with\n * the override's result when it claims the payload, or `handled: false` with the\n * original payload (and any `extension_service_override_*` warnings) otherwise.\n */\nexport async function runRegisteredServiceOverrideForTest(\n services: ExtensionServiceRegistry,\n context: ServiceOverrideContext,\n): Promise<ServiceOverrideResult> {\n if (!services.overrides.some((entry) => entry.service === context.service)) {\n throw new Error(\n `Expected a registered service override for service \"${context.service}\" to invoke. Available service override services: ${formatAvailable(\n sortedUnique(services.overrides.map((entry) => entry.service)),\n )}`,\n );\n }\n return runServiceOverride(services, context);\n}\n\n/**\n * Maps each search-provider operation to the runtime-definition keys that may\n * hold its function, in priority order. The host accepts both camelCase and\n * snake_case spellings for the multi-word operations, so this helper mirrors that\n * by trying `embedBatch` before `embed_batch` and `queryExpansion` before\n * `query_expansion`.\n */\nconst SEARCH_PROVIDER_OPERATION_DEFINITION_KEYS: Record<keyof SearchProviderOperationContexts, readonly string[]> = {\n query: [\"query\"],\n embed: [\"embed\"],\n embedBatch: [\"embedBatch\", \"embed_batch\"],\n queryExpansion: [\"queryExpansion\", \"query_expansion\"],\n rerank: [\"rerank\"],\n};\n\n/**\n * Invoke an operation of a registered search provider through the same name\n * resolution the host uses and return the operation's result, so package tests\n * can assert a custom provider's runtime behavior — not just that it registered.\n *\n * This is the search-provider counterpart to {@link runRegisteredCommandForTest},\n * extending the package-author \"invoke\" verb to the `api.registerSearchProvider`\n * surface. Pass the `ExtensionRegistrationRegistry` from\n * `activateExtensionForTest(...).registrations`, the registered provider name, the\n * `operation` to exercise (`query`, `embed`, `embedBatch`, `queryExpansion`, or\n * `rerank`), and a synthetic context. The provider is resolved via\n * {@link resolveRegisteredSearchProvider} (case-insensitive, last registration\n * wins) and the operation is invoked on its `runtime_definition` — the clone that\n * preserves live functions, matching what the runtime dispatches.\n *\n * Throws a descriptive error listing the available providers when the name is not\n * registered, and a separate error when the resolved provider does not implement\n * the requested operation, since invoking an absent provider/operation is a\n * wiring bug in the test rather than a behavior under test.\n */\nexport async function runRegisteredSearchProviderForTest<Operation extends keyof SearchProviderOperationContexts>(\n registrations: ExtensionRegistrationRegistry,\n options: {\n provider: string;\n operation: Operation;\n context: SearchProviderOperationContexts[Operation];\n },\n): Promise<SearchProviderOperationResults[Operation]> {\n const registration = resolveRegisteredSearchProvider(registrations, options.provider);\n if (!registration) {\n const available = sortedUnique(registrations.search_providers.map((entry) => entry.definition.name));\n throw new Error(\n `Expected a registered search provider \"${options.provider}\" to invoke. Available search providers: ${formatAvailable(\n available,\n )}`,\n );\n }\n const runtimeDefinition = registration.runtime_definition;\n const operationFn = SEARCH_PROVIDER_OPERATION_DEFINITION_KEYS[options.operation]\n .map((key) => runtimeDefinition[key])\n .find((value) => typeof value === \"function\");\n if (typeof operationFn !== \"function\") {\n throw new Error(\n `Registered search provider \"${options.provider}\" does not implement the \"${options.operation}\" operation.`,\n );\n }\n return (await (operationFn as (context: SearchProviderOperationContexts[Operation]) => unknown)(\n options.context,\n )) as SearchProviderOperationResults[Operation];\n}\n\n/**\n * Invoke an operation of a registered vector store adapter through the same name\n * resolution the host uses and return the operation's result, so package tests\n * can assert a custom adapter's runtime behavior — not just that it registered.\n *\n * This is the vector-store counterpart to {@link runRegisteredSearchProviderForTest}.\n * Pass the `ExtensionRegistrationRegistry` from\n * `activateExtensionForTest(...).registrations`, the registered adapter name, the\n * `operation` to exercise (`query`, `upsert`, or `delete`), and a synthetic\n * context. The adapter is resolved via {@link resolveRegisteredVectorStoreAdapter}\n * (case-insensitive, last registration wins) and the operation is invoked on its\n * `runtime_definition` — the clone that preserves live functions, matching what\n * the runtime dispatches.\n *\n * Throws a descriptive error listing the available adapters when the name is not\n * registered, and a separate error when the resolved adapter does not implement\n * the requested operation.\n */\nexport async function runRegisteredVectorStoreAdapterForTest<\n Operation extends keyof VectorStoreAdapterOperationContexts,\n>(\n registrations: ExtensionRegistrationRegistry,\n options: {\n adapter: string;\n operation: Operation;\n context: VectorStoreAdapterOperationContexts[Operation];\n },\n): Promise<VectorStoreAdapterOperationResults[Operation]> {\n const registration = resolveRegisteredVectorStoreAdapter(registrations, options.adapter);\n if (!registration) {\n const available = sortedUnique(registrations.vector_store_adapters.map((entry) => entry.definition.name));\n throw new Error(\n `Expected a registered vector store adapter \"${options.adapter}\" to invoke. Available vector store adapters: ${formatAvailable(\n available,\n )}`,\n );\n }\n const operationFn = registration.runtime_definition[options.operation];\n if (typeof operationFn !== \"function\") {\n throw new Error(\n `Registered vector store adapter \"${options.adapter}\" does not implement the \"${options.operation}\" operation.`,\n );\n }\n return (await (operationFn as (context: VectorStoreAdapterOperationContexts[Operation]) => unknown)(\n options.context,\n )) as VectorStoreAdapterOperationResults[Operation];\n}\n\n/**\n * Invoke a registered schema migration's `run` function through the same runtime\n * definition the host executes and return its result, so package tests can assert\n * a migration's behavior — not just that it registered.\n *\n * This completes the package-author \"invoke\" verb across every executable\n * registration surface. The migration is resolved by id via\n * {@link assertRegisteredMigration} (which throws a descriptive \"available\n * migrations\" error when absent), then `run` is invoked on its\n * `runtime_definition` with a context mirroring the one\n * `executeRegisteredRuntimeMigrations` builds at runtime: the resolved id,\n * `command: \"migration\"`, the registering extension's layer/name, the supplied\n * `pmRoot`, and the migration's normalized status. Unlike the runtime — which\n * skips already-applied migrations and folds a throw into a warning — this helper\n * always invokes `run` and lets a throw propagate, so authors can assert both the\n * success result and failure via rejection.\n *\n * Throws when the resolved migration declares no `run` function, since invoking a\n * runless migration is a wiring bug in the test rather than a behavior under test.\n */\nexport async function runRegisteredMigrationForTest(\n registrations: ExtensionRegistrationRegistry,\n options: RunRegisteredMigrationForTestOptions,\n): Promise<unknown> {\n const migration = assertRegisteredMigration(registrations, {\n migration: options.migration,\n extensionName: options.extensionName,\n });\n const run = getMigrationRuntimeDefinition(migration).run;\n if (typeof run !== \"function\") {\n throw new Error(`Registered migration \"${options.migration}\" does not implement a run function to invoke.`);\n }\n const declaredStatus = migration.definition.status;\n const context: SchemaMigrationRunContext = {\n id: migration.definition.id as string,\n command: \"migration\",\n layer: migration.layer,\n extension: migration.name,\n pm_root: options.pmRoot ?? \"\",\n status: (typeof declaredStatus === \"string\" ? declaredStatus.trim().toLowerCase() : \"\") || \"pending\",\n };\n return await (run as (context: SchemaMigrationRunContext) => unknown)(context);\n}\n\n/**\n * Invoke a registered extension importer through pm's real handler-dispatch\n * engine and return its {@link CommandHandlerResult}, so package tests can assert\n * an importer's behavior — not just that it registered.\n *\n * This is the importer counterpart to {@link runRegisteredCommandForTest},\n * extending the package-author \"invoke\" verb to the `api.registerImporter`\n * surface. Because `registerImporter(name, fn)` wraps `fn` into a command handler\n * at the `\"<name> import\"` path, invoking it through `runRegisteredCommandForTest`\n * requires the author to know that naming convention and to remember that an\n * importer is reachable as a command at all. This helper closes both gaps: it\n * accepts the registered importer name directly, validates via\n * {@link assertRegisteredImporter} that it is genuinely a registered importer\n * (not merely some command parked at that path), derives the command path, and\n * dispatches through the same engine.\n *\n * The full activation result is required because importer execution spans two\n * sub-registries: `registrations.importers` proves the importer exists, while\n * `commands` holds the wrapped handler. The result is returned verbatim from the\n * command engine: a clean run yields `{ handled: true, result, warnings: [] }`\n * (where `result` is the importer's return value), a non-exit throw yields\n * `{ handled: false, warnings: [code], errorMessage }`, and an error carrying a\n * numeric `exitCode` propagates — matching runtime import semantics.\n *\n * Throws a descriptive \"available importers\" error (via `assertRegisteredImporter`)\n * when no importer matches, since that is a wiring/typo bug in the test rather\n * than a behavior under test.\n */\nexport async function runRegisteredImporterForTest(\n activation: ExtensionActivationResult,\n options: RunRegisteredImporterForTestOptions,\n): Promise<CommandHandlerResult> {\n const importer = assertRegisteredImporter(activation.registrations, {\n importer: options.importer,\n extensionName: options.extensionName,\n });\n return runRegisteredCommandForTest(activation.commands, {\n command: `${importer.importer} import`,\n args: options.args,\n options: options.options,\n global: options.global,\n pmRoot: options.pmRoot,\n });\n}\n\n/**\n * Invoke a registered extension exporter through pm's real handler-dispatch\n * engine and return its {@link CommandHandlerResult}, so package tests can assert\n * an exporter's behavior — not just that it registered.\n *\n * This is the exporter counterpart to {@link runRegisteredImporterForTest} and\n * the final surface in the package-author \"invoke\" verb. Because\n * `registerExporter(name, fn)` wraps `fn` into a command handler at the\n * `\"<name> export\"` path, this helper accepts the registered exporter name\n * directly, validates via {@link assertRegisteredExporter} that it is genuinely a\n * registered exporter, derives the command path, and dispatches through the same\n * engine. See {@link runRegisteredImporterForTest} for the full activation\n * rationale and return semantics (which apply identically here).\n *\n * Throws a descriptive \"available exporters\" error (via `assertRegisteredExporter`)\n * when no exporter matches, since that is a wiring/typo bug in the test rather\n * than a behavior under test.\n */\nexport async function runRegisteredExporterForTest(\n activation: ExtensionActivationResult,\n options: RunRegisteredExporterForTestOptions,\n): Promise<CommandHandlerResult> {\n const exporter = assertRegisteredExporter(activation.registrations, {\n exporter: options.exporter,\n extensionName: options.extensionName,\n });\n return runRegisteredCommandForTest(activation.commands, {\n command: `${exporter.exporter} export`,\n args: options.args,\n options: options.options,\n global: options.global,\n pmRoot: options.pmRoot,\n });\n}\n\n/**\n * Assert that an {@link ExtensionDeactivationResult} reports the expected clean\n * teardown counts, throwing a descriptive error otherwise. Defaults assert the\n * single-extension happy path — exactly one extension deactivated and none\n * failed. Returns the result so assertions can chain.\n */\nexport function assertExtensionDeactivated(\n result: ExtensionDeactivationResult,\n expectation: ExtensionDeactivationExpectation = {},\n): ExtensionDeactivationResult {\n const expectedDeactivated = expectation.deactivated ?? 1;\n if (result.deactivated !== expectedDeactivated) {\n throw new Error(\n `Expected ${expectedDeactivated} extension${expectedDeactivated === 1 ? \"\" : \"s\"} to deactivate cleanly, ` +\n `but ${result.deactivated} did.`,\n );\n }\n const expectedFailed = expectation.failed ?? 0;\n if (result.failed.length !== expectedFailed) {\n const detail = result.failed.map((failure) => `${failure.layer}:${failure.name} (${failure.error})`).join(\", \");\n throw new Error(\n `Expected ${expectedFailed} teardown failure${expectedFailed === 1 ? \"\" : \"s\"}, ` +\n `but observed ${result.failed.length}${detail.length > 0 ? `: ${detail}` : \"\"}.`,\n );\n }\n return result;\n}\n\n/**\n * Assert that a normalized package manifest advertises expected package\n * resources. Pair with `readPmPackageManifest(packageRoot)` in package tests.\n */\nexport function assertPackageManifest(\n manifest: PmPackageManifest,\n expectation: PackageManifestExpectation,\n): PmPackageManifest {\n if (expectation.packageName !== undefined && manifest.package_name !== expectation.packageName) {\n throw new Error(\n `Expected package manifest package_name to be \"${expectation.packageName}\"; received \"${\n manifest.package_name ?? \"(none)\"\n }\"`,\n );\n }\n if (expectation.aliases !== undefined) {\n assertStringSetIncludes(manifest.aliases, expectation.aliases, \"aliases\");\n }\n if (expectation.resources !== undefined) {\n for (const [kind, expectedPaths] of Object.entries(expectation.resources) as Array<\n [PmPackageResourceKind, readonly string[]]\n >) {\n assertStringSetIncludes(manifest.resources[kind], expectedPaths, `pm.${kind}`);\n }\n }\n return manifest;\n}\n\n/**\n * Assert that an activated extension registration registry contains a command\n * contract with the expected public metadata.\n */\nexport function assertRegisteredCommandContract(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredCommandContractExpectation,\n): RegisteredCommandContractAssertion {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const commandCandidates = registrations.commands.filter((entry) => entry.command === expectedCommand);\n const command = expectation.extensionName\n ? commandCandidates.find((entry) => entry.name === expectation.extensionName)\n : commandCandidates[0];\n if (!command) {\n const available = registrations.commands.map((entry) => entry.command).sort((left, right) => left.localeCompare(right));\n const extensionSuffix = expectation.extensionName ? ` from extension \"${expectation.extensionName}\"` : \"\";\n throw new Error(\n `Expected extension command \"${expectedCommand}\"${extensionSuffix} to be registered. Available commands: ${formatAvailable(\n available,\n )}`,\n );\n }\n\n if (expectation.action !== undefined && command.action !== expectation.action) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" action \"${expectation.action}\", received \"${command.action}\"`,\n );\n }\n\n if (expectation.arguments !== undefined) {\n const actualArguments = (command.arguments ?? []).map((argument) => argument.name);\n const missingArguments = expectation.arguments.filter((argument) => !actualArguments.includes(argument));\n if (missingArguments.length > 0) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" arguments ${formatAvailable(\n expectation.arguments,\n )}; missing ${formatAvailable(missingArguments)}; available ${formatAvailable(actualArguments)}`,\n );\n }\n }\n\n const flags = registrations.flags\n .filter(\n (entry) =>\n entry.target_command === expectedCommand &&\n (expectation.extensionName === undefined || entry.name === expectation.extensionName),\n )\n .flatMap((entry) => entry.flags);\n\n if (expectation.flags !== undefined) {\n const actualFlagLabels = collectFlagLabels(flags);\n const missingFlags = expectation.flags.filter((flag) => !actualFlagLabels.has(flag));\n if (missingFlags.length > 0) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" flags ${formatAvailable(expectation.flags)}; missing ${formatAvailable(\n missingFlags,\n )}; available ${formatAvailable([...actualFlagLabels].sort((left, right) => left.localeCompare(right)))}`,\n );\n }\n }\n\n return { command, flags };\n}\n\n/**\n * Assert that an activated extension registration registry contains flags\n * injected into an existing command through `api.registerFlags(...)`.\n */\nexport function assertRegisteredFlags(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredFlagsExpectation,\n): RegisteredExtensionFlagDefinitions {\n const expectedCommand = normalizeSdkCommandName(expectation.targetCommand);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected target command name must be a non-empty string\");\n }\n\n const candidates = registrations.flags.filter((entry) => entry.target_command === expectedCommand);\n let registration: RegisteredExtensionFlagDefinitions | undefined;\n if (expectation.extensionName) {\n registration = candidates.find((entry) => entry.name === expectation.extensionName);\n } else if (candidates.length === 1) {\n registration = candidates[0];\n } else if (candidates.length > 1) {\n const availableExtensions = sortedUnique(candidates.map((entry) => entry.name));\n throw new Error(\n `Expected flags for target command \"${expectedCommand}\" matched multiple extensions: ${formatAvailable(\n availableExtensions,\n )}. Specify extensionName to choose one registration.`,\n );\n }\n if (!registration) {\n const available = sortedUnique(registrations.flags.map((entry) => entry.target_command));\n const availableExtensions = sortedUnique(candidates.map((entry) => entry.name));\n throw new Error(\n `Expected flags for target command \"${expectedCommand}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available flag target commands: ${formatAvailable(available)}; matching extensions: ${formatAvailable(\n availableExtensions,\n )}`,\n );\n }\n\n if (expectation.flags !== undefined) {\n const actualFlagLabels = collectFlagLabels(registration.flags);\n const missingFlags = expectation.flags.filter((flag) => !actualFlagLabels.has(flag));\n if (missingFlags.length > 0) {\n throw new Error(\n `Expected flags for target command \"${expectedCommand}\" to include ${formatAvailable(\n expectation.flags,\n )}; missing ${formatAvailable(missingFlags)}; available ${formatAvailable(\n [...actualFlagLabels].sort((left, right) => left.localeCompare(right)),\n )}`,\n );\n }\n }\n\n return registration;\n}\n\n/**\n * Assert that an activated extension hook registry contains a hook of the\n * expected lifecycle kind (optionally scoped to a specific extension).\n *\n * Hooks are surfaced via `ExtensionActivationResult.hooks`, not the command\n * registration registry, so this helper accepts an `ExtensionHookRegistry`.\n */\nexport function assertRegisteredHook<TKind extends RegisteredHookKind>(\n hooks: ExtensionHookRegistry,\n expectation: RegisteredHookExpectation & { kind: TKind },\n): ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number] {\n const field = HOOK_KIND_TO_REGISTRY_FIELD[expectation.kind];\n const candidates = hooks[field] as ReadonlyArray<RegisteredExtensionHook<unknown>>;\n const hook = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!hook) {\n const available = sortedUnique(candidates.map((entry) => entry.name));\n throw new Error(\n `Expected a \"${expectation.kind}\" hook${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available \"${expectation.kind}\" hooks: ${formatAvailable(available)}`,\n );\n }\n\n return hook as ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number];\n}\n\n/**\n * Assert that an activated extension registration registry contains a search\n * provider with the expected name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredSearchProvider(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredSearchProviderExpectation,\n): RegisteredExtensionSearchProvider {\n const expectedProvider = normalizeSdkIdentifier(expectation.provider);\n if (expectedProvider.length === 0) {\n throw new Error(\"Expected search provider name must be a non-empty string\");\n }\n\n const candidates = registrations.search_providers.filter(\n (entry) => normalizeSdkIdentifier(entry.definition.name) === expectedProvider,\n );\n const provider = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!provider) {\n const available = sortedUnique(registrations.search_providers.map((entry) => entry.definition.name));\n throw new Error(\n `Expected search provider \"${expectedProvider}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available search providers: ${formatAvailable(available)}`,\n );\n }\n\n return provider;\n}\n\n/**\n * Assert that an activated extension registration registry contains a vector\n * store adapter with the expected name (optionally scoped to a specific\n * extension).\n */\nexport function assertRegisteredVectorStoreAdapter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredVectorStoreAdapterExpectation,\n): RegisteredExtensionVectorStoreAdapter {\n const expectedAdapter = normalizeSdkIdentifier(expectation.adapter);\n if (expectedAdapter.length === 0) {\n throw new Error(\"Expected vector store adapter name must be a non-empty string\");\n }\n\n const candidates = registrations.vector_store_adapters.filter(\n (entry) => normalizeSdkIdentifier(entry.definition.name) === expectedAdapter,\n );\n const adapter = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!adapter) {\n const available = sortedUnique(registrations.vector_store_adapters.map((entry) => entry.definition.name));\n throw new Error(\n `Expected vector store adapter \"${expectedAdapter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available vector store adapters: ${formatAvailable(available)}`,\n );\n }\n\n return adapter;\n}\n\n/**\n * Assert that an activated extension registration registry contains an importer\n * for the expected format/name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredImporter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredImporterExpectation,\n): RegisteredExtensionImporter {\n const expectedImporter = normalizeSdkIdentifier(expectation.importer);\n if (expectedImporter.length === 0) {\n throw new Error(\"Expected importer name must be a non-empty string\");\n }\n\n const candidates = registrations.importers.filter(\n (entry) => normalizeSdkIdentifier(entry.importer) === expectedImporter,\n );\n const importer = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!importer) {\n const available = sortedUnique(registrations.importers.map((entry) => entry.importer));\n throw new Error(\n `Expected importer \"${expectedImporter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available importers: ${formatAvailable(available)}`,\n );\n }\n\n return importer;\n}\n\n/**\n * Assert that an activated extension registration registry contains an exporter\n * for the expected format/name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredExporter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredExporterExpectation,\n): RegisteredExtensionExporter {\n const expectedExporter = normalizeSdkIdentifier(expectation.exporter);\n if (expectedExporter.length === 0) {\n throw new Error(\"Expected exporter name must be a non-empty string\");\n }\n\n const candidates = registrations.exporters.filter(\n (entry) => normalizeSdkIdentifier(entry.exporter) === expectedExporter,\n );\n const exporter = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!exporter) {\n const available = sortedUnique(registrations.exporters.map((entry) => entry.exporter));\n throw new Error(\n `Expected exporter \"${expectedExporter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available exporters: ${formatAvailable(available)}`,\n );\n }\n\n return exporter;\n}\n\n/**\n * Assert that an activated extension registration registry contains a custom\n * item field definition (optionally scoped to a specific extension).\n */\nexport function assertRegisteredItemField(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredItemFieldExpectation,\n): RegisteredItemFieldAssertion {\n const expectedField = normalizeSdkIdentifier(expectation.field);\n if (expectedField.length === 0) {\n throw new Error(\"Expected item field name must be a non-empty string\");\n }\n\n const candidates = registrations.item_fields\n .filter((entry) => expectation.extensionName === undefined || entry.name === expectation.extensionName)\n .map((registration) => ({\n registration,\n field: registration.fields.find((field) => normalizeSdkIdentifier(field.name) === expectedField),\n }))\n .filter((entry): entry is RegisteredItemFieldAssertion => entry.field !== undefined);\n\n const match = candidates.find((entry) => expectation.type === undefined || entry.field.type === expectation.type);\n if (!match) {\n const available = sortedUnique(\n registrations.item_fields.flatMap((entry) => entry.fields.map((field) => `${field.name}:${field.type}`)),\n );\n throw new Error(\n `Expected item field \"${expectedField}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available item fields: ${formatAvailable(available)}`,\n );\n }\n\n return match;\n}\n\n/**\n * Assert that an activated extension registration registry contains a custom\n * item type definition (optionally scoped to a specific extension).\n */\nexport function assertRegisteredItemType(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredItemTypeExpectation,\n): RegisteredItemTypeAssertion {\n const expectedType = normalizeSdkIdentifier(expectation.itemType);\n if (expectedType.length === 0) {\n throw new Error(\"Expected item type name must be a non-empty string\");\n }\n\n const candidates = registrations.item_types\n .filter((entry) => expectation.extensionName === undefined || entry.name === expectation.extensionName)\n .map((registration) => ({\n registration,\n itemType: registration.types.find((itemType) => normalizeSdkIdentifier(itemType.name) === expectedType),\n }))\n .filter((entry): entry is RegisteredItemTypeAssertion => entry.itemType !== undefined);\n\n const match = candidates.find((entry) => expectation.folder === undefined || entry.itemType.folder === expectation.folder);\n if (!match) {\n const available = sortedUnique(\n registrations.item_types.flatMap((entry) => entry.types.map((itemType) => `${itemType.name}:${itemType.folder}`)),\n );\n throw new Error(\n `Expected item type \"${expectedType}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available item types: ${formatAvailable(available)}`,\n );\n }\n\n return match;\n}\n\n/**\n * Assert that an activated extension command registry contains a command\n * override registered via `api.registerCommand(command, override)` (optionally\n * scoped to a specific extension).\n *\n * Command overrides are surfaced via `ExtensionActivationResult.commands`, not\n * the command registration registry, so this helper accepts an\n * `ExtensionCommandRegistry`.\n */\nexport function assertRegisteredCommandOverride(\n commands: ExtensionCommandRegistry,\n expectation: RegisteredCommandOverrideExpectation,\n): RegisteredExtensionCommandOverride {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const candidates = commands.overrides.filter((entry) => entry.command === expectedCommand);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(commands.overrides.map((entry) => entry.command));\n throw new Error(\n `Expected command override \"${expectedCommand}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available command overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension parser registry contains a parser override\n * registered via `api.registerParser(command, override)` (optionally scoped to\n * a specific extension).\n *\n * Parser overrides are surfaced via `ExtensionActivationResult.parsers`, not the\n * command registration registry, so this helper accepts an\n * `ExtensionParserRegistry`.\n */\nexport function assertRegisteredParserOverride(\n parsers: ExtensionParserRegistry,\n expectation: RegisteredParserOverrideExpectation,\n): RegisteredExtensionParserOverride {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const candidates = parsers.overrides.filter((entry) => entry.command === expectedCommand);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(parsers.overrides.map((entry) => entry.command));\n throw new Error(\n `Expected parser override \"${expectedCommand}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available parser overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension preflight registry contains a preflight\n * override registered via `api.registerPreflight(override)` (optionally scoped\n * to a specific extension).\n *\n * Preflight overrides are global (they run for every command and carry no\n * `command` field), so the expectation only accepts an optional\n * `extensionName`. Preflight overrides are surfaced via\n * `ExtensionActivationResult.preflight`.\n */\nexport function assertRegisteredPreflightOverride(\n preflight: ExtensionPreflightRegistry,\n expectation: RegisteredPreflightOverrideExpectation = {},\n): RegisteredExtensionPreflightOverride {\n const override = expectation.extensionName\n ? preflight.overrides.find((entry) => entry.name === expectation.extensionName)\n : preflight.overrides[0];\n if (!override) {\n const available = sortedUnique(preflight.overrides.map((entry) => entry.name));\n throw new Error(\n `Expected a preflight override${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available preflight overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension renderer registry contains a renderer\n * override registered via `api.registerRenderer(format, renderer)` for the\n * expected output format (optionally scoped to a specific extension).\n *\n * Renderer overrides are surfaced via `ExtensionActivationResult.renderers`.\n */\nexport function assertRegisteredRendererOverride(\n renderers: ExtensionRendererRegistry,\n expectation: RegisteredRendererOverrideExpectation,\n): RegisteredExtensionRendererOverride {\n const expectedFormat = normalizeSdkIdentifier(expectation.format);\n if (expectedFormat.length === 0) {\n throw new Error(\"Expected renderer format must be a non-empty string\");\n }\n\n const candidates = renderers.overrides.filter((entry) => entry.format === expectedFormat);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(renderers.overrides.map((entry) => entry.format));\n throw new Error(\n `Expected renderer override \"${expectedFormat}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available renderer overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension service registry contains a service override\n * registered via `api.registerService(service, override)` for the expected\n * service name (optionally scoped to a specific extension).\n *\n * Service overrides are surfaced via `ExtensionActivationResult.services`, not the\n * command registration registry, so this helper accepts an\n * `ExtensionServiceRegistry`.\n */\nexport function assertRegisteredServiceOverride(\n services: ExtensionServiceRegistry,\n expectation: RegisteredServiceOverrideExpectation,\n): RegisteredExtensionServiceOverride {\n const expectedService = normalizeSdkIdentifier(expectation.service);\n if (expectedService.length === 0) {\n throw new Error(\"Expected service name must be a non-empty string\");\n }\n\n const candidates = services.overrides.filter((entry) => normalizeSdkIdentifier(entry.service) === expectedService);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(services.overrides.map((entry) => entry.service));\n throw new Error(\n `Expected service override \"${expectedService}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available service overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension registration registry contains a schema\n * migration registered via `api.registerMigration(definition)` with the expected\n * id (optionally scoped to a specific extension and asserting the `mandatory`\n * governance flag, where an unset flag is treated as non-mandatory).\n *\n * Migrations are surfaced via `ExtensionActivationResult.registrations.migrations`.\n */\nexport function assertRegisteredMigration(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredMigrationExpectation,\n): RegisteredExtensionSchemaMigrationDefinition {\n const expectedMigration = normalizeSdkIdentifier(expectation.migration);\n if (expectedMigration.length === 0) {\n throw new Error(\"Expected migration id must be a non-empty string\");\n }\n\n const candidates = registrations.migrations.filter(\n (entry) =>\n (expectation.extensionName === undefined || entry.name === expectation.extensionName) &&\n typeof entry.definition.id === \"string\" &&\n normalizeSdkIdentifier(entry.definition.id) === expectedMigration,\n );\n const match = candidates.find(\n (entry) => expectation.mandatory === undefined || (entry.definition.mandatory ?? false) === expectation.mandatory,\n );\n if (match) {\n return match;\n }\n\n // The id (and any extension scope) matched but the `mandatory` flag did not:\n // report the mismatch directly rather than the misleading \"not registered\"\n // listing. Reaching here with a candidate implies `expectation.mandatory` was\n // set, since an unset flag matches any candidate above.\n const idMatch = candidates[0];\n if (idMatch !== undefined) {\n throw new Error(\n `Expected migration \"${expectedMigration}\"${extensionNameSuffix(expectation.extensionName)} to have ` +\n `mandatory=${expectation.mandatory}, but it is mandatory=${idMatch.definition.mandatory ?? false}.`,\n );\n }\n\n const available = sortedUnique(\n registrations.migrations.map((entry) => {\n const id =\n typeof entry.definition.id === \"string\" && entry.definition.id.trim().length > 0\n ? entry.definition.id.trim()\n : \"(unnamed)\";\n return `${id}:${entry.definition.mandatory === true}`;\n }),\n );\n throw new Error(\n `Expected migration \"${expectedMigration}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available migrations: ${formatAvailable(available)}`,\n );\n}\n\n/**\n * Assert that an activated extension declares no capability it never uses\n * (least privilege). Pass the same capabilities as `manifest.capabilities` via\n * `expectation.declared`; the helper computes what the extension actually\n * registered against and throws when any declared capability is unused.\n *\n * This is the package-test counterpart of the advisory\n * `extension_capability_unused` warning `pm package doctor` emits, letting an\n * author catch an over-broad manifest at `npm test` time. Returns the\n * declared/used/unused breakdown for further assertions.\n */\nexport function assertExtensionCapabilityUsage(\n activation: ExtensionActivationResult,\n expectation: ExtensionCapabilityUsageExpectation,\n): ExtensionCapabilityUsageAssertion {\n const toKnownCapabilitySet = (capabilities: readonly string[], field: string): Set<ExtensionCapability> => {\n const known = new Set<ExtensionCapability>();\n for (const capability of capabilities) {\n const normalized = normalizeKnownExtensionCapability(capability);\n if (normalized === null) {\n throw new Error(\n `Expected ${field} capability \"${capability}\" to be a known extension capability. ` +\n \"Use canonical capability names (see manifest.capabilities).\",\n );\n }\n known.add(normalized);\n }\n return known;\n };\n const declared = [...toKnownCapabilitySet(expectation.declared, \"declared\")].sort((left, right) =>\n left.localeCompare(right),\n );\n const allowUnused = toKnownCapabilitySet(expectation.allowUnused ?? [], \"allowUnused\");\n const used = collectUsedExtensionCapabilities(activation, { extensionName: expectation.extensionName });\n const usedSet = new Set(used);\n const unused = declared.filter((capability) => !usedSet.has(capability) && !allowUnused.has(capability));\n if (unused.length > 0) {\n const scopeSuffix = extensionNameSuffix(expectation.extensionName);\n throw new Error(\n `Expected every declared capability${scopeSuffix} to be exercised, but [${unused.join(\n \", \",\n )}] ${unused.length === 1 ? \"is\" : \"are\"} declared yet never registered against. ` +\n `Remove ${unused.length === 1 ? \"it\" : \"them\"} from manifest.capabilities for least privilege, ` +\n \"or pass allowUnused for capabilities registered only behind a runtime flag.\",\n );\n }\n return { declared, used, unused };\n}\n"],"names":[],"mappings":";;AAsEA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sCAAsC,EAAE,MAAM,uCAAuC,CA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,CAAC;IACF,MAAM,WAAW,GAAG,oBAAoB,CAAC,WAAW,CAAC,WAAW,IAAI,EAAE,EAAE,aAAa,CAAC,CAAC;IACvF,MAAM,IAAI,GAAG,gCAAgC,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE,WAAW,CAAC,aAAa,EAAE,CAAC,CAAC;IACxG,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;IACzG,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,WAAW,GAAG,mBAAmB,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QACnE,MAAM,IAAI,KAAK,CACb,qCAAqC,WAAW,0BAA0B,MAAM,CAAC,IAAI,CACnF,IAAI,CACL,KAAK,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,0CAA0C;YAChF,UAAU,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,mDAAmD;YAChG,6EAA6E,CAChF,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACpC,CAAC","debugId":"7a8097be-5b9f-5313-9ac3-6120d2fce878"}
package/dist/types.d.ts CHANGED
@@ -468,6 +468,13 @@ export interface ItemMetadata {
468
468
  title: string;
469
469
  description: string;
470
470
  type: ItemType;
471
+ /**
472
+ * On-disk front-matter format version. Absent means the implicit baseline
473
+ * (version 1) and is never serialized; populated only once an item advances
474
+ * past the baseline via a future storage migration. See
475
+ * core/item/item-format-version.
476
+ */
477
+ pm_format_version?: number;
471
478
  source_type?: string;
472
479
  type_options?: Record<string, string>;
473
480
  status: ItemStatus;
package/dist/types.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Defines the shared project-management data model used by CLI, SDK, MCP, and packages.
5
5
  */
6
6
 
7
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3123775a-c8ad-5339-abf2-f3893145f1e7")}catch(e){}}();
7
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="46812059-b93e-5599-a222-4ac0de6f4911")}catch(e){}}();
8
8
  export const BUILTIN_ITEM_TYPE_VALUES = [
9
9
  "Epic",
10
10
  "Feature",
@@ -133,4 +133,4 @@ export const CONTEXT_SECTION_VALUES = [
133
133
  "tests",
134
134
  ];
135
135
  //# sourceMappingURL=types.js.map
136
- //# debugId=3123775a-c8ad-5339-abf2-f3893145f1e7
136
+ //# debugId=46812059-b93e-5599-a222-4ac0de6f4911
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["types.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module types\n *\n * Defines the shared project-management data model used by CLI, SDK, MCP, and packages.\n */\nexport const BUILTIN_ITEM_TYPE_VALUES = [\n \"Epic\",\n \"Feature\",\n \"Task\",\n \"Chore\",\n \"Issue\",\n \"Decision\",\n \"Event\",\n \"Reminder\",\n \"Milestone\",\n \"Meeting\",\n \"Plan\",\n] as const;\nexport const ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;\n/**\n * Restricts builtin item type values accepted by command, SDK, and storage contracts.\n */\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\n/**\n * Restricts item type values accepted by command, SDK, and storage contracts.\n */\nexport type ItemType = string;\n\nexport const STATUS_VALUES = [\n \"draft\",\n \"open\",\n \"in_progress\",\n \"blocked\",\n \"closed\",\n \"canceled\",\n] as const;\n/**\n * Restricts item status values accepted by command, SDK, and storage contracts.\n */\nexport type ItemStatus = string;\n\nexport const RUNTIME_STATUS_ROLE_VALUES = [\n \"draft\",\n \"active\",\n \"blocked\",\n \"terminal\",\n \"terminal_done\",\n \"terminal_canceled\",\n \"default_open\",\n \"default_close\",\n \"default_cancel\",\n] as const;\n/**\n * Restricts runtime status role values accepted by command, SDK, and storage contracts.\n */\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\n/**\n * Restricts runtime field type values accepted by command, SDK, and storage contracts.\n */\nexport type RuntimeFieldType = (typeof RUNTIME_FIELD_TYPE_VALUES)[number];\n\nexport const RUNTIME_FIELD_COMMAND_VALUES = [\"create\", \"update\", \"update_many\", \"list\", \"search\", \"calendar\", \"context\"] as const;\n/**\n * Restricts runtime field command values accepted by command, SDK, and storage contracts.\n */\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\n/**\n * Restricts runtime unknown field policy values accepted by command, SDK, and storage contracts.\n */\nexport type RuntimeUnknownFieldPolicy = (typeof RUNTIME_UNKNOWN_FIELD_POLICY_VALUES)[number];\n\nexport const DEPENDENCY_KIND_VALUES = [\n \"blocks\",\n \"parent\",\n \"child\",\n \"parent_child\",\n \"child_of\",\n \"related\",\n \"related_to\",\n \"discovered_from\",\n \"blocked_by\",\n \"incident_from\",\n \"epic\",\n \"supersedes\",\n \"task\",\n] as const;\n/**\n * Restricts dependency kind values accepted by command, SDK, and storage contracts.\n */\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\n/**\n * Restricts link scope values accepted by command, SDK, and storage contracts.\n */\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\n/**\n * Restricts risk level values accepted by command, SDK, and storage contracts.\n */\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\n/**\n * Restricts issue severity values accepted by command, SDK, and storage contracts.\n */\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\n/**\n * Restricts confidence text level values accepted by command, SDK, and storage contracts.\n */\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\n/**\n * Restricts confidence value values accepted by command, SDK, and storage contracts.\n */\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\n/**\n * Restricts item format values accepted by command, SDK, and storage contracts.\n */\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\n/**\n * Restricts sprint release format policy values accepted by command, SDK, and storage contracts.\n */\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\n/**\n * Restricts parent reference policy values accepted by command, SDK, and storage contracts.\n */\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\n/**\n * Restricts validate metadata profile values accepted by command, SDK, and storage contracts.\n */\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\n/**\n * Restricts governance preset values accepted by command, SDK, and storage contracts.\n */\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\n/**\n * Restricts governance ownership enforcement values accepted by command, SDK, and storage contracts.\n */\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\n/**\n * Restricts governance create mode default values accepted by command, SDK, and storage contracts.\n */\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\n/**\n * Restricts governance close validation default values accepted by command, SDK, and storage contracts.\n */\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\n/**\n * Restricts governance workflow enforcement values accepted by command, SDK, and storage contracts.\n */\nexport type GovernanceWorkflowEnforcement = (typeof GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES)[number];\nexport const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [\n \"author\",\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"close_reason\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n] as const;\n/**\n * Restricts validate metadata required field values accepted by command, SDK, and storage contracts.\n */\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\n/**\n * Restricts recurrence frequency values accepted by command, SDK, and storage contracts.\n */\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\n/**\n * Restricts recurrence weekday values accepted by command, SDK, and storage contracts.\n */\nexport type RecurrenceWeekday = (typeof RECURRENCE_WEEKDAY_VALUES)[number];\n\n/**\n * Canonical week-order index for a recurrence weekday (mon=0 .. sun=6).\n * Shared by item serialization, create/update parsing, and calendar expansion\n * so weekday ordering cannot drift between those modules.\n */\nexport function weekdayOrderIndex(value: RecurrenceWeekday): number {\n return RECURRENCE_WEEKDAY_VALUES.indexOf(value);\n}\n\n/**\n * Documents the dependency payload exchanged by command, SDK, and package integrations.\n */\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\n/**\n * Documents the comment payload exchanged by command, SDK, and package integrations.\n */\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\n/**\n * Documents the log note payload exchanged by command, SDK, and package integrations.\n */\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\n/**\n * Documents the linked file payload exchanged by command, SDK, and package integrations.\n */\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\n/**\n * Documents the linked test payload exchanged by command, SDK, and package integrations.\n */\nexport interface LinkedTest {\n command?: string;\n path?: string;\n scope: LinkScope;\n timeout_seconds?: number;\n pm_context_mode?: \"schema\" | \"tracker\" | \"auto\";\n env_set?: Record<string, string>;\n env_clear?: string[];\n shared_host_safe?: boolean;\n assert_stdout_contains?: string[];\n assert_stdout_regex?: string[];\n assert_stderr_contains?: string[];\n assert_stderr_regex?: string[];\n assert_stdout_min_lines?: number;\n assert_json_field_equals?: Record<string, string>;\n assert_json_field_gte?: Record<string, number>;\n note?: string;\n}\n\n/**\n * Documents the linked doc payload exchanged by command, SDK, and package integrations.\n */\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\n/**\n * Documents the reminder payload exchanged by command, SDK, and package integrations.\n */\nexport interface Reminder {\n at: string;\n text: string;\n}\n\n/**\n * Documents the recurrence rule payload exchanged by command, SDK, and package integrations.\n */\nexport interface RecurrenceRule {\n freq: RecurrenceFrequency;\n interval?: number;\n count?: number;\n until?: string;\n by_weekday?: RecurrenceWeekday[];\n by_month_day?: number[];\n exdates?: string[];\n}\n\n/**\n * Documents the calendar event payload exchanged by command, SDK, and package integrations.\n */\nexport interface CalendarEvent {\n start_at: string;\n end_at?: string;\n title?: string;\n description?: string;\n location?: string;\n all_day?: boolean;\n timezone?: string;\n recurrence?: RecurrenceRule;\n}\n\nexport const PLAN_MODE_VALUES = [\n \"draft\",\n \"research\",\n \"review\",\n \"approved\",\n \"executing\",\n \"paused\",\n \"completed\",\n \"superseded\",\n] as const;\n/**\n * Restricts plan mode values accepted by command, SDK, and storage contracts.\n */\nexport type PlanMode = (typeof PLAN_MODE_VALUES)[number];\n\nexport const PLAN_STEP_STATUS_VALUES = [\n \"pending\",\n \"in_progress\",\n \"completed\",\n \"blocked\",\n \"skipped\",\n \"superseded\",\n] as const;\n/**\n * Restricts plan step status values accepted by command, SDK, and storage contracts.\n */\nexport type PlanStepStatus = (typeof PLAN_STEP_STATUS_VALUES)[number];\n\nexport const PLAN_HARNESS_VALUES = [\"codex\", \"claude-code\", \"cursor\", \"generic\"] as const;\n/**\n * Restricts plan harness values accepted by command, SDK, and storage contracts.\n */\nexport type PlanHarness = (typeof PLAN_HARNESS_VALUES)[number];\n\nexport const PLAN_STEP_LINK_KIND_VALUES = [\n \"related\",\n \"blocks\",\n \"blocked_by\",\n \"depends_on\",\n \"discovered_from\",\n \"implements\",\n \"verifies\",\n \"supersedes\",\n] as const;\n/**\n * Restricts plan step link kind values accepted by command, SDK, and storage contracts.\n */\nexport type PlanStepLinkKind = (typeof PLAN_STEP_LINK_KIND_VALUES)[number];\n\n/**\n * Documents the plan step link payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanStepLink {\n id: string;\n kind: PlanStepLinkKind;\n note?: string;\n required_before_step?: boolean;\n}\n\n/**\n * Documents the plan step file payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanStepFile {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\n\n/**\n * Documents the plan step test payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanStepTest {\n command?: string;\n path?: string;\n note?: string;\n}\n\n/**\n * Documents the plan step doc payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanStepDoc {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\n\n/**\n * Documents the plan step payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanStep {\n id: string;\n order: number;\n title: string;\n body?: string;\n status: PlanStepStatus;\n owner?: string;\n evidence?: string;\n blocked_reason?: string;\n superseded_by?: string;\n linked_items?: PlanStepLink[];\n files?: PlanStepFile[];\n tests?: PlanStepTest[];\n docs?: PlanStepDoc[];\n created_at: string;\n updated_at: string;\n completed_at?: string;\n}\n\n/**\n * Documents the plan decision payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanDecision {\n ts: string;\n author: string;\n decision: string;\n rationale?: string;\n evidence?: string;\n step_id?: string;\n}\n\n/**\n * Documents the plan discovery payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanDiscovery {\n ts: string;\n author: string;\n text: string;\n step_id?: string;\n}\n\n/**\n * Documents the plan validation check payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanValidationCheck {\n text: string;\n command?: string;\n expected?: string;\n}\n\n/**\n * Documents the item type option definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\n/**\n * Documents the item type command option policy payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\n\n/**\n * Documents the item type definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemTypeDefinition {\n name: string;\n description?: string;\n /**\n * Status assigned to newly created items of this type when `--status` is not\n * provided. Falls back to the workflow's open status when unset or invalid.\n */\n default_status?: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n options?: ItemTypeOptionDefinition[];\n command_option_policies?: ItemTypeCommandOptionPolicy[];\n}\n\n/**\n * Documents the runtime status definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\n\n/**\n * Documents the runtime field definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface RuntimeFieldDefinition {\n key: string;\n metadata_key?: string;\n /**\n * @deprecated Use metadata_key.\n */\n front_matter_key?: string;\n cli_flag?: string;\n cli_aliases?: string[];\n description?: string;\n type?: RuntimeFieldType;\n commands?: RuntimeFieldCommand[];\n repeatable?: boolean;\n required?: boolean;\n required_on_create?: boolean;\n required_types?: string[];\n allow_unset?: boolean;\n}\n\n/**\n * Documents the runtime workflow definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface RuntimeWorkflowDefinition {\n draft_status?: string;\n open_status?: string;\n in_progress_status?: string;\n blocked_status?: string;\n close_status?: string;\n canceled_status?: string;\n}\n\n/**\n * Documents the runtime schema file config payload exchanged by command, SDK, and package integrations.\n */\nexport interface RuntimeSchemaFileConfig {\n types?: string;\n statuses?: string;\n fields?: string;\n workflows?: string;\n}\n\n/**\n * Per-type allowed-transition rule. A type with no matching entry is\n * unrestricted; a type with an entry allows only the listed [from, to]\n * status pairs (status tokens are resolved case-insensitively through the\n * status registry alias map; a same-status no-op is always allowed).\n */\nexport interface TypeWorkflowDefinition {\n type: string;\n allowed_transitions: [string, string][];\n}\n\n/**\n * Documents the runtime schema settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface RuntimeSchemaSettings {\n version: number;\n files: RuntimeSchemaFileConfig;\n statuses: RuntimeStatusDefinition[];\n fields: RuntimeFieldDefinition[];\n workflow: RuntimeWorkflowDefinition;\n type_workflows?: TypeWorkflowDefinition[];\n unknown_field_policy: RuntimeUnknownFieldPolicy;\n}\n\n/**\n * Documents the item test run summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemTestRunSummary {\n run_id: string;\n kind: \"test\" | \"test-all\";\n status: \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n started_at: string;\n finished_at: string;\n recorded_at: string;\n attempt?: number;\n resumed_from?: string;\n passed: number;\n failed: number;\n skipped: number;\n items?: number;\n linked_tests?: number;\n fail_on_skipped_triggered?: boolean;\n}\n\n/**\n * Documents the item metadata payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemMetadata {\n id: string;\n title: string;\n description: string;\n type: ItemType;\n source_type?: string;\n type_options?: Record<string, string>;\n status: ItemStatus;\n priority: 0 | 1 | 2 | 3 | 4;\n tags: string[];\n created_at: string;\n updated_at: string;\n deadline?: string;\n reminders?: Reminder[];\n events?: CalendarEvent[];\n closed_at?: string;\n assignee?: string;\n source_owner?: string;\n author?: string;\n estimated_minutes?: number;\n acceptance_criteria?: string;\n design?: string;\n external_ref?: string;\n definition_of_ready?: string;\n order?: number;\n goal?: string;\n objective?: string;\n value?: string;\n impact?: string;\n outcome?: string;\n why_now?: string;\n parent?: string;\n reviewer?: string;\n risk?: RiskLevel;\n confidence?: ConfidenceValue;\n sprint?: string;\n release?: string;\n blocked_by?: string;\n blocked_reason?: string;\n unblock_note?: string;\n reporter?: string;\n severity?: IssueSeverity;\n environment?: string;\n repro_steps?: string;\n resolution?: string;\n expected_result?: string;\n actual_result?: string;\n affected_version?: string;\n fixed_version?: string;\n component?: string;\n regression?: boolean;\n customer_impact?: string;\n dependencies?: Dependency[];\n comments?: Comment[];\n notes?: LogNote[];\n learnings?: LogNote[];\n files?: LinkedFile[];\n tests?: LinkedTest[];\n test_runs?: ItemTestRunSummary[];\n docs?: LinkedDoc[];\n close_reason?: string;\n duplicate_of?: string;\n plan_mode?: PlanMode;\n plan_scope?: string;\n plan_harness?: PlanHarness;\n plan_steps?: PlanStep[];\n plan_decisions?: PlanDecision[];\n plan_discoveries?: PlanDiscovery[];\n plan_validation?: PlanValidationCheck[];\n plan_resume_context?: string;\n [key: string]: unknown;\n}\n\n/**\n * @deprecated Use ItemMetadata.\n */\nexport type ItemFrontMatter = ItemMetadata;\n\n/**\n * Documents the item document payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemDocument {\n metadata: ItemMetadata;\n body: string;\n}\n\n/**\n * Documents the history patch op payload exchanged by command, SDK, and package integrations.\n */\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\n\n/**\n * Documents the history entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface HistoryEntry {\n ts: string;\n author: string;\n op: string;\n patch: HistoryPatchOp[];\n before_hash: string;\n after_hash: string;\n message?: string;\n}\n\nexport const CONTEXT_DEPTH_VALUES = [\"brief\", \"standard\", \"deep\", \"full\"] as const;\n/**\n * Restricts context depth values accepted by command, SDK, and storage contracts.\n */\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"recently_created\",\n \"unparented\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\n/**\n * Restricts context section name values accepted by command, SDK, and storage contracts.\n */\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\n/**\n * Documents the context section settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n recently_created: boolean;\n unparented: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\n/**\n * Documents the context settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\n/**\n * Documents the governance settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\n require_close_reason: boolean;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n force_required_for_stale_lock: boolean;\n create_default_type?: string;\n /**\n * Per-type allowed-transition enforcement mode for `pm update --status`.\n * Read raw from settings (not preset-derived) so existing projects are\n * unaffected when unset; defaults to \"off\".\n */\n workflow_enforcement?: GovernanceWorkflowEnforcement;\n}\n\n/**\n * Restricts extension policy mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicyMode = \"off\" | \"warn\" | \"enforce\";\n/**\n * Restricts extension trust mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionTrustMode = \"off\" | \"warn\" | \"enforce\";\n/**\n * Restricts extension sandbox profile values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionSandboxProfile = \"none\" | \"restricted\" | \"strict\";\n\n/**\n * Documents the extension policy override settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionPolicyOverrideSettings {\n name: string;\n disabled?: boolean;\n require_trusted?: boolean;\n require_provenance?: boolean;\n sandbox_profile?: ExtensionSandboxProfile;\n allowed_capabilities?: string[];\n blocked_capabilities?: string[];\n allowed_surfaces?: string[];\n blocked_surfaces?: string[];\n allowed_commands?: string[];\n blocked_commands?: string[];\n allowed_actions?: string[];\n blocked_actions?: string[];\n allowed_services?: string[];\n blocked_services?: string[];\n}\n\n/**\n * Documents the extension policy settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionPolicySettings {\n mode: ExtensionPolicyMode;\n trust_mode: ExtensionTrustMode;\n require_provenance: boolean;\n trusted_extensions: string[];\n default_sandbox_profile: ExtensionSandboxProfile;\n allowed_extensions: string[];\n blocked_extensions: string[];\n allowed_capabilities: string[];\n blocked_capabilities: string[];\n allowed_surfaces: string[];\n blocked_surfaces: string[];\n allowed_commands: string[];\n blocked_commands: string[];\n allowed_actions: string[];\n blocked_actions: string[];\n allowed_services: string[];\n blocked_services: string[];\n extension_overrides: ExtensionPolicyOverrideSettings[];\n}\n\n/**\n * Documents the agent guidance settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface AgentGuidanceSettings {\n prompt_completed: boolean;\n declined: boolean;\n declined_at: string;\n template_version: number;\n last_checked_files: string[];\n}\n\n/**\n * Restricts search mutation refresh policy values accepted by command, SDK, and storage contracts.\n */\nexport type SearchMutationRefreshPolicy = \"cache_only\" | \"semantic_configured\" | \"semantic_auto\";\n\n/**\n * Documents the search query expansion settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchQueryExpansionSettings {\n enabled: boolean;\n provider: string;\n}\n\n/**\n * Documents the search rerank settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchRerankSettings {\n enabled: boolean;\n model: string;\n top_k: number;\n}\n\n/**\n * Config-driven policy for automatic history-stream compaction triage.\n *\n * When `enabled`, `pm health` surfaces an advisory warning for any history\n * stream whose non-empty entry count exceeds `max_entries`, and `pm\n * history-compact` bulk mode uses `max_entries` as its default `--all-over`\n * threshold so the configured policy drives corpus-wide sweeps. `trigger`\n * records operator intent — both values raise the health advisory; `auto`\n * additionally signals that scheduled/automatic sweeps are expected.\n */\nexport interface HistoryCompactPolicy {\n enabled: boolean;\n max_entries: number;\n trigger: \"health_warn\" | \"auto\";\n}\n\n/**\n * Documents the pm settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface PmSettings {\n version: number;\n id_prefix: string;\n author_default: string;\n item_format: ItemFormat;\n locks: {\n ttl_seconds: number;\n };\n /**\n * Retention policy for bulk-mutation rollback checkpoints written by\n * `update-many`/`close-many`. `pm gc --scope checkpoints` prunes checkpoint\n * files older than `retention_days`; checkpoints with an unparseable\n * `created_at` are retained (safety-first, mirroring the stale-lock sweep).\n */\n checkpoints: {\n retention_days: number;\n };\n output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\n compact_policy: HistoryCompactPolicy;\n };\n validation: {\n sprint_release_format: SprintReleaseFormatPolicy;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n metadata_required_fields: ValidateMetadataRequiredField[];\n lifecycle_stale_blocker_reason_patterns: string[];\n lifecycle_closure_like_blocked_reason_patterns: string[];\n lifecycle_closure_like_resolution_patterns: string[];\n lifecycle_closure_like_actual_result_patterns: string[];\n /**\n * Per-type default estimates (minutes) used by `pm validate --auto-fix\n * --fix-scope estimates` to backfill missing `estimated_minutes` (GH-212).\n * Keys are item type names (case-insensitive); values are positive minutes\n * that override the built-in defaults. Empty by default.\n */\n estimate_defaults_by_type: Record<string, number>;\n };\n governance: GovernanceSettings;\n workflow: {\n definition_of_done: string[];\n };\n testing: {\n record_results_to_items: boolean;\n };\n telemetry: {\n enabled: boolean;\n first_run_prompt_completed: boolean;\n capture_level: \"minimal\" | \"redacted\" | \"max\";\n endpoint: string;\n installation_id: string;\n retention_days: number;\n };\n agent_guidance: AgentGuidanceSettings;\n item_types: {\n definitions: ItemTypeDefinition[];\n };\n schema: RuntimeSchemaSettings;\n extensions: {\n enabled: string[];\n disabled: string[];\n policy: ExtensionPolicySettings;\n };\n search: {\n score_threshold: number;\n hybrid_semantic_weight: number;\n max_results: number;\n embedding_model: string;\n embedding_corpus_max_characters?: number;\n embedding_batch_size: number;\n embedding_timeout_ms: number;\n scanner_max_batch_retries: number;\n provider?: string;\n /**\n * Optional allow-list of corpus field names embedded for semantic search\n * (see DEFAULT_SEARCH_CORPUS_FIELDS in core/search/corpus.ts). When unset or\n * empty, the full default field set is used (backward compatible). When set,\n * only the named fields are embedded — letting teams opt structured signals\n * (priority, assignee, risk, acceptance_criteria, etc.) in/out for token\n * efficiency. Changing this re-flags items stale on the next refresh.\n */\n corpus_fields?: string[];\n mutation_refresh_policy: SearchMutationRefreshPolicy;\n query_expansion: SearchQueryExpansionSettings;\n rerank: SearchRerankSettings;\n /**\n * Offline BM25 lexical-ranking parameters (pm-75k9), applied when\n * `search.provider` is `bm25` (or auto-selected as the offline fallback) for\n * semantic/hybrid queries. `k1` controls term-frequency saturation, `b`\n * controls document-length normalization. Unset → Lucene defaults (1.2/0.75).\n */\n bm25?: {\n k1?: number;\n b?: number;\n };\n tuning?: {\n title_exact_bonus?: number;\n title_weight?: number;\n description_weight?: number;\n tags_weight?: number;\n status_weight?: number;\n body_weight?: number;\n comments_weight?: number;\n notes_weight?: number;\n learnings_weight?: number;\n dependencies_weight?: number;\n linked_content_weight?: number;\n };\n };\n providers: {\n openai: {\n base_url: string;\n api_key: string;\n model: string;\n };\n ollama: {\n base_url: string;\n model: string;\n };\n };\n context: ContextSettings;\n vector_store: {\n adapter?: string;\n collection_name: string;\n qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,OAAO;IACP,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,SAAS;IACT,MAAM;CACE,CAAC;AACX,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAUzD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO;IACP,MAAM;IACN,aAAa;IACb,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC;AAMX,MAAM,CAAC,MAAM,0BAA0B,GAAG;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BAAuB,GAAG;IACrC,SAAS;IACT,aAAa;IACb,WAAW;IACX,SAAS;IACT,SAAS;IACT,YAAY;CACJ,CAAC;AAMX,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAM1F,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,UAAU;IACV,YAAY;CACJ,CAAC;AA4VX,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAMnF,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,WAAW;IACX,UAAU;IACV,UAAU;IACV,kBAAkB;IAClB,YAAY;IACZ,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,OAAO;CACC,CAAC","debugId":"3123775a-c8ad-5339-abf2-f3893145f1e7"}
1
+ {"version":3,"file":"types.js","sources":["types.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module types\n *\n * Defines the shared project-management data model used by CLI, SDK, MCP, and packages.\n */\nexport const BUILTIN_ITEM_TYPE_VALUES = [\n \"Epic\",\n \"Feature\",\n \"Task\",\n \"Chore\",\n \"Issue\",\n \"Decision\",\n \"Event\",\n \"Reminder\",\n \"Milestone\",\n \"Meeting\",\n \"Plan\",\n] as const;\nexport const ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;\n/**\n * Restricts builtin item type values accepted by command, SDK, and storage contracts.\n */\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\n/**\n * Restricts item type values accepted by command, SDK, and storage contracts.\n */\nexport type ItemType = string;\n\nexport const STATUS_VALUES = [\n \"draft\",\n \"open\",\n \"in_progress\",\n \"blocked\",\n \"closed\",\n \"canceled\",\n] as const;\n/**\n * Restricts item status values accepted by command, SDK, and storage contracts.\n */\nexport type ItemStatus = string;\n\nexport const RUNTIME_STATUS_ROLE_VALUES = [\n \"draft\",\n \"active\",\n \"blocked\",\n \"terminal\",\n \"terminal_done\",\n \"terminal_canceled\",\n \"default_open\",\n \"default_close\",\n \"default_cancel\",\n] as const;\n/**\n * Restricts runtime status role values accepted by command, SDK, and storage contracts.\n */\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\n/**\n * Restricts runtime field type values accepted by command, SDK, and storage contracts.\n */\nexport type RuntimeFieldType = (typeof RUNTIME_FIELD_TYPE_VALUES)[number];\n\nexport const RUNTIME_FIELD_COMMAND_VALUES = [\"create\", \"update\", \"update_many\", \"list\", \"search\", \"calendar\", \"context\"] as const;\n/**\n * Restricts runtime field command values accepted by command, SDK, and storage contracts.\n */\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\n/**\n * Restricts runtime unknown field policy values accepted by command, SDK, and storage contracts.\n */\nexport type RuntimeUnknownFieldPolicy = (typeof RUNTIME_UNKNOWN_FIELD_POLICY_VALUES)[number];\n\nexport const DEPENDENCY_KIND_VALUES = [\n \"blocks\",\n \"parent\",\n \"child\",\n \"parent_child\",\n \"child_of\",\n \"related\",\n \"related_to\",\n \"discovered_from\",\n \"blocked_by\",\n \"incident_from\",\n \"epic\",\n \"supersedes\",\n \"task\",\n] as const;\n/**\n * Restricts dependency kind values accepted by command, SDK, and storage contracts.\n */\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\n/**\n * Restricts link scope values accepted by command, SDK, and storage contracts.\n */\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\n/**\n * Restricts risk level values accepted by command, SDK, and storage contracts.\n */\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\n/**\n * Restricts issue severity values accepted by command, SDK, and storage contracts.\n */\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\n/**\n * Restricts confidence text level values accepted by command, SDK, and storage contracts.\n */\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\n/**\n * Restricts confidence value values accepted by command, SDK, and storage contracts.\n */\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\n/**\n * Restricts item format values accepted by command, SDK, and storage contracts.\n */\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\n/**\n * Restricts sprint release format policy values accepted by command, SDK, and storage contracts.\n */\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\n/**\n * Restricts parent reference policy values accepted by command, SDK, and storage contracts.\n */\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\n/**\n * Restricts validate metadata profile values accepted by command, SDK, and storage contracts.\n */\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\n/**\n * Restricts governance preset values accepted by command, SDK, and storage contracts.\n */\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\n/**\n * Restricts governance ownership enforcement values accepted by command, SDK, and storage contracts.\n */\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\n/**\n * Restricts governance create mode default values accepted by command, SDK, and storage contracts.\n */\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\n/**\n * Restricts governance close validation default values accepted by command, SDK, and storage contracts.\n */\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\n/**\n * Restricts governance workflow enforcement values accepted by command, SDK, and storage contracts.\n */\nexport type GovernanceWorkflowEnforcement = (typeof GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES)[number];\nexport const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [\n \"author\",\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"close_reason\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n] as const;\n/**\n * Restricts validate metadata required field values accepted by command, SDK, and storage contracts.\n */\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\n/**\n * Restricts recurrence frequency values accepted by command, SDK, and storage contracts.\n */\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\n/**\n * Restricts recurrence weekday values accepted by command, SDK, and storage contracts.\n */\nexport type RecurrenceWeekday = (typeof RECURRENCE_WEEKDAY_VALUES)[number];\n\n/**\n * Canonical week-order index for a recurrence weekday (mon=0 .. sun=6).\n * Shared by item serialization, create/update parsing, and calendar expansion\n * so weekday ordering cannot drift between those modules.\n */\nexport function weekdayOrderIndex(value: RecurrenceWeekday): number {\n return RECURRENCE_WEEKDAY_VALUES.indexOf(value);\n}\n\n/**\n * Documents the dependency payload exchanged by command, SDK, and package integrations.\n */\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\n/**\n * Documents the comment payload exchanged by command, SDK, and package integrations.\n */\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\n/**\n * Documents the log note payload exchanged by command, SDK, and package integrations.\n */\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\n/**\n * Documents the linked file payload exchanged by command, SDK, and package integrations.\n */\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\n/**\n * Documents the linked test payload exchanged by command, SDK, and package integrations.\n */\nexport interface LinkedTest {\n command?: string;\n path?: string;\n scope: LinkScope;\n timeout_seconds?: number;\n pm_context_mode?: \"schema\" | \"tracker\" | \"auto\";\n env_set?: Record<string, string>;\n env_clear?: string[];\n shared_host_safe?: boolean;\n assert_stdout_contains?: string[];\n assert_stdout_regex?: string[];\n assert_stderr_contains?: string[];\n assert_stderr_regex?: string[];\n assert_stdout_min_lines?: number;\n assert_json_field_equals?: Record<string, string>;\n assert_json_field_gte?: Record<string, number>;\n note?: string;\n}\n\n/**\n * Documents the linked doc payload exchanged by command, SDK, and package integrations.\n */\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\n/**\n * Documents the reminder payload exchanged by command, SDK, and package integrations.\n */\nexport interface Reminder {\n at: string;\n text: string;\n}\n\n/**\n * Documents the recurrence rule payload exchanged by command, SDK, and package integrations.\n */\nexport interface RecurrenceRule {\n freq: RecurrenceFrequency;\n interval?: number;\n count?: number;\n until?: string;\n by_weekday?: RecurrenceWeekday[];\n by_month_day?: number[];\n exdates?: string[];\n}\n\n/**\n * Documents the calendar event payload exchanged by command, SDK, and package integrations.\n */\nexport interface CalendarEvent {\n start_at: string;\n end_at?: string;\n title?: string;\n description?: string;\n location?: string;\n all_day?: boolean;\n timezone?: string;\n recurrence?: RecurrenceRule;\n}\n\nexport const PLAN_MODE_VALUES = [\n \"draft\",\n \"research\",\n \"review\",\n \"approved\",\n \"executing\",\n \"paused\",\n \"completed\",\n \"superseded\",\n] as const;\n/**\n * Restricts plan mode values accepted by command, SDK, and storage contracts.\n */\nexport type PlanMode = (typeof PLAN_MODE_VALUES)[number];\n\nexport const PLAN_STEP_STATUS_VALUES = [\n \"pending\",\n \"in_progress\",\n \"completed\",\n \"blocked\",\n \"skipped\",\n \"superseded\",\n] as const;\n/**\n * Restricts plan step status values accepted by command, SDK, and storage contracts.\n */\nexport type PlanStepStatus = (typeof PLAN_STEP_STATUS_VALUES)[number];\n\nexport const PLAN_HARNESS_VALUES = [\"codex\", \"claude-code\", \"cursor\", \"generic\"] as const;\n/**\n * Restricts plan harness values accepted by command, SDK, and storage contracts.\n */\nexport type PlanHarness = (typeof PLAN_HARNESS_VALUES)[number];\n\nexport const PLAN_STEP_LINK_KIND_VALUES = [\n \"related\",\n \"blocks\",\n \"blocked_by\",\n \"depends_on\",\n \"discovered_from\",\n \"implements\",\n \"verifies\",\n \"supersedes\",\n] as const;\n/**\n * Restricts plan step link kind values accepted by command, SDK, and storage contracts.\n */\nexport type PlanStepLinkKind = (typeof PLAN_STEP_LINK_KIND_VALUES)[number];\n\n/**\n * Documents the plan step link payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanStepLink {\n id: string;\n kind: PlanStepLinkKind;\n note?: string;\n required_before_step?: boolean;\n}\n\n/**\n * Documents the plan step file payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanStepFile {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\n\n/**\n * Documents the plan step test payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanStepTest {\n command?: string;\n path?: string;\n note?: string;\n}\n\n/**\n * Documents the plan step doc payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanStepDoc {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\n\n/**\n * Documents the plan step payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanStep {\n id: string;\n order: number;\n title: string;\n body?: string;\n status: PlanStepStatus;\n owner?: string;\n evidence?: string;\n blocked_reason?: string;\n superseded_by?: string;\n linked_items?: PlanStepLink[];\n files?: PlanStepFile[];\n tests?: PlanStepTest[];\n docs?: PlanStepDoc[];\n created_at: string;\n updated_at: string;\n completed_at?: string;\n}\n\n/**\n * Documents the plan decision payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanDecision {\n ts: string;\n author: string;\n decision: string;\n rationale?: string;\n evidence?: string;\n step_id?: string;\n}\n\n/**\n * Documents the plan discovery payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanDiscovery {\n ts: string;\n author: string;\n text: string;\n step_id?: string;\n}\n\n/**\n * Documents the plan validation check payload exchanged by command, SDK, and package integrations.\n */\nexport interface PlanValidationCheck {\n text: string;\n command?: string;\n expected?: string;\n}\n\n/**\n * Documents the item type option definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\n/**\n * Documents the item type command option policy payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\n\n/**\n * Documents the item type definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemTypeDefinition {\n name: string;\n description?: string;\n /**\n * Status assigned to newly created items of this type when `--status` is not\n * provided. Falls back to the workflow's open status when unset or invalid.\n */\n default_status?: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n options?: ItemTypeOptionDefinition[];\n command_option_policies?: ItemTypeCommandOptionPolicy[];\n}\n\n/**\n * Documents the runtime status definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\n\n/**\n * Documents the runtime field definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface RuntimeFieldDefinition {\n key: string;\n metadata_key?: string;\n /**\n * @deprecated Use metadata_key.\n */\n front_matter_key?: string;\n cli_flag?: string;\n cli_aliases?: string[];\n description?: string;\n type?: RuntimeFieldType;\n commands?: RuntimeFieldCommand[];\n repeatable?: boolean;\n required?: boolean;\n required_on_create?: boolean;\n required_types?: string[];\n allow_unset?: boolean;\n}\n\n/**\n * Documents the runtime workflow definition payload exchanged by command, SDK, and package integrations.\n */\nexport interface RuntimeWorkflowDefinition {\n draft_status?: string;\n open_status?: string;\n in_progress_status?: string;\n blocked_status?: string;\n close_status?: string;\n canceled_status?: string;\n}\n\n/**\n * Documents the runtime schema file config payload exchanged by command, SDK, and package integrations.\n */\nexport interface RuntimeSchemaFileConfig {\n types?: string;\n statuses?: string;\n fields?: string;\n workflows?: string;\n}\n\n/**\n * Per-type allowed-transition rule. A type with no matching entry is\n * unrestricted; a type with an entry allows only the listed [from, to]\n * status pairs (status tokens are resolved case-insensitively through the\n * status registry alias map; a same-status no-op is always allowed).\n */\nexport interface TypeWorkflowDefinition {\n type: string;\n allowed_transitions: [string, string][];\n}\n\n/**\n * Documents the runtime schema settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface RuntimeSchemaSettings {\n version: number;\n files: RuntimeSchemaFileConfig;\n statuses: RuntimeStatusDefinition[];\n fields: RuntimeFieldDefinition[];\n workflow: RuntimeWorkflowDefinition;\n type_workflows?: TypeWorkflowDefinition[];\n unknown_field_policy: RuntimeUnknownFieldPolicy;\n}\n\n/**\n * Documents the item test run summary payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemTestRunSummary {\n run_id: string;\n kind: \"test\" | \"test-all\";\n status: \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n started_at: string;\n finished_at: string;\n recorded_at: string;\n attempt?: number;\n resumed_from?: string;\n passed: number;\n failed: number;\n skipped: number;\n items?: number;\n linked_tests?: number;\n fail_on_skipped_triggered?: boolean;\n}\n\n/**\n * Documents the item metadata payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemMetadata {\n id: string;\n title: string;\n description: string;\n type: ItemType;\n /**\n * On-disk front-matter format version. Absent means the implicit baseline\n * (version 1) and is never serialized; populated only once an item advances\n * past the baseline via a future storage migration. See\n * core/item/item-format-version.\n */\n pm_format_version?: number;\n source_type?: string;\n type_options?: Record<string, string>;\n status: ItemStatus;\n priority: 0 | 1 | 2 | 3 | 4;\n tags: string[];\n created_at: string;\n updated_at: string;\n deadline?: string;\n reminders?: Reminder[];\n events?: CalendarEvent[];\n closed_at?: string;\n assignee?: string;\n source_owner?: string;\n author?: string;\n estimated_minutes?: number;\n acceptance_criteria?: string;\n design?: string;\n external_ref?: string;\n definition_of_ready?: string;\n order?: number;\n goal?: string;\n objective?: string;\n value?: string;\n impact?: string;\n outcome?: string;\n why_now?: string;\n parent?: string;\n reviewer?: string;\n risk?: RiskLevel;\n confidence?: ConfidenceValue;\n sprint?: string;\n release?: string;\n blocked_by?: string;\n blocked_reason?: string;\n unblock_note?: string;\n reporter?: string;\n severity?: IssueSeverity;\n environment?: string;\n repro_steps?: string;\n resolution?: string;\n expected_result?: string;\n actual_result?: string;\n affected_version?: string;\n fixed_version?: string;\n component?: string;\n regression?: boolean;\n customer_impact?: string;\n dependencies?: Dependency[];\n comments?: Comment[];\n notes?: LogNote[];\n learnings?: LogNote[];\n files?: LinkedFile[];\n tests?: LinkedTest[];\n test_runs?: ItemTestRunSummary[];\n docs?: LinkedDoc[];\n close_reason?: string;\n duplicate_of?: string;\n plan_mode?: PlanMode;\n plan_scope?: string;\n plan_harness?: PlanHarness;\n plan_steps?: PlanStep[];\n plan_decisions?: PlanDecision[];\n plan_discoveries?: PlanDiscovery[];\n plan_validation?: PlanValidationCheck[];\n plan_resume_context?: string;\n [key: string]: unknown;\n}\n\n/**\n * @deprecated Use ItemMetadata.\n */\nexport type ItemFrontMatter = ItemMetadata;\n\n/**\n * Documents the item document payload exchanged by command, SDK, and package integrations.\n */\nexport interface ItemDocument {\n metadata: ItemMetadata;\n body: string;\n}\n\n/**\n * Documents the history patch op payload exchanged by command, SDK, and package integrations.\n */\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\n\n/**\n * Documents the history entry payload exchanged by command, SDK, and package integrations.\n */\nexport interface HistoryEntry {\n ts: string;\n author: string;\n op: string;\n patch: HistoryPatchOp[];\n before_hash: string;\n after_hash: string;\n message?: string;\n}\n\nexport const CONTEXT_DEPTH_VALUES = [\"brief\", \"standard\", \"deep\", \"full\"] as const;\n/**\n * Restricts context depth values accepted by command, SDK, and storage contracts.\n */\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"recently_created\",\n \"unparented\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\n/**\n * Restricts context section name values accepted by command, SDK, and storage contracts.\n */\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\n/**\n * Documents the context section settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n recently_created: boolean;\n unparented: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\n/**\n * Documents the context settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\n/**\n * Documents the governance settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\n require_close_reason: boolean;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n force_required_for_stale_lock: boolean;\n create_default_type?: string;\n /**\n * Per-type allowed-transition enforcement mode for `pm update --status`.\n * Read raw from settings (not preset-derived) so existing projects are\n * unaffected when unset; defaults to \"off\".\n */\n workflow_enforcement?: GovernanceWorkflowEnforcement;\n}\n\n/**\n * Restricts extension policy mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicyMode = \"off\" | \"warn\" | \"enforce\";\n/**\n * Restricts extension trust mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionTrustMode = \"off\" | \"warn\" | \"enforce\";\n/**\n * Restricts extension sandbox profile values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionSandboxProfile = \"none\" | \"restricted\" | \"strict\";\n\n/**\n * Documents the extension policy override settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionPolicyOverrideSettings {\n name: string;\n disabled?: boolean;\n require_trusted?: boolean;\n require_provenance?: boolean;\n sandbox_profile?: ExtensionSandboxProfile;\n allowed_capabilities?: string[];\n blocked_capabilities?: string[];\n allowed_surfaces?: string[];\n blocked_surfaces?: string[];\n allowed_commands?: string[];\n blocked_commands?: string[];\n allowed_actions?: string[];\n blocked_actions?: string[];\n allowed_services?: string[];\n blocked_services?: string[];\n}\n\n/**\n * Documents the extension policy settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionPolicySettings {\n mode: ExtensionPolicyMode;\n trust_mode: ExtensionTrustMode;\n require_provenance: boolean;\n trusted_extensions: string[];\n default_sandbox_profile: ExtensionSandboxProfile;\n allowed_extensions: string[];\n blocked_extensions: string[];\n allowed_capabilities: string[];\n blocked_capabilities: string[];\n allowed_surfaces: string[];\n blocked_surfaces: string[];\n allowed_commands: string[];\n blocked_commands: string[];\n allowed_actions: string[];\n blocked_actions: string[];\n allowed_services: string[];\n blocked_services: string[];\n extension_overrides: ExtensionPolicyOverrideSettings[];\n}\n\n/**\n * Documents the agent guidance settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface AgentGuidanceSettings {\n prompt_completed: boolean;\n declined: boolean;\n declined_at: string;\n template_version: number;\n last_checked_files: string[];\n}\n\n/**\n * Restricts search mutation refresh policy values accepted by command, SDK, and storage contracts.\n */\nexport type SearchMutationRefreshPolicy = \"cache_only\" | \"semantic_configured\" | \"semantic_auto\";\n\n/**\n * Documents the search query expansion settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchQueryExpansionSettings {\n enabled: boolean;\n provider: string;\n}\n\n/**\n * Documents the search rerank settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface SearchRerankSettings {\n enabled: boolean;\n model: string;\n top_k: number;\n}\n\n/**\n * Config-driven policy for automatic history-stream compaction triage.\n *\n * When `enabled`, `pm health` surfaces an advisory warning for any history\n * stream whose non-empty entry count exceeds `max_entries`, and `pm\n * history-compact` bulk mode uses `max_entries` as its default `--all-over`\n * threshold so the configured policy drives corpus-wide sweeps. `trigger`\n * records operator intent — both values raise the health advisory; `auto`\n * additionally signals that scheduled/automatic sweeps are expected.\n */\nexport interface HistoryCompactPolicy {\n enabled: boolean;\n max_entries: number;\n trigger: \"health_warn\" | \"auto\";\n}\n\n/**\n * Documents the pm settings payload exchanged by command, SDK, and package integrations.\n */\nexport interface PmSettings {\n version: number;\n id_prefix: string;\n author_default: string;\n item_format: ItemFormat;\n locks: {\n ttl_seconds: number;\n };\n /**\n * Retention policy for bulk-mutation rollback checkpoints written by\n * `update-many`/`close-many`. `pm gc --scope checkpoints` prunes checkpoint\n * files older than `retention_days`; checkpoints with an unparseable\n * `created_at` are retained (safety-first, mirroring the stale-lock sweep).\n */\n checkpoints: {\n retention_days: number;\n };\n output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\n compact_policy: HistoryCompactPolicy;\n };\n validation: {\n sprint_release_format: SprintReleaseFormatPolicy;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n metadata_required_fields: ValidateMetadataRequiredField[];\n lifecycle_stale_blocker_reason_patterns: string[];\n lifecycle_closure_like_blocked_reason_patterns: string[];\n lifecycle_closure_like_resolution_patterns: string[];\n lifecycle_closure_like_actual_result_patterns: string[];\n /**\n * Per-type default estimates (minutes) used by `pm validate --auto-fix\n * --fix-scope estimates` to backfill missing `estimated_minutes` (GH-212).\n * Keys are item type names (case-insensitive); values are positive minutes\n * that override the built-in defaults. Empty by default.\n */\n estimate_defaults_by_type: Record<string, number>;\n };\n governance: GovernanceSettings;\n workflow: {\n definition_of_done: string[];\n };\n testing: {\n record_results_to_items: boolean;\n };\n telemetry: {\n enabled: boolean;\n first_run_prompt_completed: boolean;\n capture_level: \"minimal\" | \"redacted\" | \"max\";\n endpoint: string;\n installation_id: string;\n retention_days: number;\n };\n agent_guidance: AgentGuidanceSettings;\n item_types: {\n definitions: ItemTypeDefinition[];\n };\n schema: RuntimeSchemaSettings;\n extensions: {\n enabled: string[];\n disabled: string[];\n policy: ExtensionPolicySettings;\n };\n search: {\n score_threshold: number;\n hybrid_semantic_weight: number;\n max_results: number;\n embedding_model: string;\n embedding_corpus_max_characters?: number;\n embedding_batch_size: number;\n embedding_timeout_ms: number;\n scanner_max_batch_retries: number;\n provider?: string;\n /**\n * Optional allow-list of corpus field names embedded for semantic search\n * (see DEFAULT_SEARCH_CORPUS_FIELDS in core/search/corpus.ts). When unset or\n * empty, the full default field set is used (backward compatible). When set,\n * only the named fields are embedded — letting teams opt structured signals\n * (priority, assignee, risk, acceptance_criteria, etc.) in/out for token\n * efficiency. Changing this re-flags items stale on the next refresh.\n */\n corpus_fields?: string[];\n mutation_refresh_policy: SearchMutationRefreshPolicy;\n query_expansion: SearchQueryExpansionSettings;\n rerank: SearchRerankSettings;\n /**\n * Offline BM25 lexical-ranking parameters (pm-75k9), applied when\n * `search.provider` is `bm25` (or auto-selected as the offline fallback) for\n * semantic/hybrid queries. `k1` controls term-frequency saturation, `b`\n * controls document-length normalization. Unset → Lucene defaults (1.2/0.75).\n */\n bm25?: {\n k1?: number;\n b?: number;\n };\n tuning?: {\n title_exact_bonus?: number;\n title_weight?: number;\n description_weight?: number;\n tags_weight?: number;\n status_weight?: number;\n body_weight?: number;\n comments_weight?: number;\n notes_weight?: number;\n learnings_weight?: number;\n dependencies_weight?: number;\n linked_content_weight?: number;\n };\n };\n providers: {\n openai: {\n base_url: string;\n api_key: string;\n model: string;\n };\n ollama: {\n base_url: string;\n model: string;\n };\n };\n context: ContextSettings;\n vector_store: {\n adapter?: string;\n collection_name: string;\n qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,OAAO;IACP,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,SAAS;IACT,MAAM;CACE,CAAC;AACX,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAUzD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO;IACP,MAAM;IACN,aAAa;IACb,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC;AAMX,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,eAAe;IACf,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,SAAS;IACT,YAAY;CACJ,CAAC;AAMX,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAM1F,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,UAAU;IACV,YAAY;CACJ,CAAC;AAmWX,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAMnF,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,WAAW;IACX,UAAU;IACV,UAAU;IACV,kBAAkB;IAClB,YAAY;IACZ,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,OAAO;CACC,CAAC","debugId":"46812059-b93e-5599-a222-4ac0de6f4911"}
@@ -143,6 +143,8 @@ body: |
143
143
 
144
144
  Legacy JSON-front-matter markdown files are read only for one-way migration into TOON. Runtime internals use `metadata` as the item metadata model key.
145
145
 
146
+ Front-matter carries an explicit, monotonically increasing storage format version (`pm_format_version`). The baseline version (`1`) is the implicit default and is **never** serialized, so the field stays absent for the entire current corpus and adds no per-item token cost; it only materializes once an item advances past the baseline via a future breaking migration. Absence therefore always means the baseline. `core/item/item-format-version.ts` owns the constant and the classification helpers (`effectiveItemFormatVersion`, `classifyItemFormatVersion`, `scanItemFormatVersions`) that `pm health` (the `integrity` check) and `pm validate` (the `format_version` check) use to flag items that are outdated (a future migration would rewrite them) or ahead of the runtime (written by a newer pm). When a breaking front-matter change ships, bump `CURRENT_ITEM_FORMAT_VERSION` and add a migration that rewrites items below it — the version gate makes that a per-item decision instead of a full-corpus structural re-parse.
147
+
146
148
  Built-in item types (11; confirm at runtime with `pm schema list`):
147
149
 
148
150
  - `Epic`