@unbrained/pm-cli 2026.7.6 → 2026.7.7

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 (666) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/cli/commands/annotation-command.d.ts +1 -0
  3. package/dist/cli/commands/annotation-command.js +29 -2
  4. package/dist/cli/commands/annotation-command.js.map +1 -1
  5. package/dist/cli/commands/comments.js +3 -4
  6. package/dist/cli/commands/comments.js.map +1 -1
  7. package/dist/cli/commands/extension/bundled-catalog.d.ts +3 -0
  8. package/dist/cli/commands/extension/bundled-catalog.js +38 -28
  9. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  10. package/dist/cli/commands/extension/install-sources.js +81 -18
  11. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  12. package/dist/cli/commands/health.js +9 -5
  13. package/dist/cli/commands/health.js.map +1 -1
  14. package/dist/cli/commands/learnings.js +5 -3
  15. package/dist/cli/commands/learnings.js.map +1 -1
  16. package/dist/cli/commands/notes.js +5 -3
  17. package/dist/cli/commands/notes.js.map +1 -1
  18. package/dist/cli/commands/reindex.js +4 -3
  19. package/dist/cli/commands/reindex.js.map +1 -1
  20. package/dist/cli/commands/search.js +3 -3
  21. package/dist/cli/commands/search.js.map +1 -1
  22. package/dist/cli/commands/test.d.ts +9 -0
  23. package/dist/cli/commands/test.js +144 -105
  24. package/dist/cli/commands/test.js.map +1 -1
  25. package/dist/cli/extension-command-help.js +10 -2
  26. package/dist/cli/extension-command-help.js.map +1 -1
  27. package/dist/cli/register-list-query.d.ts +1 -1
  28. package/dist/cli/register-list-query.js +18 -27
  29. package/dist/cli/register-list-query.js.map +1 -1
  30. package/dist/cli/register-operations.d.ts +0 -8
  31. package/dist/cli/register-operations.js +41 -46
  32. package/dist/cli/register-operations.js.map +1 -1
  33. package/dist/cli/register-setup.js +113 -13
  34. package/dist/cli/register-setup.js.map +1 -1
  35. package/dist/cli/registration-helpers.d.ts +5 -1
  36. package/dist/cli/registration-helpers.js +14 -2
  37. package/dist/cli/registration-helpers.js.map +1 -1
  38. package/dist/cli-bundle/chunks/append-F7WPGIQL.js +11 -0
  39. package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js → append-PVCTBVJG.js} +8 -9
  40. package/dist/cli-bundle/chunks/{chunk-EGAP5OWD.js → chunk-2APXX4TZ.js} +16 -14
  41. package/dist/cli-bundle/chunks/chunk-2APXX4TZ.js.map +1 -0
  42. package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js → chunk-2LEJGRQ7.js} +2 -2
  43. package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js → chunk-2TILG6F2.js} +3 -3
  44. package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js → chunk-3G6UMXT3.js} +6 -8
  45. package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js.map → chunk-3G6UMXT3.js.map} +1 -1
  46. package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js → chunk-3TYOW6RR.js} +8 -8
  47. package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js → chunk-3X542TEY.js} +7 -7
  48. package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js → chunk-42LXP4VO.js} +12 -16
  49. package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js.map → chunk-42LXP4VO.js.map} +1 -1
  50. package/dist/cli-bundle/chunks/{chunk-CL36D4PC.js → chunk-43SIHQND.js} +36 -15
  51. package/dist/cli-bundle/chunks/chunk-43SIHQND.js.map +7 -0
  52. package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js → chunk-43UQN754.js} +10 -14
  53. package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js.map → chunk-43UQN754.js.map} +1 -1
  54. package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js → chunk-43YSKY75.js} +4 -6
  55. package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js.map → chunk-43YSKY75.js.map} +1 -1
  56. package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js → chunk-4BKDAEDF.js} +5 -5
  57. package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js.map → chunk-4BKDAEDF.js.map} +2 -2
  58. package/dist/cli-bundle/chunks/{chunk-4LELACOL.js → chunk-4IQKDKGE.js} +15 -23
  59. package/dist/cli-bundle/chunks/{chunk-4LELACOL.js.map → chunk-4IQKDKGE.js.map} +1 -1
  60. package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js → chunk-4MZOKTI2.js} +6 -8
  61. package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js.map → chunk-4MZOKTI2.js.map} +1 -1
  62. package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js → chunk-52NS7JDP.js} +14 -20
  63. package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js.map → chunk-52NS7JDP.js.map} +1 -1
  64. package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js → chunk-565WYS5W.js} +12 -16
  65. package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js.map → chunk-565WYS5W.js.map} +1 -1
  66. package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js → chunk-5FIQ4EX3.js} +12 -18
  67. package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js.map → chunk-5FIQ4EX3.js.map} +1 -1
  68. package/dist/cli-bundle/chunks/{chunk-DMRNBQOI.js → chunk-6G6O3OPQ.js} +256 -36
  69. package/dist/cli-bundle/chunks/chunk-6G6O3OPQ.js.map +1 -0
  70. package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js → chunk-6LCJRGPD.js} +9 -13
  71. package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js.map → chunk-6LCJRGPD.js.map} +1 -1
  72. package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js → chunk-6UQCNWFV.js} +6 -8
  73. package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js.map → chunk-6UQCNWFV.js.map} +1 -1
  74. package/dist/cli-bundle/chunks/{chunk-ZSUS2OD3.js → chunk-6XTSYPPO.js} +1216 -387
  75. package/dist/cli-bundle/chunks/chunk-6XTSYPPO.js.map +7 -0
  76. package/dist/cli-bundle/chunks/chunk-7ML7JONU.js +5434 -0
  77. package/dist/cli-bundle/chunks/chunk-7ML7JONU.js.map +1 -0
  78. package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js → chunk-7PNQA24K.js} +30 -36
  79. package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js.map → chunk-7PNQA24K.js.map} +1 -1
  80. package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js → chunk-7VQ3JJN5.js} +2 -2
  81. package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js → chunk-7Y5N34HX.js} +8 -12
  82. package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js.map → chunk-7Y5N34HX.js.map} +1 -1
  83. package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js → chunk-AGAVEDIE.js} +7 -7
  84. package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js → chunk-AJUON7E6.js} +3 -3
  85. package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js → chunk-ARKHKYYS.js} +13 -21
  86. package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js.map → chunk-ARKHKYYS.js.map} +1 -1
  87. package/dist/cli-bundle/chunks/{chunk-46CUF5L6.js → chunk-C5ACVMOI.js} +99 -51
  88. package/dist/cli-bundle/chunks/chunk-C5ACVMOI.js.map +7 -0
  89. package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js → chunk-CJQM7O7R.js} +16 -20
  90. package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js.map → chunk-CJQM7O7R.js.map} +1 -1
  91. package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js → chunk-D2DCTFTL.js} +10 -12
  92. package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js.map → chunk-D2DCTFTL.js.map} +1 -1
  93. package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js → chunk-DDDWVPID.js} +8 -10
  94. package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js.map → chunk-DDDWVPID.js.map} +1 -1
  95. package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js → chunk-DG6BSXZ7.js} +5 -5
  96. package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js.map → chunk-DG6BSXZ7.js.map} +2 -2
  97. package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js → chunk-DR2V5OIV.js} +3 -3
  98. package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js → chunk-E3LWJUGF.js} +4 -6
  99. package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js.map → chunk-E3LWJUGF.js.map} +1 -1
  100. package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js → chunk-E3YQFSFE.js} +6 -10
  101. package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js.map → chunk-E3YQFSFE.js.map} +1 -1
  102. package/dist/cli-bundle/chunks/{chunk-XG625QP4.js → chunk-EDO7VXSO.js} +2 -2
  103. package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js → chunk-EIUBK2LT.js} +12 -18
  104. package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js.map → chunk-EIUBK2LT.js.map} +1 -1
  105. package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js → chunk-EMXPI36L.js} +14 -20
  106. package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js.map → chunk-EMXPI36L.js.map} +1 -1
  107. package/dist/cli-bundle/chunks/{chunk-MLIYFOE7.js → chunk-EOUVR7JN.js} +12 -8
  108. package/dist/cli-bundle/chunks/chunk-EOUVR7JN.js.map +1 -0
  109. package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js → chunk-EVEPHNXJ.js} +4 -4
  110. package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js → chunk-F6MT7KKE.js} +4 -6
  111. package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js.map → chunk-F6MT7KKE.js.map} +1 -1
  112. package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js → chunk-F6YC2A6X.js} +7 -11
  113. package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js.map → chunk-F6YC2A6X.js.map} +1 -1
  114. package/dist/cli-bundle/chunks/chunk-FILL6BB2.js +5514 -0
  115. package/dist/cli-bundle/chunks/chunk-FILL6BB2.js.map +7 -0
  116. package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js → chunk-FN6SB4HU.js} +2 -2
  117. package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js +5359 -0
  118. package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js.map +1 -0
  119. package/dist/cli-bundle/chunks/{chunk-EKFNL33R.js → chunk-GLS6VMWI.js} +37 -16
  120. package/dist/cli-bundle/chunks/chunk-GLS6VMWI.js.map +1 -0
  121. package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js → chunk-GPIDUMMN.js} +9 -11
  122. package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js.map → chunk-GPIDUMMN.js.map} +1 -1
  123. package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js → chunk-GTM5HQL4.js} +11 -15
  124. package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js.map → chunk-GTM5HQL4.js.map} +1 -1
  125. package/dist/cli-bundle/chunks/{chunk-24YG75HI.js → chunk-H2SMKL2N.js} +8 -8
  126. package/dist/cli-bundle/chunks/{chunk-QLMX7SRD.js → chunk-HHEWQXPD.js} +6 -6
  127. package/dist/cli-bundle/chunks/chunk-HHEWQXPD.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js → chunk-HX6QXV5P.js} +2 -2
  129. package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js → chunk-I74FMIWA.js} +10 -16
  130. package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js.map → chunk-I74FMIWA.js.map} +1 -1
  131. package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js → chunk-IDIBF4E2.js} +20 -24
  132. package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js.map → chunk-IDIBF4E2.js.map} +1 -1
  133. package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js → chunk-II7R6KD4.js} +8 -7
  134. package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js.map → chunk-II7R6KD4.js.map} +1 -1
  135. package/dist/cli-bundle/chunks/chunk-J2VGADNG.js +10320 -0
  136. package/dist/cli-bundle/chunks/chunk-J2VGADNG.js.map +1 -0
  137. package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js → chunk-J7BOLHAV.js} +5 -7
  138. package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js.map → chunk-J7BOLHAV.js.map} +1 -1
  139. package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js → chunk-KTGJ2CBU.js} +4 -6
  140. package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js.map → chunk-KTGJ2CBU.js.map} +1 -1
  141. package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js → chunk-LCFJ7XAM.js} +22 -2
  142. package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js.map → chunk-LCFJ7XAM.js.map} +3 -3
  143. package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js → chunk-LZQU6XJG.js} +28 -34
  144. package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js.map → chunk-LZQU6XJG.js.map} +1 -1
  145. package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js → chunk-M62RO3XK.js} +10 -14
  146. package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js.map → chunk-M62RO3XK.js.map} +1 -1
  147. package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js → chunk-MCEUKJKW.js} +12 -14
  148. package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js.map → chunk-MCEUKJKW.js.map} +1 -1
  149. package/dist/cli-bundle/chunks/{chunk-TKD5VCTD.js → chunk-MHNMCDWR.js} +343 -195
  150. package/dist/cli-bundle/chunks/chunk-MHNMCDWR.js.map +1 -0
  151. package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js → chunk-MRFWUSVA.js} +4 -6
  152. package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js.map → chunk-MRFWUSVA.js.map} +1 -1
  153. package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js → chunk-N6ZHDLUY.js} +6 -8
  154. package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js.map → chunk-N6ZHDLUY.js.map} +1 -1
  155. package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js → chunk-NWWL22C7.js} +7 -9
  156. package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js.map → chunk-NWWL22C7.js.map} +1 -1
  157. package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js → chunk-P3MJJW7P.js} +2 -2
  158. package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js → chunk-PDXJXEZJ.js} +2 -2
  159. package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js → chunk-Q64AYQYW.js} +10 -12
  160. package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js.map → chunk-Q64AYQYW.js.map} +1 -1
  161. package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js → chunk-QDABF2RB.js} +26 -34
  162. package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js.map → chunk-QDABF2RB.js.map} +1 -1
  163. package/dist/cli-bundle/chunks/{chunk-TULGS6X6.js → chunk-QFBSP3NI.js} +529 -46
  164. package/dist/cli-bundle/chunks/chunk-QFBSP3NI.js.map +1 -0
  165. package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js → chunk-RB3KLPAH.js} +10 -14
  166. package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js.map → chunk-RB3KLPAH.js.map} +1 -1
  167. package/dist/cli-bundle/chunks/{chunk-3VHSI5FL.js → chunk-RY7PTTUB.js} +94 -53
  168. package/dist/cli-bundle/chunks/chunk-RY7PTTUB.js.map +1 -0
  169. package/dist/cli-bundle/chunks/{chunk-COSPOP7H.js → chunk-S547WBYG.js} +343 -195
  170. package/dist/cli-bundle/chunks/chunk-S547WBYG.js.map +7 -0
  171. package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js → chunk-S5BNGFN5.js} +24 -32
  172. package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js.map → chunk-S5BNGFN5.js.map} +1 -1
  173. package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js → chunk-S6VC2A2K.js} +8 -12
  174. package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js.map → chunk-S6VC2A2K.js.map} +1 -1
  175. package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js → chunk-SIM5JDON.js} +6 -6
  176. package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js.map → chunk-SIM5JDON.js.map} +1 -1
  177. package/dist/cli-bundle/chunks/{chunk-VPIM42PC.js → chunk-SY75LYXR.js} +11 -7
  178. package/dist/cli-bundle/chunks/chunk-SY75LYXR.js.map +7 -0
  179. package/dist/cli-bundle/chunks/{chunk-K46RF36U.js → chunk-TEISGNSH.js} +7 -7
  180. package/dist/cli-bundle/chunks/chunk-TEISGNSH.js.map +1 -0
  181. package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js → chunk-TEKZOS7M.js} +2 -2
  182. package/dist/cli-bundle/chunks/{chunk-W572BIEB.js → chunk-TGUK6XN6.js} +14 -18
  183. package/dist/cli-bundle/chunks/{chunk-W572BIEB.js.map → chunk-TGUK6XN6.js.map} +1 -1
  184. package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js → chunk-TNC6MZUD.js} +8 -12
  185. package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js.map → chunk-TNC6MZUD.js.map} +1 -1
  186. package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js +10498 -0
  187. package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js.map +7 -0
  188. package/dist/cli-bundle/chunks/{chunk-57NWPFF2.js → chunk-UO7XAZK6.js} +17 -4
  189. package/dist/cli-bundle/chunks/chunk-UO7XAZK6.js.map +1 -0
  190. package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js → chunk-V5ZWKJNY.js} +2 -2
  191. package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js → chunk-VGO73OCK.js} +6 -6
  192. package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js.map → chunk-VGO73OCK.js.map} +1 -1
  193. package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js → chunk-VLEA2UTQ.js} +2 -2
  194. package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js → chunk-W5HXHC7C.js} +7 -9
  195. package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js.map → chunk-W5HXHC7C.js.map} +1 -1
  196. package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js → chunk-WCWVEXGA.js} +2 -2
  197. package/dist/cli-bundle/chunks/chunk-X47MKQXU.js +6690 -0
  198. package/dist/cli-bundle/chunks/chunk-X47MKQXU.js.map +7 -0
  199. package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js → chunk-XBX5CBRQ.js} +5 -7
  200. package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js.map → chunk-XBX5CBRQ.js.map} +1 -1
  201. package/dist/cli-bundle/chunks/{chunk-SCUR7K7N.js → chunk-XC3X7BQR.js} +541 -44
  202. package/dist/cli-bundle/chunks/chunk-XC3X7BQR.js.map +7 -0
  203. package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js → chunk-XHCVAZGM.js} +13 -17
  204. package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js.map → chunk-XHCVAZGM.js.map} +1 -1
  205. package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js → chunk-XPMXPR7K.js} +7 -9
  206. package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js.map → chunk-XPMXPR7K.js.map} +1 -1
  207. package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js → chunk-XS2TMNXR.js} +6 -8
  208. package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js.map → chunk-XS2TMNXR.js.map} +1 -1
  209. package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js → chunk-XXIYUTLK.js} +10 -14
  210. package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js.map → chunk-XXIYUTLK.js.map} +1 -1
  211. package/dist/cli-bundle/chunks/{chunk-EOKXK3R3.js → chunk-XZWL7VNE.js} +1220 -398
  212. package/dist/cli-bundle/chunks/chunk-XZWL7VNE.js.map +1 -0
  213. package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js +6624 -0
  214. package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js → chunk-Y7KYVCZM.js} +12 -18
  216. package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js.map → chunk-Y7KYVCZM.js.map} +1 -1
  217. package/dist/cli-bundle/chunks/{chunk-VIIUS6N6.js → chunk-YCVWWIKY.js} +16 -14
  218. package/dist/cli-bundle/chunks/chunk-YCVWWIKY.js.map +7 -0
  219. package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js → chunk-YH5NBDFA.js} +22 -26
  220. package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js.map → chunk-YH5NBDFA.js.map} +1 -1
  221. package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js +5509 -0
  222. package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js.map +7 -0
  223. package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js → chunk-YPD7SQ5P.js} +7 -6
  224. package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js.map → chunk-YPD7SQ5P.js.map} +2 -2
  225. package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js → chunk-YPMZMKN7.js} +2 -2
  226. package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js → chunk-YTD5GICJ.js} +4 -4
  227. package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js → chunk-ZNEG2UDO.js} +261 -34
  228. package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js.map → chunk-ZNEG2UDO.js.map} +4 -4
  229. package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js → chunk-ZO7CLOY2.js} +3 -3
  230. package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js → close-3YYQ5OG2.js} +5 -9
  231. package/dist/cli-bundle/chunks/close-Z3Q4U7TS.js +12 -0
  232. package/dist/cli-bundle/chunks/close-many-3L2RXH3M.js +22 -0
  233. package/dist/cli-bundle/chunks/close-many-D366FTIG.js +26 -0
  234. package/dist/cli-bundle/chunks/comments-54XDJNFE.js +17 -0
  235. package/dist/cli-bundle/chunks/comments-HGHC2PN6.js +13 -0
  236. package/dist/cli-bundle/chunks/{copy-32ROBIDL.js → copy-44RT5GDW.js} +4 -8
  237. package/dist/cli-bundle/chunks/copy-UGMUGHZA.js +9 -0
  238. package/dist/cli-bundle/chunks/{create-E77SDCUP.js → create-4GWJWPXG.js} +9 -14
  239. package/dist/cli-bundle/chunks/create-AZXCUYKP.js +25 -0
  240. package/dist/cli-bundle/chunks/delete-Y6SXIQ4X.js +10 -0
  241. package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js → delete-YQ2VPXNF.js} +4 -8
  242. package/dist/cli-bundle/chunks/{deps-32SU7HO5.js → deps-BU5EBJDU.js} +4 -8
  243. package/dist/cli-bundle/chunks/deps-FMANWFRP.js +13 -0
  244. package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js → docs-OQBSJNIA.js} +6 -10
  245. package/dist/cli-bundle/chunks/docs-VNPBZXEL.js +14 -0
  246. package/dist/cli-bundle/chunks/files-72HZEBOE.js +18 -0
  247. package/dist/cli-bundle/chunks/{files-PYKR2UUG.js → files-HTSB2KJG.js} +6 -10
  248. package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js → focus-FOG4ALC2.js} +7 -9
  249. package/dist/cli-bundle/chunks/focus-SUTMKXGX.js +10 -0
  250. package/dist/cli-bundle/chunks/{history-compact-3MNXLKAT.js → history-compact-M6IFAMBP.js} +9 -13
  251. package/dist/cli-bundle/chunks/history-compact-NEXRPP2O.js +21 -0
  252. package/dist/cli-bundle/chunks/{history-redact-P6DYF55G.js → history-redact-NQX3OGZP.js} +7 -11
  253. package/dist/cli-bundle/chunks/history-redact-WQJBZ3PX.js +17 -0
  254. package/dist/cli-bundle/chunks/history-repair-CBHMHAJO.js +19 -0
  255. package/dist/cli-bundle/chunks/{history-repair-ZJQFMWPD.js → history-repair-NHOJG7WO.js} +9 -13
  256. package/dist/cli-bundle/chunks/learnings-M64NTSOR.js +13 -0
  257. package/dist/cli-bundle/chunks/{append-BGML6VLD.js → learnings-T63JGKKN.js} +9 -11
  258. package/dist/cli-bundle/chunks/notes-73WE2UV2.js +13 -0
  259. package/dist/cli-bundle/chunks/notes-U7L6HQQ2.js +17 -0
  260. package/dist/cli-bundle/chunks/plan-OSCNYFGC.js +24 -0
  261. package/dist/cli-bundle/chunks/{plan-CHVE7PBR.js → plan-TN537L24.js} +10 -15
  262. package/dist/cli-bundle/chunks/{profile-ZXGSKBJD.js → profile-MHAMXMHQ.js} +9 -13
  263. package/dist/cli-bundle/chunks/{profile-LD23PSI6.js → profile-TIGLAKJ7.js} +9 -13
  264. package/dist/cli-bundle/chunks/{register-list-query-OEYQHFXO.js → register-list-query-OHXD7G5N.js} +41 -33
  265. package/dist/cli-bundle/chunks/register-list-query-OHXD7G5N.js.map +7 -0
  266. package/dist/cli-bundle/chunks/{register-list-query-B42JCCOI.js → register-list-query-ZCRABAPN.js} +42 -34
  267. package/dist/cli-bundle/chunks/register-list-query-ZCRABAPN.js.map +1 -0
  268. package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js → register-mutation-P3G4XP6Q.js} +36 -41
  269. package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js.map → register-mutation-P3G4XP6Q.js.map} +1 -1
  270. package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js → register-mutation-XX4H56PE.js} +34 -39
  271. package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js.map → register-mutation-XX4H56PE.js.map} +1 -1
  272. package/dist/cli-bundle/chunks/{chunk-5BMM6XQY.js → register-operations-V6PIYEDU.js} +79 -46
  273. package/dist/cli-bundle/chunks/register-operations-V6PIYEDU.js.map +1 -0
  274. package/dist/cli-bundle/chunks/{chunk-Z3U3U5KD.js → register-operations-V6VKTG54.js} +78 -45
  275. package/dist/cli-bundle/chunks/register-operations-V6VKTG54.js.map +7 -0
  276. package/dist/cli-bundle/chunks/{register-setup-3ZVVX2VN.js → register-setup-6RVAWT6W.js} +129 -29
  277. package/dist/cli-bundle/chunks/register-setup-6RVAWT6W.js.map +7 -0
  278. package/dist/cli-bundle/chunks/{register-setup-Q6KFNIOZ.js → register-setup-6YVUSQYD.js} +130 -30
  279. package/dist/cli-bundle/chunks/register-setup-6YVUSQYD.js.map +1 -0
  280. package/dist/cli-bundle/chunks/{restore-5RQHAPMA.js → restore-HC3YSWF7.js} +7 -11
  281. package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js +15 -0
  282. package/dist/cli-bundle/chunks/{schema-HBORFC6B.js → schema-DAGSYO6E.js} +6 -10
  283. package/dist/cli-bundle/chunks/{schema-245WW4G2.js → schema-UBXJCQAC.js} +6 -10
  284. package/dist/cli-bundle/chunks/update-CJGG5WMV.js +21 -0
  285. package/dist/cli-bundle/chunks/update-LKD64AFP.js +25 -0
  286. package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js +31 -0
  287. package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js +35 -0
  288. package/dist/cli-bundle/main.js +29 -31
  289. package/dist/cli-bundle/main.js.map +2 -2
  290. package/dist/cli-bundle/sdk-runtime.js +129 -107
  291. package/dist/cli-bundle/sdk-testing.js +7 -8
  292. package/dist/cli-bundle/sdk.js +122 -117
  293. package/dist/cli-bundle/sdk.js.map +2 -2
  294. package/dist/core/history/drift-scan.js +3 -8
  295. package/dist/core/history/drift-scan.js.map +1 -1
  296. package/dist/core/output/mutation-projection.js +11 -5
  297. package/dist/core/output/mutation-projection.js.map +1 -1
  298. package/dist/core/search/cache.js +3 -3
  299. package/dist/core/search/cache.js.map +1 -1
  300. package/dist/core/search/semantic-defaults.d.ts +2 -0
  301. package/dist/core/search/semantic-defaults.js +11 -4
  302. package/dist/core/search/semantic-defaults.js.map +1 -1
  303. package/dist/core/search/vector-stores.d.ts +1 -1
  304. package/dist/core/search/vector-stores.js +33 -7
  305. package/dist/core/search/vector-stores.js.map +1 -1
  306. package/dist/mcp/server.d.ts +1 -1
  307. package/dist/sdk/cli-contracts/flag-contracts.js +7 -7
  308. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  309. package/dist/sdk/cli-contracts/tool-schema.js +9 -7
  310. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  311. package/dist/sdk/index.d.ts +1 -1
  312. package/dist/sdk/index.js +3 -3
  313. package/dist/sdk/index.js.map +1 -1
  314. package/dist/sdk/runtime.d.ts +151 -8
  315. package/dist/sdk/runtime.js +255 -14
  316. package/dist/sdk/runtime.js.map +1 -1
  317. package/dist/sdk/start-task-status.d.ts +13 -0
  318. package/dist/sdk/start-task-status.js +19 -0
  319. package/dist/sdk/start-task-status.js.map +1 -0
  320. package/docs/COMMANDS.md +10 -1
  321. package/docs/SDK.md +35 -0
  322. package/docs/TESTING.md +3 -0
  323. package/package.json +1 -1
  324. package/dist/cli-bundle/chunks/activity-WJCGCYPU.js +0 -18
  325. package/dist/cli-bundle/chunks/activity-Z6QUAUSG.js +0 -22
  326. package/dist/cli-bundle/chunks/aggregate-BDM6EIAR.js +0 -25
  327. package/dist/cli-bundle/chunks/aggregate-VQ2DHU3S.js +0 -21
  328. package/dist/cli-bundle/chunks/append-RKJYPU74.js +0 -15
  329. package/dist/cli-bundle/chunks/chunk-2XG4IZON.js +0 -218
  330. package/dist/cli-bundle/chunks/chunk-2XG4IZON.js.map +0 -7
  331. package/dist/cli-bundle/chunks/chunk-37E72CNS.js +0 -217
  332. package/dist/cli-bundle/chunks/chunk-37E72CNS.js.map +0 -1
  333. package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js +0 -228
  334. package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js.map +0 -1
  335. package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js +0 -2330
  336. package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js.map +0 -7
  337. package/dist/cli-bundle/chunks/chunk-3VHSI5FL.js.map +0 -1
  338. package/dist/cli-bundle/chunks/chunk-425E4QL5.js +0 -278
  339. package/dist/cli-bundle/chunks/chunk-425E4QL5.js.map +0 -7
  340. package/dist/cli-bundle/chunks/chunk-46CUF5L6.js.map +0 -7
  341. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +0 -87
  342. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +0 -7
  343. package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js +0 -249
  344. package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js.map +0 -7
  345. package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js +0 -819
  346. package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js.map +0 -1
  347. package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js +0 -279
  348. package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js.map +0 -1
  349. package/dist/cli-bundle/chunks/chunk-57NWPFF2.js.map +0 -1
  350. package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js +0 -268
  351. package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js.map +0 -1
  352. package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js.map +0 -1
  353. package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js +0 -1868
  354. package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js.map +0 -7
  355. package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js +0 -1749
  356. package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js.map +0 -7
  357. package/dist/cli-bundle/chunks/chunk-64YKRTSV.js +0 -1961
  358. package/dist/cli-bundle/chunks/chunk-64YKRTSV.js.map +0 -1
  359. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +0 -23
  360. package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +0 -7
  361. package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js +0 -421
  362. package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js.map +0 -1
  363. package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js +0 -1985
  364. package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js.map +0 -7
  365. package/dist/cli-bundle/chunks/chunk-CL36D4PC.js.map +0 -7
  366. package/dist/cli-bundle/chunks/chunk-COSPOP7H.js.map +0 -7
  367. package/dist/cli-bundle/chunks/chunk-COWTDV6B.js +0 -3461
  368. package/dist/cli-bundle/chunks/chunk-COWTDV6B.js.map +0 -7
  369. package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js +0 -1858
  370. package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js.map +0 -1
  371. package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js.map +0 -1
  372. package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js +0 -1932
  373. package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js.map +0 -1
  374. package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js.map +0 -1
  375. package/dist/cli-bundle/chunks/chunk-EKFNL33R.js.map +0 -1
  376. package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js +0 -1704
  377. package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js.map +0 -1
  378. package/dist/cli-bundle/chunks/chunk-EOKXK3R3.js.map +0 -1
  379. package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js +0 -231
  380. package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js.map +0 -7
  381. package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js +0 -2090
  382. package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js.map +0 -1
  383. package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js +0 -1570
  384. package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js.map +0 -1
  385. package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js +0 -239
  386. package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js.map +0 -1
  387. package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js +0 -530
  388. package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js.map +0 -7
  389. package/dist/cli-bundle/chunks/chunk-GZRDYONU.js +0 -1005
  390. package/dist/cli-bundle/chunks/chunk-GZRDYONU.js.map +0 -7
  391. package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js +0 -277
  392. package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js.map +0 -7
  393. package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js +0 -309
  394. package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js.map +0 -7
  395. package/dist/cli-bundle/chunks/chunk-JINYH2DB.js +0 -371
  396. package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +0 -7
  397. package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js +0 -2257
  398. package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js.map +0 -7
  399. package/dist/cli-bundle/chunks/chunk-K46RF36U.js.map +0 -1
  400. package/dist/cli-bundle/chunks/chunk-KERMZVY5.js +0 -371
  401. package/dist/cli-bundle/chunks/chunk-KERMZVY5.js.map +0 -7
  402. package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js +0 -76
  403. package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js.map +0 -1
  404. package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js +0 -140
  405. package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js.map +0 -1
  406. package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js +0 -1601
  407. package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js.map +0 -1
  408. package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js +0 -1031
  409. package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js.map +0 -1
  410. package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js +0 -995
  411. package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js.map +0 -1
  412. package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js +0 -296
  413. package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js.map +0 -1
  414. package/dist/cli-bundle/chunks/chunk-MLIYFOE7.js.map +0 -1
  415. package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js +0 -2043
  416. package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js.map +0 -7
  417. package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js +0 -2033
  418. package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js.map +0 -1
  419. package/dist/cli-bundle/chunks/chunk-N745W3B3.js +0 -1604
  420. package/dist/cli-bundle/chunks/chunk-N745W3B3.js.map +0 -7
  421. package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js +0 -1615
  422. package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js.map +0 -7
  423. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +0 -20
  424. package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +0 -1
  425. package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js +0 -143
  426. package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js.map +0 -7
  427. package/dist/cli-bundle/chunks/chunk-QLMX7SRD.js.map +0 -7
  428. package/dist/cli-bundle/chunks/chunk-QX6HM775.js +0 -398
  429. package/dist/cli-bundle/chunks/chunk-QX6HM775.js.map +0 -7
  430. package/dist/cli-bundle/chunks/chunk-QZ342C63.js +0 -220
  431. package/dist/cli-bundle/chunks/chunk-QZ342C63.js.map +0 -7
  432. package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js +0 -368
  433. package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +0 -1
  434. package/dist/cli-bundle/chunks/chunk-RFNYTESG.js +0 -520
  435. package/dist/cli-bundle/chunks/chunk-RFNYTESG.js.map +0 -1
  436. package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js +0 -79
  437. package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js.map +0 -7
  438. package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js +0 -282
  439. package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js.map +0 -7
  440. package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js +0 -274
  441. package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js.map +0 -1
  442. package/dist/cli-bundle/chunks/chunk-SCUR7K7N.js.map +0 -7
  443. package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js +0 -1977
  444. package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js.map +0 -7
  445. package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js +0 -1041
  446. package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js.map +0 -7
  447. package/dist/cli-bundle/chunks/chunk-T42JWV3F.js +0 -822
  448. package/dist/cli-bundle/chunks/chunk-T42JWV3F.js.map +0 -7
  449. package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js.map +0 -1
  450. package/dist/cli-bundle/chunks/chunk-TULGS6X6.js.map +0 -1
  451. package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js +0 -2306
  452. package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js.map +0 -1
  453. package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js.map +0 -7
  454. package/dist/cli-bundle/chunks/chunk-VPIM42PC.js.map +0 -7
  455. package/dist/cli-bundle/chunks/chunk-VQRSPVME.js +0 -368
  456. package/dist/cli-bundle/chunks/chunk-VQRSPVME.js.map +0 -1
  457. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +0 -84
  458. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +0 -1
  459. package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js +0 -3423
  460. package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js.map +0 -1
  461. package/dist/cli-bundle/chunks/chunk-WLSM645P.js +0 -2247
  462. package/dist/cli-bundle/chunks/chunk-WLSM645P.js.map +0 -1
  463. package/dist/cli-bundle/chunks/chunk-WRTENIX3.js +0 -215
  464. package/dist/cli-bundle/chunks/chunk-WRTENIX3.js.map +0 -1
  465. package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js +0 -388
  466. package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js.map +0 -1
  467. package/dist/cli-bundle/chunks/chunk-XC5BURG2.js +0 -306
  468. package/dist/cli-bundle/chunks/chunk-XC5BURG2.js.map +0 -1
  469. package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js +0 -424
  470. package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js.map +0 -7
  471. package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js +0 -2128
  472. package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js.map +0 -7
  473. package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js.map +0 -7
  474. package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js +0 -299
  475. package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js.map +0 -7
  476. package/dist/cli-bundle/chunks/chunk-ZSUS2OD3.js.map +0 -7
  477. package/dist/cli-bundle/chunks/claim-RFS7BROJ.js +0 -19
  478. package/dist/cli-bundle/chunks/claim-XP5AWZ5H.js +0 -23
  479. package/dist/cli-bundle/chunks/close-GEANHQ2J.js +0 -16
  480. package/dist/cli-bundle/chunks/close-many-CMZW7ITN.js +0 -31
  481. package/dist/cli-bundle/chunks/close-many-ZFDIG6M7.js +0 -27
  482. package/dist/cli-bundle/chunks/comments-MFSYVNNU.js +0 -21
  483. package/dist/cli-bundle/chunks/comments-XUBPXDYX.js +0 -17
  484. package/dist/cli-bundle/chunks/config-D7XQMONX.js +0 -18
  485. package/dist/cli-bundle/chunks/config-T4FHBSYN.js +0 -22
  486. package/dist/cli-bundle/chunks/context-DIU275XI.js +0 -48
  487. package/dist/cli-bundle/chunks/context-JCOYB4LZ.js +0 -44
  488. package/dist/cli-bundle/chunks/contracts-BVO7CSLK.js +0 -12
  489. package/dist/cli-bundle/chunks/copy-NAGLGMHZ.js +0 -13
  490. package/dist/cli-bundle/chunks/create-4V7SWNBB.js +0 -30
  491. package/dist/cli-bundle/chunks/delete-NQI5OSKN.js +0 -14
  492. package/dist/cli-bundle/chunks/deps-T7SCWXEX.js +0 -17
  493. package/dist/cli-bundle/chunks/docs-WL2IWGWV.js +0 -18
  494. package/dist/cli-bundle/chunks/eval-NF2J5SHR.js +0 -23
  495. package/dist/cli-bundle/chunks/eval-SKDT3MZU.js +0 -27
  496. package/dist/cli-bundle/chunks/extension-LAXKCAYE.js +0 -42
  497. package/dist/cli-bundle/chunks/extension-ZISPBRBC.js +0 -38
  498. package/dist/cli-bundle/chunks/files-EWRQHGIS.js +0 -22
  499. package/dist/cli-bundle/chunks/focus-4T7TM4MT.js +0 -18
  500. package/dist/cli-bundle/chunks/focus-L3YUASOD.js +0 -14
  501. package/dist/cli-bundle/chunks/gc-2PCTYYRI.js +0 -12
  502. package/dist/cli-bundle/chunks/get-7DMITJ3G.js +0 -23
  503. package/dist/cli-bundle/chunks/get-VKQXCXLL.js +0 -19
  504. package/dist/cli-bundle/chunks/health-CVSTAR2F.js +0 -31
  505. package/dist/cli-bundle/chunks/health-TV3GKTFN.js +0 -35
  506. package/dist/cli-bundle/chunks/history-D4JUX5XV.js +0 -20
  507. package/dist/cli-bundle/chunks/history-D4JUX5XV.js.map +0 -7
  508. package/dist/cli-bundle/chunks/history-LQ2UWZTE.js +0 -24
  509. package/dist/cli-bundle/chunks/history-LQ2UWZTE.js.map +0 -1
  510. package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js.map +0 -1
  511. package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js +0 -25
  512. package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js.map +0 -7
  513. package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js +0 -21
  514. package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js.map +0 -7
  515. package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js.map +0 -1
  516. package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js +0 -23
  517. package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js.map +0 -7
  518. package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js.map +0 -1
  519. package/dist/cli-bundle/chunks/init-C3LJPWQZ.js +0 -30
  520. package/dist/cli-bundle/chunks/init-C3LJPWQZ.js.map +0 -1
  521. package/dist/cli-bundle/chunks/init-J3DPGWQI.js +0 -26
  522. package/dist/cli-bundle/chunks/init-J3DPGWQI.js.map +0 -7
  523. package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js +0 -21
  524. package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js.map +0 -1
  525. package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js +0 -17
  526. package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js.map +0 -7
  527. package/dist/cli-bundle/chunks/list-O5NZVSPN.js +0 -36
  528. package/dist/cli-bundle/chunks/list-O5NZVSPN.js.map +0 -1
  529. package/dist/cli-bundle/chunks/list-Z55YCNTC.js +0 -32
  530. package/dist/cli-bundle/chunks/list-Z55YCNTC.js.map +0 -7
  531. package/dist/cli-bundle/chunks/next-GBNTGXFC.js +0 -28
  532. package/dist/cli-bundle/chunks/next-GBNTGXFC.js.map +0 -7
  533. package/dist/cli-bundle/chunks/next-QKW7PTKE.js +0 -32
  534. package/dist/cli-bundle/chunks/next-QKW7PTKE.js.map +0 -1
  535. package/dist/cli-bundle/chunks/notes-R5FZTKWF.js +0 -17
  536. package/dist/cli-bundle/chunks/notes-R5FZTKWF.js.map +0 -7
  537. package/dist/cli-bundle/chunks/notes-WCGIULVG.js +0 -21
  538. package/dist/cli-bundle/chunks/notes-WCGIULVG.js.map +0 -1
  539. package/dist/cli-bundle/chunks/plan-ADISFYH4.js +0 -29
  540. package/dist/cli-bundle/chunks/plan-ADISFYH4.js.map +0 -7
  541. package/dist/cli-bundle/chunks/plan-CHVE7PBR.js.map +0 -1
  542. package/dist/cli-bundle/chunks/profile-LD23PSI6.js.map +0 -7
  543. package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js.map +0 -1
  544. package/dist/cli-bundle/chunks/register-list-query-B42JCCOI.js.map +0 -1
  545. package/dist/cli-bundle/chunks/register-list-query-OEYQHFXO.js.map +0 -7
  546. package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js +0 -19
  547. package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js.map +0 -7
  548. package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js +0 -23
  549. package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js.map +0 -1
  550. package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js.map +0 -7
  551. package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js.map +0 -1
  552. package/dist/cli-bundle/chunks/restore-5RQHAPMA.js.map +0 -1
  553. package/dist/cli-bundle/chunks/restore-PNEIBBLW.js +0 -19
  554. package/dist/cli-bundle/chunks/restore-PNEIBBLW.js.map +0 -7
  555. package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js +0 -29
  556. package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js.map +0 -1
  557. package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js +0 -25
  558. package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js.map +0 -7
  559. package/dist/cli-bundle/chunks/schema-245WW4G2.js.map +0 -1
  560. package/dist/cli-bundle/chunks/schema-HBORFC6B.js.map +0 -7
  561. package/dist/cli-bundle/chunks/search-AOZC5SIK.js +0 -34
  562. package/dist/cli-bundle/chunks/search-AOZC5SIK.js.map +0 -7
  563. package/dist/cli-bundle/chunks/search-DRXPGHD7.js +0 -38
  564. package/dist/cli-bundle/chunks/search-DRXPGHD7.js.map +0 -1
  565. package/dist/cli-bundle/chunks/stats-NJG4NLHG.js +0 -21
  566. package/dist/cli-bundle/chunks/stats-NJG4NLHG.js.map +0 -1
  567. package/dist/cli-bundle/chunks/stats-RG6AG4N2.js +0 -17
  568. package/dist/cli-bundle/chunks/stats-RG6AG4N2.js.map +0 -7
  569. package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js +0 -14
  570. package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js.map +0 -7
  571. package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js +0 -18
  572. package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js.map +0 -1
  573. package/dist/cli-bundle/chunks/test-6CMOCWUC.js +0 -39
  574. package/dist/cli-bundle/chunks/test-6CMOCWUC.js.map +0 -7
  575. package/dist/cli-bundle/chunks/test-RI7XHBZL.js +0 -43
  576. package/dist/cli-bundle/chunks/test-RI7XHBZL.js.map +0 -1
  577. package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js +0 -29
  578. package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js.map +0 -7
  579. package/dist/cli-bundle/chunks/test-all-QEIORFYW.js +0 -33
  580. package/dist/cli-bundle/chunks/test-all-QEIORFYW.js.map +0 -1
  581. package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js +0 -28
  582. package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js.map +0 -1
  583. package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js +0 -24
  584. package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js.map +0 -7
  585. package/dist/cli-bundle/chunks/update-QVJDFEAP.js +0 -30
  586. package/dist/cli-bundle/chunks/update-QVJDFEAP.js.map +0 -1
  587. package/dist/cli-bundle/chunks/update-VQVHAY6X.js +0 -26
  588. package/dist/cli-bundle/chunks/update-VQVHAY6X.js.map +0 -7
  589. package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js +0 -37
  590. package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js.map +0 -7
  591. package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js +0 -41
  592. package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js.map +0 -1
  593. package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js +0 -24
  594. package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js.map +0 -7
  595. package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js +0 -28
  596. package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js.map +0 -1
  597. package/dist/cli-bundle/chunks/validate-4NTXSB62.js +0 -36
  598. package/dist/cli-bundle/chunks/validate-4NTXSB62.js.map +0 -1
  599. package/dist/cli-bundle/chunks/validate-MUFXQZMI.js +0 -32
  600. package/dist/cli-bundle/chunks/validate-MUFXQZMI.js.map +0 -7
  601. /package/dist/cli-bundle/chunks/{activity-WJCGCYPU.js.map → append-F7WPGIQL.js.map} +0 -0
  602. /package/dist/cli-bundle/chunks/{activity-Z6QUAUSG.js.map → append-PVCTBVJG.js.map} +0 -0
  603. /package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js.map → chunk-2LEJGRQ7.js.map} +0 -0
  604. /package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js.map → chunk-2TILG6F2.js.map} +0 -0
  605. /package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js.map → chunk-3TYOW6RR.js.map} +0 -0
  606. /package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js.map → chunk-3X542TEY.js.map} +0 -0
  607. /package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js.map → chunk-7VQ3JJN5.js.map} +0 -0
  608. /package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js.map → chunk-AGAVEDIE.js.map} +0 -0
  609. /package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js.map → chunk-AJUON7E6.js.map} +0 -0
  610. /package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js.map → chunk-DR2V5OIV.js.map} +0 -0
  611. /package/dist/cli-bundle/chunks/{chunk-XG625QP4.js.map → chunk-EDO7VXSO.js.map} +0 -0
  612. /package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js.map → chunk-EVEPHNXJ.js.map} +0 -0
  613. /package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js.map → chunk-FN6SB4HU.js.map} +0 -0
  614. /package/dist/cli-bundle/chunks/{chunk-24YG75HI.js.map → chunk-H2SMKL2N.js.map} +0 -0
  615. /package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js.map → chunk-HX6QXV5P.js.map} +0 -0
  616. /package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js.map → chunk-P3MJJW7P.js.map} +0 -0
  617. /package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js.map → chunk-PDXJXEZJ.js.map} +0 -0
  618. /package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js.map → chunk-TEKZOS7M.js.map} +0 -0
  619. /package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js.map → chunk-V5ZWKJNY.js.map} +0 -0
  620. /package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js.map → chunk-VLEA2UTQ.js.map} +0 -0
  621. /package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js.map → chunk-WCWVEXGA.js.map} +0 -0
  622. /package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js.map → chunk-YPMZMKN7.js.map} +0 -0
  623. /package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js.map → chunk-YTD5GICJ.js.map} +0 -0
  624. /package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js.map → chunk-ZO7CLOY2.js.map} +0 -0
  625. /package/dist/cli-bundle/chunks/{aggregate-BDM6EIAR.js.map → close-3YYQ5OG2.js.map} +0 -0
  626. /package/dist/cli-bundle/chunks/{aggregate-VQ2DHU3S.js.map → close-Z3Q4U7TS.js.map} +0 -0
  627. /package/dist/cli-bundle/chunks/{append-RKJYPU74.js.map → close-many-3L2RXH3M.js.map} +0 -0
  628. /package/dist/cli-bundle/chunks/{append-BGML6VLD.js.map → close-many-D366FTIG.js.map} +0 -0
  629. /package/dist/cli-bundle/chunks/{claim-XP5AWZ5H.js.map → comments-54XDJNFE.js.map} +0 -0
  630. /package/dist/cli-bundle/chunks/{claim-RFS7BROJ.js.map → comments-HGHC2PN6.js.map} +0 -0
  631. /package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js.map → copy-44RT5GDW.js.map} +0 -0
  632. /package/dist/cli-bundle/chunks/{close-GEANHQ2J.js.map → copy-UGMUGHZA.js.map} +0 -0
  633. /package/dist/cli-bundle/chunks/{close-many-CMZW7ITN.js.map → create-4GWJWPXG.js.map} +0 -0
  634. /package/dist/cli-bundle/chunks/{close-many-ZFDIG6M7.js.map → create-AZXCUYKP.js.map} +0 -0
  635. /package/dist/cli-bundle/chunks/{comments-XUBPXDYX.js.map → delete-Y6SXIQ4X.js.map} +0 -0
  636. /package/dist/cli-bundle/chunks/{comments-MFSYVNNU.js.map → delete-YQ2VPXNF.js.map} +0 -0
  637. /package/dist/cli-bundle/chunks/{config-T4FHBSYN.js.map → deps-BU5EBJDU.js.map} +0 -0
  638. /package/dist/cli-bundle/chunks/{config-D7XQMONX.js.map → deps-FMANWFRP.js.map} +0 -0
  639. /package/dist/cli-bundle/chunks/{context-DIU275XI.js.map → docs-OQBSJNIA.js.map} +0 -0
  640. /package/dist/cli-bundle/chunks/{context-JCOYB4LZ.js.map → docs-VNPBZXEL.js.map} +0 -0
  641. /package/dist/cli-bundle/chunks/{contracts-BVO7CSLK.js.map → files-72HZEBOE.js.map} +0 -0
  642. /package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js.map → files-HTSB2KJG.js.map} +0 -0
  643. /package/dist/cli-bundle/chunks/{copy-32ROBIDL.js.map → focus-FOG4ALC2.js.map} +0 -0
  644. /package/dist/cli-bundle/chunks/{copy-NAGLGMHZ.js.map → focus-SUTMKXGX.js.map} +0 -0
  645. /package/dist/cli-bundle/chunks/{create-E77SDCUP.js.map → history-compact-M6IFAMBP.js.map} +0 -0
  646. /package/dist/cli-bundle/chunks/{create-4V7SWNBB.js.map → history-compact-NEXRPP2O.js.map} +0 -0
  647. /package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js.map → history-redact-NQX3OGZP.js.map} +0 -0
  648. /package/dist/cli-bundle/chunks/{delete-NQI5OSKN.js.map → history-redact-WQJBZ3PX.js.map} +0 -0
  649. /package/dist/cli-bundle/chunks/{deps-T7SCWXEX.js.map → history-repair-CBHMHAJO.js.map} +0 -0
  650. /package/dist/cli-bundle/chunks/{deps-32SU7HO5.js.map → history-repair-NHOJG7WO.js.map} +0 -0
  651. /package/dist/cli-bundle/chunks/{docs-WL2IWGWV.js.map → learnings-M64NTSOR.js.map} +0 -0
  652. /package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js.map → learnings-T63JGKKN.js.map} +0 -0
  653. /package/dist/cli-bundle/chunks/{eval-NF2J5SHR.js.map → notes-73WE2UV2.js.map} +0 -0
  654. /package/dist/cli-bundle/chunks/{eval-SKDT3MZU.js.map → notes-U7L6HQQ2.js.map} +0 -0
  655. /package/dist/cli-bundle/chunks/{extension-ZISPBRBC.js.map → plan-OSCNYFGC.js.map} +0 -0
  656. /package/dist/cli-bundle/chunks/{extension-LAXKCAYE.js.map → plan-TN537L24.js.map} +0 -0
  657. /package/dist/cli-bundle/chunks/{files-PYKR2UUG.js.map → profile-MHAMXMHQ.js.map} +0 -0
  658. /package/dist/cli-bundle/chunks/{files-EWRQHGIS.js.map → profile-TIGLAKJ7.js.map} +0 -0
  659. /package/dist/cli-bundle/chunks/{focus-4T7TM4MT.js.map → restore-HC3YSWF7.js.map} +0 -0
  660. /package/dist/cli-bundle/chunks/{focus-L3YUASOD.js.map → restore-LFAMMRYZ.js.map} +0 -0
  661. /package/dist/cli-bundle/chunks/{gc-2PCTYYRI.js.map → schema-DAGSYO6E.js.map} +0 -0
  662. /package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js.map → schema-UBXJCQAC.js.map} +0 -0
  663. /package/dist/cli-bundle/chunks/{get-VKQXCXLL.js.map → update-CJGG5WMV.js.map} +0 -0
  664. /package/dist/cli-bundle/chunks/{get-7DMITJ3G.js.map → update-LKD64AFP.js.map} +0 -0
  665. /package/dist/cli-bundle/chunks/{health-CVSTAR2F.js.map → update-many-G4SM7BHC.js.map} +0 -0
  666. /package/dist/cli-bundle/chunks/{health-TV3GKTFN.js.map → update-many-VLIV3D7R.js.map} +0 -0
