@unbrained/pm-cli 2026.6.19 → 2026.6.20

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 (517) hide show
  1. package/CHANGELOG.md +311 -258
  2. package/README.md +1 -1
  3. package/dist/cli/bootstrap-args.d.ts +12 -1
  4. package/dist/cli/bootstrap-args.js +20 -9
  5. package/dist/cli/bootstrap-args.js.map +1 -1
  6. package/dist/cli/commander-usage.js +31 -25
  7. package/dist/cli/commander-usage.js.map +1 -1
  8. package/dist/cli/commands/completion.js +3 -3
  9. package/dist/cli/commands/completion.js.map +1 -1
  10. package/dist/cli/commands/contracts.js +4 -3
  11. package/dist/cli/commands/contracts.js.map +1 -1
  12. package/dist/cli/commands/eval.d.ts +62 -0
  13. package/dist/cli/commands/eval.js +158 -0
  14. package/dist/cli/commands/eval.js.map +1 -0
  15. package/dist/cli/commands/extension/install-sources.d.ts +12 -0
  16. package/dist/cli/commands/extension/install-sources.js +77 -10
  17. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  18. package/dist/cli/commands/gc.d.ts +12 -1
  19. package/dist/cli/commands/gc.js +53 -6
  20. package/dist/cli/commands/gc.js.map +1 -1
  21. package/dist/cli/commands/health.js +14 -8
  22. package/dist/cli/commands/health.js.map +1 -1
  23. package/dist/cli/commands/index.d.ts +1 -0
  24. package/dist/cli/commands/index.js +3 -2
  25. package/dist/cli/commands/index.js.map +1 -1
  26. package/dist/cli/commands/linked-artifacts.js +13 -3
  27. package/dist/cli/commands/linked-artifacts.js.map +1 -1
  28. package/dist/cli/commands/list.js +12 -9
  29. package/dist/cli/commands/list.js.map +1 -1
  30. package/dist/cli/commands/plan.js +2 -2
  31. package/dist/cli/commands/plan.js.map +1 -1
  32. package/dist/cli/commands/restore.js +5 -11
  33. package/dist/cli/commands/restore.js.map +1 -1
  34. package/dist/cli/commands/search.d.ts +39 -1
  35. package/dist/cli/commands/search.js +89 -12
  36. package/dist/cli/commands/search.js.map +1 -1
  37. package/dist/cli/commands/update.js +96 -58
  38. package/dist/cli/commands/update.js.map +1 -1
  39. package/dist/cli/extension-command-help.d.ts +9 -0
  40. package/dist/cli/extension-command-help.js +13 -2
  41. package/dist/cli/extension-command-help.js.map +1 -1
  42. package/dist/cli/extension-command-options.d.ts +8 -0
  43. package/dist/cli/extension-command-options.js +27 -2
  44. package/dist/cli/extension-command-options.js.map +1 -1
  45. package/dist/cli/help-content.js +15 -2
  46. package/dist/cli/help-content.js.map +1 -1
  47. package/dist/cli/main.d.ts +12 -0
  48. package/dist/cli/main.js +49 -9
  49. package/dist/cli/main.js.map +1 -1
  50. package/dist/cli/register-list-query.js +34 -4
  51. package/dist/cli/register-list-query.js.map +1 -1
  52. package/dist/cli/register-operations.js +3 -3
  53. package/dist/cli/register-operations.js.map +1 -1
  54. package/dist/cli-bundle/chunks/activity-7G7NNNZQ.js +18 -0
  55. package/dist/cli-bundle/chunks/{activity-XJ7WRNWS.js → activity-KEEITOTB.js} +11 -11
  56. package/dist/cli-bundle/chunks/{aggregate-OFT4YVB6.js → aggregate-5BTHOHW2.js} +10 -10
  57. package/dist/cli-bundle/chunks/{aggregate-LBCWF6UJ.js → aggregate-GB2LJNTZ.js} +10 -10
  58. package/dist/cli-bundle/chunks/{append-BP2ARHOK.js → append-BBM4MNVD.js} +8 -8
  59. package/dist/cli-bundle/chunks/{append-5U3XR5SD.js → append-BFV5UYWS.js} +8 -8
  60. package/dist/cli-bundle/chunks/{chunk-ZZEM2PH7.js → chunk-26OQTCGH.js} +19 -14
  61. package/dist/cli-bundle/chunks/chunk-26OQTCGH.js.map +1 -0
  62. package/dist/cli-bundle/chunks/{chunk-RVG3WLY3.js → chunk-2LUNPA3U.js} +2 -2
  63. package/dist/cli-bundle/chunks/{chunk-OURX4WVG.js → chunk-2QJLN4KM.js} +7 -7
  64. package/dist/cli-bundle/chunks/{search-2JX776KX.js → chunk-2ZY5SLNR.js} +184 -23
  65. package/dist/cli-bundle/chunks/chunk-2ZY5SLNR.js.map +1 -0
  66. package/dist/cli-bundle/chunks/{chunk-AVMSP2HH.js → chunk-3KVCMB2M.js} +2 -2
  67. package/dist/cli-bundle/chunks/{chunk-FVZSUIN5.js → chunk-3WAKNI2W.js} +3 -3
  68. package/dist/cli-bundle/chunks/{chunk-H3DP6OUM.js → chunk-4KFL5OYK.js} +3 -3
  69. package/dist/cli-bundle/chunks/{chunk-VG3B2CYD.js → chunk-4PW4C3ZB.js} +2 -2
  70. package/dist/cli-bundle/chunks/{chunk-SDUZTZ55.js → chunk-4S4INK3B.js} +7 -7
  71. package/dist/cli-bundle/chunks/{chunk-QCHNPN24.js → chunk-4YMX7XFI.js} +7 -5
  72. package/dist/cli-bundle/chunks/{chunk-QSH34DSQ.js → chunk-5MWA46UN.js} +3 -3
  73. package/dist/cli-bundle/chunks/{chunk-UIMLAFOE.js → chunk-5XK2RYJR.js} +7 -7
  74. package/dist/cli-bundle/chunks/{chunk-B2NEFANY.js → chunk-6DZO5NN7.js} +3 -3
  75. package/dist/cli-bundle/chunks/{chunk-VP4Z36GO.js → chunk-6FSPWUBI.js} +2 -2
  76. package/dist/cli-bundle/chunks/{chunk-MPEWACTG.js → chunk-6KARQMC6.js} +2 -2
  77. package/dist/cli-bundle/chunks/{chunk-N7LDJRB4.js → chunk-6KSFULO6.js} +2 -2
  78. package/dist/cli-bundle/chunks/{chunk-XV6N3QND.js → chunk-6LTSLEHD.js} +2 -2
  79. package/dist/cli-bundle/chunks/{chunk-X26ODPU4.js → chunk-6Y7IQ6XN.js} +14 -18
  80. package/dist/cli-bundle/chunks/chunk-6Y7IQ6XN.js.map +7 -0
  81. package/dist/cli-bundle/chunks/{chunk-USKTNI7P.js → chunk-7MMXBIRZ.js} +2 -2
  82. package/dist/cli-bundle/chunks/{chunk-UCNEPMPY.js → chunk-ACULWT7G.js} +105 -66
  83. package/dist/cli-bundle/chunks/chunk-ACULWT7G.js.map +7 -0
  84. package/dist/cli-bundle/chunks/{chunk-2K56AWDP.js → chunk-AOCYDQLT.js} +5 -5
  85. package/dist/cli-bundle/chunks/{chunk-ZBVYKWT2.js → chunk-ATRXPXAL.js} +15 -15
  86. package/dist/cli-bundle/chunks/{chunk-A5JPMD4Q.js → chunk-AW4PYYNF.js} +2 -2
  87. package/dist/cli-bundle/chunks/{chunk-I2VJM36R.js → chunk-AZ75OVK4.js} +20 -21
  88. package/dist/cli-bundle/chunks/chunk-AZ75OVK4.js.map +1 -0
  89. package/dist/cli-bundle/chunks/{chunk-MTGMNUMJ.js → chunk-B3LROPTV.js} +2 -2
  90. package/dist/cli-bundle/chunks/{chunk-NPNNW5TU.js → chunk-BBSUVIIT.js} +8 -8
  91. package/dist/cli-bundle/chunks/{chunk-47BYN6CA.js → chunk-BYNJWB5F.js} +7 -7
  92. package/dist/cli-bundle/chunks/{chunk-PSWSQHM7.js → chunk-BZWIDTDE.js} +15 -19
  93. package/dist/cli-bundle/chunks/chunk-BZWIDTDE.js.map +1 -0
  94. package/dist/cli-bundle/chunks/{chunk-S673PVHD.js → chunk-CNPWCUDR.js} +3 -3
  95. package/dist/cli-bundle/chunks/{chunk-TYQBGXH2.js → chunk-DKWIPIJY.js} +2 -2
  96. package/dist/cli-bundle/chunks/{search-AZR2JITW.js → chunk-DYOJJTCG.js} +190 -22
  97. package/dist/cli-bundle/chunks/chunk-DYOJJTCG.js.map +7 -0
  98. package/dist/cli-bundle/chunks/{chunk-Y4IBSEQ2.js → chunk-E4E7UQBT.js} +20 -8
  99. package/dist/cli-bundle/chunks/chunk-E4E7UQBT.js.map +1 -0
  100. package/dist/cli-bundle/chunks/{chunk-HMQMRHQJ.js → chunk-EKMHDL6Z.js} +8 -8
  101. package/dist/cli-bundle/chunks/{chunk-LIVRA6VG.js → chunk-EOFROIC5.js} +7 -7
  102. package/dist/cli-bundle/chunks/{chunk-NNMBNN6Q.js → chunk-ETJKPURB.js} +7 -5
  103. package/dist/cli-bundle/chunks/{chunk-2E3KSWFG.js → chunk-F4EYOSNC.js} +2 -2
  104. package/dist/cli-bundle/chunks/{chunk-DJ3YYLHG.js → chunk-FA5O2DEG.js} +5 -5
  105. package/dist/cli-bundle/chunks/{chunk-QTWWHFI3.js → chunk-FBBPCSJM.js} +8 -8
  106. package/dist/cli-bundle/chunks/{chunk-EMFDZ7N3.js → chunk-FSOJCFDS.js} +3 -3
  107. package/dist/cli-bundle/chunks/{chunk-M35R7LFX.js → chunk-FXKPUMIR.js} +5 -5
  108. package/dist/cli-bundle/chunks/{chunk-YOGXK3ON.js → chunk-GF44HVZL.js} +18 -13
  109. package/dist/cli-bundle/chunks/chunk-GF44HVZL.js.map +7 -0
  110. package/dist/cli-bundle/chunks/{chunk-UA4ANRJY.js → chunk-H3ZTSYPA.js} +71 -13
  111. package/dist/cli-bundle/chunks/chunk-H3ZTSYPA.js.map +7 -0
  112. package/dist/cli-bundle/chunks/{chunk-II3WDRCM.js → chunk-HWHZ7EY7.js} +3 -3
  113. package/dist/cli-bundle/chunks/{chunk-7R5YKVKO.js → chunk-ICEWMJYH.js} +7 -7
  114. package/dist/cli-bundle/chunks/{chunk-UMTPQMEG.js → chunk-II4BRHKM.js} +3 -3
  115. package/dist/cli-bundle/chunks/{chunk-GDOTTY2S.js → chunk-IWKD7B33.js} +19 -2
  116. package/dist/cli-bundle/chunks/chunk-IWKD7B33.js.map +7 -0
  117. package/dist/cli-bundle/chunks/{chunk-QG6M6XQE.js → chunk-J7VSEFWB.js} +3 -3
  118. package/dist/cli-bundle/chunks/{chunk-22YA6GCA.js → chunk-K2LBDYDC.js} +2 -2
  119. package/dist/cli-bundle/chunks/{chunk-BQVESTOG.js → chunk-KCJZREBI.js} +2 -2
  120. package/dist/cli-bundle/chunks/{chunk-YWAYOWDQ.js → chunk-LTUB7ARL.js} +72 -14
  121. package/dist/cli-bundle/chunks/chunk-LTUB7ARL.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{chunk-DVUU3AHP.js → chunk-MFCFHL27.js} +17 -6
  123. package/dist/cli-bundle/chunks/chunk-MFCFHL27.js.map +1 -0
  124. package/dist/cli-bundle/chunks/{chunk-5P2LQV2F.js → chunk-MTQK5ZSB.js} +2 -2
  125. package/dist/cli-bundle/chunks/{chunk-LEC57E7K.js → chunk-NCGQ27PK.js} +2 -2
  126. package/dist/cli-bundle/chunks/{chunk-2RI3BDFK.js → chunk-NKTUBA2C.js} +10 -9
  127. package/dist/cli-bundle/chunks/chunk-NKTUBA2C.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{chunk-5LZPDRFW.js → chunk-NMQNXH4U.js} +5 -5
  129. package/dist/cli-bundle/chunks/{chunk-COHNQLB2.js → chunk-OLEP5TJH.js} +20 -3
  130. package/dist/cli-bundle/chunks/chunk-OLEP5TJH.js.map +1 -0
  131. package/dist/cli-bundle/chunks/{chunk-PRUB7RI4.js → chunk-OVSFW4KD.js} +3 -3
  132. package/dist/cli-bundle/chunks/{chunk-4L7Q4OVT.js → chunk-PF5GLFPU.js} +9 -9
  133. package/dist/cli-bundle/chunks/{chunk-YVYJQR6S.js → chunk-QUTJOHGK.js} +9 -9
  134. package/dist/cli-bundle/chunks/{chunk-5QLHQK7V.js → chunk-QWAJPGEI.js} +25 -26
  135. package/dist/cli-bundle/chunks/chunk-QWAJPGEI.js.map +7 -0
  136. package/dist/cli-bundle/chunks/{chunk-K5TD74VU.js → chunk-RADIHKJ3.js} +19 -7
  137. package/dist/cli-bundle/chunks/chunk-RADIHKJ3.js.map +7 -0
  138. package/dist/cli-bundle/chunks/{chunk-CSRFOIHG.js → chunk-RICT5QYR.js} +3 -3
  139. package/dist/cli-bundle/chunks/{chunk-OUG4CL4H.js → chunk-RNKUCHUQ.js} +8 -8
  140. package/dist/cli-bundle/chunks/{chunk-X7RKOJXL.js → chunk-SL233DQD.js} +6 -6
  141. package/dist/cli-bundle/chunks/{chunk-USVOBLGB.js → chunk-U3WTMYBX.js} +2 -2
  142. package/dist/cli-bundle/chunks/{chunk-DYZKSIVX.js → chunk-VE3BUO3R.js} +3 -3
  143. package/dist/cli-bundle/chunks/{chunk-FPQA4ZMA.js → chunk-VONJSFUW.js} +18 -7
  144. package/dist/cli-bundle/chunks/chunk-VONJSFUW.js.map +7 -0
  145. package/dist/cli-bundle/chunks/{chunk-RNWE2HZR.js → chunk-W2ZESOQE.js} +15 -15
  146. package/dist/cli-bundle/chunks/{chunk-4BFNWAMQ.js → chunk-WFOITX4A.js} +29 -12
  147. package/dist/cli-bundle/chunks/chunk-WFOITX4A.js.map +7 -0
  148. package/dist/cli-bundle/chunks/{chunk-FP7YLQ52.js → chunk-WMQBNVZL.js} +11 -10
  149. package/dist/cli-bundle/chunks/chunk-WMQBNVZL.js.map +1 -0
  150. package/dist/cli-bundle/chunks/{chunk-5SRID7DV.js → chunk-X3CD2VUI.js} +29 -12
  151. package/dist/cli-bundle/chunks/chunk-X3CD2VUI.js.map +1 -0
  152. package/dist/cli-bundle/chunks/{chunk-GL3QKIET.js → chunk-XKJDCJEH.js} +6 -6
  153. package/dist/cli-bundle/chunks/{chunk-SO2IOH37.js → chunk-XNQ3YH6N.js} +2 -2
  154. package/dist/cli-bundle/chunks/{chunk-ZGEWEO7B.js → chunk-XXGAWTH5.js} +2 -2
  155. package/dist/cli-bundle/chunks/{chunk-4EOS35RL.js → chunk-YBQF4CAW.js} +3 -3
  156. package/dist/cli-bundle/chunks/{chunk-MTDEEUGV.js → chunk-YT4Z2OVB.js} +3 -3
  157. package/dist/cli-bundle/chunks/{chunk-5NS6TJ2F.js → chunk-ZHCSGIUX.js} +2 -2
  158. package/dist/cli-bundle/chunks/{chunk-MAKOMXVM.js → chunk-ZYG4TR32.js} +106 -67
  159. package/dist/cli-bundle/chunks/chunk-ZYG4TR32.js.map +1 -0
  160. package/dist/cli-bundle/chunks/{claim-2BSYPJTJ.js → claim-G57ZJLZ4.js} +10 -10
  161. package/dist/cli-bundle/chunks/{claim-EZ6JKY5X.js → claim-TRSDQO6L.js} +10 -10
  162. package/dist/cli-bundle/chunks/{close-3TSX6BYF.js → close-4QMUQMON.js} +8 -8
  163. package/dist/cli-bundle/chunks/close-NNZZTZ5V.js +15 -0
  164. package/dist/cli-bundle/chunks/{close-many-B7DBVA46.js → close-many-3UWKJRQK.js} +15 -15
  165. package/dist/cli-bundle/chunks/{close-many-HB4UFCS3.js → close-many-A7U62CRI.js} +15 -15
  166. package/dist/cli-bundle/chunks/{comments-M7PAINZT.js → comments-4EM7XR74.js} +10 -10
  167. package/dist/cli-bundle/chunks/{comments-X7M7XM6I.js → comments-URWDZP2I.js} +10 -10
  168. package/dist/cli-bundle/chunks/{config-YICACPHA.js → config-GRJYZ2O3.js} +30 -10
  169. package/dist/cli-bundle/chunks/config-GRJYZ2O3.js.map +1 -0
  170. package/dist/cli-bundle/chunks/{config-UWF3KRP5.js → config-PSZ5GWAK.js} +29 -9
  171. package/dist/cli-bundle/chunks/config-PSZ5GWAK.js.map +7 -0
  172. package/dist/cli-bundle/chunks/{context-EGUGU4K7.js → context-A46YAV2F.js} +13 -13
  173. package/dist/cli-bundle/chunks/{context-V32ZAPL6.js → context-BCR34RKM.js} +13 -13
  174. package/dist/cli-bundle/chunks/{contracts-7G553BHP.js → contracts-HPT25X4D.js} +10 -8
  175. package/dist/cli-bundle/chunks/contracts-HPT25X4D.js.map +1 -0
  176. package/dist/cli-bundle/chunks/{contracts-B2YWYUV5.js → contracts-JOPCQNDP.js} +10 -8
  177. package/dist/cli-bundle/chunks/contracts-JOPCQNDP.js.map +7 -0
  178. package/dist/cli-bundle/chunks/{copy-RMLXLZOL.js → copy-KBTIUW7L.js} +7 -7
  179. package/dist/cli-bundle/chunks/{copy-NWFFRYWM.js → copy-X7V6AEDB.js} +7 -7
  180. package/dist/cli-bundle/chunks/create-4KOAQ6ME.js +30 -0
  181. package/dist/cli-bundle/chunks/{create-GK4MX2LJ.js → create-ZPZKJDFQ.js} +14 -14
  182. package/dist/cli-bundle/chunks/{delete-EFQLVEAS.js → delete-2ZI6CJZM.js} +7 -7
  183. package/dist/cli-bundle/chunks/{delete-RMGNIL2S.js → delete-FGKVPUQZ.js} +7 -7
  184. package/dist/cli-bundle/chunks/{deps-WKHUPVD3.js → deps-IUJOBF2H.js} +7 -7
  185. package/dist/cli-bundle/chunks/{deps-K2I7QV4Y.js → deps-SJCEFU3C.js} +7 -7
  186. package/dist/cli-bundle/chunks/{docs-2H2UGIT6.js → docs-2LXF5SVC.js} +12 -11
  187. package/dist/cli-bundle/chunks/{docs-2H2UGIT6.js.map → docs-2LXF5SVC.js.map} +1 -1
  188. package/dist/cli-bundle/chunks/{docs-3FXRDYA7.js → docs-UWJ75CKR.js} +10 -9
  189. package/dist/cli-bundle/chunks/{docs-3FXRDYA7.js.map → docs-UWJ75CKR.js.map} +1 -1
  190. package/dist/cli-bundle/chunks/eval-FRIDCTM2.js +276 -0
  191. package/dist/cli-bundle/chunks/eval-FRIDCTM2.js.map +1 -0
  192. package/dist/cli-bundle/chunks/eval-ZTT3F3SL.js +286 -0
  193. package/dist/cli-bundle/chunks/eval-ZTT3F3SL.js.map +7 -0
  194. package/dist/cli-bundle/chunks/{extension-4LPTFTV4.js → extension-VRYTNNSV.js} +5 -5
  195. package/dist/cli-bundle/chunks/{extension-ASUPTDCC.js → extension-XFQG3BXL.js} +5 -5
  196. package/dist/cli-bundle/chunks/{files-UAZFB3EA.js → files-AJOGTTAN.js} +10 -9
  197. package/dist/cli-bundle/chunks/{files-UAZFB3EA.js.map → files-AJOGTTAN.js.map} +1 -1
  198. package/dist/cli-bundle/chunks/{files-TXEQOA7C.js → files-B2RUCA32.js} +12 -11
  199. package/dist/cli-bundle/chunks/{files-TXEQOA7C.js.map → files-B2RUCA32.js.map} +1 -1
  200. package/dist/cli-bundle/chunks/{focus-UGROAMAX.js → focus-7N36RIMT.js} +8 -8
  201. package/dist/cli-bundle/chunks/{focus-ELOPN2SR.js → focus-CFE33IYC.js} +8 -8
  202. package/dist/cli-bundle/chunks/gc-OYJK4YBY.js +395 -0
  203. package/dist/cli-bundle/chunks/gc-OYJK4YBY.js.map +7 -0
  204. package/dist/cli-bundle/chunks/gc-SBF2FGHK.js +385 -0
  205. package/dist/cli-bundle/chunks/gc-SBF2FGHK.js.map +1 -0
  206. package/dist/cli-bundle/chunks/{get-OTXPLWYW.js → get-577VLZZ7.js} +11 -11
  207. package/dist/cli-bundle/chunks/{get-IWZ7IMPS.js → get-LLFWSPXW.js} +11 -11
  208. package/dist/cli-bundle/chunks/{health-PPTJ7XKW.js → health-C2PUT6JZ.js} +21 -22
  209. package/dist/cli-bundle/chunks/{health-PPTJ7XKW.js.map → health-C2PUT6JZ.js.map} +1 -1
  210. package/dist/cli-bundle/chunks/{health-JEBESKID.js → health-PBJS7W2T.js} +20 -21
  211. package/dist/cli-bundle/chunks/{health-JEBESKID.js.map → health-PBJS7W2T.js.map} +2 -2
  212. package/dist/cli-bundle/chunks/{history-HNWBUDMI.js → history-4FJK6Y3O.js} +10 -10
  213. package/dist/cli-bundle/chunks/history-ZXNWG6H4.js +20 -0
  214. package/dist/cli-bundle/chunks/{history-compact-EQXVPK3V.js → history-compact-AXR6R6GU.js} +12 -12
  215. package/dist/cli-bundle/chunks/{history-compact-MMQC7MCW.js → history-compact-HXF3OT7G.js} +12 -12
  216. package/dist/cli-bundle/chunks/history-redact-GV633Z4H.js +21 -0
  217. package/dist/cli-bundle/chunks/{history-redact-UBDHBEJE.js → history-redact-UMPD4G3K.js} +11 -11
  218. package/dist/cli-bundle/chunks/{history-repair-GMMHFAGH.js → history-repair-WHOK2ICG.js} +12 -12
  219. package/dist/cli-bundle/chunks/{history-repair-7DSDRPMX.js → history-repair-X57HE5EA.js} +12 -12
  220. package/dist/cli-bundle/chunks/init-KQWZSNBX.js +20 -0
  221. package/dist/cli-bundle/chunks/{init-QGK4JFF6.js → init-N7MIIYCU.js} +10 -10
  222. package/dist/cli-bundle/chunks/{learnings-A6DGBMG3.js → learnings-FPG7WAVW.js} +10 -10
  223. package/dist/cli-bundle/chunks/{learnings-DR53TWRA.js → learnings-GZRBIEAN.js} +10 -10
  224. package/dist/cli-bundle/chunks/{list-LJ5DBXC3.js → list-MZBCSKLU.js} +10 -10
  225. package/dist/cli-bundle/chunks/{list-KOJN23UL.js → list-ZDQ2OBSO.js} +10 -10
  226. package/dist/cli-bundle/chunks/{notes-K5I3TAYR.js → notes-LW53PFLH.js} +10 -10
  227. package/dist/cli-bundle/chunks/{notes-7VLTHKPW.js → notes-WQAP67EC.js} +10 -10
  228. package/dist/cli-bundle/chunks/{plan-X3STKLED.js → plan-AVJ4VJQO.js} +15 -15
  229. package/dist/cli-bundle/chunks/plan-AVJ4VJQO.js.map +7 -0
  230. package/dist/cli-bundle/chunks/{plan-BK3OMLGP.js → plan-VZKICKIJ.js} +16 -16
  231. package/dist/cli-bundle/chunks/plan-VZKICKIJ.js.map +1 -0
  232. package/dist/cli-bundle/chunks/{register-list-query-FUMXPWZ4.js → register-list-query-7BD6ZHU5.js} +42 -21
  233. package/dist/cli-bundle/chunks/register-list-query-7BD6ZHU5.js.map +7 -0
  234. package/dist/cli-bundle/chunks/{register-list-query-XDLFESU7.js → register-list-query-CM4SVAQA.js} +43 -22
  235. package/dist/cli-bundle/chunks/register-list-query-CM4SVAQA.js.map +1 -0
  236. package/dist/cli-bundle/chunks/{register-mutation-ZAGVKMBQ.js → register-mutation-ANZIWHUF.js} +33 -33
  237. package/dist/cli-bundle/chunks/{register-mutation-RXRX4P7D.js → register-mutation-PLFHAS4N.js} +33 -33
  238. package/dist/cli-bundle/chunks/{register-operations-DGSHCS75.js → register-operations-KQPQIFF2.js} +35 -35
  239. package/dist/cli-bundle/chunks/register-operations-KQPQIFF2.js.map +1 -0
  240. package/dist/cli-bundle/chunks/{register-operations-6UURPZN5.js → register-operations-VLGCAWIW.js} +34 -34
  241. package/dist/cli-bundle/chunks/{register-operations-6UURPZN5.js.map → register-operations-VLGCAWIW.js.map} +2 -2
  242. package/dist/cli-bundle/chunks/{register-setup-2FEGSFLM.js → register-setup-KPTZ36D4.js} +15 -15
  243. package/dist/cli-bundle/chunks/{register-setup-LTJG52WP.js → register-setup-TMEF6V7O.js} +15 -15
  244. package/dist/cli-bundle/chunks/{restore-SJUWYOCK.js → restore-64JKQV7G.js} +11 -11
  245. package/dist/cli-bundle/chunks/restore-GKM26SAW.js +19 -0
  246. package/dist/cli-bundle/chunks/{scheduling-shortcuts-W4F2LKHW.js → scheduling-shortcuts-4ION7QAX.js} +14 -14
  247. package/dist/cli-bundle/chunks/{scheduling-shortcuts-VWAMP2S2.js → scheduling-shortcuts-X6D6VSZR.js} +14 -14
  248. package/dist/cli-bundle/chunks/{schema-N5ETYD4P.js → schema-OA4RSVMI.js} +9 -9
  249. package/dist/cli-bundle/chunks/{schema-DXQRIEFM.js → schema-TA3NF3RG.js} +9 -9
  250. package/dist/cli-bundle/chunks/search-INCM5I4J.js +33 -0
  251. package/dist/cli-bundle/chunks/search-UAIHEQZL.js +37 -0
  252. package/dist/cli-bundle/chunks/{stats-J563NJBY.js → stats-RHEMG4CE.js} +8 -8
  253. package/dist/cli-bundle/chunks/{stats-ZFESFVQC.js → stats-WQWTIA5Y.js} +8 -8
  254. package/dist/cli-bundle/chunks/{telemetry-BNGLIFEM.js → telemetry-G6UKGKJU.js} +4 -4
  255. package/dist/cli-bundle/chunks/{telemetry-SC7HPRXX.js → telemetry-XA5D2QEO.js} +4 -4
  256. package/dist/cli-bundle/chunks/{test-55RJCGRU.js → test-XF7BYLMZ.js} +15 -15
  257. package/dist/cli-bundle/chunks/{test-47UQGEXE.js → test-ZMQF23P3.js} +15 -15
  258. package/dist/cli-bundle/chunks/{test-all-DN6KG4FX.js → test-all-WUBBJCPU.js} +15 -15
  259. package/dist/cli-bundle/chunks/{test-all-5SFTTRNL.js → test-all-ZNQBMUOI.js} +15 -15
  260. package/dist/cli-bundle/chunks/{test-runs-DZEDJ4GH.js → test-runs-N7LI7HLH.js} +5 -5
  261. package/dist/cli-bundle/chunks/{test-runs-NHRBT7SN.js → test-runs-RFA42EEX.js} +5 -5
  262. package/dist/cli-bundle/chunks/update-CPNOG73P.js +24 -0
  263. package/dist/cli-bundle/chunks/update-CPNOG73P.js.map +7 -0
  264. package/dist/cli-bundle/chunks/update-T5AYT6ZN.js +28 -0
  265. package/dist/cli-bundle/chunks/update-T5AYT6ZN.js.map +1 -0
  266. package/dist/cli-bundle/chunks/{update-many-OKYWFCBO.js → update-many-6XFR7TFG.js} +23 -23
  267. package/dist/cli-bundle/chunks/{update-many-IRNV3OTG.js → update-many-NMRUQZL2.js} +23 -23
  268. package/dist/cli-bundle/chunks/{upgrade-KP4I45V5.js → upgrade-EJTME2YQ.js} +5 -5
  269. package/dist/cli-bundle/chunks/{upgrade-3RIAFQIK.js → upgrade-QMCSONWR.js} +5 -5
  270. package/dist/cli-bundle/chunks/{validate-GVY4VE43.js → validate-3SUCHXXX.js} +21 -21
  271. package/dist/cli-bundle/chunks/{validate-ADKGN37M.js → validate-KIIJY5RC.js} +21 -21
  272. package/dist/cli-bundle/main.js +133 -55
  273. package/dist/cli-bundle/main.js.map +2 -2
  274. package/dist/core/checkpoint/checkpoint-gc.d.ts +69 -0
  275. package/dist/core/checkpoint/checkpoint-gc.js +175 -0
  276. package/dist/core/checkpoint/checkpoint-gc.js.map +1 -0
  277. package/dist/core/config/nested-settings.js +22 -2
  278. package/dist/core/config/nested-settings.js.map +1 -1
  279. package/dist/core/diagnostics/remediation.js +19 -2
  280. package/dist/core/diagnostics/remediation.js.map +1 -1
  281. package/dist/core/extensions/extension-types.d.ts +0 -9
  282. package/dist/core/extensions/extension-types.js +2 -27
  283. package/dist/core/extensions/extension-types.js.map +1 -1
  284. package/dist/core/fs/fs-utils.d.ts +17 -1
  285. package/dist/core/fs/fs-utils.js +19 -3
  286. package/dist/core/fs/fs-utils.js.map +1 -1
  287. package/dist/core/history/drift-scan.d.ts +17 -5
  288. package/dist/core/history/drift-scan.js +22 -14
  289. package/dist/core/history/drift-scan.js.map +1 -1
  290. package/dist/core/history/replay.d.ts +7 -0
  291. package/dist/core/history/replay.js +11 -6
  292. package/dist/core/history/replay.js.map +1 -1
  293. package/dist/core/item/status-filter.d.ts +7 -3
  294. package/dist/core/item/status-filter.js +26 -5
  295. package/dist/core/item/status-filter.js.map +1 -1
  296. package/dist/core/search/bm25.d.ts +113 -0
  297. package/dist/core/search/bm25.js +178 -0
  298. package/dist/core/search/bm25.js.map +1 -0
  299. package/dist/core/search/eval.d.ts +114 -0
  300. package/dist/core/search/eval.js +217 -0
  301. package/dist/core/search/eval.js.map +1 -0
  302. package/dist/core/sentry/instrument.d.ts +14 -0
  303. package/dist/core/sentry/instrument.js +43 -3
  304. package/dist/core/sentry/instrument.js.map +1 -1
  305. package/dist/core/shared/constants.js +5 -2
  306. package/dist/core/shared/constants.js.map +1 -1
  307. package/dist/core/store/paths.js +4 -3
  308. package/dist/core/store/paths.js.map +1 -1
  309. package/dist/core/store/settings-validator.d.ts +7 -0
  310. package/dist/core/store/settings-validator.js +10 -2
  311. package/dist/core/store/settings-validator.js.map +1 -1
  312. package/dist/core/store/settings.js +6 -2
  313. package/dist/core/store/settings.js.map +1 -1
  314. package/dist/mcp/tool-definitions.js +4 -3
  315. package/dist/mcp/tool-definitions.js.map +1 -1
  316. package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
  317. package/dist/sdk/cli-contracts/enum-contracts.js +3 -2
  318. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  319. package/dist/sdk/cli-contracts/tool-parameter-tables.js +4 -4
  320. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  321. package/dist/sdk/cli-contracts.d.ts +1 -0
  322. package/dist/sdk/cli-contracts.js +11 -2
  323. package/dist/sdk/cli-contracts.js.map +1 -1
  324. package/dist/types.d.ts +19 -0
  325. package/dist/types.js +2 -2
  326. package/dist/types.js.map +1 -1
  327. package/docs/AGENT_GUIDE.md +1 -0
  328. package/docs/ARCHITECTURE.md +124 -11
  329. package/docs/CLAUDE_CODE_PLUGIN.md +5 -13
  330. package/docs/COMMANDS.md +55 -5
  331. package/docs/CONFIGURATION.md +39 -0
  332. package/docs/EXTENSIONS.md +2 -2
  333. package/docs/MIGRATION_CLI_SIMPLIFICATION.md +9 -2
  334. package/docs/QUICKSTART.md +2 -0
  335. package/docs/README.md +2 -0
  336. package/docs/RELEASING.md +2 -1
  337. package/docs/SDK.md +9 -1
  338. package/docs/TESTING.md +18 -0
  339. package/package.json +4 -3
  340. package/packages/pm-todos/extensions/todos/index.js +2 -0
  341. package/packages/pm-todos/extensions/todos/index.ts +2 -0
  342. package/packages/pm-todos/extensions/todos/runtime.js +1 -1
  343. package/packages/pm-todos/extensions/todos/runtime.ts +4 -1
  344. package/dist/cli-bundle/chunks/activity-62I26XZB.js +0 -18
  345. package/dist/cli-bundle/chunks/chunk-2RI3BDFK.js.map +0 -7
  346. package/dist/cli-bundle/chunks/chunk-4BFNWAMQ.js.map +0 -7
  347. package/dist/cli-bundle/chunks/chunk-5QLHQK7V.js.map +0 -7
  348. package/dist/cli-bundle/chunks/chunk-5SRID7DV.js.map +0 -1
  349. package/dist/cli-bundle/chunks/chunk-COHNQLB2.js.map +0 -1
  350. package/dist/cli-bundle/chunks/chunk-DVUU3AHP.js.map +0 -1
  351. package/dist/cli-bundle/chunks/chunk-FP7YLQ52.js.map +0 -1
  352. package/dist/cli-bundle/chunks/chunk-FPQA4ZMA.js.map +0 -7
  353. package/dist/cli-bundle/chunks/chunk-GDOTTY2S.js.map +0 -7
  354. package/dist/cli-bundle/chunks/chunk-I2VJM36R.js.map +0 -1
  355. package/dist/cli-bundle/chunks/chunk-K5TD74VU.js.map +0 -7
  356. package/dist/cli-bundle/chunks/chunk-MAKOMXVM.js.map +0 -1
  357. package/dist/cli-bundle/chunks/chunk-PSWSQHM7.js.map +0 -1
  358. package/dist/cli-bundle/chunks/chunk-UA4ANRJY.js.map +0 -7
  359. package/dist/cli-bundle/chunks/chunk-UCNEPMPY.js.map +0 -7
  360. package/dist/cli-bundle/chunks/chunk-X26ODPU4.js.map +0 -7
  361. package/dist/cli-bundle/chunks/chunk-Y4IBSEQ2.js.map +0 -1
  362. package/dist/cli-bundle/chunks/chunk-YOGXK3ON.js.map +0 -7
  363. package/dist/cli-bundle/chunks/chunk-YWAYOWDQ.js.map +0 -1
  364. package/dist/cli-bundle/chunks/chunk-ZZEM2PH7.js.map +0 -1
  365. package/dist/cli-bundle/chunks/close-TQZK43Z5.js +0 -15
  366. package/dist/cli-bundle/chunks/config-UWF3KRP5.js.map +0 -7
  367. package/dist/cli-bundle/chunks/config-YICACPHA.js.map +0 -1
  368. package/dist/cli-bundle/chunks/contracts-7G553BHP.js.map +0 -1
  369. package/dist/cli-bundle/chunks/contracts-B2YWYUV5.js.map +0 -7
  370. package/dist/cli-bundle/chunks/create-UZLJXHLA.js +0 -30
  371. package/dist/cli-bundle/chunks/gc-5RTYXLQU.js +0 -211
  372. package/dist/cli-bundle/chunks/gc-5RTYXLQU.js.map +0 -7
  373. package/dist/cli-bundle/chunks/gc-FK5732EK.js +0 -208
  374. package/dist/cli-bundle/chunks/gc-FK5732EK.js.map +0 -1
  375. package/dist/cli-bundle/chunks/history-TKTULEVE.js +0 -20
  376. package/dist/cli-bundle/chunks/history-redact-SPIFIXVY.js +0 -21
  377. package/dist/cli-bundle/chunks/init-A6FTZ5UC.js +0 -20
  378. package/dist/cli-bundle/chunks/plan-BK3OMLGP.js.map +0 -1
  379. package/dist/cli-bundle/chunks/plan-X3STKLED.js.map +0 -7
  380. package/dist/cli-bundle/chunks/register-list-query-FUMXPWZ4.js.map +0 -7
  381. package/dist/cli-bundle/chunks/register-list-query-XDLFESU7.js.map +0 -1
  382. package/dist/cli-bundle/chunks/register-operations-DGSHCS75.js.map +0 -1
  383. package/dist/cli-bundle/chunks/restore-PI3WM4GK.js +0 -19
  384. package/dist/cli-bundle/chunks/search-2JX776KX.js.map +0 -1
  385. package/dist/cli-bundle/chunks/search-AZR2JITW.js.map +0 -7
  386. package/dist/cli-bundle/chunks/update-2BZEAI7B.js +0 -24
  387. package/dist/cli-bundle/chunks/update-GCNLER2H.js +0 -28
  388. /package/dist/cli-bundle/chunks/{activity-62I26XZB.js.map → activity-7G7NNNZQ.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{activity-XJ7WRNWS.js.map → activity-KEEITOTB.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{aggregate-OFT4YVB6.js.map → aggregate-5BTHOHW2.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{aggregate-LBCWF6UJ.js.map → aggregate-GB2LJNTZ.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{append-BP2ARHOK.js.map → append-BBM4MNVD.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{append-5U3XR5SD.js.map → append-BFV5UYWS.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{chunk-RVG3WLY3.js.map → chunk-2LUNPA3U.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{chunk-OURX4WVG.js.map → chunk-2QJLN4KM.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{chunk-AVMSP2HH.js.map → chunk-3KVCMB2M.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{chunk-FVZSUIN5.js.map → chunk-3WAKNI2W.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{chunk-H3DP6OUM.js.map → chunk-4KFL5OYK.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{chunk-VG3B2CYD.js.map → chunk-4PW4C3ZB.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{chunk-SDUZTZ55.js.map → chunk-4S4INK3B.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{chunk-QCHNPN24.js.map → chunk-4YMX7XFI.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{chunk-QSH34DSQ.js.map → chunk-5MWA46UN.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{chunk-UIMLAFOE.js.map → chunk-5XK2RYJR.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{chunk-B2NEFANY.js.map → chunk-6DZO5NN7.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{chunk-VP4Z36GO.js.map → chunk-6FSPWUBI.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{chunk-MPEWACTG.js.map → chunk-6KARQMC6.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{chunk-N7LDJRB4.js.map → chunk-6KSFULO6.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{chunk-XV6N3QND.js.map → chunk-6LTSLEHD.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{chunk-USKTNI7P.js.map → chunk-7MMXBIRZ.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{chunk-2K56AWDP.js.map → chunk-AOCYDQLT.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{chunk-ZBVYKWT2.js.map → chunk-ATRXPXAL.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{chunk-A5JPMD4Q.js.map → chunk-AW4PYYNF.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{chunk-MTGMNUMJ.js.map → chunk-B3LROPTV.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{chunk-NPNNW5TU.js.map → chunk-BBSUVIIT.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{chunk-47BYN6CA.js.map → chunk-BYNJWB5F.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{chunk-S673PVHD.js.map → chunk-CNPWCUDR.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{chunk-TYQBGXH2.js.map → chunk-DKWIPIJY.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{chunk-HMQMRHQJ.js.map → chunk-EKMHDL6Z.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{chunk-LIVRA6VG.js.map → chunk-EOFROIC5.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{chunk-NNMBNN6Q.js.map → chunk-ETJKPURB.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{chunk-2E3KSWFG.js.map → chunk-F4EYOSNC.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{chunk-DJ3YYLHG.js.map → chunk-FA5O2DEG.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{chunk-QTWWHFI3.js.map → chunk-FBBPCSJM.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{chunk-EMFDZ7N3.js.map → chunk-FSOJCFDS.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{chunk-M35R7LFX.js.map → chunk-FXKPUMIR.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{chunk-II3WDRCM.js.map → chunk-HWHZ7EY7.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{chunk-7R5YKVKO.js.map → chunk-ICEWMJYH.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{chunk-UMTPQMEG.js.map → chunk-II4BRHKM.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{chunk-QG6M6XQE.js.map → chunk-J7VSEFWB.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{chunk-22YA6GCA.js.map → chunk-K2LBDYDC.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{chunk-BQVESTOG.js.map → chunk-KCJZREBI.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{chunk-5P2LQV2F.js.map → chunk-MTQK5ZSB.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{chunk-LEC57E7K.js.map → chunk-NCGQ27PK.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{chunk-5LZPDRFW.js.map → chunk-NMQNXH4U.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{chunk-PRUB7RI4.js.map → chunk-OVSFW4KD.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{chunk-4L7Q4OVT.js.map → chunk-PF5GLFPU.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{chunk-YVYJQR6S.js.map → chunk-QUTJOHGK.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{chunk-CSRFOIHG.js.map → chunk-RICT5QYR.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{chunk-OUG4CL4H.js.map → chunk-RNKUCHUQ.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{chunk-X7RKOJXL.js.map → chunk-SL233DQD.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{chunk-USVOBLGB.js.map → chunk-U3WTMYBX.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{chunk-DYZKSIVX.js.map → chunk-VE3BUO3R.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{chunk-RNWE2HZR.js.map → chunk-W2ZESOQE.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{chunk-GL3QKIET.js.map → chunk-XKJDCJEH.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{chunk-SO2IOH37.js.map → chunk-XNQ3YH6N.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{chunk-ZGEWEO7B.js.map → chunk-XXGAWTH5.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{chunk-4EOS35RL.js.map → chunk-YBQF4CAW.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{chunk-MTDEEUGV.js.map → chunk-YT4Z2OVB.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{chunk-5NS6TJ2F.js.map → chunk-ZHCSGIUX.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{claim-2BSYPJTJ.js.map → claim-G57ZJLZ4.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{claim-EZ6JKY5X.js.map → claim-TRSDQO6L.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{close-3TSX6BYF.js.map → close-4QMUQMON.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{close-TQZK43Z5.js.map → close-NNZZTZ5V.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{close-many-B7DBVA46.js.map → close-many-3UWKJRQK.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{close-many-HB4UFCS3.js.map → close-many-A7U62CRI.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{comments-M7PAINZT.js.map → comments-4EM7XR74.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{comments-X7M7XM6I.js.map → comments-URWDZP2I.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{context-EGUGU4K7.js.map → context-A46YAV2F.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{context-V32ZAPL6.js.map → context-BCR34RKM.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{copy-RMLXLZOL.js.map → copy-KBTIUW7L.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{copy-NWFFRYWM.js.map → copy-X7V6AEDB.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{create-UZLJXHLA.js.map → create-4KOAQ6ME.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{create-GK4MX2LJ.js.map → create-ZPZKJDFQ.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{delete-EFQLVEAS.js.map → delete-2ZI6CJZM.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{delete-RMGNIL2S.js.map → delete-FGKVPUQZ.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{deps-WKHUPVD3.js.map → deps-IUJOBF2H.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{deps-K2I7QV4Y.js.map → deps-SJCEFU3C.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{extension-4LPTFTV4.js.map → extension-VRYTNNSV.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{extension-ASUPTDCC.js.map → extension-XFQG3BXL.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{focus-UGROAMAX.js.map → focus-7N36RIMT.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{focus-ELOPN2SR.js.map → focus-CFE33IYC.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{get-OTXPLWYW.js.map → get-577VLZZ7.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{get-IWZ7IMPS.js.map → get-LLFWSPXW.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{history-HNWBUDMI.js.map → history-4FJK6Y3O.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{history-TKTULEVE.js.map → history-ZXNWG6H4.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{history-compact-EQXVPK3V.js.map → history-compact-AXR6R6GU.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{history-compact-MMQC7MCW.js.map → history-compact-HXF3OT7G.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{history-redact-SPIFIXVY.js.map → history-redact-GV633Z4H.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{history-redact-UBDHBEJE.js.map → history-redact-UMPD4G3K.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{history-repair-GMMHFAGH.js.map → history-repair-WHOK2ICG.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{history-repair-7DSDRPMX.js.map → history-repair-X57HE5EA.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{init-A6FTZ5UC.js.map → init-KQWZSNBX.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{init-QGK4JFF6.js.map → init-N7MIIYCU.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{learnings-A6DGBMG3.js.map → learnings-FPG7WAVW.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{learnings-DR53TWRA.js.map → learnings-GZRBIEAN.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{list-LJ5DBXC3.js.map → list-MZBCSKLU.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{list-KOJN23UL.js.map → list-ZDQ2OBSO.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{notes-K5I3TAYR.js.map → notes-LW53PFLH.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{notes-7VLTHKPW.js.map → notes-WQAP67EC.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{register-mutation-ZAGVKMBQ.js.map → register-mutation-ANZIWHUF.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{register-mutation-RXRX4P7D.js.map → register-mutation-PLFHAS4N.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{register-setup-2FEGSFLM.js.map → register-setup-KPTZ36D4.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{register-setup-LTJG52WP.js.map → register-setup-TMEF6V7O.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{restore-SJUWYOCK.js.map → restore-64JKQV7G.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{restore-PI3WM4GK.js.map → restore-GKM26SAW.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-W4F2LKHW.js.map → scheduling-shortcuts-4ION7QAX.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{scheduling-shortcuts-VWAMP2S2.js.map → scheduling-shortcuts-X6D6VSZR.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{schema-N5ETYD4P.js.map → schema-OA4RSVMI.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{schema-DXQRIEFM.js.map → schema-TA3NF3RG.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{test-55RJCGRU.js.map → search-INCM5I4J.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{test-47UQGEXE.js.map → search-UAIHEQZL.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{stats-J563NJBY.js.map → stats-RHEMG4CE.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{stats-ZFESFVQC.js.map → stats-WQWTIA5Y.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{telemetry-BNGLIFEM.js.map → telemetry-G6UKGKJU.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{telemetry-SC7HPRXX.js.map → telemetry-XA5D2QEO.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{update-2BZEAI7B.js.map → test-XF7BYLMZ.js.map} +0 -0
  507. /package/dist/cli-bundle/chunks/{update-GCNLER2H.js.map → test-ZMQF23P3.js.map} +0 -0
  508. /package/dist/cli-bundle/chunks/{test-all-DN6KG4FX.js.map → test-all-WUBBJCPU.js.map} +0 -0
  509. /package/dist/cli-bundle/chunks/{test-all-5SFTTRNL.js.map → test-all-ZNQBMUOI.js.map} +0 -0
  510. /package/dist/cli-bundle/chunks/{test-runs-DZEDJ4GH.js.map → test-runs-N7LI7HLH.js.map} +0 -0
  511. /package/dist/cli-bundle/chunks/{test-runs-NHRBT7SN.js.map → test-runs-RFA42EEX.js.map} +0 -0
  512. /package/dist/cli-bundle/chunks/{update-many-OKYWFCBO.js.map → update-many-6XFR7TFG.js.map} +0 -0
  513. /package/dist/cli-bundle/chunks/{update-many-IRNV3OTG.js.map → update-many-NMRUQZL2.js.map} +0 -0
  514. /package/dist/cli-bundle/chunks/{upgrade-KP4I45V5.js.map → upgrade-EJTME2YQ.js.map} +0 -0
  515. /package/dist/cli-bundle/chunks/{upgrade-3RIAFQIK.js.map → upgrade-QMCSONWR.js.map} +0 -0
  516. /package/dist/cli-bundle/chunks/{validate-GVY4VE43.js.map → validate-3SUCHXXX.js.map} +0 -0
  517. /package/dist/cli-bundle/chunks/{validate-ADKGN37M.js.map → validate-KIIJY5RC.js.map} +0 -0
@@ -83,6 +83,7 @@ pm config project set id_prefix task # (id_prefix) IDs bec
83
83
  pm config project set author_default release-bot # (author_default) default mutation author
84
84
  pm config project set output_default_format json # (output.default_format) toon | json
85
85
  pm config project set locks_ttl_seconds 60 # (locks.ttl_seconds) integer >= 1
86
+ pm config project set checkpoints_retention_days 30 # (checkpoints.retention_days) integer >= 1; pm gc --scope checkpoints prunes checkpoints older than this many days
86
87
  pm config project set schema_unknown_field_policy reject # (schema.unknown_field_policy) allow | warn | reject
87
88
  ```
88
89
 
@@ -128,6 +129,19 @@ Interaction rules:
128
129
 
129
130
  `pm telemetry stats` reads the local queue and reports, per command bucket, latency percentiles (`duration_p50_ms`/`duration_p95_ms`/`duration_max_ms`, nearest-rank over `command_finish` `duration_ms`), outcome rates (`ok_count`/`error_count`/`error_rate`; a finish event whose `ok` is missing or not strictly `true` is counted conservatively as an error), and `command_resolution_counts`. These are an always-available, zero-network performance and reliability signal for the most recent queued window.
130
131
 
132
+ ### Sentry environment variables
133
+
134
+ Crash and error diagnostics are reported to Sentry only when telemetry is enabled and the process is not opted out. These environment variables tune the Sentry client.
135
+
136
+ | Variable | Values | Use |
137
+ |----------|--------|-----|
138
+ | `PM_SENTRY_DISABLED` | boolean | Disable Sentry error reporting for this process (the Sentry SDK is not even imported). `PM_TELEMETRY_DISABLED` / `PM_NO_TELEMETRY` also disable it. |
139
+ | `SENTRY_DSN` | URL | Override the destination DSN. Defaults to the bundled pm-cli project DSN. |
140
+ | `SENTRY_ENVIRONMENT` | string | Override the reported environment tag. Defaults to `test` under Vitest, `ci` when `CI` is set, otherwise `production`. |
141
+ | `SENTRY_TRACES_SAMPLE_RATE` | number `0`–`1` | Fraction of command spans sampled for performance tracing. Defaults to `0.2` (20%). Set to `1` for full-trace performance debugging or `0` to disable tracing. Non-numeric or out-of-range values fall back to the default. |
142
+
143
+ > Sentry is hard-disabled under Vitest (`VITEST` / `VITEST_WORKER_ID`), so these knobs are no-ops inside the test suite.
144
+
131
145
  ## Item Storage Format
132
146
 
133
147
  TOON is the default:
@@ -231,6 +245,31 @@ pm search "release docs" --mode keyword --limit 10
231
245
 
232
246
  Semantic and hybrid search can use built-in OpenAI-compatible or Ollama providers plus vector stores such as Qdrant or LanceDB. If local Ollama is available and semantic settings are unset, `pm` can resolve local defaults automatically.
233
247
 
248
+ ### Offline BM25 provider (pm-75k9)
249
+
250
+ For air-gapped, CI, or zero-setup environments there is a built-in **BM25** lexical ranker that powers `--semantic`/`--hybrid` search entirely in-process — no embedding service or vector store required. Select it via `search.provider`:
251
+
252
+ ```bash
253
+ pm config project set search_provider bm25 # always use BM25 for semantic/hybrid
254
+ pm config project set search_provider auto # use BM25 only when no embedding provider is configured
255
+ ```
256
+
257
+ - `bm25` always uses the offline ranker for semantic/hybrid queries, even when an embedding provider is set.
258
+ - `auto` falls back to BM25 only when no embedding provider (and no extension search provider) is available; the search result then carries a `search_<mode>_offline_bm25:no_embedding_provider:using_lexical_bm25` warning.
259
+ - Any other value (e.g. `openai`, `ollama`, or an extension provider name) keeps the existing embedding/vector path.
260
+
261
+ Tune BM25 ranking with two persisted, validated knobs:
262
+
263
+ - `search.bm25.k1` (number `>= 0`, default `1.2`) — term-frequency saturation; higher values let repeated terms keep accruing weight, lower values saturate sooner.
264
+ - `search.bm25.b` (number `0..1`, default `0.75`) — document-length normalization; `0` disables it, `1` fully normalizes by length.
265
+
266
+ ```bash
267
+ pm config project set search_bm25_k1 1.5
268
+ pm config project set search_bm25_b 0.5
269
+ ```
270
+
271
+ BM25 quality is lexical — a strong baseline, but below true dense retrieval; configure an embedding provider when semantic similarity matters. Measure either path against a golden-query set with `pm eval` (see COMMANDS.md).
272
+
234
273
  `search.hybrid_semantic_weight` (number `0..1`, default `0.7`) is the persistent default blend used in **hybrid** mode: it weights the semantic (vector) score against the lexical score during score fusion — higher favours semantic retrieval, lower favours keyword matching. A per-query `pm search --semantic-weight <value>` overrides it for a single query; when the flag is omitted the persistent setting applies. Set it once with:
235
274
 
236
275
  ```bash
@@ -150,7 +150,7 @@ export function activate(api) {
150
150
  }
151
151
  ```
152
152
 
153
- Package-backed extensions can use the SDK helper after declaring `@unbrained/pm-cli` in `package.json` and installing dependencies. Use this shape for packages published to npm or installed from a package root:
153
+ Package-backed extensions can use the SDK helper after declaring `@unbrained/pm-cli` in `package.json` and installing dependencies. Registry installs satisfy that SDK import from the running host CLI instead of downloading a nested CLI copy into each project extension directory, so package authors can declare `@unbrained/pm-cli` as a peer dependency without adding the CLI's own telemetry/runtime dependencies to every workspace. Use this shape for packages published to npm or installed from a package root:
154
154
 
155
155
  ```js
156
156
  import { defineExtension } from "@unbrained/pm-cli/sdk";
@@ -427,7 +427,7 @@ requiring private loader imports or a temporary `.agents/pm/extensions` tree.
427
427
  Keep `pm package doctor --project --detail deep --trace` and runtime contracts
428
428
  for integration tests against installed packages.
429
429
 
430
- `PM_CLI_PACKAGE_ROOT` is first-party only. Bundled packages in this repository use it to find the running CLI's `dist/sdk/runtime.js` before they are published or installed independently. External packages must not read this environment variable or import from `dist/` or `src/core`; use `@unbrained/pm-cli/sdk`, `@unbrained/pm-cli/sdk/runtime`, and `@unbrained/pm-cli/sdk/testing`.
430
+ `PM_CLI_PACKAGE_ROOT` is first-party only. Bundled packages in this repository use it to find the running CLI's `dist/sdk/runtime.js` before they are published or installed independently. External packages must not read this environment variable or import from `dist/` or `src/core`; use `@unbrained/pm-cli/sdk`, `@unbrained/pm-cli/sdk/runtime`, and `@unbrained/pm-cli/sdk/testing`. During `pm install npm:<package>`, pm links the installed package's `@unbrained/pm-cli` dependency back to the running host CLI so SDK imports resolve without a duplicate nested CLI install.
431
431
 
432
432
  ## Troubleshooting
433
433
 
@@ -19,12 +19,19 @@ Normalization runs across command families and preserves a normalization trace f
19
19
 
20
20
  `resolvePmRoot()` precedence is now:
21
21
 
22
- 1. explicit `--path`
22
+ 1. explicit `--pm-path` (or its compatibility alias `--path`)
23
23
  2. `PM_PATH`
24
24
  3. upward discovery of initialized `.agents/pm` roots (must contain `settings.json`)
25
25
  4. local default (`<cwd>/.agents/pm`)
26
26
 
27
- If you need the old local-only behavior from nested directories, pass an explicit path (`--path .agents/pm`).
27
+ `--pm-path` is the preferred explicit flag; `--path` remains a backward-compatible
28
+ alias for the same tracker-storage directory (not a workspace/cwd flag). An
29
+ explicit path that points at a project root is redirected to its `.agents/pm`
30
+ subdirectory (pm-ryik), so `--pm-path <repo>` and `--pm-path <repo>/.agents/pm`
31
+ resolve to the same tracker. See [Configuration](CONFIGURATION.md) for the
32
+ current contract.
33
+
34
+ If you need the old local-only behavior from nested directories, pass an explicit path (`--pm-path .agents/pm`).
28
35
 
29
36
  ### 3) Structured recovery bundles in CLI error output
30
37
 
@@ -83,8 +83,10 @@ Useful item types:
83
83
  | `Epic` | broad outcome or initiative |
84
84
  | `Feature` | user-facing capability or major slice |
85
85
  | `Task` | implementation work |
86
+ | `Chore` | maintenance, refactoring, or housekeeping work |
86
87
  | `Issue` | bug or defect |
87
88
  | `Decision` | recorded choice and rationale |
89
+ | `Plan` | agent-optimized living plan with ordered steps and evidence |
88
90
  | `Event`, `Reminder`, `Milestone`, `Meeting` | calendar-aware planning |
89
91
 
90
92
  ## Find and Claim Work
package/docs/README.md CHANGED
@@ -38,9 +38,11 @@ pm guide release --json
38
38
  - [Testing](TESTING.md) - sandbox-safe local tests and linked-test orchestration.
39
39
  - [Architecture](ARCHITECTURE.md) - contributor internals: storage, mutation flow, search, extensions, and command contracts.
40
40
  - [Packages and Extensions](EXTENSIONS.md) - package install workflows, runtime extension lifecycle, and API reference.
41
+ - [Extension Author Contracts](EXTENSION_AUTHOR_CONTRACTS.md) - the stability guarantees and contract surface package authors build against.
41
42
  - [SDK](SDK.md) - public import surfaces and typed authoring examples.
42
43
  - [Codex Plugin](CODEX_PLUGIN.md) - native MCP plugin install, tools, skills, and safety notes.
43
44
  - [Claude Code Plugin](CLAUDE_CODE_PLUGIN.md) - native Claude Code plugin architecture and install flow.
45
+ - [CLI Simplification Migration](MIGRATION_CLI_SIMPLIFICATION.md) - root discovery (`--pm-path`), recovery bundles, and clear/unset semantics for automation maintainers.
44
46
  - [Releasing](RELEASING.md) - maintainer release checklist and failure handling.
45
47
  - [starter extension](examples/starter-extension/README.md) - compact extension scaffold reference.
46
48
 
package/docs/RELEASING.md CHANGED
@@ -166,7 +166,7 @@ git push origin v<version>
166
166
  - build, typecheck, test, and coverage
167
167
  - static quality gate (complexity, duplication, dead/orphan module, file/folder hygiene)
168
168
  - temporary-project compatibility gate against latest published tracker data
169
- - reliability threshold gate (Sentry severity threshold; `--telemetry-mode` gate policy: `off` | `best-effort` | `required`)
169
+ - reliability threshold gate (Sentry severity threshold, bounded to a recent-activity window via `--sentry-window-days` (default `14`, `0` = unbounded) so a stale benign unresolved issue cannot block every scheduled release; `--telemetry-mode` gate policy: `off` | `best-effort` | `required`). Scheduled `auto-release.yml` failures open/update an `Auto Release blocked` GitHub issue so blocked daily releases are never silently skipped.
170
170
  - sandboxed `pm` coverage
171
171
  - optional Sentry release metadata and sourcemap upload when `SENTRY_AUTH_TOKEN` is configured
172
172
  - npm pack dry run and npx tarball smoke test
@@ -201,6 +201,7 @@ Use the npm registry package for maintainer global updates. Do not use `npm inst
201
201
  ## Failure Handling
202
202
 
203
203
  - If local gates fail, fix and rerun before tagging.
204
+ - Treat failed scheduled Nightly Validation jobs as release-health blockers until triaged. The nightly workflow opens or updates a GitHub issue for each failing scheduled OS/Node matrix entry, with the run URL and commit SHA, so cross-platform regressions do not rely on someone manually scanning the Actions tab.
204
205
  - If the tag workflow fails before npm publish, confirm no package was published before moving or replacing a tag.
205
206
  - If npm publish succeeds but GitHub Release creation fails, rerun `.github/workflows/release.yml` with `workflow_dispatch` and `tag=v<version>`; the workflow skips duplicate npm publish, reruns public verification, and creates the GitHub Release for the existing tag.
206
207
  - Record failure evidence and remediation in the release `pm` item.
package/docs/SDK.md CHANGED
@@ -372,7 +372,7 @@ import { defineExtension } from "@unbrained/pm-cli/sdk";
372
372
  import { createPmCliExpectedError } from "@unbrained/pm-cli/sdk/runtime";
373
373
  ```
374
374
 
375
- `PM_CLI_PACKAGE_ROOT` is reserved for first-party packages bundled inside this repository. Those packages use it to locate the running CLI's `dist/sdk/runtime.js` before they are installed as independent npm packages. External packages must not depend on `PM_CLI_PACKAGE_ROOT`, `dist/` paths, or `src/core/...`; declare `@unbrained/pm-cli` as a dependency or peer dependency and import the public SDK subpaths instead.
375
+ `PM_CLI_PACKAGE_ROOT` is reserved for first-party packages bundled inside this repository. Those packages use it to locate the running CLI's `dist/sdk/runtime.js` before they are installed as independent npm packages. External packages must not depend on `PM_CLI_PACKAGE_ROOT`, `dist/` paths, or `src/core/...`; declare `@unbrained/pm-cli` as a dependency or peer dependency and import the public SDK subpaths instead. When pm installs a registry package, it links that dependency to the running host CLI so the package gets the active SDK without downloading a second CLI copy into the project.
376
376
 
377
377
  ## Testing Helpers
378
378
 
@@ -630,6 +630,14 @@ Manifest capability: `importers` (and `schema` when supplying `flags`). The two-
630
630
  form remains supported; supplying the options object never produces a command-handler
631
631
  collision because the definition and handler share the same command path and extension.
632
632
 
633
+ Importers and exporters read their source/destination through flags (e.g. `--file`,
634
+ `--folder`) and take **no positional argument** unless one is declared via `arguments`.
635
+ An unexpected positional (such as `pm jsonl import data.jsonl` instead of
636
+ `pm jsonl import --file data.jsonl`) is rejected with a usage error rather than being
637
+ silently ignored, and any `failure_hints` you register are appended to that error so an
638
+ agent is steered to the correct flag. Flags declared via `flags` render once, as
639
+ first-class options in the standard `Options:` section of `--help`.
640
+
633
641
  The bundled `pm-beads` and `pm-todos` packages are first-party importer/exporter
634
642
  exemplars that use this registration path and expose runtime contracts for their
635
643
  generated commands.
package/docs/TESTING.md CHANGED
@@ -52,6 +52,24 @@ quality:static`: every `src/**/*.ts` source file needs a module TSDoc block,
52
52
  every exported declaration needs a non-module TSDoc block, and known generated
53
53
  boilerplate summaries are rejected.
54
54
 
55
+ ### Directory-load cap and the `tests/unit` split
56
+
57
+ `pnpm quality:static` also caps each directory under `src/`, `tests/`, and
58
+ `packages/` at **120 `.ts` files** (`--max-files-per-dir`, default `120`). This
59
+ keeps any single directory navigable and forces load to be partitioned by area
60
+ rather than piling into one folder. `tests/unit/` is therefore split into
61
+ per-area subdirectories (`tests/unit/commands/`, `tests/unit/core/`,
62
+ `tests/unit/cli/`, `tests/unit/mcp/`, `tests/unit/extensions/`, …) instead of a
63
+ single flat directory.
64
+
65
+ When adding a unit test, place it in the matching `tests/unit/<area>/`
66
+ subdirectory (or merge into an existing spec there); never add a file directly
67
+ to `tests/unit/`. The
68
+ [`static-quality-gate directory-load contract`](../tests/integration/ci-workflow-contract.spec.ts)
69
+ test asserts the live repository stays at or below the cap and that the magic
70
+ number matches the gate default, so drift is caught before CI's `static` gate
71
+ fails.
72
+
55
73
  ## Search Quality Evaluation
56
74
 
57
75
  `search-advanced` exposes an advisory golden-query harness for relevance drift checks.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-cli",
3
- "version": "2026.6.19",
3
+ "version": "2026.6.20",
4
4
  "description": "Git-native project management CLI for humans and agents.",
5
5
  "type": "module",
6
6
  "author": "unbrained",
@@ -125,7 +125,7 @@
125
125
  }
126
126
  },
127
127
  "dependencies": {
128
- "@sentry/node": "^10.58.0",
128
+ "@sentry/node": "^10.59.0",
129
129
  "@toon-format/toon": "^2.3.0",
130
130
  "commander": "^14.0.3",
131
131
  "fast-glob": "^3.3.3",
@@ -150,7 +150,8 @@
150
150
  "brace-expansion": ">=5.0.6",
151
151
  "vite": "7.3.5",
152
152
  "esbuild": "0.28.1",
153
- "@opentelemetry/core": ">=2.8.0"
153
+ "@opentelemetry/core": ">=2.8.0",
154
+ "undici": "6.27.0"
154
155
  }
155
156
  }
156
157
  }
@@ -39,6 +39,7 @@ export function activate(api) {
39
39
  api.registerImporter("todos", async (context) => runTodosImportFromRuntime(toImportOptions(context.options), context.global), {
40
40
  action: "todos-import",
41
41
  description: "Import Todo markdown files into pm items.",
42
+ failure_hints: ["This command reads a directory, not a file. Use --folder <path> to point at the Todo markdown directory."],
42
43
  flags: [
43
44
  {
44
45
  long: "--folder",
@@ -63,6 +64,7 @@ export function activate(api) {
63
64
  api.registerExporter("todos", async (context) => runTodosExportFromRuntime(toExportOptions(context.options), context.global), {
64
65
  action: "todos-export",
65
66
  description: "Export pm items into Todo markdown files.",
67
+ failure_hints: ["This command writes a directory of markdown files. Use --folder <path> to choose the destination directory."],
66
68
  flags: [
67
69
  {
68
70
  long: "--folder",
@@ -65,6 +65,7 @@ export function activate(api: ExtensionApi): void {
65
65
  {
66
66
  action: "todos-import",
67
67
  description: "Import Todo markdown files into pm items.",
68
+ failure_hints: ["This command reads a directory, not a file. Use --folder <path> to point at the Todo markdown directory."],
68
69
  flags: [
69
70
  {
70
71
  long: "--folder",
@@ -93,6 +94,7 @@ export function activate(api: ExtensionApi): void {
93
94
  {
94
95
  action: "todos-export",
95
96
  description: "Export pm items into Todo markdown files.",
97
+ failure_hints: ["This command writes a directory of markdown files. Use --folder <path> to choose the destination directory."],
96
98
  flags: [
97
99
  {
98
100
  long: "--folder",
@@ -261,7 +261,7 @@ export async function runTodosImport(options, global) {
261
261
  entries = await fs.readdir(sourceFolder, { withFileTypes: true });
262
262
  }
263
263
  catch {
264
- throw new PmCliError(`Todos source folder not found at ${sourceFolder}`, EXIT_CODE.NOT_FOUND);
264
+ throw new PmCliError(`Todos source folder not found at ${sourceFolder}. Use --folder <path> to point at the directory of Todo markdown files.`, EXIT_CODE.NOT_FOUND);
265
265
  }
266
266
  const author = selectAuthor(toNonEmptyString(options.author), settings.author_default);
267
267
  const message = toNonEmptyString(options.message) ?? "Import from todos markdown";
@@ -383,7 +383,10 @@ export async function runTodosImport(options: TodosImportOptions, global: Global
383
383
  try {
384
384
  entries = await fs.readdir(sourceFolder, { withFileTypes: true });
385
385
  } catch {
386
- throw new PmCliError(`Todos source folder not found at ${sourceFolder}`, EXIT_CODE.NOT_FOUND);
386
+ throw new PmCliError(
387
+ `Todos source folder not found at ${sourceFolder}. Use --folder <path> to point at the directory of Todo markdown files.`,
388
+ EXIT_CODE.NOT_FOUND,
389
+ );
387
390
  }
388
391
 
389
392
  const author = selectAuthor(toNonEmptyString(options.author), settings.author_default);
@@ -1,18 +0,0 @@
1
- import {
2
- _testOnly,
3
- runActivity
4
- } from "./chunk-OURX4WVG.js";
5
- import "./chunk-QTWWHFI3.js";
6
- import "./chunk-2RI3BDFK.js";
7
- import "./chunk-DYZKSIVX.js";
8
- import "./chunk-X7RKOJXL.js";
9
- import "./chunk-5NS6TJ2F.js";
10
- import "./chunk-QSH34DSQ.js";
11
- import "./chunk-SO2IOH37.js";
12
- import "./chunk-MTGMNUMJ.js";
13
- import "./chunk-5QLHQK7V.js";
14
- export {
15
- _testOnly,
16
- runActivity
17
- };
18
- //# sourceMappingURL=activity-62I26XZB.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../../core/history/replay.ts"],
4
- "sourcesContent": ["/**\n * @module core/history/replay\n *\n * Implements append-only history and replay behavior for Replay.\n */\nimport jsonPatch from \"fast-json-patch\";\nimport { FRONT_MATTER_KEY_ORDER } from \"../shared/constants.js\";\nimport { canonicalDocument } from \"../item/item-format.js\";\nimport { toItemRecord } from \"../item/item-record.js\";\nimport { orderObject, sha256Hex, stableStringify } from \"../shared/serialization.js\";\nimport { hashDocument } from \"./history.js\";\nimport type { HistoryEntry, HistoryPatchOp, ItemDocument, ItemMetadata } from \"../../types/index.js\";\n\n/**\n * Shared history replay/patch mechanics single-sourced for the history, restore,\n * history-redact, and history-repair commands plus the health/validate drift checks.\n *\n * Each command keeps its own thin error-formatting wrapper so the exact CLI error\n * contracts (restore's rich patch-failure context, redact's op tag, history's\n * generic message) are preserved; only the underlying replay/patch logic is shared.\n */\n\nexport interface ReplayDocument {\n metadata: Record<string, unknown>;\n body: string;\n}\n\nexport const EMPTY_REPLAY_DOCUMENT: ReplayDocument = {\n metadata: {},\n body: \"\",\n};\n\n/**\n * Implements clone empty replay document for the public runtime surface of this module.\n */\nexport function cloneEmptyReplayDocument(): ReplayDocument {\n return structuredClone(EMPTY_REPLAY_DOCUMENT);\n}\n\n/**\n * Implements replay hash for the public runtime surface of this module.\n */\nexport function replayHash(document: ReplayDocument): string {\n try {\n return hashDocument({\n metadata: document.metadata as unknown as ItemMetadata,\n body: document.body,\n });\n } catch {\n // Legacy/malformed replay states (for example a stream whose first entry never\n // established a full `create` document, so the canonicalizer cannot normalize it)\n // cannot be canonically hashed. Fall back to a deterministic structural hash so\n // re-anchor and verification stay internally consistent for these streams. Fully\n // formed documents always take the canonical path above, so valid streams are\n // unaffected.\n return sha256Hex(stableStringify({ replay_fallback: true, metadata: document.metadata, body: document.body }));\n }\n}\n\n/**\n * Implements replay to item document for the public runtime surface of this module.\n */\nexport function replayToItemDocument(document: ReplayDocument): ItemDocument {\n return {\n metadata: document.metadata as unknown as ItemMetadata,\n body: document.body,\n };\n}\n\n/**\n * Canonicalize an item document into the ordered replay form used when comparing\n * a replayed chain against the on-disk item (restore + history-repair reconciliation).\n */\nexport function toReplayDocument(document: ItemDocument): ReplayDocument {\n if (!document.metadata || Object.keys(document.metadata).length === 0) {\n return {\n metadata: {},\n body: document.body ?? \"\",\n };\n }\n const canonical = canonicalDocument(document);\n return {\n metadata: orderObject(toItemRecord(canonical.metadata), FRONT_MATTER_KEY_ORDER),\n body: canonical.body,\n };\n}\n\n/**\n * Implements normalize replay patch path for the public runtime surface of this module.\n */\nexport function normalizeReplayPatchPath(path: string): string {\n if (path === \"/front_matter\") {\n return \"/metadata\";\n }\n if (path.startsWith(\"/front_matter/\")) {\n return `/metadata/${path.slice(\"/front_matter/\".length)}`;\n }\n return path;\n}\n\nfunction isHistoryPatchOp(value: unknown): value is HistoryPatchOp {\n return (\n typeof value === \"object\" &&\n value !== null &&\n typeof (value as { op?: unknown }).op === \"string\" &&\n typeof (value as { path?: unknown }).path === \"string\"\n );\n}\n\n/**\n * Implements normalize replay patch ops for the public runtime surface of this module.\n */\nexport function normalizeReplayPatchOps(patch: HistoryPatchOp[] | unknown): HistoryPatchOp[] {\n if (!Array.isArray(patch)) {\n return [];\n }\n return patch.filter(isHistoryPatchOp).map((operation) => ({\n ...operation,\n path: normalizeReplayPatchPath(operation.path),\n from: typeof operation.from === \"string\" ? normalizeReplayPatchPath(operation.from) : undefined,\n }));\n}\n\nfunction isReplayDocumentShape(value: unknown): value is { metadata: Record<string, unknown>; body: string } {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"metadata\" in value &&\n \"body\" in value &&\n typeof (value as { body: unknown }).body === \"string\" &&\n typeof (value as { metadata: unknown }).metadata === \"object\" &&\n (value as { metadata: unknown }).metadata !== null\n );\n}\n\n/**\n * Restricts replay apply result values accepted by command, SDK, and storage contracts.\n */\nexport type ReplayApplyResult =\n | { ok: true; document: ReplayDocument }\n | { ok: false; error: unknown };\n\n/**\n * Strictly apply a history patch (front_matter->metadata normalized) to a replay\n * document. Returns a result envelope rather than throwing so each caller can\n * format its own error contract.\n */\nexport function tryApplyReplayPatch(current: ReplayDocument, patch: HistoryPatchOp[]): ReplayApplyResult {\n try {\n const normalizedPatch = normalizeReplayPatchOps(patch);\n const applied = jsonPatch.applyPatch(\n structuredClone(current),\n normalizedPatch as jsonPatch.Operation[],\n true,\n false,\n ).newDocument as unknown;\n if (!isReplayDocumentShape(applied)) {\n return { ok: false, error: new Error(\"history_replay_invalid_document_shape\") };\n }\n return { ok: true, document: { metadata: applied.metadata, body: applied.body } };\n } catch (error) {\n return { ok: false, error };\n }\n}\n\n/**\n * Deterministically verify a history chain: each entry's before_hash must equal\n * the prior replayed after_hash, the patch must strictly apply, and the recorded\n * after_hash must equal the replayed result.\n */\nexport function verifyHistoryChain(entries: HistoryEntry[]): { ok: boolean; errors: string[] } {\n let replay = cloneEmptyReplayDocument();\n for (let index = 0; index < entries.length; index += 1) {\n const entry = entries[index];\n if (replayHash(replay) !== entry.before_hash) {\n return {\n ok: false,\n errors: [`verify_failed:before_hash_mismatch:entry_${index + 1}`],\n };\n }\n const applied = tryApplyReplayPatch(replay, entry.patch);\n if (!applied.ok) {\n return {\n ok: false,\n errors: [`verify_failed:patch_apply_failed:entry_${index + 1}`],\n };\n }\n replay = applied.document;\n if (replayHash(replay) !== entry.after_hash) {\n return {\n ok: false,\n errors: [`verify_failed:after_hash_mismatch:entry_${index + 1}`],\n };\n }\n }\n return { ok: true, errors: [] };\n}\n\n/**\n * Documents the lenient apply result payload exchanged by command, SDK, and package integrations.\n */\nexport interface LenientApplyResult {\n document: ReplayDocument;\n convertedReplaceToAdd: number;\n skippedOps: number;\n}\n\nfunction tryApplySingleOp(document: unknown, op: HistoryPatchOp): { ok: true; document: unknown } | { ok: false } {\n try {\n const applied = jsonPatch.applyPatch(\n structuredClone(document),\n [op as jsonPatch.Operation],\n true,\n false,\n ).newDocument as unknown;\n return { ok: true, document: applied };\n } catch {\n return { ok: false };\n }\n}\n\n/**\n * Apply a legacy patch op-by-op, recovering from drift that strict replay rejects:\n * a `replace` whose path no longer exists is retried as `add`, and any op that\n * still cannot apply against the current replay state is skipped. The resulting\n * document is what the repaired entry's recomputed patch should target.\n */\nexport function lenientApplyReplayPatch(current: ReplayDocument, patch: HistoryPatchOp[]): LenientApplyResult {\n let working: unknown = structuredClone(current);\n let convertedReplaceToAdd = 0;\n let skippedOps = 0;\n\n for (const op of normalizeReplayPatchOps(patch)) {\n const direct = tryApplySingleOp(working, op);\n if (direct.ok) {\n working = direct.document;\n continue;\n }\n if (op.op === \"replace\") {\n const asAdd = tryApplySingleOp(working, { ...op, op: \"add\" });\n if (asAdd.ok) {\n working = asAdd.document;\n convertedReplaceToAdd += 1;\n continue;\n }\n }\n skippedOps += 1;\n }\n\n const candidate = working as { metadata?: unknown; body?: unknown };\n const document: ReplayDocument = {\n metadata:\n typeof candidate.metadata === \"object\" && candidate.metadata !== null\n ? (candidate.metadata as Record<string, unknown>)\n : {},\n body: typeof candidate.body === \"string\" ? candidate.body : current.body,\n };\n return { document, convertedReplaceToAdd, skippedOps };\n}\n\n/**\n * Documents the reanchor entry detail payload exchanged by command, SDK, and package integrations.\n */\nexport interface ReanchorEntryDetail {\n index: number;\n rehashed: boolean;\n patch_repaired: boolean;\n converted_replace_to_add: number;\n skipped_ops: number;\n}\n\n/**\n * Documents the reanchor result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ReanchorResult {\n entries: HistoryEntry[];\n finalDocument: ReplayDocument;\n entriesRehashed: number;\n entriesPatchRepaired: number;\n convertedReplaceToAdd: number;\n skippedOps: number;\n details: ReanchorEntryDetail[];\n}\n\n/**\n * Re-anchor a drifted history chain: replay every entry from empty, recompute the\n * before/after hashes, and only rewrite a patch when the original op set no longer\n * strictly applies (legacy drift). Clean entries keep their patch verbatim so the\n * on-disk diff stays minimal. The returned chain verifies via verifyHistoryChain.\n */\nexport function reanchorHistoryEntries(entries: HistoryEntry[]): ReanchorResult {\n let replay = cloneEmptyReplayDocument();\n const rewritten: HistoryEntry[] = [];\n const details: ReanchorEntryDetail[] = [];\n let entriesRehashed = 0;\n let entriesPatchRepaired = 0;\n let convertedReplaceToAdd = 0;\n let skippedOps = 0;\n\n for (let index = 0; index < entries.length; index += 1) {\n const entry = entries[index];\n const beforeHash = replayHash(replay);\n const strict = tryApplyReplayPatch(replay, entry.patch);\n\n let next: ReplayDocument;\n let outPatch: HistoryPatchOp[];\n let patchRepaired = false;\n let entryConverted = 0;\n let entrySkipped = 0;\n\n if (strict.ok) {\n next = strict.document;\n outPatch = entry.patch;\n } else {\n const lenient = lenientApplyReplayPatch(replay, entry.patch);\n next = lenient.document;\n outPatch = jsonPatch.compare(replay, next) as HistoryPatchOp[];\n patchRepaired = true;\n entryConverted = lenient.convertedReplaceToAdd;\n entrySkipped = lenient.skippedOps;\n convertedReplaceToAdd += entryConverted;\n skippedOps += entrySkipped;\n entriesPatchRepaired += 1;\n }\n\n const afterHash = replayHash(next);\n const rehashed = beforeHash !== entry.before_hash || afterHash !== entry.after_hash;\n if (rehashed) {\n entriesRehashed += 1;\n }\n\n rewritten.push({\n ...entry,\n patch: outPatch,\n before_hash: beforeHash,\n after_hash: afterHash,\n });\n details.push({\n index: index + 1,\n rehashed,\n patch_repaired: patchRepaired,\n converted_replace_to_add: entryConverted,\n skipped_ops: entrySkipped,\n });\n replay = next;\n }\n\n return {\n entries: rewritten,\n finalDocument: replay,\n entriesRehashed,\n entriesPatchRepaired,\n convertedReplaceToAdd,\n skippedOps,\n details,\n };\n}\n\n/**\n * Implements history entries to raw for the public runtime surface of this module.\n */\nexport function historyEntriesToRaw(entries: HistoryEntry[]): string {\n if (entries.length === 0) {\n return \"\";\n }\n return `${entries.map((entry) => JSON.stringify(entry)).join(\"\\n\")}\\n`;\n}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MAAM;AACpC,UAAM,SAAS,oBAAoB,QAAQ,MAAM,KAAK;AAEtD,QAAI;AACJ,QAAI;AACJ,QAAI,gBAAgB;AACpB,QAAI,iBAAiB;AACrB,QAAI,eAAe;AAEnB,QAAI,OAAO,IAAI;AACb,aAAO,OAAO;AACd,iBAAW,MAAM;IACnB,OAAO;AACL,YAAM,UAAU,wBAAwB,QAAQ,MAAM,KAAK;AAC3D,aAAO,QAAQ;AACf,iBAAW,UAAU,QAAQ,QAAQ,IAAI;AACzC,sBAAgB;AAChB,uBAAiB,QAAQ;AACzB,qBAAe,QAAQ;AACvB,+BAAyB;AACzB,oBAAc;AACd,8BAAwB;IAC1B;AAEA,UAAM,YAAY,WAAW,IAAI;AACjC,UAAM,WAAW,eAAe,MAAM,eAAe,cAAc,MAAM;AACzE,QAAI,UAAU;AACZ,yBAAmB;IACrB;AAEA,cAAU,KAAK;MACb,GAAG;MACH,OAAO;MACP,aAAa;MACb,YAAY;KACb;AACD,YAAQ,KAAK;MACX,OAAO,QAAQ;MACf;MACA,gBAAgB;MAChB,0BAA0B;MAC1B,aAAa;KACd;AACD,aAAS;EACX;AAEA,SAAO;IACL,SAAS;IACT,eAAe;IACf;IACA;IACA;IACA;IACA;;AAEJ;AAKM,SAAU,oBAAoB,SAAuB;AACzD,MAAI,QAAQ,WAAW,GAAG;AACxB,WAAO;EACT;AACA,SAAO,GAAG,QAAQ,IAAI,CAAC,UAAU,KAAK,UAAU,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC;;AACpE;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../../core/item/status-filter.ts", "../../../../../../../../core/schema/runtime-field-filters.ts", "../../../../../../../../cli/commands/list.ts"],
4
- "sourcesContent": ["/**\n * @module core/item/status-filter\n *\n * Defines item parsing, formatting, and lifecycle helpers for Status Filter.\n */\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { PmCliError } from \"../shared/errors.js\";\nimport { levenshteinDistanceWithinLimit } from \"../shared/levenshtein.js\";\nimport type { RuntimeStatusRegistry } from \"../schema/runtime-schema.js\";\nimport type { ItemStatus } from \"../../types/index.js\";\nimport { normalizeStatusInput } from \"./status.js\";\n\n// Workflow-group aliases shared by every status-filter consumer so that the\n// agent-friendly `open`/`closed`/`canceled` shorthands resolve to whatever the\n// runtime workflow has configured as its open/close/cancel anchors, rather than\n// hardcoding the built-in status ids. `cancelled` is accepted as a spelling\n// variant of `canceled`.\nconst STATUS_GROUP_ALIASES: Readonly<Record<string, \"open_status\" | \"close_status\" | \"canceled_status\">> = {\n open: \"open_status\",\n closed: \"close_status\",\n canceled: \"canceled_status\",\n cancelled: \"canceled_status\",\n};\n\n/**\n * Resolve a single status-filter token to a concrete runtime status id.\n *\n * Returns `undefined` when the token is not a recognized workflow-group alias\n * (open/closed/canceled) and does not normalize to a known registry status.\n * Callers decide whether an unrecognized token is an error (strict mode) or is\n * passed through verbatim (lenient mode) — see {@link parseStatusFilterCsv}.\n */\nexport function resolveStatusFilterToken(\n token: string,\n registry: RuntimeStatusRegistry,\n): ItemStatus | undefined {\n const trimmed = token.trim().toLowerCase();\n if (trimmed.length === 0) {\n return undefined;\n }\n const group = STATUS_GROUP_ALIASES[trimmed];\n if (group) {\n return registry[group] as ItemStatus;\n }\n return normalizeStatusInput(token, registry);\n}\n\nfunction collectStatusSuggestionCandidates(registry: RuntimeStatusRegistry): string[] {\n const candidates = new Set<string>(Object.keys(STATUS_GROUP_ALIASES));\n for (const definition of registry.definitions) {\n candidates.add(definition.id);\n for (const alias of definition.aliases) {\n candidates.add(alias);\n }\n }\n return [...candidates];\n}\n\nfunction suggestClosestStatus(value: string, registry: RuntimeStatusRegistry): string | undefined {\n // Only ever called for an unresolved, already-non-empty token (parseStatusFilterCsv\n // filters blanks first), so no empty-input guard is needed here.\n const normalized = value.trim().toLowerCase();\n let best: string | undefined;\n let bestDistance = Number.POSITIVE_INFINITY;\n for (const candidate of collectStatusSuggestionCandidates(registry)) {\n const distance = levenshteinDistanceWithinLimit(normalized, candidate.toLowerCase(), 2);\n if (distance !== null && distance < bestDistance) {\n best = candidate;\n bestDistance = distance;\n }\n }\n return best;\n}\n\n/**\n * Documents the parse status filter options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ParseStatusFilterOptions {\n /**\n * When true, an unrecognized token throws a USAGE error with a did-you-mean\n * hint. When false (default), an unrecognized token is passed through\n * verbatim so custom/unknown statuses still compare against item values by\n * their raw string — preserving the long-standing lenient `pm list` behavior.\n */\n strict?: boolean;\n /** Flag label used in error messages (default: \"--status\"). */\n flagLabel?: string;\n}\n\n/**\n * Parse a comma-separated status filter into a de-duplicated list of concrete\n * status ids. Shared by `pm list` (lenient) and `pm search` (strict, with a\n * did-you-mean hint on typos) so both surfaces resolve the open/closed/canceled\n * workflow-group aliases identically.\n */\nexport function parseStatusFilterCsv(\n raw: unknown,\n registry: RuntimeStatusRegistry,\n options?: ParseStatusFilterOptions,\n): ItemStatus[] | undefined {\n if (typeof raw !== \"string\") {\n return undefined;\n }\n const strict = options?.strict === true;\n const flagLabel = options?.flagLabel ?? \"--status\";\n const tokens = raw\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n if (tokens.length === 0) {\n return undefined;\n }\n const resolved: ItemStatus[] = [];\n for (const token of tokens) {\n const status = resolveStatusFilterToken(token, registry);\n if (status === undefined) {\n if (strict) {\n const suggestion = suggestClosestStatus(token, registry);\n throw new PmCliError(\n `Invalid ${flagLabel} value \"${token}\". Use open|closed|canceled or a configured status id${\n suggestion ? `. Did you mean \"${suggestion}\"?` : \".\"\n }`,\n EXIT_CODE.USAGE,\n );\n }\n resolved.push(token as ItemStatus);\n continue;\n }\n resolved.push(status);\n }\n return [...new Set(resolved)];\n}\n", "/**\n * @module core/schema/runtime-field-filters\n *\n * Resolves configurable schema, fields, statuses, and workflows for Runtime Field Filters.\n */\nimport { coerceRuntimeFieldValue, readRuntimeFieldOptionValue } from \"./runtime-field-values.js\";\nimport type { RuntimeFieldCommand, RuntimeFieldRegistry } from \"./runtime-schema.js\";\nimport { stableValueEquals } from \"../shared/serialization.js\";\n\nfunction valuesEqual(left: unknown, right: unknown): boolean {\n return stableValueEquals(left, right);\n}\n\n/**\n * Implements collect runtime filter values for the public runtime surface of this module.\n */\nexport function collectRuntimeFilterValues(\n options: Record<string, unknown>,\n fieldRegistry: RuntimeFieldRegistry,\n command: RuntimeFieldCommand,\n): Record<string, unknown> {\n const filters: Record<string, unknown> = {};\n for (const definition of fieldRegistry.command_to_fields.get(command) ?? []) {\n const rawValue = readRuntimeFieldOptionValue(options, definition);\n if (rawValue === undefined) {\n continue;\n }\n filters[definition.metadata_key] = coerceRuntimeFieldValue(definition, rawValue);\n }\n return filters;\n}\n\n/**\n * Implements matches runtime filters for the public runtime surface of this module.\n */\nexport function matchesRuntimeFilters(item: Record<string, unknown>, filters: Record<string, unknown>): boolean {\n for (const [fieldKey, expectedValue] of Object.entries(filters)) {\n const actualValue = item[fieldKey];\n if (Array.isArray(expectedValue)) {\n if (Array.isArray(actualValue)) {\n const normalizedActual = actualValue.map((value) => String(value));\n const normalizedExpected = expectedValue.map((value) => String(value));\n if (!normalizedExpected.every((value) => normalizedActual.includes(value))) {\n return false;\n }\n continue;\n }\n if (!valuesEqual(actualValue, expectedValue[expectedValue.length - 1])) {\n return false;\n }\n continue;\n }\n if (!valuesEqual(actualValue, expectedValue)) {\n return false;\n }\n }\n return true;\n}\n", "/**\n * @module cli/commands/list\n *\n * Implements the pm list command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { parseStatusFilterCsv } from \"../../core/item/status-filter.js\";\nimport { resolveItemTypeRegistry, type ItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { parseIntegerLimit, parsePriority, parseType } from \"../shared-parsers.js\";\nimport { collectRuntimeFilterValues, matchesRuntimeFilters } from \"../../core/schema/runtime-field-filters.js\";\nimport {\n hasMissingMetadataFilter,\n itemMatchesMissingMetadata,\n lifecycleClassifierFromStatusRegistry,\n type MissingMetadataFilters,\n} from \"../../core/governance/metadata-coverage.js\";\nimport {\n contentFiltersNeedBody,\n contentFiltersNeedCollections,\n hasContentFieldFilter,\n itemMatchesContentFilters,\n type ContentField,\n type ContentFieldFilters,\n} from \"../../core/governance/content-fields.js\";\nimport {\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n type RuntimeStatusRegistry,\n} from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE, FRONT_MATTER_KEY_ORDER } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { compareTimestampStrings, nowIso, resolveIsoOrRelative } from \"../../core/shared/time.js\";\nimport { listAllFrontMatter, listAllFrontMatterLight, listAllFrontMatterWithBody } from \"../../core/store/item-store.js\";\nimport { HEAVY_METADATA_KEYS } from \"../../core/store/front-matter-cache.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemFrontMatter, ItemStatus, ItemType } from \"../../types/index.js\";\n\n/**\n * Documents the list options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ListOptions {\n status?: string;\n type?: string;\n tag?: string;\n priority?: string;\n deadlineBefore?: string;\n deadlineAfter?: string;\n updatedAfter?: string;\n updatedBefore?: string;\n createdAfter?: string;\n createdBefore?: string;\n ids?: string;\n assignee?: string;\n assigneeFilter?: string;\n parent?: string;\n sprint?: string;\n release?: string;\n limit?: string;\n offset?: string;\n noTruncate?: boolean;\n includeBody?: boolean;\n compact?: boolean;\n brief?: boolean;\n full?: boolean;\n fields?: string;\n sort?: string;\n order?: string;\n tree?: boolean;\n treeDepth?: string;\n excludeTerminal?: boolean;\n filterAcMissing?: boolean;\n filterEstimatesMissing?: boolean;\n filterResolutionMissing?: boolean;\n filterMetadataMissing?: boolean;\n filterReviewerMissing?: boolean;\n filterRiskMissing?: boolean;\n filterConfidenceMissing?: boolean;\n filterSprintMissing?: boolean;\n filterReleaseMissing?: boolean;\n // Content-field presence filters (GH-242). The has*/no* companions mirror the\n // commander flag camelCase (e.g. --no-notes → noNotes, --empty-body → emptyBody)\n // so the MCP param names and ListOptions fields stay identical (the MCP path\n // forwards params verbatim, unlike the CLI which normalizes first). A field may\n // be requested present XOR absent — a both-set request is a usage error.\n hasNotes?: boolean;\n hasLearnings?: boolean;\n hasFiles?: boolean;\n hasDocs?: boolean;\n hasTests?: boolean;\n hasComments?: boolean;\n hasDeps?: boolean;\n hasBody?: boolean;\n hasLinkedCommand?: boolean;\n noNotes?: boolean;\n noLearnings?: boolean;\n noFiles?: boolean;\n noDocs?: boolean;\n noTests?: boolean;\n noComments?: boolean;\n noDeps?: boolean;\n emptyBody?: boolean;\n noLinkedCommand?: boolean;\n [key: string]: unknown;\n}\n\n/** Extract the missing-metadata selection filters from list/update-many options. */\nexport function resolveMissingMetadataFilters(options: {\n filterAcMissing?: boolean;\n filterEstimatesMissing?: boolean;\n filterResolutionMissing?: boolean;\n filterMetadataMissing?: boolean;\n filterReviewerMissing?: boolean;\n filterRiskMissing?: boolean;\n filterConfidenceMissing?: boolean;\n filterSprintMissing?: boolean;\n filterReleaseMissing?: boolean;\n}): MissingMetadataFilters {\n return {\n acMissing: options.filterAcMissing === true,\n estimatesMissing: options.filterEstimatesMissing === true,\n resolutionMissing: options.filterResolutionMissing === true,\n metadataMissing: options.filterMetadataMissing === true,\n reviewerMissing: options.filterReviewerMissing === true,\n riskMissing: options.filterRiskMissing === true,\n confidenceMissing: options.filterConfidenceMissing === true,\n sprintMissing: options.filterSprintMissing === true,\n releaseMissing: options.filterReleaseMissing === true,\n };\n}\n\n/** Per content field: the present flag and the absence flag on the options shape. */\ninterface ContentFieldFlagMapping {\n field: ContentField;\n presentKey: string;\n absentKey: string;\n /** Human flag names used in the conflict error message. */\n presentFlag: string;\n absentFlag: string;\n}\n\nconst CONTENT_FIELD_FLAG_MAPPINGS: readonly ContentFieldFlagMapping[] = [\n { field: \"notes\", presentKey: \"hasNotes\", absentKey: \"noNotes\", presentFlag: \"--has-notes\", absentFlag: \"--no-notes\" },\n { field: \"learnings\", presentKey: \"hasLearnings\", absentKey: \"noLearnings\", presentFlag: \"--has-learnings\", absentFlag: \"--no-learnings\" },\n { field: \"files\", presentKey: \"hasFiles\", absentKey: \"noFiles\", presentFlag: \"--has-files\", absentFlag: \"--no-files\" },\n { field: \"docs\", presentKey: \"hasDocs\", absentKey: \"noDocs\", presentFlag: \"--has-docs\", absentFlag: \"--no-docs\" },\n { field: \"tests\", presentKey: \"hasTests\", absentKey: \"noTests\", presentFlag: \"--has-tests\", absentFlag: \"--no-tests\" },\n { field: \"comments\", presentKey: \"hasComments\", absentKey: \"noComments\", presentFlag: \"--has-comments\", absentFlag: \"--no-comments\" },\n { field: \"deps\", presentKey: \"hasDeps\", absentKey: \"noDeps\", presentFlag: \"--has-deps\", absentFlag: \"--no-deps\" },\n { field: \"body\", presentKey: \"hasBody\", absentKey: \"emptyBody\", presentFlag: \"--has-body\", absentFlag: \"--empty-body\" },\n { field: \"linked_command\", presentKey: \"hasLinkedCommand\", absentKey: \"noLinkedCommand\", presentFlag: \"--has-linked-command\", absentFlag: \"--no-linked-command\" },\n] as const;\n\n/**\n * Resolve the content-field presence/absence selections from list/search\n * options. A field requested both present AND absent is a usage error (the two\n * selections are mutually exclusive). Returns an empty object when no\n * content-field filter is active.\n */\nexport function resolveContentFieldFilters(options: Record<string, unknown>): ContentFieldFilters {\n const filters: ContentFieldFilters = {};\n for (const mapping of CONTENT_FIELD_FLAG_MAPPINGS) {\n const present = options[mapping.presentKey] === true;\n const absent = options[mapping.absentKey] === true;\n if (present && absent) {\n throw new PmCliError(\n `Cannot combine ${mapping.presentFlag} with ${mapping.absentFlag} for the same field.`,\n EXIT_CODE.USAGE,\n );\n }\n if (present) {\n filters[mapping.field] = \"present\";\n } else if (absent) {\n filters[mapping.field] = \"absent\";\n }\n }\n return filters;\n}\n\n/**\n * Restricts listed item values accepted by command, SDK, and storage contracts.\n */\nexport type ListedItem = ItemFrontMatter | (ItemFrontMatter & { body: string });\n\ntype ListProjectionMode = \"full\" | \"compact\" | \"fields\";\n\ninterface ListProjectionConfig {\n mode: ListProjectionMode;\n fields: string[];\n}\n\nexport const LIST_SORT_FIELDS = [\"priority\", \"deadline\", \"updated_at\", \"created_at\", \"title\", \"parent\"] as const;\n/**\n * Restricts list sort field values accepted by command, SDK, and storage contracts.\n */\nexport type ListSortField = (typeof LIST_SORT_FIELDS)[number];\n\nexport const LIST_SORT_ORDER_VALUES = [\"asc\", \"desc\"] as const;\n/**\n * Restricts list sort order values accepted by command, SDK, and storage contracts.\n */\nexport type ListSortOrder = (typeof LIST_SORT_ORDER_VALUES)[number];\n\nconst DEFAULT_COMPACT_LIST_FIELDS = [\"id\", \"title\", \"status\", \"type\", \"priority\", \"parent\", \"updated_at\"] as const;\nconst BRIEF_LIST_FIELDS = [\"id\", \"status\", \"type\", \"title\"] as const;\nconst TREE_METADATA_FIELDS = [\"tree_depth\", \"tree_parent\", \"tree_children\", \"tree_title\"] as const;\n\n// A projection that selects any heavy collection field (or `--full`, which returns\n// items verbatim) must load the full metadata; everything else takes the light path.\n// Sourced from the single HEAVY_METADATA_KEYS definition in the cache layer so the\n// light/heavy split can never drift between the cache and the projection routing.\nconst HEAVY_PROJECTION_FIELDS: ReadonlySet<string> = new Set<string>(HEAVY_METADATA_KEYS);\n\ninterface ListResultBase {\n items: ListedItem[];\n count: number;\n // Total rows matched before pagination; only emitted when --limit/--offset\n // omitted rows, so agents know how many remain (GH-154).\n total?: number;\n warnings?: string[];\n}\n\n/**\n * Documents the list compact result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ListCompactResult extends ListResultBase {\n filters: Record<string, unknown>;\n projection?: undefined;\n sorting?: undefined;\n now?: undefined;\n}\n\n/**\n * Documents the list verbose result payload exchanged by command, SDK, and package integrations.\n */\nexport interface ListVerboseResult extends ListResultBase {\n filters: Record<string, unknown>;\n projection: {\n mode: ListProjectionMode;\n fields: string[] | null;\n };\n sorting: {\n sort: ListSortField | \"default\";\n order: ListSortOrder;\n };\n now: string;\n}\n\n/**\n * Restricts list result values accepted by command, SDK, and storage contracts.\n */\nexport type ListResult = ListCompactResult | ListVerboseResult;\n\nfunction isNonEmptyRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value) && Object.keys(value).length > 0;\n}\n\n// Active content-field filter flags, keyed by the options dest and the snake_case\n// summary key emitted in the filters echo (GH-242). Presence and absence are\n// distinct echo keys (has_notes vs no_notes; has_body vs empty_body).\nconst CONTENT_FILTER_ECHO_ENTRIES: ReadonlyArray<{ key: string; summaryKey: string }> = [\n { key: \"hasNotes\", summaryKey: \"has_notes\" },\n { key: \"hasLearnings\", summaryKey: \"has_learnings\" },\n { key: \"hasFiles\", summaryKey: \"has_files\" },\n { key: \"hasDocs\", summaryKey: \"has_docs\" },\n { key: \"hasTests\", summaryKey: \"has_tests\" },\n { key: \"hasComments\", summaryKey: \"has_comments\" },\n { key: \"hasDeps\", summaryKey: \"has_deps\" },\n { key: \"hasBody\", summaryKey: \"has_body\" },\n { key: \"hasLinkedCommand\", summaryKey: \"has_linked_command\" },\n { key: \"noNotes\", summaryKey: \"no_notes\" },\n { key: \"noLearnings\", summaryKey: \"no_learnings\" },\n { key: \"noFiles\", summaryKey: \"no_files\" },\n { key: \"noDocs\", summaryKey: \"no_docs\" },\n { key: \"noTests\", summaryKey: \"no_tests\" },\n { key: \"noComments\", summaryKey: \"no_comments\" },\n { key: \"noDeps\", summaryKey: \"no_deps\" },\n { key: \"emptyBody\", summaryKey: \"empty_body\" },\n { key: \"noLinkedCommand\", summaryKey: \"no_linked_command\" },\n] as const;\n\n// Active governance-missing filter flags (GH-236), keyed by options dest and the\n// snake_case summary key emitted in the filters echo.\nconst GOVERNANCE_MISSING_ECHO_ENTRIES: ReadonlyArray<{ key: string; summaryKey: string }> = [\n { key: \"filterReviewerMissing\", summaryKey: \"filter_reviewer_missing\" },\n { key: \"filterRiskMissing\", summaryKey: \"filter_risk_missing\" },\n { key: \"filterConfidenceMissing\", summaryKey: \"filter_confidence_missing\" },\n { key: \"filterSprintMissing\", summaryKey: \"filter_sprint_missing\" },\n { key: \"filterReleaseMissing\", summaryKey: \"filter_release_missing\" },\n] as const;\n\nfunction applyContentFilterEcho(filters: Record<string, unknown>, options: Record<string, unknown>): void {\n for (const entry of CONTENT_FILTER_ECHO_ENTRIES) {\n if (options[entry.key] === true) {\n filters[entry.summaryKey] = true;\n }\n }\n}\n\nfunction applyGovernanceMissingFilterEcho(filters: Record<string, unknown>, options: Record<string, unknown>): void {\n for (const entry of GOVERNANCE_MISSING_ECHO_ENTRIES) {\n if (options[entry.key] === true) {\n filters[entry.summaryKey] = true;\n }\n }\n}\n\n/**\n * Implements build content filter echo for the public runtime surface of this module.\n */\nexport function buildContentFilterEcho(options: Record<string, unknown>): Record<string, true> {\n const echo: Record<string, true> = {};\n applyContentFilterEcho(echo, options);\n return echo;\n}\n\n/**\n * Implements build governance missing filter echo for the public runtime surface of this module.\n */\nexport function buildGovernanceMissingFilterEcho(options: Record<string, unknown>): Record<string, true> {\n const echo: Record<string, true> = {};\n applyGovernanceMissingFilterEcho(echo, options);\n return echo;\n}\n\nfunction buildCompactListFilterSummary(params: {\n filtersStatus: string | string[] | null;\n options: ListOptions;\n treeEnabled: boolean;\n treeDepth: number | undefined;\n sortField: ListSortField | undefined;\n sortOrder: ListSortOrder;\n runtimeFieldFilters: Record<string, unknown>;\n}): Record<string, unknown> {\n const {\n filtersStatus,\n options,\n treeEnabled,\n treeDepth,\n sortField,\n sortOrder,\n runtimeFieldFilters,\n } = params;\n const filters: Record<string, unknown> = {};\n if (filtersStatus !== null) {\n filters.status = filtersStatus;\n }\n if (options.type !== undefined) {\n filters.type = options.type;\n }\n if (options.tag !== undefined) {\n filters.tag = options.tag;\n }\n if (options.priority !== undefined) {\n filters.priority = options.priority;\n }\n if (options.deadlineBefore !== undefined) {\n filters.deadline_before = options.deadlineBefore;\n }\n if (options.deadlineAfter !== undefined) {\n filters.deadline_after = options.deadlineAfter;\n }\n if (options.updatedAfter !== undefined) {\n filters.updated_after = options.updatedAfter;\n }\n if (options.updatedBefore !== undefined) {\n filters.updated_before = options.updatedBefore;\n }\n if (options.createdAfter !== undefined) {\n filters.created_after = options.createdAfter;\n }\n if (options.createdBefore !== undefined) {\n filters.created_before = options.createdBefore;\n }\n if (options.ids !== undefined) {\n filters.ids = options.ids;\n }\n if (options.assignee !== undefined) {\n filters.assignee = options.assignee;\n }\n if (options.assigneeFilter !== undefined) {\n filters.assignee_filter = options.assigneeFilter;\n }\n if (options.parent !== undefined) {\n filters.parent = options.parent;\n }\n if (options.sprint !== undefined) {\n filters.sprint = options.sprint;\n }\n if (options.release !== undefined) {\n filters.release = options.release;\n }\n if (options.filterAcMissing === true) {\n filters.filter_ac_missing = true;\n }\n if (options.filterEstimatesMissing === true) {\n filters.filter_estimates_missing = true;\n }\n if (options.filterResolutionMissing === true) {\n filters.filter_resolution_missing = true;\n }\n if (options.filterMetadataMissing === true) {\n filters.filter_metadata_missing = true;\n }\n applyGovernanceMissingFilterEcho(filters, options);\n applyContentFilterEcho(filters, options);\n if (options.limit !== undefined) {\n filters.limit = options.limit;\n }\n if (options.offset !== undefined) {\n filters.offset = options.offset;\n }\n if (options.includeBody === true) {\n filters.include_body = true;\n }\n if (options.fields !== undefined) {\n filters.fields = options.fields;\n }\n if (treeEnabled) {\n filters.tree = true;\n if (treeDepth !== undefined) {\n filters.tree_depth = treeDepth;\n }\n }\n if (sortField !== undefined) {\n filters.sort = sortField;\n filters.order = sortOrder;\n }\n if (isNonEmptyRecord(runtimeFieldFilters)) {\n filters.runtime_filters = runtimeFieldFilters;\n }\n return filters;\n}\n\nfunction compareDefaultSort(left: ListedItem, right: ListedItem, statusRegistry: RuntimeStatusRegistry): number {\n const leftTerminal = isTerminalStatus(left.status, statusRegistry);\n const rightTerminal = isTerminalStatus(right.status, statusRegistry);\n if (leftTerminal !== rightTerminal) {\n return leftTerminal ? 1 : -1;\n }\n const byPriority = left.priority - right.priority;\n if (byPriority !== 0) {\n return byPriority;\n }\n const byUpdated = compareTimestampStrings(right.updated_at, left.updated_at);\n if (byUpdated !== 0) {\n return byUpdated;\n }\n return (left.id ?? \"\").localeCompare(right.id ?? \"\");\n}\n\nfunction sortItemsDefault(items: ListedItem[], statusRegistry: RuntimeStatusRegistry): ListedItem[] {\n return [...items].sort((left, right) => compareDefaultSort(left, right, statusRegistry));\n}\n\nfunction parseDeadline(raw: string | undefined, fieldLabel: string): string | undefined {\n if (raw === undefined) return undefined;\n return resolveIsoOrRelative(raw, new Date(), fieldLabel);\n}\n\n// updated/created date-window filters share the deadline ISO+relative resolver\n// so agents doing incremental \"what changed since my last context window\" syncs\n// can pass either an ISO timestamp (the common case — feed back the previous\n// run's `now`) or a SIGNED relative offset where \"-2h\"/\"-7d\" reach into the\n// past and \"+1d\" into the future (units h/d/w/m, m = months — there is no\n// minutes unit, matching the deadline resolver).\nfunction parseTimestampWindow(raw: unknown, fieldLabel: string): string | undefined {\n if (raw == null) return undefined;\n const value = String(raw).trim();\n if (value.length === 0) return undefined;\n return resolveIsoOrRelative(value, new Date(), fieldLabel);\n}\n\nfunction parseIdsFilter(raw: unknown): Set<string> | undefined {\n if (raw == null) return undefined;\n const value = String(raw).trim();\n if (value.length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n const ids = value\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n if (ids.length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n return new Set(ids);\n}\n\nfunction parseOffset(raw: string | undefined): number | undefined {\n if (raw === undefined) return undefined;\n const parsed = Number(raw);\n if (!Number.isInteger(parsed) || parsed < 0) {\n throw new PmCliError(\"Offset filter must be a non-negative integer\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nfunction parseFieldSelectors(raw: string | undefined): string[] | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const selectors = raw\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n if (selectors.length === 0) {\n throw new PmCliError(\"List --fields requires a comma-separated list of field names\", EXIT_CODE.USAGE);\n }\n return [...new Set(selectors)];\n}\n\nfunction parseProjectionConfig(options: ListOptions): ListProjectionConfig {\n const compactRequested = options.compact === true;\n const briefRequested = options.brief === true;\n const fullRequested = options.full === true;\n const fieldSelectors = parseFieldSelectors(options.fields);\n const enabledModes =\n Number(compactRequested) + Number(briefRequested) + Number(fullRequested) + Number(fieldSelectors !== undefined);\n if (enabledModes > 1) {\n throw new PmCliError(\n \"List projection options are mutually exclusive. Use one of --compact, --brief, --full, or --fields.\",\n EXIT_CODE.USAGE,\n );\n }\n if (fullRequested) {\n return {\n mode: \"full\",\n fields: [],\n };\n }\n if (briefRequested) {\n return {\n mode: \"compact\",\n fields: [...BRIEF_LIST_FIELDS],\n };\n }\n if (compactRequested) {\n return {\n mode: \"compact\",\n fields: [...DEFAULT_COMPACT_LIST_FIELDS],\n };\n }\n if (fieldSelectors) {\n return {\n mode: \"fields\",\n fields: fieldSelectors,\n };\n }\n return {\n mode: \"full\",\n fields: [],\n };\n}\n\nfunction normalizeProjectionField(field: string): string {\n return field.startsWith(\"item.\") ? field.slice(\"item.\".length) : field;\n}\n\nfunction validateListProjectionFields(projection: ListProjectionConfig, runtimeMetadataKeys: Iterable<string>): void {\n if (projection.mode !== \"fields\") {\n return;\n }\n const allowed = new Set([...FRONT_MATTER_KEY_ORDER, \"body\", ...TREE_METADATA_FIELDS, ...runtimeMetadataKeys]);\n const unknown = projection.fields.filter((field) => !allowed.has(normalizeProjectionField(field)));\n if (unknown.length > 0) {\n throw new PmCliError(`Unknown list --fields value(s): ${unknown.join(\", \")}`, EXIT_CODE.USAGE, {\n code: \"unknown_field_projection\",\n examples: [\n \"pm list-open --fields id,title,status,type,updated_at\",\n \"pm list --fields id,title,parent,priority --limit 10\",\n \"pm list-all --fields id,title,body --limit 5\",\n ],\n });\n }\n}\n\n// Convenience aliases so agents/humans who reach for the bare verb form\n// (e.g. `--sort updated`) land on the canonical timestamp fields instead of an error.\n// A Map (not a plain object) avoids prototype-chain lookups for keys like \"__proto__\".\nconst LIST_SORT_FIELD_ALIASES: ReadonlyMap<string, ListSortField> = new Map<string, ListSortField>([\n [\"updated\", \"updated_at\"],\n [\"update\", \"updated_at\"],\n [\"modified\", \"updated_at\"],\n [\"created\", \"created_at\"],\n [\"create\", \"created_at\"],\n]);\n\nfunction parseSortField(raw: string | undefined): ListSortField | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n const aliased = LIST_SORT_FIELD_ALIASES.get(normalized);\n if (aliased) {\n return aliased;\n }\n if (!LIST_SORT_FIELDS.includes(normalized as ListSortField)) {\n throw new PmCliError(\n `Sort field must be one of ${LIST_SORT_FIELDS.join(\"|\")} (aliases: updated->updated_at, created->created_at)`,\n EXIT_CODE.USAGE,\n );\n }\n return normalized as ListSortField;\n}\n\nfunction parseSortOrder(raw: string | undefined): ListSortOrder | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (!LIST_SORT_ORDER_VALUES.includes(normalized as ListSortOrder)) {\n throw new PmCliError(`Sort order must be one of ${LIST_SORT_ORDER_VALUES.join(\"|\")}`, EXIT_CODE.USAGE);\n }\n return normalized as ListSortOrder;\n}\n\nfunction parseTreeDepth(raw: string | undefined): number | undefined {\n return parseIntegerLimit(raw, \"--tree-depth\");\n}\n\nfunction parseAssigneeFilter(raw: string | undefined): \"assigned\" | \"unassigned\" | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase();\n if (!normalized) {\n throw new PmCliError(\"Assignee filter must be one of assigned|unassigned\", EXIT_CODE.USAGE);\n }\n if (normalized !== \"assigned\" && normalized !== \"unassigned\") {\n throw new PmCliError(`Invalid assignee filter \"${raw}\". Allowed: assigned|unassigned`, EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\n// `pm list` keeps lenient status parsing (an unknown token is passed through\n// verbatim and simply matches nothing) so custom/unknown statuses never error;\n// the shared CSV parser resolves the open/closed/canceled workflow-group aliases.\nfunction resolveStatusFilter(\n status: ItemStatus | undefined,\n statusRegistry: RuntimeStatusRegistry,\n): ItemStatus[] | undefined {\n return parseStatusFilterCsv(status, statusRegistry, { strict: false });\n}\n\nfunction applyFilters(\n items: ListedItem[],\n status: ItemStatus[] | undefined,\n options: ListOptions,\n typeRegistry: ItemTypeRegistry,\n statusRegistry: RuntimeStatusRegistry,\n runtimeFieldFilters: Record<string, unknown>,\n): ListedItem[] {\n const statusSet = status && status.length > 0 ? new Set<ItemStatus>(status) : undefined;\n const typeFilter = parseType(options.type, typeRegistry);\n const tagFilter = options.tag?.trim().toLowerCase();\n const priorityFilter = parsePriority(options.priority);\n const deadlineBefore = parseDeadline(options.deadlineBefore, \"deadline-before\");\n const deadlineAfter = parseDeadline(options.deadlineAfter, \"deadline-after\");\n const updatedAfter = parseTimestampWindow(options.updatedAfter, \"updated-after\");\n const updatedBefore = parseTimestampWindow(options.updatedBefore, \"updated-before\");\n const createdAfter = parseTimestampWindow(options.createdAfter, \"created-after\");\n const createdBefore = parseTimestampWindow(options.createdBefore, \"created-before\");\n const idsFilter = parseIdsFilter(options.ids);\n const assigneeFilter = options.assignee?.trim();\n const assigneeModeFilter = parseAssigneeFilter(options.assigneeFilter);\n const parentFilter = options.parent?.trim();\n const sprintFilter = options.sprint?.trim();\n const releaseFilter = options.release?.trim();\n const missingMetadataFilters = resolveMissingMetadataFilters(options);\n const missingMetadataActive = hasMissingMetadataFilter(missingMetadataFilters);\n const lifecycleClassifier = lifecycleClassifierFromStatusRegistry(statusRegistry);\n const contentFieldFilters = resolveContentFieldFilters(options as Record<string, unknown>);\n const contentFiltersActive = hasContentFieldFilter(contentFieldFilters);\n\n if (assigneeFilter && (assigneeFilter.toLowerCase() === \"none\" || assigneeFilter.toLowerCase() === \"null\")) {\n throw new PmCliError(\n '--assignee no longer accepts \"none\" or \"null\". Use --assignee-filter unassigned.',\n EXIT_CODE.USAGE,\n );\n }\n if (assigneeFilter !== undefined && assigneeModeFilter === \"unassigned\") {\n throw new PmCliError(\"Cannot combine --assignee with --assignee-filter unassigned\", EXIT_CODE.USAGE);\n }\n\n return items.filter((item) => {\n if (idsFilter && !idsFilter.has(item.id)) return false;\n if (statusSet && !statusSet.has(item.status)) return false;\n if (options.excludeTerminal && isTerminalStatus(item.status, statusRegistry)) return false;\n if (typeFilter && item.type !== typeFilter) return false;\n if (tagFilter && !item.tags.includes(tagFilter)) return false;\n if (priorityFilter !== undefined && item.priority !== priorityFilter) return false;\n if (deadlineBefore && (!item.deadline || compareTimestampStrings(item.deadline, deadlineBefore) > 0)) return false;\n if (deadlineAfter && (!item.deadline || compareTimestampStrings(item.deadline, deadlineAfter) < 0)) return false;\n if (updatedAfter && compareTimestampStrings(item.updated_at, updatedAfter) < 0) return false;\n if (updatedBefore && compareTimestampStrings(item.updated_at, updatedBefore) > 0) return false;\n if (createdAfter && compareTimestampStrings(item.created_at, createdAfter) < 0) return false;\n if (createdBefore && compareTimestampStrings(item.created_at, createdBefore) > 0) return false;\n if (assigneeModeFilter === \"assigned\" && !item.assignee) return false;\n if (assigneeModeFilter === \"unassigned\" && item.assignee) return false;\n if (assigneeFilter !== undefined && item.assignee !== assigneeFilter) {\n return false;\n }\n if (parentFilter !== undefined && options.tree !== true && item.parent !== parentFilter) return false;\n if (sprintFilter !== undefined && item.sprint !== sprintFilter) return false;\n if (releaseFilter !== undefined && item.release !== releaseFilter) return false;\n if (missingMetadataActive && !itemMatchesMissingMetadata(item, missingMetadataFilters, lifecycleClassifier)) {\n return false;\n }\n if (contentFiltersActive && !itemMatchesContentFilters(item, contentFieldFilters)) {\n return false;\n }\n if (!matchesRuntimeFilters(item as Record<string, unknown>, runtimeFieldFilters)) {\n return false;\n }\n return true;\n });\n}\n\nfunction trimNonEmpty(value: string | undefined): string | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\nfunction withTreeMetadata(item: ListedItem, depth: number, childCount: number): ListedItem {\n const itemRecord = toItemRecord(item);\n const title = typeof itemRecord.title === \"string\" ? itemRecord.title : \"\";\n const parent = trimNonEmpty(typeof itemRecord.parent === \"string\" ? itemRecord.parent : undefined) ?? null;\n return {\n ...item,\n tree_depth: depth,\n tree_parent: parent,\n tree_children: childCount,\n tree_title: `${\" \".repeat(depth)}${title}`,\n } as ListedItem;\n}\n\nfunction orderItemsAsTree(\n sortedItems: ListedItem[],\n parentRoot: string | undefined,\n maxDepth: number | undefined,\n): ListedItem[] {\n const byId = new Map<string, ListedItem>();\n const childrenByParent = new Map<string, ListedItem[]>();\n for (const item of sortedItems) {\n byId.set(item.id, item);\n const parentId = trimNonEmpty(item.parent);\n if (!parentId) {\n continue;\n }\n const bucket = childrenByParent.get(parentId);\n if (bucket) {\n bucket.push(item);\n } else {\n childrenByParent.set(parentId, [item]);\n }\n }\n\n const roots = parentRoot\n ? [...(childrenByParent.get(parentRoot) ?? [])]\n : sortedItems.filter((item) => {\n const parentId = trimNonEmpty(item.parent);\n return !parentId || !byId.has(parentId);\n });\n const ordered: ListedItem[] = [];\n const visited = new Set<string>();\n const pushNode = (node: ListedItem, depth: number): void => {\n if (visited.has(node.id)) {\n return;\n }\n visited.add(node.id);\n const children = childrenByParent.get(node.id) ?? [];\n ordered.push(withTreeMetadata(node, depth, children.length));\n if (maxDepth !== undefined && depth >= maxDepth) {\n return;\n }\n for (const child of children) {\n pushNode(child, depth + 1);\n }\n };\n for (const root of roots) {\n pushNode(root, 0);\n }\n return ordered;\n}\n\nfunction compareNullableString(left: string | null, right: string | null): number {\n if (left === right) {\n return 0;\n }\n if (left === null) {\n return 1;\n }\n if (right === null) {\n return -1;\n }\n return left.localeCompare(right);\n}\n\nfunction compareNullableTimestamp(left: string | null, right: string | null): number {\n if (left === right) {\n return 0;\n }\n if (left === null) {\n return 1;\n }\n if (right === null) {\n return -1;\n }\n return compareTimestampStrings(left, right);\n}\n\nfunction compareBySortField(left: ListedItem, right: ListedItem, field: ListSortField): number {\n switch (field) {\n case \"priority\":\n return left.priority - right.priority;\n case \"deadline\":\n return compareNullableTimestamp(left.deadline ?? null, right.deadline ?? null);\n case \"updated_at\":\n return compareTimestampStrings(left.updated_at, right.updated_at);\n case \"created_at\":\n return compareTimestampStrings(left.created_at, right.created_at);\n case \"title\":\n return (left.title ?? \"\").localeCompare(right.title ?? \"\");\n case \"parent\":\n return compareNullableString(left.parent ?? null, right.parent ?? null);\n default:\n return 0;\n }\n}\n\nfunction sortItems(\n items: ListedItem[],\n sortField: ListSortField | undefined,\n sortOrder: ListSortOrder,\n statusRegistry: RuntimeStatusRegistry,\n): ListedItem[] {\n if (!sortField) {\n return sortItemsDefault(items, statusRegistry);\n }\n return [...items].sort((left, right) => {\n const byField = compareBySortField(left, right, sortField);\n if (byField !== 0) {\n return sortOrder === \"desc\" ? -byField : byField;\n }\n const fallback = compareDefaultSort(left, right, statusRegistry);\n return sortOrder === \"desc\" ? -fallback : fallback;\n });\n}\n\nfunction readListFieldValue(item: ListedItem, field: string, treeMode = false): unknown {\n const normalized = normalizeProjectionField(field.trim());\n if (normalized.length === 0) {\n return null;\n }\n const itemRecord = toItemRecord(item);\n if (treeMode && normalized === \"title\" && typeof itemRecord.tree_title === \"string\") {\n return itemRecord.tree_title;\n }\n if (Object.prototype.hasOwnProperty.call(itemRecord, normalized)) {\n return itemRecord[normalized] ?? null;\n }\n return null;\n}\n\nfunction projectListItems(items: ListedItem[], projection: ListProjectionConfig, treeMode = false): ListedItem[] {\n if (projection.mode === \"full\") {\n return items;\n }\n return items.map((item) => {\n const projected: Record<string, unknown> = {};\n for (const field of projection.fields) {\n projected[field] = readListFieldValue(item, field, treeMode);\n }\n return projected as unknown as ListedItem;\n });\n}\n\nfunction runtimeMetadataKeysForProjection(definitions: Array<{ metadata_key: string }>): string[] {\n const keys: string[] = [];\n for (const field of definitions) {\n keys.push(field.metadata_key);\n }\n return keys;\n}\n\n/**\n * Implements run list for the public runtime surface of this module.\n */\nexport async function runList(status: ItemStatus | undefined, options: ListOptions, global: GlobalOptions): Promise<ListResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);\n const runtimeFieldFilters = collectRuntimeFilterValues(options as Record<string, unknown>, runtimeFieldRegistry, \"list\");\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const projection = parseProjectionConfig(options);\n const runtimeMetadataKeys = runtimeMetadataKeysForProjection(runtimeFieldRegistry.definitions);\n validateListProjectionFields(projection, runtimeMetadataKeys);\n const listWarnings: string[] = [];\n const projectionNeedsBody = projection.fields.some((field) => normalizeProjectionField(field) === \"body\");\n // The heavy collection fields are only emitted by `--full` (verbatim items) or an\n // explicit `--fields <heavy>` selection. Every other projection (default brief,\n // `--compact`, light `--fields`) reads only light scalar fields, so it takes the\n // light path that skips the large collections cache (the hot-path JSON.parse win).\n const projectionNeedsCollections =\n projection.mode === \"full\" ||\n projection.fields.some((field) => HEAVY_PROJECTION_FIELDS.has(normalizeProjectionField(field)));\n // Content-field filters (GH-242) inspect the heavy collection arrays and/or the\n // body, so they force the matching load path even when the projection alone\n // would take the light path. notes/learnings/files/docs/tests/comments/deps/\n // linked_command live in the heavy collections; body needs the body load.\n const contentFieldFilters = resolveContentFieldFilters(options as Record<string, unknown>);\n const contentNeedsCollections = contentFiltersNeedCollections(contentFieldFilters);\n const contentNeedsBody = contentFiltersNeedBody(contentFieldFilters);\n let items: ListedItem[];\n if (options.includeBody || projectionNeedsBody || contentNeedsBody) {\n items = await listAllFrontMatterWithBody(pmRoot, settings.item_format, typeRegistry.type_to_folder, listWarnings, settings.schema);\n } else if (projectionNeedsCollections || contentNeedsCollections) {\n items = await listAllFrontMatter(pmRoot, settings.item_format, typeRegistry.type_to_folder, listWarnings, settings.schema);\n } else {\n items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, listWarnings, settings.schema);\n }\n const sortField = parseSortField(options.sort);\n const sortOrder = parseSortOrder(options.order) ?? \"asc\";\n const treeEnabled = options.tree === true;\n if (!treeEnabled && options.treeDepth !== undefined) {\n throw new PmCliError(\"List --tree-depth requires --tree\", EXIT_CODE.USAGE);\n }\n const treeDepth = treeEnabled ? parseTreeDepth(options.treeDepth) : undefined;\n const parentRoot = treeEnabled ? trimNonEmpty(options.parent) : undefined;\n if (!sortField && options.order !== undefined) {\n throw new PmCliError(\"List --order requires --sort\", EXIT_CODE.USAGE);\n }\n const explicitStatus = resolveStatusFilter(options.status as ItemStatus | undefined, statusRegistry);\n const resolvedStatus = explicitStatus ?? resolveStatusFilter(status, statusRegistry);\n const effectiveOptions = explicitStatus ? { ...options, excludeTerminal: false } : options;\n const filtered = applyFilters(items, resolvedStatus, effectiveOptions, typeRegistry, statusRegistry, runtimeFieldFilters);\n const filtersStatus =\n resolvedStatus === undefined\n ? null\n : resolvedStatus.length === 1\n ? resolvedStatus[0]\n : resolvedStatus;\n const sorted = sortItems(filtered, sortField, sortOrder, statusRegistry);\n const ordered = treeEnabled ? orderItemsAsTree(sorted, parentRoot, treeDepth) : sorted;\n // --no-truncate (alias --all) forces full results, overriding any --limit so an\n // agent can pull the entire matched set in one call (GH-154).\n const noTruncate = options.noTruncate === true;\n const limit = noTruncate ? undefined : parseIntegerLimit(options.limit);\n const offset = parseOffset(options.offset) ?? 0;\n const limited = limit === undefined ? ordered.slice(offset) : ordered.slice(offset, offset + limit);\n const projected = projectListItems(limited, projection, treeEnabled);\n const totalMatched = ordered.length;\n // Surface the pre-pagination total only when rows were actually omitted.\n const truncationExtras = projected.length < totalMatched ? { total: totalMatched } : {};\n const now = nowIso();\n const warnings = [...new Set(listWarnings)].sort((left, right) => left.localeCompare(right));\n const projectionFields = projection.mode === \"full\" ? null : [...projection.fields];\n // pm-vhx6: compact-mode list output is primarily consumed by agents. Keep the\n // metadata trailer token-light by returning only active/user-supplied filters\n // and omitting projection/sorting/now boilerplate in this path.\n const compactSummaryMode = projection.mode === \"compact\" && options.compact === true;\n if (compactSummaryMode) {\n const compactFilters = buildCompactListFilterSummary({\n filtersStatus,\n options,\n treeEnabled,\n treeDepth,\n sortField,\n sortOrder,\n runtimeFieldFilters,\n });\n return {\n items: projected,\n count: projected.length,\n ...truncationExtras,\n filters: compactFilters,\n ...(warnings.length > 0 ? { warnings } : {}),\n };\n }\n return {\n items: projected,\n count: projected.length,\n ...truncationExtras,\n filters: {\n status: filtersStatus,\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 updated_after: options.updatedAfter ?? null,\n updated_before: options.updatedBefore ?? null,\n created_after: options.createdAfter ?? null,\n created_before: options.createdBefore ?? null,\n ids: options.ids ?? 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 ...(options.filterAcMissing === true ? { filter_ac_missing: true } : {}),\n ...(options.filterEstimatesMissing === true ? { filter_estimates_missing: true } : {}),\n ...(options.filterResolutionMissing === true ? { filter_resolution_missing: true } : {}),\n ...(options.filterMetadataMissing === true ? { filter_metadata_missing: true } : {}),\n ...buildGovernanceMissingFilterEcho(options),\n ...buildContentFilterEcho(options),\n limit: options.limit ?? null,\n offset: options.offset ?? null,\n ...(noTruncate ? { no_truncate: true } : {}),\n include_body: options.includeBody ?? null,\n compact: options.compact ?? null,\n fields: options.fields ?? null,\n ...(treeEnabled ? { tree: true, tree_depth: treeDepth ?? null } : {}),\n sort: sortField ?? null,\n order: sortField ? sortOrder : null,\n runtime_filters: runtimeFieldFilters,\n },\n projection: {\n mode: projection.mode,\n fields: projectionFields,\n },\n sorting: {\n sort: sortField ?? \"default\",\n order: sortField ? sortOrder : \"asc\",\n },\n now,\n ...(warnings.length > 0 ? { warnings } : {}),\n };\n}\n\nexport const _testOnly = {\n applyFilters,\n buildCompactListFilterSummary,\n buildContentFilterEcho,\n buildGovernanceMissingFilterEcho,\n resolveContentFieldFilters,\n resolveMissingMetadataFilters,\n compareBySortField,\n compareDefaultSort,\n compareNullableString,\n compareNullableTimestamp,\n normalizeProjectionField,\n parseAssigneeFilter,\n parseFieldSelectors,\n parseIdsFilter,\n parseOffset,\n parseProjectionConfig,\n parseSortField,\n parseSortOrder,\n orderItemsAsTree,\n projectListItems,\n readListFieldValue,\n runtimeMetadataKeysForProjection,\n sortItems,\n trimNonEmpty,\n withTreeMetadata,\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAM,uBAAqG;EACzG,MAAM;EACN,QAAQ;EACR,UAAU;EACV,WAAW;;AAWP,SAAU,yBACd,OACA,UAA+B;AAE/B,QAAM,UAAU,MAAM,KAAI,EAAG,YAAW;AACxC,MAAI,QAAQ,WAAW,GAAG;AACxB,WAAO;EACT;AACA,QAAM,QAAQ,qBAAqB,OAAO;AAC1C,MAAI,OAAO;AACT,WAAO,SAAS,KAAK;EACvB;AACA,SAAO,qBAAqB,OAAO,QAAQ;AAC7C;AAEA,SAAS,kCAAkC,UAA+B;AACxE,QAAM,aAAa,IAAI,IAAY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