@unbrained/pm-cli 2026.5.31 → 2026.6.5

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 (586) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/dist/cli/argv-utils.js +7 -3
  3. package/dist/cli/argv-utils.js.map +1 -1
  4. package/dist/cli/bootstrap-args.d.ts +1 -0
  5. package/dist/cli/bootstrap-args.js +23 -3
  6. package/dist/cli/bootstrap-args.js.map +1 -1
  7. package/dist/cli/commands/calendar.js +17 -3
  8. package/dist/cli/commands/calendar.js.map +1 -1
  9. package/dist/cli/commands/close-many.d.ts +63 -0
  10. package/dist/cli/commands/close-many.js +302 -0
  11. package/dist/cli/commands/close-many.js.map +1 -0
  12. package/dist/cli/commands/completion.d.ts +1 -0
  13. package/dist/cli/commands/completion.js +241 -27
  14. package/dist/cli/commands/completion.js.map +1 -1
  15. package/dist/cli/commands/config.d.ts +4 -4
  16. package/dist/cli/commands/config.js +115 -3
  17. package/dist/cli/commands/config.js.map +1 -1
  18. package/dist/cli/commands/contracts.js +191 -162
  19. package/dist/cli/commands/contracts.js.map +1 -1
  20. package/dist/cli/commands/create.d.ts +1 -0
  21. package/dist/cli/commands/create.js +77 -114
  22. package/dist/cli/commands/create.js.map +1 -1
  23. package/dist/cli/commands/extension/doctor.d.ts +12 -0
  24. package/dist/cli/commands/extension/doctor.js +97 -2
  25. package/dist/cli/commands/extension/doctor.js.map +1 -1
  26. package/dist/cli/commands/extension/scaffold.js +49 -48
  27. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  28. package/dist/cli/commands/extension.js +51 -23
  29. package/dist/cli/commands/extension.js.map +1 -1
  30. package/dist/cli/commands/get.js +7 -7
  31. package/dist/cli/commands/get.js.map +1 -1
  32. package/dist/cli/commands/health.js +38 -3
  33. package/dist/cli/commands/health.js.map +1 -1
  34. package/dist/cli/commands/index.d.ts +2 -1
  35. package/dist/cli/commands/index.js +4 -3
  36. package/dist/cli/commands/index.js.map +1 -1
  37. package/dist/cli/commands/init.d.ts +10 -0
  38. package/dist/cli/commands/init.js +107 -4
  39. package/dist/cli/commands/init.js.map +1 -1
  40. package/dist/cli/commands/list.d.ts +5 -0
  41. package/dist/cli/commands/list.js +58 -26
  42. package/dist/cli/commands/list.js.map +1 -1
  43. package/dist/cli/commands/reindex.js +163 -47
  44. package/dist/cli/commands/reindex.js.map +1 -1
  45. package/dist/cli/commands/repeatable-metadata-parsers.d.ts +15 -0
  46. package/dist/cli/commands/repeatable-metadata-parsers.js +120 -0
  47. package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -0
  48. package/dist/cli/commands/restore.js +25 -4
  49. package/dist/cli/commands/restore.js.map +1 -1
  50. package/dist/cli/commands/schema.d.ts +122 -1
  51. package/dist/cli/commands/schema.js +536 -6
  52. package/dist/cli/commands/schema.js.map +1 -1
  53. package/dist/cli/commands/search.d.ts +1 -0
  54. package/dist/cli/commands/search.js +18 -4
  55. package/dist/cli/commands/search.js.map +1 -1
  56. package/dist/cli/commands/test.js +4 -3
  57. package/dist/cli/commands/test.js.map +1 -1
  58. package/dist/cli/commands/update-many.js +69 -140
  59. package/dist/cli/commands/update-many.js.map +1 -1
  60. package/dist/cli/commands/update.d.ts +2 -0
  61. package/dist/cli/commands/update.js +138 -119
  62. package/dist/cli/commands/update.js.map +1 -1
  63. package/dist/cli/commands/validate.d.ts +1 -0
  64. package/dist/cli/commands/validate.js +63 -33
  65. package/dist/cli/commands/validate.js.map +1 -1
  66. package/dist/cli/error-guidance.js +26 -3
  67. package/dist/cli/error-guidance.js.map +1 -1
  68. package/dist/cli/help-content.js +82 -3
  69. package/dist/cli/help-content.js.map +1 -1
  70. package/dist/cli/main.js +377 -23
  71. package/dist/cli/main.js.map +1 -1
  72. package/dist/cli/register-list-query.js +9 -3
  73. package/dist/cli/register-list-query.js.map +1 -1
  74. package/dist/cli/register-mutation.js +200 -28
  75. package/dist/cli/register-mutation.js.map +1 -1
  76. package/dist/cli/register-operations.js +4 -2
  77. package/dist/cli/register-operations.js.map +1 -1
  78. package/dist/cli/register-setup.js +4 -2
  79. package/dist/cli/register-setup.js.map +1 -1
  80. package/dist/cli/registration-helpers.js +31 -4
  81. package/dist/cli/registration-helpers.js.map +1 -1
  82. package/dist/cli-bundle/chunks/activity-3RWRRNOW.js +20 -0
  83. package/dist/cli-bundle/chunks/activity-3RWRRNOW.js.map +1 -0
  84. package/dist/cli-bundle/chunks/activity-P5BUMWP3.js +16 -0
  85. package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js +206 -0
  86. package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js.map +1 -0
  87. package/dist/cli-bundle/chunks/{aggregate-ADUOSFRO.js → aggregate-OOAGKWRG.js} +11 -11
  88. package/dist/cli-bundle/chunks/{append-JD2DETU7.js → append-5JE3YGXU.js} +8 -9
  89. package/dist/cli-bundle/chunks/{append-JD2DETU7.js.map → append-5JE3YGXU.js.map} +1 -1
  90. package/dist/cli-bundle/chunks/append-PNN6UIBZ.js +69 -0
  91. package/dist/cli-bundle/chunks/append-PNN6UIBZ.js.map +1 -0
  92. package/dist/cli-bundle/chunks/chunk-26KTVXJW.js +218 -0
  93. package/dist/cli-bundle/chunks/chunk-26KTVXJW.js.map +1 -0
  94. package/dist/cli-bundle/chunks/{chunk-JULRTHJQ.js → chunk-3OH4DAEB.js} +119 -6
  95. package/dist/cli-bundle/chunks/chunk-3OH4DAEB.js.map +7 -0
  96. package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js +5553 -0
  97. package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js.map +1 -0
  98. package/dist/cli-bundle/chunks/{chunk-WDPXDQFG.js → chunk-4PJQSECJ.js} +6 -4
  99. package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js.map +7 -0
  100. package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js +1832 -0
  101. package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js.map +1 -0
  102. package/dist/cli-bundle/chunks/{chunk-6HT2F4TK.js → chunk-5IRA6IYD.js} +175 -54
  103. package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js.map +7 -0
  104. package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js +412 -0
  105. package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js.map +1 -0
  106. package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js +182 -0
  107. package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js.map +1 -0
  108. package/dist/cli-bundle/chunks/chunk-7K24QB23.js +698 -0
  109. package/dist/cli-bundle/chunks/chunk-7K24QB23.js.map +1 -0
  110. package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js +380 -0
  111. package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js.map +1 -0
  112. package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js +230 -0
  113. package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js.map +1 -0
  114. package/dist/cli-bundle/chunks/{chunk-G57E5D7T.js → chunk-ATBVS6WW.js} +5 -5
  115. package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js +332 -0
  116. package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js.map +1 -0
  117. package/dist/cli-bundle/chunks/{chunk-PXUAZUUY.js → chunk-B3N4TKNL.js} +12 -11
  118. package/dist/cli-bundle/chunks/chunk-B3N4TKNL.js.map +7 -0
  119. package/dist/cli-bundle/chunks/{chunk-KBQY3YG5.js → chunk-BNL6S7QH.js} +3 -3
  120. package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js +154 -0
  121. package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{chunk-NGN7UV5K.js → chunk-CJDQB2ED.js} +2 -2
  123. package/dist/cli-bundle/chunks/chunk-CWT53EYT.js +1340 -0
  124. package/dist/cli-bundle/chunks/chunk-CWT53EYT.js.map +1 -0
  125. package/dist/cli-bundle/chunks/{chunk-D7AOMPRH.js → chunk-D3WUNETC.js} +5 -5
  126. package/dist/cli-bundle/chunks/{chunk-3M73P3G6.js → chunk-D5X7N6FI.js} +210 -132
  127. package/dist/cli-bundle/chunks/chunk-D5X7N6FI.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{chunk-6YCV7WSL.js → chunk-DFIZGAI5.js} +10 -12
  129. package/dist/cli-bundle/chunks/{chunk-6YCV7WSL.js.map → chunk-DFIZGAI5.js.map} +1 -1
  130. package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js +1704 -0
  131. package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js.map +1 -0
  132. package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js +2988 -0
  133. package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js.map +1 -0
  134. package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js +128 -0
  135. package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js.map +1 -0
  136. package/dist/cli-bundle/chunks/chunk-G5BACLYH.js +454 -0
  137. package/dist/cli-bundle/chunks/chunk-G5BACLYH.js.map +1 -0
  138. package/dist/cli-bundle/chunks/{chunk-U7FMKRXH.js → chunk-GCAVRLGE.js} +37 -16
  139. package/dist/cli-bundle/chunks/chunk-GCAVRLGE.js.map +7 -0
  140. package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js +57 -0
  141. package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js.map +1 -0
  142. package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js +3860 -0
  143. package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js.map +1 -0
  144. package/dist/cli-bundle/chunks/chunk-GPGAYASV.js +346 -0
  145. package/dist/cli-bundle/chunks/chunk-GPGAYASV.js.map +1 -0
  146. package/dist/cli-bundle/chunks/{chunk-MD7K4JYF.js → chunk-HPH6X4ZZ.js} +26 -15
  147. package/dist/cli-bundle/chunks/chunk-HPH6X4ZZ.js.map +7 -0
  148. package/dist/cli-bundle/chunks/{chunk-5HSEP75M.js → chunk-HZOS2UG5.js} +18 -6
  149. package/dist/cli-bundle/chunks/chunk-HZOS2UG5.js.map +7 -0
  150. package/dist/cli-bundle/chunks/chunk-IUV734HF.js +17 -0
  151. package/dist/cli-bundle/chunks/chunk-IUV734HF.js.map +1 -0
  152. package/dist/cli-bundle/chunks/chunk-J27KIHTG.js +15 -0
  153. package/dist/cli-bundle/chunks/chunk-J27KIHTG.js.map +1 -0
  154. package/dist/cli-bundle/chunks/{chunk-L2FXEKDB.js → chunk-JB4RGL4V.js} +7 -7
  155. package/dist/cli-bundle/chunks/chunk-JQI2HE55.js +130 -0
  156. package/dist/cli-bundle/chunks/chunk-JQI2HE55.js.map +1 -0
  157. package/dist/cli-bundle/chunks/{chunk-SEXQN4KL.js → chunk-K47WAYQV.js} +3 -3
  158. package/dist/cli-bundle/chunks/{chunk-CEFIVZPG.js → chunk-KA24HME7.js} +2 -2
  159. package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js +1325 -0
  160. package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js.map +1 -0
  161. package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js +242 -0
  162. package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js.map +1 -0
  163. package/dist/cli-bundle/chunks/{chunk-7Y53ZJIQ.js → chunk-KK6YPGH3.js} +22 -3
  164. package/dist/cli-bundle/chunks/chunk-KK6YPGH3.js.map +7 -0
  165. package/dist/cli-bundle/chunks/{chunk-A7E7PUVX.js → chunk-LDJK7SHN.js} +7 -7
  166. package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js +24 -0
  167. package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js.map +1 -0
  168. package/dist/cli-bundle/chunks/chunk-MISYRLEP.js +80 -0
  169. package/dist/cli-bundle/chunks/chunk-MISYRLEP.js.map +1 -0
  170. package/dist/cli-bundle/chunks/{chunk-FQE6XZDB.js → chunk-N5YF3VFN.js} +54 -32
  171. package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js.map +7 -0
  172. package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js +173 -0
  173. package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js.map +1 -0
  174. package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js +338 -0
  175. package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js.map +1 -0
  176. package/dist/cli-bundle/chunks/{chunk-OGZEG5TT.js → chunk-OIQIXTNB.js} +164 -53
  177. package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js.map +7 -0
  178. package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js +751 -0
  179. package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js.map +1 -0
  180. package/dist/cli-bundle/chunks/{chunk-JTWRXG4B.js → chunk-OUF3ARDX.js} +251 -251
  181. package/dist/cli-bundle/chunks/chunk-OUF3ARDX.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{chunk-PVNQLCIS.js → chunk-RANZIID5.js} +2 -2
  183. package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js +140 -0
  184. package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js.map +7 -0
  185. package/dist/cli-bundle/chunks/{chunk-JFWUHHS2.js → chunk-S3CV7JGJ.js} +4 -4
  186. package/dist/cli-bundle/chunks/{chunk-LSXGH6NE.js → chunk-SRVKTWPR.js} +748 -196
  187. package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js.map +7 -0
  188. package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js +76 -0
  189. package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js.map +1 -0
  190. package/dist/cli-bundle/chunks/chunk-SZQCER6S.js +631 -0
  191. package/dist/cli-bundle/chunks/chunk-SZQCER6S.js.map +1 -0
  192. package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js +540 -0
  193. package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js.map +1 -0
  194. package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js +422 -0
  195. package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js.map +7 -0
  196. package/dist/cli-bundle/chunks/{chunk-P53TN6IA.js → chunk-TK633IVD.js} +35 -8
  197. package/dist/cli-bundle/chunks/chunk-TK633IVD.js.map +7 -0
  198. package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js +131 -0
  199. package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js.map +7 -0
  200. package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js +119 -0
  201. package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js.map +1 -0
  202. package/dist/cli-bundle/chunks/chunk-UOVLWB47.js +1664 -0
  203. package/dist/cli-bundle/chunks/chunk-UOVLWB47.js.map +1 -0
  204. package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js +186 -0
  205. package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js.map +1 -0
  206. package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js +182 -0
  207. package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js.map +1 -0
  208. package/dist/cli-bundle/chunks/{chunk-LRBOHPUE.js → chunk-WIKR7KFL.js} +8 -8
  209. package/dist/cli-bundle/chunks/{chunk-BUPWJ3IJ.js → chunk-XG7RJYHV.js} +484 -49
  210. package/dist/cli-bundle/chunks/chunk-XG7RJYHV.js.map +7 -0
  211. package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js +53 -0
  212. package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js.map +1 -0
  213. package/dist/cli-bundle/chunks/{chunk-AKOOMO3T.js → chunk-XX5LRINW.js} +2 -2
  214. package/dist/cli-bundle/chunks/{chunk-WJ2NAC37.js → chunk-Y2AKE2HS.js} +3 -3
  215. package/dist/cli-bundle/chunks/{chunk-GN7IJPCD.js → chunk-ZQ4F6EC4.js} +301 -24
  216. package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js.map +7 -0
  217. package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js +1809 -0
  218. package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js.map +1 -0
  219. package/dist/cli-bundle/chunks/{claim-EE4TKKCV.js → claim-AZLP7YFO.js} +10 -11
  220. package/dist/cli-bundle/chunks/{claim-EE4TKKCV.js.map → claim-AZLP7YFO.js.map} +1 -1
  221. package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js +129 -0
  222. package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js.map +1 -0
  223. package/dist/cli-bundle/chunks/close-65DFYAVS.js +17 -0
  224. package/dist/cli-bundle/chunks/close-65DFYAVS.js.map +1 -0
  225. package/dist/cli-bundle/chunks/close-RMHQ3KWH.js +13 -0
  226. package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js +311 -0
  227. package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js.map +1 -0
  228. package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js +314 -0
  229. package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js.map +7 -0
  230. package/dist/cli-bundle/chunks/{comments-AAKJQ6LW.js → comments-AGBNSJJH.js} +10 -11
  231. package/dist/cli-bundle/chunks/{comments-AAKJQ6LW.js.map → comments-AGBNSJJH.js.map} +1 -1
  232. package/dist/cli-bundle/chunks/comments-CJWXQI7X.js +100 -0
  233. package/dist/cli-bundle/chunks/comments-CJWXQI7X.js.map +1 -0
  234. package/dist/cli-bundle/chunks/{config-V3FZOKLI.js → config-5ON3ADRH.js} +121 -10
  235. package/dist/cli-bundle/chunks/config-5ON3ADRH.js.map +7 -0
  236. package/dist/cli-bundle/chunks/config-DDPYIA6J.js +1671 -0
  237. package/dist/cli-bundle/chunks/config-DDPYIA6J.js.map +1 -0
  238. package/dist/cli-bundle/chunks/{context-RZ5QPNJB.js → context-E6U3DWVM.js} +32 -19
  239. package/dist/cli-bundle/chunks/{context-RZ5QPNJB.js.map → context-E6U3DWVM.js.map} +2 -2
  240. package/dist/cli-bundle/chunks/context-ZOJEN5VT.js +1461 -0
  241. package/dist/cli-bundle/chunks/context-ZOJEN5VT.js.map +1 -0
  242. package/dist/cli-bundle/chunks/{contracts-YLMH33VU.js → contracts-CXSFM45B.js} +194 -162
  243. package/dist/cli-bundle/chunks/contracts-CXSFM45B.js.map +7 -0
  244. package/dist/cli-bundle/chunks/contracts-LCSX5R53.js +1274 -0
  245. package/dist/cli-bundle/chunks/contracts-LCSX5R53.js.map +1 -0
  246. package/dist/cli-bundle/chunks/create-ATONSAZW.js +27 -0
  247. package/dist/cli-bundle/chunks/create-WYFKN2U4.js +31 -0
  248. package/dist/cli-bundle/chunks/create-WYFKN2U4.js.map +1 -0
  249. package/dist/cli-bundle/chunks/{delete-RHCTEORS.js → delete-RONNH4F4.js} +7 -8
  250. package/dist/cli-bundle/chunks/{delete-RHCTEORS.js.map → delete-RONNH4F4.js.map} +1 -1
  251. package/dist/cli-bundle/chunks/delete-ZXWC56WO.js +55 -0
  252. package/dist/cli-bundle/chunks/delete-ZXWC56WO.js.map +1 -0
  253. package/dist/cli-bundle/chunks/deps-EHXIFOZR.js +225 -0
  254. package/dist/cli-bundle/chunks/deps-EHXIFOZR.js.map +1 -0
  255. package/dist/cli-bundle/chunks/{deps-MZYCMLAO.js → deps-WII3O4HB.js} +7 -8
  256. package/dist/cli-bundle/chunks/{deps-MZYCMLAO.js.map → deps-WII3O4HB.js.map} +1 -1
  257. package/dist/cli-bundle/chunks/{docs-FXXUCZYU.js → docs-JMVCFNHH.js} +9 -10
  258. package/dist/cli-bundle/chunks/{docs-FXXUCZYU.js.map → docs-JMVCFNHH.js.map} +1 -1
  259. package/dist/cli-bundle/chunks/docs-PDREIMLS.js +31 -0
  260. package/dist/cli-bundle/chunks/docs-PDREIMLS.js.map +1 -0
  261. package/dist/cli-bundle/chunks/extension-B4ROVWJD.js +28 -0
  262. package/dist/cli-bundle/chunks/extension-B4ROVWJD.js.map +1 -0
  263. package/dist/cli-bundle/chunks/{extension-B4WL7BQU.js → extension-G6UXSM5S.js} +4 -5
  264. package/dist/cli-bundle/chunks/files-2PN7UM2D.js +282 -0
  265. package/dist/cli-bundle/chunks/files-2PN7UM2D.js.map +1 -0
  266. package/dist/cli-bundle/chunks/{files-WVOX67PE.js → files-MXYS5W4M.js} +9 -10
  267. package/dist/cli-bundle/chunks/{files-WVOX67PE.js.map → files-MXYS5W4M.js.map} +1 -1
  268. package/dist/cli-bundle/chunks/gc-GT552UJH.js +178 -0
  269. package/dist/cli-bundle/chunks/gc-GT552UJH.js.map +1 -0
  270. package/dist/cli-bundle/chunks/{gc-JWNF66EC.js → gc-QNBRJG6H.js} +3 -3
  271. package/dist/cli-bundle/chunks/{get-LTK3HOCQ.js → get-CINFEUIY.js} +16 -17
  272. package/dist/cli-bundle/chunks/get-CINFEUIY.js.map +7 -0
  273. package/dist/cli-bundle/chunks/get-WXMLRG7M.js +194 -0
  274. package/dist/cli-bundle/chunks/get-WXMLRG7M.js.map +1 -0
  275. package/dist/cli-bundle/chunks/health-5VPOJQ53.js +1258 -0
  276. package/dist/cli-bundle/chunks/health-5VPOJQ53.js.map +1 -0
  277. package/dist/cli-bundle/chunks/{health-TCWL55KM.js → health-IT5DBPRJ.js} +43 -15
  278. package/dist/cli-bundle/chunks/health-IT5DBPRJ.js.map +7 -0
  279. package/dist/cli-bundle/chunks/history-6FC4H6HI.js +20 -0
  280. package/dist/cli-bundle/chunks/history-FLZIP7PM.js +24 -0
  281. package/dist/cli-bundle/chunks/history-FLZIP7PM.js.map +1 -0
  282. package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js +23 -0
  283. package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js.map +1 -0
  284. package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js +19 -0
  285. package/dist/cli-bundle/chunks/{history-repair-ZWSTDRH2.js → history-repair-KC5ZOJRZ.js} +12 -14
  286. package/dist/cli-bundle/chunks/{history-repair-ZWSTDRH2.js.map → history-repair-KC5ZOJRZ.js.map} +1 -1
  287. package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js +193 -0
  288. package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js.map +1 -0
  289. package/dist/cli-bundle/chunks/init-6MRFVOLH.js +20 -0
  290. package/dist/cli-bundle/chunks/init-6MRFVOLH.js.map +1 -0
  291. package/dist/cli-bundle/chunks/init-KHX3FEEM.js +16 -0
  292. package/dist/cli-bundle/chunks/{learnings-NXTWE3FR.js → learnings-A3CLB5CO.js} +10 -11
  293. package/dist/cli-bundle/chunks/{learnings-NXTWE3FR.js.map → learnings-A3CLB5CO.js.map} +1 -1
  294. package/dist/cli-bundle/chunks/learnings-DCX55BNX.js +44 -0
  295. package/dist/cli-bundle/chunks/learnings-DCX55BNX.js.map +1 -0
  296. package/dist/cli-bundle/chunks/list-53LZ2AEO.js +20 -0
  297. package/dist/cli-bundle/chunks/list-DBRECOG4.js +24 -0
  298. package/dist/cli-bundle/chunks/list-DBRECOG4.js.map +1 -0
  299. package/dist/cli-bundle/chunks/{notes-DFS5ZGOO.js → notes-42LIC3UE.js} +10 -11
  300. package/dist/cli-bundle/chunks/{notes-DFS5ZGOO.js.map → notes-42LIC3UE.js.map} +1 -1
  301. package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js +44 -0
  302. package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js.map +1 -0
  303. package/dist/cli-bundle/chunks/{plan-67AB2PLM.js → plan-HDQXEUKD.js} +13 -14
  304. package/dist/cli-bundle/chunks/{plan-67AB2PLM.js.map → plan-HDQXEUKD.js.map} +1 -1
  305. package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js +1171 -0
  306. package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js.map +1 -0
  307. package/dist/cli-bundle/chunks/{register-list-query-UP3VRUFS.js → register-list-query-AG3XKXWL.js} +22 -24
  308. package/dist/cli-bundle/chunks/register-list-query-AG3XKXWL.js.map +7 -0
  309. package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js +227 -0
  310. package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js.map +1 -0
  311. package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js +813 -0
  312. package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js.map +1 -0
  313. package/dist/cli-bundle/chunks/{register-mutation-YWSBF545.js → register-mutation-RSMT6DPK.js} +154 -43
  314. package/dist/cli-bundle/chunks/register-mutation-RSMT6DPK.js.map +7 -0
  315. package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js +370 -0
  316. package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js.map +1 -0
  317. package/dist/cli-bundle/chunks/{register-operations-3BDTGSDH.js → register-operations-Q54JQZUN.js} +33 -34
  318. package/dist/cli-bundle/chunks/register-operations-Q54JQZUN.js.map +7 -0
  319. package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js +242 -0
  320. package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js.map +1 -0
  321. package/dist/cli-bundle/chunks/{register-setup-V56GDRUS.js → register-setup-YJKIQRKA.js} +18 -19
  322. package/dist/cli-bundle/chunks/{register-setup-V56GDRUS.js.map → register-setup-YJKIQRKA.js.map} +2 -2
  323. package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js +21 -0
  324. package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js.map +1 -0
  325. package/dist/cli-bundle/chunks/restore-JL5QIH7H.js +17 -0
  326. package/dist/cli-bundle/chunks/schema-LVXZWFGY.js +770 -0
  327. package/dist/cli-bundle/chunks/schema-LVXZWFGY.js.map +1 -0
  328. package/dist/cli-bundle/chunks/schema-V6BX65Q2.js +780 -0
  329. package/dist/cli-bundle/chunks/schema-V6BX65Q2.js.map +7 -0
  330. package/dist/cli-bundle/chunks/{search-HENBL456.js → search-5A3BMFA7.js} +25 -16
  331. package/dist/cli-bundle/chunks/search-5A3BMFA7.js.map +7 -0
  332. package/dist/cli-bundle/chunks/search-C7NPB7G7.js +1127 -0
  333. package/dist/cli-bundle/chunks/search-C7NPB7G7.js.map +1 -0
  334. package/dist/cli-bundle/chunks/stats-FNLYVXTB.js +120 -0
  335. package/dist/cli-bundle/chunks/stats-FNLYVXTB.js.map +1 -0
  336. package/dist/cli-bundle/chunks/{stats-N6H3YP2F.js → stats-Y2CBTZSL.js} +7 -8
  337. package/dist/cli-bundle/chunks/{stats-N6H3YP2F.js.map → stats-Y2CBTZSL.js.map} +1 -1
  338. package/dist/cli-bundle/chunks/test-OFYONO3C.js +35 -0
  339. package/dist/cli-bundle/chunks/test-OFYONO3C.js.map +1 -0
  340. package/dist/cli-bundle/chunks/test-RJ4ZF35X.js +31 -0
  341. package/dist/cli-bundle/chunks/{test-all-G2AZOHXI.js → test-all-EEMKNTGU.js} +13 -14
  342. package/dist/cli-bundle/chunks/{test-all-G2AZOHXI.js.map → test-all-EEMKNTGU.js.map} +1 -1
  343. package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js +328 -0
  344. package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js.map +1 -0
  345. package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js +929 -0
  346. package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js.map +1 -0
  347. package/dist/cli-bundle/chunks/{test-runs-GX5HTPSF.js → test-runs-L2M7WKH7.js} +5 -5
  348. package/dist/cli-bundle/chunks/update-6YEHPVXH.js +25 -0
  349. package/dist/cli-bundle/chunks/update-6YEHPVXH.js.map +1 -0
  350. package/dist/cli-bundle/chunks/update-PYLVHMRD.js +21 -0
  351. package/dist/cli-bundle/chunks/{update-many-46HRSP2Q.js → update-many-322CCH2L.js} +78 -146
  352. package/dist/cli-bundle/chunks/update-many-322CCH2L.js.map +7 -0
  353. package/dist/cli-bundle/chunks/update-many-DYWGW57M.js +605 -0
  354. package/dist/cli-bundle/chunks/update-many-DYWGW57M.js.map +1 -0
  355. package/dist/cli-bundle/chunks/{upgrade-H5HHM5UV.js → upgrade-2U727SAM.js} +5 -7
  356. package/dist/cli-bundle/chunks/{upgrade-H5HHM5UV.js.map → upgrade-2U727SAM.js.map} +1 -1
  357. package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js +266 -0
  358. package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js.map +1 -0
  359. package/dist/cli-bundle/chunks/validate-GZ24NYHO.js +1120 -0
  360. package/dist/cli-bundle/chunks/validate-GZ24NYHO.js.map +1 -0
  361. package/dist/cli-bundle/chunks/{validate-TMCVKIGZ.js → validate-ZFVWPEEN.js} +61 -48
  362. package/dist/cli-bundle/chunks/validate-ZFVWPEEN.js.map +7 -0
  363. package/dist/cli-bundle/main.js +490 -52
  364. package/dist/cli-bundle/main.js.map +2 -2
  365. package/dist/core/checkpoint/mutation-checkpoint.d.ts +44 -0
  366. package/dist/core/checkpoint/mutation-checkpoint.js +119 -0
  367. package/dist/core/checkpoint/mutation-checkpoint.js.map +1 -0
  368. package/dist/core/config/positional-value.js +4 -2
  369. package/dist/core/config/positional-value.js.map +1 -1
  370. package/dist/core/diagnostics/remediation.d.ts +73 -0
  371. package/dist/core/diagnostics/remediation.js +328 -0
  372. package/dist/core/diagnostics/remediation.js.map +1 -0
  373. package/dist/core/extensions/extension-hook-runtime.js +9 -2
  374. package/dist/core/extensions/extension-hook-runtime.js.map +1 -1
  375. package/dist/core/extensions/extension-types.d.ts +60 -4
  376. package/dist/core/extensions/extension-types.js +2 -2
  377. package/dist/core/extensions/extension-types.js.map +1 -1
  378. package/dist/core/extensions/index.d.ts +5 -1
  379. package/dist/core/extensions/index.js +61 -2
  380. package/dist/core/extensions/index.js.map +1 -1
  381. package/dist/core/extensions/item-fields.d.ts +5 -1
  382. package/dist/core/extensions/item-fields.js +126 -4
  383. package/dist/core/extensions/item-fields.js.map +1 -1
  384. package/dist/core/extensions/loader.js +283 -8
  385. package/dist/core/extensions/loader.js.map +1 -1
  386. package/dist/core/item/item-format.d.ts +3 -2
  387. package/dist/core/item/item-format.js +15 -10
  388. package/dist/core/item/item-format.js.map +1 -1
  389. package/dist/core/item/status-filter.d.ts +29 -0
  390. package/dist/core/item/status-filter.js +97 -0
  391. package/dist/core/item/status-filter.js.map +1 -0
  392. package/dist/core/item/type-registry.js +4 -2
  393. package/dist/core/item/type-registry.js.map +1 -1
  394. package/dist/core/output/output.js +17 -5
  395. package/dist/core/output/output.js.map +1 -1
  396. package/dist/core/schema/item-types-file.d.ts +15 -0
  397. package/dist/core/schema/item-types-file.js +27 -2
  398. package/dist/core/schema/item-types-file.js.map +1 -1
  399. package/dist/core/schema/runtime-field-filters.js +4 -3
  400. package/dist/core/schema/runtime-field-filters.js.map +1 -1
  401. package/dist/core/schema/runtime-field-values.d.ts +1 -1
  402. package/dist/core/schema/runtime-field-values.js +10 -4
  403. package/dist/core/schema/runtime-field-values.js.map +1 -1
  404. package/dist/core/schema/runtime-schema.js +75 -2
  405. package/dist/core/schema/runtime-schema.js.map +1 -1
  406. package/dist/core/schema/status-defs-file.d.ts +113 -0
  407. package/dist/core/schema/status-defs-file.js +260 -0
  408. package/dist/core/schema/status-defs-file.js.map +1 -0
  409. package/dist/core/schema/type-workflows.d.ts +64 -0
  410. package/dist/core/schema/type-workflows.js +98 -0
  411. package/dist/core/schema/type-workflows.js.map +1 -0
  412. package/dist/core/search/cache.d.ts +3 -1
  413. package/dist/core/search/cache.js +104 -28
  414. package/dist/core/search/cache.js.map +1 -1
  415. package/dist/core/search/http-client.d.ts +2 -2
  416. package/dist/core/search/http-client.js +2 -2
  417. package/dist/core/search/http-client.js.map +1 -1
  418. package/dist/core/search/vector-stores.d.ts +1 -0
  419. package/dist/core/search/vector-stores.js +64 -14
  420. package/dist/core/search/vector-stores.js.map +1 -1
  421. package/dist/core/search/vectorization-metadata.d.ts +13 -0
  422. package/dist/core/search/vectorization-metadata.js +65 -0
  423. package/dist/core/search/vectorization-metadata.js.map +1 -0
  424. package/dist/core/shared/serialization.d.ts +1 -0
  425. package/dist/core/shared/serialization.js +86 -2
  426. package/dist/core/shared/serialization.js.map +1 -1
  427. package/dist/core/store/front-matter-cache.js +14 -5
  428. package/dist/core/store/front-matter-cache.js.map +1 -1
  429. package/dist/core/store/item-store.d.ts +2 -0
  430. package/dist/core/store/item-store.js +61 -6
  431. package/dist/core/store/item-store.js.map +1 -1
  432. package/dist/core/store/settings-validator.js +18 -2
  433. package/dist/core/store/settings-validator.js.map +1 -1
  434. package/dist/core/store/settings.js +40 -5
  435. package/dist/core/store/settings.js.map +1 -1
  436. package/dist/core/telemetry/consent.js +3 -3
  437. package/dist/core/telemetry/consent.js.map +1 -1
  438. package/dist/core/telemetry/observability.js +4 -3
  439. package/dist/core/telemetry/observability.js.map +1 -1
  440. package/dist/mcp/server.js +221 -12
  441. package/dist/mcp/server.js.map +1 -1
  442. package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -2
  443. package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
  444. package/dist/sdk/cli-contracts/commander-types.js +7 -2
  445. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  446. package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
  447. package/dist/sdk/cli-contracts/enum-contracts.js +4 -2
  448. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  449. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -0
  450. package/dist/sdk/cli-contracts/tool-option-contracts.js +53 -3
  451. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  452. package/dist/sdk/cli-contracts/tool-parameter-tables.js +35 -6
  453. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  454. package/dist/sdk/cli-contracts.d.ts +19 -1
  455. package/dist/sdk/cli-contracts.js +187 -15
  456. package/dist/sdk/cli-contracts.js.map +1 -1
  457. package/dist/sdk/errors.d.ts +22 -0
  458. package/dist/sdk/errors.js +46 -0
  459. package/dist/sdk/errors.js.map +1 -0
  460. package/dist/sdk/index.d.ts +2 -1
  461. package/dist/sdk/index.js +3 -2
  462. package/dist/sdk/index.js.map +1 -1
  463. package/dist/sdk/package-import-adapters.js +14 -3
  464. package/dist/sdk/package-import-adapters.js.map +1 -1
  465. package/dist/sdk/runtime.d.ts +1 -0
  466. package/dist/sdk/runtime.js +3 -2
  467. package/dist/sdk/runtime.js.map +1 -1
  468. package/dist/sdk/testing.d.ts +77 -0
  469. package/dist/sdk/testing.js +239 -0
  470. package/dist/sdk/testing.js.map +1 -0
  471. package/dist/types.d.ts +19 -0
  472. package/dist/types.js +3 -2
  473. package/dist/types.js.map +1 -1
  474. package/docs/AGENT_GUIDE.md +21 -2
  475. package/docs/COMMANDS.md +85 -5
  476. package/docs/CONFIGURATION.md +49 -2
  477. package/docs/EXTENSIONS.md +118 -6
  478. package/docs/QUICKSTART.md +2 -0
  479. package/docs/RELEASING.md +2 -2
  480. package/docs/SDK.md +273 -1
  481. package/docs/TESTING.md +17 -0
  482. package/docs/examples/policy-restricted-extension/manifest.json +1 -0
  483. package/docs/examples/starter-extension/index.js +9 -1
  484. package/docs/examples/starter-extension/manifest.json +1 -0
  485. package/package.json +12 -6
  486. package/packages/pm-beads/extensions/beads/index.js +2 -4
  487. package/packages/pm-beads/extensions/beads/index.ts +43 -33
  488. package/packages/pm-beads/extensions/beads/manifest.json +12 -1
  489. package/packages/pm-calendar/README.md +6 -0
  490. package/packages/pm-calendar/extensions/calendar/index.js +6 -1
  491. package/packages/pm-calendar/extensions/calendar/index.ts +6 -1
  492. package/packages/pm-calendar/extensions/calendar/manifest.json +6 -1
  493. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +6 -1
  494. package/packages/pm-guide-shell/README.md +4 -0
  495. package/packages/pm-guide-shell/extensions/guide-shell/index.js +22 -0
  496. package/packages/pm-guide-shell/extensions/guide-shell/index.ts +22 -0
  497. package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +6 -1
  498. package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +74 -3
  499. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +84 -4
  500. package/packages/pm-lifecycle-hooks/README.md +29 -0
  501. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +18 -0
  502. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +20 -0
  503. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +9 -0
  504. package/packages/pm-lifecycle-hooks/package.json +52 -0
  505. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +13 -1
  506. package/packages/pm-search-advanced/extensions/search-advanced/index.js +69 -1
  507. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +91 -2
  508. package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +13 -1
  509. package/packages/pm-templates/extensions/templates/manifest.json +6 -1
  510. package/packages/pm-todos/extensions/todos/index.js +3 -7
  511. package/packages/pm-todos/extensions/todos/index.ts +55 -42
  512. package/packages/pm-todos/extensions/todos/manifest.json +13 -1
  513. package/scripts/bundle-cli.mjs +121 -17
  514. package/dist/cli-bundle/chunks/activity-OWYSUZOY.js +0 -17
  515. package/dist/cli-bundle/chunks/chunk-3M73P3G6.js.map +0 -7
  516. package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js +0 -189
  517. package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js.map +0 -7
  518. package/dist/cli-bundle/chunks/chunk-5HSEP75M.js.map +0 -7
  519. package/dist/cli-bundle/chunks/chunk-6HT2F4TK.js.map +0 -7
  520. package/dist/cli-bundle/chunks/chunk-7Y53ZJIQ.js.map +0 -7
  521. package/dist/cli-bundle/chunks/chunk-BUPWJ3IJ.js.map +0 -7
  522. package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js +0 -47
  523. package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js.map +0 -7
  524. package/dist/cli-bundle/chunks/chunk-FM26RGSU.js +0 -56
  525. package/dist/cli-bundle/chunks/chunk-FM26RGSU.js.map +0 -7
  526. package/dist/cli-bundle/chunks/chunk-FQE6XZDB.js.map +0 -7
  527. package/dist/cli-bundle/chunks/chunk-GN7IJPCD.js.map +0 -7
  528. package/dist/cli-bundle/chunks/chunk-JTWRXG4B.js.map +0 -7
  529. package/dist/cli-bundle/chunks/chunk-JULRTHJQ.js.map +0 -7
  530. package/dist/cli-bundle/chunks/chunk-LSXGH6NE.js.map +0 -7
  531. package/dist/cli-bundle/chunks/chunk-MD7K4JYF.js.map +0 -7
  532. package/dist/cli-bundle/chunks/chunk-OGZEG5TT.js.map +0 -7
  533. package/dist/cli-bundle/chunks/chunk-P53TN6IA.js.map +0 -7
  534. package/dist/cli-bundle/chunks/chunk-PXUAZUUY.js.map +0 -7
  535. package/dist/cli-bundle/chunks/chunk-U7FMKRXH.js.map +0 -7
  536. package/dist/cli-bundle/chunks/chunk-VGICHR7D.js +0 -141
  537. package/dist/cli-bundle/chunks/chunk-VGICHR7D.js.map +0 -7
  538. package/dist/cli-bundle/chunks/chunk-WDPXDQFG.js.map +0 -7
  539. package/dist/cli-bundle/chunks/close-XY4CSAYF.js +0 -14
  540. package/dist/cli-bundle/chunks/config-V3FZOKLI.js.map +0 -7
  541. package/dist/cli-bundle/chunks/contracts-YLMH33VU.js.map +0 -7
  542. package/dist/cli-bundle/chunks/create-PZVHRIZQ.js +0 -28
  543. package/dist/cli-bundle/chunks/get-LTK3HOCQ.js.map +0 -7
  544. package/dist/cli-bundle/chunks/health-TCWL55KM.js.map +0 -7
  545. package/dist/cli-bundle/chunks/history-A2JUDXUE.js +0 -21
  546. package/dist/cli-bundle/chunks/history-redact-ED6RFCPL.js +0 -20
  547. package/dist/cli-bundle/chunks/init-M2WUB4YH.js +0 -16
  548. package/dist/cli-bundle/chunks/list-OGWQPC26.js +0 -20
  549. package/dist/cli-bundle/chunks/register-list-query-UP3VRUFS.js.map +0 -7
  550. package/dist/cli-bundle/chunks/register-mutation-YWSBF545.js.map +0 -7
  551. package/dist/cli-bundle/chunks/register-operations-3BDTGSDH.js.map +0 -7
  552. package/dist/cli-bundle/chunks/restore-MB2ISME7.js +0 -18
  553. package/dist/cli-bundle/chunks/schema-Q622KC46.js +0 -119
  554. package/dist/cli-bundle/chunks/schema-Q622KC46.js.map +0 -7
  555. package/dist/cli-bundle/chunks/search-HENBL456.js.map +0 -7
  556. package/dist/cli-bundle/chunks/test-VNBDRJ4Z.js +0 -32
  557. package/dist/cli-bundle/chunks/update-H6SCWNMA.js +0 -22
  558. package/dist/cli-bundle/chunks/update-many-46HRSP2Q.js.map +0 -7
  559. package/dist/cli-bundle/chunks/validate-TMCVKIGZ.js.map +0 -7
  560. /package/dist/cli-bundle/chunks/{activity-OWYSUZOY.js.map → activity-P5BUMWP3.js.map} +0 -0
  561. /package/dist/cli-bundle/chunks/{aggregate-ADUOSFRO.js.map → aggregate-OOAGKWRG.js.map} +0 -0
  562. /package/dist/cli-bundle/chunks/{chunk-G57E5D7T.js.map → chunk-ATBVS6WW.js.map} +0 -0
  563. /package/dist/cli-bundle/chunks/{chunk-KBQY3YG5.js.map → chunk-BNL6S7QH.js.map} +0 -0
  564. /package/dist/cli-bundle/chunks/{chunk-NGN7UV5K.js.map → chunk-CJDQB2ED.js.map} +0 -0
  565. /package/dist/cli-bundle/chunks/{chunk-D7AOMPRH.js.map → chunk-D3WUNETC.js.map} +0 -0
  566. /package/dist/cli-bundle/chunks/{chunk-L2FXEKDB.js.map → chunk-JB4RGL4V.js.map} +0 -0
  567. /package/dist/cli-bundle/chunks/{chunk-SEXQN4KL.js.map → chunk-K47WAYQV.js.map} +0 -0
  568. /package/dist/cli-bundle/chunks/{chunk-CEFIVZPG.js.map → chunk-KA24HME7.js.map} +0 -0
  569. /package/dist/cli-bundle/chunks/{chunk-A7E7PUVX.js.map → chunk-LDJK7SHN.js.map} +0 -0
  570. /package/dist/cli-bundle/chunks/{chunk-PVNQLCIS.js.map → chunk-RANZIID5.js.map} +0 -0
  571. /package/dist/cli-bundle/chunks/{chunk-JFWUHHS2.js.map → chunk-S3CV7JGJ.js.map} +0 -0
  572. /package/dist/cli-bundle/chunks/{chunk-LRBOHPUE.js.map → chunk-WIKR7KFL.js.map} +0 -0
  573. /package/dist/cli-bundle/chunks/{chunk-AKOOMO3T.js.map → chunk-XX5LRINW.js.map} +0 -0
  574. /package/dist/cli-bundle/chunks/{chunk-WJ2NAC37.js.map → chunk-Y2AKE2HS.js.map} +0 -0
  575. /package/dist/cli-bundle/chunks/{close-XY4CSAYF.js.map → close-RMHQ3KWH.js.map} +0 -0
  576. /package/dist/cli-bundle/chunks/{create-PZVHRIZQ.js.map → create-ATONSAZW.js.map} +0 -0
  577. /package/dist/cli-bundle/chunks/{extension-B4WL7BQU.js.map → extension-G6UXSM5S.js.map} +0 -0
  578. /package/dist/cli-bundle/chunks/{gc-JWNF66EC.js.map → gc-QNBRJG6H.js.map} +0 -0
  579. /package/dist/cli-bundle/chunks/{history-A2JUDXUE.js.map → history-6FC4H6HI.js.map} +0 -0
  580. /package/dist/cli-bundle/chunks/{history-redact-ED6RFCPL.js.map → history-redact-XKYEZDBL.js.map} +0 -0
  581. /package/dist/cli-bundle/chunks/{init-M2WUB4YH.js.map → init-KHX3FEEM.js.map} +0 -0
  582. /package/dist/cli-bundle/chunks/{list-OGWQPC26.js.map → list-53LZ2AEO.js.map} +0 -0
  583. /package/dist/cli-bundle/chunks/{restore-MB2ISME7.js.map → restore-JL5QIH7H.js.map} +0 -0
  584. /package/dist/cli-bundle/chunks/{test-VNBDRJ4Z.js.map → test-RJ4ZF35X.js.map} +0 -0
  585. /package/dist/cli-bundle/chunks/{test-runs-GX5HTPSF.js.map → test-runs-L2M7WKH7.js.map} +0 -0
  586. /package/dist/cli-bundle/chunks/{update-H6SCWNMA.js.map → update-PYLVHMRD.js.map} +0 -0
