@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
@@ -4,7 +4,7 @@
4
4
  * Implements extension runtime contracts and governance for Index.
5
5
  */
6
6
 
7
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c8e3bac0-fd3d-5586-9c22-994b64c9efb3")}catch(e){}}();
7
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="abe62b94-a55a-5cdf-8f1a-34360ddc4c25")}catch(e){}}();
8
8
  import { runCommandHandler, runCommandOverride, runOnIndexHooks, runParserOverride, runPreflightOverride, runOnReadHooks, runRendererOverride, runServiceOverride, runServiceOverrideSync, runOnWriteHooks, } from "./loader.js";
9
9
  let activeExtensionHooks = null;
10
10
  let activeExtensionCommands = null;
@@ -330,5 +330,6 @@ export function runActiveServiceOverrideSync(service, payload) {
330
330
  return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));
331
331
  }
332
332
  export * from "./loader.js";
333
+ export { EXTENSION_CAPABILITY_REGISTRATION_SURFACES, collectUsedExtensionCapabilities, reconcileExtensionCapabilityUsage, } from "./capability-usage.js";
333
334
  //# sourceMappingURL=index.js.map
334
- //# debugId=c8e3bac0-fd3d-5586-9c22-994b64c9efb3
335
+ //# debugId=abe62b94-a55a-5cdf-8f1a-34360ddc4c25
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["core/extensions/index.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/index\n *\n * Implements extension runtime contracts and governance for Index.\n */\nimport {\n runCommandHandler,\n runCommandOverride,\n runOnIndexHooks,\n runParserOverride,\n runPreflightOverride,\n runOnReadHooks,\n runRendererOverride,\n runServiceOverride,\n runServiceOverrideSync,\n runOnWriteHooks,\n type CommandHandlerContext,\n type CommandHandlerResult,\n type CommandOverrideContext,\n type CommandOverrideResult,\n type ExtensionCommandRegistry,\n type ExtensionHookRegistry,\n type ExtensionParserRegistry,\n type ExtensionPreflightRegistry,\n type ExtensionRegistrationRegistry,\n type ExtensionRendererRegistry,\n type ExtensionServiceName,\n type ExtensionServiceRegistry,\n type AfterCommandAffectedItem,\n type OnIndexHookContext,\n type OnReadHookContext,\n type OnWriteHookContext,\n type OutputRendererFormat,\n type ParserOverrideContext,\n type ParserOverrideResult,\n type PreflightOverrideContext,\n type PreflightOverrideResult,\n type RendererOverrideResult,\n type ServiceOverrideResult,\n} from \"./loader.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\nlet activeExtensionHooks: ExtensionHookRegistry | null = null;\nlet activeExtensionCommands: ExtensionCommandRegistry | null = null;\nlet activeExtensionParsers: ExtensionParserRegistry | null = null;\nlet activeExtensionPreflight: ExtensionPreflightRegistry | null = null;\nlet activeExtensionServices: ExtensionServiceRegistry | null = null;\nlet activeExtensionRenderers: ExtensionRendererRegistry | null = null;\nlet activeExtensionRegistrations: ExtensionRegistrationRegistry | null = null;\nlet activeCommandContext: Omit<CommandOverrideContext, \"result\"> | null = null;\nlet activeCommandResult: unknown = undefined;\nlet activeAfterCommandAffectedItems: AfterCommandAffectedItem[] = [];\nconst AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS = new Set([\n \"body\",\n \"comments\",\n \"dependencies\",\n \"docs\",\n \"events\",\n \"files\",\n \"learnings\",\n \"notes\",\n \"reminders\",\n \"test_runs\",\n \"tests\",\n]);\n\n/**\n * Implements set active extension hooks for the public runtime surface of this module.\n */\nexport function setActiveExtensionHooks(hooks: ExtensionHookRegistry | null): void {\n activeExtensionHooks = hooks;\n}\n\n/**\n * Implements set active extension commands for the public runtime surface of this module.\n */\nexport function setActiveExtensionCommands(commands: ExtensionCommandRegistry | null): void {\n activeExtensionCommands = commands;\n}\n\n/**\n * Implements set active extension parsers for the public runtime surface of this module.\n */\nexport function setActiveExtensionParsers(parsers: ExtensionParserRegistry | null): void {\n activeExtensionParsers = parsers;\n}\n\n/**\n * Implements set active extension preflight for the public runtime surface of this module.\n */\nexport function setActiveExtensionPreflight(preflight: ExtensionPreflightRegistry | null): void {\n activeExtensionPreflight = preflight;\n}\n\n/**\n * Implements set active extension services for the public runtime surface of this module.\n */\nexport function setActiveExtensionServices(services: ExtensionServiceRegistry | null): void {\n activeExtensionServices = services;\n}\n\n/**\n * Implements set active extension renderers for the public runtime surface of this module.\n */\nexport function setActiveExtensionRenderers(renderers: ExtensionRendererRegistry | null): void {\n activeExtensionRenderers = renderers;\n}\n\n/**\n * Implements set active extension registrations for the public runtime surface of this module.\n */\nexport function setActiveExtensionRegistrations(registrations: ExtensionRegistrationRegistry | null): void {\n activeExtensionRegistrations = registrations;\n}\n\n/**\n * Implements get active extension registrations for the public runtime surface of this module.\n */\nexport function getActiveExtensionRegistrations(): ExtensionRegistrationRegistry | null {\n return activeExtensionRegistrations;\n}\n\n/**\n * Implements set active command context for the public runtime surface of this module.\n */\nexport function setActiveCommandContext(context: Omit<CommandOverrideContext, \"result\"> | null): void {\n activeCommandContext = context;\n}\n\n/**\n * Implements set active command result for the public runtime surface of this module.\n */\nexport function setActiveCommandResult(result: unknown): void {\n activeCommandResult = result;\n}\n\n/**\n * Implements get active command result for the public runtime surface of this module.\n */\nexport function getActiveCommandResult(): unknown {\n return activeCommandResult;\n}\n\n/**\n * Implements record after command affected item for the public runtime surface of this module.\n */\nexport function recordAfterCommandAffectedItem(item: AfterCommandAffectedItem): void {\n if (!item || (activeExtensionHooks?.afterCommand?.length ?? 0) === 0) {\n return;\n }\n activeAfterCommandAffectedItems.push(item);\n}\n\n/**\n * Implements project after command item snapshot for the public runtime surface of this module.\n */\nexport function projectAfterCommandItemSnapshot(\n metadata: ItemFrontMatter,\n changedFields: readonly string[],\n): Partial<ItemFrontMatter> {\n if (!metadata || !metadata.id) {\n return {};\n }\n const snapshot: Record<string, unknown> = {\n id: metadata.id,\n type: metadata.type,\n status: metadata.status,\n };\n if (!Array.isArray(changedFields)) {\n return snapshot as Partial<ItemFrontMatter>;\n }\n const source = metadata as unknown as Record<string, unknown>;\n for (const field of changedFields) {\n if (typeof field !== \"string\") {\n continue;\n }\n const actualField = field.startsWith(\"unset:\") ? field.slice(\"unset:\".length) : field;\n if (\n actualField === \"id\" ||\n actualField === \"type\" ||\n actualField === \"status\" ||\n AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS.has(actualField)\n ) {\n continue;\n }\n if (Object.hasOwn(source, actualField) && source[actualField] !== undefined) {\n snapshot[actualField] = source[actualField];\n }\n }\n return snapshot as Partial<ItemFrontMatter>;\n}\n\n/**\n * Implements consume after command affected items for the public runtime surface of this module.\n */\nexport function consumeAfterCommandAffectedItems(): AfterCommandAffectedItem[] | undefined {\n if (activeAfterCommandAffectedItems.length === 0) {\n return undefined;\n }\n const affected = activeAfterCommandAffectedItems;\n activeAfterCommandAffectedItems = [];\n return affected;\n}\n\n/**\n * Implements clear active extension hooks for the public runtime surface of this module.\n */\nexport function clearActiveExtensionHooks(): void {\n activeExtensionHooks = null;\n activeExtensionCommands = null;\n activeExtensionParsers = null;\n activeExtensionPreflight = null;\n activeExtensionServices = null;\n activeExtensionRenderers = null;\n activeExtensionRegistrations = null;\n activeCommandContext = null;\n activeCommandResult = undefined;\n activeAfterCommandAffectedItems = [];\n}\n\n/**\n * Implements run active on write hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnWriteHooks(context: OnWriteHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnWriteHooks(activeExtensionHooks, context);\n}\n\n/**\n * Implements run active on read hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnReadHooks(context: OnReadHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnReadHooks(activeExtensionHooks, context);\n}\n\n/**\n * Synchronous fast-path predicate: true only when at least one onRead hook is\n * registered. Bulk readers (e.g. the metadata cache scanning hundreds of files)\n * use this to skip per-file `await runActiveOnReadHooks(...)` calls entirely when\n * no extension observes reads, avoiding hundreds of needless microtasks.\n */\nexport function hasActiveOnReadHooks(): boolean {\n return (activeExtensionHooks?.onRead?.length ?? 0) > 0;\n}\n\n/**\n * Implements run active on index hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnIndexHooks(context: OnIndexHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnIndexHooks(activeExtensionHooks, context);\n}\n\n/**\n * Implements run active command override for the public runtime surface of this module.\n */\nexport function runActiveCommandOverride(result: unknown): CommandOverrideResult {\n if (!activeExtensionCommands || !activeCommandContext) {\n return {\n overridden: false,\n result,\n warnings: [],\n };\n }\n return runCommandOverride(activeExtensionCommands, {\n command: activeCommandContext.command,\n args: [...activeCommandContext.args],\n options: activeCommandContext.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext.pm_root,\n result,\n });\n}\n\n/**\n * Implements run active command handler for the public runtime surface of this module.\n */\nexport async function runActiveCommandHandler(context: CommandHandlerContext): Promise<CommandHandlerResult> {\n if (!activeExtensionCommands) {\n return {\n handled: false,\n result: null,\n warnings: [],\n };\n }\n return runCommandHandler(activeExtensionCommands, context);\n}\n\n/**\n * Implements run active parser override for the public runtime surface of this module.\n */\nexport async function runActiveParserOverride(context: ParserOverrideContext): Promise<ParserOverrideResult> {\n if (!activeExtensionParsers) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n warnings: [],\n };\n }\n return runParserOverride(activeExtensionParsers, context);\n}\n\n/**\n * Implements run active preflight override for the public runtime surface of this module.\n */\nexport async function runActivePreflightOverride(context: PreflightOverrideContext): Promise<PreflightOverrideResult> {\n if (!activeExtensionPreflight) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n decision: { ...context.decision },\n warnings: [],\n };\n }\n return runPreflightOverride(activeExtensionPreflight, context);\n}\n\n/**\n * Implements run active renderer override for the public runtime surface of this module.\n */\nexport function runActiveRendererOverride(format: OutputRendererFormat, result: unknown): RendererOverrideResult {\n if (!activeExtensionRenderers) {\n return {\n overridden: false,\n rendered: null,\n warnings: [],\n };\n }\n return runRendererOverride(activeExtensionRenderers, {\n format,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext?.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext?.pm_root,\n result,\n });\n}\n\nfunction buildServiceContext(service: ExtensionServiceName, payload: unknown) {\n return {\n service,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext?.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext?.pm_root,\n payload,\n };\n}\n\n/**\n * Implements run active service override for the public runtime surface of this module.\n */\nexport async function runActiveServiceOverride(\n service: ExtensionServiceName,\n payload: unknown,\n): Promise<ServiceOverrideResult> {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverride(activeExtensionServices, buildServiceContext(service, payload));\n}\n\n/**\n * Implements run active service override sync for the public runtime surface of this module.\n */\nexport function runActiveServiceOverrideSync(service: ExtensionServiceName, payload: unknown): ServiceOverrideResult {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));\n}\n\nexport * from \"./loader.js\";\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe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,CAAC,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;QAChE,OAAO,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,oBAAoB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE;QACjF,MAAM,EAAE,oBAAoB,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS;QACrF,OAAO,EAAE,oBAAoB,EAAE,OAAO;QACtC,OAAO;KACR,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,OAA6B,EAC7B,OAAgB;IAEhB,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC7B,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;IACD,OAAO,kBAAkB,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAA6B,EAAE,OAAgB;IAC1F,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC7B,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;IACD,OAAO,sBAAsB,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAChG,CAAC;AAED,cAAc,aAAa,CAAC","debugId":"c8e3bac0-fd3d-5586-9c22-994b64c9efb3"}
1
+ {"version":3,"file":"index.js","sources":["core/extensions/index.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/index\n *\n * Implements extension runtime contracts and governance for Index.\n */\nimport {\n runCommandHandler,\n runCommandOverride,\n runOnIndexHooks,\n runParserOverride,\n runPreflightOverride,\n runOnReadHooks,\n runRendererOverride,\n runServiceOverride,\n runServiceOverrideSync,\n runOnWriteHooks,\n type CommandHandlerContext,\n type CommandHandlerResult,\n type CommandOverrideContext,\n type CommandOverrideResult,\n type ExtensionCommandRegistry,\n type ExtensionHookRegistry,\n type ExtensionParserRegistry,\n type ExtensionPreflightRegistry,\n type ExtensionRegistrationRegistry,\n type ExtensionRendererRegistry,\n type ExtensionServiceName,\n type ExtensionServiceRegistry,\n type AfterCommandAffectedItem,\n type OnIndexHookContext,\n type OnReadHookContext,\n type OnWriteHookContext,\n type OutputRendererFormat,\n type ParserOverrideContext,\n type ParserOverrideResult,\n type PreflightOverrideContext,\n type PreflightOverrideResult,\n type RendererOverrideResult,\n type ServiceOverrideResult,\n} from \"./loader.js\";\nimport type { ItemFrontMatter } from \"../../types/index.js\";\n\nlet activeExtensionHooks: ExtensionHookRegistry | null = null;\nlet activeExtensionCommands: ExtensionCommandRegistry | null = null;\nlet activeExtensionParsers: ExtensionParserRegistry | null = null;\nlet activeExtensionPreflight: ExtensionPreflightRegistry | null = null;\nlet activeExtensionServices: ExtensionServiceRegistry | null = null;\nlet activeExtensionRenderers: ExtensionRendererRegistry | null = null;\nlet activeExtensionRegistrations: ExtensionRegistrationRegistry | null = null;\nlet activeCommandContext: Omit<CommandOverrideContext, \"result\"> | null = null;\nlet activeCommandResult: unknown = undefined;\nlet activeAfterCommandAffectedItems: AfterCommandAffectedItem[] = [];\nconst AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS = new Set([\n \"body\",\n \"comments\",\n \"dependencies\",\n \"docs\",\n \"events\",\n \"files\",\n \"learnings\",\n \"notes\",\n \"reminders\",\n \"test_runs\",\n \"tests\",\n]);\n\n/**\n * Implements set active extension hooks for the public runtime surface of this module.\n */\nexport function setActiveExtensionHooks(hooks: ExtensionHookRegistry | null): void {\n activeExtensionHooks = hooks;\n}\n\n/**\n * Implements set active extension commands for the public runtime surface of this module.\n */\nexport function setActiveExtensionCommands(commands: ExtensionCommandRegistry | null): void {\n activeExtensionCommands = commands;\n}\n\n/**\n * Implements set active extension parsers for the public runtime surface of this module.\n */\nexport function setActiveExtensionParsers(parsers: ExtensionParserRegistry | null): void {\n activeExtensionParsers = parsers;\n}\n\n/**\n * Implements set active extension preflight for the public runtime surface of this module.\n */\nexport function setActiveExtensionPreflight(preflight: ExtensionPreflightRegistry | null): void {\n activeExtensionPreflight = preflight;\n}\n\n/**\n * Implements set active extension services for the public runtime surface of this module.\n */\nexport function setActiveExtensionServices(services: ExtensionServiceRegistry | null): void {\n activeExtensionServices = services;\n}\n\n/**\n * Implements set active extension renderers for the public runtime surface of this module.\n */\nexport function setActiveExtensionRenderers(renderers: ExtensionRendererRegistry | null): void {\n activeExtensionRenderers = renderers;\n}\n\n/**\n * Implements set active extension registrations for the public runtime surface of this module.\n */\nexport function setActiveExtensionRegistrations(registrations: ExtensionRegistrationRegistry | null): void {\n activeExtensionRegistrations = registrations;\n}\n\n/**\n * Implements get active extension registrations for the public runtime surface of this module.\n */\nexport function getActiveExtensionRegistrations(): ExtensionRegistrationRegistry | null {\n return activeExtensionRegistrations;\n}\n\n/**\n * Implements set active command context for the public runtime surface of this module.\n */\nexport function setActiveCommandContext(context: Omit<CommandOverrideContext, \"result\"> | null): void {\n activeCommandContext = context;\n}\n\n/**\n * Implements set active command result for the public runtime surface of this module.\n */\nexport function setActiveCommandResult(result: unknown): void {\n activeCommandResult = result;\n}\n\n/**\n * Implements get active command result for the public runtime surface of this module.\n */\nexport function getActiveCommandResult(): unknown {\n return activeCommandResult;\n}\n\n/**\n * Implements record after command affected item for the public runtime surface of this module.\n */\nexport function recordAfterCommandAffectedItem(item: AfterCommandAffectedItem): void {\n if (!item || (activeExtensionHooks?.afterCommand?.length ?? 0) === 0) {\n return;\n }\n activeAfterCommandAffectedItems.push(item);\n}\n\n/**\n * Implements project after command item snapshot for the public runtime surface of this module.\n */\nexport function projectAfterCommandItemSnapshot(\n metadata: ItemFrontMatter,\n changedFields: readonly string[],\n): Partial<ItemFrontMatter> {\n if (!metadata || !metadata.id) {\n return {};\n }\n const snapshot: Record<string, unknown> = {\n id: metadata.id,\n type: metadata.type,\n status: metadata.status,\n };\n if (!Array.isArray(changedFields)) {\n return snapshot as Partial<ItemFrontMatter>;\n }\n const source = metadata as unknown as Record<string, unknown>;\n for (const field of changedFields) {\n if (typeof field !== \"string\") {\n continue;\n }\n const actualField = field.startsWith(\"unset:\") ? field.slice(\"unset:\".length) : field;\n if (\n actualField === \"id\" ||\n actualField === \"type\" ||\n actualField === \"status\" ||\n AFTER_COMMAND_SNAPSHOT_OMITTED_FIELDS.has(actualField)\n ) {\n continue;\n }\n if (Object.hasOwn(source, actualField) && source[actualField] !== undefined) {\n snapshot[actualField] = source[actualField];\n }\n }\n return snapshot as Partial<ItemFrontMatter>;\n}\n\n/**\n * Implements consume after command affected items for the public runtime surface of this module.\n */\nexport function consumeAfterCommandAffectedItems(): AfterCommandAffectedItem[] | undefined {\n if (activeAfterCommandAffectedItems.length === 0) {\n return undefined;\n }\n const affected = activeAfterCommandAffectedItems;\n activeAfterCommandAffectedItems = [];\n return affected;\n}\n\n/**\n * Implements clear active extension hooks for the public runtime surface of this module.\n */\nexport function clearActiveExtensionHooks(): void {\n activeExtensionHooks = null;\n activeExtensionCommands = null;\n activeExtensionParsers = null;\n activeExtensionPreflight = null;\n activeExtensionServices = null;\n activeExtensionRenderers = null;\n activeExtensionRegistrations = null;\n activeCommandContext = null;\n activeCommandResult = undefined;\n activeAfterCommandAffectedItems = [];\n}\n\n/**\n * Implements run active on write hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnWriteHooks(context: OnWriteHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnWriteHooks(activeExtensionHooks, context);\n}\n\n/**\n * Implements run active on read hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnReadHooks(context: OnReadHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnReadHooks(activeExtensionHooks, context);\n}\n\n/**\n * Synchronous fast-path predicate: true only when at least one onRead hook is\n * registered. Bulk readers (e.g. the metadata cache scanning hundreds of files)\n * use this to skip per-file `await runActiveOnReadHooks(...)` calls entirely when\n * no extension observes reads, avoiding hundreds of needless microtasks.\n */\nexport function hasActiveOnReadHooks(): boolean {\n return (activeExtensionHooks?.onRead?.length ?? 0) > 0;\n}\n\n/**\n * Implements run active on index hooks for the public runtime surface of this module.\n */\nexport async function runActiveOnIndexHooks(context: OnIndexHookContext): Promise<string[]> {\n if (!activeExtensionHooks) {\n return [];\n }\n return runOnIndexHooks(activeExtensionHooks, context);\n}\n\n/**\n * Implements run active command override for the public runtime surface of this module.\n */\nexport function runActiveCommandOverride(result: unknown): CommandOverrideResult {\n if (!activeExtensionCommands || !activeCommandContext) {\n return {\n overridden: false,\n result,\n warnings: [],\n };\n }\n return runCommandOverride(activeExtensionCommands, {\n command: activeCommandContext.command,\n args: [...activeCommandContext.args],\n options: activeCommandContext.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext.pm_root,\n result,\n });\n}\n\n/**\n * Implements run active command handler for the public runtime surface of this module.\n */\nexport async function runActiveCommandHandler(context: CommandHandlerContext): Promise<CommandHandlerResult> {\n if (!activeExtensionCommands) {\n return {\n handled: false,\n result: null,\n warnings: [],\n };\n }\n return runCommandHandler(activeExtensionCommands, context);\n}\n\n/**\n * Implements run active parser override for the public runtime surface of this module.\n */\nexport async function runActiveParserOverride(context: ParserOverrideContext): Promise<ParserOverrideResult> {\n if (!activeExtensionParsers) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n warnings: [],\n };\n }\n return runParserOverride(activeExtensionParsers, context);\n}\n\n/**\n * Implements run active preflight override for the public runtime surface of this module.\n */\nexport async function runActivePreflightOverride(context: PreflightOverrideContext): Promise<PreflightOverrideResult> {\n if (!activeExtensionPreflight) {\n return {\n overridden: false,\n context: {\n command: context.command,\n args: [...context.args],\n options: { ...context.options },\n global: { ...context.global },\n pm_root: context.pm_root,\n },\n decision: { ...context.decision },\n warnings: [],\n };\n }\n return runPreflightOverride(activeExtensionPreflight, context);\n}\n\n/**\n * Implements run active renderer override for the public runtime surface of this module.\n */\nexport function runActiveRendererOverride(format: OutputRendererFormat, result: unknown): RendererOverrideResult {\n if (!activeExtensionRenderers) {\n return {\n overridden: false,\n rendered: null,\n warnings: [],\n };\n }\n return runRendererOverride(activeExtensionRenderers, {\n format,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext?.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext?.pm_root,\n result,\n });\n}\n\nfunction buildServiceContext(service: ExtensionServiceName, payload: unknown) {\n return {\n service,\n command: activeCommandContext?.command,\n args: activeCommandContext ? [...activeCommandContext.args] : [],\n options: activeCommandContext?.options ? { ...activeCommandContext.options } : {},\n global: activeCommandContext?.global ? { ...activeCommandContext.global } : undefined,\n pm_root: activeCommandContext?.pm_root,\n payload,\n };\n}\n\n/**\n * Implements run active service override for the public runtime surface of this module.\n */\nexport async function runActiveServiceOverride(\n service: ExtensionServiceName,\n payload: unknown,\n): Promise<ServiceOverrideResult> {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverride(activeExtensionServices, buildServiceContext(service, payload));\n}\n\n/**\n * Implements run active service override sync for the public runtime surface of this module.\n */\nexport function runActiveServiceOverrideSync(service: ExtensionServiceName, payload: unknown): ServiceOverrideResult {\n if (!activeExtensionServices) {\n return {\n handled: false,\n result: payload,\n warnings: [],\n };\n }\n return runServiceOverrideSync(activeExtensionServices, buildServiceContext(service, payload));\n}\n\nexport * from \"./loader.js\";\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"./capability-usage.js\";\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,GAwBhB,MAAM,aAAa,CAAC;AAGrB,IAAI,oBAAoB,GAAiC,IAAI,CAAC;AAC9D,IAAI,uBAAuB,GAAoC,IAAI,CAAC;AACpE,IAAI,sBAAsB,GAAmC,IAAI,CAAC;AAClE,IAAI,wBAAwB,GAAsC,IAAI,CAAC;AACvE,IAAI,uBAAuB,GAAoC,IAAI,CAAC;AACpE,IAAI,wBAAwB,GAAqC,IAAI,CAAC;AACtE,IAAI,4BAA4B,GAAyC,IAAI,CAAC;AAC9E,IAAI,oBAAoB,GAAkD,IAAI,CAAC;AAC/E,IAAI,mBAAmB,GAAY,SAAS,CAAC;AAC7C,IAAI,+BAA+B,GAA+B,EAAE,CAAC;AACrE,MAAM,qCAAqC,GAAG,IAAI,GAAG,CAAC;IACpD,MAAM;IACN,UAAU;IACV,cAAc;IACd,MAAM;IACN,QAAQ;IACR,OAAO;IACP,WAAW;IACX,OAAO;IACP,WAAW;IACX,WAAW;IACX,OAAO;CACR,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAmC;IACzE,oBAAoB,GAAG,KAAK,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,QAAyC;IAClF,uBAAuB,GAAG,QAAQ,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAAuC;IAC/E,sBAAsB,GAAG,OAAO,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAA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ED,cAAc,aAAa,CAAC;AAC5B,OAAO,EACL,0CAA0C,EAC1C,gCAAgC,EAChC,iCAAiC,GAGlC,MAAM,uBAAuB,CAAC","debugId":"abe62b94-a55a-5cdf-8f1a-34360ddc4c25"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * @module core/item/item-format-version
3
+ *
4
+ * Tracks the on-disk item front-matter format version so a future breaking
5
+ * storage change can tell already-current items apart from items that a staged
6
+ * migration must rewrite, without re-parsing and structurally guessing every
7
+ * file. The version is an explicit, monotonically increasing integer stamped in
8
+ * front-matter as `pm_format_version`.
9
+ *
10
+ * Token economy is a first-class constraint here: the baseline version (1) is
11
+ * the implicit default and is never serialized, so today's corpus gains zero
12
+ * bytes and zero churn. The field only materializes once an item reaches
13
+ * version 2 or higher. Absence of the field is therefore always interpreted as
14
+ * the baseline version, both now and after future bumps. The classification
15
+ * helpers below power the advisory `pm health` integrity surface and the
16
+ * `pm validate` format-version check.
17
+ */
18
+ import type { ItemMetadata } from "../../types/index.js";
19
+ /**
20
+ * The original (and implicit) item front-matter format version. Items missing a
21
+ * `pm_format_version` field are always treated as this version, so the baseline
22
+ * is never written to disk and adds no per-item token cost.
23
+ */
24
+ export declare const BASELINE_ITEM_FORMAT_VERSION = 1;
25
+ /**
26
+ * The format version this runtime writes and considers current. When a breaking
27
+ * front-matter change ships, bump this constant and add a migration that
28
+ * rewrites items whose {@link effectiveItemFormatVersion} is lower; items at or
29
+ * above it need no migration. It stays equal to
30
+ * {@link BASELINE_ITEM_FORMAT_VERSION} until the first such change.
31
+ */
32
+ export declare const CURRENT_ITEM_FORMAT_VERSION = 1;
33
+ /**
34
+ * Resolve the format version an item is effectively stored at. A present,
35
+ * positive-integer `pm_format_version` is taken verbatim (including versions
36
+ * ahead of this runtime, so they can be flagged rather than silently clamped);
37
+ * an absent, malformed, or sub-baseline value resolves to
38
+ * {@link BASELINE_ITEM_FORMAT_VERSION}.
39
+ */
40
+ export declare function effectiveItemFormatVersion(metadata: Pick<ItemMetadata, "pm_format_version">): number;
41
+ /**
42
+ * Reduce an item's `pm_format_version` to its persisted form: the baseline
43
+ * version (and any malformed or sub-baseline value) is dropped so it is never
44
+ * serialized, while versions at or above {@link BASELINE_ITEM_FORMAT_VERSION}
45
+ * plus one are preserved verbatim. This keeps the field absent for the entire
46
+ * current corpus and only writes it once an item genuinely advances past the
47
+ * implicit baseline.
48
+ */
49
+ export declare function normalizeItemFormatVersion(value: unknown): number | undefined;
50
+ /**
51
+ * Relationship between an item's stored format version and the runtime's
52
+ * current version: `outdated` (below current, a migration would rewrite it),
53
+ * `ahead` (above current, written by a newer pm than this one), or `current`.
54
+ */
55
+ export type ItemFormatVersionStatus = "current" | "outdated" | "ahead";
56
+ /**
57
+ * Classify a single stored format version against the runtime's current
58
+ * version. Defaults to {@link CURRENT_ITEM_FORMAT_VERSION}; the `current`
59
+ * parameter exists so callers (and tests) can evaluate against a hypothetical
60
+ * future version without mutating the module constant.
61
+ */
62
+ export declare function classifyItemFormatVersion(version: number, current?: number): ItemFormatVersionStatus;
63
+ /**
64
+ * One item's reference (id or relative path) paired with the format version it
65
+ * is stored at, used as input to {@link scanItemFormatVersions}.
66
+ */
67
+ export interface ItemFormatVersionScanEntry {
68
+ ref: string;
69
+ version: number;
70
+ }
71
+ /**
72
+ * Sorted references partitioned by how their stored format version compares to
73
+ * the runtime's current version. References at the current version are omitted
74
+ * from both lists.
75
+ */
76
+ export interface ItemFormatVersionScanResult {
77
+ outdated: string[];
78
+ ahead: string[];
79
+ }
80
+ /**
81
+ * Partition a set of items by format version into `outdated` (need migration)
82
+ * and `ahead` (written by a newer pm) reference lists, each sorted for stable
83
+ * diagnostics. Pushing all comparison branches into this pure, exhaustively
84
+ * tested helper lets `pm health` and `pm validate` emit findings by iterating
85
+ * the result lists, with no version-comparison branching of their own.
86
+ */
87
+ export declare function scanItemFormatVersions(entries: readonly ItemFormatVersionScanEntry[], current?: number): ItemFormatVersionScanResult;
@@ -0,0 +1,85 @@
1
+ /**
2
+ * The original (and implicit) item front-matter format version. Items missing a
3
+ * `pm_format_version` field are always treated as this version, so the baseline
4
+ * is never written to disk and adds no per-item token cost.
5
+ */
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]="f0e67d63-2f7b-5f4a-b441-7a499c82e0a8")}catch(e){}}();
8
+ export const BASELINE_ITEM_FORMAT_VERSION = 1;
9
+ /**
10
+ * The format version this runtime writes and considers current. When a breaking
11
+ * front-matter change ships, bump this constant and add a migration that
12
+ * rewrites items whose {@link effectiveItemFormatVersion} is lower; items at or
13
+ * above it need no migration. It stays equal to
14
+ * {@link BASELINE_ITEM_FORMAT_VERSION} until the first such change.
15
+ */
16
+ export const CURRENT_ITEM_FORMAT_VERSION = 1;
17
+ /**
18
+ * Resolve the format version an item is effectively stored at. A present,
19
+ * positive-integer `pm_format_version` is taken verbatim (including versions
20
+ * ahead of this runtime, so they can be flagged rather than silently clamped);
21
+ * an absent, malformed, or sub-baseline value resolves to
22
+ * {@link BASELINE_ITEM_FORMAT_VERSION}.
23
+ */
24
+ export function effectiveItemFormatVersion(metadata) {
25
+ const raw = metadata.pm_format_version;
26
+ if (typeof raw === "number" && Number.isInteger(raw) && raw >= BASELINE_ITEM_FORMAT_VERSION) {
27
+ return raw;
28
+ }
29
+ return BASELINE_ITEM_FORMAT_VERSION;
30
+ }
31
+ /**
32
+ * Reduce an item's `pm_format_version` to its persisted form: the baseline
33
+ * version (and any malformed or sub-baseline value) is dropped so it is never
34
+ * serialized, while versions at or above {@link BASELINE_ITEM_FORMAT_VERSION}
35
+ * plus one are preserved verbatim. This keeps the field absent for the entire
36
+ * current corpus and only writes it once an item genuinely advances past the
37
+ * implicit baseline.
38
+ */
39
+ export function normalizeItemFormatVersion(value) {
40
+ if (typeof value !== "number" || !Number.isInteger(value) || value <= BASELINE_ITEM_FORMAT_VERSION) {
41
+ return undefined;
42
+ }
43
+ return value;
44
+ }
45
+ /**
46
+ * Classify a single stored format version against the runtime's current
47
+ * version. Defaults to {@link CURRENT_ITEM_FORMAT_VERSION}; the `current`
48
+ * parameter exists so callers (and tests) can evaluate against a hypothetical
49
+ * future version without mutating the module constant.
50
+ */
51
+ export function classifyItemFormatVersion(version, current = CURRENT_ITEM_FORMAT_VERSION) {
52
+ if (version < current) {
53
+ return "outdated";
54
+ }
55
+ if (version > current) {
56
+ return "ahead";
57
+ }
58
+ return "current";
59
+ }
60
+ /**
61
+ * Partition a set of items by format version into `outdated` (need migration)
62
+ * and `ahead` (written by a newer pm) reference lists, each sorted for stable
63
+ * diagnostics. Pushing all comparison branches into this pure, exhaustively
64
+ * tested helper lets `pm health` and `pm validate` emit findings by iterating
65
+ * the result lists, with no version-comparison branching of their own.
66
+ */
67
+ export function scanItemFormatVersions(entries, current = CURRENT_ITEM_FORMAT_VERSION) {
68
+ const outdated = [];
69
+ const ahead = [];
70
+ for (const entry of entries) {
71
+ const status = classifyItemFormatVersion(entry.version, current);
72
+ if (status === "outdated") {
73
+ outdated.push(entry.ref);
74
+ }
75
+ else if (status === "ahead") {
76
+ ahead.push(entry.ref);
77
+ }
78
+ }
79
+ return {
80
+ outdated: outdated.sort((left, right) => left.localeCompare(right)),
81
+ ahead: ahead.sort((left, right) => left.localeCompare(right)),
82
+ };
83
+ }
84
+ //# sourceMappingURL=item-format-version.js.map
85
+ //# debugId=f0e67d63-2f7b-5f4a-b441-7a499c82e0a8
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-format-version.js","sources":["core/item/item-format-version.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/item/item-format-version\n *\n * Tracks the on-disk item front-matter format version so a future breaking\n * storage change can tell already-current items apart from items that a staged\n * migration must rewrite, without re-parsing and structurally guessing every\n * file. The version is an explicit, monotonically increasing integer stamped in\n * front-matter as `pm_format_version`.\n *\n * Token economy is a first-class constraint here: the baseline version (1) is\n * the implicit default and is never serialized, so today's corpus gains zero\n * bytes and zero churn. The field only materializes once an item reaches\n * version 2 or higher. Absence of the field is therefore always interpreted as\n * the baseline version, both now and after future bumps. The classification\n * helpers below power the advisory `pm health` integrity surface and the\n * `pm validate` format-version check.\n */\nimport type { ItemMetadata } from \"../../types/index.js\";\n\n/**\n * The original (and implicit) item front-matter format version. Items missing a\n * `pm_format_version` field are always treated as this version, so the baseline\n * is never written to disk and adds no per-item token cost.\n */\nexport const BASELINE_ITEM_FORMAT_VERSION = 1;\n\n/**\n * The format version this runtime writes and considers current. When a breaking\n * front-matter change ships, bump this constant and add a migration that\n * rewrites items whose {@link effectiveItemFormatVersion} is lower; items at or\n * above it need no migration. It stays equal to\n * {@link BASELINE_ITEM_FORMAT_VERSION} until the first such change.\n */\nexport const CURRENT_ITEM_FORMAT_VERSION = 1;\n\n/**\n * Resolve the format version an item is effectively stored at. A present,\n * positive-integer `pm_format_version` is taken verbatim (including versions\n * ahead of this runtime, so they can be flagged rather than silently clamped);\n * an absent, malformed, or sub-baseline value resolves to\n * {@link BASELINE_ITEM_FORMAT_VERSION}.\n */\nexport function effectiveItemFormatVersion(metadata: Pick<ItemMetadata, \"pm_format_version\">): number {\n const raw = metadata.pm_format_version;\n if (typeof raw === \"number\" && Number.isInteger(raw) && raw >= BASELINE_ITEM_FORMAT_VERSION) {\n return raw;\n }\n return BASELINE_ITEM_FORMAT_VERSION;\n}\n\n/**\n * Reduce an item's `pm_format_version` to its persisted form: the baseline\n * version (and any malformed or sub-baseline value) is dropped so it is never\n * serialized, while versions at or above {@link BASELINE_ITEM_FORMAT_VERSION}\n * plus one are preserved verbatim. This keeps the field absent for the entire\n * current corpus and only writes it once an item genuinely advances past the\n * implicit baseline.\n */\nexport function normalizeItemFormatVersion(value: unknown): number | undefined {\n if (typeof value !== \"number\" || !Number.isInteger(value) || value <= BASELINE_ITEM_FORMAT_VERSION) {\n return undefined;\n }\n return value;\n}\n\n/**\n * Relationship between an item's stored format version and the runtime's\n * current version: `outdated` (below current, a migration would rewrite it),\n * `ahead` (above current, written by a newer pm than this one), or `current`.\n */\nexport type ItemFormatVersionStatus = \"current\" | \"outdated\" | \"ahead\";\n\n/**\n * Classify a single stored format version against the runtime's current\n * version. Defaults to {@link CURRENT_ITEM_FORMAT_VERSION}; the `current`\n * parameter exists so callers (and tests) can evaluate against a hypothetical\n * future version without mutating the module constant.\n */\nexport function classifyItemFormatVersion(\n version: number,\n current: number = CURRENT_ITEM_FORMAT_VERSION,\n): ItemFormatVersionStatus {\n if (version < current) {\n return \"outdated\";\n }\n if (version > current) {\n return \"ahead\";\n }\n return \"current\";\n}\n\n/**\n * One item's reference (id or relative path) paired with the format version it\n * is stored at, used as input to {@link scanItemFormatVersions}.\n */\nexport interface ItemFormatVersionScanEntry {\n ref: string;\n version: number;\n}\n\n/**\n * Sorted references partitioned by how their stored format version compares to\n * the runtime's current version. References at the current version are omitted\n * from both lists.\n */\nexport interface ItemFormatVersionScanResult {\n outdated: string[];\n ahead: string[];\n}\n\n/**\n * Partition a set of items by format version into `outdated` (need migration)\n * and `ahead` (written by a newer pm) reference lists, each sorted for stable\n * diagnostics. Pushing all comparison branches into this pure, exhaustively\n * tested helper lets `pm health` and `pm validate` emit findings by iterating\n * the result lists, with no version-comparison branching of their own.\n */\nexport function scanItemFormatVersions(\n entries: readonly ItemFormatVersionScanEntry[],\n current: number = CURRENT_ITEM_FORMAT_VERSION,\n): ItemFormatVersionScanResult {\n const outdated: string[] = [];\n const ahead: string[] = [];\n for (const entry of entries) {\n const status = classifyItemFormatVersion(entry.version, current);\n if (status === \"outdated\") {\n outdated.push(entry.ref);\n } else if (status === \"ahead\") {\n ahead.push(entry.ref);\n }\n }\n return {\n outdated: outdated.sort((left, right) => left.localeCompare(right)),\n ahead: ahead.sort((left, right) => left.localeCompare(right)),\n };\n}\n"],"names":[],"mappings":"AAmBA;;;;GAIG;;;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC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AC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;aAAM,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACnE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KAC9D,CAAC;AACJ,CAAC","debugId":"f0e67d63-2f7b-5f4a-b441-7a499c82e0a8"}
@@ -4,11 +4,12 @@
4
4
  * Defines item parsing, formatting, and lifecycle helpers for Item Format.
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]="c295802c-f55f-56e8-afdc-257cdef6a4cb")}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]="777ea2a9-5aa6-5a90-abb5-a0b6052645f2")}catch(e){}}();
8
8
  import { encode as encodeToon } from "@toon-format/toon";