@@ -1,52 +1,44 @@
1
- import {
2
- runUpdate
3
- } from "./chunk-3UJRFJ5R.js";
4
- import {
5
- resolvePriority
6
- } from "./chunk-SCUR7K7N.js";
7
- import {
8
- applyTagRemovals,
9
- mergeAdditiveTags,
10
- parseTags
11
- } from "./chunk-AZYGZGGI.js";
12
1
  import {
13
2
  createCheckpointId,
14
3
  loadMutationCheckpoint,
15
4
  restoreCheckpointItems,
16
5
  writeMutationCheckpoint
17
- } from "./chunk-ZGK4L4JM.js";
6
+ } from "./chunk-E3LWJUGF.js";
18
7
  import {
19
8
  runRestore
20
- } from "./chunk-6LLVNJXT.js";
9
+ } from "./chunk-Y7KYVCZM.js";
10
+ import {
11
+ runUpdate
12
+ } from "./chunk-LZQU6XJG.js";
21
13
  import {
22
14
  resolveAuthor
23
15
  } from "./chunk-WW4E2DC3.js";
24
16
  import {
25
- hasListFilters
26
- } from "./chunk-4BU75MF4.js";
27
- import {
17
+ hasListFilters,
28
18
  runList
29
- } from "./chunk-46CUF5L6.js";
19
+ } from "./chunk-C5ACVMOI.js";
30
20
  import {
31
- toItemRecord
32
- } from "./chunk-5VAA4YHR.js";
21
+ resolvePriority
22
+ } from "./chunk-XC3X7BQR.js";
33
23
  import {
34
- collectRuntimeUpdateFieldValues,
35
- normalizeStatusInput
36
- } from "./chunk-NMP5I3I5.js";
24
+ applyTagRemovals,
25
+ mergeAdditiveTags,
26
+ parseTags
27
+ } from "./chunk-2TILG6F2.js";
37
28
  import {
38
- nowIso,
39
- resolveIsoOrRelative
40
- } from "./chunk-FLZSGSQR.js";
29
+ buildInvalidTypeError
30
+ } from "./chunk-YPMZMKN7.js";
41
31
  import {
42
32
  PmCliError,
33
+ collectRuntimeUpdateFieldValues,
43
34
  getActiveExtensionRegistrations,
35
+ normalizeStatusInput,
36
+ nowIso,
44
37
  readSettings,
45
- stableValueEquals
46
- } from "./chunk-SHQY2IDC.js";
47
- import {
48
- buildInvalidTypeError
49
- } from "./chunk-NGXQ3PFT.js";
38
+ resolveIsoOrRelative,
39
+ stableValueEquals,
40
+ toItemRecord
41
+ } from "./chunk-YNCFP5AR.js";
50
42
  import {
51
43
  EXIT_CODE,
52
44
  getSettingsPath,
@@ -58,7 +50,7 @@ import {
58
50
  resolveRuntimeStatusRegistry,
59
51
  resolveTypeName,
60
52
  toErrorMessage
61
- } from "./chunk-LK6XLOGP.js";
53
+ } from "./chunk-LCFJ7XAM.js";
62
54
 
