@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
@@ -1,21 +1,18 @@
1
- import {
2
- acquireLock
3
- } from "./chunk-4AEZR5EJ.js";
4
1
  import {
5
2
  normalizeItemId,
6
3
  normalizeRawItemId
7
- } from "./chunk-CEFIVZPG.js";
4
+ } from "./chunk-KA24HME7.js";
8
5
  import {
9
6
  canonicalDocument,
10
7
  parseItemDocument,
11
8
  serializeItemDocument
12
- } from "./chunk-MD7K4JYF.js";
9
+ } from "./chunk-HPH6X4ZZ.js";
13
10
  import {
14
11
  resolveItemTypeRegistry
15
- } from "./chunk-WDPXDQFG.js";
12
+ } from "./chunk-4PJQSECJ.js";
16
13
  import {
17
14
  nowIso
18
- } from "./chunk-PVNQLCIS.js";
15
+ } from "./chunk-RANZIID5.js";
19
16
  import {
20
17
  EMPTY_CANONICAL_DOCUMENT,
21
18
  EXIT_CODE,
@@ -29,17 +26,217 @@ import {
29
26
  getHistoryPath,
30
27
  getItemFormatFromPath,
31
28
  getItemPath,
29
+ getLockPath,
32
30
  hasActiveOnReadHooks,
33
31
  orderObject,
34
32
  pathExists,
33
+ projectAfterCommandItemSnapshot,
34
+ recordAfterCommandAffectedItem,
35
35
  resolveGovernanceKnobs,
36
36
  runActiveOnReadHooks,
37
37
  runActiveOnWriteHooks,
38
38
  runActiveServiceOverride,
39
39
  sha256Hex,
40
40
  stableStringify,
41
+ toErrorMessage,
41
42
  writeFileAtomic
42
- } from "./chunk-LSXGH6NE.js";
43
+ } from "./chunk-SRVKTWPR.js";
44
+
45
+ // dist/core/extensions/item-fields.js
46
+ !(function() {
47
+ try {
48
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
49
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "60ed024d-4341-5166-bd9e-abed9b240b11");
50
+ } catch (e2) {
51
+ }
52
+ })();
53
+ var RESERVED_ITEM_FIELD_NAMES = new Set(FRONT_MATTER_KEY_ORDER);
54
+ function normalizeFieldName(value) {
55
+ if (typeof value !== "string") {
56
+ return null;
57
+ }
58
+ const normalized = value.trim();
59
+ return normalized.length > 0 ? normalized : null;
60
+ }
61
+ function normalizeFieldType(value) {
62
+ if (typeof value !== "string") {
63
+ return null;
64
+ }
65
+ const normalized = value.trim().toLowerCase();
66
+ if (normalized === "string" || normalized === "number" || normalized === "boolean" || normalized === "array" || normalized === "object") {
67
+ return normalized;
68
+ }
69
+ return null;
70
+ }
71
+ function cloneFieldValue(value) {
72
+ try {
73
+ return structuredClone(value);
74
+ } catch {
75
+ return value;
76
+ }
77
+ }
78
+ function parseFieldAssignment(raw) {
79
+ const trimmed = raw.trim();
80
+ const separatorIndex = trimmed.indexOf("=");
81
+ if (separatorIndex <= 0) {
82
+ throw new PmCliError(`--field entries must use name=value syntax, received: ${raw}`, EXIT_CODE.USAGE);
83
+ }
84
+ const key = trimmed.slice(0, separatorIndex).trim();
85
+ const value = trimmed.slice(separatorIndex + 1);
86
+ if (key.length === 0) {
87
+ throw new PmCliError("--field entries require a non-empty field name", EXIT_CODE.USAGE);
88
+ }
89
+ return { key, value };
90
+ }
91
+ function parseJsonFieldValue(raw, fieldName, expectedType) {
92
+ try {
93
+ const parsed = JSON.parse(raw);
94
+ if (expectedType === "array" && Array.isArray(parsed)) {
95
+ return parsed;
96
+ }
97
+ if (expectedType === "object" && typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
98
+ return parsed;
99
+ }
100
+ } catch {
101
+ }
102
+ throw new PmCliError(`--field ${fieldName}=... must be valid JSON ${expectedType}`, EXIT_CODE.USAGE);
103
+ }
104
+ function coerceRegisteredFieldValue(fieldName, fieldType, raw) {
105
+ if (fieldType === "string") {
106
+ return raw;
107
+ }
108
+ if (fieldType === "number") {
109
+ const trimmed = raw.trim();
110
+ if (trimmed.length === 0) {
111
+ throw new PmCliError(`--field ${fieldName}=... must be a number`, EXIT_CODE.USAGE);
112
+ }
113
+ const parsed = Number(trimmed);
114
+ if (!Number.isFinite(parsed)) {
115
+ throw new PmCliError(`--field ${fieldName}=... must be a number`, EXIT_CODE.USAGE);
116
+ }
117
+ return parsed;
118
+ }
119
+ if (fieldType === "boolean") {
120
+ const normalized = raw.trim().toLowerCase();
121
+ if (normalized === "true" || normalized === "1" || normalized === "yes") {
122
+ return true;
123
+ }
124
+ if (normalized === "false" || normalized === "0" || normalized === "no") {
125
+ return false;
126
+ }
127
+ throw new PmCliError(`--field ${fieldName}=... must be one of true|false|1|0|yes|no`, EXIT_CODE.USAGE);
128
+ }
129
+ return parseJsonFieldValue(raw, fieldName, fieldType);
130
+ }
131
+ function collectRegisteredFieldDefinitions(registrations) {
132
+ const definitions = /* @__PURE__ */ new Map();
133
+ if (!registrations) {
134
+ return definitions;
135
+ }
136
+ for (const registration of registrations.item_fields) {
137
+ for (const definition of registration.fields) {
138
+ const fieldName = normalizeFieldName(definition.name);
139
+ const fieldType = normalizeFieldType(definition.type);
140
+ if (!fieldName || !fieldType) {
141
+ continue;
142
+ }
143
+ const existing = definitions.get(fieldName);
144
+ if (existing && existing.type !== fieldType) {
145
+ throw new PmCliError(`Extension item field "${fieldName}" is declared with conflicting types: ${existing.type}, ${fieldType}`, EXIT_CODE.USAGE, {
146
+ code: "extension_item_field_type_conflict",
147
+ nextSteps: ["Make every active extension declaration for this field use the same type."]
148
+ });
149
+ }
150
+ definitions.set(fieldName, { name: fieldName, type: fieldType });
151
+ }
152
+ }
153
+ return definitions;
154
+ }
155
+ function assertNotReservedItemFieldName(fieldName) {
156
+ if (!RESERVED_ITEM_FIELD_NAMES.has(fieldName)) {
157
+ return;
158
+ }
159
+ throw new PmCliError(`Extension item field "${fieldName}" collides with reserved item metadata`, EXIT_CODE.USAGE, {
160
+ code: "extension_item_field_reserved",
161
+ nextSteps: ["Rename the extension item field, preferably with an extension-specific prefix."]
162
+ });
163
+ }
164
+ function collectRegisteredItemFieldNames(registrations) {
165
+ return [...collectRegisteredFieldDefinitions(registrations).keys()].sort((left, right) => left.localeCompare(right));
166
+ }
167
+ function parseRegisteredItemFieldAssignments(rawFields, registrations) {
168
+ if (!rawFields || rawFields.length === 0) {
169
+ return {};
170
+ }
171
+ const definitions = collectRegisteredFieldDefinitions(registrations);
172
+ const values = {};
173
+ for (const raw of rawFields) {
174
+ const { key, value } = parseFieldAssignment(raw);
175
+ const definition = definitions.get(key);
176
+ if (!definition) {
177
+ const known = [...definitions.keys()].sort((left, right) => left.localeCompare(right));
178
+ throw new PmCliError(`--field ${key} is not declared by an active extension item-field registration`, EXIT_CODE.USAGE, {
179
+ code: "extension_item_field_unknown",
180
+ recovery: { provided_fields: known },
181
+ nextSteps: known.length > 0 ? [`Use one of the declared fields: ${known.join(", ")}`] : ["Activate an extension that calls registerItemFields before setting extension fields."]
182
+ });
183
+ }
184
+ assertNotReservedItemFieldName(definition.name);
185
+ values[definition.name] = coerceRegisteredFieldValue(definition.name, definition.type, value);
186
+ }
187
+ return values;
188
+ }
189
+ function isValidFieldType(value, expectedType) {
190
+ if (expectedType === "string") {
191
+ return typeof value === "string";
192
+ }
193
+ if (expectedType === "number") {
194
+ return typeof value === "number" && Number.isFinite(value);
195
+ }
196
+ if (expectedType === "boolean") {
197
+ return typeof value === "boolean";
198
+ }
199
+ if (expectedType === "array") {
200
+ return Array.isArray(value);
201
+ }
202
+ return typeof value === "object" && value !== null && !Array.isArray(value);
203
+ }
204
+ function isAllowedFieldValue(value, allowed) {
205
+ if (!allowed || allowed.length === 0) {
206
+ return true;
207
+ }
208
+ return allowed.some((candidate) => Object.is(candidate, value));
209
+ }
210
+ function applyRegisteredItemFieldDefaultsAndValidation(frontMatter, registrations, options = {}) {
211
+ if (!registrations) {
212
+ return;
213
+ }
214
+ collectRegisteredFieldDefinitions(registrations);
215
+ for (const registration of registrations.item_fields) {
216
+ for (const definition of registration.fields) {
217
+ const fieldName = normalizeFieldName(definition.name);
218
+ if (!fieldName) {
219
+ continue;
220
+ }
221
+ assertNotReservedItemFieldName(fieldName);
222
+ if (!(fieldName in frontMatter) && !options.skipDefaultFields?.has(fieldName) && Object.prototype.hasOwnProperty.call(definition, "default")) {
223
+ frontMatter[fieldName] = cloneFieldValue(definition.default);
224
+ }
225
+ const currentValue = frontMatter[fieldName];
226
+ if (currentValue === void 0) {
227
+ continue;
228
+ }
229
+ const expectedType = normalizeFieldType(definition.type);
230
+ if (expectedType && !isValidFieldType(currentValue, expectedType)) {
231
+ throw new TypeError(`Item field "${fieldName}" must be of type ${expectedType}`);
232
+ }
233
+ const allowedValues = Array.isArray(definition.values) ? definition.values : void 0;
234
+ if (!isAllowedFieldValue(currentValue, allowedValues)) {
235
+ throw new TypeError(`Item field "${fieldName}" must match one of the configured allowed values`);
236
+ }
237
+ }
238
+ }
239
+ }
43
240
 
