@unbrained/pm-cli 2026.7.4 → 2026.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (601) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +1 -5
  3. package/dist/cli/commands/calendar.d.ts +3 -2
  4. package/dist/cli/commands/calendar.js +4 -4
  5. package/dist/cli/commands/calendar.js.map +1 -1
  6. package/dist/cli/commands/claim.js +17 -3
  7. package/dist/cli/commands/claim.js.map +1 -1
  8. package/dist/cli/commands/close.js +34 -16
  9. package/dist/cli/commands/close.js.map +1 -1
  10. package/dist/cli/commands/copy.js +3 -3
  11. package/dist/cli/commands/copy.js.map +1 -1
  12. package/dist/cli/commands/create.d.ts +7 -0
  13. package/dist/cli/commands/create.js +156 -110
  14. package/dist/cli/commands/create.js.map +1 -1
  15. package/dist/cli/commands/extension/bundled-catalog.d.ts +6 -0
  16. package/dist/cli/commands/extension/bundled-catalog.js +15 -2
  17. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  18. package/dist/cli/commands/extension/describe.d.ts +6 -3
  19. package/dist/cli/commands/extension/describe.js +21 -9
  20. package/dist/cli/commands/extension/describe.js.map +1 -1
  21. package/dist/cli/commands/extension/doctor.d.ts +0 -4
  22. package/dist/cli/commands/extension/doctor.js +3 -3
  23. package/dist/cli/commands/extension/doctor.js.map +1 -1
  24. package/dist/cli/commands/extension/scaffold.js +7 -2
  25. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  26. package/dist/cli/commands/extension/shared.d.ts +2 -7
  27. package/dist/cli/commands/extension/shared.js +4 -10
  28. package/dist/cli/commands/extension/shared.js.map +1 -1
  29. package/dist/cli/commands/extension.js +33 -8
  30. package/dist/cli/commands/extension.js.map +1 -1
  31. package/dist/cli/commands/profile.js +3 -3
  32. package/dist/cli/commands/profile.js.map +1 -1
  33. package/dist/cli/commands/reindex.js +3 -3
  34. package/dist/cli/commands/reindex.js.map +1 -1
  35. package/dist/cli/commands/restore.js +3 -3
  36. package/dist/cli/commands/restore.js.map +1 -1
  37. package/dist/cli/commands/schema.js +10 -10
  38. package/dist/cli/commands/schema.js.map +1 -1
  39. package/dist/cli/commands/update.js +5 -3
  40. package/dist/cli/commands/update.js.map +1 -1
  41. package/dist/cli/error-guidance.js +107 -7
  42. package/dist/cli/error-guidance.js.map +1 -1
  43. package/dist/cli/main.d.ts +6 -2
  44. package/dist/cli/main.js +33 -12
  45. package/dist/cli/main.js.map +1 -1
  46. package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +18 -0
  47. package/dist/cli-bundle/chunks/{activity-OENQCYZD.js → activity-YKAKZTZ4.js} +11 -9
  48. package/dist/cli-bundle/chunks/{aggregate-EC4LWS3U.js → aggregate-EQX2RGB7.js} +16 -13
  49. package/dist/cli-bundle/chunks/{aggregate-EC4LWS3U.js.map → aggregate-EQX2RGB7.js.map} +1 -1
  50. package/dist/cli-bundle/chunks/{aggregate-RCB3QJJE.js → aggregate-PEGZGJXD.js} +18 -15
  51. package/dist/cli-bundle/chunks/{aggregate-RCB3QJJE.js.map → aggregate-PEGZGJXD.js.map} +1 -1
  52. package/dist/cli-bundle/chunks/{append-XLEKVVWB.js → append-CZGUZ45Q.js} +11 -8
  53. package/dist/cli-bundle/chunks/{append-XLEKVVWB.js.map → append-CZGUZ45Q.js.map} +1 -1
  54. package/dist/cli-bundle/chunks/{append-ADBOI3A6.js → append-NSQBCXZJ.js} +13 -10
  55. package/dist/cli-bundle/chunks/{append-ADBOI3A6.js.map → append-NSQBCXZJ.js.map} +1 -1
  56. package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js +1413 -0
  57. package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js.map +1 -0
  58. package/dist/cli-bundle/chunks/{chunk-2LRMWMZ6.js → chunk-3PL6LEKP.js} +16 -14
  59. package/dist/cli-bundle/chunks/{chunk-2LRMWMZ6.js.map → chunk-3PL6LEKP.js.map} +1 -1
  60. package/dist/cli-bundle/chunks/{chunk-CN4OAA2G.js → chunk-3U3VEWK6.js} +277 -119
  61. package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js.map +7 -0
  62. package/dist/cli-bundle/chunks/{chunk-EB4BBEZD.js → chunk-3Y4OESPP.js} +14 -12
  63. package/dist/cli-bundle/chunks/{chunk-EB4BBEZD.js.map → chunk-3Y4OESPP.js.map} +1 -1
  64. package/dist/cli-bundle/chunks/{chunk-NHDR3UCW.js → chunk-4LRVSBO6.js} +14 -12
  65. package/dist/cli-bundle/chunks/{chunk-NHDR3UCW.js.map → chunk-4LRVSBO6.js.map} +1 -1
  66. package/dist/cli-bundle/chunks/{chunk-6YB7HG2J.js → chunk-4OFLJHX6.js} +7 -5
  67. package/dist/cli-bundle/chunks/{chunk-6YB7HG2J.js.map → chunk-4OFLJHX6.js.map} +1 -1
  68. package/dist/cli-bundle/chunks/{chunk-SBNT6SLO.js → chunk-4QQ6PM7M.js} +45 -557
  69. package/dist/cli-bundle/chunks/chunk-4QQ6PM7M.js.map +7 -0
  70. package/dist/cli-bundle/chunks/{chunk-M34MVAOP.js → chunk-53BTLLAF.js} +16 -200
  71. package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +1 -0
  72. package/dist/cli-bundle/chunks/{chunk-UYLA5ROU.js → chunk-57C2RLW5.js} +277 -112
  73. package/dist/cli-bundle/chunks/chunk-57C2RLW5.js.map +1 -0
  74. package/dist/cli-bundle/chunks/{chunk-R7EMP4JG.js → chunk-5B3X4Y22.js} +52 -63
  75. package/dist/cli-bundle/chunks/{chunk-R7EMP4JG.js.map → chunk-5B3X4Y22.js.map} +3 -3
  76. package/dist/cli-bundle/chunks/{chunk-XBIYI23P.js → chunk-5J2XPTAD.js} +10 -8
  77. package/dist/cli-bundle/chunks/{chunk-XBIYI23P.js.map → chunk-5J2XPTAD.js.map} +1 -1
  78. package/dist/cli-bundle/chunks/{chunk-4SHME4VR.js → chunk-5JE6SMYS.js} +2 -2
  79. package/dist/cli-bundle/chunks/{chunk-4KPQQ42D.js → chunk-5JZ7APJU.js} +18 -16
  80. package/dist/cli-bundle/chunks/{chunk-4KPQQ42D.js.map → chunk-5JZ7APJU.js.map} +1 -1
  81. package/dist/cli-bundle/chunks/{chunk-BDDYM4LH.js → chunk-5VVUKE3U.js} +424 -2228
  82. package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js.map +7 -0
  83. package/dist/cli-bundle/chunks/{chunk-QFXFKYNQ.js → chunk-75U6M5ZD.js} +16 -14
  84. package/dist/cli-bundle/chunks/{chunk-QFXFKYNQ.js.map → chunk-75U6M5ZD.js.map} +1 -1
  85. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +23 -0
  86. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +7 -0
  87. package/dist/cli-bundle/chunks/{chunk-A222YWOQ.js → chunk-7EQNAZX2.js} +14 -12
  88. package/dist/cli-bundle/chunks/{chunk-A222YWOQ.js.map → chunk-7EQNAZX2.js.map} +1 -1
  89. package/dist/cli-bundle/chunks/{chunk-Z4DGFQDH.js → chunk-7LQKVMPA.js} +14 -4
  90. package/dist/cli-bundle/chunks/chunk-7LQKVMPA.js.map +1 -0
  91. package/dist/cli-bundle/chunks/{chunk-EH23N5FX.js → chunk-7MDXZAZS.js} +29 -7
  92. package/dist/cli-bundle/chunks/chunk-7MDXZAZS.js.map +1 -0
  93. package/dist/cli-bundle/chunks/{chunk-XQCWTSLO.js → chunk-7QH7DHUB.js} +74 -8
  94. package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js.map +1 -0
  95. package/dist/cli-bundle/chunks/{chunk-3C5T3ZEO.js → chunk-7WYXBPYQ.js} +7 -5
  96. package/dist/cli-bundle/chunks/{chunk-3C5T3ZEO.js.map → chunk-7WYXBPYQ.js.map} +1 -1
  97. package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js +150 -0
  98. package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js.map +1 -0
  99. package/dist/cli-bundle/chunks/{chunk-CQISNF3Z.js → chunk-ABRA3BHY.js} +18 -16
  100. package/dist/cli-bundle/chunks/{chunk-CQISNF3Z.js.map → chunk-ABRA3BHY.js.map} +2 -2
  101. package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js +47 -0
  102. package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js.map +7 -0
  103. package/dist/cli-bundle/chunks/{chunk-Y2VSCQ77.js → chunk-BFVHCAOO.js} +9 -7
  104. package/dist/cli-bundle/chunks/{chunk-Y2VSCQ77.js.map → chunk-BFVHCAOO.js.map} +1 -1
  105. package/dist/cli-bundle/chunks/{chunk-7ITQSEBL.js → chunk-BVEUCSH2.js} +6 -4
  106. package/dist/cli-bundle/chunks/{chunk-7ITQSEBL.js.map → chunk-BVEUCSH2.js.map} +1 -1
  107. package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js +160 -0
  108. package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js.map +7 -0
  109. package/dist/cli-bundle/chunks/{chunk-HL742IBM.js → chunk-D3UCE7RW.js} +7 -5
  110. package/dist/cli-bundle/chunks/{chunk-HL742IBM.js.map → chunk-D3UCE7RW.js.map} +1 -1
  111. package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +275 -0
  112. package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +7 -0
  113. package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js +634 -0
  114. package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js.map +7 -0
  115. package/dist/cli-bundle/chunks/{chunk-MZG6I2Q2.js → chunk-DRBV5UC2.js} +8 -23
  116. package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js.map +7 -0
  117. package/dist/cli-bundle/chunks/{chunk-DEIDJQZK.js → chunk-E2FUG6GD.js} +15 -220
  118. package/dist/cli-bundle/chunks/{chunk-DEIDJQZK.js.map → chunk-E2FUG6GD.js.map} +3 -3
  119. package/dist/cli-bundle/chunks/{chunk-3MLQZI3H.js → chunk-EEY54JMF.js} +5 -3
  120. package/dist/cli-bundle/chunks/{chunk-3MLQZI3H.js.map → chunk-EEY54JMF.js.map} +1 -1
  121. package/dist/cli-bundle/chunks/{chunk-CQFZRLXQ.js → chunk-EZFKWSC7.js} +94 -16
  122. package/dist/cli-bundle/chunks/{chunk-CQFZRLXQ.js.map → chunk-EZFKWSC7.js.map} +4 -4
  123. package/dist/cli-bundle/chunks/{chunk-4PJYRA3V.js → chunk-FDBARR33.js} +17 -15
  124. package/dist/cli-bundle/chunks/{chunk-4PJYRA3V.js.map → chunk-FDBARR33.js.map} +2 -2
  125. package/dist/cli-bundle/chunks/{chunk-NGDK3KEZ.js → chunk-FGQKEDE4.js} +36 -12
  126. package/dist/cli-bundle/chunks/chunk-FGQKEDE4.js.map +7 -0
  127. package/dist/cli-bundle/chunks/{chunk-FMWQRMHS.js → chunk-FJRKQREY.js} +10 -18
  128. package/dist/cli-bundle/chunks/chunk-FJRKQREY.js.map +1 -0
  129. package/dist/cli-bundle/chunks/{chunk-6QY2NA2M.js → chunk-FUM6UMY4.js} +10 -11
  130. package/dist/cli-bundle/chunks/{chunk-6QY2NA2M.js.map → chunk-FUM6UMY4.js.map} +1 -1
  131. package/dist/cli-bundle/chunks/{chunk-UGDONITK.js → chunk-GIWXVMZ3.js} +140 -334
  132. package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +7 -0
  133. package/dist/cli-bundle/chunks/{chunk-OTSP6UEX.js → chunk-HBYZDSK5.js} +19 -17
  134. package/dist/cli-bundle/chunks/{chunk-OTSP6UEX.js.map → chunk-HBYZDSK5.js.map} +1 -1
  135. package/dist/cli-bundle/chunks/{chunk-D2LDM35X.js → chunk-HJE4JTKQ.js} +6 -4
  136. package/dist/cli-bundle/chunks/{chunk-D2LDM35X.js.map → chunk-HJE4JTKQ.js.map} +1 -1
  137. package/dist/cli-bundle/chunks/{chunk-AOP2EMK3.js → chunk-HK72NWAD.js} +89 -18
  138. package/dist/cli-bundle/chunks/chunk-HK72NWAD.js.map +1 -0
  139. package/dist/cli-bundle/chunks/{chunk-2ONH3WG6.js → chunk-IJ6CO3JV.js} +18 -16
  140. package/dist/cli-bundle/chunks/{chunk-2ONH3WG6.js.map → chunk-IJ6CO3JV.js.map} +1 -1
  141. package/dist/cli-bundle/chunks/{chunk-J4KNRDI3.js → chunk-JFCVQXZX.js} +139 -326
  142. package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +1 -0
  143. package/dist/cli-bundle/chunks/{chunk-V655JQ5J.js → chunk-JLA7EVYV.js} +12 -10
  144. package/dist/cli-bundle/chunks/{chunk-V655JQ5J.js.map → chunk-JLA7EVYV.js.map} +1 -1
  145. package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +76 -0
  146. package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +1 -0
  147. package/dist/cli-bundle/chunks/{chunk-WBWRQS32.js → chunk-K3AGVXSF.js} +37 -13
  148. package/dist/cli-bundle/chunks/chunk-K3AGVXSF.js.map +1 -0
  149. package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +79 -0
  150. package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +7 -0
  151. package/dist/cli-bundle/chunks/chunk-KGHH652T.js +44 -0
  152. package/dist/cli-bundle/chunks/chunk-KGHH652T.js.map +1 -0
  153. package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +915 -0
  154. package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +1 -0
  155. package/dist/cli-bundle/chunks/{chunk-JZJJEJBR.js → chunk-KLG4ZULO.js} +12 -10
  156. package/dist/cli-bundle/chunks/{chunk-JZJJEJBR.js.map → chunk-KLG4ZULO.js.map} +1 -1
  157. package/dist/cli-bundle/chunks/{chunk-KKHIQOTN.js → chunk-LEKT4K7I.js} +74 -8
  158. package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js.map +7 -0
  159. package/dist/cli-bundle/chunks/{contracts-CVBINC7C.js → chunk-MNZ7DRNC.js} +13 -10
  160. package/dist/cli-bundle/chunks/{contracts-CVBINC7C.js.map → chunk-MNZ7DRNC.js.map} +1 -1
  161. package/dist/cli-bundle/chunks/{chunk-2VK677OA.js → chunk-MTTXDAK4.js} +176 -125
  162. package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js.map +7 -0
  163. package/dist/cli-bundle/chunks/{chunk-Q2266G4S.js → chunk-MZ7VNEVY.js} +8 -6
  164. package/dist/cli-bundle/chunks/{chunk-Q2266G4S.js.map → chunk-MZ7VNEVY.js.map} +1 -1
  165. package/dist/cli-bundle/chunks/{chunk-4EVY7CQN.js → chunk-N6DNM2FA.js} +2 -2
  166. package/dist/cli-bundle/chunks/{test-runs-5SLLV3XU.js → chunk-N7X4WP6L.js} +11 -8
  167. package/dist/cli-bundle/chunks/{test-runs-5SLLV3XU.js.map → chunk-N7X4WP6L.js.map} +1 -1
  168. package/dist/cli-bundle/chunks/{chunk-AZMPKLIA.js → chunk-NBFCNJ7Q.js} +177 -126
  169. package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js.map +1 -0
  170. package/dist/cli-bundle/chunks/{chunk-YZR7UMZ6.js → chunk-NER3KUUS.js} +2 -2
  171. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +20 -0
  172. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +1 -0
  173. package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +918 -0
  174. package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +7 -0
  175. package/dist/cli-bundle/chunks/{chunk-DJ5S2LDY.js → chunk-OESSOFJ4.js} +14 -12
  176. package/dist/cli-bundle/chunks/{chunk-DJ5S2LDY.js.map → chunk-OESSOFJ4.js.map} +1 -1
  177. package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +238 -0
  178. package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +1 -0
  179. package/dist/cli-bundle/chunks/{chunk-TUV7SIWZ.js → chunk-OWTIRHX4.js} +28 -6
  180. package/dist/cli-bundle/chunks/chunk-OWTIRHX4.js.map +7 -0
  181. package/dist/cli-bundle/chunks/{chunk-PV5JS7MP.js → chunk-P3VRG72Q.js} +10 -8
  182. package/dist/cli-bundle/chunks/{chunk-PV5JS7MP.js.map → chunk-P3VRG72Q.js.map} +1 -1
  183. package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js +1423 -0
  184. package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js.map +7 -0
  185. package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +1977 -0
  186. package/dist/cli-bundle/chunks/chunk-P5YORJRH.js.map +7 -0
  187. package/dist/cli-bundle/chunks/{chunk-WTXDLBSZ.js → chunk-PDXT6Q55.js} +2 -2
  188. package/dist/cli-bundle/chunks/{chunk-YZWXMDNH.js → chunk-PJ3A56YF.js} +46 -537
  189. package/dist/cli-bundle/chunks/chunk-PJ3A56YF.js.map +1 -0
  190. package/dist/cli-bundle/chunks/{test-runs-L3WKLO67.js → chunk-PPAJG4GB.js} +13 -10
  191. package/dist/cli-bundle/chunks/{test-runs-L3WKLO67.js.map → chunk-PPAJG4GB.js.map} +1 -1
  192. package/dist/cli-bundle/chunks/{chunk-LLQLLAKU.js → chunk-PPE4YUQM.js} +1670 -1573
  193. package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +1 -0
  194. package/dist/cli-bundle/chunks/{chunk-TO4KCIOT.js → chunk-QHZO65XW.js} +8 -6
  195. package/dist/cli-bundle/chunks/{chunk-TO4KCIOT.js.map → chunk-QHZO65XW.js.map} +1 -1
  196. package/dist/cli-bundle/chunks/{chunk-4OXNQHKQ.js → chunk-R3ZBLGTC.js} +9 -10
  197. package/dist/cli-bundle/chunks/{chunk-4OXNQHKQ.js.map → chunk-R3ZBLGTC.js.map} +2 -2
  198. package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js +624 -0
  199. package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js.map +1 -0
  200. package/dist/cli-bundle/chunks/{chunk-724VLYDJ.js → chunk-RX3HQSYG.js} +2 -2
  201. package/dist/cli-bundle/chunks/{chunk-PUVPC5DL.js → chunk-S4APD35C.js} +4 -4
  202. package/dist/cli-bundle/chunks/{chunk-T5RTYLZJ.js → chunk-S5AYOUT5.js} +8 -6
  203. package/dist/cli-bundle/chunks/{chunk-T5RTYLZJ.js.map → chunk-S5AYOUT5.js.map} +1 -1
  204. package/dist/cli-bundle/chunks/{chunk-75VMARGO.js → chunk-STPSZ2XY.js} +19 -744
  205. package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +1 -0
  206. package/dist/cli-bundle/chunks/{chunk-A2W3XKAD.js → chunk-T35XLYZF.js} +2 -2
  207. package/dist/cli-bundle/chunks/{chunk-N2LOJUBB.js → chunk-T3ABIMGW.js} +5 -3
  208. package/dist/cli-bundle/chunks/{chunk-N2LOJUBB.js.map → chunk-T3ABIMGW.js.map} +1 -1
  209. package/dist/cli-bundle/chunks/{chunk-FDNJMYZB.js → chunk-T3F4DF23.js} +16 -14
  210. package/dist/cli-bundle/chunks/{chunk-FDNJMYZB.js.map → chunk-T3F4DF23.js.map} +1 -1
  211. package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +272 -0
  212. package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +1 -0
  213. package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js +5354 -0
  214. package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{chunk-XFO2NJY6.js → chunk-TSPKZRRW.js} +33 -28
  216. package/dist/cli-bundle/chunks/chunk-TSPKZRRW.js.map +1 -0
  217. package/dist/cli-bundle/chunks/{chunk-ZZWMJVW2.js → chunk-TT42JUMF.js} +4 -4
  218. package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +165 -0
  219. package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +1 -0
  220. package/dist/cli-bundle/chunks/{chunk-7745CXNI.js → chunk-UI5BJ6DO.js} +1231 -1134
  221. package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +7 -0
  222. package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +1932 -0
  223. package/dist/cli-bundle/chunks/chunk-US3T3W5J.js.map +1 -0
  224. package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +175 -0
  225. package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +7 -0
  226. package/dist/cli-bundle/chunks/{chunk-B4O5S7I3.js → chunk-VUHVWI4C.js} +13 -3
  227. package/dist/cli-bundle/chunks/chunk-VUHVWI4C.js.map +7 -0
  228. package/dist/cli-bundle/chunks/{contracts-NLCDIZAT.js → chunk-VZIYHZDX.js} +11 -8
  229. package/dist/cli-bundle/chunks/{contracts-NLCDIZAT.js.map → chunk-VZIYHZDX.js.map} +1 -1
  230. package/dist/cli-bundle/chunks/{chunk-TGYDJEJH.js → chunk-WISPVC2E.js} +9 -7
  231. package/dist/cli-bundle/chunks/{chunk-TGYDJEJH.js.map → chunk-WISPVC2E.js.map} +1 -1
  232. package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js +5434 -0
  233. package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +7 -0
  234. package/dist/cli-bundle/chunks/{chunk-MTB4PRA3.js → chunk-XQCG2JGW.js} +17 -749
  235. package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +7 -0
  236. package/dist/cli-bundle/chunks/chunk-Y76TWC45.js +550 -0
  237. package/dist/cli-bundle/chunks/chunk-Y76TWC45.js.map +7 -0
  238. package/dist/cli-bundle/chunks/{chunk-SL2ANJSV.js → chunk-YD5FML7K.js} +418 -2173
  239. package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +1 -0
  240. package/dist/cli-bundle/chunks/{chunk-NHKXOMZ5.js → chunk-YFIE7YK6.js} +7 -5
  241. package/dist/cli-bundle/chunks/{chunk-NHKXOMZ5.js.map → chunk-YFIE7YK6.js.map} +1 -1
  242. package/dist/cli-bundle/chunks/{chunk-5FYY76HR.js → chunk-YMABYTNG.js} +32 -27
  243. package/dist/cli-bundle/chunks/chunk-YMABYTNG.js.map +7 -0
  244. package/dist/cli-bundle/chunks/{chunk-W5X3AHJN.js → chunk-YOF5VPKM.js} +2 -2
  245. package/dist/cli-bundle/chunks/{chunk-M6PR5BC6.js → chunk-YPPVU5GX.js} +11 -9
  246. package/dist/cli-bundle/chunks/{chunk-M6PR5BC6.js.map → chunk-YPPVU5GX.js.map} +1 -1
  247. package/dist/cli-bundle/chunks/{chunk-ZIEGTQCY.js → chunk-YQMMMONE.js} +6 -4
  248. package/dist/cli-bundle/chunks/{chunk-ZIEGTQCY.js.map → chunk-YQMMMONE.js.map} +1 -1
  249. package/dist/cli-bundle/chunks/{chunk-4IW7STMB.js → chunk-YSAH5FY5.js} +16 -14
  250. package/dist/cli-bundle/chunks/{chunk-4IW7STMB.js.map → chunk-YSAH5FY5.js.map} +1 -1
  251. package/dist/cli-bundle/chunks/{chunk-JYLFF7GJ.js → chunk-YZIR4R3U.js} +16 -14
  252. package/dist/cli-bundle/chunks/{chunk-JYLFF7GJ.js.map → chunk-YZIR4R3U.js.map} +1 -1
  253. package/dist/cli-bundle/chunks/{chunk-7G5SUU6F.js → chunk-Z2CRRZYF.js} +14 -12
  254. package/dist/cli-bundle/chunks/{chunk-7G5SUU6F.js.map → chunk-Z2CRRZYF.js.map} +1 -1
  255. package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js +533 -0
  256. package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js.map +1 -0
  257. package/dist/cli-bundle/chunks/{chunk-WOOB7PV7.js → chunk-ZCJAA3JK.js} +8 -6
  258. package/dist/cli-bundle/chunks/{chunk-WOOB7PV7.js.map → chunk-ZCJAA3JK.js.map} +1 -1
  259. package/dist/cli-bundle/chunks/{chunk-WSDIALO4.js → chunk-ZD34OFFQ.js} +5 -3
  260. package/dist/cli-bundle/chunks/{chunk-WSDIALO4.js.map → chunk-ZD34OFFQ.js.map} +1 -1
  261. package/dist/cli-bundle/chunks/{chunk-Q3XVLRCJ.js → chunk-ZJB3UV5U.js} +54 -58
  262. package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js.map +1 -0
  263. package/dist/cli-bundle/chunks/{chunk-MZ4NH46V.js → chunk-ZMD35NYG.js} +2 -2
  264. package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +241 -0
  265. package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +7 -0
  266. package/dist/cli-bundle/chunks/{claim-D6L33A5Y.js → claim-4DROPSIS.js} +30 -13
  267. package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +1 -0
  268. package/dist/cli-bundle/chunks/{claim-YAFUTPVK.js → claim-VX54TV5U.js} +29 -12
  269. package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +7 -0
  270. package/dist/cli-bundle/chunks/{close-TGYXG7TV.js → close-3YRR3XY6.js} +9 -7
  271. package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +16 -0
  272. package/dist/cli-bundle/chunks/{close-many-SNA6LNZH.js → close-many-AP4MWU36.js} +21 -18
  273. package/dist/cli-bundle/chunks/{close-many-SNA6LNZH.js.map → close-many-AP4MWU36.js.map} +1 -1
  274. package/dist/cli-bundle/chunks/{close-many-4QSWKCRU.js → close-many-OMZIGZB4.js} +19 -16
  275. package/dist/cli-bundle/chunks/{close-many-4QSWKCRU.js.map → close-many-OMZIGZB4.js.map} +1 -1
  276. package/dist/cli-bundle/chunks/{comments-QC6ARR5X.js → comments-MIW5MZOX.js} +12 -9
  277. package/dist/cli-bundle/chunks/{comments-QC6ARR5X.js.map → comments-MIW5MZOX.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{comments-ZHVYGUVC.js → comments-SAG5LSKL.js} +14 -11
  279. package/dist/cli-bundle/chunks/{comments-ZHVYGUVC.js.map → comments-SAG5LSKL.js.map} +1 -1
  280. package/dist/cli-bundle/chunks/{config-O6W2EU2G.js → config-DJJKZB5R.js} +20 -17
  281. package/dist/cli-bundle/chunks/{config-O6W2EU2G.js.map → config-DJJKZB5R.js.map} +1 -1
  282. package/dist/cli-bundle/chunks/{config-XQRFJXJP.js → config-V57QD47V.js} +22 -19
  283. package/dist/cli-bundle/chunks/{config-XQRFJXJP.js.map → config-V57QD47V.js.map} +1 -1
  284. package/dist/cli-bundle/chunks/{context-IHE3IXN5.js → context-4OQGIPSO.js} +15 -12
  285. package/dist/cli-bundle/chunks/{context-WSYWBEUL.js → context-WLA6IAWE.js} +15 -12
  286. package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +12 -0
  287. package/dist/cli-bundle/chunks/contracts-OJEXMKVW.js +16 -0
  288. package/dist/cli-bundle/chunks/{copy-7MUQC44A.js → copy-LEE6P6EM.js} +17 -14
  289. package/dist/cli-bundle/chunks/{copy-7MUQC44A.js.map → copy-LEE6P6EM.js.map} +2 -2
  290. package/dist/cli-bundle/chunks/{copy-ANWXDJVC.js → copy-OTJOWFL6.js} +18 -15
  291. package/dist/cli-bundle/chunks/{copy-ANWXDJVC.js.map → copy-OTJOWFL6.js.map} +1 -1
  292. package/dist/cli-bundle/chunks/create-WKOZKPQR.js +30 -0
  293. package/dist/cli-bundle/chunks/{create-JIA2IFCO.js → create-XWWQFQ6S.js} +14 -12
  294. package/dist/cli-bundle/chunks/{delete-5OLYWQIC.js → delete-62JQTYT4.js} +10 -7
  295. package/dist/cli-bundle/chunks/{delete-5OLYWQIC.js.map → delete-62JQTYT4.js.map} +1 -1
  296. package/dist/cli-bundle/chunks/{delete-INHKCIRN.js → delete-HQKGRNRZ.js} +12 -9
  297. package/dist/cli-bundle/chunks/{delete-INHKCIRN.js.map → delete-HQKGRNRZ.js.map} +1 -1
  298. package/dist/cli-bundle/chunks/{deps-IYEID3QX.js → deps-55FTG6Z5.js} +12 -9
  299. package/dist/cli-bundle/chunks/{deps-IYEID3QX.js.map → deps-55FTG6Z5.js.map} +1 -1
  300. package/dist/cli-bundle/chunks/{deps-CCSWGZW7.js → deps-L2FPIAD3.js} +10 -7
  301. package/dist/cli-bundle/chunks/{deps-CCSWGZW7.js.map → deps-L2FPIAD3.js.map} +1 -1
  302. package/dist/cli-bundle/chunks/{docs-PKO7OEIM.js → docs-6CRCSVKK.js} +11 -9
  303. package/dist/cli-bundle/chunks/{docs-PKO7OEIM.js.map → docs-6CRCSVKK.js.map} +1 -1
  304. package/dist/cli-bundle/chunks/{docs-3XZK22WF.js → docs-S6UTOTO5.js} +9 -7
  305. package/dist/cli-bundle/chunks/{docs-3XZK22WF.js.map → docs-S6UTOTO5.js.map} +1 -1
  306. package/dist/cli-bundle/chunks/{eval-5XYP6NMY.js → eval-N6UHFWVO.js} +15 -11
  307. package/dist/cli-bundle/chunks/{eval-5XYP6NMY.js.map → eval-N6UHFWVO.js.map} +1 -1
  308. package/dist/cli-bundle/chunks/{eval-O4WGQYDI.js → eval-PHOTWYHI.js} +17 -13
  309. package/dist/cli-bundle/chunks/{eval-O4WGQYDI.js.map → eval-PHOTWYHI.js.map} +1 -1
  310. package/dist/cli-bundle/chunks/{extension-T7JNTAAA.js → extension-NBAH62ML.js} +17 -11
  311. package/dist/cli-bundle/chunks/{extension-PVGRRZZG.js → extension-ZF6ZZPOU.js} +17 -11
  312. package/dist/cli-bundle/chunks/{files-W7HH5EOD.js → files-6P57MRKL.js} +12 -9
  313. package/dist/cli-bundle/chunks/{files-W7HH5EOD.js.map → files-6P57MRKL.js.map} +1 -1
  314. package/dist/cli-bundle/chunks/{files-7IU56S6R.js → files-JPU3FNJ7.js} +14 -11
  315. package/dist/cli-bundle/chunks/{files-7IU56S6R.js.map → files-JPU3FNJ7.js.map} +1 -1
  316. package/dist/cli-bundle/chunks/{focus-6FA5KYRY.js → focus-LFZ6IDBR.js} +15 -11
  317. package/dist/cli-bundle/chunks/{focus-6FA5KYRY.js.map → focus-LFZ6IDBR.js.map} +1 -1
  318. package/dist/cli-bundle/chunks/{focus-CQ63JFDG.js → focus-WNMYCVYA.js} +13 -9
  319. package/dist/cli-bundle/chunks/{focus-CQ63JFDG.js.map → focus-WNMYCVYA.js.map} +1 -1
  320. package/dist/cli-bundle/chunks/{gc-3BG67KTO.js → gc-AETFKZ44.js} +10 -7
  321. package/dist/cli-bundle/chunks/{gc-3BG67KTO.js.map → gc-AETFKZ44.js.map} +1 -1
  322. package/dist/cli-bundle/chunks/{gc-PEZYGNVB.js → gc-RLBP4QVN.js} +12 -9
  323. package/dist/cli-bundle/chunks/{gc-PEZYGNVB.js.map → gc-RLBP4QVN.js.map} +1 -1
  324. package/dist/cli-bundle/chunks/{get-J6CSJ4SX.js → get-NH2MPBCI.js} +18 -15
  325. package/dist/cli-bundle/chunks/{get-J6CSJ4SX.js.map → get-NH2MPBCI.js.map} +1 -1
  326. package/dist/cli-bundle/chunks/{get-KJTKGNEQ.js → get-P4ZQXCPZ.js} +16 -13
  327. package/dist/cli-bundle/chunks/{get-KJTKGNEQ.js.map → get-P4ZQXCPZ.js.map} +1 -1
  328. package/dist/cli-bundle/chunks/{health-32UQICEL.js → health-3GVPMQBL.js} +36 -29
  329. package/dist/cli-bundle/chunks/{health-32UQICEL.js.map → health-3GVPMQBL.js.map} +1 -1
  330. package/dist/cli-bundle/chunks/{health-ZUZG5ULV.js → health-DNTM72GJ.js} +34 -27
  331. package/dist/cli-bundle/chunks/{health-ZUZG5ULV.js.map → health-DNTM72GJ.js.map} +1 -1
  332. package/dist/cli-bundle/chunks/history-RYKLC72X.js +20 -0
  333. package/dist/cli-bundle/chunks/{history-W6QVR6FA.js → history-SGPYRAFT.js} +10 -8
  334. package/dist/cli-bundle/chunks/{history-compact-JQ6ZGYSJ.js → history-compact-3F6VELO7.js} +18 -15
  335. package/dist/cli-bundle/chunks/{history-compact-JQ6ZGYSJ.js.map → history-compact-3F6VELO7.js.map} +1 -1
  336. package/dist/cli-bundle/chunks/{history-compact-F355EGL4.js → history-compact-656Y2TN4.js} +20 -17
  337. package/dist/cli-bundle/chunks/{history-compact-F355EGL4.js.map → history-compact-656Y2TN4.js.map} +1 -1
  338. package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +21 -0
  339. package/dist/cli-bundle/chunks/{history-redact-TUWOUYX5.js → history-redact-54ICFKXM.js} +11 -9
  340. package/dist/cli-bundle/chunks/{history-repair-ZKS3LKPV.js → history-repair-4N6SDVHK.js} +17 -14
  341. package/dist/cli-bundle/chunks/{history-repair-ZKS3LKPV.js.map → history-repair-4N6SDVHK.js.map} +1 -1
  342. package/dist/cli-bundle/chunks/{history-repair-MPCAIKYE.js → history-repair-EVTO6LIH.js} +19 -16
  343. package/dist/cli-bundle/chunks/{history-repair-MPCAIKYE.js.map → history-repair-EVTO6LIH.js.map} +1 -1
  344. package/dist/cli-bundle/chunks/init-RPIPQUNV.js +32 -0
  345. package/dist/cli-bundle/chunks/init-SKQAESQS.js +28 -0
  346. package/dist/cli-bundle/chunks/{learnings-EYC3OKS2.js → learnings-2HTPZNGZ.js} +10 -8
  347. package/dist/cli-bundle/chunks/{learnings-EYC3OKS2.js.map → learnings-2HTPZNGZ.js.map} +1 -1
  348. package/dist/cli-bundle/chunks/{learnings-HKJJUVTA.js → learnings-YBIHY3D6.js} +12 -10
  349. package/dist/cli-bundle/chunks/{learnings-HKJJUVTA.js.map → learnings-YBIHY3D6.js.map} +1 -1
  350. package/dist/cli-bundle/chunks/{list-KN3TL5Y5.js → list-64LHZ3HM.js} +10 -8
  351. package/dist/cli-bundle/chunks/{list-HFD5737R.js → list-7LXBTEKI.js} +10 -8
  352. package/dist/cli-bundle/chunks/{next-DQUMFAHG.js → next-7ODPAQ4U.js} +22 -18
  353. package/dist/cli-bundle/chunks/{next-DQUMFAHG.js.map → next-7ODPAQ4U.js.map} +1 -1
  354. package/dist/cli-bundle/chunks/{next-JUEYC5HE.js → next-ODJUM4ZM.js} +24 -20
  355. package/dist/cli-bundle/chunks/{next-JUEYC5HE.js.map → next-ODJUM4ZM.js.map} +1 -1
  356. package/dist/cli-bundle/chunks/{notes-ZG6RLZXB.js → notes-72YXN5JX.js} +10 -8
  357. package/dist/cli-bundle/chunks/{notes-ZG6RLZXB.js.map → notes-72YXN5JX.js.map} +1 -1
  358. package/dist/cli-bundle/chunks/{notes-XATYT43P.js → notes-NJ7IQJX4.js} +12 -10
  359. package/dist/cli-bundle/chunks/{notes-XATYT43P.js.map → notes-NJ7IQJX4.js.map} +1 -1
  360. package/dist/cli-bundle/chunks/{plan-DVVLX7LK.js → plan-R4NDQ27E.js} +18 -15
  361. package/dist/cli-bundle/chunks/{plan-DVVLX7LK.js.map → plan-R4NDQ27E.js.map} +1 -1
  362. package/dist/cli-bundle/chunks/{plan-5NWQL2DH.js → plan-XWY5T67S.js} +20 -17
  363. package/dist/cli-bundle/chunks/{plan-5NWQL2DH.js.map → plan-XWY5T67S.js.map} +1 -1
  364. package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +397 -0
  365. package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +1 -0
  366. package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +400 -0
  367. package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +7 -0
  368. package/dist/cli-bundle/chunks/{register-list-query-WRS6ACUW.js → register-list-query-5H66WFYF.js} +22 -19
  369. package/dist/cli-bundle/chunks/{register-list-query-WRS6ACUW.js.map → register-list-query-5H66WFYF.js.map} +1 -1
  370. package/dist/cli-bundle/chunks/{register-list-query-PNRAHNIQ.js → register-list-query-FB3FNDLZ.js} +24 -21
  371. package/dist/cli-bundle/chunks/{register-list-query-PNRAHNIQ.js.map → register-list-query-FB3FNDLZ.js.map} +1 -1
  372. package/dist/cli-bundle/chunks/{register-mutation-K2MNRWGI.js → register-mutation-UJO23C7R.js} +42 -39
  373. package/dist/cli-bundle/chunks/{register-mutation-K2MNRWGI.js.map → register-mutation-UJO23C7R.js.map} +1 -1
  374. package/dist/cli-bundle/chunks/{register-mutation-ET6E4VLE.js → register-mutation-Z2ETYHKS.js} +40 -37
  375. package/dist/cli-bundle/chunks/{register-mutation-ET6E4VLE.js.map → register-mutation-Z2ETYHKS.js.map} +1 -1
  376. package/dist/cli-bundle/chunks/{register-operations-6DQRUTIX.js → register-operations-A3XAM5J7.js} +39 -36
  377. package/dist/cli-bundle/chunks/{register-operations-6DQRUTIX.js.map → register-operations-A3XAM5J7.js.map} +1 -1
  378. package/dist/cli-bundle/chunks/{register-operations-73UDWMVB.js → register-operations-SG7HBSUP.js} +37 -34
  379. package/dist/cli-bundle/chunks/{register-operations-73UDWMVB.js.map → register-operations-SG7HBSUP.js.map} +1 -1
  380. package/dist/cli-bundle/chunks/{register-setup-LYYCMQFV.js → register-setup-I45OGJUV.js} +25 -19
  381. package/dist/cli-bundle/chunks/{register-setup-LYYCMQFV.js.map → register-setup-I45OGJUV.js.map} +1 -1
  382. package/dist/cli-bundle/chunks/{register-setup-FXZJ2CEJ.js → register-setup-K6U3NVY5.js} +23 -17
  383. package/dist/cli-bundle/chunks/{register-setup-FXZJ2CEJ.js.map → register-setup-K6U3NVY5.js.map} +1 -1
  384. package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +19 -0
  385. package/dist/cli-bundle/chunks/{restore-R6YJHQK3.js → restore-YJ2ET6AT.js} +11 -9
  386. package/dist/cli-bundle/chunks/{scheduling-shortcuts-OGODPUBL.js → scheduling-shortcuts-SSC4MYWQ.js} +14 -12
  387. package/dist/cli-bundle/chunks/{scheduling-shortcuts-OGODPUBL.js.map → scheduling-shortcuts-SSC4MYWQ.js.map} +1 -1
  388. package/dist/cli-bundle/chunks/{scheduling-shortcuts-LE4S7OI7.js → scheduling-shortcuts-ULRG7MNP.js} +16 -14
  389. package/dist/cli-bundle/chunks/{scheduling-shortcuts-LE4S7OI7.js.map → scheduling-shortcuts-ULRG7MNP.js.map} +1 -1
  390. package/dist/cli-bundle/chunks/{schema-ICCD3HOP.js → schema-2PUXCZ25.js} +10 -7
  391. package/dist/cli-bundle/chunks/{schema-RHH23PQX.js → schema-Y6DXXK2F.js} +10 -7
  392. package/dist/cli-bundle/chunks/{search-Z2VGP2Q5.js → search-3S72CTD6.js} +13 -10
  393. package/dist/cli-bundle/chunks/{search-HDDKOPFE.js → search-WNUNBQXO.js} +13 -10
  394. package/dist/cli-bundle/chunks/{stats-ETFP37MB.js → stats-IJYTRQGV.js} +13 -10
  395. package/dist/cli-bundle/chunks/{stats-ETFP37MB.js.map → stats-IJYTRQGV.js.map} +1 -1
  396. package/dist/cli-bundle/chunks/{stats-DHMRXHOB.js → stats-L2D5Y2O5.js} +15 -12
  397. package/dist/cli-bundle/chunks/{stats-DHMRXHOB.js.map → stats-L2D5Y2O5.js.map} +1 -1
  398. package/dist/cli-bundle/chunks/{telemetry-ZRBM22QD.js → telemetry-L2CVOKVN.js} +11 -8
  399. package/dist/cli-bundle/chunks/{telemetry-ZRBM22QD.js.map → telemetry-L2CVOKVN.js.map} +1 -1
  400. package/dist/cli-bundle/chunks/{telemetry-NUZNKDCP.js → telemetry-QBYWQA76.js} +13 -10
  401. package/dist/cli-bundle/chunks/{telemetry-NUZNKDCP.js.map → telemetry-QBYWQA76.js.map} +1 -1
  402. package/dist/cli-bundle/chunks/{test-XNKTIP4Y.js → test-DQ2QFJ7W.js} +21 -15
  403. package/dist/cli-bundle/chunks/test-W7QBLVJS.js +41 -0
  404. package/dist/cli-bundle/chunks/{test-all-APCBSXQI.js → test-all-636NTRTT.js} +26 -19
  405. package/dist/cli-bundle/chunks/{test-all-APCBSXQI.js.map → test-all-636NTRTT.js.map} +1 -1
  406. package/dist/cli-bundle/chunks/{test-all-KIK3OYBY.js → test-all-DWYK3RG6.js} +24 -17
  407. package/dist/cli-bundle/chunks/{test-all-KIK3OYBY.js.map → test-all-DWYK3RG6.js.map} +1 -1
  408. package/dist/cli-bundle/chunks/test-runs-245OINZR.js +28 -0
  409. package/dist/cli-bundle/chunks/test-runs-245OINZR.js.map +1 -0
  410. package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +24 -0
  411. package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js.map +7 -0
  412. package/dist/cli-bundle/chunks/update-SFLZPJXX.js +30 -0
  413. package/dist/cli-bundle/chunks/update-SFLZPJXX.js.map +1 -0
  414. package/dist/cli-bundle/chunks/update-SJZ6S77U.js +26 -0
  415. package/dist/cli-bundle/chunks/update-SJZ6S77U.js.map +7 -0
  416. package/dist/cli-bundle/chunks/{update-many-XGTJ7QIU.js → update-many-DC7X3EWM.js} +32 -29
  417. package/dist/cli-bundle/chunks/{update-many-XGTJ7QIU.js.map → update-many-DC7X3EWM.js.map} +1 -1
  418. package/dist/cli-bundle/chunks/{update-many-GFCQG6ZQ.js → update-many-SLLAMHT7.js} +34 -31
  419. package/dist/cli-bundle/chunks/{update-many-GFCQG6ZQ.js.map → update-many-SLLAMHT7.js.map} +1 -1
  420. package/dist/cli-bundle/chunks/{upgrade-KJ3JGELR.js → upgrade-HFFXLZJA.js} +19 -12
  421. package/dist/cli-bundle/chunks/{upgrade-KJ3JGELR.js.map → upgrade-HFFXLZJA.js.map} +1 -1
  422. package/dist/cli-bundle/chunks/{upgrade-RBRQ7PQU.js → upgrade-UYQKM7RF.js} +21 -14
  423. package/dist/cli-bundle/chunks/{upgrade-RBRQ7PQU.js.map → upgrade-UYQKM7RF.js.map} +1 -1
  424. package/dist/cli-bundle/chunks/{validate-EW6TGC7R.js → validate-PA4FDTOV.js} +34 -27
  425. package/dist/cli-bundle/chunks/{validate-EW6TGC7R.js.map → validate-PA4FDTOV.js.map} +2 -2
  426. package/dist/cli-bundle/chunks/{validate-T6PR5WAL.js → validate-Z7L75YEJ.js} +35 -28
  427. package/dist/cli-bundle/chunks/{validate-T6PR5WAL.js.map → validate-Z7L75YEJ.js.map} +1 -1
  428. package/dist/cli-bundle/main.js +173 -57
  429. package/dist/cli-bundle/main.js.map +2 -2
  430. package/dist/cli-bundle/sdk-runtime.js +247 -0
  431. package/dist/cli-bundle/sdk-runtime.js.map +7 -0
  432. package/dist/cli-bundle/sdk-testing.js +101 -0
  433. package/dist/cli-bundle/sdk-testing.js.map +7 -0
  434. package/dist/cli-bundle/sdk.js +787 -0
  435. package/dist/cli-bundle/sdk.js.map +7 -0
  436. package/dist/core/config/nested-settings.d.ts +4 -3
  437. package/dist/core/config/nested-settings.js +17 -6
  438. package/dist/core/config/nested-settings.js.map +1 -1
  439. package/dist/core/extensions/activation-summary.d.ts +6 -0
  440. package/dist/core/extensions/activation-summary.js +10 -4
  441. package/dist/core/extensions/activation-summary.js.map +1 -1
  442. package/dist/core/extensions/capability-usage.d.ts +6 -0
  443. package/dist/core/extensions/capability-usage.js +10 -4
  444. package/dist/core/extensions/capability-usage.js.map +1 -1
  445. package/dist/core/extensions/extension-types.d.ts +5 -0
  446. package/dist/core/extensions/extension-types.js +2 -2
  447. package/dist/core/extensions/extension-types.js.map +1 -1
  448. package/dist/core/extensions/loader.d.ts +3 -0
  449. package/dist/core/extensions/loader.js +11 -19
  450. package/dist/core/extensions/loader.js.map +1 -1
  451. package/dist/core/history/history-rewrite.js +3 -3
  452. package/dist/core/history/history-rewrite.js.map +1 -1
  453. package/dist/core/item/parent-reference-policy.d.ts +9 -1
  454. package/dist/core/item/parent-reference-policy.js +28 -4
  455. package/dist/core/item/parent-reference-policy.js.map +1 -1
  456. package/dist/core/lock/lock.d.ts +28 -1
  457. package/dist/core/lock/lock.js +254 -20
  458. package/dist/core/lock/lock.js.map +1 -1
  459. package/dist/core/search/background-refresh.js +7 -19
  460. package/dist/core/search/background-refresh.js.map +1 -1
  461. package/dist/core/search/http-client.d.ts +0 -1
  462. package/dist/core/search/http-client.js +3 -3
  463. package/dist/core/search/http-client.js.map +1 -1
  464. package/dist/core/shared/constants.js +3 -2
  465. package/dist/core/shared/constants.js.map +1 -1
  466. package/dist/core/shared/errors.d.ts +1 -0
  467. package/dist/core/shared/errors.js +2 -2
  468. package/dist/core/shared/errors.js.map +1 -1
  469. package/dist/core/shared/primitives.d.ts +12 -0
  470. package/dist/core/shared/primitives.js +29 -2
  471. package/dist/core/shared/primitives.js.map +1 -1
  472. package/dist/core/store/item-store.js +3 -3
  473. package/dist/core/store/item-store.js.map +1 -1
  474. package/dist/core/store/settings-validator.d.ts +1 -0
  475. package/dist/core/store/settings-validator.js +6 -3
  476. package/dist/core/store/settings-validator.js.map +1 -1
  477. package/dist/core/store/settings.js +3 -3
  478. package/dist/core/store/settings.js.map +1 -1
  479. package/dist/core/validate/fix-planning.d.ts +0 -2
  480. package/dist/core/validate/fix-planning.js +3 -3
  481. package/dist/core/validate/fix-planning.js.map +1 -1
  482. package/dist/sdk/cli-contracts/commander-mutation-options.js +3 -2
  483. package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
  484. package/dist/sdk/cli-contracts/flag-contracts.js +3 -2
  485. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  486. package/dist/sdk/errors.d.ts +21 -2
  487. package/dist/sdk/errors.js +8 -2
  488. package/dist/sdk/errors.js.map +1 -1
  489. package/dist/sdk/package-import-adapters.js +3 -3
  490. package/dist/sdk/package-import-adapters.js.map +1 -1
  491. package/dist/sdk/testing.js +41 -19
  492. package/dist/sdk/testing.js.map +1 -1
  493. package/dist/types.d.ts +6 -0
  494. package/dist/types.js +2 -2
  495. package/dist/types.js.map +1 -1
  496. package/docs/ARCHITECTURE.md +27 -0
  497. package/docs/CONFIGURATION.md +3 -0
  498. package/docs/README.md +1 -0
  499. package/docs/SDK_PRIMITIVE_INVENTORY.md +55 -0
  500. package/docs/TESTING.md +5 -1
  501. package/docs/examples/ci/github-actions-pm-extension-gate.yml +5 -5
  502. package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +1 -1
  503. package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +1 -1
  504. package/package.json +11 -24
  505. package/packages/pm-beads/extensions/beads/package.json +3 -0
  506. package/packages/pm-beads/extensions/beads/runtime-loader.ts +24 -2
  507. package/packages/pm-calendar/extensions/calendar/package.json +3 -0
  508. package/packages/pm-command-kit/extensions/command-kit/package.json +3 -0
  509. package/packages/pm-governance-audit/extensions/governance-audit/package.json +3 -0
  510. package/packages/pm-guide-shell/extensions/guide-shell/package.json +3 -0
  511. package/packages/pm-kanban/extensions/kanban/package.json +3 -0
  512. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/package.json +3 -0
  513. package/packages/pm-search-advanced/extensions/search-advanced/package.json +3 -0
  514. package/packages/pm-templates/extensions/templates/package.json +3 -0
  515. package/packages/pm-todos/extensions/todos/package.json +3 -0
  516. package/packages/pm-todos/extensions/todos/runtime-loader.ts +21 -3
  517. package/scripts/bundle-cli.mjs +12 -2
  518. package/dist/cli-bundle/chunks/activity-IDS5GSYG.js +0 -16
  519. package/dist/cli-bundle/chunks/chunk-2VK677OA.js.map +0 -7
  520. package/dist/cli-bundle/chunks/chunk-5FYY76HR.js.map +0 -7
  521. package/dist/cli-bundle/chunks/chunk-75VMARGO.js.map +0 -1
  522. package/dist/cli-bundle/chunks/chunk-7745CXNI.js.map +0 -7
  523. package/dist/cli-bundle/chunks/chunk-AOP2EMK3.js.map +0 -1
  524. package/dist/cli-bundle/chunks/chunk-AZMPKLIA.js.map +0 -1
  525. package/dist/cli-bundle/chunks/chunk-B4O5S7I3.js.map +0 -7
  526. package/dist/cli-bundle/chunks/chunk-BDDYM4LH.js.map +0 -7
  527. package/dist/cli-bundle/chunks/chunk-CN4OAA2G.js.map +0 -7
  528. package/dist/cli-bundle/chunks/chunk-EH23N5FX.js.map +0 -1
  529. package/dist/cli-bundle/chunks/chunk-FMWQRMHS.js.map +0 -1
  530. package/dist/cli-bundle/chunks/chunk-J4KNRDI3.js.map +0 -1
  531. package/dist/cli-bundle/chunks/chunk-KKHIQOTN.js.map +0 -7
  532. package/dist/cli-bundle/chunks/chunk-LLQLLAKU.js.map +0 -1
  533. package/dist/cli-bundle/chunks/chunk-M34MVAOP.js.map +0 -1
  534. package/dist/cli-bundle/chunks/chunk-MTB4PRA3.js.map +0 -7
  535. package/dist/cli-bundle/chunks/chunk-MZG6I2Q2.js.map +0 -7
  536. package/dist/cli-bundle/chunks/chunk-NGDK3KEZ.js.map +0 -7
  537. package/dist/cli-bundle/chunks/chunk-Q3XVLRCJ.js.map +0 -1
  538. package/dist/cli-bundle/chunks/chunk-SBNT6SLO.js.map +0 -7
  539. package/dist/cli-bundle/chunks/chunk-SL2ANJSV.js.map +0 -1
  540. package/dist/cli-bundle/chunks/chunk-TUV7SIWZ.js.map +0 -7
  541. package/dist/cli-bundle/chunks/chunk-UGDONITK.js.map +0 -7
  542. package/dist/cli-bundle/chunks/chunk-UYLA5ROU.js.map +0 -1
  543. package/dist/cli-bundle/chunks/chunk-WBWRQS32.js.map +0 -1
  544. package/dist/cli-bundle/chunks/chunk-XFO2NJY6.js.map +0 -1
  545. package/dist/cli-bundle/chunks/chunk-XQCWTSLO.js.map +0 -1
  546. package/dist/cli-bundle/chunks/chunk-YZWXMDNH.js.map +0 -1
  547. package/dist/cli-bundle/chunks/chunk-Z4DGFQDH.js.map +0 -1
  548. package/dist/cli-bundle/chunks/claim-D6L33A5Y.js.map +0 -1
  549. package/dist/cli-bundle/chunks/claim-YAFUTPVK.js.map +0 -7
  550. package/dist/cli-bundle/chunks/close-KLDLHAOP.js +0 -14
  551. package/dist/cli-bundle/chunks/create-AJ6HUR5W.js +0 -28
  552. package/dist/cli-bundle/chunks/history-IOH6FKG7.js +0 -18
  553. package/dist/cli-bundle/chunks/history-redact-VVDOARNO.js +0 -19
  554. package/dist/cli-bundle/chunks/init-CZLEEE6Q.js +0 -22
  555. package/dist/cli-bundle/chunks/init-MAA6UMNQ.js +0 -26
  556. package/dist/cli-bundle/chunks/profile-54DZ4CLB.js +0 -1205
  557. package/dist/cli-bundle/chunks/profile-54DZ4CLB.js.map +0 -1
  558. package/dist/cli-bundle/chunks/profile-PLIQVEOY.js +0 -1243
  559. package/dist/cli-bundle/chunks/profile-PLIQVEOY.js.map +0 -7
  560. package/dist/cli-bundle/chunks/restore-L27TMMCF.js +0 -17
  561. package/dist/cli-bundle/chunks/test-H36PM746.js +0 -35
  562. package/dist/cli-bundle/chunks/update-RQKI3AMW.js +0 -24
  563. package/dist/cli-bundle/chunks/update-ZM7NJWHY.js +0 -28
  564. /package/dist/cli-bundle/chunks/{activity-IDS5GSYG.js.map → activity-4XQIDNM5.js.map} +0 -0
  565. /package/dist/cli-bundle/chunks/{activity-OENQCYZD.js.map → activity-YKAKZTZ4.js.map} +0 -0
  566. /package/dist/cli-bundle/chunks/{chunk-4SHME4VR.js.map → chunk-5JE6SMYS.js.map} +0 -0
  567. /package/dist/cli-bundle/chunks/{chunk-4EVY7CQN.js.map → chunk-N6DNM2FA.js.map} +0 -0
  568. /package/dist/cli-bundle/chunks/{chunk-YZR7UMZ6.js.map → chunk-NER3KUUS.js.map} +0 -0
  569. /package/dist/cli-bundle/chunks/{chunk-WTXDLBSZ.js.map → chunk-PDXT6Q55.js.map} +0 -0
  570. /package/dist/cli-bundle/chunks/{chunk-724VLYDJ.js.map → chunk-RX3HQSYG.js.map} +0 -0
  571. /package/dist/cli-bundle/chunks/{chunk-PUVPC5DL.js.map → chunk-S4APD35C.js.map} +0 -0
  572. /package/dist/cli-bundle/chunks/{chunk-A2W3XKAD.js.map → chunk-T35XLYZF.js.map} +0 -0
  573. /package/dist/cli-bundle/chunks/{chunk-ZZWMJVW2.js.map → chunk-TT42JUMF.js.map} +0 -0
  574. /package/dist/cli-bundle/chunks/{chunk-W5X3AHJN.js.map → chunk-YOF5VPKM.js.map} +0 -0
  575. /package/dist/cli-bundle/chunks/{chunk-MZ4NH46V.js.map → chunk-ZMD35NYG.js.map} +0 -0
  576. /package/dist/cli-bundle/chunks/{close-TGYXG7TV.js.map → close-3YRR3XY6.js.map} +0 -0
  577. /package/dist/cli-bundle/chunks/{close-KLDLHAOP.js.map → close-OB2Y4QP5.js.map} +0 -0
  578. /package/dist/cli-bundle/chunks/{context-IHE3IXN5.js.map → context-4OQGIPSO.js.map} +0 -0
  579. /package/dist/cli-bundle/chunks/{context-WSYWBEUL.js.map → context-WLA6IAWE.js.map} +0 -0
  580. /package/dist/cli-bundle/chunks/{create-AJ6HUR5W.js.map → contracts-HXJLKCRI.js.map} +0 -0
  581. /package/dist/cli-bundle/chunks/{create-JIA2IFCO.js.map → contracts-OJEXMKVW.js.map} +0 -0
  582. /package/dist/cli-bundle/chunks/{extension-T7JNTAAA.js.map → create-WKOZKPQR.js.map} +0 -0
  583. /package/dist/cli-bundle/chunks/{extension-PVGRRZZG.js.map → create-XWWQFQ6S.js.map} +0 -0
  584. /package/dist/cli-bundle/chunks/{history-IOH6FKG7.js.map → extension-NBAH62ML.js.map} +0 -0
  585. /package/dist/cli-bundle/chunks/{history-W6QVR6FA.js.map → extension-ZF6ZZPOU.js.map} +0 -0
  586. /package/dist/cli-bundle/chunks/{history-redact-VVDOARNO.js.map → history-RYKLC72X.js.map} +0 -0
  587. /package/dist/cli-bundle/chunks/{history-redact-TUWOUYX5.js.map → history-SGPYRAFT.js.map} +0 -0
  588. /package/dist/cli-bundle/chunks/{init-CZLEEE6Q.js.map → history-redact-4H3FCKF3.js.map} +0 -0
  589. /package/dist/cli-bundle/chunks/{init-MAA6UMNQ.js.map → history-redact-54ICFKXM.js.map} +0 -0
  590. /package/dist/cli-bundle/chunks/{list-HFD5737R.js.map → init-RPIPQUNV.js.map} +0 -0
  591. /package/dist/cli-bundle/chunks/{list-KN3TL5Y5.js.map → init-SKQAESQS.js.map} +0 -0
  592. /package/dist/cli-bundle/chunks/{restore-L27TMMCF.js.map → list-64LHZ3HM.js.map} +0 -0
  593. /package/dist/cli-bundle/chunks/{restore-R6YJHQK3.js.map → list-7LXBTEKI.js.map} +0 -0
  594. /package/dist/cli-bundle/chunks/{schema-ICCD3HOP.js.map → restore-PXOFL6AM.js.map} +0 -0
  595. /package/dist/cli-bundle/chunks/{schema-RHH23PQX.js.map → restore-YJ2ET6AT.js.map} +0 -0
  596. /package/dist/cli-bundle/chunks/{search-HDDKOPFE.js.map → schema-2PUXCZ25.js.map} +0 -0
  597. /package/dist/cli-bundle/chunks/{search-Z2VGP2Q5.js.map → schema-Y6DXXK2F.js.map} +0 -0
  598. /package/dist/cli-bundle/chunks/{test-XNKTIP4Y.js.map → search-3S72CTD6.js.map} +0 -0
  599. /package/dist/cli-bundle/chunks/{test-H36PM746.js.map → search-WNUNBQXO.js.map} +0 -0
  600. /package/dist/cli-bundle/chunks/{update-ZM7NJWHY.js.map → test-DQ2QFJ7W.js.map} +0 -0
  601. /package/dist/cli-bundle/chunks/{update-RQKI3AMW.js.map → test-W7QBLVJS.js.map} +0 -0
@@ -0,0 +1,18 @@
1
+ import {
2
+ _testOnly,
3
+ runActivity
4
+ } from "./chunk-KLG4ZULO.js";
5
+ import "./chunk-3Y4OESPP.js";
6
+ import "./chunk-D3UCE7RW.js";
7
+ import "./chunk-EEY54JMF.js";
8
+ import "./chunk-3U3VEWK6.js";
9
+ import "./chunk-EZFKWSC7.js";
10
+ import "./chunk-DRBV5UC2.js";
11
+ import "./chunk-P5YORJRH.js";
12
+ import "./chunk-7C2O74AE.js";
13
+ import "./chunk-5VVUKE3U.js";
14
+ export {
15
+ _testOnly,
16
+ runActivity
17
+ };
18
+ //# sourceMappingURL=activity-4XQIDNM5.js.map
@@ -3,18 +3,20 @@
3
3
  import {
4
4
  _testOnly,
5
5
  runActivity
6
- } from "./chunk-7G5SUU6F.js";
7
- import "./chunk-FDNJMYZB.js";
8
- import "./chunk-Y2VSCQ77.js";
9
- import "./chunk-NHKXOMZ5.js";
10
- import "./chunk-UYLA5ROU.js";
11
- import "./chunk-AOP2EMK3.js";
12
- import "./chunk-FMWQRMHS.js";
13
- import "./chunk-SL2ANJSV.js";
6
+ } from "./chunk-Z2CRRZYF.js";
7
+ import "./chunk-T3F4DF23.js";
8
+ import "./chunk-BFVHCAOO.js";
9
+ import "./chunk-YFIE7YK6.js";
10
+ import "./chunk-57C2RLW5.js";
11
+ import "./chunk-HK72NWAD.js";
12
+ import "./chunk-FJRKQREY.js";
13
+ import "./chunk-US3T3W5J.js";
14
+ import "./chunk-NNHHXJB2.js";
15
+ import "./chunk-YD5FML7K.js";
14
16
  export {
15
17
  _testOnly,
16
18
  runActivity
17
19
  };