63
55
  // dist/cli/commands/update-many.js
64
56
  !(function() {
@@ -655,4 +647,4 @@ export {
655
647
  runUpdateMany,
656
648
  _testOnlyUpdateManyCommand
657
649
  };
658
- //# sourceMappingURL=chunk-NZEHECMW.js.map
650
+ //# sourceMappingURL=chunk-S5BNGFN5.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../cli/commands/update-many.ts"],
4
4
  "sourcesContent": ["/**\n * @module cli/commands/update-many\n *\n * Implements the pm update many command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport {\n createCheckpointId,\n loadMutationCheckpoint,\n restoreCheckpointItems,\n writeMutationCheckpoint,\n type MutationCheckpointItem,\n} from \"../../core/checkpoint/mutation-checkpoint.js\";\nimport { toItemRecord } from \"../../core/item/item-record.js\";\nimport { applyTagRemovals, mergeAdditiveTags, parseTags } from \"../../core/item/parse.js\";\nimport { resolvePriority } from \"../../core/item/priority.js\";\nimport { normalizeStatusInput } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry, resolveTypeName } from \"../../core/item/type-registry.js\";\nimport { collectRuntimeUpdateFieldValues } from \"../../core/schema/runtime-field-values.js\";\nimport { buildInvalidTypeError } from \"../../core/schema/item-types-file.js\";\nimport {\n resolveItemTypesFilePath,\n resolveRuntimeFieldRegistry,\n resolveRuntimeStatusRegistry,\n type RuntimeFieldRegistry,\n type RuntimeStatusRegistry,\n} from \"../../core/schema/runtime-schema.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 { toErrorMessage } from \"../../core/shared/primitives.js\";\nimport { stableValueEquals } from \"../../core/shared/serialization.js\";\nimport { nowIso, resolveIsoOrRelative } from \"../../core/shared/time.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport type { PmSettings } from \"../../types/index.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport type { ItemStatus } from \"../../types/index.js\";\nimport { hasListFilters } from \"./list-filter-shared.js\";\nimport { runList, type ListOptions, type ListedItem } from \"./list.js\";\nimport { runRestore } from \"./restore.js\";\nimport { runUpdate, type UpdateCommandOptions } from \"./update.js\";\n\nconst UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;\nconst UPDATE_MANY_CHECKPOINT_SUBDIR = \"update-many\";\n\nconst NON_MUTATION_UPDATE_OPTION_KEYS = new Set<keyof UpdateCommandOptions>([\n \"author\",\n \"message\",\n \"force\",\n \"allowAuditUpdate\",\n \"allowAuditDepUpdate\",\n]);\n\nconst UPDATE_MANY_MUTATION_FLAG_GUIDANCE = [\n \"--status\",\n \"--priority\",\n \"--type\",\n \"--tags\",\n \"--description\",\n \"--body\",\n \"--deadline\",\n \"--estimate\",\n \"--assignee\",\n \"--dep\",\n \"--dep-remove\",\n \"--comment\",\n \"--note\",\n \"--learning\",\n \"--file\",\n \"--test\",\n \"--doc\",\n \"--replace-deps\",\n \"--replace-tests\",\n \"--unset\",\n \"--clear-*\",\n].join(\", \");\n\nconst UPDATE_OPTION_TO_ITEM_KEY: Partial<Record<keyof UpdateCommandOptions, string>> = {\n title: \"title\",\n description: \"description\",\n body: \"body\",\n status: \"status\",\n closeReason: \"close_reason\",\n priority: \"priority\",\n type: \"type\",\n deadline: \"deadline\",\n estimatedMinutes: \"estimated_minutes\",\n acceptanceCriteria: \"acceptance_criteria\",\n definitionOfReady: \"definition_of_ready\",\n order: \"order\",\n goal: \"goal\",\n objective: \"objective\",\n value: \"value\",\n impact: \"impact\",\n outcome: \"outcome\",\n whyNow: \"why_now\",\n assignee: \"assignee\",\n parent: \"parent\",\n reviewer: \"reviewer\",\n risk: \"risk\",\n confidence: \"confidence\",\n sprint: \"sprint\",\n release: \"release\",\n blockedBy: \"blocked_by\",\n blockedReason: \"blocked_reason\",\n unblockNote: \"unblock_note\",\n reporter: \"reporter\",\n severity: \"severity\",\n environment: \"environment\",\n reproSteps: \"repro_steps\",\n resolution: \"resolution\",\n expectedResult: \"expected_result\",\n actualResult: \"actual_result\",\n affectedVersion: \"affected_version\",\n fixedVersion: \"fixed_version\",\n component: \"component\",\n regression: \"regression\",\n customerImpact: \"customer_impact\",\n};\n\ninterface CollectionMutationPlanDefinition {\n field: string;\n addKey: keyof UpdateCommandOptions;\n removeKey?: keyof UpdateCommandOptions;\n clearKey: keyof UpdateCommandOptions;\n replaceKey?: keyof UpdateCommandOptions;\n}\n\nconst COLLECTION_MUTATION_PLAN_DEFINITIONS: CollectionMutationPlanDefinition[] = [\n {\n field: \"dependencies\",\n addKey: \"dep\",\n removeKey: \"depRemove\",\n clearKey: \"clearDeps\",\n replaceKey: \"replaceDeps\",\n },\n {\n field: \"comments\",\n addKey: \"comment\",\n clearKey: \"clearComments\",\n },\n {\n field: \"notes\",\n addKey: \"note\",\n clearKey: \"clearNotes\",\n },\n {\n field: \"learnings\",\n addKey: \"learning\",\n clearKey: \"clearLearnings\",\n },\n {\n field: \"files\",\n addKey: \"file\",\n clearKey: \"clearFiles\",\n },\n {\n field: \"tests\",\n addKey: \"test\",\n clearKey: \"clearTests\",\n replaceKey: \"replaceTests\",\n },\n {\n field: \"docs\",\n addKey: \"doc\",\n clearKey: \"clearDocs\",\n },\n {\n field: \"reminders\",\n addKey: \"reminder\",\n clearKey: \"clearReminders\",\n },\n {\n field: \"events\",\n addKey: \"event\",\n clearKey: \"clearEvents\",\n },\n {\n field: \"type_options\",\n addKey: \"typeOption\",\n clearKey: \"clearTypeOptions\",\n },\n];\n\nconst UNSET_FIELD_ALIASES: Record<string, string> = {\n close_reason: \"close_reason\",\n \"close-reason\": \"close_reason\",\n deadline: \"deadline\",\n estimate: \"estimated_minutes\",\n estimated_minutes: \"estimated_minutes\",\n \"estimated-minutes\": \"estimated_minutes\",\n acceptance_criteria: \"acceptance_criteria\",\n \"acceptance-criteria\": \"acceptance_criteria\",\n ac: \"acceptance_criteria\",\n definition_of_ready: \"definition_of_ready\",\n \"definition-of-ready\": \"definition_of_ready\",\n order: \"order\",\n rank: \"order\",\n goal: \"goal\",\n objective: \"objective\",\n value: \"value\",\n impact: \"impact\",\n outcome: \"outcome\",\n why_now: \"why_now\",\n \"why-now\": \"why_now\",\n assignee: \"assignee\",\n parent: \"parent\",\n reviewer: \"reviewer\",\n risk: \"risk\",\n confidence: \"confidence\",\n sprint: \"sprint\",\n release: \"release\",\n blocked_by: \"blocked_by\",\n \"blocked-by\": \"blocked_by\",\n blocked_reason: \"blocked_reason\",\n \"blocked-reason\": \"blocked_reason\",\n unblock_note: \"unblock_note\",\n \"unblock-note\": \"unblock_note\",\n reporter: \"reporter\",\n severity: \"severity\",\n environment: \"environment\",\n repro_steps: \"repro_steps\",\n \"repro-steps\": \"repro_steps\",\n resolution: \"resolution\",\n expected_result: \"expected_result\",\n \"expected-result\": \"expected_result\",\n actual_result: \"actual_result\",\n \"actual-result\": \"actual_result\",\n affected_version: \"affected_version\",\n \"affected-version\": \"affected_version\",\n fixed_version: \"fixed_version\",\n \"fixed-version\": \"fixed_version\",\n component: \"component\",\n regression: \"regression\",\n customer_impact: \"customer_impact\",\n \"customer-impact\": \"customer_impact\",\n type_options: \"type_options\",\n \"type-options\": \"type_options\",\n tags: \"tags\",\n};\n\ninterface UpdateManyCheckpoint {\n schema_version: number;\n id: string;\n created_at: string;\n author: string;\n status_filter: string | null;\n list_filters: Record<string, unknown>;\n update_options: Record<string, unknown>;\n items: MutationCheckpointItem[];\n}\n\n/**\n * Documents the update many command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpdateManyCommandOptions {\n status?: string;\n list: ListOptions;\n update: UpdateCommandOptions;\n dryRun?: boolean;\n rollback?: string;\n checkpoint?: boolean;\n}\n\ninterface PlannedChange {\n field: string;\n before: unknown;\n after: unknown;\n}\n\ninterface PlannedItemDiff {\n id: string;\n changes: PlannedChange[];\n}\n\ninterface UpdateManyApplyResultRow {\n id: string;\n status: \"updated\" | \"failed\" | \"skipped\";\n changed_fields?: string[];\n warnings?: string[];\n error?: string;\n}\n\ninterface UpdateManyRollbackResultRow {\n id: string;\n status: \"restored\" | \"failed\";\n changed_fields?: string[];\n warnings?: string[];\n error?: string;\n}\n\n/**\n * Documents the update many result payload exchanged by command, SDK, and package integrations.\n */\nexport interface UpdateManyResult {\n mode: \"dry_run\" | \"apply\" | \"rollback\";\n matched_count: number;\n dry_run: boolean;\n filters?: Record<string, unknown>;\n planned_update_options?: Record<string, unknown>;\n item_plans?: PlannedItemDiff[];\n checkpoint?: {\n id: string;\n created_at: string;\n path: string;\n rollback_command: string;\n };\n updated_count?: number;\n skipped_count?: number;\n failed_count?: number;\n restored_count?: number;\n rollback_checkpoint_id?: string;\n rows?: UpdateManyApplyResultRow[] | UpdateManyRollbackResultRow[];\n ids: string[];\n}\n\nfunction sanitizeUpdateOptionsForSummary(options: UpdateCommandOptions): Record<string, unknown> {\n const summary: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(options) as Array<[keyof UpdateCommandOptions, unknown]>) {\n if (NON_MUTATION_UPDATE_OPTION_KEYS.has(key)) {\n continue;\n }\n if (value === undefined) {\n continue;\n }\n summary[key] = value;\n }\n return summary;\n}\n\nfunction hasAnyUpdateMutationInput(options: UpdateCommandOptions): boolean {\n return Object.keys(sanitizeUpdateOptionsForSummary(options)).length > 0;\n}\n\nfunction toComparablePreviewValue(optionKey: keyof UpdateCommandOptions, value: unknown): unknown {\n if (value === undefined) {\n return undefined;\n }\n if (optionKey === \"priority\") {\n const parsed = Number(String(value).trim());\n return Number.isInteger(parsed) ? parsed : String(value).trim();\n }\n if (optionKey === \"estimatedMinutes\" || optionKey === \"order\" || optionKey === \"rank\") {\n const parsed = Number(String(value).trim());\n return Number.isFinite(parsed) ? parsed : String(value).trim();\n }\n if (optionKey === \"regression\") {\n const normalized = String(value).trim().toLowerCase();\n if (normalized === \"true\" || normalized === \"1\") {\n return true;\n }\n if (normalized === \"false\" || normalized === \"0\") {\n return false;\n }\n }\n if (typeof value === \"string\") {\n return value.trim();\n }\n return value;\n}\n\nfunction normalizeUnsetField(rawField: string): string {\n const normalized = rawField.trim().toLowerCase().replaceAll(\"-\", \"_\");\n return UNSET_FIELD_ALIASES[normalized] ?? normalized;\n}\n\nfunction areValuesEqual(left: unknown, right: unknown): boolean {\n return stableValueEquals(left, right);\n}\n\nfunction normalizeCollectionBeforeValue(field: string, value: unknown): unknown {\n if (value !== undefined) {\n return value;\n }\n if (field === \"type_options\") {\n return {};\n }\n return [];\n}\n\nfunction collectionValueCount(field: string, value: unknown): number {\n if (Array.isArray(value)) {\n return value.length;\n }\n if (field === \"type_options\" && value && typeof value === \"object\") {\n return Object.keys(value as Record<string, unknown>).length;\n }\n return 0;\n}\n\nfunction buildCollectionMutationPlans(row: Record<string, unknown>, update: UpdateCommandOptions): PlannedChange[] {\n const changes: PlannedChange[] = [];\n for (const definition of COLLECTION_MUTATION_PLAN_DEFINITIONS) {\n const addValues = update[definition.addKey];\n const removeValues = definition.removeKey ? update[definition.removeKey] : undefined;\n const addCount = Array.isArray(addValues) ? addValues.length : 0;\n const removeCount = Array.isArray(removeValues) ? removeValues.length : 0;\n const clear = update[definition.clearKey] === true;\n const replace = definition.replaceKey ? update[definition.replaceKey] === true : false;\n if (!clear && !replace && addCount === 0 && removeCount === 0) {\n continue;\n }\n\n const before = normalizeCollectionBeforeValue(definition.field, row[definition.field]);\n const beforeCount = collectionValueCount(definition.field, before);\n const operation = replace ? \"replace\" : clear ? \"clear_or_reset\" : removeCount > 0 ? \"merge_remove\" : \"append\";\n changes.push({\n field: definition.field,\n before,\n after: {\n operation,\n clear,\n replace,\n add_count: addCount,\n remove_count: removeCount,\n before_count: beforeCount,\n },\n });\n }\n return changes;\n}\n\nfunction normalizeExistingTags(value: unknown): string[] {\n if (!Array.isArray(value)) {\n return [];\n }\n return value.filter((tag): tag is string => typeof tag === \"string\");\n}\n\n// Tags support three mutation modes that compose: --tags replaces, --add-tags\n// extends, --remove-tags prunes. Replicate runUpdate's resolution order so the\n// dry-run preview and the apply-mode actionable detection both account for\n// additive/subtractive tag mutations (a --add-tags-only update must NOT be\n// treated as a no-op skip).\nfunction buildTagMutationPlan(row: Record<string, unknown>, update: UpdateCommandOptions): PlannedChange | undefined {\n const hasReplace = update.tags !== undefined;\n const hasAdd = Array.isArray(update.addTags) && update.addTags.length > 0;\n const hasRemove = Array.isArray(update.removeTags) && update.removeTags.length > 0;\n if (!hasReplace && !hasAdd && !hasRemove) {\n return undefined;\n }\n const existing = normalizeExistingTags(row.tags);\n const baseTags = hasReplace ? parseTags(update.tags as string) : existing;\n const withAdditions = mergeAdditiveTags(baseTags, update.addTags);\n const after = applyTagRemovals(withAdditions, update.removeTags).slice().sort((a, b) => a.localeCompare(b));\n const before = existing.slice().sort((a, b) => a.localeCompare(b));\n if (areValuesEqual(before, after)) {\n return undefined;\n }\n return { field: \"tags\", before: existing, after };\n}\n\nfunction buildPlannedItemDiff(\n item: ListedItem,\n update: UpdateCommandOptions = {},\n runtimeFieldRegistry: RuntimeFieldRegistry,\n): PlannedItemDiff {\n const safeUpdate = update;\n const row = toItemRecord(item);\n const changes: PlannedChange[] = [];\n const tagPlan = buildTagMutationPlan(row, safeUpdate);\n if (tagPlan) {\n changes.push(tagPlan);\n }\n for (const [optionKey, itemKey] of Object.entries(UPDATE_OPTION_TO_ITEM_KEY) as Array<[keyof UpdateCommandOptions, string]>) {\n const candidate = safeUpdate[optionKey];\n if (candidate === undefined) {\n continue;\n }\n const before = row[itemKey];\n const after = toComparablePreviewValue(optionKey, candidate);\n if (areValuesEqual(before, after)) {\n continue;\n }\n changes.push({\n field: itemKey,\n before,\n after,\n });\n }\n changes.push(...buildCollectionMutationPlans(row, safeUpdate));\n\n const runtimeFieldUpdates = collectRuntimeUpdateFieldValues(\n safeUpdate as Record<string, unknown>,\n runtimeFieldRegistry,\n [\"update_many\"],\n );\n for (const [fieldKey, fieldValue] of Object.entries(runtimeFieldUpdates)) {\n const before = row[fieldKey];\n if (areValuesEqual(before, fieldValue)) {\n continue;\n }\n changes.push({\n field: fieldKey,\n before,\n after: fieldValue,\n });\n }\n\n if (safeUpdate.unset && safeUpdate.unset.length > 0) {\n for (const rawUnsetField of safeUpdate.unset) {\n const field = normalizeUnsetField(rawUnsetField);\n const before = row[field];\n if (before === undefined) {\n continue;\n }\n changes.push({\n field,\n before,\n after: null,\n });\n }\n }\n\n return {\n id: item.id,\n changes,\n };\n}\n\nfunction normalizeStatusFilter(value: string | undefined, statusRegistry: RuntimeStatusRegistry): ItemStatus | undefined {\n if (value === undefined) {\n return undefined;\n }\n const normalized = normalizeStatusInput(value, statusRegistry);\n if (!normalized) {\n const allowedStatuses = statusRegistry.definitions.map((definition) => definition.id);\n throw new PmCliError(\n `Invalid --filter-status value \"${value}\". Allowed: ${allowedStatuses.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n }\n return normalized;\n}\n\nfunction rejectBlankIdsFilter(list: ListOptions | undefined): void {\n if (list?.ids != null && String(list.ids).trim().length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n}\n\n// GH-256: validate planned scalar enum/format fields up front so a `--dry-run`\n// preview rejects globally-invalid values exactly as apply would (true\n// preview==apply parity), and so apply itself fails fast before creating an\n// orphan checkpoint. Only VALUE/ENUM/FORMAT correctness is checked here — these\n// are invalid regardless of the matched item. Per-item governance and\n// workflow-transition rules stay in the apply path (runUpdate). Each field is\n// validated only when the caller actually provided it, reusing the exact same\n// resolvers and error messages runUpdate raises so single/bulk/dry-run stay\n// consistent.\nfunction assertPlannedUpdateValuesValid(\n update: UpdateCommandOptions,\n settings: PmSettings,\n statusRegistry: RuntimeStatusRegistry,\n pmRoot: string,\n): void {\n if (update.priority !== undefined) {\n resolvePriority(update.priority);\n }\n if (update.type !== undefined) {\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n if (!resolveTypeName(update.type, typeRegistry)) {\n throw new PmCliError(\n buildInvalidTypeError(update.type, typeRegistry.types, resolveItemTypesFilePath(pmRoot, settings.schema)),\n EXIT_CODE.USAGE,\n );\n }\n }\n if (update.status !== undefined && !normalizeStatusInput(update.status, statusRegistry)) {\n const allowedStatuses = statusRegistry.definitions.map((definition) => definition.id);\n throw new PmCliError(\n `Invalid --status value \"${update.status}\". Allowed: ${allowedStatuses.join(\", \")}`,\n EXIT_CODE.USAGE,\n );\n }\n if (update.deadline !== undefined) {\n resolveIsoOrRelative(update.deadline, new Date(), \"deadline\");\n }\n}\n\nasync function runUpdateManyRollback(params: {\n pmRoot: string;\n rollbackId: string;\n options: UpdateManyCommandOptions;\n global: GlobalOptions;\n}): Promise<UpdateManyResult> {\n const checkpoint = await loadMutationCheckpoint(\n params.pmRoot,\n UPDATE_MANY_CHECKPOINT_SUBDIR,\n params.rollbackId,\n UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION,\n );\n const restoreMessage = params.options.update?.message ?? `Rollback update-many checkpoint ${checkpoint.id}`;\n const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) =>\n runRestore(\n id,\n targetUpdatedAt,\n {\n author: params.options.update?.author,\n message: restoreMessage,\n force: params.options.update?.force ?? true,\n },\n params.global,\n ),\n );\n return {\n mode: \"rollback\",\n matched_count: checkpoint.items.length,\n dry_run: false,\n rollback_checkpoint_id: checkpoint.id,\n checkpoint: {\n id: checkpoint.id,\n created_at: checkpoint.created_at,\n path: checkpoint.path,\n rollback_command: `pm update-many --rollback ${checkpoint.id}`,\n },\n restored_count: rollback.restored_ids.length,\n failed_count: rollback.failed_count,\n rows: rollback.rows,\n ids: rollback.restored_ids,\n };\n}\n\nasync function writeUpdateManyCheckpoint(params: {\n pmRoot: string;\n checkpointId: string;\n nowValue: string;\n options: UpdateManyCommandOptions;\n statusFilter: string | undefined;\n filters: Record<string, unknown>;\n updateSummary: Record<string, unknown>;\n checkpointItems: MutationCheckpointItem[];\n}): Promise<UpdateManyResult[\"checkpoint\"]> {\n const checkpointPayload: UpdateManyCheckpoint = {\n schema_version: UPDATE_MANY_CHECKPOINT_SCHEMA_VERSION,\n id: params.checkpointId,\n created_at: params.nowValue,\n author: resolveAuthor(params.options.update?.author, \"unknown\"),\n status_filter: params.statusFilter ?? null,\n list_filters: params.filters,\n update_options: params.updateSummary,\n items: params.checkpointItems,\n };\n const checkpointPath = await writeMutationCheckpoint(\n params.pmRoot,\n UPDATE_MANY_CHECKPOINT_SUBDIR,\n params.checkpointId,\n checkpointPayload,\n );\n return {\n id: params.checkpointId,\n created_at: params.nowValue,\n path: checkpointPath,\n rollback_command: `pm update-many --rollback ${params.checkpointId}`,\n };\n}\n\n\n/**\n * Implements run update many for the public runtime surface of this module.\n */\nexport async function runUpdateMany(options: UpdateManyCommandOptions, global: GlobalOptions): Promise<UpdateManyResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);\n\n const dryRun = options.dryRun === true;\n const rollbackId = typeof options.rollback === \"string\" ? options.rollback : undefined;\n const updateSummary = sanitizeUpdateOptionsForSummary(options.update);\n rejectBlankIdsFilter(options.list);\n\n if (rollbackId) {\n if (dryRun) {\n throw new PmCliError(\"--dry-run cannot be combined with --rollback\", EXIT_CODE.USAGE);\n }\n if (hasListFilters(options.list, options.status)) {\n throw new PmCliError(\"Rollback mode does not accept filter options\", EXIT_CODE.USAGE);\n }\n if (Object.keys(updateSummary).length > 0) {\n throw new PmCliError(\"Rollback mode does not accept update mutation flags\", EXIT_CODE.USAGE);\n }\n return runUpdateManyRollback({ pmRoot, rollbackId, options, global });\n }\n\n if (!hasAnyUpdateMutationInput(options.update)) {\n throw new PmCliError(\n `No update-many mutation flags provided. Add at least one mutation flag (for example: ${UPDATE_MANY_MUTATION_FLAG_GUIDANCE}).`,\n EXIT_CODE.USAGE,\n );\n }\n\n // GH-256: validate planned scalar values before listing/checkpointing so\n // dry-run previews and apply both reject globally-invalid enum/format input.\n assertPlannedUpdateValuesValid(options.update, settings, statusRegistry, pmRoot);\n\n const statusFilter = normalizeStatusFilter(options.status, statusRegistry);\n const listed = await runList(statusFilter, { ...options.list, includeBody: true }, global);\n const planned = listed.items.map((item) => buildPlannedItemDiff(item, options.update, runtimeFieldRegistry));\n const actionable = planned.filter((row) => row.changes.length > 0);\n if (dryRun) {\n return {\n mode: \"dry_run\",\n matched_count: listed.items.length,\n dry_run: true,\n filters: listed.filters,\n planned_update_options: updateSummary,\n item_plans: planned,\n ids: [],\n };\n }\n\n if (actionable.length === 0) {\n return {\n mode: \"apply\",\n matched_count: listed.items.length,\n dry_run: false,\n filters: listed.filters,\n planned_update_options: updateSummary,\n updated_count: 0,\n skipped_count: listed.items.length,\n failed_count: 0,\n rows: planned.map((row) => ({\n id: row.id,\n status: \"skipped\" as const,\n })),\n ids: [],\n };\n }\n\n const nowValue = nowIso();\n const checkpointId = createCheckpointId(UPDATE_MANY_CHECKPOINT_SUBDIR, nowValue);\n const checkpointEnabled = options.checkpoint !== false;\n const checkpointItems: MutationCheckpointItem[] = listed.items\n .filter((item) => actionable.some((candidate) => candidate.id === item.id))\n .map((item) => ({\n id: item.id,\n target_updated_at: item.updated_at,\n }));\n\n let checkpointInfo: UpdateManyResult[\"checkpoint\"] | undefined;\n if (checkpointEnabled) {\n checkpointInfo = await writeUpdateManyCheckpoint({\n pmRoot,\n checkpointId,\n nowValue,\n options,\n statusFilter,\n filters: listed.filters,\n updateSummary,\n checkpointItems,\n });\n }\n\n const applyRows: UpdateManyApplyResultRow[] = [];\n const updatedIds: string[] = [];\n const updateMessage = options.update.message ?? `update-many apply ${checkpointId}`;\n const actionableById = new Set(actionable.map((row) => row.id));\n for (const item of listed.items) {\n if (!actionableById.has(item.id)) {\n applyRows.push({ id: item.id, status: \"skipped\" });\n continue;\n }\n try {\n const result = await runUpdate(\n item.id,\n {\n ...options.update,\n message: updateMessage,\n runtimeFieldCommands: [\"update_many\"],\n },\n global,\n );\n applyRows.push({\n id: item.id,\n status: \"updated\",\n changed_fields: result.changed_fields,\n warnings: result.warnings,\n });\n updatedIds.push(item.id);\n } catch (error: unknown) {\n applyRows.push({\n id: item.id,\n status: \"failed\",\n error: toErrorMessage(error),\n });\n }\n }\n\n const updatedCount = applyRows.filter((row) => row.status === \"updated\").length;\n const skippedCount = applyRows.filter((row) => row.status === \"skipped\").length;\n const failedCount = applyRows.filter((row) => row.status === \"failed\").length;\n\n return {\n mode: \"apply\",\n matched_count: listed.items.length,\n dry_run: false,\n filters: listed.filters,\n planned_update_options: updateSummary,\n ...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),\n updated_count: updatedCount,\n skipped_count: skippedCount,\n failed_count: failedCount,\n rows: applyRows,\n ids: updatedIds,\n };\n}\n\nexport const _testOnlyUpdateManyCommand = {\n assertPlannedUpdateValuesValid,\n buildCollectionMutationPlans,\n buildPlannedItemDiff,\n buildTagMutationPlan,\n collectionValueCount,\n hasAnyUpdateMutationInput,\n hasListFilters,\n normalizeStatusFilter,\n normalizeCollectionBeforeValue,\n normalizeExistingTags,\n normalizeUnsetField,\n rejectBlankIdsFilter,\n sanitizeUpdateOptionsForSummary,\n toComparablePreviewValue,\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAM,wCAAwC;AAC9C,IAAM,gCAAgC;AAEtC,IAAM,kCAAkC,oBAAI,IAAgC;EAC1E;EACA;EACA;EACA;EACA;CACD;AAED,IAAM,qCAAqC;EACzC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,KAAK,IAAI;AAEX,IAAM,4BAAiF;EACrF,OAAO;EACP,aAAa;EACb,MAAM;EACN,QAAQ;EACR,aAAa;EACb,UAAU;EACV,MAAM;EACN,UAAU;EACV,kBAAkB;EAClB,oBAAoB;EACpB,mBAAmB;EACnB,OAAO;EACP,MAAM;EACN,WAAW;EACX,OAAO;EACP,QAAQ;EACR,SAAS;EACT,QAAQ;EACR,UAAU;EACV,QAAQ;EACR,UAAU;EACV,MAAM;EACN,YAAY;EACZ,QAAQ;EACR,SAAS;EACT,WAAW;EACX,eAAe;EACf,aAAa;EACb,UAAU;EACV,UAAU;EACV,aAAa;EACb,YAAY;EACZ,YAAY;EACZ,gBAAgB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KAAK;QACb,IAAI,KAAK;QACT,QAAQ;QACR,OAAO,eAAe,KAAK;OAC5B;IACH;EACF;AAEA,QAAM,eAAe,UAAU,OAAO,CAAC,QAAQ,IAAI,WAAW,SAAS,EAAE;AACzE,QAAM,eAAe,UAAU,OAAO,CAAC,QAAQ,IAAI,WAAW,SAAS,EAAE;AACzE,QAAM,cAAc,UAAU,OAAO,CAAC,QAAQ,IAAI,WAAW,QAAQ,EAAE;AAEvE,SAAO;IACL,MAAM;IACN,eAAe,OAAO,MAAM;IAC5B,SAAS;IACT,SAAS,OAAO;IAChB,wBAAwB;IACxB,GAAI,iBAAiB,EAAE,YAAY,eAAc,IAAK,CAAA;IACtD,eAAe;IACf,eAAe;IACf,cAAc;IACd,MAAM;IACN,KAAK;;AAET;AAEO,IAAM,6BAA6B;EACxC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;",
6
6
  "names": ["global"]
7
7
  }
@@ -2,27 +2,23 @@ import {
2
2
  clearFocusedItem,
3
3
  getFocusedItem,
4
4
  setFocusedItem
5
- } from "./chunk-MUH7A3FD.js";
6
- import {
7
- buildItemNotFoundError,
8
- locateItem,
9
- readLocatedItem
10
- } from "./chunk-5VAA4YHR.js";
11
- import {
12
- normalizeItemId
13
- } from "./chunk-NMP5I3I5.js";
5
+ } from "./chunk-WCWVEXGA.js";
14
6
  import {
15
7
  PmCliError,
8
+ buildItemNotFoundError,
16
9
  getActiveExtensionRegistrations,
10
+ locateItem,
11
+ normalizeItemId,
12
+ readLocatedItem,
17
13
  readSettings
18
- } from "./chunk-SHQY2IDC.js";
14
+ } from "./chunk-YNCFP5AR.js";
19
15
  import {
20
16
  EXIT_CODE,
21
17
  getSettingsPath,
22
18
  pathExists,
23
19
  resolveItemTypeRegistry,
24
20
  resolvePmRoot
25
- } from "./chunk-LK6XLOGP.js";
21
+ } from "./chunk-LCFJ7XAM.js";
26
22
 