9
9
  import { CONFIDENCE_TEXT_VALUES, ISSUE_SEVERITY_VALUES, RECURRENCE_FREQUENCY_VALUES, RECURRENCE_WEEKDAY_VALUES, STATUS_VALUES, weekdayOrderIndex, } from "../../types/index.js";
10
10
  import { coerceRuntimeFieldValue } from "../schema/runtime-field-values.js";
11
11
  import { resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, } from "../schema/runtime-schema.js";
12
+ import { BASELINE_ITEM_FORMAT_VERSION, normalizeItemFormatVersion } from "./item-format-version.js";
12
13
  import { normalizeStatusInput } from "./status.js";
13
14
  import { decodeToonItemContent } from "./toon-decode.js";
14
15
  import { EXIT_CODE, FRONT_MATTER_KEY_ORDER } from "../shared/constants.js";
@@ -129,6 +130,10 @@ function assertValidFrontMatter(frontMatter, runtimeContext) {
129
130
  }
130
131
  const itemType = record.type;
131
132
  assertFrontMatterCondition(typeof itemType === "string" && itemType.trim().length > 0, "type must be a non-empty string");
133
+ const formatVersion = record.pm_format_version;
134
+ if (formatVersion !== undefined) {
135
+ assertFrontMatterCondition(typeof formatVersion === "number" && Number.isInteger(formatVersion) && formatVersion >= BASELINE_ITEM_FORMAT_VERSION, `pm_format_version must be an integer >= ${BASELINE_ITEM_FORMAT_VERSION}`);
136
+ }
132
137
  const status = record.status;
133
138
  assertFrontMatterCondition(typeof status === "string" && status.trim().length > 0, "status must be a non-empty string");
134
139
  const statusRegistry = runtimeContext?.statusRegistry;
@@ -849,6 +854,7 @@ export function normalizeFrontMatter(frontMatter, options = {}) {
849
854
  title: frontMatter.title,
850
855
  description: frontMatter.description,
851
856
  type: frontMatter.type,
857
+ pm_format_version: normalizeItemFormatVersion(frontMatter.pm_format_version),
852
858
  source_type: frontMatter.source_type?.trim() || undefined,
853
859
  type_options: normalizeTypeOptions(frontMatter.type_options),
854
860
  status: normalizedStatus,
@@ -1149,4 +1155,4 @@ export const _testOnlyItemFormat = {
1149
1155
  sortTests,
1150
1156
  };
1151
1157
  //# sourceMappingURL=item-format.js.map
1152
- //# debugId=c295802c-f55f-56e8-afdc-257cdef6a4cb
1158
+ //# debugId=777ea2a9-5aa6-5a90-abb5-a0b6052645f2