44
241
  // dist/core/item/item-record.js
45
242
  !(function() {
@@ -66,17 +263,17 @@ var EMPTY_LEGACY_HASH_DOCUMENT = {
66
263
  front_matter: {},
67
264
  body: ""
68
265
  };
69
- function decodeJsonPointer(path4) {
70
- if (!path4 || path4 === "/") {
266
+ function decodeJsonPointer(path5) {
267
+ if (!path5 || path5 === "/") {
71
268
  return [];
72
269
  }
73
- if (!path4.startsWith("/")) {
270
+ if (!path5.startsWith("/")) {
74
271
  return [];
75
272
  }
76
- return path4.slice(1).split("/").map((segment) => segment.replaceAll("~1", "/").replaceAll("~0", "~"));
273
+ return path5.slice(1).split("/").map((segment) => segment.replaceAll("~1", "/").replaceAll("~0", "~"));
77
274
  }
78
- function isDefinedPointerPath(document, path4) {
79
- const segments = decodeJsonPointer(path4);
275
+ function isDefinedPointerPath(document, path5) {
276
+ const segments = decodeJsonPointer(path5);
80
277
  if (segments.length === 0) {
81
278
  return true;
82
279
  }
@@ -261,14 +458,186 @@ async function enforceHistoryStreamPolicyForItems(params) {
261
458
  };
262
459
  }
263
460
 
264
- // dist/core/store/front-matter-cache.js
461
+ // dist/core/lock/lock.js
265
462
  import fs2 from "node:fs/promises";
266
463
  import path2 from "node:path";
464
+ !(function() {
465
+ try {
466
+ var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
467
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5747034b-5b93-59ff-8764-7594ff8c0617");
468
+ } catch (e2) {
469
+ }
470
+ })();
471
+ function parseLockInfo(raw) {
472
+ let parsed;
473
+ try {
474
+ parsed = JSON.parse(raw);
475
+ } catch {
476
+ return {
477
+ info: null,
478
+ warnings: ["lock_info_invalid_json"]
479
+ };
480
+ }
481
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
482
+ return {
483
+ info: null,
484
+ warnings: ["lock_info_invalid_shape"]
485
+ };
486
+ }
487
+ const candidate = parsed;
488
+ const id = candidate.id;
489
+ const pid = candidate.pid;
490
+ const owner = candidate.owner;
491
+ const createdAt = candidate.created_at;
492
+ const ttlSeconds = candidate.ttl_seconds;
493
+ if (typeof id !== "string" || typeof pid !== "number" || !Number.isFinite(pid) || typeof owner !== "string" || typeof createdAt !== "string" || typeof ttlSeconds !== "number" || !Number.isFinite(ttlSeconds)) {
494
+ return {
495
+ info: null,
496
+ warnings: ["lock_info_invalid_shape"]
497
+ };
498
+ }
499
+ return {
500
+ info: {
501
+ id,
502
+ pid,
503
+ owner,
504
+ created_at: createdAt,
505
+ ttl_seconds: ttlSeconds
506
+ },
507
+ warnings: []
508
+ };
509
+ }
510
+ async function readLockInfo(lockPath) {
511
+ try {
512
+ const raw = await fs2.readFile(lockPath, "utf8");
513
+ await runActiveOnReadHooks({
514
+ path: lockPath,
515
+ scope: "project"
516
+ });
517
+ return parseLockInfo(raw);
518
+ } catch (error) {
519
+ if (isErrno(error, "ENOENT")) {
520
+ return {
521
+ info: null,
522
+ warnings: []
523
+ };
524
+ }
525
+ return {
526
+ info: null,
527
+ warnings: ["lock_info_read_failed"]
528
+ };
529
+ }
530
+ }
531
+ function isErrno(error, code) {
532
+ return typeof error === "object" && error !== null && "code" in error && error.code === code;
533
+ }
534
+ async function emitLockWriteHook(lockPath, op) {
535
+ await runActiveOnWriteHooks({
536
+ path: lockPath,
537
+ scope: "project",
538
+ op
539
+ });
540
+ }
541
+ function buildLockPayload(id, owner, ttlSeconds) {
542
+ return {
543
+ id,
544
+ pid: process.pid,
545
+ owner,
546
+ created_at: nowIso(),
547
+ ttl_seconds: ttlSeconds
548
+ };
549
+ }
550
+ async function createLockFile(lockPath, id, owner, ttlSeconds) {
551
+ await fs2.mkdir(path2.dirname(lockPath), { recursive: true });
552
+ const handle = await fs2.open(lockPath, "wx");
553
+ try {
554
+ await handle.writeFile(`${JSON.stringify(buildLockPayload(id, owner, ttlSeconds), null, 2)}
555
+ `, "utf8");
556
+ } finally {
557
+ await handle.close();
558
+ }
559
+ await emitLockWriteHook(lockPath, "lock:create");
560
+ }
561
+ async function unlinkLockWithHook(lockPath, op) {
562
+ try {
563
+ await fs2.unlink(lockPath);
564
+ await emitLockWriteHook(lockPath, op);
565
+ } catch {
566
+ }
567
+ }
568
+ function isStaleLock(info, ttlSeconds) {
569
+ const createdAtMs = info?.created_at ? Date.parse(info.created_at) : Number.NaN;
570
+ const ageMs = Number.isFinite(createdAtMs) ? Date.now() - createdAtMs : Number.POSITIVE_INFINITY;
571
+ return ageMs > ttlSeconds * 1e3;
572
+ }
573
+ function lockOwnerSuffix(info) {
574
+ return info?.owner ? ` (owner ${info.owner})` : "";
575
+ }
576
+ async function handleExistingLock(lockPath, id, ttlSeconds, force, forceRequiredForStaleLock) {
577
+ const lockInfo = await readLockInfo(lockPath);
578
+ if (!isStaleLock(lockInfo.info, ttlSeconds)) {
579
+ throw new PmCliError(`Item ${id} is locked${lockOwnerSuffix(lockInfo.info)}`, EXIT_CODE.CONFLICT);
580
+ }
581
+ if (!force && forceRequiredForStaleLock) {
582
+ const warningSuffix = lockInfo.warnings.length > 0 ? ` (${lockInfo.warnings.join(",")})` : "";
583
+ throw new PmCliError(`Item ${id} lock is stale${warningSuffix}; rerun with --force when supported for this command`, EXIT_CODE.CONFLICT);
584
+ }
585
+ await unlinkLockWithHook(lockPath, "lock:stale_remove");
586
+ }
587
+ async function acquireLock(pmRoot, id, ttlSeconds, owner, force = false, forceRequiredForStaleLock = true) {
588
+ const lockOverride = await runActiveServiceOverride("lock_acquire", {
589
+ pm_root: pmRoot,
590
+ id,
591
+ ttl_seconds: ttlSeconds,
592
+ owner,
593
+ force,
594
+ force_required_for_stale_lock: forceRequiredForStaleLock
595
+ });
596
+ if (lockOverride.handled) {
597
+ const releaseFromFunction = typeof lockOverride.result === "function" ? lockOverride.result : null;
598
+ const releaseFromObject = typeof lockOverride.result === "object" && lockOverride.result !== null && "release" in lockOverride.result && typeof lockOverride.result.release === "function" ? lockOverride.result.release : null;
599
+ const release = releaseFromFunction ?? releaseFromObject;
600
+ if (release) {
601
+ return async () => {
602
+ await Promise.resolve(release());
603
+ await runActiveServiceOverride("lock_release", {
604
+ pm_root: pmRoot,
605
+ id,
606
+ owner
607
+ });
608
+ };
609
+ }
610
+ }
611
+ const lockPath = getLockPath(pmRoot, id);
612
+ for (let attempt = 0; attempt < 3; attempt += 1) {
613
+ try {
614
+ await createLockFile(lockPath, id, owner, ttlSeconds);
615
+ return async () => {
616
+ await unlinkLockWithHook(lockPath, "lock:release");
617
+ await runActiveServiceOverride("lock_release", {
618
+ pm_root: pmRoot,
619
+ id,
620
+ owner
621
+ });
622
+ };
623
+ } catch (error) {
624
+ if (!isErrno(error, "EEXIST")) {
625
+ throw new PmCliError(`Failed to acquire lock for ${id}: ${toErrorMessage(error)}`, EXIT_CODE.GENERIC_FAILURE);
626
+ }
627
+ await handleExistingLock(lockPath, id, ttlSeconds, force, forceRequiredForStaleLock);
628
+ }
629
+ }
630
+ throw new PmCliError(`Failed to acquire lock for ${id}`, EXIT_CODE.CONFLICT);
631
+ }
632
+
633
+ // dist/core/store/front-matter-cache.js
634
+ import fs3 from "node:fs/promises";
635
+ import path3 from "node:path";
267
636
  import { createHash } from "node:crypto";
268
637
  !(function() {
269
638
  try {
270
639
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
271
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a14ed5c7-eb26-57d5-8b28-58d736a3c11c");
640
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0b313ee5-78cb-5aa7-a288-d41e3ad6ecf8");
272
641
  } catch (e2) {
273
642
  }
274
643
  })();
@@ -285,6 +654,9 @@ var HEAVY_METADATA_KEYS = [
285
654
  "test_runs",
286
655
  "docs"
287
656
  ];
657
+ function resolveActiveExtensionFieldNames() {
658
+ return collectRegisteredItemFieldNames(getActiveExtensionRegistrations());
659
+ }
288
660
  function splitHeavyMetadata(metadata) {
289
661
  const light = { ...metadata };
290
662
  const heavy = {};
@@ -302,7 +674,7 @@ function mergeHeavyMetadata(light, heavy) {
302
674
  }
303
675
  return { ...light, ...heavy };
304
676
  }
305
- function computeContextFingerprint(preferredFormat, typeToFolder, schema) {
677
+ function computeContextFingerprint(preferredFormat, typeToFolder, schema, extensionFieldNames) {
306
678
  const hash = createHash("sha256");
307
679
  hash.update(`format:${preferredFormat ?? "default"}`);
308
680
  const sortedTypes = Object.entries(typeToFolder).sort(([a], [b]) => a.localeCompare(b)).map(([type, folder]) => `${type}=${folder}`).join(",");
@@ -310,20 +682,23 @@ function computeContextFingerprint(preferredFormat, typeToFolder, schema) {
310
682
  if (schema) {
311
683
  hash.update(`|schema:${JSON.stringify(schema)}`);
312
684
  }
685
+ if (extensionFieldNames.length > 0) {
686
+ hash.update(`|extension_fields:${extensionFieldNames.join(",")}`);
687
+ }
313
688
  return hash.digest("hex").slice(0, 16);
314
689
  }
315
690
  function getCachePath(pmRoot) {
316
- return path2.join(pmRoot, "runtime", CACHE_FILENAME);
691
+ return path3.join(pmRoot, "runtime", CACHE_FILENAME);
317
692
  }
318
693
  function getBodyCachePath(pmRoot) {
319
- return path2.join(pmRoot, "runtime", BODY_CACHE_FILENAME);
694
+ return path3.join(pmRoot, "runtime", BODY_CACHE_FILENAME);
320
695
  }
321
696
  function getCollectionsCachePath(pmRoot) {
322
- return path2.join(pmRoot, "runtime", COLLECTIONS_CACHE_FILENAME);
697
+ return path3.join(pmRoot, "runtime", COLLECTIONS_CACHE_FILENAME);
323
698
  }
324
699
  async function loadCache(pmRoot) {
325
700
  try {
326
- const raw = await fs2.readFile(getCachePath(pmRoot), "utf8");
701
+ const raw = await fs3.readFile(getCachePath(pmRoot), "utf8");
327
702
  const parsed = JSON.parse(raw);
328
703
  if (parsed.version !== CACHE_VERSION || typeof parsed.entries !== "object" || parsed.entries === null) {
329
704
  return null;
@@ -335,7 +710,7 @@ async function loadCache(pmRoot) {
335
710
  }
336
711
  async function loadBodyCache(pmRoot) {
337
712
  try {
338
- const raw = await fs2.readFile(getBodyCachePath(pmRoot), "utf8");
713
+ const raw = await fs3.readFile(getBodyCachePath(pmRoot), "utf8");
339
714
  const parsed = JSON.parse(raw);
340
715
  if (parsed.version !== CACHE_VERSION || typeof parsed.bodies !== "object" || parsed.bodies === null) {
341
716
  return null;
@@ -347,7 +722,7 @@ async function loadBodyCache(pmRoot) {
347
722
  }
348
723
  async function loadCollectionsCache(pmRoot) {
349
724
  try {
350
- const raw = await fs2.readFile(getCollectionsCachePath(pmRoot), "utf8");
725
+ const raw = await fs3.readFile(getCollectionsCachePath(pmRoot), "utf8");
351
726
  const parsed = JSON.parse(raw);
352
727
  if (parsed.version !== CACHE_VERSION || typeof parsed.collections !== "object" || parsed.collections === null) {
353
728
  return null;
@@ -358,7 +733,7 @@ async function loadCollectionsCache(pmRoot) {
358
733
  }
359
734
  }
360
735
  async function persistCache(cachePath, envelope) {
361
- await fs2.mkdir(path2.dirname(cachePath), { recursive: true });
736
+ await fs3.mkdir(path3.dirname(cachePath), { recursive: true });
362
737
  await writeFileAtomic(cachePath, JSON.stringify(envelope));
363
738
  }
364
739
  function appendWarning(warnings, warning) {
@@ -372,7 +747,8 @@ function statMatches(signature, mtimeMs, ctimeMs, size) {
372
747
  async function listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFolder, warnings, schema, options = {}) {
373
748
  const includeBody = options.includeBody !== false;
374
749
  const includeCollections = options.includeCollections !== false;
375
- const contextFingerprint = computeContextFingerprint(preferredFormat, typeToFolder, schema);
750
+ const extensionFieldNames = resolveActiveExtensionFieldNames();
751
+ const contextFingerprint = computeContextFingerprint(preferredFormat, typeToFolder, schema, extensionFieldNames);
376
752
  const existingCache = await loadCache(pmRoot);
377
753
  const previousEntries = existingCache && existingCache.context_fingerprint === contextFingerprint ? existingCache.entries : {};
378
754
  const existingBodyCache = includeBody ? await loadBodyCache(pmRoot) : null;
@@ -381,9 +757,9 @@ async function listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFo
381
757
  const previousCollections = existingCollectionsCache && existingCollectionsCache.context_fingerprint === contextFingerprint ? existingCollectionsCache.collections : {};
382
758
  const entries = Object.entries(typeToFolder);
383
759
  const dirResults = await Promise.all(entries.map(async ([, folder]) => {
384
- const dirPath = path2.join(pmRoot, folder);
760
+ const dirPath = path3.join(pmRoot, folder);
385
761
  try {
386
- const files = await fs2.readdir(dirPath);
762
+ const files = await fs3.readdir(dirPath);
387
763
  return { folder, dirPath, files };
388
764
  } catch (error) {
389
765
  if (typeof error === "object" && error !== null && "code" in error && error.code !== "ENOENT") {
@@ -406,11 +782,11 @@ async function listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFo
406
782
  if (!ITEM_FILE_EXTENSIONS.some((ext) => file.toLowerCase().endsWith(ext))) {
407
783
  continue;
408
784
  }
409
- const filePath = path2.join(dirPath, file);
410
- const relativePath = path2.relative(pmRoot, filePath);
785
+ const filePath = path3.join(dirPath, file);
786
+ const relativePath = path3.relative(pmRoot, filePath);
411
787
  parseTasks.push((async () => {
412
788
  try {
413
- const stat = await fs2.stat(filePath);
789
+ const stat = await fs3.stat(filePath);
414
790
  const mtimeMs = stat.mtimeMs;
415
791
  const ctimeMs = stat.ctimeMs;
416
792
  const { size } = stat;
@@ -432,10 +808,11 @@ async function listAllDocumentCandidatesCached(pmRoot, preferredFormat, typeToFo
432
808
  let bodyLength;
433
809
  let body;
434
810
  if (needRead) {
435
- const raw = await fs2.readFile(filePath, "utf8");
811
+ const raw = await fs3.readFile(filePath, "utf8");
436
812
  const parsed = parseItemDocument(raw, {
437
813
  format: itemFormat,
438
814
  schema,
815
+ extensionFieldNames,
439
816
  onWarning: (w) => appendWarning(warnings, w)
440
817
  });
441
818
  const split = splitHeavyMetadata(parsed.metadata);
@@ -550,18 +927,18 @@ async function listAllDocumentsCachedLight(pmRoot, preferredFormat, typeToFolder
550
927
  }
551
928
 
552
929
  // dist/core/store/item-store.js
553
- import fs3 from "node:fs/promises";
554
- import path3 from "node:path";
930
+ import fs4 from "node:fs/promises";
931
+ import path4 from "node:path";
555
932
  !(function() {
556
933
  try {
557
934
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
558
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e156425f-15da-5c83-b5e6-6c1c1271bf05");
935
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "88895950-2871-5fe9-9c4e-04db3aada937");
559
936
  } catch (e2) {
560
937
  }
561
938
  })();
562
939
  async function fileExists(targetPath) {
563
940
  try {
564
- await fs3.access(targetPath);
941
+ await fs4.access(targetPath);
565
942
  return true;
566
943
  } catch {
567
944
  return false;
@@ -575,6 +952,9 @@ function appendWarning2(warnings, warning) {
575
952
  warnings.push(warning);
576
953
  }
577
954
  }
955
+ function resolveActiveExtensionFieldNames2(explicit) {
956
+ return explicit ?? collectRegisteredItemFieldNames(getActiveExtensionRegistrations());
957
+ }
578
958
  function resolveItemFormatSearchOrder(preferredFormat) {
579
959
  if (preferredFormat === "toon") {
580
960
  return ["toon", "json_markdown"];
@@ -608,7 +988,7 @@ async function locateItem(pmRoot, rawId, idPrefix, preferredFormat, typeToFolder
608
988
  return null;
609
989
  }
610
990
  async function readLocatedItem(item, options = {}) {
611
- const raw = await fs3.readFile(item.itemPath, "utf8");
991
+ const raw = await fs4.readFile(item.itemPath, "utf8");
612
992
  await runActiveOnReadHooks({
613
993
  path: item.itemPath,
614
994
  scope: "project"
@@ -616,6 +996,7 @@ async function readLocatedItem(item, options = {}) {
616
996
  const document = parseItemDocument(raw, {
617
997
  format: item.item_format,
618
998
  schema: options.schema,
999
+ extensionFieldNames: resolveActiveExtensionFieldNames2(options.extensionFieldNames),
619
1000
  onWarning: (warning) => appendWarning2(options.warnings, warning)
620
1001
  });
621
1002
  return { raw, document };
@@ -640,7 +1021,7 @@ async function listKnownItemIds(pmRoot, typeToFolder) {
640
1021
  const allIds = [];
641
1022
  await Promise.all([...folders].map(async (folder) => {
642
1023
  try {
643
- const entries = await fs3.readdir(path3.join(pmRoot, folder));
1024
+ const entries = await fs4.readdir(path4.join(pmRoot, folder));
644
1025
  for (const entry of entries) {
645
1026
  for (const ext of ITEM_FILE_EXTENSIONS) {
646
1027
  if (entry.toLowerCase().endsWith(ext)) {
@@ -702,6 +1083,7 @@ async function prepareLockedItem(params) {
702
1083
  const warnings = [];
703
1084
  const { raw: originalRaw, document } = await readLocatedItem(located, {
704
1085
  schema: params.settings.schema,
1086
+ extensionFieldNames: params.extensionFieldNames,
705
1087
  warnings
706
1088
  });
707
1089
  const assigned = document.metadata.assignee?.trim();
@@ -737,6 +1119,7 @@ async function mutateItem(params) {
737
1119
  author: params.author,
738
1120
  force: params.force,
739
1121
  bypassAssigneeConflict: params.bypassAssigneeConflict,
1122
+ extensionFieldNames: params.extensionFieldNames,
740
1123
  typeToFolder: params.typeToFolder
741
1124
  });
742
1125
  const { typeToFolder, located, originalRaw, document, warnings: parseWarnings, releaseLock } = prepared;
@@ -747,15 +1130,25 @@ async function mutateItem(params) {
747
1130
  itemId: located.id,
748
1131
  commandLabel: params.op
749
1132
  });
750
- const beforeDocument = canonicalDocument(document, { schema: params.settings.schema });
751
- const mutableDocument = canonicalDocument(structuredClone(document), { schema: params.settings.schema });
1133
+ const beforeDocument = canonicalDocument(document, {
1134
+ schema: params.settings.schema,
1135
+ extensionFieldNames: params.extensionFieldNames
1136
+ });
1137
+ const mutableDocument = canonicalDocument(structuredClone(document), {
1138
+ schema: params.settings.schema,
1139
+ extensionFieldNames: params.extensionFieldNames
1140
+ });
752
1141
  const mutation = params.mutate(mutableDocument);
753
1142
  mutableDocument.metadata.updated_at = nowIso();
754
- const afterDocument = canonicalDocument(mutableDocument, { schema: params.settings.schema });
1143
+ const afterDocument = canonicalDocument(mutableDocument, {
1144
+ schema: params.settings.schema,
1145
+ extensionFieldNames: params.extensionFieldNames
1146
+ });
755
1147
  const targetItemFormat = "toon";
756
1148
  const serializedAfter = serializeItemDocument(afterDocument, {
757
1149
  format: targetItemFormat,
758
- schema: params.settings.schema
1150
+ schema: params.settings.schema,
1151
+ extensionFieldNames: params.extensionFieldNames
759
1152
  });
760
1153
  const targetItemPath = getItemPath(params.pmRoot, afterDocument.metadata.type, located.id, targetItemFormat, typeToFolder);
761
1154
  const historyPath = getHistoryPath(params.pmRoot, located.id);
@@ -790,7 +1183,7 @@ async function mutateItem(params) {
790
1183
  await writeFileAtomic(effectiveTargetItemPath, effectiveSerializedAfter);
791
1184
  }
792
1185
  if (!skipItemWrite && effectiveTargetItemPath !== located.itemPath) {
793
- await fs3.rm(located.itemPath);
1186
+ await fs4.rm(located.itemPath);
794
1187
  }
795
1188
  const entry = createHistoryEntry({
796
1189
  nowIso: afterDocument.metadata.updated_at,
@@ -805,7 +1198,7 @@ async function mutateItem(params) {
805
1198
  } catch (error) {
806
1199
  if (!skipItemWrite && effectiveTargetItemPath !== located.itemPath) {
807
1200
  await writeFileAtomic(located.itemPath, originalRaw);
808
- await fs3.rm(effectiveTargetItemPath, { force: true });
1201
+ await fs4.rm(effectiveTargetItemPath, { force: true });
809
1202
  } else if (!skipItemWrite) {
810
1203
  await writeFileAtomic(located.itemPath, originalRaw);
811
1204
  }
@@ -815,14 +1208,34 @@ async function mutateItem(params) {
815
1208
  ...await runActiveOnWriteHooks({
816
1209
  path: effectiveTargetItemPath,
817
1210
  scope: "project",
818
- op: params.op
1211
+ op: params.op,
1212
+ item_id: afterDocument.metadata.id,
1213
+ item_type: afterDocument.metadata.type,
1214
+ before: beforeDocument,
1215
+ after: afterDocument,
1216
+ changed_fields: mutation.changedFields
819
1217
  }),
820
1218
  ...await runActiveOnWriteHooks({
821
1219
  path: historyPath,
822
1220
  scope: "project",
823
- op: `${params.op}:history`
1221
+ op: `${params.op}:history`,
1222
+ item_id: afterDocument.metadata.id,
1223
+ item_type: afterDocument.metadata.type,
1224
+ before: beforeDocument,
1225
+ after: afterDocument,
1226
+ changed_fields: mutation.changedFields
824
1227
  })
825
1228
  ];
1229
+ recordAfterCommandAffectedItem({
1230
+ id: afterDocument.metadata.id,
1231
+ op: params.op,
1232
+ item_type: afterDocument.metadata.type,
1233
+ previous_status: beforeDocument.metadata.status,
1234
+ status: afterDocument.metadata.status,
1235
+ previous: projectAfterCommandItemSnapshot(beforeDocument.metadata, mutation.changedFields),
1236
+ current: projectAfterCommandItemSnapshot(afterDocument.metadata, mutation.changedFields),
1237
+ changed_fields: mutation.changedFields
1238
+ });
826
1239
  return {
827
1240
  item: afterDocument.metadata,
828
1241
  body: afterDocument.body,
@@ -896,7 +1309,7 @@ async function deleteItem(params) {
896
1309
  };
897
1310
  }
898
1311
  if (!skipDelete) {
899
- await fs3.rm(effectiveItemPath);
1312
+ await fs4.rm(effectiveItemPath);
900
1313
  }
901
1314
  try {
902
1315
  await appendHistoryEntry(historyPath, historyEntry);
@@ -910,14 +1323,32 @@ async function deleteItem(params) {
910
1323
  ...await runActiveOnWriteHooks({
911
1324
  path: effectiveItemPath,
912
1325
  scope: "project",
913
- op: "delete"
1326
+ op: "delete",
1327
+ item_id: beforeDocument.metadata.id,
1328
+ item_type: beforeDocument.metadata.type,
1329
+ before: beforeDocument,
1330
+ after: tombstoneDocument,
1331
+ changed_fields: ["deleted"]
914
1332
  }),
915
1333
  ...await runActiveOnWriteHooks({
916
1334
  path: historyPath,
917
1335
  scope: "project",
918
- op: "delete:history"
1336
+ op: "delete:history",
1337
+ item_id: beforeDocument.metadata.id,
1338
+ item_type: beforeDocument.metadata.type,
1339
+ before: beforeDocument,
1340
+ after: tombstoneDocument,
1341
+ changed_fields: ["deleted"]
919
1342
  })
920
1343
  ];
1344
+ recordAfterCommandAffectedItem({
1345
+ id: beforeDocument.metadata.id,
1346
+ op: "delete",
1347
+ item_type: beforeDocument.metadata.type,
1348
+ previous_status: beforeDocument.metadata.status,
1349
+ previous: projectAfterCommandItemSnapshot(beforeDocument.metadata, Object.keys(beforeDocument.metadata)),
1350
+ changed_fields: ["deleted"]
1351
+ });
921
1352
  return {
922
1353
  item: beforeDocument.metadata,
923
1354
  changedFields: ["deleted"],
@@ -929,6 +1360,9 @@ async function deleteItem(params) {
929
1360
  }
930
1361
 
931
1362
  export {
1363
+ collectRegisteredItemFieldNames,
1364
+ parseRegisteredItemFieldAssignments,
1365
+ applyRegisteredItemFieldDefaultsAndValidation,
932
1366
  toItemRecord,
933
1367
  hashDocument,
934
1368
  hashEmptyDocument,
@@ -936,6 +1370,7 @@ export {
936
1370
  appendHistoryEntry,
937
1371
  enforceHistoryStreamPolicyForItem,
938
1372
  enforceHistoryStreamPolicyForItems,
1373
+ acquireLock,
939
1374
  HEAVY_METADATA_KEYS,
940
1375
  listAllDocumentCandidatesCached,
941
1376
  locateItem,
@@ -947,4 +1382,4 @@ export {
947
1382
  mutateItem,
948
1383
  deleteItem
949
1384
  };
950
- //# sourceMappingURL=chunk-BUPWJ3IJ.js.map
1385
+ //# sourceMappingURL=chunk-XG7RJYHV.js.map