27
23
  // dist/cli/commands/focus.js
28
24
  !(function() {
@@ -105,4 +101,4 @@ function nonEmptyTitleOrNull(title) {
105
101
  export {
106
102
  runFocus
107
103
  };
108
- //# sourceMappingURL=chunk-MVSP7WGJ.js.map
104
+ //# sourceMappingURL=chunk-S6VC2A2K.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../cli/commands/focus.ts"],
4
4
  "sourcesContent": ["/**\n * @module cli/commands/focus\n *\n * Implements the pm focus command surface and its agent-facing runtime behavior.\n */\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { normalizeItemId } from \"../../core/item/id.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.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 {\n clearFocusedItem,\n getFocusedItem,\n setFocusedItem,\n} from \"../../core/session/session-state.js\";\nimport { buildItemNotFoundError, locateItem, readLocatedItem } 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 focus options payload exchanged by command, SDK, and package integrations.\n */\nexport interface FocusOptions {\n clear?: boolean;\n}\n\n/**\n * Documents the focus result payload exchanged by command, SDK, and package integrations.\n */\nexport interface FocusResult {\n action: \"set\" | \"clear\" | \"show\";\n focused_item: string | null;\n title: string | null;\n message: string;\n}\n\nasync function ensureInitialized(pmRoot: string): Promise<void> {\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n}\n\n/**\n * Implements run focus for the public runtime surface of this module.\n */\nexport async function runFocus(\n id: string | undefined,\n options: FocusOptions,\n global: GlobalOptions,\n): Promise<FocusResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n await ensureInitialized(pmRoot);\n\n const clear = options.clear === true;\n\n if (clear) {\n if (id !== undefined) {\n throw new PmCliError(\n \"pm focus --clear does not take an item id. Use 'pm focus --clear' to clear focus or 'pm focus <id>' to set it.\",\n EXIT_CODE.USAGE,\n );\n }\n await clearFocusedItem(pmRoot);\n return {\n action: \"clear\",\n focused_item: null,\n title: null,\n message: \"Focus cleared. New items will not inherit a default parent.\",\n };\n }\n\n if (id === undefined) {\n const current = await getFocusedItem(pmRoot);\n if (current === undefined) {\n return {\n action: \"show\",\n focused_item: null,\n title: null,\n message: \"No focus set. Use 'pm focus <id>' to set a default parent for new items.\",\n };\n }\n const title = await resolveFocusedTitle(pmRoot, current);\n return {\n action: \"show\",\n focused_item: current,\n title,\n message: `Focused on ${current}${title ? ` (${title})` : \"\"}. New items default --parent to it.`,\n };\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n throw await buildItemNotFoundError(pmRoot, id, settings.id_prefix, typeRegistry.type_to_folder);\n }\n const normalizedId = normalizeItemId(located.id, settings.id_prefix);\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n const title = nonEmptyTitleOrNull(loaded.document.metadata.title);\n await setFocusedItem(pmRoot, normalizedId);\n return {\n action: \"set\",\n focused_item: normalizedId,\n title,\n message: `Focused on ${normalizedId}${title ? ` (${title})` : \"\"}. New items default --parent to it (override with --parent or clear via 'pm focus --clear').`,\n };\n}\n\nasync function resolveFocusedTitle(pmRoot: string, id: string): Promise<string | null> {\n // The tracker is already known to be initialized (ensureInitialized ran), so\n // readSettings/locateItem behave like the `pm get` read path: a deleted/stale\n // focused item simply locates to null and yields no title hint.\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const located = await locateItem(pmRoot, id, settings.id_prefix, settings.item_format, typeRegistry.type_to_folder);\n if (!located) {\n return null;\n }\n const loaded = await readLocatedItem(located, { schema: settings.schema });\n return nonEmptyTitleOrNull(loaded.document.metadata.title);\n}\n\nfunction nonEmptyTitleOrNull(title: string): string | null {\n return title.trim().length > 0 ? title : null;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,eAAe,kBAAkB,QAAc;AAC7C,MAAI,CAAE,MAAM,WAAW,gBAAgB,MAAM,CAAC,GAAI;AAChD,UAAM,IAAI,WAAW,iCAAiC,MAAM,wBAAwB,UAAU,SAAS;EACzG;AACF;AAKA,eAAsB,SACpB,IACA,SACAA,SAAqB;AAErB,QAAM,SAAS,cAAc,QAAQ,IAAG,GAAIA,QAAO,IAAI;AACvD,QAAM,kBAAkB,MAAM;AAE9B,QAAM,QAAQ,QAAQ,UAAU;AAEhC,MAAI,OAAO;AACT,QAAI,OAAO,QAAW;AACpB,YAAM,IAAI,WACR,kHACA,UAAU,KAAK;IAEnB;AACA,UAAM,iBAAiB,MAAM;AAC7B,WAAO;MACL,QAAQ;MACR,cAAc;MACd,OAAO;MACP,SAAS;;EAEb;AAEA,MAAI,OAAO,QAAW;AACpB,UAAM,UAAU,MAAM,eAAe,MAAM;AAC3C,QAAI,YAAY,QAAW;AACzB,aAAO;QACL,QAAQ;QACR,cAAc;QACd,OAAO;QACP,SAAS;;IAEb;AACA,UAAMC,SAAQ,MAAM,oBAAoB,QAAQ,OAAO;AACvD,WAAO;MACL,QAAQ;MACR,cAAc;MACd,OAAAA;MACA,SAAS,cAAc,OAAO,GAAGA,SAAQ,KAAKA,MAAK,MAAM,EAAE;;EAE/D;AAEA,QAAM,WAAW,MAAM,aAAa,MAAM;AAC1C,QAAM,eAAe,wBAAwB,UAAU,gCAA+B,CAAE;AACxF,QAAM,UAAU,MAAM,WAAW,QAAQ,IAAI,SAAS,WAAW,SAAS,aAAa,aAAa,cAAc;AAClH,MAAI,CAAC,SAAS;AACZ,UAA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,WAAO;EACT;AACA,QAAM,SAAS,MAAM,gBAAgB,SAAS,EAAE,QAAQ,SAAS,OAAM,CAAE;AACzE,SAAO,oBAAoB,OAAO,SAAS,SAAS,KAAK;AAC3D;AAEA,SAAS,oBAAoB,OAAa;AACxC,SAAO,MAAM,KAAI,EAAG,SAAS,IAAI,QAAQ;AAC3C;",
6
6
  "names": ["global", "title"]
7
7
  }
@@ -1,12 +1,12 @@
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]="9c123f79-efa7-5fa3-84b5-aa8c5ab9e979")}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]="ed5f4b9f-4dda-504d-ae0e-b14761394ccb")}catch(e){}}();
3
3
  import {
4
4
  parseAnnotationTextInput,
5
5
  runAnnotationCommand
6
- } from "./chunk-EKFNL33R.js";
6
+ } from "./chunk-GLS6VMWI.js";
7
7
  import {
8
8
  createStdinTokenResolver
9
- } from "./chunk-IWVU4C2F.js";
9
+ } from "./chunk-DR2V5OIV.js";
10
10
 