@@ -0,0 +1,239 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c24c8d31-1b90-5be3-945a-d650f99d71a4")}catch(e){}}();
3
+ import { activateExtensions } from "../core/extensions/loader.js";
4
+ import { createDefaultExtensionGovernancePolicy } from "../core/extensions/extension-types.js";
5
+ const HOOK_KIND_TO_REGISTRY_FIELD = {
6
+ before_command: "beforeCommand",
7
+ after_command: "afterCommand",
8
+ on_read: "onRead",
9
+ on_write: "onWrite",
10
+ on_index: "onIndex",
11
+ };
12
+ function normalizeSdkIdentifier(value) {
13
+ return value.trim().toLowerCase();
14
+ }
15
+ function extensionNameSuffix(extensionName) {
16
+ return extensionName ? ` from extension "${extensionName}"` : "";
17
+ }
18
+ function sortedUnique(values) {
19
+ return [...new Set(values)].sort((left, right) => left.localeCompare(right));
20
+ }
21
+ function normalizeSdkCommandName(command) {
22
+ return command
23
+ .trim()
24
+ .toLowerCase()
25
+ .split(/\s+/)
26
+ .filter((part) => part.length > 0)
27
+ .join(" ");
28
+ }
29
+ function formatAvailable(values) {
30
+ return values.length > 0 ? values.join(", ") : "(none)";
31
+ }
32
+ function collectFlagLabels(flags) {
33
+ const labels = new Set();
34
+ for (const flag of flags) {
35
+ if (typeof flag.long === "string" && flag.long.trim().length > 0) {
36
+ labels.add(flag.long.trim());
37
+ }
38
+ if (typeof flag.short === "string" && flag.short.trim().length > 0) {
39
+ labels.add(flag.short.trim());
40
+ }
41
+ }
42
+ return labels;
43
+ }
44
+ function readTestExtensionManifest(module) {
45
+ if (module && typeof module === "object") {
46
+ const testModule = module;
47
+ const manifest = testModule.manifest;
48
+ if (manifest && typeof manifest === "object") {
49
+ return manifest;
50
+ }
51
+ const defaultExport = testModule.default;
52
+ const defaultManifest = defaultExport?.manifest;
53
+ if (defaultManifest && typeof defaultManifest === "object") {
54
+ return defaultManifest;
55
+ }
56
+ if (defaultExport && typeof defaultExport === "object" && ("name" in defaultExport || "capabilities" in defaultExport)) {
57
+ return defaultExport;
58
+ }
59
+ if ("name" in testModule || "capabilities" in testModule) {
60
+ return testModule;
61
+ }
62
+ }
63
+ return {};
64
+ }
65
+ function readTestExtensionCapabilities(manifest, options) {
66
+ if (Array.isArray(options.capabilities)) {
67
+ return [...options.capabilities];
68
+ }
69
+ if (Array.isArray(manifest.capabilities)) {
70
+ return manifest.capabilities.filter((capability) => typeof capability === "string");
71
+ }
72
+ return [];
73
+ }
74
+ /**
75
+ * Activate one in-memory extension module for package tests.
76
+ *
77
+ * This uses pm's real registration validation and activation engine while
78
+ * avoiding private loader imports, filesystem manifests, or workspace setup.
79
+ */
80
+ export async function activateExtensionForTest(module, options = {}) {
81
+ const manifest = readTestExtensionManifest(module);
82
+ const name = options.name ??
83
+ (typeof manifest.name === "string" && manifest.name.trim().length > 0 ? manifest.name.trim() : "test-extension");
84
+ const layer = options.layer ?? "project";
85
+ const capabilities = readTestExtensionCapabilities(manifest, options);
86
+ return activateExtensions({
87
+ disabled_by_flag: false,
88
+ roots: { global: "", project: "" },
89
+ configured_enabled: [],
90
+ configured_disabled: [],
91
+ discovered: [],
92
+ effective: [],
93
+ warnings: [],
94
+ policy: options.policy ?? createDefaultExtensionGovernancePolicy(),
95
+ failed: [],
96
+ loaded: [
97
+ {
98
+ layer,
99
+ directory: "",
100
+ manifest_path: "",
101
+ name,
102
+ version: typeof manifest.version === "string" ? manifest.version : "0.0.0",
103
+ entry: typeof manifest.entry === "string" ? manifest.entry : "./index.js",
104
+ priority: typeof manifest.priority === "number" ? manifest.priority : 0,
105
+ entry_path: "",
106
+ capabilities,
107
+ manifest_version: typeof manifest.manifest_version === "number" ? manifest.manifest_version : undefined,
108
+ pm_min_version: typeof manifest.pm_min_version === "string" ? manifest.pm_min_version : undefined,
109
+ pm_max_version: typeof manifest.pm_max_version === "string" ? manifest.pm_max_version : undefined,
110
+ engines: manifest.engines,
111
+ trusted: manifest.trusted,
112
+ provenance: manifest.provenance,
113
+ sandbox_profile: manifest.sandbox_profile,
114
+ permissions: manifest.permissions,
115
+ activation: manifest.activation,
116
+ module,
117
+ },
118
+ ],
119
+ });
120
+ }
121
+ /**
122
+ * Assert that an activated extension registration registry contains a command
123
+ * contract with the expected public metadata.
124
+ */
125
+ export function assertRegisteredCommandContract(registrations, expectation) {
126
+ const expectedCommand = normalizeSdkCommandName(expectation.command);
127
+ if (expectedCommand.length === 0) {
128
+ throw new Error("Expected command name must be a non-empty string");
129
+ }
130
+ const commandCandidates = registrations.commands.filter((entry) => entry.command === expectedCommand);
131
+ const command = expectation.extensionName
132
+ ? commandCandidates.find((entry) => entry.name === expectation.extensionName)
133
+ : commandCandidates[0];
134
+ if (!command) {
135
+ const available = registrations.commands.map((entry) => entry.command).sort((left, right) => left.localeCompare(right));
136
+ const extensionSuffix = expectation.extensionName ? ` from extension "${expectation.extensionName}"` : "";
137
+ throw new Error(`Expected extension command "${expectedCommand}"${extensionSuffix} to be registered. Available commands: ${formatAvailable(available)}`);
138
+ }
139
+ if (expectation.action !== undefined && command.action !== expectation.action) {
140
+ throw new Error(`Expected extension command "${expectedCommand}" action "${expectation.action}", received "${command.action}"`);
141
+ }
142
+ if (expectation.arguments !== undefined) {
143
+ const actualArguments = (command.arguments ?? []).map((argument) => argument.name);
144
+ const missingArguments = expectation.arguments.filter((argument) => !actualArguments.includes(argument));
145
+ if (missingArguments.length > 0) {
146
+ throw new Error(`Expected extension command "${expectedCommand}" arguments ${formatAvailable(expectation.arguments)}; missing ${formatAvailable(missingArguments)}; available ${formatAvailable(actualArguments)}`);
147
+ }
148
+ }
149
+ const flags = registrations.flags
150
+ .filter((entry) => entry.target_command === expectedCommand &&
151
+ (expectation.extensionName === undefined || entry.name === expectation.extensionName))
152
+ .flatMap((entry) => entry.flags);
153
+ if (expectation.flags !== undefined) {
154
+ const actualFlagLabels = collectFlagLabels(flags);
155
+ const missingFlags = expectation.flags.filter((flag) => !actualFlagLabels.has(flag));
156
+ if (missingFlags.length > 0) {
157
+ throw new Error(`Expected extension command "${expectedCommand}" flags ${formatAvailable(expectation.flags)}; missing ${formatAvailable(missingFlags)}; available ${formatAvailable([...actualFlagLabels].sort((left, right) => left.localeCompare(right)))}`);
158
+ }
159
+ }
160
+ return { command, flags };
161
+ }
162
+ /**
163
+ * Assert that an activated extension hook registry contains a hook of the
164
+ * expected lifecycle kind (optionally scoped to a specific extension).
165
+ *
166
+ * Hooks are surfaced via `ExtensionActivationResult.hooks`, not the command
167
+ * registration registry, so this helper accepts an `ExtensionHookRegistry`.
168
+ */
169
+ export function assertRegisteredHook(hooks, expectation) {
170
+ const field = HOOK_KIND_TO_REGISTRY_FIELD[expectation.kind];
171
+ const candidates = hooks[field];
172
+ const hook = expectation.extensionName
173
+ ? candidates.find((entry) => entry.name === expectation.extensionName)
174
+ : candidates[0];
175
+ if (!hook) {
176
+ const available = sortedUnique(candidates.map((entry) => entry.name));
177
+ throw new Error(`Expected a "${expectation.kind}" hook${extensionNameSuffix(expectation.extensionName)} to be registered. Available "${expectation.kind}" hooks: ${formatAvailable(available)}`);
178
+ }
179
+ return hook;
180
+ }
181
+ /**
182
+ * Assert that an activated extension registration registry contains a search
183
+ * provider with the expected name (optionally scoped to a specific extension).
184
+ */
185
+ export function assertRegisteredSearchProvider(registrations, expectation) {
186
+ const expectedProvider = normalizeSdkIdentifier(expectation.provider);
187
+ if (expectedProvider.length === 0) {
188
+ throw new Error("Expected search provider name must be a non-empty string");
189
+ }
190
+ const candidates = registrations.search_providers.filter((entry) => normalizeSdkIdentifier(entry.definition.name) === expectedProvider);
191
+ const provider = expectation.extensionName
192
+ ? candidates.find((entry) => entry.name === expectation.extensionName)
193
+ : candidates[0];
194
+ if (!provider) {
195
+ const available = sortedUnique(registrations.search_providers.map((entry) => entry.definition.name));
196
+ throw new Error(`Expected search provider "${expectedProvider}"${extensionNameSuffix(expectation.extensionName)} to be registered. Available search providers: ${formatAvailable(available)}`);
197
+ }
198
+ return provider;
199
+ }
200
+ /**
201
+ * Assert that an activated extension registration registry contains an importer
202
+ * for the expected format/name (optionally scoped to a specific extension).
203
+ */
204
+ export function assertRegisteredImporter(registrations, expectation) {
205
+ const expectedImporter = normalizeSdkIdentifier(expectation.importer);
206
+ if (expectedImporter.length === 0) {
207
+ throw new Error("Expected importer name must be a non-empty string");
208
+ }
209
+ const candidates = registrations.importers.filter((entry) => normalizeSdkIdentifier(entry.importer) === expectedImporter);
210
+ const importer = expectation.extensionName
211
+ ? candidates.find((entry) => entry.name === expectation.extensionName)
212
+ : candidates[0];
213
+ if (!importer) {
214
+ const available = sortedUnique(registrations.importers.map((entry) => entry.importer));
215
+ throw new Error(`Expected importer "${expectedImporter}"${extensionNameSuffix(expectation.extensionName)} to be registered. Available importers: ${formatAvailable(available)}`);
216
+ }
217
+ return importer;
218
+ }
219
+ /**
220
+ * Assert that an activated extension registration registry contains an exporter
221
+ * for the expected format/name (optionally scoped to a specific extension).
222
+ */
223
+ export function assertRegisteredExporter(registrations, expectation) {
224
+ const expectedExporter = normalizeSdkIdentifier(expectation.exporter);
225
+ if (expectedExporter.length === 0) {
226
+ throw new Error("Expected exporter name must be a non-empty string");
227
+ }
228
+ const candidates = registrations.exporters.filter((entry) => normalizeSdkIdentifier(entry.exporter) === expectedExporter);
229
+ const exporter = expectation.extensionName
230
+ ? candidates.find((entry) => entry.name === expectation.extensionName)
231
+ : candidates[0];
232
+ if (!exporter) {
233
+ const available = sortedUnique(registrations.exporters.map((entry) => entry.exporter));
234
+ throw new Error(`Expected exporter "${expectedExporter}"${extensionNameSuffix(expectation.extensionName)} to be registered. Available exporters: ${formatAvailable(available)}`);
235
+ }
236
+ return exporter;
237
+ }
238
+ //# sourceMappingURL=testing.js.map
239
+ //# debugId=c24c8d31-1b90-5be3-945a-d650f99d71a4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.js","sources":["sdk/testing.ts"],"sourceRoot":"/","sourcesContent":["import type {\n ExtensionActivationResult,\n ExtensionCapability,\n ExtensionGovernancePolicy,\n ExtensionHookRegistry,\n ExtensionLayer,\n ExtensionManifest,\n ExtensionRegistrationRegistry,\n FlagDefinition,\n RegisteredExtensionCommandDefinition,\n RegisteredExtensionExporter,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionSearchProvider,\n} from \"../core/extensions/loader.js\";\nimport { activateExtensions } from \"../core/extensions/loader.js\";\nimport { createDefaultExtensionGovernancePolicy } from \"../core/extensions/extension-types.js\";\n\ninterface TestExtensionModule {\n manifest?: Partial<ExtensionManifest>;\n activate?: unknown;\n default?: TestExtensionModule;\n}\n\nexport interface ActivateExtensionForTestOptions {\n name?: string;\n layer?: ExtensionLayer;\n capabilities?: readonly ExtensionCapability[];\n policy?: ExtensionGovernancePolicy;\n}\n\nexport interface RegisteredCommandContractExpectation {\n command: string;\n action?: string;\n extensionName?: string;\n arguments?: string[];\n flags?: string[];\n}\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\nexport interface RegisteredHookExpectation {\n kind: RegisteredHookKind;\n extensionName?: string;\n}\n\nexport interface RegisteredSearchProviderExpectation {\n provider: string;\n extensionName?: string;\n}\n\nexport interface RegisteredImporterExpectation {\n importer: string;\n extensionName?: string;\n}\n\nexport interface RegisteredExporterExpectation {\n exporter: string;\n extensionName?: string;\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 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 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 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"],"names":[],"mappings":";;AAeA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,sCAAsC,EAAE,MAAM,uCAAuC,CAAC;AAiC/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;AAsBF,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,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CA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ressi
39
39
  export type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];