18
- //# sourceMappingURL=activity-OENQCYZD.js.map
20
+ //# sourceMappingURL=activity-YKAKZTZ4.js.map
19
21
 
20
22
  //# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
@@ -1,30 +1,33 @@
1
1
  import {
2
2
  buildListQueryFilters
3
3
  } from "./chunk-4BU75MF4.js";
4
- import {
5
- splitCommaList
6
- } from "./chunk-5HIZDR5A.js";
7
4
  import {
8
5
  parseStatusFilterCsv,
9
6
  runList
10
- } from "./chunk-A222YWOQ.js";
7
+ } from "./chunk-7EQNAZX2.js";
11
8
  import "./chunk-R23CSHGI.js";
12
- import "./chunk-724VLYDJ.js";
13
- import "./chunk-3MLQZI3H.js";
14
- import "./chunk-CN4OAA2G.js";
9
+ import "./chunk-RX3HQSYG.js";
10
+ import "./chunk-EEY54JMF.js";
11
+ import {
12
+ splitCommaList
13
+ } from "./chunk-5HIZDR5A.js";
14
+ import "./chunk-3U3VEWK6.js";
15
15
  import {
16
16
  normalizeStatusInput
17
- } from "./chunk-CQFZRLXQ.js";
17
+ } from "./chunk-EZFKWSC7.js";
18
18
  import {
19
19
  nowIso
20
- } from "./chunk-MZG6I2Q2.js";
20
+ } from "./chunk-DRBV5UC2.js";
21
21
  import {
22
- EXIT_CODE,
23
22
  PmCliError,
24
- readSettings,
23
+ readSettings
24
+ } from "./chunk-P5YORJRH.js";
25
+ import "./chunk-7C2O74AE.js";
26
+ import {
27
+ EXIT_CODE,
25
28
  resolvePmRoot,
26
29
  resolveRuntimeStatusRegistry
27
- } from "./chunk-BDDYM4LH.js";
30
+ } from "./chunk-5VVUKE3U.js";
28
31
 