11
11
  // dist/cli/commands/learnings.js
12
12
  async function runLearnings(id, options, global) {
@@ -14,7 +14,7 @@ async function runLearnings(id, options, global) {
14
14
  const addInput = options.add === void 0 ? void 0 : await stdinResolver.resolveValue(options.add, "--add");
15
15
  return runAnnotationCommand(id, options, global, {
16
16
  // addInput is defined whenever options.add is defined (see resolveValue), so the cast is safe.
17
- input: options.add === void 0 ? { mode: "list" } : { mode: "add", value: addInput, emptyFlag: "--add" },
17
+ input: options.add === void 0 ? { mode: "list" } : { mode: "add", value: addInput, rawValue: options.add, emptyFlag: "--add" },
18
18
  collectionKey: "learnings",
19
19
  op: "learning_add",
20
20
  parseText: (raw) => parseAnnotationTextInput(raw),
@@ -33,6 +33,6 @@ async function runLearnings(id, options, global) {
33
33
  export {
34
34
  runLearnings
35
35
  };
36
- //# sourceMappingURL=chunk-45FYNUFJ.js.map
36
+ //# sourceMappingURL=chunk-SIM5JDON.js.map
37
37
 
38
- //# debugId=9c123f79-efa7-5fa3-84b5-aa8c5ab9e979
38
+ //# debugId=ed5f4b9f-4dda-504d-ae0e-b14761394ccb
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../cli/commands/learnings.ts"],"sourcesContent":["/**\n * @module cli/commands/learnings\n *\n * Implements the pm learnings command surface and its agent-facing runtime behavior.\n */\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { createStdinTokenResolver } from \"../../core/item/parse.js\";\nimport type { LogNote } from \"../../types/index.js\";\nimport { parseAnnotationTextInput, runAnnotationCommand } from \"./annotation-command.js\";\n\n/**\n * Documents the learnings command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface LearningsCommandOptions {\n add?: string;\n limit?: string;\n author?: string;\n message?: string;\n allowAuditLearning?: boolean;\n allowAuditComment?: boolean;\n force?: boolean;\n}\n\n/**\n * Documents the learnings result payload exchanged by command, SDK, and package integrations.\n */\nexport interface LearningsResult {\n id: string;\n learnings: LogNote[];\n count: number;\n}\n\n/**\n * Implements run learnings for the public runtime surface of this module.\n */\nexport async function runLearnings(\n id: string,\n options: LearningsCommandOptions,\n global: GlobalOptions,\n): Promise<LearningsResult> {\n const stdinResolver = createStdinTokenResolver();\n const addInput = options.add === undefined ? undefined : await stdinResolver.resolveValue(options.add, \"--add\");\n\n return runAnnotationCommand<\"learnings\", LogNote>(id, options, global, {\n // addInput is defined whenever options.add is defined (see resolveValue), so the cast is safe.\n input: options.add === undefined ? { mode: \"list\" } : { mode: \"add\", value: addInput as string, emptyFlag: \"--add\" },\n collectionKey: \"learnings\",\n op: \"learning_add\",\n parseText: (raw) => parseAnnotationTextInput(raw),\n allowAuditBypass: Boolean(options.allowAuditLearning || options.allowAuditComment),\n conflictGuidance: {\n required:\n \"For append-only learning audits on another owner's item, prefer --allow-audit-learning (legacy alias: --allow-audit-comment) before considering --force.\",\n examples: ['pm learnings pm-a1b2 --add \"audit learning\" --author \"reviewer\" --allow-audit-learning'],\n nextSteps: [\n \"Retry with --allow-audit-learning (or legacy --allow-audit-comment) for append-only learning audits that do not mutate item metadata beyond learnings.\",\n \"Use --force only when an ownership override is explicitly approved.\",\n ],\n },\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAmCA,eAAsB,aACpB,IACA,SACA,QAAqB;AAErB,QAAM,gBAAgB,yBAAwB;AAC9C,QAAM,WAAW,QAAQ,QAAQ,SAAY,SAAY,MAAM,cAAc,aAAa,QAAQ,KAAK,OAAO;AAE9G,SAAO,qBAA2C,IAAI,SAAS,QAAQ;;IAErE,OAAO,QAAQ,QAAQ,SAAY,EAAE,MAAM,OAAM,IAAK,EAAE,MAAM,OAAO,OAAO,UAAoB,WAAW,QAAO;IAClH,eAAe;IACf,IAAI;IACJ,WAAW,CAAC,QAAQ,yBAAyB,GAAG;IAChD,kBAAkB,QAAQ,QAAQ,sBAAsB,QAAQ,iBAAiB;IACjF,kBAAkB;MAChB,UACE;MACF,UAAU,CAAC,wFAAwF;MACnG,WAAW;QACT;QACA;;;GAGL;AACH","debugId":"9c123f79-efa7-5fa3-84b5-aa8c5ab9e979"}
1
+ {"version":3,"sources":["../../../../../../../../cli/commands/learnings.ts"],"sourcesContent":["/**\n * @module cli/commands/learnings\n *\n * Implements the pm learnings command surface and its agent-facing runtime behavior.\n */\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { createStdinTokenResolver } from \"../../core/item/parse.js\";\nimport type { LogNote } from \"../../types/index.js\";\nimport { parseAnnotationTextInput, runAnnotationCommand } from \"./annotation-command.js\";\n\n/**\n * Documents the learnings command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface LearningsCommandOptions {\n add?: string;\n limit?: string;\n author?: string;\n message?: string;\n allowAuditLearning?: boolean;\n allowAuditComment?: boolean;\n force?: boolean;\n}\n\n/**\n * Documents the learnings result payload exchanged by command, SDK, and package integrations.\n */\nexport interface LearningsResult {\n id: string;\n learnings: LogNote[];\n count: number;\n}\n\n/**\n * Implements run learnings for the public runtime surface of this module.\n */\nexport async function runLearnings(\n id: string,\n options: LearningsCommandOptions,\n global: GlobalOptions,\n): Promise<LearningsResult> {\n const stdinResolver = createStdinTokenResolver();\n const addInput = options.add === undefined ? undefined : await stdinResolver.resolveValue(options.add, \"--add\");\n\n return runAnnotationCommand<\"learnings\", LogNote>(id, options, global, {\n // addInput is defined whenever options.add is defined (see resolveValue), so the cast is safe.\n input: options.add === undefined\n ? { mode: \"list\" }\n : { mode: \"add\", value: addInput as string, rawValue: options.add, emptyFlag: \"--add\" },\n collectionKey: \"learnings\",\n op: \"learning_add\",\n parseText: (raw) => parseAnnotationTextInput(raw),\n allowAuditBypass: Boolean(options.allowAuditLearning || options.allowAuditComment),\n conflictGuidance: {\n required:\n \"For append-only learning audits on another owner's item, prefer --allow-audit-learning (legacy alias: --allow-audit-comment) before considering --force.\",\n examples: ['pm learnings pm-a1b2 --add \"audit learning\" --author \"reviewer\" --allow-audit-learning'],\n nextSteps: [\n \"Retry with --allow-audit-learning (or legacy --allow-audit-comment) for append-only learning audits that do not mutate item metadata beyond learnings.\",\n \"Use --force only when an ownership override is explicitly approved.\",\n ],\n },\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAmCA,eAAsB,aACpB,IACA,SACA,QAAqB;AAErB,QAAM,gBAAgB,yBAAwB;AAC9C,QAAM,WAAW,QAAQ,QAAQ,SAAY,SAAY,MAAM,cAAc,aAAa,QAAQ,KAAK,OAAO;AAE9G,SAAO,qBAA2C,IAAI,SAAS,QAAQ;;IAErE,OAAO,QAAQ,QAAQ,SACnB,EAAE,MAAM,OAAM,IACd,EAAE,MAAM,OAAO,OAAO,UAAoB,UAAU,QAAQ,KAAK,WAAW,QAAO;IACvF,eAAe;IACf,IAAI;IACJ,WAAW,CAAC,QAAQ,yBAAyB,GAAG;IAChD,kBAAkB,QAAQ,QAAQ,sBAAsB,QAAQ,iBAAiB;IACjF,kBAAkB;MAChB,UACE;MACF,UAAU,CAAC,wFAAwF;MACnG,WAAW;QACT;QACA;;;GAGL;AACH","debugId":"ed5f4b9f-4dda-504d-ae0e-b14761394ccb"}
@@ -3,16 +3,16 @@ import {
3
3
  runActiveRendererOverride,
4
4
  runActiveServiceOverrideSync,
5
5
  setActiveCommandResult
6
- } from "./chunk-SHQY2IDC.js";
6
+ } from "./chunk-YNCFP5AR.js";
7
7
  import {
8
8
  EXIT_CODE
9
- } from "./chunk-LK6XLOGP.js";
9
+ } from "./chunk-LCFJ7XAM.js";
10
10
 
11
11
  // dist/core/output/mutation-projection.js
12
12
  !(function() {
13
13
  try {
14
14
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
15
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "31ecd51a-b5e0-503b-b488-4e6a12815ffe");
15
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "3e1d237e-475e-5dbe-9e6e-2903b521208d");
16
16
  } catch (e2) {
17
17
  }
18
18
  })();
@@ -54,11 +54,15 @@ function replaceRows(envelope, rows) {
54
54
  return projected;
55
55
  }
56
56
  function projectIdOnlyResult(result) {
57
- if (!isPlainObject(result) || !isPlainObject(result.item)) {
57
+ if (!isPlainObject(result)) {
58
58
  return null;
59
59
  }
60
- const id = typeof result.item.id === "string" ? result.item.id : void 0;
61
- const status = typeof result.item.status === "string" ? result.item.status : void 0;
60
+ const subject = isPlainObject(result.item) ? result.item : isPlainObject(result.plan) ? result.plan : null;
61
+ if (subject === null) {
62
+ return null;
63
+ }
64
+ const id = typeof subject.id === "string" ? subject.id : void 0;
65
+ const status = typeof subject.status === "string" ? subject.status : void 0;
62
66
  if (!id) {
63
67
  return null;
64
68
  }
@@ -364,4 +368,4 @@ export {
364
368
  printResult,
365
369
  printError
366
370
  };
367
- //# sourceMappingURL=chunk-VPIM42PC.js.map
371
+ //# sourceMappingURL=chunk-SY75LYXR.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../../../core/output/mutation-projection.ts", "../../../../../../../../core/output/output.ts"],
4
+ "sourcesContent": ["/**\n * Shared projection helper for mutation command results.\n *\n * Mutation commands (create/update/close/append/update-many) return a result\n * envelope that carries a `changed_fields` string array. On create this array simply\n * re-lists every field the command just set, which the item echo above it already\n * shows, so for high-volume agent loops it is ~50% redundant payload. This helper\n * lets the CLI (`--no-changed-fields`) and the MCP agent path trim that array down\n * to a deterministic `changed_field_count` without losing mutation evidence.\n *\n * Compaction is deliberately scoped to the mutation envelope only:\n * - the envelope's own top-level `changed_fields` (create/update/close/append), and\n * - `rows[*].changed_fields` (update-many reports its delta per row).\n * It does NOT recurse into arbitrary nested objects, so unrelated payloads that\n * legitimately carry `changed_fields` (for example `pm history --diff` entries, or a\n * custom runtime metadata field) are left untouched.\n *\n * The helper is pure and side-effect free, reused by both the output layer and the\n * MCP server, and returns the original reference unchanged when nothing is compacted.\n */\n\n/** Controls whether mutation output keeps full changed fields or compact counts. */\nexport type ChangedFieldsMode = \"full\" | \"compact\";\n\n/**\n * Documents the mutation projection options payload exchanged by command, SDK, and package integrations.\n */\nexport interface MutationProjectionOptions {\n /** Defaults to \"full\" (unchanged output). \"compact\" drops the array, keeping a count. */\n changedFields?: ChangedFieldsMode;\n /** Return only id/status for single-item mutation envelopes. */\n idOnly?: boolean;\n}\n\nconst CHANGED_FIELDS_KEY = \"changed_fields\";\nconst CHANGED_FIELD_COUNT_KEY = \"changed_field_count\";\nconst ROWS_KEY = \"rows\";\nconst UPDATE_MANY_MUTATION_MODES = new Set([\"apply\", \"rollback\"]);\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n return false;\n }\n const proto = Object.getPrototypeOf(value);\n return proto === null || proto === Object.prototype;\n}\n\n/** Replace a single envelope's own top-level `changed_fields` array with a count. */\nfunction compactOwnChangedFields(envelope: Record<string, unknown>): Record<string, unknown> | null {\n const changedFields = envelope[CHANGED_FIELDS_KEY];\n if (!Array.isArray(changedFields)) {\n return null;\n }\n const projected: Record<string, unknown> =\n Object.getPrototypeOf(envelope) === null ? Object.create(null) : {};\n for (const [key, value] of Object.entries(envelope)) {\n if (key !== CHANGED_FIELDS_KEY) {\n projected[key] = value;\n }\n }\n projected[CHANGED_FIELD_COUNT_KEY] = changedFields.length;\n return projected;\n}\n\nfunction isMutationEnvelope(value: Record<string, unknown>): boolean {\n return \"item\" in value && Array.isArray(value[CHANGED_FIELDS_KEY]);\n}\n\nfunction isUpdateManyMutationEnvelope(value: Record<string, unknown>): boolean {\n return (\n typeof value.mode === \"string\" &&\n UPDATE_MANY_MUTATION_MODES.has(value.mode) &&\n Array.isArray(value[ROWS_KEY])\n );\n}\n\nfunction replaceRows(envelope: Record<string, unknown>, rows: unknown[]): Record<string, unknown> {\n const projected: Record<string, unknown> =\n Object.getPrototypeOf(envelope) === null ? Object.create(null) : {};\n Object.assign(projected, envelope);\n projected[ROWS_KEY] = rows;\n return projected;\n}\n\nfunction projectIdOnlyResult(result: unknown): unknown | null {\n if (!isPlainObject(result)) {\n return null;\n }\n // Plan mutations wrap the mutated subject under \"plan\" instead of \"item\";\n // both shapes honor the root --id-only contract (id + status).\n const subject = isPlainObject(result.item) ? result.item : isPlainObject(result.plan) ? result.plan : null;\n if (subject === null) {\n return null;\n }\n const id = typeof subject.id === \"string\" ? subject.id : undefined;\n const status = typeof subject.status === \"string\" ? subject.status : undefined;\n if (!id) {\n return null;\n }\n return status ? { id, status } : { id };\n}\n\nfunction compactUpdateManyRows(envelope: Record<string, unknown>): { projected: Record<string, unknown>; changed: boolean } {\n const rows = isUpdateManyMutationEnvelope(envelope) ? envelope[ROWS_KEY] : undefined;\n if (!Array.isArray(rows)) {\n return { projected: envelope, changed: false };\n }\n let rowsChanged = false;\n const nextRows = rows.map((row) => {\n if (!isPlainObject(row)) {\n return row;\n }\n const compactedRow = compactOwnChangedFields(row);\n if (compactedRow) {\n rowsChanged = true;\n return compactedRow;\n }\n return row;\n });\n return rowsChanged\n ? { projected: replaceRows(envelope, nextRows), changed: true }\n : { projected: envelope, changed: false };\n}\n\n/**\n * Returns a copy of a mutation result with the envelope `changed_fields` arrays\n * replaced by `changed_field_count` when compact mode is requested. Inputs that are\n * not a mutation envelope (or full mode) are returned unchanged (same reference).\n */\nexport function projectMutationResult(result: unknown, options: MutationProjectionOptions = {}): unknown {\n if (options.idOnly === true) {\n const idOnly = projectIdOnlyResult(result);\n if (idOnly !== null) {\n return idOnly;\n }\n }\n\n const mode = options.changedFields ?? \"full\";\n if (mode === \"full\" || !isPlainObject(result)) {\n return result;\n }\n\n let changed = false;\n let projected: Record<string, unknown> = result;\n\n const compactedTop = isMutationEnvelope(result) ? compactOwnChangedFields(result) : null;\n if (compactedTop !== null) {\n projected = compactedTop;\n changed = true;\n }\n\n const rowProjection = compactUpdateManyRows(projected);\n if (rowProjection.changed) {\n projected = rowProjection.projected;\n changed = true;\n }\n\n return changed ? projected : result;\n}\n", "/**\n * @module core/output/output\n *\n * Formats compact human and machine output for Output.\n */\nimport {\n runActiveCommandOverride,\n runActiveRendererOverride,\n runActiveServiceOverrideSync,\n setActiveCommandResult,\n} from \"../extensions/index.js\";\nimport { EXIT_CODE } from \"../shared/constants.js\";\nimport { projectMutationResult } from \"./mutation-projection.js\";\n\n/**\n * Documents the output options payload exchanged by command, SDK, and package integrations.\n */\nexport interface OutputOptions {\n json?: boolean;\n quiet?: boolean;\n /** When true, mutation results drop the verbose changed_fields array (keeps changed_field_count). */\n noChangedFields?: boolean;\n /** When true, single-item mutation results print only id and status. */\n idOnly?: boolean;\n defaultOutputFormat?: \"toon\" | \"json\";\n command?: string;\n commandArgs?: string[];\n commandOptions?: Record<string, unknown>;\n pmRoot?: string;\n}\n\ninterface NodeLikeError {\n code?: string;\n}\n\nconst NATIVE_OUTPUT_MARKER = \"__pm_native_output\";\n\nlet streamErrorHandlersInstalled = false;\ntype OutputStreamTarget = \"stdout\" | \"stderr\";\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction shouldUseNativeOutput(result: unknown): boolean {\n return isPlainObject(result) && result[NATIVE_OUTPUT_MARKER] === true;\n}\n\nfunction stripNativeOutputMarker<T>(result: T): T {\n if (!isPlainObject(result) || result[NATIVE_OUTPUT_MARKER] !== true) {\n return result;\n }\n const { [NATIVE_OUTPUT_MARKER]: _marker, ...rest } = result;\n return rest as T;\n}\n\nfunction isBrokenPipeError(error: unknown): boolean {\n return typeof error === \"object\" && error !== null && (error as NodeLikeError).code === \"EPIPE\";\n}\n\nfunction markStdoutBrokenPipeExitCode(): void {\n if (process.exitCode === undefined || process.exitCode === EXIT_CODE.SUCCESS) {\n process.exitCode = EXIT_CODE.SUCCESS;\n }\n}\n\nfunction markStderrBrokenPipeExitCode(): void {\n if (process.exitCode === undefined || process.exitCode === EXIT_CODE.SUCCESS) {\n process.exitCode = EXIT_CODE.GENERIC_FAILURE;\n }\n}\n\nfunction markBrokenPipeExitCode(target: OutputStreamTarget): void {\n if (target === \"stdout\") {\n markStdoutBrokenPipeExitCode();\n return;\n }\n markStderrBrokenPipeExitCode();\n}\n\nfunction handleUnhandledStreamError(error: unknown): void {\n const unhandled = error instanceof Error ? error : new Error(String(error));\n setImmediate(() => {\n throw unhandled;\n });\n}\n\nfunction installStreamErrorHandlers(): void {\n if (streamErrorHandlersInstalled) {\n return;\n }\n streamErrorHandlersInstalled = true;\n process.stdout.on(\"error\", (error: unknown) => {\n if (isBrokenPipeError(error)) {\n markBrokenPipeExitCode(\"stdout\");\n return;\n }\n handleUnhandledStreamError(error);\n });\n process.stderr.on(\"error\", (error: unknown) => {\n if (isBrokenPipeError(error)) {\n markBrokenPipeExitCode(\"stderr\");\n return;\n }\n handleUnhandledStreamError(error);\n });\n}\n\nfunction writeToStream(target: OutputStreamTarget, text: string): boolean {\n installStreamErrorHandlers();\n try {\n if (target === \"stdout\") {\n process.stdout.write(text);\n } else {\n process.stderr.write(text);\n }\n return true;\n } catch (error: unknown) {\n if (isBrokenPipeError(error)) {\n markBrokenPipeExitCode(target);\n return false;\n }\n throw error;\n }\n}\n\n/**\n * Implements write stdout for the public runtime surface of this module.\n */\nexport function writeStdout(text: string): boolean {\n return writeToStream(\"stdout\", text);\n}\n\n/**\n * Implements write stderr for the public runtime surface of this module.\n */\nexport function writeStderr(text: string): boolean {\n return writeToStream(\"stderr\", text);\n}\n\nfunction renderScalar(value: unknown): string {\n if (typeof value === \"string\") return JSON.stringify(value);\n if (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n if (value === null) return \"null\";\n return JSON.stringify(value);\n}\n\nfunction compactToonValue(value: unknown): unknown | undefined {\n if (value === null || value === undefined) {\n return undefined;\n }\n\n if (Array.isArray(value)) {\n const compactedEntries = value\n .map((entry) => compactToonValue(entry))\n .filter((entry): entry is unknown => entry !== undefined);\n return compactedEntries.length > 0 ? compactedEntries : undefined;\n }\n\n if (isPlainObject(value)) {\n const compacted: Record<string, unknown> = {};\n for (const [key, entry] of Object.entries(value)) {\n const compactedEntry = compactToonValue(entry);\n if (compactedEntry !== undefined) {\n compacted[key] = compactedEntry;\n }\n }\n return Object.keys(compacted).length > 0 ? compacted : undefined;\n }\n\n return value;\n}\n\nfunction renderToonValue(value: unknown, depth: number): string {\n const indent = \" \".repeat(depth);\n\n if (Array.isArray(value)) {\n if (value.length === 0) return \"[]\";\n return value\n .map((entry) => {\n if (!isPlainObject(entry) && !Array.isArray(entry)) {\n return `${indent}- ${renderScalar(entry)}`;\n }\n const rendered = renderToonValue(entry, depth + 1);\n const lines = rendered.split(\"\\n\");\n const [firstLine, ...rest] = lines;\n if (rest.length === 0) {\n return `${indent}- ${firstLine.trimStart()}`;\n }\n return `${indent}- ${firstLine.trimStart()}\\n${rest.join(\"\\n\")}`;\n })\n .join(\"\\n\");\n }\n\n if (isPlainObject(value)) {\n const entries = Object.entries(value);\n if (entries.length === 0) return \"{}\";\n return entries\n .map(([key, entry]) => {\n if (!isPlainObject(entry) && !Array.isArray(entry)) {\n return `${indent}${key}: ${renderScalar(entry)}`;\n }\n if (Array.isArray(entry) && entry.length === 0) {\n return `${indent}${key}: []`;\n }\n if (isPlainObject(entry) && Object.keys(entry).length === 0) {\n return `${indent}${key}: {}`;\n }\n return `${indent}${key}:\\n${renderToonValue(entry, depth + 1)}`;\n })\n .join(\"\\n\");\n }\n\n return `${indent}${renderScalar(value)}`;\n}\n\nfunction renderDefaultMarkdownResult(value: unknown): string | null {\n if (!isPlainObject(value) || value.output_default !== \"markdown\") {\n return null;\n }\n if (typeof value.view !== \"string\" || !Array.isArray(value.events) || !Array.isArray(value.days)) {\n return null;\n }\n const lines = [`# pm calendar (${value.view})`, \"\"];\n const summary = isPlainObject(value.summary) ? value.summary : {};\n lines.push(`- events: ${String(summary.events ?? 0)}`);\n lines.push(\"\");\n if (value.events.length === 0) {\n lines.push(\"No calendar events matched the selected filters.\");\n return `${lines.join(\"\\n\")}\\n`;\n }\n for (const event of value.events) {\n if (!isPlainObject(event)) {\n continue;\n }\n const kind = typeof event.kind === \"string\" ? event.kind : \"event\";\n const title = typeof event.item_title === \"string\" ? event.item_title : \"\";\n const itemId = typeof event.item_id === \"string\" ? event.item_id : \"\";\n const reminderText = typeof event.reminder_text === \"string\" && event.reminder_text.length > 0 ? ` ${event.reminder_text}` : \"\";\n lines.push(`- [${kind}] ${itemId} ${title}${reminderText}`.trim());\n }\n return `${lines.join(\"\\n\")}\\n`;\n}\n\n/**\n * Implements format output for the public runtime surface of this module.\n */\nexport function formatOutput(result: unknown, options: OutputOptions): string {\n const commandOverride = runActiveCommandOverride(result);\n const nativeOutput = shouldUseNativeOutput(commandOverride.result);\n const effectiveResult = stripNativeOutputMarker(commandOverride.result);\n setActiveCommandResult(effectiveResult);\n const format =\n options.json === true\n ? \"json\"\n : options.json === false\n ? \"toon\"\n : options.defaultOutputFormat === \"json\"\n ? \"json\"\n : \"toon\";\n const serviceOverride = nativeOutput ? { handled: false, result: effectiveResult } : runActiveServiceOverrideSync(\"output_format\", {\n command: options.command,\n args: options.commandArgs,\n command_options: options.commandOptions,\n global: { ...options },\n pm_root: options.pmRoot,\n format,\n options: { ...options },\n result: effectiveResult,\n });\n if (serviceOverride.handled && typeof serviceOverride.result === \"string\") {\n return serviceOverride.result.endsWith(\"\\n\") ? serviceOverride.result : `${serviceOverride.result}\\n`;\n }\n const outputResult = serviceOverride.handled ? serviceOverride.result : effectiveResult;\n if (format === \"toon\") {\n const markdownDefault = renderDefaultMarkdownResult(outputResult);\n if (markdownDefault !== null) {\n return markdownDefault;\n }\n }\n const rendererOverride = nativeOutput ? { rendered: null } : runActiveRendererOverride(format, outputResult);\n if (rendererOverride.rendered !== null) {\n return rendererOverride.rendered.endsWith(\"\\n\") ? rendererOverride.rendered : `${rendererOverride.rendered}\\n`;\n }\n if (format === \"json\") {\n return `${JSON.stringify(outputResult, null, 2)}\\n`;\n }\n const compactedToon = compactToonValue(outputResult);\n if (compactedToon === undefined) {\n return \"{}\\n\";\n }\n return `${renderToonValue(compactedToon, 0)}\\n`;\n}\n\n/**\n * Implements print result for the public runtime surface of this module.\n */\nexport function printResult(result: unknown, options: OutputOptions): void {\n const projected = options.idOnly\n ? projectMutationResult(result, { idOnly: true })\n : options.noChangedFields\n ? projectMutationResult(result, { changedFields: \"compact\" })\n : result;\n const rendered = formatOutput(projected, options);\n if (options.quiet) {\n return;\n }\n writeStdout(rendered);\n}\n\n/**\n * Implements print error for the public runtime surface of this module.\n */\nexport function printError(message: string): void {\n const override = runActiveServiceOverrideSync(\"error_format\", {\n message,\n });\n const rendered = override.handled && typeof override.result === \"string\" ? override.result : message;\n writeStderr(rendered.endsWith(\"\\n\") ? rendered : `${rendered}\\n`);\n}\n\nexport const outputTestOnly = {\n compactToonValue,\n renderToonValue,\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAkCA,IAAM,qBAAqB;AAC3B,IAAM,0BAA0B;AAChC,IAAM,WAAW;AACjB,IAAM,6BAA6B,oBAAI,IAAI,CAAC,SAAS,UAAU,CAAC;AAEhE,SAAS,cAAc,OAAc;AACnC,MAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK,GAAG;AACvE,WAAO;EACT;AACA,QAAM,QAAQ,OAAO,eAAe,KAAK;AACzC,SAAO,UAAU,QAAQ,UAAU,OAAO;AAC5C;AAGA,SAAS,wBAAwB,UAAiC;AAChE,QAAM,gBAAgB,SAAS,kBAAkB;AACjD,MAAI,CAAC,MAAM,QAAQ,aAAa,GAAG;AACjC,WAAO;EACT;AACA,QAAM,YACJ,OAAO,eAAe,QAAQ,MAAM,OAAO,uBAAO,OAAO,IAAI,IAAI,CAAA;AACnE,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,QAAQ,GAAG;AACnD,QAAI,QAAQ,oBAAoB;AAC9B,gBAAU,GAAG,IAAI;IACnB;EACF;AACA,YAAU,uBAAuB,IAAI,cAAc;AACnD,SAAO;AACT;AAEA,SAAS,mBAAmB,OAA8B;AACxD,SAAO,UAAU,SAAS,MAAM,QAAQ,MAAM,kBAAkB,CAAC;AACnE;AAEA,SAAS,6BAA6B,OAA8B;AAClE,SACE,OAAO,MAAM,SAAS,YACtB,2BAA2B,IAAI,MAAM,IAAI,KACzC,MAAM,QAAQ,MAAM,QAAQ,CAAC;AAEjC;AAEA,SAAS,YAAY,UAAmC,MAAe;AACrE,QAAM,YACJ,OAAO,eAAe,QAAQ,MAAM,OAAO,uBAAO,OAAO,IAAI,IAAI,CAAA;AACnE,SAAO,OAAO,WAAW,QAAQ;AACjC,YAAU,QA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,CAAC,CAAC;;EACjD;AACA,QAAM,gBAAgB,iBAAiB,YAAY;AACnD,MAAI,kBAAkB,QAAW;AAC/B,WAAO;EACT;AACA,SAAO,GAAG,gBAAgB,eAAe,CAAC,CAAC;;AAC7C;AAKM,SAAU,YAAY,QAAiB,SAAsB;AACjE,QAAM,YAAY,QAAQ,SACtB,sBAAsB,QAAQ,EAAE,QAAQ,KAAI,CAAE,IAC9C,QAAQ,kBACN,sBAAsB,QAAQ,EAAE,eAAe,UAAS,CAAE,IAC1D;AACN,QAAM,WAAW,aAAa,WAAW,OAAO;AAChD,MAAI,QAAQ,OAAO;AACjB;EACF;AACA,cAAY,QAAQ;AACtB;AAKM,SAAU,WAAW,SAAe;AACxC,QAAM,WAAW,6BAA6B,gBAAgB;IAC5D;GACD;AACD,QAAM,WAAW,SAAS,WAAW,OAAO,SAAS,WAAW,WAAW,SAAS,SAAS;AAC7F,cAAY,SAAS,SAAS,IAAI,IAAI,WAAW,GAAG,QAAQ;CAAI;AAClE;",
6
+ "names": ["isPlainObject"]
7
+ }
@@ -1,18 +1,18 @@
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]="c47d06d6-06dd-59ff-bc33-96613e4fdde4")}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]="32a6140e-ee85-503d-8fa8-24a81dba5aa7")}catch(e){}}();
3
3
  import {
4
4
  verifyHistoryChain
5
- } from "./chunk-OGWQ2IEP.js";
5
+ } from "./chunk-7Y5N34HX.js";
6
6
  import {
7
7
  hashDocument
8
- } from "./chunk-ENGQOEUY.js";
8
+ } from "./chunk-GH73UOSJ.js";
9
9
  import {
10
10
  getHistoryPath,
11
11
  writeFileAtomic
12
- } from "./chunk-57NWPFF2.js";
12
+ } from "./chunk-UO7XAZK6.js";
13
13
 