40
40
  export declare const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES: readonly ["off", "warn", "strict"];
41
41
  export type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];
42
+ export declare const GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES: readonly ["off", "warn", "strict"];
43
+ export type GovernanceWorkflowEnforcement = (typeof GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES)[number];
42
44
  export declare const VALIDATE_METADATA_REQUIRED_FIELD_VALUES: readonly ["author", "acceptance_criteria", "estimated_minutes", "close_reason", "reviewer", "risk", "confidence", "sprint", "release"];
43
45
  export type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];
44
46
  export declare const RECURRENCE_FREQUENCY_VALUES: readonly ["daily", "weekly", "monthly", "yearly"];
@@ -253,12 +255,23 @@ export interface RuntimeSchemaFileConfig {
253
255
  fields?: string;
254
256
  workflows?: string;
255
257
  }
258
+ /**
259
+ * Per-type allowed-transition rule. A type with no matching entry is
260
+ * unrestricted; a type with an entry allows only the listed [from, to]
261
+ * status pairs (status tokens are resolved case-insensitively through the
262
+ * status registry alias map; a same-status no-op is always allowed).
263
+ */
264
+ export interface TypeWorkflowDefinition {
265
+ type: string;
266
+ allowed_transitions: [string, string][];
267
+ }
256
268
  export interface RuntimeSchemaSettings {
257
269
  version: number;
258
270
  files: RuntimeSchemaFileConfig;
259
271
  statuses: RuntimeStatusDefinition[];
260
272
  fields: RuntimeFieldDefinition[];
261
273
  workflow: RuntimeWorkflowDefinition;
274
+ type_workflows?: TypeWorkflowDefinition[];
262
275
  unknown_field_policy: RuntimeUnknownFieldPolicy;
263
276
  }