29
32
  // dist/cli/commands/aggregate.js
30
33
  !(function() {
@@ -369,4 +372,4 @@ export {
369
372
  _testOnlyAggregateCommand,
370
373
  runAggregate
371
374
  };
372
- //# sourceMappingURL=aggregate-EC4LWS3U.js.map
375
+ //# sourceMappingURL=aggregate-EQX2RGB7.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../cli/commands/aggregate.ts"],
4
4
  "sourcesContent": ["/**\n * @module cli/commands/aggregate\n *\n * Implements the pm aggregate command surface and its agent-facing runtime behavior.\n */\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../core/shared/split-comma-list.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { normalizeStatusInput } from \"../../core/item/status.js\";\nimport { parseStatusFilterCsv } from \"../../core/item/status-filter.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { type ItemStatus } from \"../../types/index.js\";\nimport { buildListQueryFilters } from \"./list-filter-shared.js\";\nimport { runList } from \"./list.js\";\n\ntype AggregateGroupField = \"parent\" | \"type\" | \"priority\" | \"status\" | \"assignee\" | \"tags\" | \"sprint\" | \"release\";\ntype AggregateGroupValue = string | number | null;\ntype AggregateGroupRecord = Partial<Record<AggregateGroupField, AggregateGroupValue>>;\ntype AggregateListedItem = {\n type: string;\n status: ItemStatus;\n priority: number;\n parent?: string;\n assignee?: string;\n tags: string[];\n sprint?: string;\n release?: string;\n};\n\nconst AGGREGATE_GROUP_FIELDS: AggregateGroupField[] = [\n \"parent\",\n \"type\",\n \"priority\",\n \"status\",\n \"assignee\",\n \"tags\",\n \"sprint\",\n \"release\",\n];\n\n/**\n * Documents the aggregate options payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateOptions {\n groupBy?: string;\n count?: boolean;\n completion?: boolean;\n sum?: string;\n avg?: string;\n includeUnparented?: boolean;\n status?: string;\n type?: string;\n tag?: string;\n priority?: string;\n deadlineBefore?: string;\n deadlineAfter?: string;\n assignee?: string;\n assigneeFilter?: string;\n parent?: string;\n sprint?: string;\n release?: string;\n}\n\n/**\n * Documents the aggregate row payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateRow {\n group: AggregateGroupRecord;\n /**\n * Human-readable display label for this group. Blank/null group values render\n * with an explicit \"(unassigned)\"-style label (per dimension) so terminal and\n * grep-based consumers are never faced with an ambiguous empty key. The\n * structured `group` record keeps the raw null for machine consumers.\n */\n group_label: string;\n count: number;\n open?: number;\n in_progress?: number;\n closed?: number;\n other?: number;\n completion_pct?: number;\n null_count?: number;\n sum?: number | null;\n avg?: number | null;\n}\n\n/**\n * Documents the aggregate result payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateResult {\n groups: AggregateRow[];\n count: number;\n totals: {\n items_considered: number;\n items_grouped: number;\n items_skipped_unparented: number;\n };\n filters: {\n group_by: AggregateGroupField[];\n count: boolean;\n completion: boolean;\n sum?: string | null;\n avg?: string | null;\n numeric_field?: string | null;\n include_unparented: boolean;\n status: ItemStatus | null;\n type: string | null;\n tag: string | null;\n priority: string | null;\n deadline_before: string | null;\n deadline_after: string | null;\n assignee: string | null;\n assignee_filter: string | null;\n parent: string | null;\n sprint: string | null;\n release: string | null;\n };\n now: string;\n warnings?: string[];\n}\n\nfunction parseStatus(raw: string | undefined, statusRegistry: RuntimeStatusRegistry): ItemStatus | undefined {\n const statuses = parseStatusFilterCsv(raw, statusRegistry, { strict: true, flagLabel: \"--status\" });\n if (!statuses || statuses.length === 0) {\n return undefined;\n }\n if (statuses.length > 1) {\n throw new PmCliError(\n 'Aggregate --status accepts one status, or the standalone \"all\" sentinel.',\n EXIT_CODE.USAGE,\n );\n }\n return statuses[0];\n}\n\ninterface NumericAggregation {\n field: string;\n sum: boolean;\n avg: boolean;\n}\n\nfunction parseNumericAggregation(options: AggregateOptions): NumericAggregation | null {\n const sumField = options.sum?.trim();\n const avgField = options.avg?.trim();\n const normalizedSum = sumField && sumField.length > 0 ? sumField : undefined;\n const normalizedAvg = avgField && avgField.length > 0 ? avgField : undefined;\n if (!normalizedSum && !normalizedAvg) {\n return null;\n }\n if (normalizedSum && normalizedAvg && normalizedSum !== normalizedAvg) {\n throw new PmCliError(\"Aggregate --sum and --avg must target the same numeric field\", EXIT_CODE.USAGE);\n }\n return {\n field: normalizedSum ?? normalizedAvg!,\n sum: normalizedSum !== undefined,\n avg: normalizedAvg !== undefined,\n };\n}\n\nfunction parseGroupBy(raw: string | undefined): AggregateGroupField[] {\n const value = raw?.trim() ?? \"status\";\n if (value.length === 0) {\n throw new PmCliError(\"--group-by requires at least one field name\", EXIT_CODE.USAGE);\n }\n const requested = splitCommaList(value);\n if (requested.length === 0) {\n throw new PmCliError(\"--group-by requires a comma-separated list of fields\", EXIT_CODE.USAGE);\n }\n for (const field of requested) {\n if (!AGGREGATE_GROUP_FIELDS.includes(field as AggregateGroupField)) {\n throw new PmCliError(\n `Aggregate group fields must be one of ${AGGREGATE_GROUP_FIELDS.join(\"|\")}; received \"${field}\"`,\n EXIT_CODE.USAGE,\n );\n }\n }\n return requested as AggregateGroupField[];\n}\n\nfunction normalizeTagGroupValue(tags: string[]): string | null {\n const normalized = [...new Set(tags.map((tag) => tag.trim().toLowerCase()).filter((tag) => tag.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n if (normalized.length === 0) {\n return null;\n }\n return normalized.join(\",\");\n}\n\nfunction resolveGroupValue(field: AggregateGroupField, item: AggregateListedItem): AggregateGroupValue {\n switch (field) {\n case \"parent\":\n return item.parent ?? null;\n case \"type\":\n return item.type;\n case \"priority\":\n return item.priority;\n case \"status\":\n return item.status;\n case \"assignee\":\n return item.assignee ?? null;\n case \"tags\":\n return normalizeTagGroupValue(item.tags);\n case \"sprint\":\n return item.sprint ?? null;\n case \"release\":\n return item.release ?? null;\n default:\n return null;\n }\n}\n\nfunction compareNullableGroupValue(left: AggregateGroupValue | undefined, right: AggregateGroupValue | undefined): number {\n const leftValue = left ?? null;\n const rightValue = right ?? null;\n if (leftValue === rightValue) {\n return 0;\n }\n if (leftValue === null) {\n return 1;\n }\n if (rightValue === null) {\n return -1;\n }\n if (typeof leftValue === \"number\" && typeof rightValue === \"number\") {\n return leftValue - rightValue;\n }\n return String(leftValue).localeCompare(String(rightValue));\n}\n\nfunction buildGroupKey(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n return groupBy.map((field) => `${field}:${JSON.stringify(group[field] ?? null)}`).join(\"|\");\n}\n\n/** Explicit display label for an empty/blank group value, keyed by dimension. */\nconst EMPTY_AGGREGATE_GROUP_LABELS: Record<AggregateGroupField, string> = {\n parent: \"(unparented)\",\n type: \"(untyped)\",\n priority: \"(no priority)\",\n status: \"(no status)\",\n assignee: \"(unassigned)\",\n tags: \"(untagged)\",\n sprint: \"(no sprint)\",\n release: \"(no release)\",\n};\n\n/** Render a single group field's value, substituting an explicit label for null. */\nfunction formatGroupFieldLabel(field: AggregateGroupField, value: AggregateGroupValue | undefined): string {\n if (value === null || value === undefined || value === \"\") {\n return EMPTY_AGGREGATE_GROUP_LABELS[field];\n }\n return String(value);\n}\n\n/**\n * Build the human-readable label for an aggregate row. Single-field grouping\n * yields the bare (possibly substituted) value; multi-field grouping joins each\n * \"field=value\" pair so composite groups stay unambiguous.\n */\nfunction buildGroupLabel(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n if (groupBy.length === 1) {\n return formatGroupFieldLabel(groupBy[0], group[groupBy[0]]);\n }\n return groupBy.map((field) => `${field}=${formatGroupFieldLabel(field, group[field])}`).join(\" | \");\n}\n\nfunction compareAggregateRows(\n left: AggregateRow,\n right: AggregateRow,\n groupBy: AggregateGroupField[],\n): number {\n for (const field of groupBy) {\n const byField = compareNullableGroupValue(left.group[field], right.group[field]);\n if (byField !== 0) {\n return byField;\n }\n }\n return 0;\n}\n\nfunction readNumericAggregateValue(item: AggregateListedItem, field: string): number | null {\n const source = item as unknown as Record<string, unknown>;\n const raw = source[field];\n if (typeof raw === \"number\" && Number.isFinite(raw)) {\n return raw;\n }\n if (typeof raw === \"string\") {\n const trimmed = raw.trim();\n if (trimmed.length === 0) {\n return null;\n }\n const parsed = Number(trimmed);\n if (Number.isFinite(parsed)) {\n return parsed;\n }\n }\n return null;\n}\n\ninterface AggregateAccumulator {\n /** group_label is derived once at finalization, so the accumulator omits it. */\n row: Omit<AggregateRow, \"group_label\">;\n numeric_count: number;\n numeric_sum: number;\n null_count: number;\n open_count: number;\n in_progress_count: number;\n closed_count: number;\n other_count: number;\n}\n\nfunction completionPct(closed: number, total: number): number {\n if (total <= 0) {\n return 0;\n }\n return Math.round((closed / total) * 10000) / 100;\n}\n\nfunction updateCompletionCounts(accumulator: AggregateAccumulator, status: ItemStatus, statusRegistry: RuntimeStatusRegistry): void {\n const normalizedStatus = normalizeStatusInput(String(status), statusRegistry) ?? status;\n if (normalizedStatus === statusRegistry.open_status) {\n accumulator.open_count += 1;\n return;\n }\n if (normalizedStatus === \"in_progress\" || (statusRegistry.active_statuses.has(normalizedStatus) && normalizedStatus !== statusRegistry.open_status)) {\n accumulator.in_progress_count += 1;\n return;\n }\n if (statusRegistry.terminal_done_statuses.has(normalizedStatus) || normalizedStatus === statusRegistry.close_status) {\n accumulator.closed_count += 1;\n return;\n }\n accumulator.other_count += 1;\n}\n\nfunction createAggregateAccumulator(\n group: AggregateGroupRecord,\n numericValue: number | null,\n): AggregateAccumulator {\n return {\n row: {\n group,\n count: 1,\n },\n numeric_count: numericValue === null ? 0 : 1,\n numeric_sum: numericValue ?? 0,\n null_count: numericValue === null ? 1 : 0,\n open_count: 0,\n in_progress_count: 0,\n closed_count: 0,\n other_count: 0,\n };\n}\n\nfunction updateNumericAggregation(accumulator: AggregateAccumulator, numericValue: number | null): void {\n if (numericValue === null) {\n accumulator.null_count += 1;\n return;\n }\n accumulator.numeric_count += 1;\n accumulator.numeric_sum += numericValue;\n}\n\nfunction updateAggregateAccumulator(params: {\n accumulator: AggregateAccumulator;\n item: AggregateListedItem;\n statusRegistry: RuntimeStatusRegistry;\n includeCompletion: boolean;\n numericAggregation: NumericAggregation | null;\n numericValue: number | null;\n}): void {\n params.accumulator.row.count += 1;\n if (params.includeCompletion) {\n updateCompletionCounts(params.accumulator, params.item.status, params.statusRegistry);\n }\n if (params.numericAggregation !== null) {\n updateNumericAggregation(params.accumulator, params.numericValue);\n }\n}\n\nfunction buildAggregateGroup(groupBy: AggregateGroupField[], item: AggregateListedItem): AggregateGroupRecord {\n const group: AggregateGroupRecord = {};\n for (const field of groupBy) {\n group[field] = resolveGroupValue(field, item);\n }\n return group;\n}\n\nfunction finalizeAggregateRow(\n entry: AggregateAccumulator,\n groupBy: AggregateGroupField[],\n includeCompletion: boolean,\n numericAggregation: NumericAggregation | null,\n): AggregateRow {\n const row: AggregateRow = {\n ...entry.row,\n group_label: buildGroupLabel(groupBy, entry.row.group),\n };\n if (includeCompletion) {\n row.open = entry.open_count;\n row.in_progress = entry.in_progress_count;\n row.closed = entry.closed_count;\n row.other = entry.other_count;\n row.completion_pct = completionPct(entry.closed_count, entry.row.count);\n }\n if (numericAggregation !== null) {\n row.null_count = entry.null_count;\n if (numericAggregation.sum) {\n row.sum = entry.numeric_sum;\n }\n if (numericAggregation.avg) {\n row.avg = entry.numeric_count === 0 ? null : entry.numeric_sum / entry.numeric_count;\n }\n }\n return row;\n}\n\nfunction buildAggregateFilters(params: {\n groupBy: AggregateGroupField[];\n includeCompletion: boolean;\n includeUnparented: boolean;\n status: ItemStatus | undefined;\n options: AggregateOptions;\n numericAggregation: NumericAggregation | null;\n}): AggregateResult[\"filters\"] {\n return {\n group_by: params.groupBy,\n count: true,\n completion: params.includeCompletion,\n include_unparented: params.includeUnparented,\n status: params.status ?? null,\n type: params.options.type ?? null,\n tag: params.options.tag ?? null,\n priority: params.options.priority ?? null,\n deadline_before: params.options.deadlineBefore ?? null,\n deadline_after: params.options.deadlineAfter ?? null,\n assignee: params.options.assignee ?? null,\n assignee_filter: params.options.assigneeFilter ?? null,\n parent: params.options.parent ?? null,\n sprint: params.options.sprint ?? null,\n release: params.options.release ?? null,\n ...(params.numericAggregation !== null\n ? {\n sum: params.options.sum ?? null,\n avg: params.options.avg ?? null,\n numeric_field: params.numericAggregation.field,\n }\n : {}),\n };\n}\n\n/**\n * Implements run aggregate for the public runtime surface of this module.\n */\nexport async function runAggregate(options: AggregateOptions, global: GlobalOptions): Promise<AggregateResult> {\n if (options.count === false) {\n throw new PmCliError(\"Aggregate grouped counts are always enabled; omit count=false.\", EXIT_CODE.USAGE);\n }\n\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const groupBy = parseGroupBy(options.groupBy);\n const status = parseStatus(options.status, statusRegistry);\n const numericAggregation = parseNumericAggregation(options);\n const includeCompletion = options.completion === true;\n const includeUnparented = options.includeUnparented === true;\n\n const listed = await runList(\n status,\n buildListQueryFilters(options),\n global,\n );\n\n const grouped = new Map<string, AggregateAccumulator>();\n let skippedUnparented = 0;\n let groupedItemCount = 0;\n\n for (const listedItem of listed.items) {\n const item = listedItem as AggregateListedItem;\n const group = buildAggregateGroup(groupBy, item);\n if (groupBy.includes(\"parent\") && group.parent === null && !includeUnparented) {\n skippedUnparented += 1;\n continue;\n }\n const key = buildGroupKey(groupBy, group);\n const existing = grouped.get(key);\n const numericValue =\n numericAggregation === null\n ? null\n : readNumericAggregateValue(item, numericAggregation.field);\n if (existing) {\n updateAggregateAccumulator({\n accumulator: existing,\n item,\n statusRegistry,\n includeCompletion,\n numericAggregation,\n numericValue,\n });\n } else {\n const accumulator = createAggregateAccumulator(group, numericValue);\n if (includeCompletion) {\n updateCompletionCounts(accumulator, item.status, statusRegistry);\n }\n grouped.set(key, accumulator);\n }\n groupedItemCount += 1;\n }\n\n const groups = [...grouped.values()]\n .map((entry) => finalizeAggregateRow(entry, groupBy, includeCompletion, numericAggregation))\n .sort((left, right) => compareAggregateRows(left, right, groupBy));\n const warnings = listed.warnings && listed.warnings.length > 0 ? listed.warnings : undefined;\n\n return {\n groups,\n count: groups.length,\n totals: {\n items_considered: listed.items.length,\n items_grouped: groupedItemCount,\n items_skipped_unparented: skippedUnparented,\n },\n filters: buildAggregateFilters({ groupBy, includeCompletion, includeUnparented, status, options, numericAggregation }),\n now: nowIso(),\n ...(warnings ? { warnings } : {}),\n };\n}\n\nexport const _testOnlyAggregateCommand = {\n buildGroupKey,\n compareAggregateRows,\n compareNullableGroupValue,\n completionPct,\n normalizeTagGroupValue,\n parseGroupBy,\n parseNumericAggregation,\n parseStatus,\n readNumericAggregateValue,\n resolveGroupValue,\n updateCompletionCounts,\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAM,yBAAgD;EACpD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAoFF,SAAS,YAAY,KAAyB,gBAAqC;AACjF,QAAM,WAAW,qBAAqB,KAAK,gBAAgB,EAAE,QAAQ,MAAM,WAAW,WAAU,CAAE;AAClG,MAAI,CAAC,YAAY,SAAS,WAAW,GAAG;AACtC,WAAO;EACT;AACA,MAAI,SAAS,SAAS,GAAG;AACvB,UAAM,IAAI,WACR,4EACA,UAAU,KAAK;EAEnB;AACA,SAAO,SAAS,CAAC;AACnB;AAQA,SAAS,wBAAwB,SAAyB;AACxD,QAAM,WAAW,QAAQ,KAAK,KAAI;AAClC,QAAM,WAAW,QAAQ,KAAK,KAAI;AAClC,QAAM,gBAAgB,YAAY,SAAS,SAAS,IAAI,WAAW;AACnE,QAAM,gBAAgB,YAAY,SAAS,SAAS,IAAI,WAAW;AACnE,MAAI,CAAC,iBAAiB,CAAC,eAAe;AACpC,WAAO;EACT;AACA,MAAI,iBAAiB,iBAAiB,kBAAkB,eAAe;AACrE,UAAM,IAAI,WAAW,gEAAgE,UAAU,KAAK;EACtG;AACA,SAAO;IACL,OAAO,iBAAiB;IACxB,KAAK,kBAAkB;IACvB,KAAK,kBAAkB;;AAE3B;AAEA,SAAS,aAAa,KAAuB;AAC3C,QAAM,QAAQ,KAAK,KAAI,KAAM;AAC7B,MAAI,M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,uBAAuB,OACnB,OACA,0BAA0B,MAAM,mBAAmB,KAAK;AAC9D,QAAI,UAAU;AACZ,iCAA2B;QACzB,aAAa;QACb;QACA;QACA;QACA;QACA;OACD;IACH,OAAO;AACL,YAAM,cAAc,2BAA2B,OAAO,YAAY;AAClE,UAAI,mBAAmB;AACrB,+BAAuB,aAAa,KAAK,QAAQ,cAAc;MACjE;AACA,cAAQ,IAAI,KAAK,WAAW;IAC9B;AACA,wBAAoB;EACtB;AAEA,QAAM,SAAS,CAAC,GAAG,QAAQ,OAAM,CAAE,EAChC,IAAI,CAAC,UAAU,qBAAqB,OAAO,SAAS,mBAAmB,kBAAkB,CAAC,EAC1F,KAAK,CAAC,MAAM,UAAU,qBAAqB,MAAM,OAAO,OAAO,CAAC;AACnE,QAAM,WAAW,OAAO,YAAY,OAAO,SAAS,SAAS,IAAI,OAAO,WAAW;AAEnF,SAAO;IACL;IACA,OAAO,OAAO;IACd,QAAQ;MACN,kBAAkB,OAAO,MAAM;MAC/B,eAAe;MACf,0BAA0B;;IAE5B,SAAS,sBAAsB,EAAE,SAAS,mBAAmB,mBAAmB,QAAQ,SAAS,mBAAkB,CAAE;IACrH,KAAK,OAAM;IACX,GAAI,WAAW,EAAE,SAAQ,IAAK,CAAA;;AAElC;AAEO,IAAM,4BAA4B;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;",
6
6
  "names": ["global"]
7
7
  }
@@ -1,32 +1,35 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="adc587ef-dde4-5305-a38b-45a4831234c2")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="95ef21cc-1a68-576f-8241-660cffa2efa6")}catch(e){}}();
3
3
  import {
4
4
  buildListQueryFilters
5
5
  } from "./chunk-VY3VQ22F.js";
