@unbrained/pm-cli 2026.6.6 → 2026.6.8

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 (600) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +79 -0
  4. package/CONTRIBUTING.md +1 -1
  5. package/README.md +6 -2
  6. package/dist/cli/bootstrap-args.js +30 -13
  7. package/dist/cli/bootstrap-args.js.map +1 -1
  8. package/dist/cli/commander-usage.js +74 -4
  9. package/dist/cli/commander-usage.js.map +1 -1
  10. package/dist/cli/commands/aggregate.d.ts +8 -0
  11. package/dist/cli/commands/aggregate.js +84 -7
  12. package/dist/cli/commands/aggregate.js.map +1 -1
  13. package/dist/cli/commands/calendar.js +10 -3
  14. package/dist/cli/commands/calendar.js.map +1 -1
  15. package/dist/cli/commands/close-many.js +20 -11
  16. package/dist/cli/commands/close-many.js.map +1 -1
  17. package/dist/cli/commands/close.d.ts +1 -1
  18. package/dist/cli/commands/close.js +32 -10
  19. package/dist/cli/commands/close.js.map +1 -1
  20. package/dist/cli/commands/comments-audit.js +4 -3
  21. package/dist/cli/commands/comments-audit.js.map +1 -1
  22. package/dist/cli/commands/completion.js +105 -43
  23. package/dist/cli/commands/completion.js.map +1 -1
  24. package/dist/cli/commands/config.d.ts +5 -4
  25. package/dist/cli/commands/config.js +50 -2
  26. package/dist/cli/commands/config.js.map +1 -1
  27. package/dist/cli/commands/contracts.js +4 -3
  28. package/dist/cli/commands/contracts.js.map +1 -1
  29. package/dist/cli/commands/copy.d.ts +14 -0
  30. package/dist/cli/commands/copy.js +153 -0
  31. package/dist/cli/commands/copy.js.map +1 -0
  32. package/dist/cli/commands/extension/doctor.js +62 -2
  33. package/dist/cli/commands/extension/doctor.js.map +1 -1
  34. package/dist/cli/commands/extension/install-sources.d.ts +8 -0
  35. package/dist/cli/commands/extension/install-sources.js +82 -2
  36. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  37. package/dist/cli/commands/extension/scaffold.js +6 -14
  38. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  39. package/dist/cli/commands/extension.d.ts +29 -0
  40. package/dist/cli/commands/extension.js +61 -2
  41. package/dist/cli/commands/extension.js.map +1 -1
  42. package/dist/cli/commands/gc.js +10 -2
  43. package/dist/cli/commands/gc.js.map +1 -1
  44. package/dist/cli/commands/get.d.ts +9 -0
  45. package/dist/cli/commands/get.js +23 -2
  46. package/dist/cli/commands/get.js.map +1 -1
  47. package/dist/cli/commands/health.js +10 -2
  48. package/dist/cli/commands/health.js.map +1 -1
  49. package/dist/cli/commands/history-compact.d.ts +39 -0
  50. package/dist/cli/commands/history-compact.js +262 -0
  51. package/dist/cli/commands/history-compact.js.map +1 -0
  52. package/dist/cli/commands/index.d.ts +3 -1
  53. package/dist/cli/commands/index.js +5 -3
  54. package/dist/cli/commands/index.js.map +1 -1
  55. package/dist/cli/commands/init.d.ts +1 -0
  56. package/dist/cli/commands/init.js +48 -2
  57. package/dist/cli/commands/init.js.map +1 -1
  58. package/dist/cli/commands/list.d.ts +13 -2
  59. package/dist/cli/commands/list.js +189 -9
  60. package/dist/cli/commands/list.js.map +1 -1
  61. package/dist/cli/commands/normalize.js +6 -4
  62. package/dist/cli/commands/normalize.js.map +1 -1
  63. package/dist/cli/commands/reindex.js +8 -4
  64. package/dist/cli/commands/reindex.js.map +1 -1
  65. package/dist/cli/commands/schema.d.ts +13 -2
  66. package/dist/cli/commands/schema.js +66 -12
  67. package/dist/cli/commands/schema.js.map +1 -1
  68. package/dist/cli/commands/search.d.ts +11 -2
  69. package/dist/cli/commands/search.js +321 -35
  70. package/dist/cli/commands/search.js.map +1 -1
  71. package/dist/cli/commands/upgrade.js +4 -12
  72. package/dist/cli/commands/upgrade.js.map +1 -1
  73. package/dist/cli/error-guidance.js +26 -2
  74. package/dist/cli/error-guidance.js.map +1 -1
  75. package/dist/cli/extension-command-help.d.ts +1 -0
  76. package/dist/cli/extension-command-help.js +3 -2
  77. package/dist/cli/extension-command-help.js.map +1 -1
  78. package/dist/cli/help-content.js +10 -2
  79. package/dist/cli/help-content.js.map +1 -1
  80. package/dist/cli/main.d.ts +3 -0
  81. package/dist/cli/main.js +18 -37
  82. package/dist/cli/main.js.map +1 -1
  83. package/dist/cli/register-list-query.js +22 -5
  84. package/dist/cli/register-list-query.js.map +1 -1
  85. package/dist/cli/register-mutation.js +83 -39
  86. package/dist/cli/register-mutation.js.map +1 -1
  87. package/dist/cli/register-operations.js +31 -7
  88. package/dist/cli/register-operations.js.map +1 -1
  89. package/dist/cli/register-setup.js +7 -5
  90. package/dist/cli/register-setup.js.map +1 -1
  91. package/dist/cli/registration-helpers.js +26 -4
  92. package/dist/cli/registration-helpers.js.map +1 -1
  93. package/dist/cli-bundle/chunks/activity-A3QKFSSF.js +16 -0
  94. package/dist/cli-bundle/chunks/{activity-JM6DTDND.js → activity-Q7XMIZIH.js} +11 -11
  95. package/dist/cli-bundle/chunks/{aggregate-VNAHUNNF.js → aggregate-GBSHSXOB.js} +87 -17
  96. package/dist/cli-bundle/chunks/aggregate-GBSHSXOB.js.map +7 -0
  97. package/dist/cli-bundle/chunks/{aggregate-GI7WSZPH.js → aggregate-HKQJZUBG.js} +88 -18
  98. package/dist/cli-bundle/chunks/aggregate-HKQJZUBG.js.map +1 -0
  99. package/dist/cli-bundle/chunks/{append-WMKRXKCE.js → append-3RFOU7P5.js} +8 -8
  100. package/dist/cli-bundle/chunks/{append-7H5N64R2.js → append-OM74OJVT.js} +8 -8
  101. package/dist/cli-bundle/chunks/{chunk-KJE2FOS4.js → chunk-2BYKYPWY.js} +26 -4
  102. package/dist/cli-bundle/chunks/chunk-2BYKYPWY.js.map +7 -0
  103. package/dist/cli-bundle/chunks/{chunk-XTGLRY2Y.js → chunk-2HMD3JM2.js} +6 -6
  104. package/dist/cli-bundle/chunks/{chunk-PRJCELV4.js → chunk-2YPVCD7T.js} +8 -8
  105. package/dist/cli-bundle/chunks/{chunk-3FI4SEFT.js → chunk-3E3MDBTB.js} +62 -38
  106. package/dist/cli-bundle/chunks/chunk-3E3MDBTB.js.map +7 -0
  107. package/dist/cli-bundle/chunks/{chunk-U5SXYXSY.js → chunk-3TXWDGPU.js} +287 -45
  108. package/dist/cli-bundle/chunks/chunk-3TXWDGPU.js.map +7 -0
  109. package/dist/cli-bundle/chunks/{chunk-HZGUAH22.js → chunk-4TI3532H.js} +6 -7
  110. package/dist/cli-bundle/chunks/chunk-4TI3532H.js.map +1 -0
  111. package/dist/cli-bundle/chunks/{chunk-2HVRUSQA.js → chunk-4WYBLB6J.js} +3 -3
  112. package/dist/cli-bundle/chunks/{chunk-R6UFP2GE.js → chunk-5NVJA7IW.js} +7 -7
  113. package/dist/cli-bundle/chunks/{chunk-Q7SPNHLW.js → chunk-5WO2VKFA.js} +190 -16
  114. package/dist/cli-bundle/chunks/chunk-5WO2VKFA.js.map +7 -0
  115. package/dist/cli-bundle/chunks/{chunk-IOR7LGF4.js → chunk-7NQIY7Z6.js} +89 -7
  116. package/dist/cli-bundle/chunks/chunk-7NQIY7Z6.js.map +1 -0
  117. package/dist/cli-bundle/chunks/{chunk-ECCMVXGM.js → chunk-7WXGR44E.js} +305 -216
  118. package/dist/cli-bundle/chunks/chunk-7WXGR44E.js.map +7 -0
  119. package/dist/cli-bundle/chunks/{chunk-XSJCLN2R.js → chunk-AEMKH5WQ.js} +3 -3
  120. package/dist/cli-bundle/chunks/{chunk-WOPXVEZP.js → chunk-ALSRBNYB.js} +28 -9
  121. package/dist/cli-bundle/chunks/chunk-ALSRBNYB.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{chunk-6ER6DXH5.js → chunk-AXBUHLW7.js} +9 -9
  123. package/dist/cli-bundle/chunks/{chunk-BQHUILZS.js → chunk-BFJPMUF5.js} +5 -5
  124. package/dist/cli-bundle/chunks/{chunk-I6BNFU5X.js → chunk-BKQMJXWY.js} +3 -3
  125. package/dist/cli-bundle/chunks/{chunk-XLTD2HN3.js → chunk-CBJXWXI5.js} +2 -2
  126. package/dist/cli-bundle/chunks/{chunk-FRAUKRU2.js → chunk-D7WK2PKB.js} +36 -15
  127. package/dist/cli-bundle/chunks/chunk-D7WK2PKB.js.map +1 -0
  128. package/dist/cli-bundle/chunks/{chunk-PROOHX4K.js → chunk-DV27WDA7.js} +104 -21
  129. package/dist/cli-bundle/chunks/chunk-DV27WDA7.js.map +7 -0
  130. package/dist/cli-bundle/chunks/{chunk-3BWOVLTH.js → chunk-EPWT7BEA.js} +8 -8
  131. package/dist/cli-bundle/chunks/chunk-ETZZU5QF.js +112 -0
  132. package/dist/cli-bundle/chunks/chunk-ETZZU5QF.js.map +1 -0
  133. package/dist/cli-bundle/chunks/{chunk-TPH5XEVD.js → chunk-F33AQIB4.js} +303 -207
  134. package/dist/cli-bundle/chunks/chunk-F33AQIB4.js.map +1 -0
  135. package/dist/cli-bundle/chunks/{chunk-NUZ5HKR4.js → chunk-F33VC5EX.js} +2 -2
  136. package/dist/cli-bundle/chunks/{chunk-WKY2IBOQ.js → chunk-FGRJZVXD.js} +3 -3
  137. package/dist/cli-bundle/chunks/{chunk-77GFDHGF.js → chunk-FO2TYSQZ.js} +2 -2
  138. package/dist/cli-bundle/chunks/{chunk-GXSUPCBV.js → chunk-HOA3GMB6.js} +4 -4
  139. package/dist/cli-bundle/chunks/{chunk-OVQCEJPG.js → chunk-HP35AVFS.js} +2 -2
  140. package/dist/cli-bundle/chunks/{chunk-KJ33AOCY.js → chunk-J4DKAGTM.js} +3 -3
  141. package/dist/cli-bundle/chunks/{chunk-ME2YH6FN.js → chunk-JS47EKLP.js} +7 -7
  142. package/dist/cli-bundle/chunks/{chunk-T3LC5LKB.js → chunk-K62SNVVE.js} +5 -6
  143. package/dist/cli-bundle/chunks/chunk-K62SNVVE.js.map +7 -0
  144. package/dist/cli-bundle/chunks/{chunk-GU2ZJ2VV.js → chunk-KBKJVXUS.js} +35 -14
  145. package/dist/cli-bundle/chunks/chunk-KBKJVXUS.js.map +7 -0
  146. package/dist/cli-bundle/chunks/{chunk-KWU6HG75.js → chunk-KCGMABHM.js} +101 -18
  147. package/dist/cli-bundle/chunks/chunk-KCGMABHM.js.map +1 -0
  148. package/dist/cli-bundle/chunks/{chunk-I2HSTRJF.js → chunk-KN4WSESY.js} +5 -5
  149. package/dist/cli-bundle/chunks/{chunk-RZN6VURO.js → chunk-KP4KIUQT.js} +3 -3
  150. package/dist/cli-bundle/chunks/{chunk-5FDATVEZ.js → chunk-KS2U7BZ3.js} +71 -17
  151. package/dist/cli-bundle/chunks/chunk-KS2U7BZ3.js.map +1 -0
  152. package/dist/cli-bundle/chunks/{chunk-MITFDD35.js → chunk-KVXIQDJG.js} +12 -12
  153. package/dist/cli-bundle/chunks/{chunk-IJGCZSIQ.js → chunk-L3LYL3ID.js} +12 -12
  154. package/dist/cli-bundle/chunks/{chunk-AO442XLN.js → chunk-M7UBTVFT.js} +10 -6
  155. package/dist/cli-bundle/chunks/{chunk-AO442XLN.js.map → chunk-M7UBTVFT.js.map} +2 -2
  156. package/dist/cli-bundle/chunks/{chunk-UM2GBHS4.js → chunk-MSH23UWO.js} +4 -4
  157. package/dist/cli-bundle/chunks/{chunk-LCM63IXU.js → chunk-N4SQZ7L3.js} +2 -2
  158. package/dist/cli-bundle/chunks/{chunk-3VAM3NNM.js → chunk-NDSMKB2I.js} +3 -3
  159. package/dist/cli-bundle/chunks/{chunk-6P6GGMOG.js → chunk-NGEEXR2R.js} +2 -2
  160. package/dist/cli-bundle/chunks/{chunk-PO3GSVFV.js → chunk-NLVCMVC7.js} +2 -2
  161. package/dist/cli-bundle/chunks/{chunk-N7ACFE26.js → chunk-NUKHZZNM.js} +3 -3
  162. package/dist/cli-bundle/chunks/{chunk-GGYWB3Y2.js → chunk-ODN53S6H.js} +6 -6
  163. package/dist/cli-bundle/chunks/{chunk-23YFZ3IG.js → chunk-OTY2YEH5.js} +14 -14
  164. package/dist/cli-bundle/chunks/{chunk-2RSPZI5H.js → chunk-OVSSE2JP.js} +8 -8
  165. package/dist/cli-bundle/chunks/{chunk-4LL6TK5B.js → chunk-PQDH3S54.js} +59 -35
  166. package/dist/cli-bundle/chunks/chunk-PQDH3S54.js.map +1 -0
  167. package/dist/cli-bundle/chunks/{chunk-2VVCGBNV.js → chunk-QF4OPBAG.js} +9 -9
  168. package/dist/cli-bundle/chunks/{chunk-QO7EBBOM.js → chunk-QFVASU44.js} +38 -7
  169. package/dist/cli-bundle/chunks/chunk-QFVASU44.js.map +7 -0
  170. package/dist/cli-bundle/chunks/{chunk-WSMOSYRD.js → chunk-QQPZYP73.js} +14 -14
  171. package/dist/cli-bundle/chunks/{chunk-OZ7NSQHL.js → chunk-QWNUDGFQ.js} +8 -8
  172. package/dist/cli-bundle/chunks/{chunk-AY43SBIN.js → chunk-R4XIE7NQ.js} +54 -8
  173. package/dist/cli-bundle/chunks/chunk-R4XIE7NQ.js.map +1 -0
  174. package/dist/cli-bundle/chunks/{chunk-52MAOQ6J.js → chunk-RISLL7XH.js} +71 -17
  175. package/dist/cli-bundle/chunks/chunk-RISLL7XH.js.map +7 -0
  176. package/dist/cli-bundle/chunks/{chunk-GCOQW437.js → chunk-SDLEYY6A.js} +3 -3
  177. package/dist/cli-bundle/chunks/{chunk-W7XABV4H.js → chunk-SM3RMWGO.js} +191 -17
  178. package/dist/cli-bundle/chunks/chunk-SM3RMWGO.js.map +1 -0
  179. package/dist/cli-bundle/chunks/{chunk-PIU6RSL3.js → chunk-TBLBEOEX.js} +9 -9
  180. package/dist/cli-bundle/chunks/{chunk-SKJWX3QB.js → chunk-TXKENAQP.js} +88 -6
  181. package/dist/cli-bundle/chunks/chunk-TXKENAQP.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{chunk-YL2DJGYS.js → chunk-UEXNNF3K.js} +7 -7
  183. package/dist/cli-bundle/chunks/{chunk-UBOPJT3S.js → chunk-UMMJAJB2.js} +9 -9
  184. package/dist/cli-bundle/chunks/chunk-URJEZOLB.js +115 -0
  185. package/dist/cli-bundle/chunks/chunk-URJEZOLB.js.map +7 -0
  186. package/dist/cli-bundle/chunks/{chunk-PDDFYW4X.js → chunk-VXBUXLVD.js} +27 -8
  187. package/dist/cli-bundle/chunks/chunk-VXBUXLVD.js.map +7 -0
  188. package/dist/cli-bundle/chunks/{chunk-LB3RUL2N.js → chunk-XEKZCBCS.js} +10 -6
  189. package/dist/cli-bundle/chunks/chunk-XEKZCBCS.js.map +1 -0
  190. package/dist/cli-bundle/chunks/{chunk-KAG77BY3.js → chunk-XLSQ3QLT.js} +2 -2
  191. package/dist/cli-bundle/chunks/{chunk-E5FJNAZA.js → chunk-XNGMIVQY.js} +3 -3
  192. package/dist/cli-bundle/chunks/{chunk-TCD3R2PF.js → chunk-XZS4MV37.js} +39 -8
  193. package/dist/cli-bundle/chunks/chunk-XZS4MV37.js.map +1 -0
  194. package/dist/cli-bundle/chunks/{chunk-RWPSOIEE.js → chunk-YEFOCDIK.js} +7 -7
  195. package/dist/cli-bundle/chunks/{chunk-5SFCOO6B.js → chunk-YJAKN2N2.js} +277 -35
  196. package/dist/cli-bundle/chunks/chunk-YJAKN2N2.js.map +1 -0
  197. package/dist/cli-bundle/chunks/{chunk-2VBQ6ZXS.js → chunk-Z2HXAFFH.js} +27 -5
  198. package/dist/cli-bundle/chunks/chunk-Z2HXAFFH.js.map +1 -0
  199. package/dist/cli-bundle/chunks/{chunk-3LB74A67.js → chunk-Z55JACL2.js} +53 -7
  200. package/dist/cli-bundle/chunks/chunk-Z55JACL2.js.map +7 -0
  201. package/dist/cli-bundle/chunks/{claim-4DBF6RVG.js → claim-NHBIIBOW.js} +10 -10
  202. package/dist/cli-bundle/chunks/{claim-X2P4IB7J.js → claim-RNEBQCOO.js} +10 -10
  203. package/dist/cli-bundle/chunks/close-UNTFXVM3.js +13 -0
  204. package/dist/cli-bundle/chunks/{close-PTYFA45H.js → close-ZMXL2WDS.js} +8 -8
  205. package/dist/cli-bundle/chunks/{close-many-ERFO6LHR.js → close-many-CDPQGQUB.js} +37 -28
  206. package/dist/cli-bundle/chunks/close-many-CDPQGQUB.js.map +1 -0
  207. package/dist/cli-bundle/chunks/{close-many-7CGIDPTJ.js → close-many-IQV5C2SI.js} +36 -27
  208. package/dist/cli-bundle/chunks/close-many-IQV5C2SI.js.map +7 -0
  209. package/dist/cli-bundle/chunks/{comments-QKBYCWKD.js → comments-EFVBHWPT.js} +10 -10
  210. package/dist/cli-bundle/chunks/{comments-OONGABK5.js → comments-J5Q4IJPH.js} +10 -10
  211. package/dist/cli-bundle/chunks/{config-6FXCQKIF.js → config-72253M2O.js} +127 -12
  212. package/dist/cli-bundle/chunks/config-72253M2O.js.map +1 -0
  213. package/dist/cli-bundle/chunks/{config-U4RZ4CQB.js → config-VFYA6BMI.js} +128 -13
  214. package/dist/cli-bundle/chunks/config-VFYA6BMI.js.map +7 -0
  215. package/dist/cli-bundle/chunks/{context-FYYJGFWS.js → context-AVLO4IFH.js} +14 -14
  216. package/dist/cli-bundle/chunks/{context-FYYJGFWS.js.map → context-AVLO4IFH.js.map} +2 -2
  217. package/dist/cli-bundle/chunks/{context-YMJ3Z2HQ.js → context-WMSI2D65.js} +15 -15
  218. package/dist/cli-bundle/chunks/context-WMSI2D65.js.map +1 -0
  219. package/dist/cli-bundle/chunks/{contracts-RFSPGVVJ.js → contracts-D4BN3VSQ.js} +7 -5
  220. package/dist/cli-bundle/chunks/contracts-D4BN3VSQ.js.map +7 -0
  221. package/dist/cli-bundle/chunks/{contracts-QDB6OMLQ.js → contracts-RGPOBLPL.js} +8 -6
  222. package/dist/cli-bundle/chunks/contracts-RGPOBLPL.js.map +1 -0
  223. package/dist/cli-bundle/chunks/copy-H6TXHK7S.js +185 -0
  224. package/dist/cli-bundle/chunks/copy-H6TXHK7S.js.map +7 -0
  225. package/dist/cli-bundle/chunks/copy-WXE3OOLZ.js +182 -0
  226. package/dist/cli-bundle/chunks/copy-WXE3OOLZ.js.map +1 -0
  227. package/dist/cli-bundle/chunks/create-EZWAMUKR.js +27 -0
  228. package/dist/cli-bundle/chunks/{create-I5L4EYYZ.js → create-PUAIJEZ7.js} +13 -13
  229. package/dist/cli-bundle/chunks/{delete-7HPGI4GZ.js → delete-PKR2JHLH.js} +7 -7
  230. package/dist/cli-bundle/chunks/{delete-VXUPH5RS.js → delete-WBME6WG5.js} +7 -7
  231. package/dist/cli-bundle/chunks/{deps-JSRRWC3Z.js → deps-4BQEDV4L.js} +7 -7
  232. package/dist/cli-bundle/chunks/{deps-SCZIFK2Z.js → deps-KWHQRO75.js} +7 -7
  233. package/dist/cli-bundle/chunks/{docs-GJK6K4VP.js → docs-364GT3ZR.js} +9 -9
  234. package/dist/cli-bundle/chunks/{docs-WW4N3MBM.js → docs-SCNBUGSV.js} +9 -9
  235. package/dist/cli-bundle/chunks/{extension-VDY2U33M.js → extension-CRE7JM47.js} +8 -6
  236. package/dist/cli-bundle/chunks/{extension-J7IBMFTD.js → extension-KK2UPXJD.js} +8 -6
  237. package/dist/cli-bundle/chunks/{files-ISZJGILQ.js → files-3GESQAWL.js} +9 -9
  238. package/dist/cli-bundle/chunks/{files-WKOD326U.js → files-66EHM5ZR.js} +9 -9
  239. package/dist/cli-bundle/chunks/{gc-JDVJ6OQ2.js → gc-D5IWOKQH.js} +13 -5
  240. package/dist/cli-bundle/chunks/gc-D5IWOKQH.js.map +1 -0
  241. package/dist/cli-bundle/chunks/{gc-ULPVWMTN.js → gc-MOQDND5J.js} +12 -4
  242. package/dist/cli-bundle/chunks/gc-MOQDND5J.js.map +7 -0
  243. package/dist/cli-bundle/chunks/{get-RV37HT3G.js → get-7J2ZCBV5.js} +34 -12
  244. package/dist/cli-bundle/chunks/get-7J2ZCBV5.js.map +1 -0
  245. package/dist/cli-bundle/chunks/{get-WXU6WI5P.js → get-WXSLXV3K.js} +33 -11
  246. package/dist/cli-bundle/chunks/get-WXSLXV3K.js.map +7 -0
  247. package/dist/cli-bundle/chunks/{health-LOI2HHKB.js → health-B6AEM7BV.js} +21 -13
  248. package/dist/cli-bundle/chunks/health-B6AEM7BV.js.map +1 -0
  249. package/dist/cli-bundle/chunks/{health-6L6EH4WR.js → health-YMZGOMVX.js} +20 -12
  250. package/dist/cli-bundle/chunks/health-YMZGOMVX.js.map +7 -0
  251. package/dist/cli-bundle/chunks/{history-PKN67D5O.js → history-TJTO5GCR.js} +10 -10
  252. package/dist/cli-bundle/chunks/history-ZERISU2L.js +20 -0
  253. package/dist/cli-bundle/chunks/history-compact-CKNN6UKW.js +290 -0
  254. package/dist/cli-bundle/chunks/history-compact-CKNN6UKW.js.map +7 -0
  255. package/dist/cli-bundle/chunks/history-compact-N2Q7IR3T.js +287 -0
  256. package/dist/cli-bundle/chunks/history-compact-N2Q7IR3T.js.map +1 -0
  257. package/dist/cli-bundle/chunks/history-redact-GODBYT5A.js +19 -0
  258. package/dist/cli-bundle/chunks/{history-redact-V4FOJGS7.js → history-redact-JUXUOH54.js} +11 -11
  259. package/dist/cli-bundle/chunks/{history-repair-HIBCBIKK.js → history-repair-CCCPBNTF.js} +11 -11
  260. package/dist/cli-bundle/chunks/{history-repair-SDMHR7JT.js → history-repair-TDBBSRVK.js} +11 -11
  261. package/dist/cli-bundle/chunks/{init-P56QYWJF.js → init-6ZPKD3YN.js} +9 -8
  262. package/dist/cli-bundle/chunks/init-CBZHXBR3.js +17 -0
  263. package/dist/cli-bundle/chunks/{learnings-MIXSESLK.js → learnings-U7U2FNIO.js} +10 -10
  264. package/dist/cli-bundle/chunks/{learnings-GDFRG5J7.js → learnings-WYNTYQ5T.js} +10 -10
  265. package/dist/cli-bundle/chunks/list-7MTPPZHC.js +20 -0
  266. package/dist/cli-bundle/chunks/{list-FGOWQMSM.js → list-JGP7ODML.js} +10 -10
  267. package/dist/cli-bundle/chunks/{notes-5UK3GEH2.js → notes-P25YVTEG.js} +10 -10
  268. package/dist/cli-bundle/chunks/{notes-4XVSH2AZ.js → notes-QIF6A7XS.js} +10 -10
  269. package/dist/cli-bundle/chunks/{plan-DUMBV3QB.js → plan-RACB5PI6.js} +13 -13
  270. package/dist/cli-bundle/chunks/{plan-SLMODHWX.js → plan-SSBJFWXA.js} +13 -13
  271. package/dist/cli-bundle/chunks/{register-list-query-POCFZ5JW.js → register-list-query-5IXDPUZ6.js} +31 -25
  272. package/dist/cli-bundle/chunks/register-list-query-5IXDPUZ6.js.map +1 -0
  273. package/dist/cli-bundle/chunks/{register-list-query-WST76HSQ.js → register-list-query-GQAEIG4K.js} +30 -24
  274. package/dist/cli-bundle/chunks/register-list-query-GQAEIG4K.js.map +7 -0
  275. package/dist/cli-bundle/chunks/{register-mutation-N5GSUZJV.js → register-mutation-FAS4YG63.js} +72 -50
  276. package/dist/cli-bundle/chunks/register-mutation-FAS4YG63.js.map +1 -0
  277. package/dist/cli-bundle/chunks/{register-mutation-OA675SOU.js → register-mutation-YZCUILGO.js} +71 -49
  278. package/dist/cli-bundle/chunks/register-mutation-YZCUILGO.js.map +7 -0
  279. package/dist/cli-bundle/chunks/{register-operations-N3PMHXH5.js → register-operations-IBYWNJN5.js} +57 -34
  280. package/dist/cli-bundle/chunks/register-operations-IBYWNJN5.js.map +7 -0
  281. package/dist/cli-bundle/chunks/{register-operations-GNHBE5I3.js → register-operations-S2BOLUPF.js} +58 -35
  282. package/dist/cli-bundle/chunks/register-operations-S2BOLUPF.js.map +1 -0
  283. package/dist/cli-bundle/chunks/{register-setup-ZHJI2DI3.js → register-setup-ABA2JPWO.js} +20 -19
  284. package/dist/cli-bundle/chunks/{register-setup-ZHJI2DI3.js.map → register-setup-ABA2JPWO.js.map} +2 -2
  285. package/dist/cli-bundle/chunks/{register-setup-JIMPKJKV.js → register-setup-JRZ4UMWZ.js} +21 -20
  286. package/dist/cli-bundle/chunks/register-setup-JRZ4UMWZ.js.map +1 -0
  287. package/dist/cli-bundle/chunks/restore-3JRX27QW.js +17 -0
  288. package/dist/cli-bundle/chunks/{restore-PBL6T5TW.js → restore-K72ZNPEP.js} +11 -11
  289. package/dist/cli-bundle/chunks/{schema-2NOO6NGB.js → schema-3VKRDBLC.js} +76 -20
  290. package/dist/cli-bundle/chunks/schema-3VKRDBLC.js.map +7 -0
  291. package/dist/cli-bundle/chunks/{schema-EBI4NLUO.js → schema-UL4B2JX5.js} +77 -21
  292. package/dist/cli-bundle/chunks/schema-UL4B2JX5.js.map +1 -0
  293. package/dist/cli-bundle/chunks/{search-OA6JX27A.js → search-632WJ7GO.js} +516 -41
  294. package/dist/cli-bundle/chunks/search-632WJ7GO.js.map +7 -0
  295. package/dist/cli-bundle/chunks/{search-JPUQTVCY.js → search-EQDHSE4G.js} +510 -42
  296. package/dist/cli-bundle/chunks/search-EQDHSE4G.js.map +1 -0
  297. package/dist/cli-bundle/chunks/{stats-XYB6KTFG.js → stats-O4UTMJMC.js} +7 -7
  298. package/dist/cli-bundle/chunks/{stats-CV54BAWY.js → stats-WLJ3XBF5.js} +7 -7
  299. package/dist/cli-bundle/chunks/{telemetry-LMJ7PFUO.js → telemetry-EUVHFSQU.js} +4 -4
  300. package/dist/cli-bundle/chunks/{telemetry-NCMEPJNR.js → telemetry-NRVWX25E.js} +4 -4
  301. package/dist/cli-bundle/chunks/{test-WBROAJIE.js → test-GXUBQNUC.js} +14 -13
  302. package/dist/cli-bundle/chunks/test-XN7RJL5Z.js +32 -0
  303. package/dist/cli-bundle/chunks/{test-all-N6NSRDTV.js → test-all-UTFXC7S2.js} +16 -15
  304. package/dist/cli-bundle/chunks/{test-all-N6NSRDTV.js.map → test-all-UTFXC7S2.js.map} +1 -1
  305. package/dist/cli-bundle/chunks/{test-all-NTOZ7C3M.js → test-all-XM6OKI3L.js} +14 -13
  306. package/dist/cli-bundle/chunks/{test-all-NTOZ7C3M.js.map → test-all-XM6OKI3L.js.map} +1 -1
  307. package/dist/cli-bundle/chunks/{test-runs-V6A7LPWZ.js → test-runs-7FHCPEA3.js} +5 -5
  308. package/dist/cli-bundle/chunks/{test-runs-WMVTQU3Y.js → test-runs-IK6E2HNX.js} +5 -5
  309. package/dist/cli-bundle/chunks/update-LFBSEW3N.js +21 -0
  310. package/dist/cli-bundle/chunks/update-U4B4OMHZ.js +25 -0
  311. package/dist/cli-bundle/chunks/{update-many-KGGEYABR.js → update-many-5KD33MKY.js} +22 -22
  312. package/dist/cli-bundle/chunks/{update-many-EM6OXYGO.js → update-many-N3YTM7K4.js} +22 -22
  313. package/dist/cli-bundle/chunks/{upgrade-BLI7XBAJ.js → upgrade-5SRFLUNW.js} +8 -14
  314. package/dist/cli-bundle/chunks/upgrade-5SRFLUNW.js.map +7 -0
  315. package/dist/cli-bundle/chunks/{upgrade-LXPOQKFV.js → upgrade-FFXGO43H.js} +9 -15
  316. package/dist/cli-bundle/chunks/upgrade-FFXGO43H.js.map +1 -0
  317. package/dist/cli-bundle/chunks/{validate-L5J6A7YO.js → validate-CRWXZILW.js} +20 -19
  318. package/dist/cli-bundle/chunks/{validate-L5J6A7YO.js.map → validate-CRWXZILW.js.map} +1 -1
  319. package/dist/cli-bundle/chunks/{validate-AGOAUOVW.js → validate-T3LPWSZG.js} +18 -17
  320. package/dist/cli-bundle/chunks/{validate-AGOAUOVW.js.map → validate-T3LPWSZG.js.map} +1 -1
  321. package/dist/cli-bundle/main.js +160 -87
  322. package/dist/cli-bundle/main.js.map +3 -3
  323. package/dist/core/config/nested-settings.d.ts +8 -8
  324. package/dist/core/config/nested-settings.js +71 -7
  325. package/dist/core/config/nested-settings.js.map +1 -1
  326. package/dist/core/config/positional-value.js +4 -2
  327. package/dist/core/config/positional-value.js.map +1 -1
  328. package/dist/core/diagnostics/remediation.js +7 -2
  329. package/dist/core/diagnostics/remediation.js.map +1 -1
  330. package/dist/core/extensions/extension-types.d.ts +36 -0
  331. package/dist/core/extensions/extension-types.js +2 -2
  332. package/dist/core/extensions/extension-types.js.map +1 -1
  333. package/dist/core/extensions/loader.js +46 -5
  334. package/dist/core/extensions/loader.js.map +1 -1
  335. package/dist/core/fs/fs-utils.js +29 -4
  336. package/dist/core/fs/fs-utils.js.map +1 -1
  337. package/dist/core/history/drift-scan.d.ts +3 -4
  338. package/dist/core/history/drift-scan.js +71 -18
  339. package/dist/core/history/drift-scan.js.map +1 -1
  340. package/dist/core/item/id.js +4 -5
  341. package/dist/core/item/id.js.map +1 -1
  342. package/dist/core/item/item-format.js +7 -3
  343. package/dist/core/item/item-format.js.map +1 -1
  344. package/dist/core/item/toon-decode.d.ts +7 -0
  345. package/dist/core/item/toon-decode.js +11 -2
  346. package/dist/core/item/toon-decode.js.map +1 -1
  347. package/dist/core/item/type-registry.js +25 -7
  348. package/dist/core/item/type-registry.js.map +1 -1
  349. package/dist/core/packages/root.d.ts +10 -0
  350. package/dist/core/packages/root.js +24 -2
  351. package/dist/core/packages/root.js.map +1 -1
  352. package/dist/core/schema/runtime-schema.js +3 -6
  353. package/dist/core/schema/runtime-schema.js.map +1 -1
  354. package/dist/core/search/background-refresh.d.ts +0 -8
  355. package/dist/core/search/background-refresh.js +2 -9
  356. package/dist/core/search/background-refresh.js.map +1 -1
  357. package/dist/core/search/cache.js +5 -3
  358. package/dist/core/search/cache.js.map +1 -1
  359. package/dist/core/search/corpus.d.ts +6 -0
  360. package/dist/core/search/corpus.js +22 -9
  361. package/dist/core/search/corpus.js.map +1 -1
  362. package/dist/core/search/embedding-batches.js +10 -7
  363. package/dist/core/search/embedding-batches.js.map +1 -1
  364. package/dist/core/search/relevance.d.ts +29 -0
  365. package/dist/core/search/relevance.js +226 -0
  366. package/dist/core/search/relevance.js.map +1 -0
  367. package/dist/core/search/vector-stores.d.ts +3 -0
  368. package/dist/core/search/vector-stores.js +27 -16
  369. package/dist/core/search/vector-stores.js.map +1 -1
  370. package/dist/core/sentry/instrument.js +4 -17
  371. package/dist/core/sentry/instrument.js.map +1 -1
  372. package/dist/core/shared/constants.js +15 -2
  373. package/dist/core/shared/constants.js.map +1 -1
  374. package/dist/core/shared/errors.d.ts +6 -0
  375. package/dist/core/shared/errors.js +2 -2
  376. package/dist/core/shared/errors.js.map +1 -1
  377. package/dist/core/shared/primitives.d.ts +8 -0
  378. package/dist/core/shared/primitives.js +29 -2
  379. package/dist/core/shared/primitives.js.map +1 -1
  380. package/dist/core/shared/time.js +42 -6
  381. package/dist/core/shared/time.js.map +1 -1
  382. package/dist/core/store/paths.js +40 -8
  383. package/dist/core/store/paths.js.map +1 -1
  384. package/dist/core/store/settings-validator.d.ts +11 -0
  385. package/dist/core/store/settings-validator.js +14 -2
  386. package/dist/core/store/settings-validator.js.map +1 -1
  387. package/dist/core/store/settings.js +109 -12
  388. package/dist/core/store/settings.js.map +1 -1
  389. package/dist/core/telemetry/runtime.d.ts +1 -0
  390. package/dist/core/telemetry/runtime.js +86 -5
  391. package/dist/core/telemetry/runtime.js.map +1 -1
  392. package/dist/mcp/server.js +109 -19
  393. package/dist/mcp/server.js.map +1 -1
  394. package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
  395. package/dist/sdk/cli-contracts/commander-types.js +15 -4
  396. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  397. package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
  398. package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
  399. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  400. package/dist/sdk/cli-contracts/tool-option-contracts.js +7 -2
  401. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  402. package/dist/sdk/cli-contracts/tool-parameter-tables.js +32 -3
  403. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  404. package/dist/sdk/cli-contracts.d.ts +3 -1
  405. package/dist/sdk/cli-contracts.js +44 -12
  406. package/dist/sdk/cli-contracts.js.map +1 -1
  407. package/dist/sdk/index.d.ts +2 -2
  408. package/dist/sdk/index.js +3 -3
  409. package/dist/sdk/index.js.map +1 -1
  410. package/dist/sdk/testing.d.ts +51 -1
  411. package/dist/sdk/testing.js +93 -2
  412. package/dist/sdk/testing.js.map +1 -1
  413. package/dist/types.d.ts +14 -0
  414. package/dist/types.js +2 -2
  415. package/dist/types.js.map +1 -1
  416. package/docs/AGENT_GUIDE.md +3 -1
  417. package/docs/CLAUDE_CODE_PLUGIN.md +4 -4
  418. package/docs/CODEX_PLUGIN.md +1 -1
  419. package/docs/COMMANDS.md +14 -5
  420. package/docs/CONFIGURATION.md +28 -1
  421. package/docs/EXTENSIONS.md +17 -9
  422. package/docs/QUICKSTART.md +1 -1
  423. package/docs/RELEASING.md +17 -0
  424. package/docs/SDK.md +66 -0
  425. package/docs/TESTING.md +14 -0
  426. package/marketplace.json +1 -1
  427. package/package.json +2 -1
  428. package/packages/pm-governance-audit/README.md +14 -0
  429. package/packages/pm-governance-audit/extensions/governance-audit/index.js +39 -1
  430. package/packages/pm-governance-audit/extensions/governance-audit/index.ts +40 -2
  431. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +1 -1
  432. package/packages/pm-governance-audit/package.json +4 -2
  433. package/packages/pm-lifecycle-hooks/README.md +21 -0
  434. package/packages/pm-search-advanced/README.md +38 -0
  435. package/packages/pm-search-advanced/extensions/search-advanced/index.js +17 -0
  436. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +17 -0
  437. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +216 -1
  438. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +271 -2
  439. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  440. package/plugins/pm-claude/README.md +7 -7
  441. package/plugins/pm-claude/commands/pm-init.md +1 -1
  442. package/plugins/pm-codex/README.md +1 -1
  443. package/dist/cli-bundle/chunks/activity-CVXTCHYY.js +0 -16
  444. package/dist/cli-bundle/chunks/aggregate-GI7WSZPH.js.map +0 -1
  445. package/dist/cli-bundle/chunks/aggregate-VNAHUNNF.js.map +0 -7
  446. package/dist/cli-bundle/chunks/chunk-2VBQ6ZXS.js.map +0 -1
  447. package/dist/cli-bundle/chunks/chunk-3FI4SEFT.js.map +0 -7
  448. package/dist/cli-bundle/chunks/chunk-3LB74A67.js.map +0 -7
  449. package/dist/cli-bundle/chunks/chunk-4LL6TK5B.js.map +0 -1
  450. package/dist/cli-bundle/chunks/chunk-52MAOQ6J.js.map +0 -7
  451. package/dist/cli-bundle/chunks/chunk-5FDATVEZ.js.map +0 -1
  452. package/dist/cli-bundle/chunks/chunk-5SFCOO6B.js.map +0 -1
  453. package/dist/cli-bundle/chunks/chunk-AY43SBIN.js.map +0 -1
  454. package/dist/cli-bundle/chunks/chunk-ECCMVXGM.js.map +0 -7
  455. package/dist/cli-bundle/chunks/chunk-FRAUKRU2.js.map +0 -1
  456. package/dist/cli-bundle/chunks/chunk-GU2ZJ2VV.js.map +0 -7
  457. package/dist/cli-bundle/chunks/chunk-HZGUAH22.js.map +0 -1
  458. package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js.map +0 -1
  459. package/dist/cli-bundle/chunks/chunk-KJE2FOS4.js.map +0 -7
  460. package/dist/cli-bundle/chunks/chunk-KWU6HG75.js.map +0 -1
  461. package/dist/cli-bundle/chunks/chunk-LB3RUL2N.js.map +0 -1
  462. package/dist/cli-bundle/chunks/chunk-PDDFYW4X.js.map +0 -7
  463. package/dist/cli-bundle/chunks/chunk-PROOHX4K.js.map +0 -7
  464. package/dist/cli-bundle/chunks/chunk-Q7SPNHLW.js.map +0 -7
  465. package/dist/cli-bundle/chunks/chunk-QO7EBBOM.js.map +0 -7
  466. package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js.map +0 -7
  467. package/dist/cli-bundle/chunks/chunk-T3LC5LKB.js.map +0 -7
  468. package/dist/cli-bundle/chunks/chunk-TCD3R2PF.js.map +0 -1
  469. package/dist/cli-bundle/chunks/chunk-TPH5XEVD.js.map +0 -1
  470. package/dist/cli-bundle/chunks/chunk-U5SXYXSY.js.map +0 -7
  471. package/dist/cli-bundle/chunks/chunk-W7XABV4H.js.map +0 -1
  472. package/dist/cli-bundle/chunks/chunk-WOPXVEZP.js.map +0 -1
  473. package/dist/cli-bundle/chunks/close-3HDWDA3L.js +0 -13
  474. package/dist/cli-bundle/chunks/close-many-7CGIDPTJ.js.map +0 -7
  475. package/dist/cli-bundle/chunks/close-many-ERFO6LHR.js.map +0 -1
  476. package/dist/cli-bundle/chunks/config-6FXCQKIF.js.map +0 -1
  477. package/dist/cli-bundle/chunks/config-U4RZ4CQB.js.map +0 -7
  478. package/dist/cli-bundle/chunks/context-YMJ3Z2HQ.js.map +0 -1
  479. package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js.map +0 -1
  480. package/dist/cli-bundle/chunks/contracts-RFSPGVVJ.js.map +0 -7
  481. package/dist/cli-bundle/chunks/create-JTZNCTQC.js +0 -27
  482. package/dist/cli-bundle/chunks/gc-JDVJ6OQ2.js.map +0 -1
  483. package/dist/cli-bundle/chunks/gc-ULPVWMTN.js.map +0 -7
  484. package/dist/cli-bundle/chunks/get-RV37HT3G.js.map +0 -1
  485. package/dist/cli-bundle/chunks/get-WXU6WI5P.js.map +0 -7
  486. package/dist/cli-bundle/chunks/health-6L6EH4WR.js.map +0 -7
  487. package/dist/cli-bundle/chunks/health-LOI2HHKB.js.map +0 -1
  488. package/dist/cli-bundle/chunks/history-2BA3T5AE.js +0 -20
  489. package/dist/cli-bundle/chunks/history-redact-JBZNXHGR.js +0 -19
  490. package/dist/cli-bundle/chunks/init-HIVSNX3O.js +0 -16
  491. package/dist/cli-bundle/chunks/list-MUSQNMTD.js +0 -20
  492. package/dist/cli-bundle/chunks/register-list-query-POCFZ5JW.js.map +0 -1
  493. package/dist/cli-bundle/chunks/register-list-query-WST76HSQ.js.map +0 -7
  494. package/dist/cli-bundle/chunks/register-mutation-N5GSUZJV.js.map +0 -1
  495. package/dist/cli-bundle/chunks/register-mutation-OA675SOU.js.map +0 -7
  496. package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js.map +0 -1
  497. package/dist/cli-bundle/chunks/register-operations-N3PMHXH5.js.map +0 -7
  498. package/dist/cli-bundle/chunks/register-setup-JIMPKJKV.js.map +0 -1
  499. package/dist/cli-bundle/chunks/restore-D4RGNX33.js +0 -17
  500. package/dist/cli-bundle/chunks/schema-2NOO6NGB.js.map +0 -7
  501. package/dist/cli-bundle/chunks/schema-EBI4NLUO.js.map +0 -1
  502. package/dist/cli-bundle/chunks/search-JPUQTVCY.js.map +0 -1
  503. package/dist/cli-bundle/chunks/search-OA6JX27A.js.map +0 -7
  504. package/dist/cli-bundle/chunks/test-MXX3E5JL.js +0 -31
  505. package/dist/cli-bundle/chunks/update-OSV3NAQB.js +0 -25
  506. package/dist/cli-bundle/chunks/update-YRXSUGYQ.js +0 -21
  507. package/dist/cli-bundle/chunks/upgrade-BLI7XBAJ.js.map +0 -7
  508. package/dist/cli-bundle/chunks/upgrade-LXPOQKFV.js.map +0 -1
  509. /package/dist/cli-bundle/chunks/{activity-CVXTCHYY.js.map → activity-A3QKFSSF.js.map} +0 -0
  510. /package/dist/cli-bundle/chunks/{activity-JM6DTDND.js.map → activity-Q7XMIZIH.js.map} +0 -0
  511. /package/dist/cli-bundle/chunks/{append-WMKRXKCE.js.map → append-3RFOU7P5.js.map} +0 -0
  512. /package/dist/cli-bundle/chunks/{append-7H5N64R2.js.map → append-OM74OJVT.js.map} +0 -0
  513. /package/dist/cli-bundle/chunks/{chunk-XTGLRY2Y.js.map → chunk-2HMD3JM2.js.map} +0 -0
  514. /package/dist/cli-bundle/chunks/{chunk-PRJCELV4.js.map → chunk-2YPVCD7T.js.map} +0 -0
  515. /package/dist/cli-bundle/chunks/{chunk-2HVRUSQA.js.map → chunk-4WYBLB6J.js.map} +0 -0
  516. /package/dist/cli-bundle/chunks/{chunk-R6UFP2GE.js.map → chunk-5NVJA7IW.js.map} +0 -0
  517. /package/dist/cli-bundle/chunks/{chunk-XSJCLN2R.js.map → chunk-AEMKH5WQ.js.map} +0 -0
  518. /package/dist/cli-bundle/chunks/{chunk-6ER6DXH5.js.map → chunk-AXBUHLW7.js.map} +0 -0
  519. /package/dist/cli-bundle/chunks/{chunk-BQHUILZS.js.map → chunk-BFJPMUF5.js.map} +0 -0
  520. /package/dist/cli-bundle/chunks/{chunk-I6BNFU5X.js.map → chunk-BKQMJXWY.js.map} +0 -0
  521. /package/dist/cli-bundle/chunks/{chunk-XLTD2HN3.js.map → chunk-CBJXWXI5.js.map} +0 -0
  522. /package/dist/cli-bundle/chunks/{chunk-3BWOVLTH.js.map → chunk-EPWT7BEA.js.map} +0 -0
  523. /package/dist/cli-bundle/chunks/{chunk-NUZ5HKR4.js.map → chunk-F33VC5EX.js.map} +0 -0
  524. /package/dist/cli-bundle/chunks/{chunk-WKY2IBOQ.js.map → chunk-FGRJZVXD.js.map} +0 -0
  525. /package/dist/cli-bundle/chunks/{chunk-77GFDHGF.js.map → chunk-FO2TYSQZ.js.map} +0 -0
  526. /package/dist/cli-bundle/chunks/{chunk-GXSUPCBV.js.map → chunk-HOA3GMB6.js.map} +0 -0
  527. /package/dist/cli-bundle/chunks/{chunk-OVQCEJPG.js.map → chunk-HP35AVFS.js.map} +0 -0
  528. /package/dist/cli-bundle/chunks/{chunk-KJ33AOCY.js.map → chunk-J4DKAGTM.js.map} +0 -0
  529. /package/dist/cli-bundle/chunks/{chunk-ME2YH6FN.js.map → chunk-JS47EKLP.js.map} +0 -0
  530. /package/dist/cli-bundle/chunks/{chunk-I2HSTRJF.js.map → chunk-KN4WSESY.js.map} +0 -0
  531. /package/dist/cli-bundle/chunks/{chunk-RZN6VURO.js.map → chunk-KP4KIUQT.js.map} +0 -0
  532. /package/dist/cli-bundle/chunks/{chunk-MITFDD35.js.map → chunk-KVXIQDJG.js.map} +0 -0
  533. /package/dist/cli-bundle/chunks/{chunk-IJGCZSIQ.js.map → chunk-L3LYL3ID.js.map} +0 -0
  534. /package/dist/cli-bundle/chunks/{chunk-UM2GBHS4.js.map → chunk-MSH23UWO.js.map} +0 -0
  535. /package/dist/cli-bundle/chunks/{chunk-LCM63IXU.js.map → chunk-N4SQZ7L3.js.map} +0 -0
  536. /package/dist/cli-bundle/chunks/{chunk-3VAM3NNM.js.map → chunk-NDSMKB2I.js.map} +0 -0
  537. /package/dist/cli-bundle/chunks/{chunk-6P6GGMOG.js.map → chunk-NGEEXR2R.js.map} +0 -0
  538. /package/dist/cli-bundle/chunks/{chunk-PO3GSVFV.js.map → chunk-NLVCMVC7.js.map} +0 -0
  539. /package/dist/cli-bundle/chunks/{chunk-N7ACFE26.js.map → chunk-NUKHZZNM.js.map} +0 -0
  540. /package/dist/cli-bundle/chunks/{chunk-GGYWB3Y2.js.map → chunk-ODN53S6H.js.map} +0 -0
  541. /package/dist/cli-bundle/chunks/{chunk-23YFZ3IG.js.map → chunk-OTY2YEH5.js.map} +0 -0
  542. /package/dist/cli-bundle/chunks/{chunk-2RSPZI5H.js.map → chunk-OVSSE2JP.js.map} +0 -0
  543. /package/dist/cli-bundle/chunks/{chunk-2VVCGBNV.js.map → chunk-QF4OPBAG.js.map} +0 -0
  544. /package/dist/cli-bundle/chunks/{chunk-WSMOSYRD.js.map → chunk-QQPZYP73.js.map} +0 -0
  545. /package/dist/cli-bundle/chunks/{chunk-OZ7NSQHL.js.map → chunk-QWNUDGFQ.js.map} +0 -0
  546. /package/dist/cli-bundle/chunks/{chunk-GCOQW437.js.map → chunk-SDLEYY6A.js.map} +0 -0
  547. /package/dist/cli-bundle/chunks/{chunk-PIU6RSL3.js.map → chunk-TBLBEOEX.js.map} +0 -0
  548. /package/dist/cli-bundle/chunks/{chunk-YL2DJGYS.js.map → chunk-UEXNNF3K.js.map} +0 -0
  549. /package/dist/cli-bundle/chunks/{chunk-UBOPJT3S.js.map → chunk-UMMJAJB2.js.map} +0 -0
  550. /package/dist/cli-bundle/chunks/{chunk-KAG77BY3.js.map → chunk-XLSQ3QLT.js.map} +0 -0
  551. /package/dist/cli-bundle/chunks/{chunk-E5FJNAZA.js.map → chunk-XNGMIVQY.js.map} +0 -0
  552. /package/dist/cli-bundle/chunks/{chunk-RWPSOIEE.js.map → chunk-YEFOCDIK.js.map} +0 -0
  553. /package/dist/cli-bundle/chunks/{claim-4DBF6RVG.js.map → claim-NHBIIBOW.js.map} +0 -0
  554. /package/dist/cli-bundle/chunks/{claim-X2P4IB7J.js.map → claim-RNEBQCOO.js.map} +0 -0
  555. /package/dist/cli-bundle/chunks/{close-3HDWDA3L.js.map → close-UNTFXVM3.js.map} +0 -0
  556. /package/dist/cli-bundle/chunks/{close-PTYFA45H.js.map → close-ZMXL2WDS.js.map} +0 -0
  557. /package/dist/cli-bundle/chunks/{comments-QKBYCWKD.js.map → comments-EFVBHWPT.js.map} +0 -0
  558. /package/dist/cli-bundle/chunks/{comments-OONGABK5.js.map → comments-J5Q4IJPH.js.map} +0 -0
  559. /package/dist/cli-bundle/chunks/{create-JTZNCTQC.js.map → create-EZWAMUKR.js.map} +0 -0
  560. /package/dist/cli-bundle/chunks/{create-I5L4EYYZ.js.map → create-PUAIJEZ7.js.map} +0 -0
  561. /package/dist/cli-bundle/chunks/{delete-7HPGI4GZ.js.map → delete-PKR2JHLH.js.map} +0 -0
  562. /package/dist/cli-bundle/chunks/{delete-VXUPH5RS.js.map → delete-WBME6WG5.js.map} +0 -0
  563. /package/dist/cli-bundle/chunks/{deps-JSRRWC3Z.js.map → deps-4BQEDV4L.js.map} +0 -0
  564. /package/dist/cli-bundle/chunks/{deps-SCZIFK2Z.js.map → deps-KWHQRO75.js.map} +0 -0
  565. /package/dist/cli-bundle/chunks/{docs-GJK6K4VP.js.map → docs-364GT3ZR.js.map} +0 -0
  566. /package/dist/cli-bundle/chunks/{docs-WW4N3MBM.js.map → docs-SCNBUGSV.js.map} +0 -0
  567. /package/dist/cli-bundle/chunks/{extension-VDY2U33M.js.map → extension-CRE7JM47.js.map} +0 -0
  568. /package/dist/cli-bundle/chunks/{extension-J7IBMFTD.js.map → extension-KK2UPXJD.js.map} +0 -0
  569. /package/dist/cli-bundle/chunks/{files-ISZJGILQ.js.map → files-3GESQAWL.js.map} +0 -0
  570. /package/dist/cli-bundle/chunks/{files-WKOD326U.js.map → files-66EHM5ZR.js.map} +0 -0
  571. /package/dist/cli-bundle/chunks/{history-PKN67D5O.js.map → history-TJTO5GCR.js.map} +0 -0
  572. /package/dist/cli-bundle/chunks/{history-2BA3T5AE.js.map → history-ZERISU2L.js.map} +0 -0
  573. /package/dist/cli-bundle/chunks/{history-redact-JBZNXHGR.js.map → history-redact-GODBYT5A.js.map} +0 -0
  574. /package/dist/cli-bundle/chunks/{history-redact-V4FOJGS7.js.map → history-redact-JUXUOH54.js.map} +0 -0
  575. /package/dist/cli-bundle/chunks/{history-repair-HIBCBIKK.js.map → history-repair-CCCPBNTF.js.map} +0 -0
  576. /package/dist/cli-bundle/chunks/{history-repair-SDMHR7JT.js.map → history-repair-TDBBSRVK.js.map} +0 -0
  577. /package/dist/cli-bundle/chunks/{init-P56QYWJF.js.map → init-6ZPKD3YN.js.map} +0 -0
  578. /package/dist/cli-bundle/chunks/{init-HIVSNX3O.js.map → init-CBZHXBR3.js.map} +0 -0
  579. /package/dist/cli-bundle/chunks/{learnings-MIXSESLK.js.map → learnings-U7U2FNIO.js.map} +0 -0
  580. /package/dist/cli-bundle/chunks/{learnings-GDFRG5J7.js.map → learnings-WYNTYQ5T.js.map} +0 -0
  581. /package/dist/cli-bundle/chunks/{list-MUSQNMTD.js.map → list-7MTPPZHC.js.map} +0 -0
  582. /package/dist/cli-bundle/chunks/{list-FGOWQMSM.js.map → list-JGP7ODML.js.map} +0 -0
  583. /package/dist/cli-bundle/chunks/{notes-5UK3GEH2.js.map → notes-P25YVTEG.js.map} +0 -0
  584. /package/dist/cli-bundle/chunks/{notes-4XVSH2AZ.js.map → notes-QIF6A7XS.js.map} +0 -0
  585. /package/dist/cli-bundle/chunks/{plan-DUMBV3QB.js.map → plan-RACB5PI6.js.map} +0 -0
  586. /package/dist/cli-bundle/chunks/{plan-SLMODHWX.js.map → plan-SSBJFWXA.js.map} +0 -0
  587. /package/dist/cli-bundle/chunks/{restore-D4RGNX33.js.map → restore-3JRX27QW.js.map} +0 -0
  588. /package/dist/cli-bundle/chunks/{restore-PBL6T5TW.js.map → restore-K72ZNPEP.js.map} +0 -0
  589. /package/dist/cli-bundle/chunks/{stats-XYB6KTFG.js.map → stats-O4UTMJMC.js.map} +0 -0
  590. /package/dist/cli-bundle/chunks/{stats-CV54BAWY.js.map → stats-WLJ3XBF5.js.map} +0 -0
  591. /package/dist/cli-bundle/chunks/{telemetry-LMJ7PFUO.js.map → telemetry-EUVHFSQU.js.map} +0 -0
  592. /package/dist/cli-bundle/chunks/{telemetry-NCMEPJNR.js.map → telemetry-NRVWX25E.js.map} +0 -0
  593. /package/dist/cli-bundle/chunks/{test-WBROAJIE.js.map → test-GXUBQNUC.js.map} +0 -0
  594. /package/dist/cli-bundle/chunks/{test-MXX3E5JL.js.map → test-XN7RJL5Z.js.map} +0 -0
  595. /package/dist/cli-bundle/chunks/{test-runs-V6A7LPWZ.js.map → test-runs-7FHCPEA3.js.map} +0 -0
  596. /package/dist/cli-bundle/chunks/{test-runs-WMVTQU3Y.js.map → test-runs-IK6E2HNX.js.map} +0 -0
  597. /package/dist/cli-bundle/chunks/{update-YRXSUGYQ.js.map → update-LFBSEW3N.js.map} +0 -0
  598. /package/dist/cli-bundle/chunks/{update-OSV3NAQB.js.map → update-U4B4OMHZ.js.map} +0 -0
  599. /package/dist/cli-bundle/chunks/{update-many-KGGEYABR.js.map → update-many-5KD33MKY.js.map} +0 -0
  600. /package/dist/cli-bundle/chunks/{update-many-EM6OXYGO.js.map → update-many-N3YTM7K4.js.map} +0 -0
