@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 @@
1
+ {"version":3,"sources":["../../../../../../../../core/schema/status-defs-file.ts","../../../../../../../../cli/commands/schema.ts"],"sourcesContent":["import { RUNTIME_STATUS_ROLE_VALUES } from \"../../types/index.js\";\nimport type { RuntimeStatusDefinition, RuntimeStatusRole } from \"../../types/index.js\";\nimport { DEFAULT_RUNTIME_STATUS_DEFINITIONS } from \"./runtime-schema.js\";\n\nexport type { RuntimeStatusDefinition, RuntimeStatusRole } from \"../../types/index.js\";\n\n/**\n * Pure logic for the `pm schema add-status` / `pm schema remove-status`\n * commands. The CLI command file (schema.ts) owns IO/governance; everything\n * testable and side-effect-free lives here so it can be coverage-gated to 100%.\n *\n * Statuses persist at `.agents/pm/schema/statuses.json` under the shape\n * `{ statuses: RuntimeStatusDefinition[] }`. When the file is absent the runtime\n * merge layer (src/core/store/settings.ts) still supplies the built-in defaults\n * from DEFAULT_RUNTIME_STATUS_DEFINITIONS, so this module never duplicates them\n * into the persisted file.\n */\n\nconst RUNTIME_STATUS_ROLE_SET = new Set<string>(RUNTIME_STATUS_ROLE_VALUES);\n\n/**\n * The 5 lifecycle status ids that ship as built-in defaults and may never be\n * removed (their normalized ids match DEFAULT_RUNTIME_STATUS_DEFINITIONS:\n * open/in_progress/blocked/closed/canceled). `draft` is also a default but the\n * acceptance criteria enumerate the 5 terminal/active ids explicitly, so the\n * guard derives the full set from the canonical defaults to stay in sync.\n */\nexport const BUILTIN_STATUS_IDS: ReadonlySet<string> = new Set(\n DEFAULT_RUNTIME_STATUS_DEFINITIONS.map((definition) => normalizeStatusToken(definition.id)).filter(\n (id) => id.length > 0,\n ),\n);\n\n/**\n * The shape persisted at `.agents/pm/schema/statuses.json`.\n */\nexport interface StatusDefsFile {\n statuses: RuntimeStatusDefinition[];\n}\n\nexport interface RawAddStatusInput {\n id: string | undefined;\n roles?: string[];\n aliases?: string[];\n description?: string;\n order?: number;\n}\n\nexport interface NormalizedAddStatusInput {\n id: string;\n /**\n * Normalized roles, or `undefined` when the raw input did not supply a roles\n * field at all. `undefined` means \"leave existing roles untouched\" on upsert;\n * an explicit empty array means \"clear roles\". This distinction is what keeps\n * `add-status review --description x` from wiping a previously-set role.\n */\n roles?: RuntimeStatusRole[];\n /** Same omitted-vs-explicit-empty semantics as `roles`. */\n aliases?: string[];\n description?: string;\n order?: number;\n}\n\nexport interface UpsertStatusDefResult {\n file: StatusDefsFile;\n /** The definition as stored after the upsert (existing fields preserved). */\n definition: RuntimeStatusDefinition;\n /** True when an existing definition with the same (normalized) id was replaced. */\n replaced: boolean;\n}\n\nexport interface RemoveStatusDefResult {\n file: StatusDefsFile;\n /** True when a matching definition existed and was dropped from the file. */\n removed: boolean;\n /** The removed definition, when one matched the requested id. */\n definition?: RuntimeStatusDefinition;\n}\n\n/**\n * Normalizes a status token using the same rules as runtime-schema.ts: lowercase\n * and collapse any run of whitespace/hyphens into a single underscore.\n */\nexport function normalizeStatusToken(value: unknown): string {\n return typeof value === \"string\" ? value.trim().toLowerCase().replaceAll(/[\\s-]+/g, \"_\") : \"\";\n}\n\nfunction dedupeTokens(values: Iterable<string>): string[] {\n const seen = new Set<string>();\n for (const value of values) {\n const token = normalizeStatusToken(value);\n if (token.length > 0) {\n seen.add(token);\n }\n }\n return [...seen].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Validates and normalizes raw add-status CLI input. Throws a plain Error with a\n * stable message when the id is missing/empty or a role is not one of\n * RUNTIME_STATUS_ROLE_VALUES; the CLI layer maps these to PmCliError exit codes.\n *\n * Omitted vs explicit-empty is preserved end-to-end: when `raw.roles`/`raw.aliases`\n * is `undefined` (flag not supplied) the normalized field is `undefined` so the\n * upsert leaves the existing value untouched; when supplied (even an empty array)\n * the field is normalized to an array so the upsert can apply an explicit clear.\n */\nexport function normalizeAddStatusInput(raw: RawAddStatusInput): NormalizedAddStatusInput {\n const id = normalizeStatusToken(raw.id);\n if (id.length === 0) {\n throw new Error(\"Status id must not be empty.\");\n }\n // Built-in lifecycle statuses are reserved and cannot be overridden: an\n // add-status override would change reserved metadata yet remove-status refuses\n // to delete a built-in id, leaving no CLI path to undo it. Reject up front,\n // symmetric with removeStatusDef.\n if (BUILTIN_STATUS_IDS.has(id)) {\n throw new Error(\n `Cannot add-status the built-in status \"${id}\". Built-in statuses are reserved: ${[...BUILTIN_STATUS_IDS].join(\", \")}.`,\n );\n }\n let roles: RuntimeStatusRole[] | undefined;\n if (raw.roles !== undefined) {\n roles = [];\n const seenRoles = new Set<string>();\n for (const rawRole of raw.roles) {\n const role = typeof rawRole === \"string\" ? rawRole.trim().toLowerCase() : \"\";\n if (role.length === 0) {\n continue;\n }\n if (!RUNTIME_STATUS_ROLE_SET.has(role)) {\n throw new Error(\n `Invalid status role \"${rawRole}\". Allowed roles: ${RUNTIME_STATUS_ROLE_VALUES.join(\", \")}.`,\n );\n }\n if (!seenRoles.has(role)) {\n seenRoles.add(role);\n roles.push(role as RuntimeStatusRole);\n }\n }\n }\n const aliases =\n raw.aliases === undefined ? undefined : dedupeTokens(raw.aliases).filter((alias) => alias !== id);\n const description = raw.description?.trim();\n const order =\n typeof raw.order === \"number\" && Number.isFinite(raw.order) ? Math.trunc(raw.order) : undefined;\n return {\n id,\n roles,\n aliases,\n description: description && description.length > 0 ? description : undefined,\n order,\n };\n}\n\nfunction selectStatusesArray(parsed: unknown): unknown[] | undefined {\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (typeof parsed !== \"object\" || parsed === null) {\n return undefined;\n }\n const record = parsed as Record<string, unknown>;\n if (Array.isArray(record.statuses)) {\n return record.statuses;\n }\n if (Array.isArray(record.definitions)) {\n return record.definitions;\n }\n return undefined;\n}\n\nfunction extractStatusDefinitions(parsed: unknown): RuntimeStatusDefinition[] {\n const candidate = selectStatusesArray(parsed);\n if (!candidate) {\n return [];\n }\n const definitions: RuntimeStatusDefinition[] = [];\n for (const entry of candidate) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const record = entry as Record<string, unknown>;\n if (typeof record.id !== \"string\" || record.id.trim().length === 0) {\n continue;\n }\n definitions.push(record as unknown as RuntimeStatusDefinition);\n }\n return definitions;\n}\n\n/**\n * Coerces an arbitrary parsed value from statuses.json into a StatusDefsFile.\n * Accepts the canonical `{ statuses: [...] }` shape, a bare array of\n * definitions, or a `{ definitions: [...] }` form, and tolerates a\n * missing/invalid file by returning an empty statuses list.\n */\nexport function parseStatusDefsFile(raw: string | null | undefined): StatusDefsFile {\n if (raw === null || raw === undefined || raw.trim().length === 0) {\n return { statuses: [] };\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n throw new Error(\"schema/statuses.json contains invalid JSON.\");\n }\n return { statuses: extractStatusDefinitions(parsed) };\n}\n\n/**\n * Serializes the status definitions file with a trailing newline (matches the\n * rest of the schema scaffold files written by pm).\n */\nexport function serializeStatusDefsFile(file: StatusDefsFile): string {\n return `${JSON.stringify({ statuses: file.statuses }, null, 2)}\\n`;\n}\n\n/**\n * Idempotent UPSERT of a status definition into the parsed file. Matching is by\n * normalized id. When a definition already exists, fields supplied in `input`\n * override the previous values (roles/aliases replace when a non-empty array is\n * given, clear when an explicit empty array is given, and are left UNTOUCHED\n * when the field is `undefined` — i.e. the add-status flag was omitted);\n * description/order override when provided. Fields not addressed by add-status\n * flags are preserved untouched, so `add-status <id> --description x` keeps any\n * previously-set roles/aliases.\n */\nexport function upsertStatusDef(\n file: StatusDefsFile,\n input: NormalizedAddStatusInput,\n baseDefinition?: RuntimeStatusDefinition,\n): UpsertStatusDefResult {\n const statuses = file.statuses.slice();\n const existingIndex = statuses.findIndex(\n (definition) => normalizeStatusToken(definition.id) === input.id,\n );\n // A file-backed definition is the primary seed; when the status is not yet in\n // statuses.json fall back to `baseDefinition` (the resolved settings-backed\n // definition) so omitting --role/--alias preserves metadata that lives in\n // settings.schema.statuses rather than the file.\n const existing = existingIndex >= 0 ? statuses[existingIndex] : baseDefinition;\n\n const next: RuntimeStatusDefinition = {\n ...(existing ?? {}),\n id: input.id,\n };\n if (input.roles !== undefined) {\n if (input.roles.length > 0) {\n next.roles = [...input.roles];\n } else if (next.roles !== undefined) {\n delete next.roles;\n }\n }\n if (input.aliases !== undefined) {\n if (input.aliases.length > 0) {\n next.aliases = [...input.aliases];\n } else if (next.aliases !== undefined) {\n delete next.aliases;\n }\n }\n if (input.description !== undefined) {\n next.description = input.description;\n }\n if (input.order !== undefined) {\n next.order = input.order;\n }\n\n if (existingIndex >= 0) {\n statuses[existingIndex] = next;\n } else {\n statuses.push(next);\n }\n\n return {\n file: { statuses },\n definition: next,\n // \"replaced\" reflects whether the status already existed effectively (in the\n // file OR in resolved settings), so the CLI reports \"Updated\" vs \"Registered\"\n // correctly even when the prior definition lived only in settings.\n replaced: existing !== undefined,\n };\n}\n\n/**\n * Removes a status definition from the parsed file by id (normalized). Throws a\n * plain Error when `id` is empty or matches a reserved built-in default status\n * (those are never stored in the file and must never be deletable). Returns\n * `removed: false` when no matching definition exists so the CLI layer can treat\n * the call as an idempotent no-op.\n */\nexport function removeStatusDef(file: StatusDefsFile, id: string | undefined): RemoveStatusDefResult {\n const normalizedId = normalizeStatusToken(id);\n if (normalizedId.length === 0) {\n throw new Error(\"Status id must not be empty.\");\n }\n if (BUILTIN_STATUS_IDS.has(normalizedId)) {\n throw new Error(\n `Cannot remove built-in status \"${normalizedId}\". Built-in statuses are reserved: ${[...BUILTIN_STATUS_IDS].join(\", \")}.`,\n );\n }\n const statuses = file.statuses.slice();\n const existingIndex = statuses.findIndex(\n (definition) => normalizeStatusToken(definition.id) === normalizedId,\n );\n if (existingIndex < 0) {\n return { file: { statuses }, removed: false };\n }\n const [definition] = statuses.splice(existingIndex, 1);\n return { file: { statuses }, removed: true, definition };\n}\n\n/**\n * Throws when the new status id or any explicitly-supplied alias collides with a\n * DIFFERENT existing status's id/alias. `resolvedAliasToId` maps a normalized\n * token to its owning status id (the runtime status registry's alias_to_id map,\n * which stores ids and aliases in one namespace). Re-adding the same status\n * (matching id) is allowed — only cross-status collisions throw. This prevents a\n * custom status from shadowing a built-in lifecycle token (for example\n * `add-status review --alias open`, or a custom id `cancelled` that aliases the\n * built-in `canceled`), which would make `pm update --status open` resolve to the\n * wrong status. The CLI layer maps the thrown Error to a USAGE exit code.\n */\nexport function assertStatusTokensAvailable(\n input: { id: string; aliases?: string[] },\n resolvedAliasToId: ReadonlyMap<string, string>,\n): void {\n const candidates = [input.id, ...(input.aliases ?? [])];\n for (const candidate of candidates) {\n const token = normalizeStatusToken(candidate);\n if (token.length === 0) {\n continue;\n }\n const owner = resolvedAliasToId.get(token);\n if (owner !== undefined && owner !== input.id) {\n throw new Error(\n `Status token \"${token}\" already belongs to status \"${owner}\". Choose a different id/alias to avoid shadowing it.`,\n );\n }\n }\n}\n","import { pathExists, readFileIfExists, writeFileAtomic } from \"../../core/fs/fs-utils.js\";\nimport { acquireLock } from \"../../core/lock/lock.js\";\nimport {\n assertAliasesAvailable,\n buildInvalidTypeHint,\n escapeForDoubleQuotes,\n normalizeAddTypeInput,\n parseItemTypesFile,\n removeItemType,\n serializeItemTypesFile,\n upsertItemType,\n type ItemTypeDefinition,\n} from \"../../core/schema/item-types-file.js\";\nimport {\n assertStatusTokensAvailable,\n BUILTIN_STATUS_IDS,\n normalizeAddStatusInput,\n normalizeStatusToken,\n parseStatusDefsFile,\n removeStatusDef,\n serializeStatusDefsFile,\n upsertStatusDef,\n type RuntimeStatusDefinition,\n} from \"../../core/schema/status-defs-file.js\";\nimport {\n DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,\n filePathForSchemaSection,\n normalizeRuntimeSchemaSettings,\n resolveRuntimeStatusRegistry,\n} from \"../../core/schema/runtime-schema.js\";\nimport { resolveItemTypeRegistry, type ResolvedItemTypeDefinition } from \"../../core/item/type-registry.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport type { PmSettings } from \"../../types/index.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { getActiveExtensionRegistrations, runActiveOnWriteHooks } from \"../../core/extensions/index.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings, resolveGovernanceKnobs } from \"../../core/store/settings.js\";\n\nexport const SCHEMA_SUBCOMMANDS = [\"add-type\", \"remove-type\", \"add-status\", \"remove-status\", \"list\", \"show\"] as const;\nexport type SchemaSubcommand = (typeof SCHEMA_SUBCOMMANDS)[number];\n\nconst SCHEMA_TYPES_LOCK_ID = \"schema-types\";\nconst SCHEMA_STATUSES_LOCK_ID = \"schema-statuses\";\n\nexport interface SchemaAddTypeCommandOptions {\n description?: string;\n defaultStatus?: string;\n folder?: string;\n alias?: string[];\n author?: string;\n force?: boolean;\n}\n\nexport interface SchemaRemoveTypeCommandOptions {\n author?: string;\n force?: boolean;\n}\n\nexport interface SchemaAddStatusCommandOptions {\n role?: string[];\n alias?: string[];\n description?: string;\n order?: number;\n author?: string;\n force?: boolean;\n}\n\nexport interface SchemaRemoveStatusCommandOptions {\n author?: string;\n force?: boolean;\n}\n\nexport interface SchemaAddTypeResult {\n action: \"add-type\";\n registered: boolean;\n replaced: boolean;\n type: ItemTypeDefinition;\n file: {\n path: string;\n definitions: number;\n };\n warnings: string[];\n generated_at: string;\n}\n\nexport interface SchemaRemoveTypeResult {\n action: \"remove-type\";\n removed: boolean;\n type?: ItemTypeDefinition;\n file: {\n path: string;\n definitions: number;\n };\n warnings: string[];\n generated_at: string;\n}\n\nexport interface SchemaAddStatusResult {\n action: \"add-status\";\n registered: boolean;\n replaced: boolean;\n status: RuntimeStatusDefinition;\n file: {\n path: string;\n statuses: number;\n };\n warnings: string[];\n generated_at: string;\n}\n\nexport interface SchemaRemoveStatusResult {\n action: \"remove-status\";\n removed: boolean;\n status?: RuntimeStatusDefinition;\n file: {\n path: string;\n statuses: number;\n };\n warnings: string[];\n generated_at: string;\n}\n\nexport interface SchemaTypeSummary {\n name: string;\n folder: string;\n aliases: string[];\n default_status?: string;\n description?: string;\n}\n\nexport interface SchemaStatusSummary {\n id: string;\n source: \"builtin\" | \"custom\";\n roles: string[];\n aliases: string[];\n description?: string;\n}\n\nexport interface SchemaTypeDefinitionResult extends SchemaTypeSummary {\n source: \"builtin\" | \"custom\" | \"extension\";\n extension?: {\n layer: string;\n name: string;\n };\n required_create_fields: string[];\n required_create_repeatables: string[];\n options: ResolvedItemTypeDefinition[\"options\"];\n command_option_policies: ResolvedItemTypeDefinition[\"command_option_policies\"];\n}\n\nexport interface SchemaListResult {\n action: \"list\";\n builtin: SchemaTypeSummary[];\n custom: SchemaTypeSummary[];\n extension: SchemaTypeSummary[];\n counts: {\n builtin: number;\n custom: number;\n extension: number;\n total: number;\n };\n statuses: {\n builtin: SchemaStatusSummary[];\n custom: SchemaStatusSummary[];\n counts: {\n builtin: number;\n custom: number;\n total: number;\n };\n };\n file: {\n path: string;\n };\n generated_at: string;\n}\n\nexport interface SchemaShowResult {\n action: \"show\";\n type: SchemaTypeDefinitionResult;\n file: {\n path: string;\n };\n generated_at: string;\n}\n\nexport type SchemaInspectResult = SchemaListResult | SchemaShowResult;\n\nfunction toAuthor(candidate: string | undefined, defaultAuthor: string): string {\n const resolved = candidate ?? process.env.PM_AUTHOR ?? defaultAuthor;\n const trimmed = resolved.trim();\n return trimmed.length > 0 ? trimmed : \"unknown\";\n}\n\nexport async function runSchemaAddType(\n name: string | undefined,\n options: SchemaAddTypeCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaAddTypeResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n let normalized;\n try {\n normalized = normalizeAddTypeInput({\n name,\n description: options.description,\n defaultStatus: options.defaultStatus,\n folder: options.folder,\n aliases: options.alias,\n });\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);\n }\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const typesPath = filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_TYPES_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n );\n let upsert;\n try {\n const previousRaw = await readFileIfExists(typesPath);\n let parsed;\n try {\n parsed = parseItemTypesFile(previousRaw);\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);\n }\n try {\n assertAliasesAvailable(normalized, parsed);\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);\n }\n upsert = upsertItemType(parsed, normalized);\n // writeFileAtomic writes to a temp file then renames, so a failure leaves the\n // existing types.json untouched; no manual rollback is needed.\n await writeFileAtomic(typesPath, serializeItemTypesFile(upsert.file));\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: typesPath,\n scope: \"project\",\n op: \"schema:add-type\",\n })),\n );\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"add-type\",\n registered: true,\n replaced: upsert.replaced,\n type: upsert.definition,\n file: {\n path: typesPath,\n definitions: upsert.file.definitions.length,\n },\n warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),\n generated_at: nowIso(),\n };\n}\n\nasync function ensureInitialized(pmRoot: string): Promise<void> {\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n}\n\n/**\n * Counts items whose resolved type matches `typeName` (case-insensitive). Uses\n * the lightest existing read path (listAllFrontMatterLight skips the heavy\n * collections cache). All items are counted — not just open ones — so the\n * advisory warning surfaces every item the removed definition would orphan;\n * the count is non-blocking. The caller passes its already-loaded `settings`\n * so we never re-read settings.json from disk here.\n */\nasync function countItemsUsingType(\n pmRoot: string,\n settings: PmSettings,\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n typeName: string,\n): Promise<number> {\n const registry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const lowerName = typeName.trim().toLowerCase();\n const items = await listAllFrontMatterLight(pmRoot, settings.item_format, registry.type_to_folder, [], schema);\n return items.filter((item) => typeof item.type === \"string\" && item.type.toLowerCase() === lowerName).length;\n}\n\n/**\n * Counts items currently set to the status whose id/aliases resolve to\n * `statusId`. Uses listAllFrontMatterLight (the lightest read path). All items\n * are counted regardless of lifecycle phase; the count is advisory only. The\n * caller passes its already-loaded `settings` so we never re-read from disk.\n */\nasync function countItemsUsingStatus(\n pmRoot: string,\n settings: PmSettings,\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n statusId: string,\n): Promise<number> {\n const registry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const statusRegistry = resolveRuntimeStatusRegistry(schema);\n const normalizedId = normalizeStatusToken(statusId);\n const items = await listAllFrontMatterLight(pmRoot, settings.item_format, registry.type_to_folder, [], schema);\n return items.filter((item) => {\n const itemStatus = typeof item.status === \"string\" ? item.status : \"\";\n const resolved = statusRegistry.alias_to_id.get(normalizeStatusToken(itemStatus)) ?? normalizeStatusToken(itemStatus);\n return resolved === normalizedId;\n }).length;\n}\n\n/**\n * Returns the workflow role-slot names (open_status, close_status, ...) that\n * currently point at `statusId` (normalized). Used to warn before removing a\n * status that a workflow default still references.\n */\nfunction workflowSlotsReferencing(\n workflow: {\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 statusId: string,\n): string[] {\n const slots: Array<[string, string | undefined]> = [\n [\"draft_status\", workflow.draft_status],\n [\"open_status\", workflow.open_status],\n [\"in_progress_status\", workflow.in_progress_status],\n [\"blocked_status\", workflow.blocked_status],\n [\"close_status\", workflow.close_status],\n [\"canceled_status\", workflow.canceled_status],\n ];\n return slots\n .filter(([, value]) => value !== undefined && normalizeStatusToken(value) === statusId)\n .map(([slot]) => slot);\n}\n\nexport async function runSchemaRemoveType(\n name: string | undefined,\n options: SchemaRemoveTypeCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaRemoveTypeResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const typesPath = filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_TYPES_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n );\n let removal;\n try {\n const previousRaw = await readFileIfExists(typesPath);\n let parsed;\n try {\n parsed = parseItemTypesFile(previousRaw);\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);\n }\n try {\n removal = removeItemType(parsed, name);\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);\n }\n if (removal.removed) {\n // Only emit the advisory orphan-count warning once a removable custom\n // definition was actually removed; a no-op/unknown removal would otherwise\n // surface a misleading items_using_type:* warning. The count is\n // non-blocking and reuses the already-loaded settings (no disk re-read).\n const removedName = (removal.definition?.name ?? name ?? \"\").trim();\n if (removedName.length > 0) {\n const usingType = await countItemsUsingType(pmRoot, settings, schema, removedName);\n if (usingType > 0) {\n warnings.push(`items_using_type:${usingType}`);\n }\n }\n // writeFileAtomic writes to a temp file then renames, so a failure leaves\n // the existing types.json untouched; no manual rollback is needed.\n await writeFileAtomic(typesPath, serializeItemTypesFile(removal.file));\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: typesPath,\n scope: \"project\",\n op: \"schema:remove-type\",\n })),\n );\n }\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"remove-type\",\n removed: removal.removed,\n ...(removal.definition ? { type: removal.definition } : {}),\n file: {\n path: typesPath,\n definitions: removal.file.definitions.length,\n },\n warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),\n generated_at: nowIso(),\n };\n}\n\nfunction statusesPathFor(pmRoot: string, schema: ReturnType<typeof normalizeRuntimeSchemaSettings>): string {\n return filePathForSchemaSection(pmRoot, schema.files.statuses, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.statuses);\n}\n\nexport async function runSchemaAddStatus(\n id: string | undefined,\n options: SchemaAddStatusCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaAddStatusResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n let normalized;\n try {\n normalized = normalizeAddStatusInput({\n id,\n roles: options.role,\n aliases: options.alias,\n description: options.description,\n order: options.order,\n });\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);\n }\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const statusesPath = statusesPathFor(pmRoot, schema);\n const statusRegistry = resolveRuntimeStatusRegistry(schema);\n\n // Reject id/alias collisions with a DIFFERENT existing status so a custom\n // status can never shadow a built-in lifecycle token (e.g. --alias open).\n try {\n assertStatusTokensAvailable(normalized, statusRegistry.alias_to_id);\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);\n }\n\n // Seed the upsert from the resolved (settings-or-file) definition so omitting\n // --role/--alias preserves metadata defined in settings.schema.statuses, not\n // only what is already in statuses.json.\n const resolvedExisting = statusRegistry.by_id.get(normalized.id);\n const baseDefinition: RuntimeStatusDefinition | undefined = resolvedExisting\n ? {\n id: resolvedExisting.id,\n ...(Array.isArray(resolvedExisting.roles) && resolvedExisting.roles.length > 0\n ? { roles: [...resolvedExisting.roles] }\n : {}),\n ...(Array.isArray(resolvedExisting.aliases) && resolvedExisting.aliases.length > 0\n ? { aliases: [...resolvedExisting.aliases] }\n : {}),\n ...(resolvedExisting.description ? { description: resolvedExisting.description } : {}),\n ...(typeof resolvedExisting.order === \"number\" ? { order: resolvedExisting.order } : {}),\n }\n : undefined;\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_STATUSES_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n );\n let upsert;\n try {\n const previousRaw = await readFileIfExists(statusesPath);\n let parsed;\n try {\n parsed = parseStatusDefsFile(previousRaw);\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);\n }\n // Re-check collisions against the CURRENT file under the lock: the pre-lock\n // check used the registry loaded before acquiring schema-statuses, so a\n // concurrent add-status could have written a colliding id/alias in between.\n // The lock serializes writes; this serializes the collision decision too.\n const fileAliasToId = new Map<string, string>();\n for (const definition of parsed.statuses) {\n const defId = normalizeStatusToken(definition.id);\n if (defId.length === 0) {\n continue;\n }\n fileAliasToId.set(defId, defId);\n for (const alias of Array.isArray(definition.aliases) ? definition.aliases : []) {\n const aliasToken = normalizeStatusToken(alias);\n if (aliasToken.length > 0 && !fileAliasToId.has(aliasToken)) {\n fileAliasToId.set(aliasToken, defId);\n }\n }\n }\n try {\n assertStatusTokensAvailable(normalized, fileAliasToId);\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);\n }\n upsert = upsertStatusDef(parsed, normalized, baseDefinition);\n // writeFileAtomic writes to a temp file then renames, so a failure leaves\n // the existing statuses.json untouched; no manual rollback is needed.\n await writeFileAtomic(statusesPath, serializeStatusDefsFile(upsert.file));\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: statusesPath,\n scope: \"project\",\n op: \"schema:add-status\",\n })),\n );\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"add-status\",\n registered: true,\n replaced: upsert.replaced,\n status: upsert.definition,\n file: {\n path: statusesPath,\n statuses: upsert.file.statuses.length,\n },\n warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),\n generated_at: nowIso(),\n };\n}\n\nexport async function runSchemaRemoveStatus(\n id: string | undefined,\n options: SchemaRemoveStatusCommandOptions,\n global: GlobalOptions,\n): Promise<SchemaRemoveStatusResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const statusesPath = statusesPathFor(pmRoot, schema);\n\n const warnings: string[] = [];\n const author = toAuthor(options.author, settings.author_default);\n const governance = resolveGovernanceKnobs(settings);\n\n const releaseLock = await acquireLock(\n pmRoot,\n SCHEMA_STATUSES_LOCK_ID,\n settings.locks.ttl_seconds,\n author,\n Boolean(options.force),\n governance.force_required_for_stale_lock,\n );\n let removal;\n try {\n const previousRaw = await readFileIfExists(statusesPath);\n let parsed;\n try {\n parsed = parseStatusDefsFile(previousRaw);\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.GENERIC_FAILURE);\n }\n try {\n removal = removeStatusDef(parsed, id);\n } catch (error) {\n throw new PmCliError(error instanceof Error ? error.message : String(error), EXIT_CODE.USAGE);\n }\n if (removal.removed) {\n // Only emit the advisory orphan-count warning once a removable custom\n // status was actually removed; a no-op/unknown removal would otherwise\n // surface a misleading items_using_status:* warning. The count reuses the\n // already-loaded settings (no disk re-read) and is non-blocking.\n const removedId = normalizeStatusToken(removal.definition?.id ?? id);\n if (removedId.length > 0 && !BUILTIN_STATUS_IDS.has(removedId)) {\n const usingStatus = await countItemsUsingStatus(pmRoot, settings, schema, removedId);\n if (usingStatus > 0) {\n warnings.push(`items_using_status:${usingStatus}`);\n }\n // Removing a status that a workflow default still points at would leave\n // pm close / default pm create resolving to an unregistered status. Warn\n // (non-blocking, consistent with remove-type) so the operator re-points\n // the workflow slot via schema/workflows.json or pm config.\n const referencingSlots = workflowSlotsReferencing(schema.workflow, removedId);\n if (referencingSlots.length > 0) {\n warnings.push(`status_referenced_by_workflow:${referencingSlots.join(\",\")}`);\n }\n }\n await writeFileAtomic(statusesPath, serializeStatusDefsFile(removal.file));\n warnings.push(\n ...(await runActiveOnWriteHooks({\n path: statusesPath,\n scope: \"project\",\n op: \"schema:remove-status\",\n })),\n );\n }\n } finally {\n await releaseLock();\n }\n\n return {\n action: \"remove-status\",\n removed: removal.removed,\n ...(removal.definition ? { status: removal.definition } : {}),\n file: {\n path: statusesPath,\n statuses: removal.file.statuses.length,\n },\n warnings: [...new Set(warnings)].sort((left, right) => left.localeCompare(right)),\n generated_at: nowIso(),\n };\n}\n\nfunction toSchemaTypeSummary(definition: ResolvedItemTypeDefinition): SchemaTypeSummary {\n return {\n name: definition.name,\n folder: definition.folder,\n aliases: Array.isArray(definition.aliases) ? [...definition.aliases] : [],\n ...(definition.default_status ? { default_status: definition.default_status } : {}),\n ...(definition.description ? { description: definition.description } : {}),\n };\n}\n\nfunction toSchemaTypeDefinition(\n definition: ResolvedItemTypeDefinition,\n source: SchemaTypeDefinitionResult[\"source\"],\n extensionProvenance?: SchemaTypeDefinitionResult[\"extension\"],\n): SchemaTypeDefinitionResult {\n return {\n ...toSchemaTypeSummary(definition),\n source,\n ...(extensionProvenance ? { extension: extensionProvenance } : {}),\n required_create_fields: [...definition.required_create_fields],\n required_create_repeatables: [...definition.required_create_repeatables],\n options: structuredClone(definition.options),\n command_option_policies: structuredClone(definition.command_option_policies),\n };\n}\n\nfunction classifyTypeSource(\n name: string,\n customNames: Set<string>,\n extensionNames: Set<string>,\n): SchemaTypeDefinitionResult[\"source\"] {\n const lowerName = name.toLowerCase();\n if (extensionNames.has(lowerName)) {\n return \"extension\";\n }\n if (customNames.has(lowerName)) {\n return \"custom\";\n }\n return \"builtin\";\n}\n\nfunction collectExtensionTypeProvenance(): Map<string, SchemaTypeDefinitionResult[\"extension\"]> {\n const provenance = new Map<string, SchemaTypeDefinitionResult[\"extension\"]>();\n const registrations = getActiveExtensionRegistrations();\n for (const registration of registrations?.item_types ?? []) {\n const rawTypes = (registration as { types?: unknown[] }).types;\n if (!Array.isArray(rawTypes)) {\n continue;\n }\n for (const rawType of rawTypes) {\n if (typeof rawType !== \"object\" || rawType === null || Array.isArray(rawType)) {\n continue;\n }\n const name = (rawType as { name?: unknown }).name;\n if (typeof name === \"string\" && name.trim().length > 0) {\n provenance.set(name.trim().toLowerCase(), {\n layer: registration.layer,\n name: registration.name,\n });\n }\n }\n }\n return provenance;\n}\n\nfunction buildSchemaStatusSummaries(\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>,\n): { builtin: SchemaStatusSummary[]; custom: SchemaStatusSummary[] } {\n const registry = resolveRuntimeStatusRegistry(schema);\n const builtin: SchemaStatusSummary[] = [];\n const custom: SchemaStatusSummary[] = [];\n for (const definition of registry.definitions) {\n const source: SchemaStatusSummary[\"source\"] = BUILTIN_STATUS_IDS.has(definition.id) ? \"builtin\" : \"custom\";\n const summary: SchemaStatusSummary = {\n id: definition.id,\n source,\n roles: Array.isArray(definition.roles) ? [...definition.roles] : [],\n aliases: Array.isArray(definition.aliases) ? [...definition.aliases] : [],\n ...(definition.description ? { description: definition.description } : {}),\n };\n if (source === \"builtin\") {\n builtin.push(summary);\n } else {\n custom.push(summary);\n }\n }\n return { builtin, custom };\n}\n\nasync function loadSchemaInspectionContext(global: GlobalOptions): Promise<{\n typesPath: string;\n byType: Record<string, ResolvedItemTypeDefinition>;\n customNames: Set<string>;\n extensionProvenance: Map<string, SchemaTypeDefinitionResult[\"extension\"]>;\n schema: ReturnType<typeof normalizeRuntimeSchemaSettings>;\n}> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const schema = normalizeRuntimeSchemaSettings(settings.schema);\n const typesPath = filePathForSchemaSection(pmRoot, schema.files.types, DEFAULT_RUNTIME_SCHEMA_FILE_PATHS.types);\n const registry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const extensionProvenance = collectExtensionTypeProvenance();\n const customNames = new Set(\n (settings.item_types?.definitions ?? [])\n .map((definition) => definition.name.trim().toLowerCase())\n .filter((name) => name.length > 0 && !extensionProvenance.has(name)),\n );\n return {\n typesPath,\n byType: registry.by_type,\n customNames,\n extensionProvenance,\n schema,\n };\n}\n\nexport async function runSchemaList(global: GlobalOptions): Promise<SchemaListResult> {\n const context = await loadSchemaInspectionContext(global);\n const builtin: SchemaTypeSummary[] = [];\n const custom: SchemaTypeSummary[] = [];\n const extension: SchemaTypeSummary[] = [];\n for (const definition of Object.values(context.byType).sort((left, right) => left.name.localeCompare(right.name))) {\n const source = classifyTypeSource(definition.name, context.customNames, new Set(context.extensionProvenance.keys()));\n const summary = toSchemaTypeSummary(definition);\n if (source === \"extension\") {\n extension.push(summary);\n } else if (source === \"custom\") {\n custom.push(summary);\n } else {\n builtin.push(summary);\n }\n }\n const statusSummaries = buildSchemaStatusSummaries(context.schema);\n return {\n action: \"list\",\n builtin,\n custom,\n extension,\n counts: {\n builtin: builtin.length,\n custom: custom.length,\n extension: extension.length,\n total: builtin.length + custom.length + extension.length,\n },\n statuses: {\n builtin: statusSummaries.builtin,\n custom: statusSummaries.custom,\n counts: {\n builtin: statusSummaries.builtin.length,\n custom: statusSummaries.custom.length,\n total: statusSummaries.builtin.length + statusSummaries.custom.length,\n },\n },\n file: {\n path: context.typesPath,\n },\n generated_at: nowIso(),\n };\n}\n\nexport async function runSchemaShow(name: string | undefined, global: GlobalOptions): Promise<SchemaShowResult> {\n const typeName = (name ?? \"\").trim();\n if (typeName.length === 0) {\n throw new PmCliError(\"Type name must not be empty.\", EXIT_CODE.USAGE);\n }\n const context = await loadSchemaInspectionContext(global);\n const match = Object.values(context.byType).find(\n (definition) =>\n definition.name.toLowerCase() === typeName.toLowerCase() ||\n definition.aliases.some((alias) => alias.toLowerCase() === typeName.toLowerCase()),\n );\n if (!match) {\n throw new PmCliError(\n `Unknown item type \"${typeName}\". Run pm schema list to inspect registered types, or pm schema add-type \"${escapeForDoubleQuotes(typeName)}\" to register it.`,\n EXIT_CODE.NOT_FOUND,\n { code: \"unknown_item_type\" },\n );\n }\n return {\n action: \"show\",\n type: toSchemaTypeDefinition(\n match,\n classifyTypeSource(match.name, context.customNames, new Set(context.extensionProvenance.keys())),\n context.extensionProvenance.get(match.name.toLowerCase()),\n ),\n file: {\n path: context.typesPath,\n },\n generated_at: nowIso(),\n };\n}\n\nexport function formatSchemaAddTypeHuman(result: SchemaAddTypeResult): string {\n const verb = result.replaced ? \"Updated\" : \"Registered\";\n const aliasSuffix =\n result.type.aliases && result.type.aliases.length > 0 ? ` (aliases: ${result.type.aliases.join(\", \")})` : \"\";\n return `${verb} custom item type \"${result.type.name}\"${aliasSuffix} in ${result.file.path}. Run: pm create \"${escapeForDoubleQuotes(result.type.name)}\" \"<title>\"`;\n}\n\nexport function formatSchemaRemoveTypeHuman(result: SchemaRemoveTypeResult): string {\n if (!result.removed) {\n return `No custom item type matched; nothing removed from ${result.file.path}.`;\n }\n const name = result.type?.name ?? \"(unknown)\";\n return `Removed custom item type \"${name}\" from ${result.file.path}.`;\n}\n\nexport function formatSchemaAddStatusHuman(result: SchemaAddStatusResult): string {\n const verb = result.replaced ? \"Updated\" : \"Registered\";\n const roleSuffix =\n result.status.roles && result.status.roles.length > 0 ? ` (roles: ${result.status.roles.join(\", \")})` : \"\";\n const aliasSuffix =\n result.status.aliases && result.status.aliases.length > 0 ? ` (aliases: ${result.status.aliases.join(\", \")})` : \"\";\n return `${verb} status \"${result.status.id}\"${roleSuffix}${aliasSuffix} in ${result.file.path}.`;\n}\n\nexport function formatSchemaRemoveStatusHuman(result: SchemaRemoveStatusResult): string {\n if (!result.removed) {\n return `No custom status matched; nothing removed from ${result.file.path}.`;\n }\n const id = result.status?.id ?? \"(unknown)\";\n return `Removed custom status \"${id}\" from ${result.file.path}.`;\n}\n\nexport function formatSchemaListHuman(result: SchemaListResult): string {\n const lines = [\n `Schema types: ${result.counts.total} total (${result.counts.builtin} builtin, ${result.counts.custom} custom, ${result.counts.extension} extension)`,\n ];\n for (const [label, entries] of [\n [\"builtin\", result.builtin],\n [\"custom\", result.custom],\n [\"extension\", result.extension],\n ] as const) {\n if (entries.length === 0) {\n continue;\n }\n lines.push(`${label}: ${entries.map((entry) => entry.name).join(\", \")}`);\n }\n lines.push(\n `statuses: ${result.statuses.counts.total} total (${result.statuses.counts.builtin} builtin, ${result.statuses.counts.custom} custom)`,\n );\n for (const [label, entries] of [\n [\"builtin statuses\", result.statuses.builtin],\n [\"custom statuses\", result.statuses.custom],\n ] as const) {\n if (entries.length === 0) {\n continue;\n }\n lines.push(`${label}: ${entries.map((entry) => entry.id).join(\", \")}`);\n }\n lines.push(`Inspect one: pm schema show <Type>`);\n return lines.join(\"\\n\");\n}\n\nexport function formatSchemaShowHuman(result: SchemaShowResult): string {\n const parts = [\n `type: ${result.type.name}`,\n `source: ${result.type.source}`,\n `folder: ${result.type.folder}`,\n ];\n if (result.type.default_status) {\n parts.push(`default_status: ${result.type.default_status}`);\n }\n if (result.type.aliases.length > 0) {\n parts.push(`aliases: ${result.type.aliases.join(\", \")}`);\n }\n if (result.type.description) {\n parts.push(`description: ${result.type.description}`);\n }\n if (result.type.options.length > 0) {\n parts.push(`options: ${result.type.options.map((option) => option.key).join(\", \")}`);\n }\n return parts.join(\"\\n\");\n}\n\n/**\n * Re-export so register-mutation can surface the hint in usage examples\n * without importing the core module directly.\n */\nexport { buildInvalidTypeHint };\n"],"names":["definition"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAM,0BAA0B,IAAI,IAAY,0BAA0B;AASnE,IAAM,qBAA0C,IAAI,IACzD,mCAAmC,IAAI,CAAC,eAAe,qBAAqB,WAAW,EAAE,CAAC,EAAE,OAC1F,CAAC,OAAO,GAAG,SAAS,CAAC,C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