6
- import {
7
- splitCommaList
8
- } from "./chunk-P4SESZGT.js";
9
6
  import {
10
7
  parseStatusFilterCsv,
11
8
  runList
12
- } from "./chunk-4IW7STMB.js";
9
+ } from "./chunk-YSAH5FY5.js";
13
10
  import "./chunk-QB7XMHJW.js";
14
- import "./chunk-4SHME4VR.js";
15
- import "./chunk-NHKXOMZ5.js";
16
- import "./chunk-UYLA5ROU.js";
11
+ import "./chunk-5JE6SMYS.js";
12
+ import "./chunk-YFIE7YK6.js";
13
+ import {
14
+ splitCommaList
15
+ } from "./chunk-P4SESZGT.js";
16
+ import "./chunk-57C2RLW5.js";
17
17
  import {
18
18
  normalizeStatusInput
19
- } from "./chunk-AOP2EMK3.js";
19
+ } from "./chunk-HK72NWAD.js";
20
20
  import {
21
21
  nowIso
22
- } from "./chunk-FMWQRMHS.js";
22
+ } from "./chunk-FJRKQREY.js";
23
23
  import {
24
- EXIT_CODE,
25
24
  PmCliError,
26
- readSettings,
25
+ readSettings
26
+ } from "./chunk-US3T3W5J.js";
27
+ import "./chunk-NNHHXJB2.js";
28
+ import {
29
+ EXIT_CODE,
27
30
  resolvePmRoot,
28
31
  resolveRuntimeStatusRegistry
29
- } from "./chunk-SL2ANJSV.js";
32
+ } from "./chunk-YD5FML7K.js";
30
33
 