14
14
  // dist/core/history/drift-scan.js
15
- import fs from "fs/promises";
15
+ import fs from "node:fs/promises";
16
16
  import { createHash } from "node:crypto";
17
17
  import path from "node:path";
18
18
  var DRIFT_CACHE_VERSION = 3;
@@ -202,6 +202,6 @@ async function scanHistoryDrift(pmRoot, items, options = {}) {
202
202
  export {
203
203
  scanHistoryDrift
204
204
  };
205
- //# sourceMappingURL=chunk-K46RF36U.js.map
205
+ //# sourceMappingURL=chunk-TEISGNSH.js.map
206
206
 
207
- //# debugId=c47d06d6-06dd-59ff-bc33-96613e4fdde4
207
+ //# debugId=32a6140e-ee85-503d-8fa8-24a81dba5aa7
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../core/history/drift-scan.ts"],"sourcesContent":["/**\n * @module core/history/drift-scan\n *\n * Implements append-only history and replay behavior for Drift Scan.\n */\nimport type { Stats } from \"node:fs\";\nimport fs from \"node:fs/promises\";\nimport { createHash } from \"node:crypto\";\nimport path from \"node:path\";\nimport { getHistoryPath } from \"../store/paths.js\";\nimport { writeFileAtomic } from \"../fs/fs-utils.js\";\nimport { hashDocument } from \"./history.js\";\nimport { verifyHistoryChain } from \"./replay.js\";\nimport type { HistoryEntry, ItemMetadata } from \"../../types/index.js\";\n\n/**\n * Documents the drift scan result payload exchanged by command, SDK, and package integrations.\n */\nexport interface DriftScanResult {\n missingStreams: string[];\n unreadableStreams: string[];\n hashMismatches: string[];\n chainMismatches: string[];\n driftedItems: string[];\n}\n\nconst DRIFT_CACHE_VERSION = 3;\nconst DRIFT_CACHE_FILENAME = \"history-drift-cache.json\";\n\n/**\n * Controls how cached history stream verification is trusted when the file stat\n * tuple still matches a previous scan.\n */\nexport type DriftCacheHitVerification = \"content_hash\" | \"metadata\";\n\n/**\n * Documents the history drift scan options shared by health, validate, and\n * repair callers.\n */\nexport interface DriftScanOptions {\n cacheHitVerification?: DriftCacheHitVerification;\n}\n\ninterface DriftCacheEntry {\n mtime_ms: number;\n ctime_ms: number;\n size: number;\n content_hash: string;\n latest_after_hash: string;\n chain_ok: boolean;\n}\n\ninterface DriftCacheEnvelope {\n version: number;\n entries: Record<string, DriftCacheEntry>;\n}\n\nfunction getDriftCachePath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", DRIFT_CACHE_FILENAME);\n}\n\nasync function loadDriftCache(pmRoot: string): Promise<DriftCacheEnvelope | null> {\n try {\n const raw = await fs.readFile(getDriftCachePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as DriftCacheEnvelope;\n if (parsed.version !== DRIFT_CACHE_VERSION || typeof parsed.entries !== \"object\" || parsed.entries === null) {\n return null;\n }\n return parsed;\n } catch {\n return null;\n }\n}\n\nfunction isErrno(error: unknown, code: string): boolean {\n return typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code === code;\n}\n\ninterface StreamVerification {\n latestAfterHash: string;\n chainOk: boolean;\n contentHash: string;\n}\n\ninterface DriftScanAccumulator {\n missingStreams: string[];\n unreadableStreams: string[];\n hashMismatches: string[];\n chainMismatches: string[];\n}\n\nfunction hashContent(raw: string): string {\n return createHash(\"sha256\").update(raw).digest(\"hex\");\n}\n\nasync function readHistoryContentHash(historyPath: string): Promise<string> {\n const raw = await fs.readFile(historyPath, \"utf8\");\n return hashContent(raw);\n}\n\n/**\n * Read and fully verify one history stream's hash chain. Returns null for an\n * empty/missing stream (caller records it as a missing stream).\n */\nasync function verifyHistoryStream(historyPath: string): Promise<StreamVerification | null> {\n const raw = await fs.readFile(historyPath, \"utf8\");\n const contentHash = hashContent(raw);\n if (raw.trim().length === 0) {\n return null;\n }\n const entries: HistoryEntry[] = [];\n let latestAfterHash: string | null = null;\n for (const line of raw.split(/\\r?\\n/)) {\n const trimmed = line.trim();\n if (trimmed.length === 0) {\n continue;\n }\n const parsed = JSON.parse(trimmed) as HistoryEntry;\n if (typeof parsed.after_hash !== \"string\" || parsed.after_hash.trim().length === 0) {\n throw new Error(\"missing after_hash\");\n }\n entries.push(parsed);\n latestAfterHash = parsed.after_hash;\n }\n /* c8 ignore start -- defensive guard for future history schema changes. */\n if (!latestAfterHash) {\n return null;\n }\n /* c8 ignore stop */\n return {\n latestAfterHash,\n chainOk: verifyHistoryChain(entries).ok,\n contentHash,\n };\n}\n\nfunction cacheMetadataMatches(cached: DriftCacheEntry | undefined, stat: Stats): boolean {\n return cached !== undefined && cached.mtime_ms === stat.mtimeMs && cached.ctime_ms === stat.ctimeMs && cached.size === stat.size;\n}\n\nasync function loadFreshStreamVerification(\n itemId: string,\n historyPath: string,\n accumulator: DriftScanAccumulator,\n): Promise<StreamVerification | null> {\n try {\n const loaded = await verifyHistoryStream(historyPath);\n if (!loaded) {\n accumulator.missingStreams.push(itemId);\n return null;\n }\n return loaded;\n } catch {\n accumulator.unreadableStreams.push(itemId);\n return null;\n }\n}\n\nasync function resolveStreamVerification(params: {\n itemId: string;\n historyPath: string;\n stat: Stats;\n cached: DriftCacheEntry | undefined;\n verifyCacheHitByContent: boolean;\n accumulator: DriftScanAccumulator;\n}): Promise<{ verification: StreamVerification | null; cacheDirty: boolean }> {\n const cachedContentHash =\n typeof params.cached?.content_hash === \"string\" && params.cached.content_hash.length > 0\n ? params.cached.content_hash\n : undefined;\n const canUseCache = cacheMetadataMatches(params.cached, params.stat) && cachedContentHash !== undefined && params.cached !== undefined;\n if (!canUseCache || !params.cached) {\n return {\n verification: await loadFreshStreamVerification(params.itemId, params.historyPath, params.accumulator),\n cacheDirty: true,\n };\n }\n let currentContentHash: string;\n if (params.verifyCacheHitByContent) {\n try {\n currentContentHash = await readHistoryContentHash(params.historyPath);\n } catch {\n params.accumulator.unreadableStreams.push(params.itemId);\n return { verification: null, cacheDirty: false };\n }\n } else {\n currentContentHash = cachedContentHash;\n }\n if (!params.verifyCacheHitByContent || currentContentHash === cachedContentHash) {\n return {\n verification: {\n latestAfterHash: params.cached.latest_after_hash,\n chainOk: params.cached.chain_ok,\n contentHash: currentContentHash,\n },\n cacheDirty: false,\n };\n }\n return {\n verification: await loadFreshStreamVerification(params.itemId, params.historyPath, params.accumulator),\n cacheDirty: true,\n };\n}\n\n/**\n * Scan every item's history stream for drift (missing/unreadable streams, broken\n * hash chains, and item/history hash mismatches).\n *\n * Full chain re-verification of a large history tree is the dominant cost of\n * `pm health`. We cache the per-stream verification keyed by the history file's\n * mtime/ctime/size plus content hash. Strict callers keep recomputing the\n * content hash on metadata hits; latency-sensitive health checks can opt into\n * trusting the stat tuple and skip rereading unchanged streams.\n */\nexport async function scanHistoryDrift(\n pmRoot: string,\n items: Array<ItemMetadata & { body: string }>,\n options: DriftScanOptions = {},\n): Promise<DriftScanResult> {\n const accumulator: DriftScanAccumulator = {\n missingStreams: [],\n unreadableStreams: [],\n hashMismatches: [],\n chainMismatches: [],\n };\n\n const cache = await loadDriftCache(pmRoot);\n const previousEntries: Record<string, DriftCacheEntry> = cache?.entries ?? {};\n const nextEntries: Record<string, DriftCacheEntry> = {};\n let cacheDirty = false;\n // Metadata mode does not open a stat-matched stream, so unreadable-after-stat\n // failures are intentionally deferred to strict validate/history-repair scans.\n const verifyCacheHitByContent = options.cacheHitVerification !== \"metadata\";\n\n for (const item of items) {\n const historyPath = getHistoryPath(pmRoot, item.id);\n\n let stat: Stats;\n try {\n stat = await fs.stat(historyPath);\n } catch (error: unknown) {\n if (isErrno(error, \"ENOENT\")) {\n accumulator.missingStreams.push(item.id);\n } else {\n accumulator.unreadableStreams.push(item.id);\n }\n continue;\n }\n\n const cached = previousEntries[item.id];\n const resolved = await resolveStreamVerification({\n itemId: item.id,\n historyPath,\n stat,\n cached,\n verifyCacheHitByContent,\n accumulator,\n });\n cacheDirty ||= resolved.cacheDirty;\n if (!resolved.verification) {\n continue;\n }\n\n if (!resolved.verification.chainOk) {\n accumulator.chainMismatches.push(item.id);\n }\n nextEntries[item.id] = {\n mtime_ms: stat.mtimeMs,\n ctime_ms: stat.ctimeMs,\n size: stat.size,\n content_hash: resolved.verification.contentHash,\n latest_after_hash: resolved.verification.latestAfterHash,\n chain_ok: resolved.verification.chainOk,\n };\n\n const { body, ...frontMatter } = item;\n const currentHash = hashDocument({\n metadata: frontMatter as ItemMetadata,\n body,\n });\n if (currentHash !== resolved.verification.latestAfterHash) {\n accumulator.hashMismatches.push(item.id);\n }\n }\n\n if (cacheDirty || Object.keys(previousEntries).length !== Object.keys(nextEntries).length) {\n const cachePath = getDriftCachePath(pmRoot);\n try {\n await fs.mkdir(path.dirname(cachePath), { recursive: true });\n await writeFileAtomic(cachePath, JSON.stringify({ version: DRIFT_CACHE_VERSION, entries: nextEntries }));\n } catch {\n // Best-effort cache write: a failed persist must never fail a health scan.\n }\n }\n\n const driftedItems = [\n ...new Set([\n ...accumulator.missingStreams,\n ...accumulator.unreadableStreams,\n ...accumulator.hashMismatches,\n ...accumulator.chainMismatches,\n ]),\n ].sort((a, b) => a.localeCompare(b));\n return { ...accumulator, driftedItems };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAMA,OAAO,QAAQ;AACf,SAAS,kBAAkB;AAC3B,OAAO,UAAU;AAkBjB,IAAM,sBAAsB;AAC5B,IAAM,uBAAuB;AA8B7B,SAAS,kBAAkB,QAAc;AACvC,SAAO,KAAK,KAAK,QAAQ,WAAW,oBAAoB;AAC1D;AAEA,eAAe,eAAe,QAAc;AAC1C,MAAI;AACF,UAAM,MAAM,MAAM,GAAG,SAAS,kBAAkB,MAAM,GAAG,MAAM;AAC/D,UAAM,SAAS,KAAK,MAAM,GAAG;AAC7B,QAAI,OAAO,YAAY,uBAAuB,OAAO,OAAO,YAAY,YAAY,OAAO,YAAY,MAAM;AAC3G,aAAO;IACT;AACA,WAAO;EACT,QAAQ;AACN,WAAO;EACT;AACF;AAEA,SAAS,QAAQ,OAAgB,MAAY;AAC3C,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU,SAAU,MAA4B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CAAC,CAAC;AACnC,SAAO,EAAE,GAAG,aAAa,aAAY;AACvC","debugId":"32a6140e-ee85-503d-8fa8-24a81dba5aa7"}
@@ -3,7 +3,7 @@
3
3
  import {
4
4
  collectUsedExtensionCapabilities,
5
5
  normalizeExtensionName
6
- } from "./chunk-57NWPFF2.js";
6
+ } from "./chunk-UO7XAZK6.js";
7
7
 
8
8
  // dist/core/extensions/activation-summary.js
9
9
  var HOOK_REGISTRY_FIELD_TO_KIND = [
@@ -145,6 +145,6 @@ export {
145
145
  describeExtensionActivation,
146
146
  renderExtensionSurfaceMarkdown
147
147
  };
148
- //# sourceMappingURL=chunk-AGHMOTGM.js.map
148
+ //# sourceMappingURL=chunk-TEKZOS7M.js.map
149
149
 
150
150
  //# debugId=b7da1375-1527-5871-9f84-948595aee48f
@@ -1,7 +1,3 @@
1
- import {
2
- acquireLock,
3
- listAllFrontMatterLight
4
- } from "./chunk-5VAA4YHR.js";
5
1
  import {
6
2
  BUILTIN_STATUS_IDS,
7
3
  TYPE_PRESET_NAMES,
@@ -20,17 +16,7 @@ import {
20
16
  serializeStatusDefsFile,
21
17
  upsertField,
22
18
  upsertStatusDef
23
- } from "./chunk-FT3QTERD.js";
24
- import {
25
- nowIso
26
- } from "./chunk-FLZSGSQR.js";
27
- import {
28
- PmCliError,
29
- getActiveExtensionRegistrations,
30
- readSettings,
31
- resolveGovernanceKnobs,
32
- runActiveOnWriteHooks
33
- } from "./chunk-SHQY2IDC.js";
19
+ } from "./chunk-J7BOLHAV.js";
34
20
  import {
35
21
  assertAliasesAvailable,
36
22
  assertTypeFolderAvailable,
@@ -41,7 +27,17 @@ import {
41
27
  removeItemType,
42
28
  serializeItemTypesFile,
43
29
  upsertItemType
44
- } from "./chunk-NGXQ3PFT.js";
30
+ } from "./chunk-YPMZMKN7.js";
31
+ import {
32
+ PmCliError,
33
+ acquireLock,
34
+ getActiveExtensionRegistrations,
35
+ listAllFrontMatterLight,
36
+ nowIso,
37
+ readSettings,
38
+ resolveGovernanceKnobs,
39
+ runActiveOnWriteHooks
40
+ } from "./chunk-YNCFP5AR.js";
45
41
  import {
46
42
  DEFAULT_RUNTIME_SCHEMA_FILE_PATHS,
47
43
  EXIT_CODE,
@@ -56,7 +52,7 @@ import {
56
52
  resolveRuntimeStatusRegistry,
57
53
  toDefaultFolder,
58
54
  writeFileAtomic
59
- } from "./chunk-LK6XLOGP.js";
55
+ } from "./chunk-LCFJ7XAM.js";
60
56
 
61
57
  // dist/cli/commands/schema.js
62
58
  import path from "node:path";
@@ -1246,4 +1242,4 @@ export {
1246
1242
  formatSchemaInferTypesHuman,
1247
1243
  _testOnlySchemaCommand
1248
1244
  };
1249
- //# sourceMappingURL=chunk-W572BIEB.js.map
1245
+ //# sourceMappingURL=chunk-TGUK6XN6.js.map