@@ -1,3 +1,4 @@
1
+ import { readFile } from "node:fs/promises";
1
2
  import path from "node:path";
2
3
  import { pathToFileURL } from "node:url";
3
4
  import type {
@@ -9,6 +10,12 @@ import type {
9
10
  } from "../../../../src/sdk/runtime.js";
10
11
 
11
12
  const PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
13
+ const DEFAULT_EVAL_FIXTURES_PATH = path.join("tests", "search-eval", "golden-queries.json");
14
+ const DEFAULT_EVAL_MIN_NDCG_AT_5 = 0.7;
15
+ const EVAL_RANK_CUTOFF = 5;
16
+ const VALID_EVAL_SEARCH_MODES = new Set(["keyword", "semantic", "hybrid"] as const);
17
+
18
+ type EvalSearchMode = "keyword" | "semantic" | "hybrid";
12
19
 
13
20
  interface SearchRuntimeSdkModule {
14
21
  EXIT_CODE: {
@@ -31,6 +38,59 @@ const {
31
38
  readBooleanOption,
32
39
  } = sdk;
33
40
 
41
+ interface SearchEvalFixtureInput {
42
+ query?: unknown;
43
+ mode?: unknown;
44
+ expected_top_ids?: unknown;
45
+ min_ndcg_at_5?: unknown;
46
+ name?: unknown;
47
+ }
48
+
49
+ interface SearchEvalFixture {
50
+ name: string;
51
+ query: string;
52
+ mode: EvalSearchMode;
53
+ expected_top_ids: string[];
54
+ min_ndcg_at_5: number;
55
+ }
56
+
57
+ interface SearchEvalResult {
58
+ fixture: string;
59
+ query: string;
60
+ requested_mode: EvalSearchMode;
61
+ resolved_mode: SearchResult["mode"];
62
+ expected_top_ids: string[];
63
+ actual_top_ids: string[];
64
+ ndcg_at_5: number;
65
+ min_ndcg_at_5: number;
66
+ passed: boolean;
67
+ warnings: string[];
68
+ }
69
+
70
+ interface ReindexEvalSummary {
71
+ enabled: true;
72
+ fixtures_path: string;
73
+ k: number;
74
+ fixture_count: number;
75
+ pass_count: number;
76
+ fail_count: number;
77
+ average_ndcg_at_5: number;
78
+ passed: boolean;
79
+ results: SearchEvalResult[];
80
+ evaluated_at: string;
81
+ }
82
+
83
+ interface ReindexResultWithEval extends ReindexResult {
84
+ eval?: ReindexEvalSummary;
85
+ }
86
+
87
+ interface ReindexRuntimeOptions {
88
+ reindex: ReindexOptions;
89
+ eval?: {
90
+ fixturesPath: string;
91
+ };
92
+ }
93
+
34
94
  async function loadSearchSdkModule(): Promise<SearchRuntimeSdkModule> {
35
95
  const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
36
96
  if (typeof envRoot !== "string" || envRoot.trim().length === 0) {
@@ -155,6 +215,209 @@ function normalizeReindexOptions(rawOptions: Record<string, unknown>): ReindexOp
155
215
  };
156
216
  }
157
217
 
218
+ function normalizeEvalFixturePath(rawPath: string | undefined): string {
219
+ const candidate = typeof rawPath === "string" ? rawPath : DEFAULT_EVAL_FIXTURES_PATH;
220
+ return path.resolve(process.cwd(), candidate);
221
+ }
222
+
223
+ function normalizeReindexRuntimeOptions(rawOptions: Record<string, unknown>): ReindexRuntimeOptions {
224
+ const reindex = normalizeReindexOptions(rawOptions);
225
+ const evalEnabled = readBooleanOption(rawOptions, "eval") === true;
226
+ const evalFixturePath = readStringOption(rawOptions, "evalFixtures", ["eval_fixtures"]);
227
+ if (!evalEnabled) {
228
+ if (typeof evalFixturePath === "string" && evalFixturePath.trim().length > 0) {
229
+ throw new PmCliError("`--eval-fixtures` requires `--eval`.", EXIT_CODE.USAGE);
230
+ }
231
+ return { reindex };
232
+ }
233
+ return {
234
+ reindex,
235
+ eval: {
236
+ fixturesPath: normalizeEvalFixturePath(evalFixturePath),
237
+ },
238
+ };
239
+ }
240
+
241
+ function toScoreAtRank(relevance: number, rankIndex: number): number {
242
+ if (relevance <= 0) {
243
+ return 0;
244
+ }
245
+ return (2 ** relevance - 1) / Math.log2(rankIndex + 2);
246
+ }
247
+
248
+ function roundMetric(value: number): number {
249
+ return Math.round(value * 10_000) / 10_000;
250
+ }
251
+
252
+ function toCompactExpectedIds(value: unknown, fixtureLabel: string, fixturesPath: string): string[] {
253
+ if (!Array.isArray(value) || value.length === 0) {
254
+ throw new PmCliError(
255
+ `Reindex eval fixture ${fixtureLabel} in ${fixturesPath} must provide a non-empty expected_top_ids array.`,
256
+ EXIT_CODE.USAGE,
257
+ );
258
+ }
259
+ const expectedIds = value
260
+ .filter((entry): entry is string => typeof entry === "string")
261
+ .map((entry) => entry.trim())
262
+ .filter((entry) => entry.length > 0);
263
+ if (expectedIds.length === 0) {
264
+ throw new PmCliError(
265
+ `Reindex eval fixture ${fixtureLabel} in ${fixturesPath} must provide at least one non-empty expected_top_ids value.`,
266
+ EXIT_CODE.USAGE,
267
+ );
268
+ }
269
+ return [...new Set(expectedIds)];
270
+ }
271
+
272
+ function normalizeFixtureMode(rawMode: unknown, fixtureLabel: string, fixturesPath: string): EvalSearchMode {
273
+ if (rawMode === undefined) {
274
+ return "keyword";
275
+ }
276
+ const normalized = typeof rawMode === "string" ? rawMode.trim().toLowerCase() : "";
277
+ if (VALID_EVAL_SEARCH_MODES.has(normalized as EvalSearchMode)) {
278
+ return normalized as EvalSearchMode;
279
+ }
280
+ throw new PmCliError(
281
+ `Reindex eval fixture ${fixtureLabel} in ${fixturesPath} has unsupported mode "${String(rawMode)}". Expected keyword|semantic|hybrid.`,
282
+ EXIT_CODE.USAGE,
283
+ );
284
+ }
285
+
286
+ function normalizeFixtureThreshold(rawValue: unknown, fixtureLabel: string, fixturesPath: string): number {
287
+ if (rawValue === undefined) {
288
+ return DEFAULT_EVAL_MIN_NDCG_AT_5;
289
+ }
290
+ const parsed = typeof rawValue === "number" ? rawValue : Number.NaN;
291
+ if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {
292
+ throw new PmCliError(
293
+ `Reindex eval fixture ${fixtureLabel} in ${fixturesPath} has invalid min_ndcg_at_5; expected a number between 0 and 1.`,
294
+ EXIT_CODE.USAGE,
295
+ );
296
+ }
297
+ return parsed;
298
+ }
299
+
300
+ function normalizeFixtureEntry(rawFixture: unknown, index: number, fixturesPath: string): SearchEvalFixture {
301
+ if (!rawFixture || typeof rawFixture !== "object") {
302
+ throw new PmCliError(
303
+ `Reindex eval fixture at index ${index + 1} in ${fixturesPath} must be an object.`,
304
+ EXIT_CODE.USAGE,
305
+ );
306
+ }
307
+ const fixture = rawFixture as SearchEvalFixtureInput;
308
+ const rawQuery = typeof fixture.query === "string" ? fixture.query.trim() : "";
309
+ if (rawQuery.length === 0) {
310
+ throw new PmCliError(
311
+ `Reindex eval fixture at index ${index + 1} in ${fixturesPath} must provide a non-empty query.`,
312
+ EXIT_CODE.USAGE,
313
+ );
314
+ }
315
+ const fallbackName = `fixture-${index + 1}`;
316
+ const fixtureName = typeof fixture.name === "string" && fixture.name.trim().length > 0 ? fixture.name.trim() : fallbackName;
317
+ return {
318
+ name: fixtureName,
319
+ query: rawQuery,
320
+ mode: normalizeFixtureMode(fixture.mode, fixtureName, fixturesPath),
321
+ expected_top_ids: toCompactExpectedIds(fixture.expected_top_ids, fixtureName, fixturesPath),
322
+ min_ndcg_at_5: normalizeFixtureThreshold(fixture.min_ndcg_at_5, fixtureName, fixturesPath),
323
+ };
324
+ }
325
+
326
+ function normalizeFixtureCollection(parsed: unknown, fixturesPath: string): SearchEvalFixture[] {
327
+ const parsedObject = parsed as { fixtures?: unknown } | null;
328
+ const candidateFixtures = Array.isArray(parsed)
329
+ ? parsed
330
+ : parsedObject && Array.isArray(parsedObject.fixtures)
331
+ ? parsedObject.fixtures
332
+ : null;
333
+ if (!candidateFixtures) {
334
+ throw new PmCliError(
335
+ `Reindex eval fixtures at ${fixturesPath} must be an array or an object with a fixtures array.`,
336
+ EXIT_CODE.USAGE,
337
+ );
338
+ }
339
+ if (candidateFixtures.length === 0) {
340
+ throw new PmCliError(`Reindex eval fixtures at ${fixturesPath} must contain at least one fixture.`, EXIT_CODE.USAGE);
341
+ }
342
+ return candidateFixtures.map((entry, index) => normalizeFixtureEntry(entry, index, fixturesPath));
343
+ }
344
+
345
+ async function loadEvalFixtures(fixturesPath: string): Promise<SearchEvalFixture[]> {
346
+ let rawText = "";
347
+ try {
348
+ rawText = await readFile(fixturesPath, "utf8");
349
+ } catch {
350
+ throw new PmCliError(`Unable to read reindex eval fixtures at ${fixturesPath}.`, EXIT_CODE.USAGE);
351
+ }
352
+ let parsed: unknown;
353
+ try {
354
+ parsed = JSON.parse(rawText);
355
+ } catch {
356
+ throw new PmCliError(`Reindex eval fixtures at ${fixturesPath} must be valid JSON.`, EXIT_CODE.USAGE);
357
+ }
358
+ return normalizeFixtureCollection(parsed, fixturesPath);
359
+ }
360
+
361
+ function computeNdcgAt5(actualIds: readonly string[], expectedIds: readonly string[]): number {
362
+ const expectedTop = expectedIds.slice(0, EVAL_RANK_CUTOFF);
363
+ const relevanceById = new Map<string, number>();
364
+ for (let index = 0; index < expectedTop.length; index += 1) {
365
+ relevanceById.set(expectedTop[index], expectedTop.length - index);
366
+ }
367
+ const dcg = actualIds.slice(0, EVAL_RANK_CUTOFF).reduce((sum, id, index) => {
368
+ const relevance = relevanceById.get(id) ?? 0;
369
+ return sum + toScoreAtRank(relevance, index);
370
+ }, 0);
371
+ const idealDcg = expectedTop.reduce((sum, _id, index) => sum + toScoreAtRank(expectedTop.length - index, index), 0);
372
+ return dcg / idealDcg;
373
+ }
374
+
375
+ async function runFixtureEvaluation(fixture: SearchEvalFixture, global: GlobalOptions): Promise<SearchEvalResult> {
376
+ const searchResult = await runSearch(
377
+ fixture.query,
378
+ {
379
+ mode: fixture.mode,
380
+ limit: String(EVAL_RANK_CUTOFF),
381
+ fields: "id,score",
382
+ },
383
+ global,
384
+ );
385
+ const actualTopIds = searchResult.items.map((item) => (item as { id: string }).id).slice(0, EVAL_RANK_CUTOFF);
386
+ const ndcgAt5 = roundMetric(computeNdcgAt5(actualTopIds, fixture.expected_top_ids));
387
+ const minNdcgAt5 = roundMetric(fixture.min_ndcg_at_5);
388
+ return {
389
+ fixture: fixture.name,
390
+ query: fixture.query,
391
+ requested_mode: fixture.mode,
392
+ resolved_mode: searchResult.mode,
393
+ expected_top_ids: fixture.expected_top_ids,
394
+ actual_top_ids: actualTopIds,
395
+ ndcg_at_5: ndcgAt5,
396
+ min_ndcg_at_5: minNdcgAt5,
397
+ passed: ndcgAt5 >= minNdcgAt5,
398
+ warnings: searchResult.warnings ?? [],
399
+ };
400
+ }
401
+
402
+ async function runReindexEvaluation(fixturesPath: string, global: GlobalOptions): Promise<ReindexEvalSummary> {
403
+ const fixtures = await loadEvalFixtures(fixturesPath);
404
+ const results: SearchEvalResult[] = await Promise.all(fixtures.map((fixture) => runFixtureEvaluation(fixture, global)));
405
+ const passCount = results.filter((result) => result.passed).length;
406
+ const averageNdcg = roundMetric(results.reduce((sum, result) => sum + result.ndcg_at_5, 0) / results.length);
407
+ return {
408
+ enabled: true,
409
+ fixtures_path: fixturesPath,
410
+ k: EVAL_RANK_CUTOFF,
411
+ fixture_count: results.length,
412
+ pass_count: passCount,
413
+ fail_count: results.length - passCount,
414
+ average_ndcg_at_5: averageNdcg,
415
+ passed: passCount === results.length,
416
+ results,
417
+ evaluated_at: new Date().toISOString(),
418
+ };
419
+ }
420
+
158
421
  export async function runAdvancedSearchPackage(
159
422
  args: string[],
160
423
  rawOptions: Record<string, unknown>,
@@ -166,6 +429,12 @@ export async function runAdvancedSearchPackage(
166
429
  export async function runAdvancedReindexPackage(
167
430
  rawOptions: Record<string, unknown>,
168
431
  global: GlobalOptions,
169
- ): Promise<ReindexResult> {
170
- return runReindex(normalizeReindexOptions(rawOptions), global);
432
+ ): Promise<ReindexResultWithEval> {
433
+ const options = normalizeReindexRuntimeOptions(rawOptions);
434
+ const reindexResult = await runReindex(options.reindex, global);
435
+ if (!options.eval) {
436
+ return reindexResult;
437
+ }
438
+ const evalSummary = await runReindexEvaluation(options.eval.fixturesPath, global);
439
+ return { ...reindexResult, eval: evalSummary };
171
440
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pm-claude",
3
- "description": "Native pm CLI integration for Claude Code — 21 MCP tools, 5 workflow skills, 14 slash commands, 3 subagents (coordinator, triage, verification), hybrid TUI task tracking (pm as persistent store + Claude Code task panel as live view), session context injection, and full git-based project management without leaving Claude Code.",
3
+ "description": "Native pm CLI integration for Claude Code — 22 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents (coordinator, delivery-chain, triage, verification), hybrid TUI task tracking (pm as persistent store + Claude Code task panel as live view), session context injection, and full git-based project management without leaving Claude Code.",
4
4
  "version": "1.4.0",
5
5
  "author": {
6
6
  "name": "unbrained",
@@ -6,7 +6,7 @@ Native pm CLI integration for Claude Code. Use pm project management tools direc
6
6
 
7
7
  | Component | What it provides |
8
8
  |-----------|----------------|
9
- | **21 MCP tools** | Full pm surface: context, search, list, get, create, update, claim, release, close, comments, files, docs, notes, learnings, deps, test, validate, health, contracts, plan + `pm_run` for everything else |
9
+ | **22 MCP tools** | Full pm surface: context, search, list, get, create, copy, update, claim, release, close, comments, files, docs, notes, learnings, deps, test, validate, health, contracts, plan + `pm_run` for everything else |
10
10
  | **5 skills** | `pm-workflow`, `pm-developer`, `pm-release`, `pm-audit`, `pm-planner` — auto-loaded as Claude Code skills |
11
11
  | **14 slash commands** | Full lifecycle coverage — status, start, close, triage, audit, search, new, list, calendar, developer, planner, release, workflow, init |
12
12
  | **4 subagents** | `pm-coordinator` (batch/multi-item), `pm-triage-agent` (duplicate-safe item creation), `pm-verification-agent` (evidence + close readiness), and `pm-delivery-chain` (orchestrated delivery) |
@@ -29,7 +29,7 @@ claude plugin marketplace add /path/to/pm-cli
29
29
  # claude plugin marketplace add unbraind/pm-cli
30
30
  ```
31
31
 
32
- This installs all 21 MCP tools, 5 skills, 14 slash commands, 4 subagents, hybrid TUI tracking, and the session hook in one step.
32
+ This installs all 22 MCP tools, 5 skills, 14 slash commands, 4 subagents, hybrid TUI tracking, and the session hook in one step.
33
33
 
34
34
  ### Option B: Legacy marketplace alias (also works)
35
35
 
@@ -42,10 +42,10 @@ Both `pm` and `pm-cli` marketplace IDs resolve to the same plugin.
42
42
  ### Option C: Global MCP server via Claude Code CLI (MCP tools only)
43
43
 
44
44
  ```bash
45
- claude mcp add --transport stdio pm-mcp -- npx -y @unbrained/pm-cli pm-mcp
45
+ claude mcp add --transport stdio pm-mcp -- npx -y --package=@unbrained/pm-cli@latest pm-mcp
46
46
  ```
47
47
 
48
- This gives you the 21 MCP tools but not the skills, slash commands, or session hook.
48
+ This gives you the 22 MCP tools but not the skills, slash commands, or session hook.
49
49
 
50
50
  ### Option D: Direct `.mcp.json` (project-scoped MCP only)
51
51
 
@@ -193,8 +193,8 @@ All skills and commands implement this pattern for every claimed item:
193
193
 
194
194
  ## Session Context Injection
195
195
 
196
- At session start, the hook runs natively (no `pm` CLI required):
197
- - Uses `npx @unbrained/pm-cli` without requiring a global install
196
+ At session start, the hook runs the published `pm` CLI without requiring a global install:
197
+ - Uses `npx --yes --package=@unbrained/pm-cli@latest pm context --limit 5 --json`
198
198
  - Injects a compact summary of in-progress/open/blocked items
199
199
 
200
200
  Example output:
@@ -216,7 +216,7 @@ Use pm_context tool or /pm-status for full details.
216
216
  ## Requirements
217
217
 
218
218
  - Node.js ≥ 20
219
- - pm CLI resolved automatically via local dist (in repo) or `npx @unbrained/pm-cli` (no global install needed)
219
+ - pm CLI resolved automatically via local dist (in repo) or `npx --yes @unbrained/pm-cli@latest` (no global install needed)
220
220
  - Project initialized with `pm init` (or use `/pm-init`)
221
221
 
222
222
  ## Links
@@ -47,7 +47,7 @@ Initialize pm project tracking using native MCP tools. Argument: `$ARGUMENTS` (o
47
47
  - pm initialized at `.agents/pm/`
48
48
  - guidance mode defaults to `ask` (TTY prompt only); use `agentGuidance=add|skip|status` in `pm_run` options for deterministic behavior
49
49
  - Available slash commands: `/pm-status`, `/pm-new`, `/pm-start-task`, `/pm-close-task`, `/pm-list`, `/pm-search`, `/pm-triage`, `/pm-calendar`, `/pm-developer`, `/pm-planner`, `/pm-release`, `/pm-audit`, `/pm-workflow`
50
- - All 21 MCP tools available: `pm_context`, `pm_search`, `pm_list`, `pm_get`, `pm_create`, `pm_update`, `pm_claim`, `pm_release`, `pm_close`, `pm_comments`, `pm_files`, `pm_docs`, `pm_notes`, `pm_learnings`, `pm_deps`, `pm_test`, `pm_validate`, `pm_health`, `pm_contracts`, `pm_plan`, `pm_run`
50
+ - All 22 MCP tools available: `pm_context`, `pm_search`, `pm_list`, `pm_get`, `pm_create`, `pm_copy`, `pm_update`, `pm_claim`, `pm_release`, `pm_close`, `pm_comments`, `pm_files`, `pm_docs`, `pm_notes`, `pm_learnings`, `pm_deps`, `pm_test`, `pm_validate`, `pm_health`, `pm_contracts`, `pm_plan`, `pm_run`
51
51
  - Next: use `/pm-new <title>` to create your first item, or `/pm-status` to see the tracker state
52
52
 
53
53
  If initialization fails, report the error and suggest running `pm init` manually in the terminal.
@@ -17,7 +17,7 @@ codex plugin marketplace add .
17
17
 
18
18
  Restart Codex, then install **pm CLI** from the repo marketplace. The bundled MCP server starts through `plugins/pm-codex/scripts/pm-mcp-server.mjs`.
19
19
 
20
- For a published package install, keep `@unbrained/pm-cli` available through npm. The launcher uses the local repo build when present and falls back to `npx -y @unbrained/pm-cli@latest pm-mcp` when the plugin is cached outside the repository.
20
+ For a published package install, keep `@unbrained/pm-cli` available through npm. The launcher uses the local repo build when present and falls back to `npx -y --package=@unbrained/pm-cli@latest pm-mcp` when the plugin is cached outside the repository.
21
21
 
22
22
  ## Native Tools
23
23
 
@@ -1,16 +0,0 @@
1
- import {
2
- runActivity
3
- } from "./chunk-YL2DJGYS.js";
4
- import "./chunk-PRJCELV4.js";
5
- import "./chunk-UM2GBHS4.js";
6
- import "./chunk-WKY2IBOQ.js";
7
- import "./chunk-XTGLRY2Y.js";
8
- import "./chunk-T3LC5LKB.js";
9
- import "./chunk-AO442XLN.js";
10
- import "./chunk-KJE2FOS4.js";
11
- import "./chunk-QO7EBBOM.js";
12
- import "./chunk-U5SXYXSY.js";
13
- export {
14
- runActivity
15
- };
16
- //# sourceMappingURL=activity-CVXTCHYY.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../cli/commands/aggregate.ts"],"sourcesContent":["import { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../core/shared/split-comma-list.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { normalizeStatusInput } from \"../../core/item/status.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { type ItemStatus } from \"../../types/index.js\";\nimport { runList } from \"./list.js\";\n\ntype AggregateGroupField = \"parent\" | \"type\" | \"priority\" | \"status\" | \"assignee\" | \"tags\" | \"sprint\" | \"release\";\ntype AggregateGroupValue = string | number | null;\ntype AggregateGroupRecord = Partial<Record<AggregateGroupField, AggregateGroupValue>>;\ntype AggregateListedItem = {\n type: string;\n status: ItemStatus;\n priority: number;\n parent?: string;\n assignee?: string;\n tags: string[];\n sprint?: string;\n release?: string;\n};\n\nconst AGGREGATE_GROUP_FIELDS: AggregateGroupField[] = [\n \"parent\",\n \"type\",\n \"priority\",\n \"status\",\n \"assignee\",\n \"tags\",\n \"sprint\",\n \"release\",\n];\n\nexport interface AggregateOptions {\n groupBy?: string;\n count?: boolean;\n includeUnparented?: boolean;\n status?: string;\n type?: string;\n tag?: string;\n priority?: string;\n deadlineBefore?: string;\n deadlineAfter?: string;\n assignee?: string;\n assigneeFilter?: string;\n parent?: string;\n sprint?: string;\n release?: string;\n}\n\nexport interface AggregateRow {\n group: AggregateGroupRecord;\n count: number;\n}\n\nexport interface AggregateResult {\n groups: AggregateRow[];\n count: number;\n totals: {\n items_considered: number;\n items_grouped: number;\n items_skipped_unparented: number;\n };\n filters: {\n group_by: AggregateGroupField[];\n count: boolean;\n include_unparented: boolean;\n status: ItemStatus | null;\n type: string | null;\n tag: string | null;\n priority: string | null;\n deadline_before: string | null;\n deadline_after: string | null;\n assignee: string | null;\n assignee_filter: string | null;\n parent: string | null;\n sprint: string | null;\n release: string | null;\n };\n now: string;\n warnings?: string[];\n}\n\nfunction parseStatus(raw: string | undefined, statusRegistry: RuntimeStatusRegistry): ItemStatus | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = normalizeStatusInput(raw, statusRegistry);\n if (!normalized) {\n throw new PmCliError(\n `Status filter must be one of ${statusRegistry.definitions.map((definition) => definition.id).join(\"|\")}`,\n EXIT_CODE.USAGE,\n );\n }\n return normalized;\n}\n\nfunction parseGroupBy(raw: string | undefined): AggregateGroupField[] {\n const value = raw?.trim() ?? \"status\";\n if (value.length === 0) {\n throw new PmCliError(\"--group-by requires at least one field name\", EXIT_CODE.USAGE);\n }\n const requested = splitCommaList(value);\n if (requested.length === 0) {\n throw new PmCliError(\"--group-by requires a comma-separated list of fields\", EXIT_CODE.USAGE);\n }\n for (const field of requested) {\n if (!AGGREGATE_GROUP_FIELDS.includes(field as AggregateGroupField)) {\n throw new PmCliError(\n `Aggregate group fields must be one of ${AGGREGATE_GROUP_FIELDS.join(\"|\")}; received \"${field}\"`,\n EXIT_CODE.USAGE,\n );\n }\n }\n return requested as AggregateGroupField[];\n}\n\nfunction normalizeTagGroupValue(tags: string[]): string | null {\n const normalized = [...new Set(tags.map((tag) => tag.trim().toLowerCase()).filter((tag) => tag.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n if (normalized.length === 0) {\n return null;\n }\n return normalized.join(\",\");\n}\n\nfunction resolveGroupValue(field: AggregateGroupField, item: AggregateListedItem): AggregateGroupValue {\n switch (field) {\n case \"parent\":\n return item.parent ?? null;\n case \"type\":\n return item.type;\n case \"priority\":\n return item.priority;\n case \"status\":\n return item.status;\n case \"assignee\":\n return item.assignee ?? null;\n case \"tags\":\n return normalizeTagGroupValue(item.tags);\n case \"sprint\":\n return item.sprint ?? null;\n case \"release\":\n return item.release ?? null;\n default:\n return null;\n }\n}\n\nfunction compareNullableGroupValue(left: AggregateGroupValue | undefined, right: AggregateGroupValue | undefined): number {\n const leftValue = left ?? null;\n const rightValue = right ?? null;\n if (leftValue === rightValue) {\n return 0;\n }\n if (leftValue === null) {\n return 1;\n }\n if (rightValue === null) {\n return -1;\n }\n if (typeof leftValue === \"number\" && typeof rightValue === \"number\") {\n return leftValue - rightValue;\n }\n return String(leftValue).localeCompare(String(rightValue));\n}\n\nfunction buildGroupKey(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n return groupBy.map((field) => `${field}:${JSON.stringify(group[field] ?? null)}`).join(\"|\");\n}\n\nfunction compareAggregateRows(\n left: AggregateRow,\n right: AggregateRow,\n groupBy: AggregateGroupField[],\n): number {\n for (const field of groupBy) {\n const byField = compareNullableGroupValue(left.group[field], right.group[field]);\n if (byField !== 0) {\n return byField;\n }\n }\n return 0;\n}\n\nexport async function runAggregate(options: AggregateOptions, global: GlobalOptions): Promise<AggregateResult> {\n if (options.count === false) {\n throw new PmCliError(\"Aggregate currently supports grouped counts only. Pass --count.\", EXIT_CODE.USAGE);\n }\n\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const groupBy = parseGroupBy(options.groupBy);\n const status = parseStatus(options.status, statusRegistry);\n const includeUnparented = options.includeUnparented === true;\n\n const listed = await runList(\n status,\n {\n type: options.type,\n tag: options.tag,\n priority: options.priority,\n deadlineBefore: options.deadlineBefore,\n deadlineAfter: options.deadlineAfter,\n assignee: options.assignee,\n assigneeFilter: options.assigneeFilter,\n parent: options.parent,\n sprint: options.sprint,\n release: options.release,\n },\n global,\n );\n\n const grouped = new Map<string, AggregateRow>();\n let skippedUnparented = 0;\n let groupedItemCount = 0;\n\n for (const listedItem of listed.items) {\n const item = listedItem as AggregateListedItem;\n const group: AggregateGroupRecord = {};\n for (const field of groupBy) {\n group[field] = resolveGroupValue(field, item);\n }\n if (groupBy.includes(\"parent\") && group.parent === null && !includeUnparented) {\n skippedUnparented += 1;\n continue;\n }\n const key = buildGroupKey(groupBy, group);\n const existing = grouped.get(key);\n if (existing) {\n existing.count += 1;\n } else {\n grouped.set(key, {\n group,\n count: 1,\n });\n }\n groupedItemCount += 1;\n }\n\n const groups = [...grouped.values()].sort((left, right) => compareAggregateRows(left, right, groupBy));\n const warnings = listed.warnings && listed.warnings.length > 0 ? listed.warnings : undefined;\n\n return {\n groups,\n count: groups.length,\n totals: {\n items_considered: listed.items.length,\n items_grouped: groupedItemCount,\n items_skipped_unparented: skippedUnparented,\n },\n filters: {\n group_by: groupBy,\n count: true,\n include_unparented: includeUnparented,\n status: status ?? null,\n type: options.type ?? null,\n tag: options.tag ?? null,\n priority: options.priority ?? null,\n deadline_before: options.deadlineBefore ?? null,\n deadline_after: options.deadlineAfter ?? null,\n assignee: options.assignee ?? null,\n assignee_filter: options.assigneeFilter ?? null,\n parent: options.parent ?? null,\n sprint: options.sprint ?? null,\n release: options.release ?? null,\n },\n now: nowIso(),\n ...(warnings ? { warnings } : {}),\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAM,yBAAgD;EACpD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAqDF,SAAS,YAAY,KAAyB,gBAAqC;AACjF,MAAI,QAAQ,QAAW;AACrB,WAAO;EACT;AACA,QAAM,aAAa,qBAAqB,KAAK,cAAc;AAC3D,MAAI,CAAC,YAAY;AACf,UAAM,IAAI,WACR,gCAAgC,eAAe,YAAY,IAAI,CAAC,eAAe,WAAW,EAAE,EAAE,KAAK,GAAG,CAAC,IACvG,UAAU,KAAK;EAEnB;AACA,SAAO;AACT;AAEA,SAAS,aAAa,KAAuB;AAC3C,QAAM,QAAQ,KAAK,KAAI,KAAM;AAC7B,MAAI,MAAM,WAAW,GAAG;AACtB,UAAM,IAAI,WAAW,+CAA+C,UAAU,KAAK;EACrF;AACA,QAAM,YAAY,eAAe,KAAK;AACtC,MAAI,UAAU,WAAW,GAAG;AAC1B,UAAM,IAAI,WAAW,wDAAwD,UAAU,KAAK;EAC9F;AACA,aAAW,SAAS,WAAW;AAC7B,QAAI,CAAC,uBAAuB,SAAS,KAA4B,GAAG;AAClE,YAAM,IAAI,WACR,yCAAyC,uBAAuB,KAAK,GAAG,CAAC,eAAe,KAAK,KAC7F,UAAU,KAAK;IAEnB;EACF;AACA,SAAO;AACT;AAEA,SAAS,uBAAuB,MAAc;AAC5C,QAAM,aAAa,CAAC,GAAG,IAAI,IAAI,KAAK,IAAI,CAAC,QAAQ,IAAI,KAAI,EAAG,YAAW,CAAE,EAAE,OAAO,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,KAA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I,OAAO,WAAW;AAEnF,SAAO;IACL;IACA,OAAO,OAAO;IACd,QAAQ;MACN,kBAAkB,OAAO,MAAM;MAC/B,eAAe;MACf,0BAA0B;;IAE5B,SAAS;MACP,UAAU;MACV,OAAO;MACP,oBAAoB;MACpB,QAAQ,UAAU;MAClB,MAAM,QAAQ,QAAQ;MACtB,KAAK,QAAQ,OAAO;MACpB,UAAU,QAAQ,YAAY;MAC9B,iBAAiB,QAAQ,kBAAkB;MAC3C,gBAAgB,QAAQ,iBAAiB;MACzC,UAAU,QAAQ,YAAY;MAC9B,iBAAiB,QAAQ,kBAAkB;MAC3C,QAAQ,QAAQ,UAAU;MAC1B,QAAQ,QAAQ,UAAU;MAC1B,SAAS,QAAQ,WAAW;;IAE9B,KAAK,OAAM;IACX,GAAI,WAAW,EAAE,SAAQ,IAAK,CAAA;;AAElC","debugId":"ee0c571c-dc7a-52dd-9d46-9c17bebcc3cb"}
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../../cli/commands/aggregate.ts"],
4
- "sourcesContent": ["import { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../core/shared/split-comma-list.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { normalizeStatusInput } from \"../../core/item/status.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { type ItemStatus } from \"../../types/index.js\";\nimport { runList } from \"./list.js\";\n\ntype AggregateGroupField = \"parent\" | \"type\" | \"priority\" | \"status\" | \"assignee\" | \"tags\" | \"sprint\" | \"release\";\ntype AggregateGroupValue = string | number | null;\ntype AggregateGroupRecord = Partial<Record<AggregateGroupField, AggregateGroupValue>>;\ntype AggregateListedItem = {\n type: string;\n status: ItemStatus;\n priority: number;\n parent?: string;\n assignee?: string;\n tags: string[];\n sprint?: string;\n release?: string;\n};\n\nconst AGGREGATE_GROUP_FIELDS: AggregateGroupField[] = [\n \"parent\",\n \"type\",\n \"priority\",\n \"status\",\n \"assignee\",\n \"tags\",\n \"sprint\",\n \"release\",\n];\n\nexport interface AggregateOptions {\n groupBy?: string;\n count?: boolean;\n includeUnparented?: boolean;\n status?: string;\n type?: string;\n tag?: string;\n priority?: string;\n deadlineBefore?: string;\n deadlineAfter?: string;\n assignee?: string;\n assigneeFilter?: string;\n parent?: string;\n sprint?: string;\n release?: string;\n}\n\nexport interface AggregateRow {\n group: AggregateGroupRecord;\n count: number;\n}\n\nexport interface AggregateResult {\n groups: AggregateRow[];\n count: number;\n totals: {\n items_considered: number;\n items_grouped: number;\n items_skipped_unparented: number;\n };\n filters: {\n group_by: AggregateGroupField[];\n count: boolean;\n include_unparented: boolean;\n status: ItemStatus | null;\n type: string | null;\n tag: string | null;\n priority: string | null;\n deadline_before: string | null;\n deadline_after: string | null;\n assignee: string | null;\n assignee_filter: string | null;\n parent: string | null;\n sprint: string | null;\n release: string | null;\n };\n now: string;\n warnings?: string[];\n}\n\nfunction parseStatus(raw: string | undefined, statusRegistry: RuntimeStatusRegistry): ItemStatus | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = normalizeStatusInput(raw, statusRegistry);\n if (!normalized) {\n throw new PmCliError(\n `Status filter must be one of ${statusRegistry.definitions.map((definition) => definition.id).join(\"|\")}`,\n EXIT_CODE.USAGE,\n );\n }\n return normalized;\n}\n\nfunction parseGroupBy(raw: string | undefined): AggregateGroupField[] {\n const value = raw?.trim() ?? \"status\";\n if (value.length === 0) {\n throw new PmCliError(\"--group-by requires at least one field name\", EXIT_CODE.USAGE);\n }\n const requested = splitCommaList(value);\n if (requested.length === 0) {\n throw new PmCliError(\"--group-by requires a comma-separated list of fields\", EXIT_CODE.USAGE);\n }\n for (const field of requested) {\n if (!AGGREGATE_GROUP_FIELDS.includes(field as AggregateGroupField)) {\n throw new PmCliError(\n `Aggregate group fields must be one of ${AGGREGATE_GROUP_FIELDS.join(\"|\")}; received \"${field}\"`,\n EXIT_CODE.USAGE,\n );\n }\n }\n return requested as AggregateGroupField[];\n}\n\nfunction normalizeTagGroupValue(tags: string[]): string | null {\n const normalized = [...new Set(tags.map((tag) => tag.trim().toLowerCase()).filter((tag) => tag.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n if (normalized.length === 0) {\n return null;\n }\n return normalized.join(\",\");\n}\n\nfunction resolveGroupValue(field: AggregateGroupField, item: AggregateListedItem): AggregateGroupValue {\n switch (field) {\n case \"parent\":\n return item.parent ?? null;\n case \"type\":\n return item.type;\n case \"priority\":\n return item.priority;\n case \"status\":\n return item.status;\n case \"assignee\":\n return item.assignee ?? null;\n case \"tags\":\n return normalizeTagGroupValue(item.tags);\n case \"sprint\":\n return item.sprint ?? null;\n case \"release\":\n return item.release ?? null;\n default:\n return null;\n }\n}\n\nfunction compareNullableGroupValue(left: AggregateGroupValue | undefined, right: AggregateGroupValue | undefined): number {\n const leftValue = left ?? null;\n const rightValue = right ?? null;\n if (leftValue === rightValue) {\n return 0;\n }\n if (leftValue === null) {\n return 1;\n }\n if (rightValue === null) {\n return -1;\n }\n if (typeof leftValue === \"number\" && typeof rightValue === \"number\") {\n return leftValue - rightValue;\n }\n return String(leftValue).localeCompare(String(rightValue));\n}\n\nfunction buildGroupKey(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n return groupBy.map((field) => `${field}:${JSON.stringify(group[field] ?? null)}`).join(\"|\");\n}\n\nfunction compareAggregateRows(\n left: AggregateRow,\n right: AggregateRow,\n groupBy: AggregateGroupField[],\n): number {\n for (const field of groupBy) {\n const byField = compareNullableGroupValue(left.group[field], right.group[field]);\n if (byField !== 0) {\n return byField;\n }\n }\n return 0;\n}\n\nexport async function runAggregate(options: AggregateOptions, global: GlobalOptions): Promise<AggregateResult> {\n if (options.count === false) {\n throw new PmCliError(\"Aggregate currently supports grouped counts only. Pass --count.\", EXIT_CODE.USAGE);\n }\n\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const groupBy = parseGroupBy(options.groupBy);\n const status = parseStatus(options.status, statusRegistry);\n const includeUnparented = options.includeUnparented === true;\n\n const listed = await runList(\n status,\n {\n type: options.type,\n tag: options.tag,\n priority: options.priority,\n deadlineBefore: options.deadlineBefore,\n deadlineAfter: options.deadlineAfter,\n assignee: options.assignee,\n assigneeFilter: options.assigneeFilter,\n parent: options.parent,\n sprint: options.sprint,\n release: options.release,\n },\n global,\n );\n\n const grouped = new Map<string, AggregateRow>();\n let skippedUnparented = 0;\n let groupedItemCount = 0;\n\n for (const listedItem of listed.items) {\n const item = listedItem as AggregateListedItem;\n const group: AggregateGroupRecord = {};\n for (const field of groupBy) {\n group[field] = resolveGroupValue(field, item);\n }\n if (groupBy.includes(\"parent\") && group.parent === null && !includeUnparented) {\n skippedUnparented += 1;\n continue;\n }\n const key = buildGroupKey(groupBy, group);\n const existing = grouped.get(key);\n if (existing) {\n existing.count += 1;\n } else {\n grouped.set(key, {\n group,\n count: 1,\n });\n }\n groupedItemCount += 1;\n }\n\n const groups = [...grouped.values()].sort((left, right) => compareAggregateRows(left, right, groupBy));\n const warnings = listed.warnings && listed.warnings.length > 0 ? listed.warnings : undefined;\n\n return {\n groups,\n count: groups.length,\n totals: {\n items_considered: listed.items.length,\n items_grouped: groupedItemCount,\n items_skipped_unparented: skippedUnparented,\n },\n filters: {\n group_by: groupBy,\n count: true,\n include_unparented: includeUnparented,\n status: status ?? null,\n type: options.type ?? null,\n tag: options.tag ?? null,\n priority: options.priority ?? null,\n deadline_before: options.deadlineBefore ?? null,\n deadline_after: options.deadlineAfter ?? null,\n assignee: options.assignee ?? null,\n assignee_filter: options.assigneeFilter ?? null,\n parent: options.parent ?? null,\n sprint: options.sprint ?? null,\n release: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,OAAO;MACP,oBAAoB;MACpB,QAAQ,UAAU;MAClB,MAAM,QAAQ,QAAQ;MACtB,KAAK,QAAQ,OAAO;MACpB,UAAU,QAAQ,YAAY;MAC9B,iBAAiB,QAAQ,kBAAkB;MAC3C,gBAAgB,QAAQ,iBAAiB;MACzC,UAAU,QAAQ,YAAY;MAC9B,iBAAiB,QAAQ,kBAAkB;MAC3C,QAAQ,QAAQ,UAAU;MAC1B,QAAQ,QAAQ,UAAU;MAC1B,SAAS,QAAQ,WAAW;;IAE9B,KAAK,OAAM;IACX,GAAI,WAAW,EAAE,SAAQ,IAAK,CAAA;;AAElC;",
6
- "names": ["global"]
7
- }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../../core/item/type-registry.ts"],"sourcesContent":["import { TYPE_TO_FOLDER } from \"../shared/constants.js\";\nimport type { ExtensionRegistrationRegistry } from \"../extensions/loader.js\";\nimport type {\n ItemTypeCommandOptionPolicy,\n ItemTypeDefinition,\n ItemTypeOptionDefinition,\n PmSettings,\n} from \"../../types/index.js\";\nimport { ITEM_TYPE_VALUES } from \"../../types/index.js\";\nimport {\n normalizeItemTypeDefinition as normalizeSharedItemTypeDefinition,\n normalizeItemTypeStringList,\n strictPolicyCommand,\n} from \"./item-type-definition.js\";\n\nexport const DEFAULT_REQUIRED_CREATE_FIELDS = [\n \"title\",\n \"description\",\n \"status\",\n \"priority\",\n \"tags\",\n \"body\",\n \"deadline\",\n \"estimatedMinutes\",\n \"acceptanceCriteria\",\n \"author\",\n \"message\",\n \"assignee\",\n] as const;\n\nexport const DEFAULT_REQUIRED_CREATE_REPEATABLES = [\"dep\", \"comment\", \"note\", \"learning\", \"file\", \"test\", \"doc\"] as const;\n\nexport type CommandOptionPolicyCommand = \"create\" | \"update\";\n\nconst CREATE_COMMAND_OPTION_KEYS = [\n \"title\",\n \"description\",\n \"type\",\n \"status\",\n \"priority\",\n \"tags\",\n \"body\",\n \"deadline\",\n \"estimatedMinutes\",\n \"acceptanceCriteria\",\n \"definitionOfReady\",\n \"order\",\n \"goal\",\n \"objective\",\n \"value\",\n \"impact\",\n \"outcome\",\n \"whyNow\",\n \"author\",\n \"message\",\n \"assignee\",\n \"parent\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n \"blockedBy\",\n \"blockedReason\",\n \"unblockNote\",\n \"reporter\",\n \"severity\",\n \"environment\",\n \"reproSteps\",\n \"resolution\",\n \"expectedResult\",\n \"actualResult\",\n \"affectedVersion\",\n \"fixedVersion\",\n \"component\",\n \"regression\",\n \"customerImpact\",\n \"dep\",\n \"comment\",\n \"note\",\n \"learning\",\n \"file\",\n \"test\",\n \"doc\",\n \"reminder\",\n \"event\",\n \"typeOption\",\n \"field\",\n] as const;\n\nconst UPDATE_COMMAND_OPTION_KEYS = [\n \"title\",\n \"description\",\n \"body\",\n \"status\",\n \"closeReason\",\n \"priority\",\n \"type\",\n \"tags\",\n \"deadline\",\n \"estimatedMinutes\",\n \"acceptanceCriteria\",\n \"definitionOfReady\",\n \"order\",\n \"goal\",\n \"objective\",\n \"value\",\n \"impact\",\n \"outcome\",\n \"whyNow\",\n \"author\",\n \"message\",\n \"assignee\",\n \"parent\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n \"blockedBy\",\n \"blockedReason\",\n \"unblockNote\",\n \"reporter\",\n \"severity\",\n \"environment\",\n \"reproSteps\",\n \"resolution\",\n \"expectedResult\",\n \"actualResult\",\n \"affectedVersion\",\n \"fixedVersion\",\n \"component\",\n \"regression\",\n \"customerImpact\",\n \"comment\",\n \"note\",\n \"learning\",\n \"file\",\n \"test\",\n \"doc\",\n \"reminder\",\n \"event\",\n \"typeOption\",\n \"field\",\n \"allowAuditUpdate\",\n \"force\",\n] as const;\n\nconst SHARED_COMMAND_OPTION_ALIASES: Record<string, string> = {\n \"close-reason\": \"closeReason\",\n close_reason: \"closeReason\",\n \"estimated-minutes\": \"estimatedMinutes\",\n estimated_minutes: \"estimatedMinutes\",\n estimate: \"estimatedMinutes\",\n \"acceptance-criteria\": \"acceptanceCriteria\",\n acceptance_criteria: \"acceptanceCriteria\",\n ac: \"acceptanceCriteria\",\n \"definition-of-ready\": \"definitionOfReady\",\n definition_of_ready: \"definitionOfReady\",\n rank: \"order\",\n \"why-now\": \"whyNow\",\n why_now: \"whyNow\",\n \"blocked-by\": \"blockedBy\",\n blocked_by: \"blockedBy\",\n \"blocked-reason\": \"blockedReason\",\n blocked_reason: \"blockedReason\",\n \"unblock-note\": \"unblockNote\",\n unblock_note: \"unblockNote\",\n \"repro-steps\": \"reproSteps\",\n repro_steps: \"reproSteps\",\n \"expected-result\": \"expectedResult\",\n expected_result: \"expectedResult\",\n \"actual-result\": \"actualResult\",\n actual_result: \"actualResult\",\n \"affected-version\": \"affectedVersion\",\n affected_version: \"affectedVersion\",\n \"fixed-version\": \"fixedVersion\",\n fixed_version: \"fixedVersion\",\n \"customer-impact\": \"customerImpact\",\n customer_impact: \"customerImpact\",\n \"type-option\": \"typeOption\",\n type_option: \"typeOption\",\n type_options: \"typeOption\",\n};\n\nconst CREATE_COMMAND_OPTION_ALIASES: Record<string, string> = {\n ...SHARED_COMMAND_OPTION_ALIASES,\n};\n\nconst UPDATE_COMMAND_OPTION_ALIASES: Record<string, string> = {\n ...SHARED_COMMAND_OPTION_ALIASES,\n \"allow-audit-update\": \"allowAuditUpdate\",\n allow_audit_update: \"allowAuditUpdate\",\n};\n\nconst CREATE_COMMAND_OPTION_FLAG_LABELS: Record<string, string> = {\n title: \"--title\",\n description: \"--description\",\n type: \"--type\",\n status: \"--status\",\n priority: \"--priority\",\n tags: \"--tags\",\n body: \"--body\",\n deadline: \"--deadline\",\n estimatedMinutes: \"--estimate/--estimated-minutes\",\n acceptanceCriteria: \"--acceptance-criteria/--ac\",\n definitionOfReady: \"--definition-of-ready\",\n order: \"--order/--rank\",\n goal: \"--goal\",\n objective: \"--objective\",\n value: \"--value\",\n impact: \"--impact\",\n outcome: \"--outcome\",\n whyNow: \"--why-now\",\n author: \"--author\",\n message: \"--message\",\n assignee: \"--assignee\",\n parent: \"--parent\",\n reviewer: \"--reviewer\",\n risk: \"--risk\",\n confidence: \"--confidence\",\n sprint: \"--sprint\",\n release: \"--release\",\n blockedBy: \"--blocked-by\",\n blockedReason: \"--blocked-reason\",\n unblockNote: \"--unblock-note\",\n reporter: \"--reporter\",\n severity: \"--severity\",\n environment: \"--environment\",\n reproSteps: \"--repro-steps\",\n resolution: \"--resolution\",\n expectedResult: \"--expected-result\",\n actualResult: \"--actual-result\",\n affectedVersion: \"--affected-version\",\n fixedVersion: \"--fixed-version\",\n component: \"--component\",\n regression: \"--regression\",\n customerImpact: \"--customer-impact\",\n dep: \"--dep\",\n comment: \"--comment\",\n note: \"--note\",\n learning: \"--learning\",\n file: \"--file\",\n test: \"--test\",\n doc: \"--doc\",\n reminder: \"--reminder\",\n event: \"--event\",\n typeOption: \"--type-option\",\n};\n\nconst UPDATE_COMMAND_OPTION_FLAG_LABELS: Record<string, string> = {\n title: \"--title\",\n description: \"--description\",\n body: \"--body\",\n status: \"--status\",\n closeReason: \"--close-reason\",\n priority: \"--priority\",\n type: \"--type\",\n tags: \"--tags\",\n deadline: \"--deadline\",\n estimatedMinutes: \"--estimate/--estimated-minutes\",\n acceptanceCriteria: \"--acceptance-criteria/--ac\",\n definitionOfReady: \"--definition-of-ready\",\n order: \"--order/--rank\",\n goal: \"--goal\",\n objective: \"--objective\",\n value: \"--value\",\n impact: \"--impact\",\n outcome: \"--outcome\",\n whyNow: \"--why-now\",\n assignee: \"--assignee\",\n parent: \"--parent\",\n reviewer: \"--reviewer\",\n risk: \"--risk\",\n confidence: \"--confidence\",\n sprint: \"--sprint\",\n release: \"--release\",\n blockedBy: \"--blocked-by\",\n blockedReason: \"--blocked-reason\",\n unblockNote: \"--unblock-note\",\n reporter: \"--reporter\",\n severity: \"--severity\",\n environment: \"--environment\",\n reproSteps: \"--repro-steps\",\n resolution: \"--resolution\",\n expectedResult: \"--expected-result\",\n actualResult: \"--actual-result\",\n affectedVersion: \"--affected-version\",\n fixedVersion: \"--fixed-version\",\n component: \"--component\",\n regression: \"--regression\",\n customerImpact: \"--customer-impact\",\n comment: \"--comment\",\n note: \"--note\",\n learning: \"--learning\",\n file: \"--file\",\n test: \"--test\",\n doc: \"--doc\",\n reminder: \"--reminder\",\n event: \"--event\",\n typeOption: \"--type-option\",\n allowAuditUpdate: \"--allow-audit-update\",\n author: \"--author\",\n message: \"--message\",\n force: \"--force\",\n};\n\nexport interface CommandOptionPolicyState {\n required: string[];\n hidden: string[];\n disabled: string[];\n errors: string[];\n}\n\nexport interface ResolvedItemTypeDefinition {\n name: string;\n /** Optional human description carried from the type definition. */\n description?: string;\n folder: string;\n aliases: string[];\n /** Optional per-type status applied at create time when `--status` is omitted. */\n default_status?: string;\n required_create_fields: string[];\n required_create_repeatables: string[];\n options: ItemTypeOptionDefinition[];\n command_option_policies: ItemTypeCommandOptionPolicy[];\n}\n\nexport interface ItemTypeRegistry {\n types: string[];\n folders: string[];\n type_to_folder: Record<string, string>;\n by_type: Record<string, ResolvedItemTypeDefinition>;\n alias_to_type: Record<string, string>;\n}\n\nfunction normalizeCommandOptionToken(value: string): string {\n return value.trim().replace(/^--+/, \"\").toLowerCase();\n}\n\nfunction commandOptionKeys(command: CommandOptionPolicyCommand): readonly string[] {\n return command === \"create\" ? CREATE_COMMAND_OPTION_KEYS : UPDATE_COMMAND_OPTION_KEYS;\n}\n\nfunction commandOptionAliases(command: CommandOptionPolicyCommand): Record<string, string> {\n return command === \"create\" ? CREATE_COMMAND_OPTION_ALIASES : UPDATE_COMMAND_OPTION_ALIASES;\n}\n\nexport function canonicalizeCommandOptionKey(\n command: CommandOptionPolicyCommand,\n rawOption: string,\n): string | undefined {\n const normalizedToken = normalizeCommandOptionToken(rawOption);\n if (normalizedToken.length === 0) {\n return undefined;\n }\n const aliased = commandOptionAliases(command)[normalizedToken];\n if (aliased) {\n return aliased;\n }\n return commandOptionKeys(command).find((candidate) => candidate.toLowerCase() === normalizedToken);\n}\n\nexport function commandOptionFlagLabel(command: CommandOptionPolicyCommand, optionKey: string): string {\n const labels = command === \"create\" ? CREATE_COMMAND_OPTION_FLAG_LABELS : UPDATE_COMMAND_OPTION_FLAG_LABELS;\n return labels[optionKey] ?? `--${optionKey.replace(/([A-Z])/g, \"-$1\").toLowerCase()}`;\n}\n\nfunction toDefaultFolder(name: string): string {\n const normalized = name\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n if (normalized.length === 0) {\n return \"items\";\n }\n return normalized.endsWith(\"s\") ? normalized : `${normalized}s`;\n}\n\n// Runtime registry consumes untrusted extension/file definitions, so it uses the\n// strict policy-command resolver (trim + lowercase, reject non-create/update). All\n// other normalization is single-sourced from ./item-type-definition.ts (pm-v798).\nfunction normalizeTypeDefinition(definition: ItemTypeDefinition): ItemTypeDefinition | null {\n return normalizeSharedItemTypeDefinition(definition, { resolvePolicyCommand: strictPolicyCommand });\n}\n\nfunction coerceTypeDefinitionFromUnknown(raw: unknown): ItemTypeDefinition | null {\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n return null;\n }\n const record = raw as Record<string, unknown>;\n const name = typeof record.name === \"string\" ? record.name : \"\";\n if (name.trim().length === 0) {\n return null;\n }\n const folder = typeof record.folder === \"string\" ? record.folder : undefined;\n const description = typeof record.description === \"string\" ? record.description : undefined;\n const defaultStatus = typeof record.default_status === \"string\" ? record.default_status : undefined;\n const aliases = Array.isArray(record.aliases) ? record.aliases.filter((value): value is string => typeof value === \"string\") : undefined;\n const requiredCreateFields = Array.isArray(record.required_create_fields)\n ? record.required_create_fields.filter((value): value is string => typeof value === \"string\")\n : undefined;\n const requiredCreateRepeatables = Array.isArray(record.required_create_repeatables)\n ? record.required_create_repeatables.filter((value): value is string => typeof value === \"string\")\n : undefined;\n let options: ItemTypeOptionDefinition[] | undefined;\n if (Array.isArray(record.options)) {\n options = [];\n for (const entry of record.options) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const optionRecord = entry as Record<string, unknown>;\n if (typeof optionRecord.key !== \"string\") {\n continue;\n }\n options.push({\n key: optionRecord.key,\n values: Array.isArray(optionRecord.values)\n ? optionRecord.values.filter((value): value is string => typeof value === \"string\")\n : [],\n required: optionRecord.required === undefined ? undefined : Boolean(optionRecord.required),\n aliases: Array.isArray(optionRecord.aliases)\n ? optionRecord.aliases.filter((value): value is string => typeof value === \"string\")\n : undefined,\n description: typeof optionRecord.description === \"string\" ? optionRecord.description : undefined,\n });\n }\n }\n let commandOptionPolicies: ItemTypeCommandOptionPolicy[] | undefined;\n if (Array.isArray(record.command_option_policies)) {\n commandOptionPolicies = [];\n for (const entry of record.command_option_policies) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const policyRecord = entry as Record<string, unknown>;\n if (typeof policyRecord.command !== \"string\" || typeof policyRecord.option !== \"string\") {\n continue;\n }\n const normalizedCommand = policyRecord.command.trim().toLowerCase();\n if (normalizedCommand !== \"create\" && normalizedCommand !== \"update\") {\n continue;\n }\n commandOptionPolicies.push({\n command: normalizedCommand,\n option: policyRecord.option,\n required: policyRecord.required === undefined ? undefined : Boolean(policyRecord.required),\n visible: policyRecord.visible === undefined ? undefined : Boolean(policyRecord.visible),\n enabled: policyRecord.enabled === undefined ? undefined : Boolean(policyRecord.enabled),\n });\n }\n }\n return {\n name,\n description,\n default_status: defaultStatus,\n folder,\n aliases,\n required_create_fields: requiredCreateFields,\n required_create_repeatables: requiredCreateRepeatables,\n options,\n command_option_policies: commandOptionPolicies,\n };\n}\n\nfunction applyTypeDefinitions(\n source: ItemTypeDefinition[],\n target: Map<string, ResolvedItemTypeDefinition>,\n preserveBuiltinDefaults: boolean,\n): void {\n for (const rawDefinition of source) {\n const normalizedDefinition = normalizeTypeDefinition(rawDefinition);\n if (!normalizedDefinition) {\n continue;\n }\n const lowerName = normalizedDefinition.name.toLowerCase();\n const existing = target.get(lowerName);\n const keepName = existing?.name ?? normalizedDefinition.name;\n const folder = normalizedDefinition.folder ?? existing?.folder ?? toDefaultFolder(keepName);\n const aliases = normalizeItemTypeStringList([\n ...(existing?.aliases ?? []),\n ...(normalizedDefinition.aliases ?? []),\n ]);\n const requiredCreateFields = normalizedDefinition.required_create_fields\n ? normalizeItemTypeStringList(normalizedDefinition.required_create_fields)\n : existing?.required_create_fields ??\n (preserveBuiltinDefaults ? [...DEFAULT_REQUIRED_CREATE_FIELDS] : []);\n const requiredCreateRepeatables = normalizedDefinition.required_create_repeatables\n ? normalizeItemTypeStringList(normalizedDefinition.required_create_repeatables)\n : existing?.required_create_repeatables ??\n (preserveBuiltinDefaults ? [...DEFAULT_REQUIRED_CREATE_REPEATABLES] : []);\n const options = normalizedDefinition.options\n ? normalizedDefinition.options\n : existing?.options\n ? [...existing.options]\n : [];\n const commandOptionPolicies = normalizedDefinition.command_option_policies\n ? normalizedDefinition.command_option_policies\n : existing?.command_option_policies\n ? [...existing.command_option_policies]\n : [];\n const defaultStatus = normalizedDefinition.default_status ?? existing?.default_status;\n const description = normalizedDefinition.description ?? existing?.description;\n target.set(lowerName, {\n name: keepName,\n ...(description ? { description } : {}),\n ...(defaultStatus ? { default_status: defaultStatus } : {}),\n folder,\n aliases,\n required_create_fields: requiredCreateFields,\n required_create_repeatables: requiredCreateRepeatables,\n options,\n command_option_policies: commandOptionPolicies,\n });\n }\n}\n\nfunction collectExtensionTypeDefinitions(registrations: ExtensionRegistrationRegistry | null | undefined): ItemTypeDefinition[] {\n if (!registrations) {\n return [];\n }\n const definitions: ItemTypeDefinition[] = [];\n for (const registration of registrations.item_types ?? []) {\n const typeDefinitionsRaw = (registration as { types?: unknown[] }).types;\n if (!Array.isArray(typeDefinitionsRaw)) {\n continue;\n }\n for (const rawDefinition of typeDefinitionsRaw) {\n const normalized = coerceTypeDefinitionFromUnknown(rawDefinition);\n if (normalized) {\n definitions.push(normalized);\n }\n }\n }\n return definitions;\n}\n\nexport function resolveItemTypeRegistry(\n settings: PmSettings,\n extensionRegistrations: ExtensionRegistrationRegistry | null | undefined = null,\n): ItemTypeRegistry {\n const byLowerName = new Map<string, ResolvedItemTypeDefinition>();\n for (const builtin of ITEM_TYPE_VALUES) {\n byLowerName.set(builtin.toLowerCase(), {\n name: builtin,\n folder: TYPE_TO_FOLDER[builtin],\n aliases: [],\n required_create_fields: [...DEFAULT_REQUIRED_CREATE_FIELDS],\n required_create_repeatables: [...DEFAULT_REQUIRED_CREATE_REPEATABLES],\n options: [],\n command_option_policies: [],\n });\n }\n\n applyTypeDefinitions(settings.item_types?.definitions ?? [], byLowerName, false);\n applyTypeDefinitions(collectExtensionTypeDefinitions(extensionRegistrations), byLowerName, false);\n\n const definitions = [...byLowerName.values()].sort((left, right) => left.name.localeCompare(right.name));\n const byType: Record<string, ResolvedItemTypeDefinition> = {};\n const aliasToType: Record<string, string> = {};\n const typeToFolder: Record<string, string> = {};\n for (const definition of definitions) {\n byType[definition.name] = definition;\n typeToFolder[definition.name] = definition.folder;\n aliasToType[definition.name.toLowerCase()] = definition.name;\n for (const alias of definition.aliases) {\n aliasToType[alias.toLowerCase()] = definition.name;\n }\n }\n const folders = [...new Set(definitions.map((definition) => definition.folder))].sort((left, right) => left.localeCompare(right));\n return {\n types: definitions.map((definition) => definition.name),\n folders,\n type_to_folder: typeToFolder,\n by_type: byType,\n alias_to_type: aliasToType,\n };\n}\n\nexport function resolveTypeName(rawType: string | undefined, registry: ItemTypeRegistry): string | undefined {\n if (rawType === undefined) {\n return undefined;\n }\n return registry.alias_to_type[rawType.trim().toLowerCase()];\n}\n\nexport function resolveTypeDefinition(\n typeName: string | undefined,\n registry: ItemTypeRegistry,\n): ResolvedItemTypeDefinition | undefined {\n const resolvedName = resolveTypeName(typeName, registry);\n if (!resolvedName) {\n return undefined;\n }\n return registry.by_type[resolvedName];\n}\n\nexport function resolveCommandOptionPolicyState(\n typeDefinition: ResolvedItemTypeDefinition,\n command: CommandOptionPolicyCommand,\n baseRequiredOptions: Iterable<string>,\n): CommandOptionPolicyState {\n const errors: string[] = [];\n const required = new Set<string>();\n const hidden = new Set<string>();\n const disabled = new Set<string>();\n\n for (const rawBase of baseRequiredOptions) {\n const canonical = canonicalizeCommandOptionKey(command, rawBase);\n if (!canonical) {\n errors.push(\n `Unsupported base required option \"${rawBase}\" for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n continue;\n }\n required.add(canonical);\n }\n\n for (const policy of typeDefinition.command_option_policies) {\n if (policy.command !== command) {\n continue;\n }\n const canonical = canonicalizeCommandOptionKey(command, policy.option);\n if (!canonical) {\n errors.push(\n `Unsupported command_option_policies option \"${policy.option}\" for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n continue;\n }\n if (policy.required !== undefined) {\n if (policy.required) {\n required.add(canonical);\n } else {\n required.delete(canonical);\n }\n }\n if (policy.visible !== undefined) {\n if (policy.visible) {\n hidden.delete(canonical);\n } else {\n hidden.add(canonical);\n }\n }\n if (policy.enabled !== undefined) {\n if (policy.enabled) {\n disabled.delete(canonical);\n } else {\n disabled.add(canonical);\n }\n }\n }\n\n for (const option of required) {\n if (disabled.has(option)) {\n errors.push(\n `Option \"${option}\" cannot be both required and disabled for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n }\n }\n\n return {\n required: [...required],\n hidden: [...hidden].sort((left, right) => left.localeCompare(right)),\n disabled: [...disabled].sort((left, right) => left.localeCompare(right)),\n errors,\n };\n}\n\nexport function validateTypeOptions(\n typeName: string,\n rawTypeOptions: Record<string, string> | undefined,\n registry: ItemTypeRegistry,\n): { normalized: Record<string, string> | undefined; errors: string[] } {\n const typeDefinition = resolveTypeDefinition(typeName, registry);\n if (!typeDefinition) {\n return {\n normalized: undefined,\n errors: [`Unknown type \"${typeName}\"`],\n };\n }\n const errors: string[] = [];\n const optionByAlias = new Map<string, ItemTypeOptionDefinition>();\n for (const option of typeDefinition.options) {\n optionByAlias.set(option.key.toLowerCase(), option);\n for (const alias of option.aliases ?? []) {\n optionByAlias.set(alias.toLowerCase(), option);\n }\n }\n\n const normalized: Record<string, string> = {};\n for (const [rawKey, rawValue] of Object.entries(rawTypeOptions ?? {})) {\n const trimmedKey = rawKey.trim();\n const trimmedValue = rawValue.trim();\n if (trimmedKey.length === 0) {\n errors.push(\"type option keys must not be empty\");\n continue;\n }\n if (trimmedValue.length === 0) {\n errors.push(`type option \"${trimmedKey}\" must not be empty`);\n continue;\n }\n const optionDefinition = optionByAlias.get(trimmedKey.toLowerCase());\n if (!optionDefinition) {\n const allowed = typeDefinition.options.map((option) => option.key).join(\", \");\n errors.push(\n typeDefinition.options.length > 0\n ? `Unknown type option \"${trimmedKey}\" for type \"${typeDefinition.name}\". Allowed: ${allowed}`\n : `Type \"${typeDefinition.name}\" does not define any configurable type options`,\n );\n continue;\n }\n const allowedValues = optionDefinition.values;\n let resolvedValue = trimmedValue;\n if (allowedValues.length > 0) {\n const valueLookup = new Map(allowedValues.map((value) => [value.toLowerCase(), value]));\n const canonical = valueLookup.get(trimmedValue.toLowerCase());\n if (!canonical) {\n errors.push(\n `Invalid value \"${trimmedValue}\" for type option \"${optionDefinition.key}\". Allowed: ${allowedValues.join(\", \")}`,\n );\n continue;\n }\n resolvedValue = canonical;\n }\n normalized[optionDefinition.key] = resolvedValue;\n }\n\n for (const option of typeDefinition.options) {\n if (option.required && !(option.key in normalized)) {\n errors.push(`Missing required type option \"${option.key}\" for type \"${typeDefinition.name}\"`);\n }\n }\n\n const sortedKeys = Object.keys(normalized).sort((left, right) => left.localeCompare(right));\n if (sortedKeys.length === 0) {\n return {\n normalized: undefined,\n errors,\n };\n }\n return {\n normalized: Object.fromEntries(sortedKeys.map((key) => [key, normalized[key]])),\n errors,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAeO,IAAM,iCAAiC;EAC5C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGK,IAAM,sCAAsC,CAAC,OAAO,WAAW,QAAQ,YAAY,QAAQ,QAAQ,KAAK;AAI/G,IAAM,6BAA6B;EACjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF,IAAM,6BAA6B;EACjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF,IAAM,gCAAwD;EAC5D,gBAAgB;EAChB,cAAc;EACd,qBAAqB;EACrB,mBAAmB;EACnB,UAAU;EACV,uBAAuB;EACvB,qBAAqB;EACrB,IAAI;EACJ,uBAAuB;EACvB,qBAAqB;EACrB,MAAM;EACN,WAAW;EACX,SAAS;EACT,cAAc;EACd,YAAY;EACZ,kBAAkB;EAClB,gBAAgB;EAChB,gBAAgB;EAChB,cAAc;EACd,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,iBAAiB;EACjB,iBAAiB;EACjB,eAAe;EACf,oBAAoB;EACpB,kBAAkB;EAClB,iBAAiB;EACjB,eAAe;EACf,mBAAmB;EACnB,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,cAAc;;AAGhB,IAAM,gCAAwD;EAC5D,GAAG;;AAGL,IAAM,gCAAwD;EAC5D,GAAG;EACH,sBAAsB;EACtB,oBAAoB;;AAGtB,IAAM,oCAA4D;EAChE,OAAO;EACP,aAAa;EACb,MAAM;EACN,QAAQ;EACR,UAA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