31
34
  // dist/cli/commands/aggregate.js
32
35
  var AGGREGATE_GROUP_FIELDS = [
@@ -364,6 +367,6 @@ export {
364
367
  _testOnlyAggregateCommand,
365
368
  runAggregate
366
369
  };
367
- //# sourceMappingURL=aggregate-RCB3QJJE.js.map
370
+ //# sourceMappingURL=aggregate-PEGZGJXD.js.map
368
371
 
369
- //# debugId=adc587ef-dde4-5305-a38b-45a4831234c2
372
+ //# debugId=95ef21cc-1a68-576f-8241-660cffa2efa6
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../cli/commands/aggregate.ts"],"sourcesContent":["/**\n * @module cli/commands/aggregate\n *\n * Implements the pm aggregate command surface and its agent-facing runtime behavior.\n */\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../core/shared/split-comma-list.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { normalizeStatusInput } from \"../../core/item/status.js\";\nimport { parseStatusFilterCsv } from \"../../core/item/status-filter.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { type ItemStatus } from \"../../types/index.js\";\nimport { buildListQueryFilters } from \"./list-filter-shared.js\";\nimport { runList } from \"./list.js\";\n\ntype AggregateGroupField = \"parent\" | \"type\" | \"priority\" | \"status\" | \"assignee\" | \"tags\" | \"sprint\" | \"release\";\ntype AggregateGroupValue = string | number | null;\ntype AggregateGroupRecord = Partial<Record<AggregateGroupField, AggregateGroupValue>>;\ntype AggregateListedItem = {\n type: string;\n status: ItemStatus;\n priority: number;\n parent?: string;\n assignee?: string;\n tags: string[];\n sprint?: string;\n release?: string;\n};\n\nconst AGGREGATE_GROUP_FIELDS: AggregateGroupField[] = [\n \"parent\",\n \"type\",\n \"priority\",\n \"status\",\n \"assignee\",\n \"tags\",\n \"sprint\",\n \"release\",\n];\n\n/**\n * Documents the aggregate options payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateOptions {\n groupBy?: string;\n count?: boolean;\n completion?: boolean;\n sum?: string;\n avg?: string;\n includeUnparented?: boolean;\n status?: string;\n type?: string;\n tag?: string;\n priority?: string;\n deadlineBefore?: string;\n deadlineAfter?: string;\n assignee?: string;\n assigneeFilter?: string;\n parent?: string;\n sprint?: string;\n release?: string;\n}\n\n/**\n * Documents the aggregate row payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateRow {\n group: AggregateGroupRecord;\n /**\n * Human-readable display label for this group. Blank/null group values render\n * with an explicit \"(unassigned)\"-style label (per dimension) so terminal and\n * grep-based consumers are never faced with an ambiguous empty key. The\n * structured `group` record keeps the raw null for machine consumers.\n */\n group_label: string;\n count: number;\n open?: number;\n in_progress?: number;\n closed?: number;\n other?: number;\n completion_pct?: number;\n null_count?: number;\n sum?: number | null;\n avg?: number | null;\n}\n\n/**\n * Documents the aggregate result payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateResult {\n groups: AggregateRow[];\n count: number;\n totals: {\n items_considered: number;\n items_grouped: number;\n items_skipped_unparented: number;\n };\n filters: {\n group_by: AggregateGroupField[];\n count: boolean;\n completion: boolean;\n sum?: string | null;\n avg?: string | null;\n numeric_field?: string | null;\n include_unparented: boolean;\n status: ItemStatus | null;\n type: string | null;\n tag: string | null;\n priority: string | null;\n deadline_before: string | null;\n deadline_after: string | null;\n assignee: string | null;\n assignee_filter: string | null;\n parent: string | null;\n sprint: string | null;\n release: string | null;\n };\n now: string;\n warnings?: string[];\n}\n\nfunction parseStatus(raw: string | undefined, statusRegistry: RuntimeStatusRegistry): ItemStatus | undefined {\n const statuses = parseStatusFilterCsv(raw, statusRegistry, { strict: true, flagLabel: \"--status\" });\n if (!statuses || statuses.length === 0) {\n return undefined;\n }\n if (statuses.length > 1) {\n throw new PmCliError(\n 'Aggregate --status accepts one status, or the standalone \"all\" sentinel.',\n EXIT_CODE.USAGE,\n );\n }\n return statuses[0];\n}\n\ninterface NumericAggregation {\n field: string;\n sum: boolean;\n avg: boolean;\n}\n\nfunction parseNumericAggregation(options: AggregateOptions): NumericAggregation | null {\n const sumField = options.sum?.trim();\n const avgField = options.avg?.trim();\n const normalizedSum = sumField && sumField.length > 0 ? sumField : undefined;\n const normalizedAvg = avgField && avgField.length > 0 ? avgField : undefined;\n if (!normalizedSum && !normalizedAvg) {\n return null;\n }\n if (normalizedSum && normalizedAvg && normalizedSum !== normalizedAvg) {\n throw new PmCliError(\"Aggregate --sum and --avg must target the same numeric field\", EXIT_CODE.USAGE);\n }\n return {\n field: normalizedSum ?? normalizedAvg!,\n sum: normalizedSum !== undefined,\n avg: normalizedAvg !== undefined,\n };\n}\n\nfunction parseGroupBy(raw: string | undefined): AggregateGroupField[] {\n const value = raw?.trim() ?? \"status\";\n if (value.length === 0) {\n throw new PmCliError(\"--group-by requires at least one field name\", EXIT_CODE.USAGE);\n }\n const requested = splitCommaList(value);\n if (requested.length === 0) {\n throw new PmCliError(\"--group-by requires a comma-separated list of fields\", EXIT_CODE.USAGE);\n }\n for (const field of requested) {\n if (!AGGREGATE_GROUP_FIELDS.includes(field as AggregateGroupField)) {\n throw new PmCliError(\n `Aggregate group fields must be one of ${AGGREGATE_GROUP_FIELDS.join(\"|\")}; received \"${field}\"`,\n EXIT_CODE.USAGE,\n );\n }\n }\n return requested as AggregateGroupField[];\n}\n\nfunction normalizeTagGroupValue(tags: string[]): string | null {\n const normalized = [...new Set(tags.map((tag) => tag.trim().toLowerCase()).filter((tag) => tag.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n if (normalized.length === 0) {\n return null;\n }\n return normalized.join(\",\");\n}\n\nfunction resolveGroupValue(field: AggregateGroupField, item: AggregateListedItem): AggregateGroupValue {\n switch (field) {\n case \"parent\":\n return item.parent ?? null;\n case \"type\":\n return item.type;\n case \"priority\":\n return item.priority;\n case \"status\":\n return item.status;\n case \"assignee\":\n return item.assignee ?? null;\n case \"tags\":\n return normalizeTagGroupValue(item.tags);\n case \"sprint\":\n return item.sprint ?? null;\n case \"release\":\n return item.release ?? null;\n default:\n return null;\n }\n}\n\nfunction compareNullableGroupValue(left: AggregateGroupValue | undefined, right: AggregateGroupValue | undefined): number {\n const leftValue = left ?? null;\n const rightValue = right ?? null;\n if (leftValue === rightValue) {\n return 0;\n }\n if (leftValue === null) {\n return 1;\n }\n if (rightValue === null) {\n return -1;\n }\n if (typeof leftValue === \"number\" && typeof rightValue === \"number\") {\n return leftValue - rightValue;\n }\n return String(leftValue).localeCompare(String(rightValue));\n}\n\nfunction buildGroupKey(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n return groupBy.map((field) => `${field}:${JSON.stringify(group[field] ?? null)}`).join(\"|\");\n}\n\n/** Explicit display label for an empty/blank group value, keyed by dimension. */\nconst EMPTY_AGGREGATE_GROUP_LABELS: Record<AggregateGroupField, string> = {\n parent: \"(unparented)\",\n type: \"(untyped)\",\n priority: \"(no priority)\",\n status: \"(no status)\",\n assignee: \"(unassigned)\",\n tags: \"(untagged)\",\n sprint: \"(no sprint)\",\n release: \"(no release)\",\n};\n\n/** Render a single group field's value, substituting an explicit label for null. */\nfunction formatGroupFieldLabel(field: AggregateGroupField, value: AggregateGroupValue | undefined): string {\n if (value === null || value === undefined || value === \"\") {\n return EMPTY_AGGREGATE_GROUP_LABELS[field];\n }\n return String(value);\n}\n\n/**\n * Build the human-readable label for an aggregate row. Single-field grouping\n * yields the bare (possibly substituted) value; multi-field grouping joins each\n * \"field=value\" pair so composite groups stay unambiguous.\n */\nfunction buildGroupLabel(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n if (groupBy.length === 1) {\n return formatGroupFieldLabel(groupBy[0], group[groupBy[0]]);\n }\n return groupBy.map((field) => `${field}=${formatGroupFieldLabel(field, group[field])}`).join(\" | \");\n}\n\nfunction compareAggregateRows(\n left: AggregateRow,\n right: AggregateRow,\n groupBy: AggregateGroupField[],\n): number {\n for (const field of groupBy) {\n const byField = compareNullableGroupValue(left.group[field], right.group[field]);\n if (byField !== 0) {\n return byField;\n }\n }\n return 0;\n}\n\nfunction readNumericAggregateValue(item: AggregateListedItem, field: string): number | null {\n const source = item as unknown as Record<string, unknown>;\n const raw = source[field];\n if (typeof raw === \"number\" && Number.isFinite(raw)) {\n return raw;\n }\n if (typeof raw === \"string\") {\n const trimmed = raw.trim();\n if (trimmed.length === 0) {\n return null;\n }\n const parsed = Number(trimmed);\n if (Number.isFinite(parsed)) {\n return parsed;\n }\n }\n return null;\n}\n\ninterface AggregateAccumulator {\n /** group_label is derived once at finalization, so the accumulator omits it. */\n row: Omit<AggregateRow, \"group_label\">;\n numeric_count: number;\n numeric_sum: number;\n null_count: number;\n open_count: number;\n in_progress_count: number;\n closed_count: number;\n other_count: number;\n}\n\nfunction completionPct(closed: number, total: number): number {\n if (total <= 0) {\n return 0;\n }\n return Math.round((closed / total) * 10000) / 100;\n}\n\nfunction updateCompletionCounts(accumulator: AggregateAccumulator, status: ItemStatus, statusRegistry: RuntimeStatusRegistry): void {\n const normalizedStatus = normalizeStatusInput(String(status), statusRegistry) ?? status;\n if (normalizedStatus === statusRegistry.open_status) {\n accumulator.open_count += 1;\n return;\n }\n if (normalizedStatus === \"in_progress\" || (statusRegistry.active_statuses.has(normalizedStatus) && normalizedStatus !== statusRegistry.open_status)) {\n accumulator.in_progress_count += 1;\n return;\n }\n if (statusRegistry.terminal_done_statuses.has(normalizedStatus) || normalizedStatus === statusRegistry.close_status) {\n accumulator.closed_count += 1;\n return;\n }\n accumulator.other_count += 1;\n}\n\nfunction createAggregateAccumulator(\n group: AggregateGroupRecord,\n numericValue: number | null,\n): AggregateAccumulator {\n return {\n row: {\n group,\n count: 1,\n },\n numeric_count: numericValue === null ? 0 : 1,\n numeric_sum: numericValue ?? 0,\n null_count: numericValue === null ? 1 : 0,\n open_count: 0,\n in_progress_count: 0,\n closed_count: 0,\n other_count: 0,\n };\n}\n\nfunction updateNumericAggregation(accumulator: AggregateAccumulator, numericValue: number | null): void {\n if (numericValue === null) {\n accumulator.null_count += 1;\n return;\n }\n accumulator.numeric_count += 1;\n accumulator.numeric_sum += numericValue;\n}\n\nfunction updateAggregateAccumulator(params: {\n accumulator: AggregateAccumulator;\n item: AggregateListedItem;\n statusRegistry: RuntimeStatusRegistry;\n includeCompletion: boolean;\n numericAggregation: NumericAggregation | null;\n numericValue: number | null;\n}): void {\n params.accumulator.row.count += 1;\n if (params.includeCompletion) {\n updateCompletionCounts(params.accumulator, params.item.status, params.statusRegistry);\n }\n if (params.numericAggregation !== null) {\n updateNumericAggregation(params.accumulator, params.numericValue);\n }\n}\n\nfunction buildAggregateGroup(groupBy: AggregateGroupField[], item: AggregateListedItem): AggregateGroupRecord {\n const group: AggregateGroupRecord = {};\n for (const field of groupBy) {\n group[field] = resolveGroupValue(field, item);\n }\n return group;\n}\n\nfunction finalizeAggregateRow(\n entry: AggregateAccumulator,\n groupBy: AggregateGroupField[],\n includeCompletion: boolean,\n numericAggregation: NumericAggregation | null,\n): AggregateRow {\n const row: AggregateRow = {\n ...entry.row,\n group_label: buildGroupLabel(groupBy, entry.row.group),\n };\n if (includeCompletion) {\n row.open = entry.open_count;\n row.in_progress = entry.in_progress_count;\n row.closed = entry.closed_count;\n row.other = entry.other_count;\n row.completion_pct = completionPct(entry.closed_count, entry.row.count);\n }\n if (numericAggregation !== null) {\n row.null_count = entry.null_count;\n if (numericAggregation.sum) {\n row.sum = entry.numeric_sum;\n }\n if (numericAggregation.avg) {\n row.avg = entry.numeric_count === 0 ? null : entry.numeric_sum / entry.numeric_count;\n }\n }\n return row;\n}\n\nfunction buildAggregateFilters(params: {\n groupBy: AggregateGroupField[];\n includeCompletion: boolean;\n includeUnparented: boolean;\n status: ItemStatus | undefined;\n options: AggregateOptions;\n numericAggregation: NumericAggregation | null;\n}): AggregateResult[\"filters\"] {\n return {\n group_by: params.groupBy,\n count: true,\n completion: params.includeCompletion,\n include_unparented: params.includeUnparented,\n status: params.status ?? null,\n type: params.options.type ?? null,\n tag: params.options.tag ?? null,\n priority: params.options.priority ?? null,\n deadline_before: params.options.deadlineBefore ?? null,\n deadline_after: params.options.deadlineAfter ?? null,\n assignee: params.options.assignee ?? null,\n assignee_filter: params.options.assigneeFilter ?? null,\n parent: params.options.parent ?? null,\n sprint: params.options.sprint ?? null,\n release: params.options.release ?? null,\n ...(params.numericAggregation !== null\n ? {\n sum: params.options.sum ?? null,\n avg: params.options.avg ?? null,\n numeric_field: params.numericAggregation.field,\n }\n : {}),\n };\n}\n\n/**\n * Implements run aggregate for the public runtime surface of this module.\n */\nexport async function runAggregate(options: AggregateOptions, global: GlobalOptions): Promise<AggregateResult> {\n if (options.count === false) {\n throw new PmCliError(\"Aggregate grouped counts are always enabled; omit count=false.\", EXIT_CODE.USAGE);\n }\n\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const groupBy = parseGroupBy(options.groupBy);\n const status = parseStatus(options.status, statusRegistry);\n const numericAggregation = parseNumericAggregation(options);\n const includeCompletion = options.completion === true;\n const includeUnparented = options.includeUnparented === true;\n\n const listed = await runList(\n status,\n buildListQueryFilters(options),\n global,\n );\n\n const grouped = new Map<string, AggregateAccumulator>();\n let skippedUnparented = 0;\n let groupedItemCount = 0;\n\n for (const listedItem of listed.items) {\n const item = listedItem as AggregateListedItem;\n const group = buildAggregateGroup(groupBy, item);\n if (groupBy.includes(\"parent\") && group.parent === null && !includeUnparented) {\n skippedUnparented += 1;\n continue;\n }\n const key = buildGroupKey(groupBy, group);\n const existing = grouped.get(key);\n const numericValue =\n numericAggregation === null\n ? null\n : readNumericAggregateValue(item, numericAggregation.field);\n if (existing) {\n updateAggregateAccumulator({\n accumulator: existing,\n item,\n statusRegistry,\n includeCompletion,\n numericAggregation,\n numericValue,\n });\n } else {\n const accumulator = createAggregateAccumulator(group, numericValue);\n if (includeCompletion) {\n updateCompletionCounts(accumulator, item.status, statusRegistry);\n }\n grouped.set(key, accumulator);\n }\n groupedItemCount += 1;\n }\n\n const groups = [...grouped.values()]\n .map((entry) => finalizeAggregateRow(entry, groupBy, includeCompletion, numericAggregation))\n .sort((left, right) => compareAggregateRows(left, right, groupBy));\n const warnings = listed.warnings && listed.warnings.length > 0 ? listed.warnings : undefined;\n\n return {\n groups,\n count: groups.length,\n totals: {\n items_considered: listed.items.length,\n items_grouped: groupedItemCount,\n items_skipped_unparented: skippedUnparented,\n },\n filters: buildAggregateFilters({ groupBy, includeCompletion, includeUnparented, status, options, numericAggregation }),\n now: nowIso(),\n ...(warnings ? { warnings } : {}),\n };\n}\n\nexport const _testOnlyAggregateCommand = {\n buildGroupKey,\n compareAggregateRows,\n compareNullableGroupValue,\n completionPct,\n normalizeTagGroupValue,\n parseGroupBy,\n parseNumericAggregation,\n parseStatus,\n readNumericAggregateValue,\n resolveGroupValue,\n updateCompletionCounts,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAM,yBAAgD;EACpD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAoFF,SAAS,YAAY,KAAyB,gBAAqC;AACjF,QAAM,WAAW,qBAAqB,KAAK,gBAAgB,EAAE,QAAQ,MAAM,WAAW,WAAU,CAAE;AAClG,MAAI,CAAC,YAAY,SAAS,WAAW,GAAG;AACtC,WAAO;EACT;AACA,MAAI,SAAS,SAAS,GAAG;AACvB,UAAM,IAAI,WACR,4EACA,UAAU,KAAK;EAEnB;AACA,SAAO,SAAS,CAAC;AACnB;AAQA,SAAS,wBAAwB,SAAyB;AACxD,QAAM,WAAW,QAAQ,KAAK,KAAI;AAClC,QAAM,WAAW,QAAQ,KAAK,KAAI;AAClC,QAAM,gBAAgB,YAAY,SAAS,SAAS,IAAI,WAAW;AACnE,QAAM,gBAAgB,YAAY,SAAS,SAAS,IAAI,WAAW;AACnE,MAAI,CAAC,iBAAiB,CAAC,eAAe;AACpC,WAAO;EACT;AACA,MAAI,iBAAiB,iBAAiB,kBAAkB,eAAe;AACrE,UAAM,IAAI,WAAW,gEAAgE,UAAU,KAAK;EACtG;AACA,SAAO;IACL,OAAO,iBAAiB;IACxB,KAAK,kBAAkB;IACvB,KAAK,kBAAkB;;AAE3B;AAEA,SAAS,aAAa,KAAuB;AAC3C,QAAM,QAAQ,KAAK,KAAI,KAAM;AAC7B,MAAI,MAAM,WAAW,GA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;EACtB;AAEA,QAAM,SAAS,CAAC,GAAG,QAAQ,OAAM,CAAE,EAChC,IAAI,CAAC,UAAU,qBAAqB,OAAO,SAAS,mBAAmB,kBAAkB,CAAC,EAC1F,KAAK,CAAC,MAAM,UAAU,qBAAqB,MAAM,OAAO,OAAO,CAAC;AACnE,QAAM,WAAW,OAAO,YAAY,OAAO,SAAS,SAAS,IAAI,OAAO,WAAW;AAEnF,SAAO;IACL;IACA,OAAO,OAAO;IACd,QAAQ;MACN,kBAAkB,OAAO,MAAM;MAC/B,eAAe;MACf,0BAA0B;;IAE5B,SAAS,sBAAsB,EAAE,SAAS,mBAAmB,mBAAmB,QAAQ,SAAS,mBAAkB,CAAE;IACrH,KAAK,OAAM;IACX,GAAI,WAAW,EAAE,SAAQ,IAAK,CAAA;;AAElC;AAEO,IAAM,4BAA4B;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA","debugId":"adc587ef-dde4-5305-a38b-45a4831234c2"}
1
+ {"version":3,"sources":["../../../../../../../../cli/commands/aggregate.ts"],"sourcesContent":["/**\n * @module cli/commands/aggregate\n *\n * Implements the pm aggregate command surface and its agent-facing runtime behavior.\n */\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../core/shared/split-comma-list.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { normalizeStatusInput } from \"../../core/item/status.js\";\nimport { parseStatusFilterCsv } from \"../../core/item/status-filter.js\";\nimport { resolveRuntimeStatusRegistry, type RuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { type ItemStatus } from \"../../types/index.js\";\nimport { buildListQueryFilters } from \"./list-filter-shared.js\";\nimport { runList } from \"./list.js\";\n\ntype AggregateGroupField = \"parent\" | \"type\" | \"priority\" | \"status\" | \"assignee\" | \"tags\" | \"sprint\" | \"release\";\ntype AggregateGroupValue = string | number | null;\ntype AggregateGroupRecord = Partial<Record<AggregateGroupField, AggregateGroupValue>>;\ntype AggregateListedItem = {\n type: string;\n status: ItemStatus;\n priority: number;\n parent?: string;\n assignee?: string;\n tags: string[];\n sprint?: string;\n release?: string;\n};\n\nconst AGGREGATE_GROUP_FIELDS: AggregateGroupField[] = [\n \"parent\",\n \"type\",\n \"priority\",\n \"status\",\n \"assignee\",\n \"tags\",\n \"sprint\",\n \"release\",\n];\n\n/**\n * Documents the aggregate options payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateOptions {\n groupBy?: string;\n count?: boolean;\n completion?: boolean;\n sum?: string;\n avg?: string;\n includeUnparented?: boolean;\n status?: string;\n type?: string;\n tag?: string;\n priority?: string;\n deadlineBefore?: string;\n deadlineAfter?: string;\n assignee?: string;\n assigneeFilter?: string;\n parent?: string;\n sprint?: string;\n release?: string;\n}\n\n/**\n * Documents the aggregate row payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateRow {\n group: AggregateGroupRecord;\n /**\n * Human-readable display label for this group. Blank/null group values render\n * with an explicit \"(unassigned)\"-style label (per dimension) so terminal and\n * grep-based consumers are never faced with an ambiguous empty key. The\n * structured `group` record keeps the raw null for machine consumers.\n */\n group_label: string;\n count: number;\n open?: number;\n in_progress?: number;\n closed?: number;\n other?: number;\n completion_pct?: number;\n null_count?: number;\n sum?: number | null;\n avg?: number | null;\n}\n\n/**\n * Documents the aggregate result payload exchanged by command, SDK, and package integrations.\n */\nexport interface AggregateResult {\n groups: AggregateRow[];\n count: number;\n totals: {\n items_considered: number;\n items_grouped: number;\n items_skipped_unparented: number;\n };\n filters: {\n group_by: AggregateGroupField[];\n count: boolean;\n completion: boolean;\n sum?: string | null;\n avg?: string | null;\n numeric_field?: string | null;\n include_unparented: boolean;\n status: ItemStatus | null;\n type: string | null;\n tag: string | null;\n priority: string | null;\n deadline_before: string | null;\n deadline_after: string | null;\n assignee: string | null;\n assignee_filter: string | null;\n parent: string | null;\n sprint: string | null;\n release: string | null;\n };\n now: string;\n warnings?: string[];\n}\n\nfunction parseStatus(raw: string | undefined, statusRegistry: RuntimeStatusRegistry): ItemStatus | undefined {\n const statuses = parseStatusFilterCsv(raw, statusRegistry, { strict: true, flagLabel: \"--status\" });\n if (!statuses || statuses.length === 0) {\n return undefined;\n }\n if (statuses.length > 1) {\n throw new PmCliError(\n 'Aggregate --status accepts one status, or the standalone \"all\" sentinel.',\n EXIT_CODE.USAGE,\n );\n }\n return statuses[0];\n}\n\ninterface NumericAggregation {\n field: string;\n sum: boolean;\n avg: boolean;\n}\n\nfunction parseNumericAggregation(options: AggregateOptions): NumericAggregation | null {\n const sumField = options.sum?.trim();\n const avgField = options.avg?.trim();\n const normalizedSum = sumField && sumField.length > 0 ? sumField : undefined;\n const normalizedAvg = avgField && avgField.length > 0 ? avgField : undefined;\n if (!normalizedSum && !normalizedAvg) {\n return null;\n }\n if (normalizedSum && normalizedAvg && normalizedSum !== normalizedAvg) {\n throw new PmCliError(\"Aggregate --sum and --avg must target the same numeric field\", EXIT_CODE.USAGE);\n }\n return {\n field: normalizedSum ?? normalizedAvg!,\n sum: normalizedSum !== undefined,\n avg: normalizedAvg !== undefined,\n };\n}\n\nfunction parseGroupBy(raw: string | undefined): AggregateGroupField[] {\n const value = raw?.trim() ?? \"status\";\n if (value.length === 0) {\n throw new PmCliError(\"--group-by requires at least one field name\", EXIT_CODE.USAGE);\n }\n const requested = splitCommaList(value);\n if (requested.length === 0) {\n throw new PmCliError(\"--group-by requires a comma-separated list of fields\", EXIT_CODE.USAGE);\n }\n for (const field of requested) {\n if (!AGGREGATE_GROUP_FIELDS.includes(field as AggregateGroupField)) {\n throw new PmCliError(\n `Aggregate group fields must be one of ${AGGREGATE_GROUP_FIELDS.join(\"|\")}; received \"${field}\"`,\n EXIT_CODE.USAGE,\n );\n }\n }\n return requested as AggregateGroupField[];\n}\n\nfunction normalizeTagGroupValue(tags: string[]): string | null {\n const normalized = [...new Set(tags.map((tag) => tag.trim().toLowerCase()).filter((tag) => tag.length > 0))].sort((left, right) =>\n left.localeCompare(right),\n );\n if (normalized.length === 0) {\n return null;\n }\n return normalized.join(\",\");\n}\n\nfunction resolveGroupValue(field: AggregateGroupField, item: AggregateListedItem): AggregateGroupValue {\n switch (field) {\n case \"parent\":\n return item.parent ?? null;\n case \"type\":\n return item.type;\n case \"priority\":\n return item.priority;\n case \"status\":\n return item.status;\n case \"assignee\":\n return item.assignee ?? null;\n case \"tags\":\n return normalizeTagGroupValue(item.tags);\n case \"sprint\":\n return item.sprint ?? null;\n case \"release\":\n return item.release ?? null;\n default:\n return null;\n }\n}\n\nfunction compareNullableGroupValue(left: AggregateGroupValue | undefined, right: AggregateGroupValue | undefined): number {\n const leftValue = left ?? null;\n const rightValue = right ?? null;\n if (leftValue === rightValue) {\n return 0;\n }\n if (leftValue === null) {\n return 1;\n }\n if (rightValue === null) {\n return -1;\n }\n if (typeof leftValue === \"number\" && typeof rightValue === \"number\") {\n return leftValue - rightValue;\n }\n return String(leftValue).localeCompare(String(rightValue));\n}\n\nfunction buildGroupKey(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n return groupBy.map((field) => `${field}:${JSON.stringify(group[field] ?? null)}`).join(\"|\");\n}\n\n/** Explicit display label for an empty/blank group value, keyed by dimension. */\nconst EMPTY_AGGREGATE_GROUP_LABELS: Record<AggregateGroupField, string> = {\n parent: \"(unparented)\",\n type: \"(untyped)\",\n priority: \"(no priority)\",\n status: \"(no status)\",\n assignee: \"(unassigned)\",\n tags: \"(untagged)\",\n sprint: \"(no sprint)\",\n release: \"(no release)\",\n};\n\n/** Render a single group field's value, substituting an explicit label for null. */\nfunction formatGroupFieldLabel(field: AggregateGroupField, value: AggregateGroupValue | undefined): string {\n if (value === null || value === undefined || value === \"\") {\n return EMPTY_AGGREGATE_GROUP_LABELS[field];\n }\n return String(value);\n}\n\n/**\n * Build the human-readable label for an aggregate row. Single-field grouping\n * yields the bare (possibly substituted) value; multi-field grouping joins each\n * \"field=value\" pair so composite groups stay unambiguous.\n */\nfunction buildGroupLabel(groupBy: AggregateGroupField[], group: AggregateGroupRecord): string {\n if (groupBy.length === 1) {\n return formatGroupFieldLabel(groupBy[0], group[groupBy[0]]);\n }\n return groupBy.map((field) => `${field}=${formatGroupFieldLabel(field, group[field])}`).join(\" | \");\n}\n\nfunction compareAggregateRows(\n left: AggregateRow,\n right: AggregateRow,\n groupBy: AggregateGroupField[],\n): number {\n for (const field of groupBy) {\n const byField = compareNullableGroupValue(left.group[field], right.group[field]);\n if (byField !== 0) {\n return byField;\n }\n }\n return 0;\n}\n\nfunction readNumericAggregateValue(item: AggregateListedItem, field: string): number | null {\n const source = item as unknown as Record<string, unknown>;\n const raw = source[field];\n if (typeof raw === \"number\" && Number.isFinite(raw)) {\n return raw;\n }\n if (typeof raw === \"string\") {\n const trimmed = raw.trim();\n if (trimmed.length === 0) {\n return null;\n }\n const parsed = Number(trimmed);\n if (Number.isFinite(parsed)) {\n return parsed;\n }\n }\n return null;\n}\n\ninterface AggregateAccumulator {\n /** group_label is derived once at finalization, so the accumulator omits it. */\n row: Omit<AggregateRow, \"group_label\">;\n numeric_count: number;\n numeric_sum: number;\n null_count: number;\n open_count: number;\n in_progress_count: number;\n closed_count: number;\n other_count: number;\n}\n\nfunction completionPct(closed: number, total: number): number {\n if (total <= 0) {\n return 0;\n }\n return Math.round((closed / total) * 10000) / 100;\n}\n\nfunction updateCompletionCounts(accumulator: AggregateAccumulator, status: ItemStatus, statusRegistry: RuntimeStatusRegistry): void {\n const normalizedStatus = normalizeStatusInput(String(status), statusRegistry) ?? status;\n if (normalizedStatus === statusRegistry.open_status) {\n accumulator.open_count += 1;\n return;\n }\n if (normalizedStatus === \"in_progress\" || (statusRegistry.active_statuses.has(normalizedStatus) && normalizedStatus !== statusRegistry.open_status)) {\n accumulator.in_progress_count += 1;\n return;\n }\n if (statusRegistry.terminal_done_statuses.has(normalizedStatus) || normalizedStatus === statusRegistry.close_status) {\n accumulator.closed_count += 1;\n return;\n }\n accumulator.other_count += 1;\n}\n\nfunction createAggregateAccumulator(\n group: AggregateGroupRecord,\n numericValue: number | null,\n): AggregateAccumulator {\n return {\n row: {\n group,\n count: 1,\n },\n numeric_count: numericValue === null ? 0 : 1,\n numeric_sum: numericValue ?? 0,\n null_count: numericValue === null ? 1 : 0,\n open_count: 0,\n in_progress_count: 0,\n closed_count: 0,\n other_count: 0,\n };\n}\n\nfunction updateNumericAggregation(accumulator: AggregateAccumulator, numericValue: number | null): void {\n if (numericValue === null) {\n accumulator.null_count += 1;\n return;\n }\n accumulator.numeric_count += 1;\n accumulator.numeric_sum += numericValue;\n}\n\nfunction updateAggregateAccumulator(params: {\n accumulator: AggregateAccumulator;\n item: AggregateListedItem;\n statusRegistry: RuntimeStatusRegistry;\n includeCompletion: boolean;\n numericAggregation: NumericAggregation | null;\n numericValue: number | null;\n}): void {\n params.accumulator.row.count += 1;\n if (params.includeCompletion) {\n updateCompletionCounts(params.accumulator, params.item.status, params.statusRegistry);\n }\n if (params.numericAggregation !== null) {\n updateNumericAggregation(params.accumulator, params.numericValue);\n }\n}\n\nfunction buildAggregateGroup(groupBy: AggregateGroupField[], item: AggregateListedItem): AggregateGroupRecord {\n const group: AggregateGroupRecord = {};\n for (const field of groupBy) {\n group[field] = resolveGroupValue(field, item);\n }\n return group;\n}\n\nfunction finalizeAggregateRow(\n entry: AggregateAccumulator,\n groupBy: AggregateGroupField[],\n includeCompletion: boolean,\n numericAggregation: NumericAggregation | null,\n): AggregateRow {\n const row: AggregateRow = {\n ...entry.row,\n group_label: buildGroupLabel(groupBy, entry.row.group),\n };\n if (includeCompletion) {\n row.open = entry.open_count;\n row.in_progress = entry.in_progress_count;\n row.closed = entry.closed_count;\n row.other = entry.other_count;\n row.completion_pct = completionPct(entry.closed_count, entry.row.count);\n }\n if (numericAggregation !== null) {\n row.null_count = entry.null_count;\n if (numericAggregation.sum) {\n row.sum = entry.numeric_sum;\n }\n if (numericAggregation.avg) {\n row.avg = entry.numeric_count === 0 ? null : entry.numeric_sum / entry.numeric_count;\n }\n }\n return row;\n}\n\nfunction buildAggregateFilters(params: {\n groupBy: AggregateGroupField[];\n includeCompletion: boolean;\n includeUnparented: boolean;\n status: ItemStatus | undefined;\n options: AggregateOptions;\n numericAggregation: NumericAggregation | null;\n}): AggregateResult[\"filters\"] {\n return {\n group_by: params.groupBy,\n count: true,\n completion: params.includeCompletion,\n include_unparented: params.includeUnparented,\n status: params.status ?? null,\n type: params.options.type ?? null,\n tag: params.options.tag ?? null,\n priority: params.options.priority ?? null,\n deadline_before: params.options.deadlineBefore ?? null,\n deadline_after: params.options.deadlineAfter ?? null,\n assignee: params.options.assignee ?? null,\n assignee_filter: params.options.assigneeFilter ?? null,\n parent: params.options.parent ?? null,\n sprint: params.options.sprint ?? null,\n release: params.options.release ?? null,\n ...(params.numericAggregation !== null\n ? {\n sum: params.options.sum ?? null,\n avg: params.options.avg ?? null,\n numeric_field: params.numericAggregation.field,\n }\n : {}),\n };\n}\n\n/**\n * Implements run aggregate for the public runtime surface of this module.\n */\nexport async function runAggregate(options: AggregateOptions, global: GlobalOptions): Promise<AggregateResult> {\n if (options.count === false) {\n throw new PmCliError(\"Aggregate grouped counts are always enabled; omit count=false.\", EXIT_CODE.USAGE);\n }\n\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const groupBy = parseGroupBy(options.groupBy);\n const status = parseStatus(options.status, statusRegistry);\n const numericAggregation = parseNumericAggregation(options);\n const includeCompletion = options.completion === true;\n const includeUnparented = options.includeUnparented === true;\n\n const listed = await runList(\n status,\n buildListQueryFilters(options),\n global,\n );\n\n const grouped = new Map<string, AggregateAccumulator>();\n let skippedUnparented = 0;\n let groupedItemCount = 0;\n\n for (const listedItem of listed.items) {\n const item = listedItem as AggregateListedItem;\n const group = buildAggregateGroup(groupBy, item);\n if (groupBy.includes(\"parent\") && group.parent === null && !includeUnparented) {\n skippedUnparented += 1;\n continue;\n }\n const key = buildGroupKey(groupBy, group);\n const existing = grouped.get(key);\n const numericValue =\n numericAggregation === null\n ? null\n : readNumericAggregateValue(item, numericAggregation.field);\n if (existing) {\n updateAggregateAccumulator({\n accumulator: existing,\n item,\n statusRegistry,\n includeCompletion,\n numericAggregation,\n numericValue,\n });\n } else {\n const accumulator = createAggregateAccumulator(group, numericValue);\n if (includeCompletion) {\n updateCompletionCounts(accumulator, item.status, statusRegistry);\n }\n grouped.set(key, accumulator);\n }\n groupedItemCount += 1;\n }\n\n const groups = [...grouped.values()]\n .map((entry) => finalizeAggregateRow(entry, groupBy, includeCompletion, numericAggregation))\n .sort((left, right) => compareAggregateRows(left, right, groupBy));\n const warnings = listed.warnings && listed.warnings.length > 0 ? listed.warnings : undefined;\n\n return {\n groups,\n count: groups.length,\n totals: {\n items_considered: listed.items.length,\n items_grouped: groupedItemCount,\n items_skipped_unparented: skippedUnparented,\n },\n filters: buildAggregateFilters({ groupBy, includeCompletion, includeUnparented, status, options, numericAggregation }),\n now: nowIso(),\n ...(warnings ? { warnings } : {}),\n };\n}\n\nexport const _testOnlyAggregateCommand = {\n buildGroupKey,\n compareAggregateRows,\n compareNullableGroupValue,\n completionPct,\n normalizeTagGroupValue,\n parseGroupBy,\n parseNumericAggregation,\n parseStatus,\n readNumericAggregateValue,\n resolveGroupValue,\n updateCompletionCounts,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAM,yBAAgD;EACpD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAoFF,SAAS,YAAY,KAAyB,gBAAqC;AACjF,QAAM,WAAW,qBAAqB,KAAK,gBAAgB,EAAE,QAAQ,MAAM,WAAW,WAAU,CAAE;AAClG,MAAI,CAAC,YAAY,SAAS,WAAW,GAAG;AACtC,WAAO;EACT;AACA,MAAI,SAAS,SA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+3,24 @@ import {
3
3
  } from "./chunk-WW4E2DC3.js";
4
4
  import {
5
5
  createStdinTokenResolver
6
- } from "./chunk-N2LOJUBB.js";
6
+ } from "./chunk-T3ABIMGW.js";
7
7
  import {
8
8
  mutateItem,
9
9
  toItemRecord
10
- } from "./chunk-CN4OAA2G.js";
11
- import "./chunk-CQFZRLXQ.js";
12
- import "./chunk-MZG6I2Q2.js";
10
+ } from "./chunk-3U3VEWK6.js";
11
+ import "./chunk-EZFKWSC7.js";
12
+ import "./chunk-DRBV5UC2.js";
13
13
  import {
14
- EXIT_CODE,
15
14
  PmCliError,
15
+ readSettings
16
+ } from "./chunk-P5YORJRH.js";
17
+ import "./chunk-7C2O74AE.js";
18
+ import {
19
+ EXIT_CODE,
16
20
  getSettingsPath,
17
21
  pathExists,
18
- readSettings,
19
22
  resolvePmRoot
20
- } from "./chunk-BDDYM4LH.js";
23
+ } from "./chunk-5VVUKE3U.js";
21
24
 