264
277
  export interface ItemTestRunSummary {
@@ -400,6 +413,12 @@ export interface GovernanceSettings {
400
413
  metadata_profile: ValidateMetadataProfile;
401
414
  force_required_for_stale_lock: boolean;
402
415
  create_default_type?: string;
416
+ /**
417
+ * Per-type allowed-transition enforcement mode for `pm update --status`.
418
+ * Read raw from settings (not preset-derived) so existing projects are
419
+ * unaffected when unset; defaults to "off".
420
+ */
421
+ workflow_enforcement?: GovernanceWorkflowEnforcement;
403
422
  }
404
423
  export type ExtensionPolicyMode = "off" | "warn" | "enforce";
405
424
  export type ExtensionTrustMode = "off" | "warn" | "enforce";
package/dist/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d9b0e8e1-faef-5e56-a8a2-fd71d00a97ae")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="dd045bd8-53d3-51f9-8e24-1905c0ed6413")}catch(e){}}();
3
3
  export const BUILTIN_ITEM_TYPE_VALUES = [
4
4
  "Epic",
5
5
  "Feature",
@@ -63,6 +63,7 @@ export const GOVERNANCE_PRESET_VALUES = ["minimal", "default", "strict", "custom
63
63
  export const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = ["none", "warn", "strict"];
64
64
  export const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = ["progressive", "strict"];
65
65
  export const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = ["off", "warn", "strict"];
66
+ export const GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES = ["off", "warn", "strict"];
66
67
  export const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [
67
68
  "author",
68
69
  "acceptance_criteria",
@@ -125,4 +126,4 @@ export const CONTEXT_SECTION_VALUES = [
125
126
  "tests",
126
127
  ];
127
128
  //# sourceMappingURL=types.js.map
128
- //# debugId=d9b0e8e1-faef-5e56-a8a2-fd71d00a97ae
129
+ //# debugId=dd045bd8-53d3-51f9-8e24-1905c0ed6413
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["types.ts"],"sourceRoot":"/","sourcesContent":["export 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;\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\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;\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;\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\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;\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\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;\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_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;\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\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\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\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\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface Reminder {\n at: string;\n text: string;\n}\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\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;\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;\nexport type PlanStepStatus = (typeof PLAN_STEP_STATUS_VALUES)[number];\n\nexport const PLAN_HARNESS_VALUES = [\"codex\", \"claude-code\", \"cursor\", \"generic\"] as const;\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;\nexport type PlanStepLinkKind = (typeof PLAN_STEP_LINK_KIND_VALUES)[number];\n\nexport interface PlanStepLink {\n id: string;\n kind: PlanStepLinkKind;\n note?: string;\n required_before_step?: boolean;\n}\n\nexport interface PlanStepFile {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\n\nexport interface PlanStepTest {\n command?: string;\n path?: string;\n note?: string;\n}\n\nexport interface PlanStepDoc {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\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\nexport interface PlanDecision {\n ts: string;\n author: string;\n decision: string;\n rationale?: string;\n evidence?: string;\n step_id?: string;\n}\n\nexport interface PlanDiscovery {\n ts: string;\n author: string;\n text: string;\n step_id?: string;\n}\n\nexport interface PlanValidationCheck {\n text: string;\n command?: string;\n expected?: string;\n}\n\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\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\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\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\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\nexport interface RuntimeSchemaFileConfig {\n types?: string;\n statuses?: string;\n fields?: string;\n workflows?: string;\n}\n\nexport interface RuntimeSchemaSettings {\n version: number;\n files: RuntimeSchemaFileConfig;\n statuses: RuntimeStatusDefinition[];\n fields: RuntimeFieldDefinition[];\n workflow: RuntimeWorkflowDefinition;\n unknown_field_policy: RuntimeUnknownFieldPolicy;\n}\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\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 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\nexport interface ItemDocument {\n metadata: ItemMetadata;\n body: string;\n}\n\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\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\"] as const;\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n force_required_for_stale_lock: boolean;\n create_default_type?: string;\n}\n\nexport type ExtensionPolicyMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionTrustMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionSandboxProfile = \"none\" | \"restricted\" | \"strict\";\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\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\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\nexport type SearchMutationRefreshPolicy = \"cache_only\" | \"semantic_configured\" | \"semantic_auto\";\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 output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\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 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_batch_size: number;\n embedding_timeout_ms: number;\n scanner_max_batch_retries: number;\n provider?: string;\n mutation_refresh_policy: SearchMutationRefreshPolicy;\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 qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"],"names":[],"mappings":";;AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,OAAO;IACP,UAAU;IACV,OAAO;IACP,UAA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MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO;IACP,UAAU;IACV,QAAQ;IACR,UAAU;IACV,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;CACJ,CAAC;AAGX,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,SAAS;IACT,aAAa;IACb,WAAW;IACX,SAAS;IACT,SAAS;IACT,YAAY;CACJ,CAAC;AAGX,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAG1F,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,UAAU;IACV,YAAY;CACJ,CAAC;AA6QX,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,WAAW;IACX,UAAU;IACV,UAAU;IACV,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,OAAO;CACC,CAAC","debugId":"d9b0e8e1-faef-5e56-a8a2-fd71d00a97ae"}
1
+ {"version":3,"file":"types.js","sources":["types.ts"],"sourceRoot":"/","sourcesContent":["export 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;\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\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;\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;\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\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;\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\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;\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\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;\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\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\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\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\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface Reminder {\n at: string;\n text: string;\n}\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\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;\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;\nexport type PlanStepStatus = (typeof PLAN_STEP_STATUS_VALUES)[number];\n\nexport const PLAN_HARNESS_VALUES = [\"codex\", \"claude-code\", \"cursor\", \"generic\"] as const;\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;\nexport type PlanStepLinkKind = (typeof PLAN_STEP_LINK_KIND_VALUES)[number];\n\nexport interface PlanStepLink {\n id: string;\n kind: PlanStepLinkKind;\n note?: string;\n required_before_step?: boolean;\n}\n\nexport interface PlanStepFile {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\n\nexport interface PlanStepTest {\n command?: string;\n path?: string;\n note?: string;\n}\n\nexport interface PlanStepDoc {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\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\nexport interface PlanDecision {\n ts: string;\n author: string;\n decision: string;\n rationale?: string;\n evidence?: string;\n step_id?: string;\n}\n\nexport interface PlanDiscovery {\n ts: string;\n author: string;\n text: string;\n step_id?: string;\n}\n\nexport interface PlanValidationCheck {\n text: string;\n command?: string;\n expected?: string;\n}\n\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\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\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\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\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\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\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\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\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 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\nexport interface ItemDocument {\n metadata: ItemMetadata;\n body: string;\n}\n\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\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\"] as const;\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\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\nexport type ExtensionPolicyMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionTrustMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionSandboxProfile = \"none\" | \"restricted\" | \"strict\";\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\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\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\nexport type SearchMutationRefreshPolicy = \"cache_only\" | \"semantic_configured\" | \"semantic_auto\";\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 output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\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 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_batch_size: number;\n embedding_timeout_ms: number;\n scanner_max_batch_retries: number;\n provider?: string;\n mutation_refresh_policy: SearchMutationRefreshPolicy;\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 qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"],"names":[],"mappings":";;AAAA,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;AAIzD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO;IACP,M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Q;IACR,UAAU;IACV,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;CACJ,CAAC;AAGX,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,SAAS;IACT,aAAa;IACb,WAAW;IACX,SAAS;IACT,SAAS;IACT,YAAY;CACJ,CAAC;AAGX,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAG1F,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,UAAU;IACV,YAAY;CACJ,CAAC;AAyRX,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,WAAW;IACX,UAAU;IACV,UAAU;IACV,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,OAAO;CACC,CAAC","debugId":"dd045bd8-53d3-51f9-8e24-1905c0ed6413"}
@@ -103,19 +103,26 @@ pm release <item-id>
103
103
  |------|---------|
104
104
  | Next work and agenda | `pm context --limit 10` |
105
105
  | Relevant items | `pm search "<keywords>" --limit 10` |
106
+ | Open work only | `pm search "<keywords>" --status open` (drops closed-history noise; did-you-mean on typos) |
107
+ | Items changed since last window | `pm list-all --updated-after <prev-run-ISO> --brief` (relative `-2h`/`-7d` also work) |
106
108
  | Single item | `pm get <id>` |
107
- | Exact machine payload | `pm get <id> --json` |
109
+ | Full machine payload | `pm get <id> --full --json` |
108
110
  | Command flags | `pm <command> --help --json` |
109
111
  | Low-noise machine contracts | `pm contracts --command <command> --flags-only --json` |
110
112
  | Timeline | `pm activity --id <id> --limit 20` |
111
113
  | Audited history redaction | `pm history-redact <id> --literal "<secret>" --replacement "[redacted]" --dry-run` |
112
114
  | Audited history re-anchor | `pm history-repair <id> --dry-run` (clears drift flagged by `pm health`/`pm validate`) |
113
115
  | Register custom item type | `pm schema add-type <Name> --description "<text>" --default-status open` (then `pm create <Name> "..."`) |
116
+ | Remove custom item type | `pm schema remove-type <Name>` (warns if items still use it; built-ins refused) |
117
+ | Register custom status | `pm schema add-status <id> --role <active\|terminal\|...> --alias <name> --order <n>` |
118
+ | Remove custom status | `pm schema remove-status <id>` (warns if items use it; built-in statuses refused) |
114
119
  | Agent plan create | `pm plan create --title "<scope>" --harness claude-code --scope "<short>" --claim` |
115
120
  | Agent plan step update | `pm plan update-step <plan-id> plan-step-001 --step-status in_progress --step-evidence "<short>"` |
116
121
  | Agent plan read | `pm plan show <plan-id> --depth brief` (or `--fields id,title,steps_summary`) |
117
122
  | Materialize plan steps | `pm plan materialize <plan-id> --steps plan-step-002 --materialize-type Task` |
118
123
  | Dependencies | `pm deps <id> --format tree` |
124
+ | Bulk update by id allowlist | `pm update-many --ids pm-a,pm-b --priority 1 --dry-run` (preview, then drop `--dry-run`) |
125
+ | Audited bulk close (sprint closeout) | `pm close-many --filter-sprint <s> --reason "<text>" --dry-run` (full `pm close` semantics per item; `--rollback <id>` to undo) |
119
126
  | Local docs routing | `pm install guide-shell --project`, then `pm guide <topic>` |
120
127
  | Compact mutation echo | `pm --no-changed-fields create "..."` (drops the redundant `changed_fields` array, keeps `changed_field_count`) |
121
128
 
@@ -154,6 +161,18 @@ Use these defaults unless the task requires otherwise:
154
161
  - `pm validate --check-resolution --check-history-drift` before closing broad work.
155
162
  - `pm history-redact <id> --dry-run` before rewriting sensitive history payloads, then rerun without `--dry-run` once scope is confirmed.
156
163
  - `pm history-repair <id> --dry-run` when `pm health` or `pm validate --check-history-drift` report drifted streams; it re-anchors the hash chain and reconciles with the on-disk item without touching item content. Rerun without `--dry-run` to apply.
157
- - `pm schema add-type <Name>` when `pm create`/`pm update` reject a project-specific type as invalid; it registers the type in `.agents/pm/schema/types.json` so `pm create <Name> "..."` works. Built-in types are reserved; the upsert is idempotent.
164
+ - `pm schema list` and `pm schema show <Type>` before creating custom-domain work; they show built-in, persisted custom, and extension-provided item types without reading schema files by hand.
165
+ - `pm schema add-type <Name>` when `pm create`/`pm update` reject a project-specific type as invalid; it registers the type in `.agents/pm/schema/types.json` so `pm create <Name> "..."` works. Built-in types are reserved; the upsert is idempotent. `pm schema remove-type <Name>` removes a custom type (warns, non-blocking, if items still use it).
166
+ - `pm schema add-status <id> --role <role>` / `pm schema remove-status <id>` manage custom lifecycle statuses in `.agents/pm/schema/statuses.json`; roles come from the runtime status-role vocabulary, the upsert is idempotent, and built-in default statuses cannot be removed. `pm schema list` now reports statuses (builtin vs custom) alongside types.
167
+ - `pm init --type-preset agile|ops|research` for new projects that should start with domain item types instead of generic tasks only.
158
168
  - `pm normalize --dry-run --json` before lifecycle metadata cleanups.
159
169
  - `pm health --check-only` when inspecting repository health without refresh side effects.
170
+
171
+ ## Self-Repair Remediation
172
+
173
+ When gating on `pm health` / `pm validate`, read the executable fix command from the output instead of hardcoding a warning-code-to-command mapping:
174
+
175
+ - `pm health --json` per-check `details.remediation_map` maps each warning-code prefix to a `pm` fix command (for example `{ "history_drift_missing_stream": "pm history-repair <id>" }`). It is present in default/`--full` output and omitted in `--brief`/`--summary`.
176
+ - `pm validate --fix-hints` (read-only) adds `details.fix_hints[]` to each failing check — a uniform list of executable `pm` commands for that check's findings.
177
+
178
+ Both draw from the same remediation registry, so an agent can substitute the concrete `<id>` and run the command to auto-repair findings. Extension health checks expose their remediation under `details.triage.remediation` instead. See [Command Reference](COMMANDS.md#self-repair-remediation).