22
25
  // dist/cli/commands/append.js
23
26
  !(function() {
@@ -67,4 +70,4 @@ async function runAppend(id, options, global2) {
67
70
  export {
68
71
  runAppend
69
72
  };
70
- //# sourceMappingURL=append-XLEKVVWB.js.map
73
+ //# sourceMappingURL=append-CZGUZ45Q.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../cli/commands/append.ts"],
4
4
  "sourcesContent": ["/**\n * @module cli/commands/append\n *\n * Implements the pm append command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { createStdinTokenResolver } from \"../../core/item/parse.js\";\nimport { mutateItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\n\n/**\n * Documents the append command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface AppendCommandOptions {\n body: string;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the append result payload exchanged by command, SDK, and package integrations.\n */\nexport interface AppendResult {\n item: Record<string, unknown>;\n appended: string;\n changed_fields: string[];\n}\n\n\n/**\n * Implements run append for the public runtime surface of this module.\n */\nexport async function runAppend(id: string, options: AppendCommandOptions, global: GlobalOptions): Promise<AppendResult> {\n if (options.body === undefined) {\n throw new PmCliError(\"Missing required --body text\", EXIT_CODE.USAGE);\n }\n const stdinResolver = createStdinTokenResolver();\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 author = resolveAuthor(options.author, settings.author_default);\n // options.body is guaranteed defined by the guard above, so resolveValue returns a defined string.\n const bodyInput = await stdinResolver.resolveValue(options.body, \"--body\");\n const appended = (bodyInput as string).trim();\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"append\",\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n if (appended.length === 0) {\n return { changedFields: [] };\n }\n const spacer = document.body.trim().length > 0 ? \"\\n\\n\" : \"\";\n document.body = `${document.body.replace(/\\s+$/, \"\")}${spacer}${appended}\\n`;\n return { changedFields: [\"body\"] };\n },\n });\n\n return {\n item: toItemRecord(result.item),\n appended: appended.length > 0 ? appended : \"\",\n changed_fields: result.changedFields,\n };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,eAAsB,UAAU,IAAY,SAA+BA,SAAqB;AAC9F,MAAI,QAAQ,SAAS,QAAW;AAC9B,UAAM,IAAI,WAAW,gCAAgC,UAAU,KAAK;EACtE;AACA,QAAM,gBAAgB,yBAAwB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SAAS;EACzG;AACA,QAAM,WAAW,MAAM,aAAa,MAAM;AAC1C,QAAM,SAAS,cAAc,QAAQ,QAAQ,SAAS,cAAc;AAEpE,QAAM,YAAY,MAAM,cAAc,aAAa,QAAQ,MAAM,QAAQ;AACzE,QAAM,WAAY,UAAqB,KAAI;AAE3C,QAAM,SAAS,MAAM,WAAW;IAC9B;IACA;IACA;IACA,IAAI;IACJ;IACA,SAAS,QAAQ;IACjB,OAAO,QAAQ;IACf,OAAO,UAAQ;AACb,UAAI,SAAS,WAAW,GAAG;AACzB,eAAO,EAAE,eAAe,CAAA,EAAE;MAC5B;AACA,YAAM,SAAS,SAAS,KAAK,KAAI,EAAG,SAAS,IAAI,SAAS;AAC1D,eAAS,OAAO,GAAG,SAAS,KAAK,QAAQ,QAAQ,EAAE,CAAC,GAAG,MAAM,GAAG,QAAQ;;AACxE,aAAO,EAAE,eAAe,CAAC,MAAM,EAAC;IAClC;GACD;AAED,SAAO;IACL,MAAM,aAAa,OAAO,IAAI;IAC9B,UAAU,SAAS,SAAS,IAAI,WAAW;IAC3C,gBAAgB,OAAO;;AAE3B;",
6
6
  "names": ["global"]
7
7
  }
@@ -1,25 +1,28 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="43ec7053-d00e-5785-bee5-b8f104fd7c09")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b2275968-ded4-5b6f-9a78-d19a208e7c43")}catch(e){}}();
3
3
  import {
4
4
  resolveAuthor
5
5
  } from "./chunk-T5RRNDA7.js";
6
6
  import {
7
7
  createStdinTokenResolver
8
- } from "./chunk-3C5T3ZEO.js";
8
+ } from "./chunk-7WYXBPYQ.js";
9
9
  import {
10
10
  mutateItem,
11
11
  toItemRecord
12
- } from "./chunk-UYLA5ROU.js";
13
- import "./chunk-AOP2EMK3.js";
14
- import "./chunk-FMWQRMHS.js";
12
+ } from "./chunk-57C2RLW5.js";
13
+ import "./chunk-HK72NWAD.js";
14
+ import "./chunk-FJRKQREY.js";
15
15
  import {
16
- EXIT_CODE,
17
16
  PmCliError,
17
+ readSettings
18
+ } from "./chunk-US3T3W5J.js";
19
+ import "./chunk-NNHHXJB2.js";
20
+ import {
21
+ EXIT_CODE,
18
22
  getSettingsPath,
19
23
  pathExists,
20
- readSettings,
21
24
  resolvePmRoot
22
- } from "./chunk-SL2ANJSV.js";
25
+ } from "./chunk-YD5FML7K.js";
23
26
 
24
27
  // dist/cli/commands/append.js
25
28
  async function runAppend(id, options, global) {
@@ -62,6 +65,6 @@ async function runAppend(id, options, global) {
62
65
  export {
63
66
  runAppend
64
67
  };
65
- //# sourceMappingURL=append-ADBOI3A6.js.map
68
+ //# sourceMappingURL=append-NSQBCXZJ.js.map
66
69
 
67
- //# debugId=43ec7053-d00e-5785-bee5-b8f104fd7c09
70
+ //# debugId=b2275968-ded4-5b6f-9a78-d19a208e7c43
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../cli/commands/append.ts"],"sourcesContent":["/**\n * @module cli/commands/append\n *\n * Implements the pm append command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { createStdinTokenResolver } from \"../../core/item/parse.js\";\nimport { mutateItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\n\n/**\n * Documents the append command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface AppendCommandOptions {\n body: string;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the append result payload exchanged by command, SDK, and package integrations.\n */\nexport interface AppendResult {\n item: Record<string, unknown>;\n appended: string;\n changed_fields: string[];\n}\n\n\n/**\n * Implements run append for the public runtime surface of this module.\n */\nexport async function runAppend(id: string, options: AppendCommandOptions, global: GlobalOptions): Promise<AppendResult> {\n if (options.body === undefined) {\n throw new PmCliError(\"Missing required --body text\", EXIT_CODE.USAGE);\n }\n const stdinResolver = createStdinTokenResolver();\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 author = resolveAuthor(options.author, settings.author_default);\n // options.body is guaranteed defined by the guard above, so resolveValue returns a defined string.\n const bodyInput = await stdinResolver.resolveValue(options.body, \"--body\");\n const appended = (bodyInput as string).trim();\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"append\",\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n if (appended.length === 0) {\n return { changedFields: [] };\n }\n const spacer = document.body.trim().length > 0 ? \"\\n\\n\" : \"\";\n document.body = `${document.body.replace(/\\s+$/, \"\")}${spacer}${appended}\\n`;\n return { changedFields: [\"body\"] };\n },\n });\n\n return {\n item: toItemRecord(result.item),\n appended: appended.length > 0 ? appended : \"\",\n changed_fields: result.changedFields,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuCA,eAAsB,UAAU,IAAY,SAA+B,QAAqB;AAC9F,MAAI,QAAQ,SAAS,QAAW;AAC9B,UAAM,IAAI,WAAW,gCAAgC,UAAU,KAAK;EACtE;AACA,QAAM,gBAAgB,yBAAwB;AAC9C,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAI,OAAO,IAAI;AACvD,MAAI,CAAE,MAAM,WAAW,gBAAgB,MAAM,CAAC,GAAI;AAChD,UAAM,IAAI,WAAW,iCAAiC,MAAM,wBAAwB,UAAU,SAAS;EACzG;AACA,QAAM,WAAW,MAAM,aAAa,MAAM;AAC1C,QAAM,SAAS,cAAc,QAAQ,QAAQ,SAAS,cAAc;AAEpE,QAAM,YAAY,MAAM,cAAc,aAAa,QAAQ,MAAM,QAAQ;AACzE,QAAM,WAAY,UAAqB,KAAI;AAE3C,QAAM,SAAS,MAAM,WAAW;IAC9B;IACA;IACA;IACA,IAAI;IACJ;IACA,SAAS,QAAQ;IACjB,OAAO,QAAQ;IACf,OAAO,UAAQ;AACb,UAAI,SAAS,WAAW,GAAG;AACzB,eAAO,EAAE,eAAe,CAAA,EAAE;MAC5B;AACA,YAAM,SAAS,SAAS,KAAK,KAAI,EAAG,SAAS,IAAI,SAAS;AAC1D,eAAS,OAAO,GAAG,SAAS,KAAK,QAAQ,QAAQ,EAAE,CAAC,GAAG,MAAM,GAAG,QAAQ;;AACxE,aAAO,EAAE,eAAe,CAAC,MAAM,EAAC;IAClC;GACD;AAED,SAAO;IACL,MAAM,aAAa,OAAO,IAAI;IAC9B,UAAU,SAAS,SAAS,IAAI,WAAW;IAC3C,gBAAgB,OAAO;;AAE3B","debugId":"43ec7053-d00e-5785-bee5-b8f104fd7c09"}
1
+ {"version":3,"sources":["../../../../../../../../cli/commands/append.ts"],"sourcesContent":["/**\n * @module cli/commands/append\n *\n * Implements the pm append command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { createStdinTokenResolver } from \"../../core/item/parse.js\";\nimport { mutateItem } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\n\n/**\n * Documents the append command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface AppendCommandOptions {\n body: string;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the append result payload exchanged by command, SDK, and package integrations.\n */\nexport interface AppendResult {\n item: Record<string, unknown>;\n appended: string;\n changed_fields: string[];\n}\n\n\n/**\n * Implements run append for the public runtime surface of this module.\n */\nexport async function runAppend(id: string, options: AppendCommandOptions, global: GlobalOptions): Promise<AppendResult> {\n if (options.body === undefined) {\n throw new PmCliError(\"Missing required --body text\", EXIT_CODE.USAGE);\n }\n const stdinResolver = createStdinTokenResolver();\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 author = resolveAuthor(options.author, settings.author_default);\n // options.body is guaranteed defined by the guard above, so resolveValue returns a defined string.\n const bodyInput = await stdinResolver.resolveValue(options.body, \"--body\");\n const appended = (bodyInput as string).trim();\n\n const result = await mutateItem({\n pmRoot,\n settings,\n id,\n op: \"append\",\n author,\n message: options.message,\n force: options.force,\n mutate(document) {\n if (appended.length === 0) {\n return { changedFields: [] };\n }\n const spacer = document.body.trim().length > 0 ? \"\\n\\n\" : \"\";\n document.body = `${document.body.replace(/\\s+$/, \"\")}${spacer}${appended}\\n`;\n return { changedFields: [\"body\"] };\n },\n });\n\n return {\n item: toItemRecord(result.item),\n appended: appended.length > 0 ? appended : \"\",\n changed_fields: result.changedFields,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,eAAsB,UAAU,IAAY,SAA+B,QAAqB;AAC9F,MAAI,QAAQ,SAAS,QAAW;AAC9B,UAAM,IAAI,WAAW,gCAAgC,UAAU,KAAK;EACtE;AACA,QAAM,gBAAgB,yBAAwB;AAC9C,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAI,OAAO,IAAI;AACvD,MAAI,CAAE,MAAM,WAAW,gBAAgB,MAAM,CAAC,GAAI;AAChD,UAAM,IAAI,WAAW,iCAAiC,MAAM,wBAAwB,UAAU,SAAS;EACzG;AACA,QAAM,WAAW,MAAM,aAAa,MAAM;AAC1C,QAAM,SAAS,cAAc,QAAQ,QAAQ,SAAS,cAAc;AAEpE,QAAM,YAAY,MAAM,cAAc,aAAa,QAAQ,MAAM,QAAQ;AACzE,QAAM,WAAY,UAAqB,KAAI;AAE3C,QAAM,SAAS,MAAM,WAAW;IAC9B;IACA;IACA;IACA,IAAI;IACJ;IACA,SAAS,QAAQ;IACjB,OAAO,QAAQ;IACf,OAAO,UAAQ;AACb,UAAI,SAAS,WAAW,GAAG;AACzB,eAAO,EAAE,eAAe,CAAA,EAAE;MAC5B;AACA,YAAM,SAAS,SAAS,KAAK,KAAI,EAAG,SAAS,IAAI,SAAS;AAC1D,eAAS,OAAO,GAAG,SAAS,KAAK,QAAQ,QAAQ,EAAE,CAAC,GAAG,MAAM,GAAG,QAAQ;;AACxE,aAAO,EAAE,eAAe,CAAC,MAAM,EAAC;IAClC;GACD;AAED,SAAO;IACL,MAAM,aAAa,OAAO,IAAI;IAC9B,UAAU,SAAS,SAAS,IAAI,WAAW;IAC3C,gBAAgB,OAAO;;AAE3B","debugId":"b2275968-ded4-5b6f-9a78-d19a208e7c43"}